Create Invoice
POST
/orders/invoicesThis endpoint allows you to create an invoice to a specific order from your side.
:::tip[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.
:::
Request
Invoice Type. Note that you cannot create a credit_note
invoice type before creating a tax_invoice
type
Invoice Data Type.
URL Link to the PDF
file. The variable is requiredif
data_type
is url
.
Invoice Number. The variable is requiredif
data_type
is data
.
Invoice Subtotal Cost. The variable is requiredif
data_type
is data
.
Invoice Total Cost. The variable is requiredif
data_type
is data
.
Invoice Shipping Cost. The variable is requiredif
data_type
is data
.
Invoice COD Cost. The variable is requiredif
data_type
is data
.
Tax Cost Percentage. The variable is requiredif
data_type
is data
.
Tax Value Cost. The variable is requiredif
data_type
is data
.
{
"order_id": 1818813486,
"type": "tax_invoice",
"data_type": "data",
"url": "https://i.ibb.co/jyqRQfQ/invoice.pdf",
"invoice_number": "2sdfs435d",
"sub_total": 999,
"total": 7789,
"shipping_cost": 78,
"cash_on_delivery_cost": 789,
"tax": 10,
"tax_value": 35.3
}
Request samples
Responses
Response status code, a numeric or alphanumeric identifier used to convey the outcome or status of a request, operation, or transaction in various systems and applications, typically indicating whether the action was successful, encountered an error, or resulted in a specific condition.
Response flag, boolean indicator used to signal a particular condition or state in the response of a system or application, often representing the presence or absence of certain conditions or outcomes.
{
"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"
}
}
]
}
}