An invoice is primarily a merchant object, which represents a collection of items purchased by that merchant.
This API POST call allows you to insert and update invoices.
The endpoint you need to use for this is:
/invoice
Key | Details | Example |
---|---|---|
Authorization* | {token_type} {access_token} | Bearer c3499c2729730a7f807efb8676a92dcb6f8a3f8f |
Method* | POST | N/A |
x-accept-version | {recommended_latest_version_number} | 2 |
* Required header
NOTE: To update just supply the object id.
Key | Details | Data Type |
---|---|---|
invoices[{invoieId}].id | Unique Invoice Id | Int |
invoices[{invoieId}].supplierId | Supplier Id | Int |
invoices[{invoieId}].storeId | Merchant Store Id | Int |
invoices[{invoieId}].supplierStoreId | Supplier Store Id | Int |
invoices[{invoieId}].reference | Supplier Invoice Reference | String |
invoices[{invoieId}].completeDate | Supplier Invoice Date | Date |
invoices[{invoieId}].note | Supplier Invoice Note | String |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].barcode | Barcode | String |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].note | Invoice Item Note | String |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].name | Invoice Item Name | String |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].price | Price | String |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].vatPercentage | Vat Percentage | Float |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].quantity | Invoice Item Qty | Int |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].productId | Product Id | Int |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].accountId | Account Id | Int |
Key | Details | Data Type | Example |
---|---|---|---|
statusCode | Very important to check this for any error. 201 for success. | int | 201 |
Key | Details | Data Type |
---|---|---|
invoices[{invoieId}].id | Unique Invoice Id | Int |
invoices[{invoieId}].supplierId | Supplier Id | Int |
invoices[{invoieId}].storeId | Merchant Store Id | Int |
invoices[{invoieId}].supplierStoreId | Supplier Store Id | Int |
invoices[{invoieId}].reference | Supplier Invoice Reference | String |
invoices[{invoieId}].completeDate | Supplier Invoice Date | Date |
invoices[{invoieId}].note | Supplier Invoice Note | String |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].barcode | Barcode | String |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].note | Invoice Item Note | String |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].name | Invoice Item Name | String |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].price | Price | String |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].vatPercentage | Vat Percentage | Float |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].quantity | Invoice Item Qty | Int |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].productId | Product Id | Int |
invoices[{invoieId}].invoiceItems[{invoiceItemId}].accountId | Account Id | Int |
Please check the live API calls for more details on the API messages.
ID | Status Code | Title | Details |
---|---|---|---|
908 | 401 | Expired Token | Token expired or invalid. Please renew your token |
911 | 401 | Authorization Header Invalid | The authorization header is invalid. The correct format is Authorization: {token_type} {accessToken} |
919 | 429 | Cannot handle too many request | There is a limit for every object you can send to our server and you are exceding that. |
913 | 400 | Required parameter or object missing in request | One or more of the required parameters or object formation is missing in your request. Please refer the documentation |
904 | 401 | Access Denied | Access denied for the request |
912 | 403 | Resource Not Allowed For Specified User | The user does not own this resource and its forbidden |
899 | 500 | Unknown Error | Something went wrong. Please contact the site administrator |
Please check the live API calls for more details on the API messages.
ID | Status Code | Title | Details |
---|---|---|---|
202 | 200 | Token is valid | Token is validated and found valid. |
206 | 201 | Resource Created | Your resource is created partially or fully. Please check further message or process log |