- Welcome 👋
- Get Started
- Create Your First App
- Authorization
- Webhooks
- Conditional Webhooks
- Security Considerations
- Multi-Language Support
- Responses
- Pagination
- Rate Limiting
- Versioning
- Change Log
- Support
- APIs
- Orders
- Order Status
- Order Histories
- Order Tags
- Order Invoice
- Order Reservations
- Order Items
- Products
- Product Options
- Product Quantity
- Product Variants
- Product Tags
- Product Images
- Product Option Values
- Abandoned Carts
- Customer Groups
- Customers
- Digitals Product
- Categories
- Exports
- Shipments
- Shipping Companies
- Shipping Zones
- Shipping Rules
- Countries
- Product Option Templates
- Taxes
- Coupons
- Affiliates
- Order Assignment
- Special Offers
- Transactions
- Payments
- Settlements
- Settings
- Merchant
- Brands
- Reviews
- Branches
- Currencies
- SEO
- Cities
- DNS Records
- Languages
- Employees
- Advertisements
- Webhooks
- Custom URLs
- Loyalty Points
- Webhooks - Store Events
Create Invoice
Production
Production
POST
https://api.salla.dev/admin/v2/orders/invoices
Order Invoice
Last modified:2024-12-29 06:40:32
Note
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.Scopes
orders.read_write
- Orders Read & WriteRequest
Authorization
Add the parameter
Authorization
to Headers,whose value is to concatenate the Token after the Bearer.Example:
Authorization: Bearer ********************
Body Params application/json
type
enum<string>
required
credit_note
invoice type before creating a tax_invoice
typeAllowed values:
tax_invoicecredit_note
Example:
tax_invoice
data_type
enum<string>
required
Allowed values:
dataurlfileorder
Example:
data
url
string
optional
PDF
file. The variable is requiredif
data_type
is url
.Example:
https://i.ibb.co/jyqRQfQ/invoice.pdf
invoice_number
string | integer
optional
requiredif
data_type
is data
.Example:
2sdfs435d
sub_total
number
optional
requiredif
data_type
is data
.Example:
999
total
number
optional
requiredif
data_type
is data
.Example:
7789
shipping_cost
number
optional
requiredif
data_type
is data
.Example:
78
cash_on_delivery_cost
number
optional
requiredif
data_type
is data
.Example:
789
tax
number
optional
requiredif
data_type
is data
.Example:
10
tax_value
integer
optional
requiredif
data_type
is data
.Example:
35.3
Example
{
"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
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.salla.dev/admin/v2/orders/invoices' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200Success
application/json
Body
status
number
optional
success
boolean
optional
data
object ( InvoiceDetails)
optional
id
number
required
Example:
454902145
invoice_number
string
required
Example:
1
uuid
string <uuid>
required
Example:
e7f9e1e3-90d1-487d-afe1-f97e10b80b1d
order_id
number
required
invoice_reference_id
string | null
required
type
string
required
Example:
Tax Invoice
date
string
required
Example:
2023-10-01
qr_code
string | null
required
payment_method
string
required
Example:
credit_card
subtotal
object
required
shipping_cost
object
required
cod_cost
object
required
discount
object
required
tax
object
required
total
object
required
items
array [object {10}]
required
Examples
{
"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"
}
}
]
}
}
🟠404Not Found
🟠422Error Validation
🟠401Unauthorized
Modified at 2024-12-29 06:40:32