- 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 Order Item
Production
Production
POST
https://api.salla.dev/admin/v2/orders/items
Order Items
Last modified:2024-12-29 06:40:32
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
order_id
integer
required
identifier_type
string
optional
identifier
integer
optional
quantity
integer
optional
branch_id
integer
optional
options
array [object {2}]
optional
id
integer
optional
value
array[string]
optional
name
string
optional
price
integer
optional
cost_price
integer
optional
weight
integer
optional
weight_type
string
optional
Example
{
"order_id": 837293123,
"identifier_type": "id",
"identifier": 123456,
"quantity": 1,
"branch_id": 12342,
"options": [
{
"id": 789012,
"value": [
"value1",
"value2"
]
}
],
"name": "Custom Product Name",
"price": 100,
"cost_price": 80,
"weight": 150,
"weight_type": "g"
}
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/items' \
--header 'Content-Type: application/json' \
--data-raw '{
"order_id": 837293123,
"identifier_type": "id",
"identifier": 123456,
"quantity": 1,
"branch_id": 12342,
"options": [
{
"id": 789012,
"value": [
"value1",
"value2"
]
}
],
"name": "Custom Product Name",
"price": 100.00,
"cost_price": 80.00,
"weight": 150,
"weight_type": "g"
}'
Responses
🟢200Success
application/json
Body
status
integer
optional
success
boolean
optional
data
array[object (OrderItem) {15}]
optional
id
number
required
name
string
required
sku
string
required
quantity
integer
required
currency
string
required
weight
number
required
weight_label
string
required
amounts
object
required
notes
string
required
options
array [object {5}]
required
images
array [object {3}]
required
codes
array [object {2}]
required
files
array [object {3}]
required
reservations
array [object {4}]
required
branches_quantity
array[integer]
required
Example
{
"status": 200,
"success": true,
"data": [
{
"id": 365435777,
"name": "SSD",
"sku": "sam-ssd-256g",
"quantity": 1,
"currency": "SAR",
"weight": 0.51,
"weight_label": "٥١٠ جم",
"amounts": {
"price_without_tax": {
"amount": 150,
"currency": "SAR"
},
"total_discount": {
"amount": 0,
"currency": "SAR"
},
"tax": {
"percent": "15.00",
"amount": {
"amount": 22.5,
"currency": "SAR"
}
},
"total": {
"amount": 150,
"currency": "SAR"
}
},
"notes": "",
"options": [
{
"id": 675638105,
"product_option_id": 1902643925,
"name": "size",
"type": "radio",
"value": {
"id": 1090448197,
"name": "256G",
"price": {
"amount": 0,
"currency": "SAR"
}
}
}
],
"images": [],
"codes": [],
"files": [],
"reservations": [],
"branches_quantity": []
}
]
}
🟠404Not Found
🟠401Unauthorized
Modified at 2024-12-29 06:40:32