Orders
Import, list, retrieve, and cancel COD orders programmatically.
GET
/api/v1/orders
List Orders
Query Parameters
| Param | Type | Description |
|---|---|---|
status |
string | Filter by status: pending_confirmation,
confirmed, canceled, etc.
|
per_page |
integer | Results per page (default: 15, max: 100) |
page |
integer | Page number |
curl -X GET 'https://rassmi.com/api/v1/orders?status=confirmed&per_page=20' \
-H 'Authorization: Bearer rsk_your_key'
Response 200
{
"data": [
{
"id": "uuid-...",
"status": "confirmed",
"customer": {
"name": "Ahmed Boulahia",
"phone": "+213555123456",
"wilaya": "Alger"
},
"total_amount": 3500,
"created_at": "2026-08-01T10:00:00+01:00"
}
],
"meta": {
"total": 142,
"per_page": 20,
"current_page": 1,
"last_page": 8
}
}
POST
/api/v1/orders
Import COD Order
Recommended: Send
customer_wilaya (e.g. "31" or
"16") and customer_commune in numeric format. String names (e.g.
"Oran") are also automatically mapped.
product_id (UUID) is optional. If provided, product name and
price are automatically fetched from your catalog unless explicitly overridden.
Request Body
{
"customer_name": "Karima Ziad",
"customer_phone": "+213555000111",
"customer_address": "12 Rue des Frères",
"customer_wilaya": "31", // Oran
"customer_commune": "1112", // Bir El Djir
"total_amount": 4600,
"shipping_fee": 400,
"notes": "Call before delivery",
"items": [
{
"product_id": "019ea6a5-0b2f-71f8-8b74-958aae166f5e",
"product_name": "Test product",
"quantity": 1,
"unit_price": 4200,
"attributes": { "size": "42", "color": "Black" }
}
]
}
curl -X POST 'https://rassmi.com/api/v1/orders' \
-H 'Authorization: Bearer rsk_your_key' \
-H 'Content-Type: application/json' \
-d '{"customer_name":"Karima Ziad","customer_phone":"+213555000111","customer_address":"12 Rue","customer_wilaya":"31","total_amount":4200,"items":[{"product_id":"550e8400-e29b-41d4-a716-446655440000","product_name":"Running Shoes","quantity":1,"unit_price":4200}]}'
Response 201
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending_confirmation",
"customer": {
"name": "Karima Ziad",
"phone": "+213555000111",
"address": "12 Rue des Frères",
"wilaya": "31",
"commune": "1112"
},
"total_amount": 4200,
"items": [...],
"created_at": "2026-08-02T19:00:00Z"
}
GET
/api/v1/orders/{id}
Get Order Details
Returns the full order including line items and agent call notes.
curl 'https://rassmi.com/api/v1/orders/550e8400-e29b-41d4' \
-H 'Authorization: Bearer rsk_your_key'
POST
/api/v1/orders/{id}/cancel
Cancel Order
Cancels an order that hasn't been shipped or delivered yet. Returns 422 if the
order is in a non-cancellable state.
curl -X POST 'https://rassmi.com/api/v1/orders/ORDER_ID/cancel' \
-H 'Authorization: Bearer rsk_your_key'