Hi all.
Just wondering how you set up json body's in retool that require key's within keys?
When i query directly through my swagger site using application/json it would look like the below(sample).
{
"Id": 1,
"SaleDate": "2023-09-22T15:45:44.8361156+10:00",
"Member": {
"Id": "5000016",
"Classifications": [
{
"Id": 2,
}
],
},
"Items": [
{
"Id": 16332,
"Quantity": 1,
"Price": 0,
"InventoryCode": "16332"
}
As you can see i have a 2 main keys in this example being ID and Items with ID having 4 sub keys being Saledate, Member, ID, and classification.
How do you set something like this up in retool?
Screenshots.
Swagger
CURL
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'ApiKey: apikey' -d '{ \
"Id": 1, \
"SaleDate": "2023-09-22T15:45:44.8361156+10:00", \
"Member": { \
"Id": "5000016", \
"Classifications": [ \
{ \
"Id": 2, \
} \
], \
}, \
"Items": [ \
{ \
"Id": 16332, \
"Quantity": 1, \
"Price": 0, \
"InventoryCode": "16332" \
} \
], \
"Media": [ \
{ \
"Id": 7, \
"Amount": 0, \
"VoucherBarcode": "446109387525565" \
} \
], \
"SuppliedVouchers": [ \
{ \
"Barcode": "446109387525565", \
} \
] \
}' 'Our endpoint address'
Cheers