Hi @Team,
Is there any plans in the near future to implement nested JSON and file send/receive API calls?
Thank you!
Hi Joakim,
Do you mean for the client or server side API connect?
Also nested json should be possible already.
We hope soon to add file uploading as well indeed.
Maybe you can supply a specific API and use case that you are looking to implement?
For the server side, at the moment i had to edit the php api file. Its possible but it world be more comfy to do it in GUI.
Thanks for an amazing software.
This needs to be done server side only:
API link:
https://developer.fortnox.se/documentation/resources/invoices/
Specifically this:
"Invoice": {
"CustomerNumber": "100",
"InvoiceRows": [
{
"ArticleNumber": "66892",
"DeliveredQuantity": "10.00"
}
]
}
I did not find any way to do it in GUI, only by editing “dmxConnect/api/xxx.php” i managed to get it to work.
Hi @JoakimAsk, nested JSON is currently possible with Wappler, see Server Action Unpacking Nested API JSON results.
You might need to customize it based on your needs, but it is possible.
Hi Scott,
Thank you, I’m trying to POST data to API not GET.
I managed to solve this by manually edit dmxConnect/api/somefilename.php
If there is a GUI way I would be very interested.
@JoakimAsk, I am sorry, it was not clear in your original post what you were trying to do.
This might help you out some, Stripe Integration Part 4b - The Basic Payment Action - Server Connect Page, you would need to look through how @Hyperbytes talks about setting up Stripe to get in idea of how he addressed the issue of posting to Stripe’s API and receiving a response back from Stripe.
Think this may help
(incorrect link fixed)
Sorry, wrong link, corrected above
Thank you @Hyperbytes.
I solved it by editing the dmxConnect/api/filename.php
I have not found a way to do this in GUI only, maybe i just do not understand how to??
The problem is that im not using a form, only data from server side.
The structure is like this:
- I am setting the customer number
- I am getting customer information from DB
- I am creating invoice in other system by API
- (this is my problem) I want to repeat all invoice rows and add them to remote system via API.
My edit of the dmxConnect/api/filename.php:
Where and how were you setting “InvoiceRows” (before filename.php hack)
Im getting the invoice rows from the DB Query. So each invoice row
includes description(made from multiple db values concatinated), Quantity and price.
Understandable??
This is what i want to do, only server side:
"Invoice": {
"CustomerNumber": "100",
"InvoiceRows": [
{
"Description": "Amazing blue football", (Repeating all this invoice rows is the problem)
"DeliveredQuantity": "10.00"
"Price": "4"
},
{
"Description": "Amazing blue football2",
"DeliveredQuantity": "11.00"
"Price": "35"
},
{
"Description": "Amazing blue football3",
"DeliveredQuantity": "12.00"
"Price": "16"
},
{
"Description": "Amazing blue football4",
"DeliveredQuantity": "13.00"
"Price": "7"
},
{
"Description": "Amazing blue football5",
"DeliveredQuantity": "14.00"
"Price": "8"
},
{
"Description": "Amazing blue football6",
"DeliveredQuantity": "15.00"
"Price": "99"
},
{
"Description": "Amazing blue football7",
"DeliveredQuantity": "16.00"
"Price": "25"
}
]
}
Yes, so you are effectively building an array of values within the repeat, how do you then pass it to the api
Hi @Hyperbytes
You mean this?
yes, the input data section is what i wanted to see.
Is there any schema attached to the API action?
What is visible when you click the picker in the Input Data Value box?