Create Invoice
POST https://api.salla.dev/admin/v2/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 asdata
,url
, andfile
, you will need to set it to custom from the Store Settings.
Request Body
[{"name"=>"order_id", "value"=>"<integer>", "datatype"=>"string"}, {"name"=>"file", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"type", "value"=>"credit_note", "datatype"=>"string"}, {"name"=>"data_type", "value"=>"data", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"status":"\u003cnumber\u003e","success":"\u003cboolean\u003e","data":{"id":"\u003cnumber\u003e","type":"\u003cstring\u003e","order_id":"\u003cnumber\u003e","invoice_number":"\u003cstring\u003e","sub_total":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"shipping_cost":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"cod_cost":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"discount":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"tax":{"percent":"\u003cstring\u003e","amount":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"}},"total":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"},"date":"\u003cstring\u003e","items":[{"name":"\u003cstring\u003e","quantity":"\u003cnumber\u003e","price":{"amount":"\u003cstring\u003e","currency":"\u003cstring\u003e"},"discount":{"amount":"\u003cstring\u003e","currency":"\u003cstring\u003e"},"tax":{"percent":"\u003cstring\u003e","amount":{"amount":"\u003cstring\u003e","currency":"\u003cstring\u003e"}},"total":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"}},{"name":"\u003cstring\u003e","quantity":"\u003cnumber\u003e","price":{"amount":"\u003cstring\u003e","currency":"\u003cstring\u003e"},"discount":{"amount":"\u003cstring\u003e","currency":"\u003cstring\u003e"},"tax":{"percent":"\u003cstring\u003e","amount":{"amount":"\u003cstring\u003e","currency":"\u003cstring\u003e"}},"total":{"amount":"\u003cnumber\u003e","currency":"\u003cstring\u003e"}}]}}