Orders API v1
Use this page for the legacy Merchant API v1 order flows, including order
retrieval, status updates, and merchant invoice file operations.
Table of Contents 📖
Variables
merchantAPIEndpoint:/apiorderId:3001invoiceId:42
API Overview
This page documents the legacy Merchant API v1 order flows.
| Area | Details |
|---|---|
| Order identifier | orderId uses the legacy numeric order ID |
| Order actions | List, retrieve, accept, and reject orders |
| Invoice file actions | Upload and soft-delete merchant invoice files |
| Invoice visibility | Uploaded invoice files are returned in the single-order response under invoices |
Orders
1. Get Orders
GET {merchantAPIEndpoint}/ordersParameters
| Parameter | Description |
|---|---|
| status | Select orders by status (e.g., https://merchant.api.shopflix.gr/api/orders?status=O) |
| date_from | Select orders by date (e.g., api/orders?date_from=2022-01-01) |
| date_to | Select orders by date range (e.g., api/orders?date_from=2022-01-01&date_to=2022-01-05) |
| items_per_page | Default is 10 (if not set), max is 100 |
Order status mapping
| Status Code | Status | Mapped OMS State |
|---|---|---|
| 'O' | Placed | registered |
| 'G' | Processing | in-processing |
| 'H' | To be Shipped | ready-for-shipment |
| 'J' | Shipped | picked-by-courier |
| 'S' | Delivered to third party | delivered-to-clever-point |
| 'L' | Failed to Deliver | delivery-failed |
| 'D' | Rejected | rejected-by-merchant |
| 'I' | Cancelled | canceled |
| 'C' | Completed | completed OR delivered-to-customer |
GET {merchantAPIEndpoint}/orders?page=1&itemsPerPage=10Response
200 OKContent-Type: application/json
{
"params": {
"page": 1, // Current page number
"items_per_page": 10, // Number of items displayed per page
"total_items": 9, // Total number of available orders
"status": null, // Order status filter (null means no filter applied)
"date_from": "2020-01-01 00:00:00", // Start date for order filtering
"date_to": "2025-01-31 10:51:00" // End date for order filtering
},
"orders": [
{
"order_id": 3005, // The order ID in shopflix.gr
"order_reference": "GR--3278--MER78", // Reference code for the order
"timestamp": 1738087382, // Order registration date (Unix timestamp)
"firstname": "Sarah", // Customer's first name
"lastname": "Muller", // Customer's last name
"company_id": "12345", // The store ID in shopflix.gr
"company": "", // Company name of the customer
"email": "sarah@example.com", // Customer's email address
"phone": "425-222-45-76", // Customer's phone number
"status": "G", // Order status (G = In processing)
"total": "48.92" // Total order cost
},
{
"order_id": 3004,
"order_reference": "GR--3278--MER78",
"timestamp": 1738079222,
"firstname": "Sarah",
"lastname": "Muller",
"company_id": "12345",
"company": "",
"email": "sarah@example.com",
"phone": "425-222-45-76",
"status": "H", // Order status (H = Ready for shipment)
"total": "48.92"
}
// More orders can be listed here...
]
}2. Retrieve a single order
GET {merchantAPIEndpoint}/orders/{orderId}Response
200 OKContent-Type: application/json
{
"order_id": 3257, // Order ID in shopflix.gr
"user_id": 2, // User ID who placed the order
"order_reference": "GR--3257--MER78", // Reference code for the order
"status": "H", // Order status (H = Ready for shipment)
"timestamp": 1757680716, // UNIX timestamp of the order creation
"total": "22.00", // Total order amount
"subtotal": "1.00", // Subtotal before discounts
"discount": 0, // Discount applied
"company_id": "", // Vendor’s company ID (if any)
"notes": null, // Any notes for the order
"firstname": "Maria", // Customer first name
"lastname": "Williams", // Customer last name
// Billing address
"b_firstname": "Maria", // Billing first name
"b_lastname": "Williams", // Billing last name
"b_address": "Αιόλου", // Billing street address
"b_address_2": "12", // Additional billing address info
"b_city": "ΑΘΗΝΑ", // Billing city
"b_state": "ΑΤΤ", // Billing state code
"b_country": "GR", // Billing country code
"b_zipcode": "10552", // Billing postal code
"b_phone": "", // Billing phone number
// Shipping address
"s_firstname": "Maria", // Shipping first name
"s_lastname": "Williams", // Shipping last name
"s_address": "Σοφοκλέους", // Shipping street address
"s_address_2": "5", // Additional shipping address info
"s_city": "ΑΘΗΝΑ", // Shipping city
"s_state": "ΑΤΤ", // Shipping state code
"s_country": "GR", // Shipping country code
"s_zipcode": "10555", // Shipping postal code
"s_phone": "", // Shipping phone number
"s_address_type": "", // Shipping address type
"phone": "6973311422", // Customer phone number
"email": "maria.williams@spryker.com", // Customer email
// invoice details
"fields": {
"115": "Y", // Has invoice? (Y/N)
"116": "Company Name", // Invoice company name
"117": "123 Main Street, Athens", // Invoice address
"118": "1201", // Tax office code (DOY)
"119": "EL123456789", // VAT number
"120": "Athens A’ DOY", // Tax office name (DOY name)
"151": "N", // Article 39 eligible? (Y/N)
"152": "ΔΙ ΔΙΑΒΑΤΗΡΙΟ", // Article 39 identity type
"153": "ΑΒ1234567", // Article 39 identity number
"154": "425-222-45-76", // Article 39 mobile phone
"155": "842315", // Article 39 OTP
"156": "" // Occupation
},
"b_country_descr": "Greece", // Billing country description
"s_country_descr": "Greece", // Shipping country description
"b_state_descr": "ΑΤΤΙΚΉ", // Billing state description
"s_state_descr": "ΑΤΤΙΚΉ", // Shipping state description
"shipment_ids": [ // List of shipment IDs
462
],
"company_name": null, // Vendor’s company name
"last_order_change": "", // Last order change timestamp
"payment_method": {
"payment": "cod" // Payment method (cash on delivery)
},
"shipping": {
"name": "Diakinisis (Diakinisis Standard)", // Carrier name
"method": "Diakinisis Standard", // Carrier method
"delivery_key": "diakinisis_standard" // Delivery key
},
"invoices": [
{
"id": 42,
"url": "https://s3.{region}.amazonaws.com/{bucket}/invoices/GR--3257--MER78/invoice-1.pdf", // Example public invoice URL
"created_at": "2026-04-10T12:30:00Z" // Invoice upload timestamp
},
{
"id": 43,
"url": "https://s3.{region}.amazonaws.com/{bucket}/invoices/GR--3257--MER78/invoice-2.pdf",
"created_at": "2026-04-11T09:15:00Z"
}
],
"products": {
"307": {
"item_id": 307, // Order item ID
"order_id": 3257, // Parent order ID
"product_id": "SF-1", // Product ID
"product_code": "213123123", // Product SKU/code
"price": "1.00", // Price per unit
"total_price": "1.00", // Total price (amount * price)
"status_a39": "0", // Article 39 status
"amount": 1, // Quantity ordered
"product": "Wireless Bluetooth Speaker", // Product name
"product_status": "A", // Product status
"master_product_code": "SF-1", // Master product code
"company_id": "", // Vendor’s company ID for product
"base_price": "1.00", // Base price
"original_price": "1.00", // Original price
"ean": null, // Barcode (if any)
"product_url": "https://shopflix.gr/p/SF-1", // Product URL
"extended_attributes": [], // Extra product attributes
"extra": {
"pickup_date": "17/09/2025", // Pickup date
"delivery_date": "18/09/2025" // Delivery date
}
}
}
}Response Notes
fieldscontains the checkout invoice-request fields submitted by the customer.fields.152contains the Article 39 identity type label. See Article 39 Identity Type Values.shipping.delivery_keycontains the shipment method key. See Carrier Delivery Method Values.invoicescontains merchant-uploaded invoice files.- Invoice file URLs use the configured S3 region and bucket:
https://s3.{region}.amazonaws.com/{bucket}/invoices/{orderReference}/{filename}.
When no merchant-uploaded invoices are available, the invoices field returns
an empty array: [].
Error Response
404 NOT FOUNDContent-Type: application/json
Returned when the order is not found.
{
"message": "The order with id {orderId} was not found"
}3. Accept/Reject Order
PUT {merchantAPIEndpoint}/orders/{orderId}Available Status Codes
| Code | Description |
|---|---|
| G | Accept |
| D | Reject |
Accept Order
Request Body
Content-Type: application/json
{
"status":"G"
}Response
200 OKContent-Type: application/json
{
"message": "success"
}400 BAD REQUESTThe order cannot be accepted due to its current status.
{
"message": "Cannot Accept Order"
}Possible Reasons
- The order has already been rejected or canceled.
- The order is in a final state (e.g., already shipped or completed).
- The order has already been accepted or is currently being processed.
Reject Order
Request Body
Content-Type: application/json
{
"status":"D",
"reason": "damaged" // optional
}| Available Reasons |
|---|
| out-of-stock |
| damaged |
| wrong-price |
| disabled-product |
| wrong-product |
Response
200 OKContent-Type: application/json
{
"message": "success"
}400 BAD REQUESTThe order cannot be rejected due to its current status.
{
"message": "Cannot Reject Order"
}Possible Reasons
- The order has already been accepted, processed, or shipped.
- The order is in a terminal state (e.g., completed, canceled).
The provided reason value does not match any of the allowed reasons.
{
"message": "Reason Is Not Valid"
}Invoice Files
These endpoints manage merchant-uploaded invoice files for a specific order.
In
v1, invoice operations always use the legacy numericorderId.
4. Upload Order Invoice
POST {merchantAPIEndpoint}/orders/{orderId}/invoicesUse this endpoint to upload a new invoice file for an order that belongs to the
authenticated merchant. The numeric orderId is resolved internally to the
merchant order reference.
Validation Rules
- The request body must be valid JSON.
filenameis required and is used to determine the file extension.- The invoice file content must be sent in
contentBase64. - Supported filename extensions are
pdf,png,jpeg, andjpg. - The maximum decoded file size is
4,000,000bytes. - A hard limit of
3invoice files per order is enforced. - The uploaded invoice becomes available in the order response immediately after a successful upload.
Request Body
Content-Type: application/json
{
"filename": "invoice-5009.pdf",
"contentBase64": "JVBERi0xLjcKJcfs..."
}| Field | Type | Required | Description |
|---|---|---|---|
filename | string | ✅ | Original filename. The extension controls file type validation. |
contentBase64 | string | ✅ | Base64-encoded file content |
Response
200 OKContent-Type: application/json
{
"message": "success",
"invoice": {
"id": 42,
"url": "https://s3.{region}.amazonaws.com/{bucket}/invoices/GR--5009--MER78/invoice_GR--5009--MER78_27_04_2026_10_00_00.pdf",
"created_at": "2026-04-21T10:15:00Z"
}
}Response Notes
- The returned
invoiceobject is the newly created invoice file entry. - The same invoice will be included in
GET /orders/{orderId}immediately after upload. - Invoice file URLs use the configured S3 region and bucket:
https://s3.{region}.amazonaws.com/{bucket}/invoices/{orderReference}/{filename}.
400 BAD REQUESTExamples:
{
"message": "Invalid payload."
}{
"message": "The file type is not supported."
}{
"message": "The file size is too big."
}{
"message": "You cannot upload more than 3 files."
}404 NOT FOUNDReturned when the order does not exist or does not belong to the authenticated merchant.
{
"message": "The order with id {orderId} was not found"
}500 INTERNAL SERVER ERRORReturned when the temporary file cannot be created or written before upload.
{
"message": "There were errors during the upload."
}5. Delete Order Invoice
DELETE {merchantAPIEndpoint}/orders/{orderId}/invoices/{invoiceId}Use this endpoint to soft-delete an invoice that belongs to the given order and the authenticated merchant.
Response
200 OKContent-Type: application/json
{
"message": "success",
"invoices": [
{
"id": 43,
"url": "https://s3.{region}.amazonaws.com/{bucket}/invoices/GR--5009--MER78/invoice-2.pdf",
"created_at": "2026-04-11T09:15:00Z"
}
]
}Response Notes
- Deletion is soft-delete for parity with current platform behavior.
- The returned
invoicesarray reflects the remaining active invoice files for the order.
400 BAD REQUESTReturned when the request parameters are invalid.
{
"message": "Invalid request params."
}404 NOT FOUNDReturned when the order or invoice is not found, does not belong to the authenticated merchant, or the invoice does not belong to the given order.
{
"message": "The invoice was not found."
}Quick Reference
| Endpoint | Description | Method | Response |
|---|---|---|---|
/orders | List all orders with filters and pagination | GET | Paginated orders list |
/orders/{orderId} | Retrieve a specific order | GET | Order details, including invoices |
/orders/{orderId} | Accept or reject an order | PUT | message: "success" |
/orders/{orderId}/invoices | Upload a new order invoice file | POST | Uploaded invoice object |
/orders/{orderId}/invoices/{invoiceId} | Soft-delete an order invoice file | DELETE | message: "success" and refreshed invoices |