API Documentation v1.0.0

Authentication: All endpoints require an API key. Send it in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Version Check

POST /version

Returns the current API version.

Response Example:

{
    "status": "success",
    "version": "1.0.0"
}

User Information

POST /me

Returns information about the authenticated user.

Response Example:

{
    "status": "success",
    "data": {
        "id": "user_public_id",
        "company": "Company Name",
        "email": "[email protected]"
    }
}

List Orders

POST /orders/list

Returns a list of orders with pagination and filtering options.

Parameters:

Parameter Type Required Description
items_ids array Optional Filter by specific item IDs
status string Optional Filter by order status. Available statuses:
archived Cancelled orders
sent Shipped orders
waiting Orders waiting to be processed
disabled Orders put on hold
from_date integer Optional Start date (UNIX timestamp)
to_date integer Optional End date (UNIX timestamp)
limit integer Optional Number of results per page (max: 300)
offset integer Optional Pagination offset

Response Example:

{
    "status": "success",
    "data": {
        "totalCount": 150,
        "inPageCount": 50,
        "limit": 50,
        "offset": 0,
        "hasNextPage": true,
        "orders": [
            // Array of order objects
        ]
    }
}

Order Object Structure:

{
    "id": "string",           // Public order ID
    "timestamp": "integer",   // Order creation date (UNIX timestamp)
    "date": "string",        // Formatted date (Y-m-d h:i:s)
    "canal": "string",       // Order source/channel
    "last_name": "string",   // Customer last name
    "first_name": "string",  // Customer first name
    "mail": "string",        // Customer email
    "address": "string",     // Shipping address
    "zipcode": "string",     // Shipping zipcode
    "city": "string",        // Shipping city
    "country_iso_code": "string", // Country ISO code
    "country": "string",     // Country name
    "status": "string",      // Order status
    "tracking_number": "string", // Shipping tracking number
    "date_sent": "integer",  // Shipping date (UNIX timestamp)
    "items": [              // Array of ordered items
        {
            "item": "string",     // Item name
            "item_sku": "string", // Item SKU
            "quantity": "integer" // Ordered quantity
            "current_stock": "integer" // Current stock of the item
        }
        // ... more items
    ]
}

Add Order

POST /order/add

Creates a new order.

Parameters:

Parameter Type Required Description
items array Required Array of items to order. Each item must contain "item" (string - item name) and "quantity" (integer)
last_name string Required Customer last name
first_name string Required Customer first name
address string Required Shipping address
zipcode string Required Shipping zipcode
city string Required Shipping city
country_iso_code string Required Shipping country ISO code (e.g. "FR" for France)
phone string Optional Phone number
mail string Optional Mail address
canal string Optional Order channel (default: "api")

Response Example:

{
    "status": "success",
    "order_id": "order_public_id"
}