Merchants
Version 1
Orders

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 📖

  1. Variables
  2. API Overview
  3. Orders
  4. Invoice Files
  5. Quick Reference

Variables

  • merchantAPIEndpoint: /api
  • orderId: 3001
  • invoiceId: 42

API Overview

This page documents the legacy Merchant API v1 order flows.

AreaDetails
Order identifierorderId uses the legacy numeric order ID
Order actionsList, retrieve, accept, and reject orders
Invoice file actionsUpload and soft-delete merchant invoice files
Invoice visibilityUploaded invoice files are returned in the single-order response under invoices

Orders

1. Get Orders

GET {merchantAPIEndpoint}/orders

Parameters

ParameterDescription
statusSelect orders by status (e.g., https://merchant.api.shopflix.gr/api/orders?status=O)
date_fromSelect orders by date (e.g., api/orders?date_from=2022-01-01)
date_toSelect orders by date range (e.g., api/orders?date_from=2022-01-01&date_to=2022-01-05)
items_per_pageDefault is 10 (if not set), max is 100

Order status mapping

Status CodeStatusMapped OMS State
'O'Placedregistered
'G'Processingin-processing
'H'To be Shippedready-for-shipment
'J'Shippedpicked-by-courier
'S'Delivered to third partydelivered-to-clever-point
'L'Failed to Deliverdelivery-failed
'D'Rejectedrejected-by-merchant
'I'Cancelledcanceled
'C'Completedcompleted OR delivered-to-customer
example
GET {merchantAPIEndpoint}/orders?page=1&itemsPerPage=10

Response

Status: 200 OK

Content-Type: application/json

response
{
    "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

example
GET {merchantAPIEndpoint}/orders/{orderId}

Response

Status: 200 OK

Content-Type: application/json

response
{
  "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

  • fields contains the checkout invoice-request fields submitted by the customer.
  • fields.152 contains the Article 39 identity type label. See Article 39 Identity Type Values.
  • shipping.delivery_key contains the shipment method key. See Carrier Delivery Method Values.
  • invoices contains 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

Status: 404 NOT FOUND

Content-Type: application/json

Returned when the order is not found.

response
{
    "message": "The order with id {orderId} was not found"
}

3. Accept/Reject Order

example
PUT {merchantAPIEndpoint}/orders/{orderId}

Available Status Codes

CodeDescription
GAccept
DReject

Accept Order


Request Body

Content-Type: application/json

body
{
    "status":"G"
}
Response
Status: 200 OK

Content-Type: application/json

response
{
	"message": "success"
}

Status: 400 BAD REQUEST

The order cannot be accepted due to its current status.

response
{
    "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
Status: 200 OK

Content-Type: application/json

response
{
	"message": "success"
}

Status: 400 BAD REQUEST

The order cannot be rejected due to its current status.

response
{
    "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.

response
{
    "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 numeric orderId.

4. Upload Order Invoice

example
POST {merchantAPIEndpoint}/orders/{orderId}/invoices

Use 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.
  • filename is 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, and jpg.
  • The maximum decoded file size is 4,000,000 bytes.
  • A hard limit of 3 invoice 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

body
{
  "filename": "invoice-5009.pdf",
  "contentBase64": "JVBERi0xLjcKJcfs..."
}
FieldTypeRequiredDescription
filenamestringOriginal filename. The extension controls file type validation.
contentBase64stringBase64-encoded file content

Response

Status: 200 OK

Content-Type: application/json

response
{
  "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 invoice object 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}.
Status: 400 BAD REQUEST

Examples:

response
{
  "message": "Invalid payload."
}
response
{
  "message": "The file type is not supported."
}
response
{
  "message": "The file size is too big."
}
response
{
  "message": "You cannot upload more than 3 files."
}
Status: 404 NOT FOUND

Returned when the order does not exist or does not belong to the authenticated merchant.

response
{
  "message": "The order with id {orderId} was not found"
}
Status: 500 INTERNAL SERVER ERROR

Returned when the temporary file cannot be created or written before upload.

response
{
  "message": "There were errors during the upload."
}

5. Delete Order Invoice

example
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

Status: 200 OK

Content-Type: application/json

response
{
  "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 invoices array reflects the remaining active invoice files for the order.
Status: 400 BAD REQUEST

Returned when the request parameters are invalid.

response
{
  "message": "Invalid request params."
}
Status: 404 NOT FOUND

Returned 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.

response
{
  "message": "The invoice was not found."
}

Quick Reference

EndpointDescriptionMethodResponse
/ordersList all orders with filters and paginationGETPaginated orders list
/orders/{orderId}Retrieve a specific orderGETOrder details, including invoices
/orders/{orderId}Accept or reject an orderPUTmessage: "success"
/orders/{orderId}/invoicesUpload a new order invoice filePOSTUploaded invoice object
/orders/{orderId}/invoices/{invoiceId}Soft-delete an order invoice fileDELETEmessage: "success" and refreshed invoices