Create Invoice
POST {{baseUrl}}/orders/invoices
This endpoint allows you to create an invoice to a specific order from your side, either as an uploaded file
, path url
, or ordinary data
and order
in your body request.
:::note
For the order
data type, you will need to specify the Invoice issuance to be from Salla.
However, for the other data types available, such as data
, url
, and file
, you will need to set it to custom from the Store Settings.
:::
orders.read_write
- Orders Read & Write
Request Body
{"order_id"=>"<integer>", "type"=>"credit_note", "data_type"=>"url", "url"=>"<string>", "invoice_number"=>"<string>", "sub_total"=>"<number>", "total"=>"<number>", "shipping_cost"=>"<number>", "cash_on_delivery_cost"=>"<number>", "tax"=>"<number>", "tax_value"=>"<integer>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"status":"\u003cnumber\u003e","success":"\u003cboolean\u003e","data":{"id":"\u003cnumber\u003e","invoice_number":"\u003cstring\u003e","uuid":"\u003cuuid\u003e","order_id":"\u003cnumber\u003e","invoice_reference_id":"\u003cstring\u003e","type":"\u003cstring\u003e","date":"\u003cstring\u003e","qr_code":"\u003cstring\u003e","payment_method":"\u003cstring\u003e","subtotal":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"shipping_cost":{"amount":"\u003cstring\u003e","taxable":"\u003cboolean\u003e","currency":"\u003cstring\u003e"},"cod_cost":{"amount":"\u003cnumber\u003e","taxable":"\u003cboolean\u003e","currency":"\u003cstring\u003e"},"discount":{"amount":"\u003cstring\u003e","currency":"\u003cstring\u003e"},"tax":{"percent":"\u003cnumber\u003e","amount":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"}},"total":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"items":[{"id":"\u003cstring\u003e","item_id":"\u003cstring\u003e","name":"\u003cstring\u003e","quantity":"\u003cstring\u003e","type":"food","price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"discount":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"tax":{"percent":"\u003cnumber\u003e","amount":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"}},"total":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"}},{"id":"\u003cstring\u003e","item_id":"\u003cstring\u003e","name":"\u003cstring\u003e","quantity":"\u003cstring\u003e","type":"service","price":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"discount":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"tax":{"percent":"\u003cnumber\u003e","amount":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"}},"total":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"}}]}}