Update Invoice

update an invoice

Authentication

X-Auth-Tokenstring
### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
X-Store-Hashstring
### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Store-Hash` | `store_hash` | The unique store hash associated with a BigCommerce store that has B2B Edition enabled. |

Path parameters

invoiceIdstringRequired

Request

customerIdstringOptional>=1 character
B2B Edition Company ID
externalCustomerIdstringOptional>=1 character
Ext Customer ID
externalIdstringOptional>=1 character
Ext Invoice ID
invoiceNumberstringOptional>=1 character
Invoice Number, must be unique
typestringOptional>=1 character
dueDatedoubleOptional
Invoice due date
statusdoubleOptional

invoice status, noted status will be auto set to 2 when open balance is <= 0

purchaseOrderNumberstringOptional>=1 character
PO Number
detailsobjectOptional
Details that will show on the invoice. When updating this field, the new value will completely replace the existing details. To preserve existing details while making updates, retrieve the current details first, and make your edits to that object before submitting the changes.
sourcedoubleOptional
Mark the source of the invoice, 0 for B2B Edition, 1 for external.
originalBalanceobjectOptional
Invoice original balance
openBalanceobjectOptional
Invoice balance awaiting for payment
createdAtintegerOptional
externalPdfUrlstringOptional

The URL of an externally hosted PDF file to be associated with this invoice. The file size must not exceed 5 MB. Ensure that the file hosting service supports Cross-Origin Resource Sharing (CORS) to allow our system to access the file. To remove an existing PDF link, use an empty string.

extraFieldslist of objectsOptional

Response

OK
codedouble
dataobject
metaobject