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.

OAuth Scopes


orders.read_write

Request Body

[{"name"=>"order_id", "value"=>"1818813486", "datatype"=>"number"}, {"name"=>"file", "value"=>"@/home/user/files/invoice.pdf", "datatype"=>"string"}, {"name"=>"type", "value"=>"tax_invoice", "datatype"=>"string"}, {"name"=>"data_type", "value"=>"file", "datatype"=>"string"}]

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{"status":200,"success":true,"data":{"id":1333835642,"order_id":1371877152,"type":"Tax Invoice","invoice_number":"2sdfs435d","sub_total":{"amount":999,"currency":"ر.س"},"shipping_cost":{"amount":78,"currency":"ر.س"},"cod_cost":{"amount":789,"currency":"ر.س"},"discount":{"amount":0,"currency":"ر.س"},"tax":{"percent":10,"amount":{"amount":35.3,"currency":"ر.س"}},"total":{"amount":7789,"currency":"ر.س"},"date":"2022-03-23","items":[{"name":"فستان فراولة","quantity":1,"price":{"amount":"90.50","currency":"SAR"},"discount":{"amount":"0.00","currency":"SAR"},"tax":{"percent":"15.00","amount":{"amount":"13.58","currency":"SAR"}},"total":{"amount":104.08,"currency":"SAR"}}]}}