For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
      • Storefront
      • Management
        • Overview
          • Addresses
          • Authentication
          • Channels
          • Company
          • Invoice Management
              • GETGet Invoice Detail
              • PUTUpdate Invoice
              • DELDelete Invoice
              • GETList Invoices
              • POSTCreate Invoice
              • POSTCreate Invoice from Order
              • GETDownload Invoice PDF
              • GETGet Invoice Extra Field Configs
          • Orders
          • Payment
          • Quotes
          • Sales Staff
          • Shopping List
          • Super Admin
          • Users
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTB2BManagementInvoice ManagementInvoice

Update Invoice

PUT
https://api-b2b.bigcommerce.com/api/v3/io/ip/invoices/:invoiceId
PUT
/api/v3/io/ip/invoices/:invoiceId
$curl -X PUT https://api-b2b.bigcommerce.com/api/v3/io/ip/invoices/invoiceId \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "customerId": "3",
> "dueDate": 1619826907,
> "details": {
> "header": {
> "costLines": [
> {
> "amount": {
> "code": "USD",
> "value": "400.0000"
> },
> "description": "Subtotal"
> },
> {
> "amount": {
> "code": "USD",
> "value": "0.0000"
> },
> "description": "Freight"
> },
> {
> "amount": {
> "code": "USD",
> "value": "0.0000"
> },
> "description": "Sales Tax"
> }
> ]
> },
> "details": {
> "lineItems": [
> {
> "sku": "CLC",
> "quantity": "2",
> "unitPrice": {
> "code": "USD",
> "value": "200.0000"
> },
> "type": "physical",
> "comments": "item comments",
> "description": "[Sample] Canvas Laundry Cart",
> "customFields": {
> "key": "Back-ordered",
> "value": "No"
> }
> }
> ]
> }
> },
> "openBalance": {
> "code": "USD",
> "value": "12.0000"
> }
>}'
200Update an invoice
1{
2 "code": 200,
3 "data": {
4 "id": 33
5 },
6 "meta": {
7 "message": "SUCCESS"
8 }
9}
update an invoice
Was this page helpful?
Previous

Get Invoice Detail

Next

Delete Invoice

Built with

Authentication

X-Auth-Tokenstring
| 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-fundamentals/api-accounts). | For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/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
| 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
invoice id

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
HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

HeaderArgumentDescription
X-Store-Hashstore_hashThe unique store hash associated with a BigCommerce store that has B2B Edition enabled.