TB.One > Order Data and Order Processing > FAQ - Order Data and Order Processing > How to Upload Invoices and Credit Notes to Orders via REST

How to Upload Invoices and Credit Notes to Orders via REST

TIP:
Depending on your connected marketplaces and your setup, you may need to attach invoices/credit notes to your orders using REST API. You can upload documents to any order, but TB.One will only forward them to relevant marketplaces.

ATTENTION:

You can only upload invoices to orders that have the status "Dispatch advice" (that means orders that have been shipped). If you try to upload an invoice to an order that has not been shipped yet, the upload will fail.

Invoices and credit notes have to be in PDF format.

Request Requirements for File Upload:

Type: Multipart Form ("multipart/form-data").

Key: Any name of your choice.

Value: File (your PDF document).

Invoices:

 

Endpoint URL:

https://rest.core.tradebyte.com/{accountNumber}/orders/{orderID}/invoice/

 

Method

POST

Parameter

accountNumber

Enter your TB.One account number.

Parent Resource

orders

The target is an order.

Parameter

orderID

Enter the order's ID (found under "Orders > Order list" in the graphical user interface and in the TB.Order XML's node <TB_ID>).

Target Resource

invoice

The file contains an invoice (file format PDF).

Credit Notes:

 

Endpoint URL:

https://rest.core.tradebyte.com/{accountNumber}/orders/{orderID}/creditnote/

 

Method

POST

Parameter

accountNumber

Enter your TB.One account number.

Parent Resource

orders

The target is an order.

Parameter

orderID

Enter the order's ID (found under "Orders > Order list" in the graphical user interface and in the TB.Order XML's node <TB_ID>).

Target Resource

creditnote

The file contains a credit note (file format PDF)