TB.One > Order Data and Order Processing > FAQ - Order Data and Order Processing > How to Upload Invoices and Credit Notes to Orders via REST
TIP: |
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) |