RE: Create Invoice with REST API
Hi all,
Has anyone successfully created an invoice using the REST API? The documentation is pretty sparse on payload examples and the closest approximation in the postman collection is Create Sales Order. Using the schema of the postman Create Sales Order as a starting point for invoices isn’t working, I’m just getting a 400 “Invalid content in the request body.” error.
My current test payload (with id’s redacted) is:
Hello, you can use this structure. It’s work well!
{
“account”: {
“id”: “xxx”,
“refName”: “xxx Accounts Receivables : Accounts Receivable”
},
“item”: {
“items”: [
{
“item”: {
“id”: “xxxx”,
“type”: “noninventorysaleitem”
},
“amount”: 2.0,
“quantity”: 2.0
}
]
},
“currency”: {
“id”: “1”,
“refName”: “Australian Dollar”
},
“customForm”: {
“id”: “xxx”,
“refName”: “KxxxxV ANZ xxx STD – Invoice”
},
“email”: “xxx@xxx.com”,
“entity”: {
“id”: “xxx”,
“refName”: “xxxx Test x xxname”
},
“exchangeRate”: 1.0,
“excludeFromGLNumbering”: false,
“location”: {
“id”: “41”,
“refName”: “AUS : ACT : xxxxx ACT”
},
“postingPeriod”: {
“id”: “121”,
“refName”: “Aug 2021”
},
“subsidiary”: {
“id”: “19”,
“refName”: “x xxx Pty Limited”
},
“subtotal”: 2.0,
“terms”: {
“id”: “13”,
“refName”: “14 Days EOM”
},
“toBeEmailed”: true,
“tranDate”: “2021-08-11”
}