An error has occured when create sales order via API

This thread is now closed to new comments.
Some of the links and information provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
akhilawin009
1 Post
User

1Posts

1Kudos

0Solutions

An error has occured when create sales order via API

I'm trying to create sales order via API.

So using POST for https://exo.api.myob.com/salesorder

JSON request is

{ "id": -1, "branchid": "0", "contactid": "68971", "debtorid": "29306", "defaultlocationid": "1", "deliveryaddress": { "line1": "Rudney Visser", "line2": "", "line3": "94 McMurtrie Road", "line4": "", "line5": "McLaren Vale SA", "line6": "AU 5171" }, "duedate": "2019-11-27T00:04:24+00:00", "instructions": "", "lines": [ { "stockcode": "01130027", "stocktype": "LinkedItem", "description": "Floozie Sang Rose 2019 - BLACK SHEEP CLUB", "unitprice": 20.83, "linetotal": 159.161936, "listprice": 159.161936, "orderquantity": 1, "releasequantity": 1, "discount": 0, "locationid": 1, "branchid": 0, "taxrateid": 20, "linetype": 0, "isoriginatedfromtemplate": false, "ispriceoverridden": false, "duedate": "2019-11-27", "narrative": "", "batchcode": "" } ], "orderdate": "2019-11-27T00:04:24+00:00", "reference": "", "customerordernumber": "", "salespersonid": "2", "status": "NotProcessed", "narrative": "", "currencyid": 0, "exchangerate": 1 }

 

This is passed in validate test and it is creating new sales order as well if not include Lines info.

But with this json, only showing error 

{ "message": "An error has occurred." }

 

Not sure what is the reason.

Please help me.

1 REPLY 1
Tim_NZ
3 Posts
User

3Posts

1Kudos

0Solutions

Re: An error has occured when create sales order via API

Hello - did you ever get this working?  

Didn't find your answer here?

Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post