
Hi,
i need to send a http post with the custom root node, the template from the API is below; I have tried everything I could come up with but could not figure out a way to customise the json payload that the header and body would be embedded in te root node "payload". Anyone found a workaround for this? is there any way to freely compose the json for the http request?
{
"payload": {
"Header": {
"MessageType": "Request",
"SubmissionNumber": "00000001",
"Authentication": {
"AccNumber": "123456",
"MD5Value": "7dd259dea3393880406d292e3f6f5830",
"ApplicationID": "appID"
}
},
"Body": {
"InvoiceData": {
"InvoiceType": "INVOICE",
"ClientID": "1343151",
"ClientAddress": {
"Address": "123 Test Street<br/>Manchester<br/>MA1 5TH<br/>United Kingdom",
"CountryISO": "GB"
},
"Currency": "GBP",
"TermDays": "14",
"Language": "en",
"InvoiceLines": {
"ItemLines": {
"ItemLine": [
{
"ItemID": "0",
"ItemName": "BC1",
"ItemDescription": "300 Business Cards (250gsm)",
"ItemNominalCode": "4000",
"Tax1": {
"TaxName": "VAT",
"TaxPercentage": "20.00",
"TaxAmount": "20"
},
"UnitCost": "100",
"Qty": "1"
},
{
"ItemID": "0",
"ItemName": "EMB1",
"ItemDescription": "Embossing Stamp",
"ItemNominalCode": "4000",
"Tax1": {
"TaxName": "VAT",
"TaxPercentage": "20.00",
"TaxAmount": "10"
},
"UnitCost": "50",
"Qty": "1"
}
]
}
},
"Scheduling": {
"SingleInvoiceData": {
"IssueDate": "2017-05-23",
"PurchaseReference": "0095446"
}
}
}
}
}
}