Invoice
Get invoice detail
GET https://api-b2b.bigcommerce.com/api/v3/io/ip/invoices/{invoiceId}Request
get invoice detail
Authentication
- authToken in header
Parameters
- invoiceId in path - stringrequiredinvoice id
example
Response
OK
Body
object | application/json
codenumber
dataobject
Extra Field ValuesExample: {"extraFields":[{"fieldName":"string","fieldValue":"string"}]}
200
example-1
Update an invoice
PUT https://api-b2b.bigcommerce.com/api/v3/io/ip/invoices/{invoiceId}Request
update an invoice
Authentication
- authToken in header
Parameters
- invoiceId in path - stringrequiredinvoice id
Body
object | application/json
customerIdstring
B2B Edition Company ID>= 1 charactersexternalCustomerIdstring
Ext Customer ID>= 1 charactersexternalIdstring
Ext Invoice ID>= 1 charactersinvoiceNumberstring
Invoice Number, must be unique>= 1 characterstypestring
>= 1 charactersdueDatenumber
Invoice due datestatusnumber
invoice status, noted status will be auto set to 2 when open balance is <= 0purchaseOrderNumberstring
PO Number>= 1 charactersdetailsobject
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.sourcenumber
Mark the source of the invoice, 0 for B2B Edition, 1 for external.originalBalanceobject
Invoice original balanceopenBalanceobject
Invoice balance awaiting for paymentcreatedAtinteger
externalPdfUrlstring
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.extraFieldsarray[object]
Update body with details field
Update body without details field
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
200
400
Delete an invoice
DELETE https://api-b2b.bigcommerce.com/api/v3/io/ip/invoices/{invoiceId}Request
delete an invoice
Authentication
- authToken in header
Parameters
- invoiceId in path - stringrequiredinvoice id
example
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
200
Create Invoice
POST https://api-b2b.bigcommerce.com/api/v3/io/ip/invoicesRequest
Create Invoice
Authentication
- authToken in header
Body
object | application/json
Extra Field Values
invoiceNumberstring
requiredInvoice no.typestring
Invoice typeDefault: Invoice
dueDateinteger
The due date for this invoice, specified as a Unix timestamp. If left empty, it will be set to the current date plus a pre-configured number of days (set in your B2B Edition control panel settings).statusinteger
Invoice status. Possible values: 0: Open (default) 1: Partially paid 2: Completed
The status will automatically be set to Completed (2) when the open balance becomes zero or negative.
Allowed: 0 | 1 | 2
Default: 0
orderNumberstring
BigCommerce order ID associated with this invoice.purchaseOrderNumberstring
PO NumberoriginalBalanceobject
requiredOriginal balanceopenBalanceobject
requiredOpen balance , when it is <= 0, status will be auto set to 2issuedAtnumber
When the invoice was created. The current timestamp is the default.detailsobject
Invoice detailssourcenumber
The source of the invoice. Possible values: 0: B2B Edition 1: External
Allowed: 0 | 1
Default: 0
customerIdstring
requiredB2B Edition Company IDexternalIdstring
ERP Invoice IDexternalCustomerIdstring
ERP Customer IDchannelIdinteger
BigCommerce Channel IDexternalPdfUrlstring
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.termsConditionsstring
Terms & Conditions. Visible on the default Invoice PDF.extraFieldsarray[object]
Invoice body with details info
Invoice body without details info
Response
OK
Body
object | application/json
codenumber
200dataobject
200
400
Get invoices
GET https://api-b2b.bigcommerce.com/api/v3/io/ip/invoicesRequest
get invoices
Authentication
- authToken in header
Parameters
- offset in query - number
- limit in query - number
- orderBy in query - string"DESC" or "ASC"Example: DESC
Allowed: DESC | ASC
- sortBy in query - stringSort by the field valueExample: invoiceNumber
Allowed: invoiceNumber | createdAt | customerId | externalCustomerId | dueDate | updatedAt | isPendingPayment | openBalance | originalBalance | status
- searchBy in query - stringFilter by a fieldExample: invoiceNumber
Allowed: invoiceNumber | type | orderNumber | purchaseOrderNumber | customerId | externalCustomerId
- q in query - stringYou can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".
- customerName in query - stringQuery by invoice B2B Edition company name
- customerId in query - stringQuery by invoice B2B Edition company ID
- status in query - integerQuery by invoice statusExample: 1
Allowed: 0 | 1 | 2
- beginDateAt in query - stringQuery by the created timestamp, along with the "endDateAt" parameter
- endDateAt in query - stringQuery by the created timestamp, along with the with the "beginDateAt" parameter
- externalId[] in query - arrayQuery by the invoice external IDType: array[number]
- isIncludeExtraFields in query - stringDetermine if extra fields should show in the response
Allowed: 0 | 1
- channelIds in query - arrayBigCommerce Channel IDsType: array[number]
example
Response
OK
Body
object | application/json
codenumber
dataarray[object]
example
Create invoice from order
POST https://api-b2b.bigcommerce.com/api/v3/io/ip/orders/{orderId}/invoicesRequest
create invoice from B2B Edition order
Authentication
- authToken in header
Parameters
- orderId in path - numberrequiredB2B Edition order ID
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
200
404
invoice download pdf
GET https://api-b2b.bigcommerce.com/api/v3/io/ip/invoices/{invoiceId}/download-pdfRequest
Get invoice download PDF
Authentication
- authToken in header
Parameters
- invoiceId in path - stringrequired
example
Response
OK
Body
object | application/json
codeinteger
dataobject
Get invoice extra field configs
GET https://api-b2b.bigcommerce.com/api/v3/io/ip/invoices/extra-fieldsRequest
Get invoice extra field configs
Authentication
- authToken in header
Parameters
- offset in query - integerPagination offset default: 0
- limit in query with default of 10 - integerPagination limit default: 10
example
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataarray[object]
example
Did you find what you were looking for?