I am new to JSON, so no doubt this is an easy one for you experts ;-).
I am able to post the following and it is creating the order, but it is not adding any lines. Could someone please check out the code and see if it is structurally correct, appreciate you don't know what tags should be written to, but is the format correct?
Also do I have the address bits right for multiple lines in there?
This order is just for one line, other orders will be multiple lines, but I can't even get a one line order in... All assistance gratefully received.
{"header":
{
"account": "0000420",
"reference": "1234",
"name": "Fred Jones",
"address": {
"line": ["Address line 1",
"Address line 2",
"Address line 3",
"Address line 4"
],
"postcode": "post"
},
"deliverycountry": "GB",
"invoicename": "Fred Jones",
"invoicecountry": "GB",
"instructions": "Sample text inst",
"ordertype": "sale",
"lines": [{
"line": {
"product": "ABC123",
"extendeddescription": "Product description",
"quantity": 1,
"price": 100
}
}]
}
}
What I have tried:
I have googled, no joy, moved the braces and the square bracket, no joy.