Skip to content
MonCasierFrais.fr logoDocs

MonCasierFrais API Documentation

This document illustrates how the MonCasierFrais API works and the list of exposed routes.

API URL
https://api.moncasierfrais.fr/v1

The API lets you read the data of your points of sale (modules, lockers, orders, products, temperatures, transactions) and act on it: place and cancel orders, fill, prepare or open lockers, manage your catalog.

Introduction

MonCasierFrais provides a comprehensive API for interacting with our services. This documentation covers the available endpoints, their usage, and expected responses.

Support

For any questions or assistance, please contact:

Quickstart

  1. In the seller back office, open the API Token menu (available with the API option) and create a token with the permissions you need.
  2. Check the token with GET /v1/me, which returns its name and permissions.
  3. List your modules with GET /v1/modules: their id is the moduleId expected by the other routes.
Check the token
curl 'https://api.moncasierfrais.fr/v1/me' \
-H 'Authorization: Bearer YOUR_API_TOKEN'

Authentication

All requests to the MonCasierFrais API must be made over HTTPS.

Authorization Header

Authenticate your requests with the Authorization header and a Bearer token, created in the API Token menu of the seller back office. A token only gives access to the data of your seller group and its modules.

Token
Authorization: Bearer MCF-ge0Ip.....GslMog

Permissions

Each token has one permission per family of routes (/v1/orders, /v1/lockers, /v1/products...): Read for GET routes, Read&Write for POST, PUT and DELETE routes. The /v1/me routes are available to any valid token. Opening doors (PUT /v1/locker/{moduleId}/open) needs its own permission, /v1/lockers/open. Without the needed permission, the API answers 403 Permission denied.

Filtering

The q parameter allows you to filter data by passing a JSON object in the request URL. Filtering supports basic equality, and in some cases, more advanced filtering depending on the field type and API endpoint. Fields unknown to the resource are ignored.

Complex Filtering

Supported Operators

  • $eq: for equality (default behavior when no operator is specified).
  • $ne: for not equal.
  • $in: for matching any value in an array.
  • $gte / $lte: for greater than or equal / less than or equal comparisons.
  • $or: combines multiple conditions, returning results that match any of the provided criteria.
  • $and: combines multiple conditions, returning results that match all of the provided criteria.
Supported Operators Examples
q={"name": "LaClayette Ville d'Avray"}
q={"location": {"$ne": "Ville d'Avray"}}
q={"status": {"$in": ["installed", "not installed"]}}
q={"price": {"$gte": 50, "$lte": 100}}
q={"$or": [{"isOnline": true}, {"location": "Ville d'Avray"}]}
q={"$and": [{"isOnline": true}, {"location": "Ville d'Avray"}]}

Returned Fields

The fields parameter limits the returned fields, separated by commas, for example fields=name,state. The id is always returned.

Pagination

List routes return results newest first. Use the limit and skip query parameters to paginate them.

  • limit: maximum number of rows to return. Omitted or 0 returns every row.
  • skip: number of rows to skip before returning results (default 0).

Both must be non-negative integers, otherwise the request is rejected with a 400 error. The count field in the response is the number of rows in the returned page, not the total number of matching rows. Paginate large resources (transactions, logs, temperatures, locker history): without limit, all their rows are returned.

Get the second page of 100 transactions
curl 'https://api.moncasierfrais.fr/v1/transactions?limit=100&skip=100' \
-H 'Authorization: Bearer YOUR_API_TOKEN'

List Format

Response of a list route
{
  "count": 2,
  "rows": [
    { "id": "668223f4faf0c685cc35d843", "name": "LaClayette Ville d'Avray" },
    { "id": "668223f4faf0c685cc35d851", "name": "LaClayette Denfert" }
  ]
}

Example

Get the module with id 668223f4faf0c685cc35d843
curl -G 'https://api.moncasierfrais.fr/v1/modules' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
--data-urlencode 'q={"id":"668223f4faf0c685cc35d843"}'

Errors

On error, most routes return an object of this shape, whose message gives the cause:

Error
{
  "success": false,
  "error": { "message": "Permission denied" }
}

A few routes return a simpler shape, such as { "error": "..." }: rely on the HTTP status first.

  • 400: invalid request (malformed JSON, invalid q, limit or skip parameter, refused body). The message names the field at fault.
  • 401: missing or invalid token. Locker actions also answer 401 when their body is invalid or a locker does not belong to the module.
  • 403: disabled or expired token, missing permission, or module outside your seller group.
  • 404: resource not found.
  • 409: the same request is already waiting to be processed by the module, or a unique value (barcode, GTIN) is already used.
  • 500: unexpected error. If it happens again, contact support with the time of the call.

Actions Applied by the Module

Actions on lockers (fill, empty, open, prepare, discount, expiration), on orders (creation, booking, cancellation, payment state) and locker bloc settings are sent to the module, which applies them within a few seconds when it is connected. A 200, 201 or 202 response means the request was sent, not that it is already applied: read the resource again (GET /v1/lockers, GET /v1/orders...) to confirm.

Conventions

  • Amounts: integers in cents (450 = €4.50). Percentage discounts are integers (15 = 15%).
  • Dates: ISO 8601 in UTC, for example 2026-11-22T08:41:07.512Z. In q, an ISO date is enough: {"createdAt": {"$gte": "2026-11-01"}}.
  • Identifiers: strings of 24 hexadecimal characters. Routes return id, except /aggregate, which returns _id.
  • Temperatures: the setpoint of a locker bloc is in °C, its alert thresholds and regulation gap in tenths of °C (40 = 4.0 °C).

Usage

Each call is counted on your token (number of calls and volume of data returned), shown in the API Token menu and by GET /v1/me/consumption. Avoid reading full lists again in a loop: use /headers to spot what changed, then read only those rows again.

Pricing

Access to the API is billed €20 per month per point of sale. For more information, contact commercial@moncasierfrais.fr.

Use Cases

Retrieve real-time catalog of products currently stored in lockers

GEThttps://api.moncasierfrais.fr/v1/catalog/realtime/{moduleId}

Retrieve real-time catalog of products currently stored in lockers with their packaging options. This endpoint provides current stock status, organized by different packaging options (quantity/weight combinations) with their respective prices and availability.

Important Concepts

Real-time stock status - This catalog provides current stock status in lockers. Each product displays exact quantities stored, prices and locker locations. Variable products (meat, cheese) are already packaged and stored in lockers.

Path Parameters

ParameterTypeDescription
moduleIdstringThe unique identifier of the module to retrieve the real-time catalog for.

Example Usage

Get real-time catalog for module
curl -X GET \
'https://api.moncasierfrais.fr/v1/catalog/realtime/66420f8558f23a6a26986d04' \
-H 'Authorization: Bearer YOUR_API_TOKEN'

Response Structure

The response contains products with their packaging options - different ways the same product can be purchased (by quantity/weight and price). Each product shows all available options including different quantities, prices, and locker locations.

Note: All prices are expressed in cents (e.g., 2800 = €28)

Response example
{
  "success": true,
  "products": {
    "count": 1,
    "rows": [
      {
        "id": "68b6b71f0e55547ab74b5b18",
        "name": "Comté AOP",
        "apiField": "COMTE-AOP",
        "description": "Fromage affiné en cave pendant 12 à 18 mois",
        "perUnit": true,
        "VAT": 5.5,
        "price": 1700,
        "packagingOptions": [
          {
            "quantity": 0.5,
            "lockers": [
              {
                "numberOnModule": 5,
                "lockerPrice": 850,
                "state": 1
              }
            ],
            "totalAvailable": 1,
            "price": 850
          },
          {
            "quantity": 1,
            "lockers": [
              {
                "numberOnModule": 22,
                "lockerPrice": 1700,
                "state": 1
              },
              {
                "numberOnModule": 35,
                "lockerPrice": 1530,
                "state": 1,
                "discount": {
                  "type": 2,
                  "amount": 170
                }
              }
            ],
            "totalAvailable": 2,
            "price": 1700
          }
        ]
      }
    ]
  }
}
  • apiField: API identifier for the product.

Retrieve the inventory status of a module

GEThttps://api.moncasierfrais.fr/v1/catalog/inventory/{moduleId}

Retrieve inventory status showing the difference between prepared products and current locker content. This helps sellers identify what's missing in their installation by comparing prepared quantities with actual sales and missing items.

Important Concepts

Real-time inventory status - This catalog compares prepared quantities with quantities actually available in lockers. It helps the seller identify what is missing and should be restocked. To enhance your ROI, refill lockers as soon as possible to ensure rotation.

Path Parameters

ParameterTypeDescription
moduleIdstringThe unique identifier of the module to get inventory for.

Example Usage

Get Inventory Example
curl -X GET \
'https://api.moncasierfrais.fr/v1/catalog/inventory/66420f8558f23a6a26986d04' \
-H 'Authorization: Bearer YOUR_API_TOKEN'

Inventory Status Example

Inventory Status Example
{
  "success": true,
  "products": [
    {
      "id": "68b6b71f0e55547ab74b5b18",
      "name": "Comté AOP",
      "apiField": "COMTE-AOP",
      "prepared": 2,
      "sales": 1,
      "missing": 1,
      "percentMissing": 50
    },
    {
      "id": "68b6b6820e55547ab74b5670",
      "name": "500g de Raclette au poivre",
      "apiField": "RACLETTE-POIVRE-500",
      "prepared": 6,
      "sales": 2,
      "missing": 4,
      "percentMissing": 66.67
    }
  ],
  "summary": {
    "prepared": 72,
    "missing": 10,
    "percentMissing": 13.89
  }
}

Key Fields

  • apiField: API identifier for the product.
  • prepared: Number of items prepared for sale
  • sales: Number of items actually sold
  • missing: Number of items missing from lockers
  • percentMissing: Percentage of missing items

Note: All prices are expressed in cents (e.g., 2800 = €28)

Retrieve the online ordering catalog of a module

GEThttps://api.moncasierfrais.fr/v1/catalog/delivery/{moduleId}

This endpoint provides the online catalog of products. The user can order fixed quantity products (cans, bottles, prepared meals) or variable quantity products. For variable products, the seller must define min/max/step to enable the customer to choose the variable quantity that should be ordered. To help the customer, the seller can choose to sell the product in whole units that should be more convenient (sausages, poultry) instead of strictly variable quantity. isUnitSelection: true takes the step as whole unit.

Important Concepts

Fixed unit products are packaged - Products sold by whole units (cans, bottles, prepared meals) are already packaged and ready for delivery. Variable products require ordering configuration - Products sold by weight/volume/quantity need specific ordering rules defined.

Product Types for Ordering

1. Fixed unit products (perUnit=false): Cans, bottles, prepared meals - sold by whole units.

2. Variable products by whole units (perUnit=true, isUnitSelection=true): Sausages, poultry - sold by whole units for customer convenience. The step value becomes the whole unit (e.g., step: 0.070kg = 1 sausage).

3. Variable products by weight/volume (perUnit=true, isUnitSelection=false): Meat, cheese, liquids - sold by exact weight/volume with min/max/step defined.

min/max/step values define possible quantities (e.g., min: 0.2kg, max: 2kg, step: 0.2kg or min: 0.5L, max: 2L, step: 0.25L). unitSelection and unitSelectionPrice provide display information for the user interface.

Path Parameters

ParameterTypeDescription
moduleIdstringUnique identifier of the module to get delivery catalog for

Example Usage

Get Delivery Catalog Example
curl -X GET \
'https://api.moncasierfrais.fr/v1/catalog/delivery/66420f8558f23a6a26986d04' \
-H 'Authorization: Bearer YOUR_API_TOKEN'

Delivery Catalog Example

Delivery Catalog Example
{
  "success": true,
  "products": {
    "count": 11,
    "rows": [
      {
        "id": "67650056455b4118e5c6a537",
        "name": "Mijoté de JOUE DE PORC 300 GRS",
        "apiField": "JOUE-DE-PORC-300",
        "description": "Joue de porc, carottes, moutarde à l'ancienne",
        "unitType": "kg",
        "perUnit": false,
        "VAT": 5.5,
        "thumbnailBase64Data": ".*",
        "price": 615,
        "availableOnline": true,
        "packagingOptions": []
      },
      {
        "id": "68b6af790e55547ab74b2b67",
        "name": "Entrecôte",
        "apiField": "ENTRECOTE-1KG",
        "description": "28€ le kg description",
        "unitType": "kg",
        "perUnit": true,
        "VAT": 5.5,
        "thumbnailBase64Data": ".*",
        "price": 2800,
        "productType": "6799f973159881e63779f8f7",
        "availableOnline": true,
        "availableInModule": true,
        "min": 0.2,
        "max": 2,
        "step": 0.2,
        "packagingOptions": []
      }
    ]
  }
}

Key Fields

  • apiField: API identifier for the product.
  • availableOnline: Whether the product is available for online ordering
  • availableInModule: Whether the product is currently available
  • isUnitSelection: Whether the product supports unit selection (slider interface)
  • unitSelection: Unit selection display (e.g., '1 kg', '0.2 kg')
  • unitSelectionPrice: Price per unit for selection (e.g., '6.15 €/kg')
  • min/max/step: Slider configuration for unit selection (min, max, step values)

Note: All prices are expressed in cents (e.g., 2800 = €28)

Get a free pickup code for an order

GEThttps://api.moncasierfrais.fr/v1/orders/random-code/{moduleId}

Returns a 6-digit pickup code that no order of the module uses yet. Use it as the code of POST /v1/order/placeOrder/{moduleId} if your system does not generate its own codes.

Path Parameters

ParameterTypeDescription
moduleId *stringIdentifier of the module of the future order.

Example Usage

Get a pickup code
curl 'https://api.moncasierfrais.fr/v1/orders/random-code/66420f8558f23a6a26986d04' \
-H 'Authorization: Bearer YOUR_API_TOKEN'

Response

Success
{
  "code": "048213"
}

Error Responses

  • 403 Forbidden: the module does not belong to your seller group, or the token does not have read access to /v1/orders.

Place an order with selected products and target module/lockers

POSThttps://api.moncasierfrais.fr/v1/order/placeOrder/{moduleId}

Place an order with selected products and target module/lockers.

Path Parameters

ParameterTypeDescription
moduleIdstringUnique identifier of the module where the order will be placed.

Request Body

ParameterTypeDescription
namestringName of the order.
codestring6-digit pickup code (e.g., '123456') used by customers to identify their order.
paymentStatenumberPayment status (0: paid, 1: to be paid on pickup).
pricenumberTotal price in cents.
VATnumberVAT percentage.
lockerIdsarray of stringsArray of locker IDs (must be empty array [] for delivery orders).
productsarray of objectsArray of products with quantities (see ProductOrder structure below).
expectedDeliveryDatestring (ISO 8601 date)Expected delivery date (required for delivery orders).
clientEmailstringCustomer email address (required for delivery orders).
additionalClientInfoobjectAdditional client information (required for delivery orders).
additionalClientInfo.phonestringCustomer phone number.
additionalClientInfo.namestringName of the order.
externalIdstringExternal system order ID.
externalUserIdstringExternal system user ID.
commentsstringComments from the end user to the seller (e.g., special instructions, delivery notes, etc.).

ProductOrder Structure

ParameterTypeDescription
productIdstringProduct identifier.
packingQuantityarray of numbersArray of quantities to count ordered items. Each number represents the quantity of an item. Examples: [1, 1, 1] = 3 items of 1 unit each, [0.250, 0.500, 0.250] = 3 items (1 of 0.250kg, 1 of 0.500kg, 1 of 0.250kg).

Example Usage

Create Order Example
curl -X POST \
'https://api.moncasierfrais.fr/v1/order/placeOrder/66420f8558f23a6a26986d04' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
  "name": "Delivery Order #12345",
  "code": "123456",
  "paymentState": 0,
  "price": 1500,
  "VAT": 5.5,
  "lockerIds": [],
  "products": [
    {
      "productId": "68b6b71f0e55547ab74b5b18",
      "packingQuantity": [1]
    }
  ],
  "expectedDeliveryDate": "2024-01-15T14:00:00Z",
  "clientEmail": "customer@example.com",
  "additionalClientInfo": {
    "phone": "+33123456789",
    "name": "John Doe"
  },
  "comments": "Thank you for your order! Your fresh products will be delivered to your door."
}'

Response

Success Response

Success Response
{
  "message": "Order created successfully"
}

Error Responses

400 Bad Request

400 Bad Request
{
  "error": "Invalid JSON: Request body is empty or not valid JSON"
}

500 Internal Server Error

500 Internal Server Error
{
  "error": "Failed to create order"
}

Cancel a previously placed order

POSThttps://api.moncasierfrais.fr/v1/orders/cancel/{moduleId}

Cancel a previously placed order.

Path Parameters

ParameterTypeDescription
moduleIdstringThe unique identifier of the module where the order was placed.

Request Body

ParameterTypeDescription
idstringThe unique identifier of the order to cancel.
reasonstringThe reason for cancelling the order (required for end-user notification).

Example Usage

Cancel Order Example
curl -X POST \
'https://api.moncasierfrais.fr/v1/orders/cancel/66420f8558f23a6a26986d04' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
  "id": "order_12345",
  "reason": "Customer requested cancellation"
}'

Response

Success Response

Success Response
{
  "message": "Order cancelled successfully"
}

Error Responses

Bad Request (400)

Bad Request (400)
{
  "error": "Order ID is required"
}

Not Found (404)

Not Found (404)
{
  "error": "Order not found"
}

Conflict (409)

Conflict (409)
{
  "error": "Order cancellation is already being processed"
}

Internal Server Error (500)

Internal Server Error (500)
{
  "error": "Failed to cancel order"
}

Changes the payment state of an order

PUThttps://api.moncasierfrais.fr/v1/orders/payment-state/{moduleId}

Changes the payment state of an order: mark it as paid, or set it back to to be paid on pickup. The change is applied by the module itself, not by the API. The request is queued and the module processes it within a few seconds, which is why the API answers 202 Accepted and not 200. The order returned by GET /v1/orders reflects the new state once the module has synchronised it.

The module only applies the change if the order is still active and has not been picked up yet. If the order is already in the requested payment state, nothing changes.

⚠️ No email is sent to the customer or to the seller when the payment state changes through this route.

Path Parameters

ParameterTypeDescription
moduleIdstringIdentifier of the module the order belongs to.

Request Body

ParameterTypeDescription
idstringIdentifier of the order.
paymentStatenumberNew payment state: 0 = paid, 1 = to be paid on pickup.

Example Usage

Mark an order as paid
curl -X PUT \
'https://api.moncasierfrais.fr/v1/orders/payment-state/66420f8558f23a6a26986d04' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
  "id": "68b6c02a0e55547ab74b6a41",
  "paymentState": 0
}'

Response

Accepted
{
  "success": true
}

A 202 response means the change has been sent to the module. It does not confirm that the module has applied it: check the order paymentState with GET /v1/orders to confirm.

Error Responses

  • 400 Bad Request: Request body fails validation (id is not a valid identifier, or paymentState is not 0 or 1).
  • 403 Forbidden: The module does not belong to your seller group, or your token does not have write access to orders.
  • 404 Not Found: No order with this id exists on this module.
  • 409 Conflict: The same payment state change for this order is already waiting to be processed by the module.
Conflict
{
  "success": false,
  "error": {
    "message": "This order payment state is already being processed"
  }
}

Book lockers for a pending order or preparation

POSThttps://api.moncasierfrais.fr/v1/order/bookLockers/{moduleId}

Book lockers for a pending order or preparation.

Path Parameters

ParameterTypeDescription
moduleIdstringUnique identifier of the module where lockers will be booked.

Request Body

ParameterTypeDescription
namestringName of the locker booking order.
codestring6-digit pickup code (e.g., '123456') used by customers to identify their order.
lockerIdsarray of stringsArray of locker IDs to book (at least one required).
clientEmailstringCustomer email address (required).
isPaidbooleanPayment status (true: paid upfront, false: to be paid on pickup).
pricenumberTotal price in cents (optional).
VATnumberVAT percentage (optional).
externalIdstringExternal system order ID (optional).
externalUserIdstringExternal system user ID (optional).
commentsstringComments from the end user to the seller (optional).

Example Usage

Book Lockers Example
curl -X POST \
'https://api.moncasierfrais.fr/v1/order/bookLockers/66420f8558f23a6a26986d04' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
  "name": "Locker Booking #12345",
  "code": "123456",
  "lockerIds": ["locker_001", "locker_002"],
  "clientEmail": "customer@example.com",
  "isPaid": false,
  "price": 1500,
  "VAT": 5.5,
  "comments": "Please prepare fresh products"
}'

Response

Success Response

Success Response
{
  "success": true,
  "orderId": "order_12345",
  "lockerIds": ["locker_001", "locker_002"],
  "totalPrice": 1500,
  "message": "Lockers booked successfully"
}

Error Responses

400 Bad Request

400 Bad Request
{
  "success": false,
  "error": "Some requested lockers are not available",
  "validationErrors": {
    "fields": {
      "lockerIds": "At least one locker ID is required"
    },
    "general": []
  },
  "unavailableItems": []
}

500 Internal Server Error

500 Internal Server Error
{
  "success": false,
  "error": "Failed to book lockers"
}

Fills one or more lockers of a module

PUThttps://api.moncasierfrais.fr/v1/locker/{moduleId}/fill

Fills one or more lockers of a module with products, optionally overriding their price and weight. Every locker ID must belong to the module, otherwise the request is rejected.

Path Parameters

ParameterTypeDescription
moduleIdstringIdentifier of the module the lockers belong to.

Request Body

ParameterTypeDescription
lockerIdsarray of stringsLockers filled with a classic product (no price or weight override).
lockerIdsAndPricesarray of objectsLockers whose price the operator wants to set at filling time (see structure below).
lockerIdsAndWeightsarray of objectsLockers filled with a weighted product (see structure below).
productIdsAndAmountMixarray of objectsProducts composing a product mix to place in the locker (see structure below).

Locker price item: lockerIdsAndPrices

ParameterTypeDescription
lockerIdstringIdentifier of the locker.
pricenumberPrice to set on the locker, in cents (100 = 1.00 €).

Locker weight item: lockerIdsAndWeights

ParameterTypeDescription
lockerIdstringIdentifier of the locker.
weightnumberWeight to set on the locker.

Mix product item: productIdsAndAmountMix

ParameterTypeDescription
productIdstringIdentifier of the product included in the mix.
amountnumberQuantity of the product: an integer for a per-unit product, or a float for a weighted product. The list of items together forms a single product mix.

Example Usage

Fill lockers
curl -X PUT \
'https://api.moncasierfrais.fr/v1/locker/66420f8558f23a6a26986d04/fill' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
  "lockerIds": ["68b6b71f0e55547ab74b5b18"],
  "lockerIdsAndPrices": [
    { "lockerId": "68b6b71f0e55547ab74b5b18", "price": 850 }
  ],
  "lockerIdsAndWeights": [
    { "lockerId": "68b6b71f0e55547ab74b5b18", "weight": 0.5 }
  ],
  "productIdsAndAmountMix": [
    { "productId": "68b6b6820e55547ab74b5670", "amount": 2 },
    { "productId": "67650056455b4118e5c6a537", "amount": 0.3 }
  ]
}'

Response

Success
{
  "success": true
}

Error Responses

  • 401 Unauthorized: Request body fails validation, or a locker ID is not found in the module.

Empties one or more lockers of a module

PUThttps://api.moncasierfrais.fr/v1/locker/{moduleId}/unfill

Empties one or more lockers of a module. Every locker ID must belong to the module, otherwise the request is rejected.

Path Parameters

ParameterTypeDescription
moduleIdstringIdentifier of the module the lockers belong to.

Request Body

ParameterTypeDescription
lockerIdsarray of stringsIDs of the lockers to empty. Each must belong to the module.

Example Usage

Unfill lockers
curl -X PUT \
'https://api.moncasierfrais.fr/v1/locker/66420f8558f23a6a26986d04/unfill' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
  "lockerIds": ["68b6b71f0e55547ab74b5b18", "68b6b71f0e55547ab74b5b19"]
}'

Response

Success
{
  "success": true
}

Error Responses

  • 401 Unauthorized: Request body fails validation, or a locker ID is not found in the module.

Opens one or more lockers of a module

PUThttps://api.moncasierfrais.fr/v1/locker/{moduleId}/open

Opens one or more lockers of a module. Every locker ID must belong to the module, otherwise the request is rejected.

Requires the /v1/lockers/open permission set to Read&Write on the token: the /v1/lockers permission does not allow opening doors.

Path Parameters

ParameterTypeDescription
moduleIdstringIdentifier of the module the lockers belong to.

Request Body

ParameterTypeDescription
lockerIdsarray of stringsIDs of the lockers to open. Each must belong to the module.

Example Usage

Open lockers
curl -X PUT \
'https://api.moncasierfrais.fr/v1/locker/66420f8558f23a6a26986d04/open' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
  "lockerIds": ["68b6b71f0e55547ab74b5b18"]
}'

Response

Success
{
  "success": true
}

Error Responses

  • 401 Unauthorized: Request body fails validation, or a locker ID is not found in the module.

Sets an expiration date on one or more lockers of a module

PUThttps://api.moncasierfrais.fr/v1/locker/{moduleId}/expiration

Sets an expiration date on one or more lockers of a module. The date must be in the future, and every locker ID must belong to the module.

Path Parameters

ParameterTypeDescription
moduleIdstringIdentifier of the module the lockers belong to.

Request Body

ParameterTypeDescription
lockerIdsarray of stringsIDs of the lockers to update. Each must belong to the module.
dateOfExpirationstring (ISO 8601 date)Expiration date to apply. Must be in the future.

Example Usage

Set lockers expiration
curl -X PUT \
'https://api.moncasierfrais.fr/v1/locker/66420f8558f23a6a26986d04/expiration' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
  "lockerIds": ["68b6b71f0e55547ab74b5b18"],
  "dateOfExpiration": "2026-12-31T23:59:59Z"
}'

Response

Success
{
  "success": true
}

Error Responses

  • 400 Bad Request: The expiration date is not in the future.
  • 401 Unauthorized: Request body fails validation, or a locker ID is not found in the module.

Applies a discount to one or more lockers of a module

PUThttps://api.moncasierfrais.fr/v1/locker/{moduleId}/discount

Applies a discount to one or more lockers of a module. Every locker ID must belong to the module, otherwise the request is rejected.

Path Parameters

ParameterTypeDescription
moduleIdstringIdentifier of the module the lockers belong to.

Request Body

ParameterTypeDescription
lockerIdsarray of stringsIDs of the lockers to discount. Each must belong to the module.
reductionTypenumberReduction type: 0 = none, 1 = fixed amount, 2 = percentage.
reductionAmountnumberDiscount amount. A fixed amount in cents when reductionType is 1, or a percentage when reductionType is 2.

Example Usage

Apply locker discount
curl -X PUT \
'https://api.moncasierfrais.fr/v1/locker/66420f8558f23a6a26986d04/discount' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
  "lockerIds": ["68b6b71f0e55547ab74b5b18"],
  "reductionType": 2,
  "reductionAmount": 10
}'

Response

Success
{
  "success": true
}

Error Responses

  • 401 Unauthorized: Request body fails validation, or a locker ID is not found in the module.

Prepares one or more lockers of a module with a product

PUThttps://api.moncasierfrais.fr/v1/locker/{moduleId}/prepare

Prepares one or more lockers of a module with a product. The product is set as the locker's prepared product, so the locker can later be filled with /fill using a per-locker price or weight. This does not fill the locker. Every locker ID must belong to the module, otherwise the request is rejected.

Path Parameters

ParameterTypeDescription
moduleIdstringIdentifier of the module the lockers belong to.

Request Body

ParameterTypeDescription
lockerIdsarray of stringsIDs of the lockers to prepare. Each must belong to the module.
productIdstringIdentifier of the product to prepare in the lockers.

Example Usage

Prepare lockers
curl -X PUT \
'https://api.moncasierfrais.fr/v1/locker/66420f8558f23a6a26986d04/prepare' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
  "lockerIds": ["68b6b71f0e55547ab74b5b18"],
  "productId": "66f2a1c4e9b0d3a7c8f1b2e5"
}'

Response

Success
{
  "success": true
}

Error Responses

  • 401 Unauthorized: Request body fails validation, or a locker ID is not found in the module.

Marks one or more lockers of a module as no longer prepared

PUThttps://api.moncasierfrais.fr/v1/locker/{moduleId}/unprepare

Marks one or more lockers of a module as no longer prepared. Every locker ID must belong to the module, otherwise the request is rejected.

Path Parameters

ParameterTypeDescription
moduleIdstringIdentifier of the module the lockers belong to.

Request Body

ParameterTypeDescription
lockerIdsarray of stringsIDs of the lockers to unprepare. Each must belong to the module.

Example Usage

Unprepare lockers
curl -X PUT \
'https://api.moncasierfrais.fr/v1/locker/66420f8558f23a6a26986d04/unprepare' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
  "lockerIds": ["68b6b71f0e55547ab74b5b18"]
}'

Response

Success
{
  "success": true
}

Error Responses

  • 401 Unauthorized: Request body fails validation, or a locker ID is not found in the module.

Token

Retrieve the information of the token in use

GEThttps://api.moncasierfrais.fr/v1/me

Returns the name, seller group and permissions of the calling token. Useful to check a token and what it allows. Available to any valid token, with no specific permission.

Example Usage

Check the token
curl 'https://api.moncasierfrais.fr/v1/me' \
-H 'Authorization: Bearer YOUR_API_TOKEN'

Response

Success
{
  "id": "6650f1a2b3c4d5e6f7a8b9c0",
  "name": "ERP connector",
  "sellerGroupId": "64f0a1b2c3d4e5f6a7b8c9d0",
  "permissions": {
    "/v1/orders": "Read&Write",
    "/v1/lockers": "Read",
    "/v1/products": "Read"
  },
  "expireAt": null,
  "createdByUserId": "64f0aa11bb22cc33dd44ee55"
}

Response Body

ParameterTypeDescription
idstringIdentifier of the token.
namestringName given to the token when it was created.
sellerGroupIdstringSeller group whose data the token can read and change.
permissionsobjectPermission per family of routes: Read, or Read&Write.
expireAtstring (ISO 8601) or nullExpiration date of the token, null if it does not expire.
createdByUserIdstring or nullUser of the seller back office who created the token.

Retrieve the usage of the token in use

GEThttps://api.moncasierfrais.fr/v1/me/consumption

Returns the number of calls made with the token and the volume of data returned since it was created. Available to any valid token, with no specific permission.

Every authenticated and authorized call is counted, including those that end in an error. Calls refused for lack of a valid token or permission are not counted.

Example Usage

Token usage
curl 'https://api.moncasierfrais.fr/v1/me/consumption' \
-H 'Authorization: Bearer YOUR_API_TOKEN'

Response Body

ParameterTypeDescription
namestringName of the token.
callCountnumberNumber of calls since the token was created, not counting the current one.
dataSentnumberVolume of data returned since the token was created, in bytes.

Common Routes

Compute totals on a resource (aggregation)

GEThttps://api.moncasierfrais.fr/v1/{resource}/aggregate

Computes totals, averages or groupings on a resource, on the server, without downloading all its rows: sales per module, orders per day, average temperatures... {resource} is one of the list resources: api-data, constants, coupons, esl, locker-blocs, locker-history, lockers, logs, modules, orders, product-types, products, temperatures, transactions. The route needs the same read permission as the list of the resource.

The pipeline parameter is a MongoDB aggregation pipeline, as JSON encoded in the address. It only covers the data of your seller group: this filter is applied before your stages.

Query Parameters

ParameterTypeDescription
pipeline *string (JSON)Array of 1 to 20 stages, each with a single key among $match, $group, $project, $addFields, $unwind, $sort, $limit, $skip, $count, $sortByCount.

Rules

  • The operators $lookup, $graphLookup, $facet, $unionWith, $out, $merge, $where, $function and $accumulator are refused, at any level.
  • Dates are written {"$date": "2026-11-01T00:00:00Z"} and identifiers {"$oid": "<24 hexadecimal characters>"}.
  • At most 1,000 rows are returned, and the computation stops after 20 seconds.
  • Rows are the raw documents: their identifier is _id (not id), and amounts are in cents.
  • The q parameter of the lists is not used here: filter with a $match stage.

Example Usage

Sales per module since November 1st
curl -G 'https://api.moncasierfrais.fr/v1/locker-history/aggregate' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
--data-urlencode 'pipeline=[{"$match":{"action":"SOLD","createdAt":{"$gte":{"$date":"2026-11-01T00:00:00Z"}}}},{"$group":{"_id":"$moduleId","sales":{"$sum":1}}},{"$sort":{"sales":-1}}]'

Response

Success
{
  "count": 2,
  "rows": [
    { "_id": "65a1b2c3d4e5f60718293a4b", "sales": 41 },
    { "_id": "65a1b2c3d4e5f60718293a5c", "sales": 12 }
  ]
}

Error Responses

  • 400 Bad Request: pipeline missing, invalid JSON, more than 20 stages, unknown stage or refused operator. The message names the stage at fault, for example pipeline: $lookup is not allowed in pipeline.
  • 500 Internal Server Error: computation too long (over 20 seconds) or invalid operator inside an allowed stage. Add a more selective $match as the first stage.

Detect the changes of a resource

GEThttps://api.moncasierfrais.fr/v1/{resource}/headers

Light version of the list of a resource: returns only the identifier and the last change date of each row, most recent first. Use it to know what changed since your last synchronization, then read only those rows again with q. {resource} is one of the list resources (see /aggregate), with the same read permission.

The q, limit and skip parameters work as on the list; fields is ignored. For resources never changed after their creation (locker-history), updatedAt holds the creation date.

Example Usage

Orders changed since November 22
curl -G 'https://api.moncasierfrais.fr/v1/orders/headers' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
--data-urlencode 'q={"updatedAt":{"$gte":"2026-11-22T00:00:00Z"}}'

Response

Success
{
  "count": 2,
  "rows": [
    { "id": "6651aa00bb11cc22dd33ee44", "updatedAt": "2026-11-22T08:41:07.512Z" },
    { "id": "6651a9ffbb11cc22dd33ee40", "updatedAt": "2026-11-22T07:02:55.003Z" }
  ]
}

Module

Retrieve a list of modules associated with the seller group

GEThttps://api.moncasierfrais.fr/v1/modules

Retrieve a list of modules associated with the seller group.

Data Model

ParameterTypeDescription
idstringUnique identifier of the module.
namestringName of the module.
locationstringPhysical location of the module.
gpsCoordinatesarray of numbersGPS coordinates in the format [latitude, longitude].
lastPollnumber (milliseconds since epoch)Timestamp of the last poll in milliseconds since January 1, 1970.
eslShopCodestringShop code used for ESL (Electronic Shelf Label) integration.
frontendVersionstringVersion of the frontend software.
backendVersionstringVersion of the backend software.
isOnlinebooleanIndicates whether the module is currently online.
addonsstring[]List of added plugin (ex: ['esl', 'barcodes', ...] )
statusobjectCurrent status details of the module.
setupStatestringCurrent setup state of the module (e.g., 'installed').
stores{id,name}[]List of store provider (id: unique Id in store provider, name: 'uber', 'deliveroo', ...)
updatedAtstring (ISO 8601 date)Timestamp of the last update in ISO 8601 format.

API Data

Retrieve a list of API data associated with the seller group

GEThttps://api.moncasierfrais.fr/v1/api-data

Retrieve a list of API data associated with the seller group.

Data Model

ParameterTypeDescription
idstringUnique identifier for the API data.
keystringKey of the API data.
valuemixedValue associated with the key.
sellerGroupIdstringIdentifier of the seller group.
createdAtstring (ISO 8601 date)Timestamp when the record was created.
updatedAtstring (ISO 8601 date)Timestamp when the record was last updated.

Creates a new API data entry

POSThttps://api.moncasierfrais.fr/v1/api-data

Creates a new API data entry.

Request Body

ParameterTypeDescription
keystringKey of the API data.
valuemixedValue associated with the key.

Updates an existing API data entry

PUThttps://api.moncasierfrais.fr/v1/api-data/{id}

Updates an existing API data entry. Returns validation errors when no fields can be updated.

Path Parameters

ParameterTypeDescription
idstringID of the resource to update.
Provide the identifier as a path parameter (/:id).

Request Body

ParameterTypeDescription
keystringKey of the API data.
valuemixedValue associated with the key.

Error Responses

  • 400 – No valid fields supplied. Provide at least one whitelisted property in the payload.
  • 404 – Resource not found in your seller group.
  • 500 – Unexpected server error. The response body contains the failure reason.

Deletes an existing API data entry

DELETEhttps://api.moncasierfrais.fr/v1/api-data/{id}

Deletes an existing API data entry. Responds with detailed errors when the item is missing.

Path Parameters

ParameterTypeDescription
idstringID of the resource to delete.
Provide the identifier as a path parameter (/:id).

Error Responses

  • 400 – Missing resource id. Provide it as a path parameter.
  • 404 – Resource not found in your seller group.
  • 500 – Unexpected server error. The response body contains the failure reason.

Constants

Retrieve a list of constants

GEThttps://api.moncasierfrais.fr/v1/constants

Retrieve a list of constants.

Data Model

ParameterTypeDescription
idstringUnique identifier for the constant.
keystringKey of the constant.
typestringType of the constant.
valuemixedValue of the constant.
moduleIdstringIdentifier of the module associated with the constant.
createdAtstring (ISO 8601 date)Timestamp when the constant was created.
updatedAtstring (ISO 8601 date)Timestamp when the constant was last updated.

Coupons

Retrieve a list of coupons

GEThttps://api.moncasierfrais.fr/v1/coupons

Retrieve a list of coupons.

Data Model

ParameterTypeDescription
idstringUnique identifier for the coupon.
namestringName of the coupon.
typestringType of the coupon.
codestringCode used to redeem the coupon.
amountnumberDiscount amount provided by the coupon.
concernedProductIdsarray of stringsList of product IDs the coupon applies to.
startDatestring (ISO 8601 date)Start date of the coupon's validity.
endDatestring (ISO 8601 date)End date of the coupon's validity.
cumulativebooleanIndicates if the coupon can be combined with other coupons.
minCartnumberMinimum cart value required to apply the coupon.
usagenumberNumber of times the coupon has been used.
maxUsagenumberMaximum number of times the coupon can be used.
emailstringEmail address associated with the coupon.
phoneNumberstringPhone number associated with the coupon.
emailHistoryarray of stringsHistory of email communications related to the coupon.
moduleIdstringIdentifier of the module associated with the coupon.
createdAtstring (ISO 8601 date)Timestamp when the coupon was created.
updatedAtstring (ISO 8601 date)Timestamp when the coupon was last updated.

ESL

Retrieve a list of Electronic Shelf Labels (ESL)

GEThttps://api.moncasierfrais.fr/v1/esl

Retrieve a list of Electronic Shelf Labels (ESL).

Data Model

ParameterTypeDescription
idstringUnique identifier for the ESL.
shopCodestringCode of the shop the ESL belongs to.
eslIdstringIdentifier of the ESL device.
goodsCodestringCode of the goods associated with the ESL.
eslDatamixedData related to the ESL.
goodsDatamixedData related to the goods.
lockerIdstringIdentifier of the locker associated with the ESL.
lastLockerUpdatestring (ISO 8601 date)Timestamp of the last locker update.
moduleIdstringIdentifier of the module associated with the ESL.
createdAtstring (ISO 8601 date)Timestamp when the ESL record was created.
updatedAtstring (ISO 8601 date)Timestamp when the ESL record was last updated.

Lockers

Retrieve a list of lockers

GEThttps://api.moncasierfrais.fr/v1/lockers

Retrieve a list of lockers.

Data Model

ParameterTypeDescription
idstringUnique identifier for the locker.
lockerBlocIdstringIdentifier of the locker bloc.
numbernumberNumber of the locker.
numberOnModulenumberNumber of the locker on the module.
statenumberCurrent state of the locker.
lockerPricenumberPrice associated with the locker.
dateOfFillingstring (ISO 8601 date)Date when the locker was filled.
dateOfExpirationstring (ISO 8601 date)Date when the locker expires.
currentProductmixedCurrent product stored in the locker.
currentProductIdstringIdentifier of the current product.
currentProductUnitstringUnit type of the current product.
currentProductUnitAmountnumberUnit amount of the current product.
preparedProductIdstringIdentifier of the prepared product.
eslIdstringIdentifier of the ESL associated with the locker.
moduleIdstringIdentifier of the module the locker belongs to.
createdAtstring (ISO 8601 date)Timestamp when the locker record was created.
updatedAtstring (ISO 8601 date)Timestamp when the locker record was last updated.

Retrieve the history of the lockers

GEThttps://api.moncasierfrais.fr/v1/locker-history

Returns the event log of the lockers of your modules: filling, opening, sale, order pickup, discount, expiration... Each row keeps the state of the locker at the time of the event. The history is kept with no time limit. The route needs read access to /v1/lockers.

Filter with q (for example by moduleId, lockerId, action or createdAt) and paginate with limit and skip: the history of a module grows fast.

Example Usage

Sales of a module since November 1st
curl -G 'https://api.moncasierfrais.fr/v1/locker-history' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
--data-urlencode 'q={"moduleId":"65a1b2c3d4e5f60718293a4b","action":"SOLD","createdAt":{"$gte":"2026-11-01"}}' \
--data-urlencode 'limit=100'

Data Model

ParameterTypeDescription
idstringIdentifier of the event.
lockerIdstringLocker concerned.
moduleIdstringModule of the locker.
userIdstring or nullUser behind the action, if any.
actionstringEvent type: FILL, FILL_MIX, UNFILL, OPEN, CLOSE, PREPARE, APPLY_EXPIRATION, EXPIRE, WITHDRAW_FROM_SALE, APPLY_DISCOUNT, SOLD, DELIVER, BOOK, BOOK_CANCEL, BOOK_EXPIRE, PICKUP.
originstringUSER (action of a person) or SYSTEM (automatic action of the module).
payloadobjectDetails specific to the event (see below).
stateobjectState of the locker at the time of the event, with the fields of GET /v1/lockers (including state, the locker status, and lockerPrice, in cents).
createdAtstring (ISO 8601)Date of the event.

Details per action

  • FILL: productId, and depending on the filling quantity or price.
  • OPEN and CLOSE: card, the means of opening.
  • APPLY_DISCOUNT: reductionType (0 none, 1 fixed amount, 2 percentage) and reductionAmount (cents or percentage).
  • BOOK: orderType and qrcode.
  • PICKUP: orderId, and clientEmail when known.
  • SOLD: transactionId, the transaction of the sale (see GET /v1/transactions).
  • PREPARE: preparedProductId, or productIdsAndAmountMix for a product mix.

Locker status (state.state)

0 empty, 1 on sale, 2 canceled, 3 expired, 4 blocked, 5 booked for an order, 6 withdrawn from sale, 7 out of service.

Response

Success
{
  "count": 1,
  "rows": [
    {
      "id": "6652b0c1d2e3f4a5b6c7d8e9",
      "lockerId": "65a1b2c3d4e5f60718293a50",
      "moduleId": "65a1b2c3d4e5f60718293a4b",
      "userId": null,
      "action": "SOLD",
      "origin": "USER",
      "payload": { "transactionId": "6652b0c0d2e3f4a5b6c7d8e1" },
      "state": {
        "id": "65a1b2c3d4e5f60718293a50",
        "lockerBlocId": "65a1b2c3d4e5f60718293a4c",
        "number": 7,
        "state": 1,
        "lockerPrice": 450,
        "moduleId": "65a1b2c3d4e5f60718293a4b"
      },
      "createdAt": "2026-11-22T11:58:03.120Z"
    }
  ]
}

Locker Blocs

Retrieve a list of locker blocs

GEThttps://api.moncasierfrais.fr/v1/locker-blocs

Retrieve a list of locker blocs.

Data Model

ParameterTypeDescription
idstringUnique identifier for the locker bloc.
numbernumberNumber of the locker bloc.
blocTypenumberType of the locker bloc (0: 6x4, 1: 7x4, 2: 5x3).
numberOfLockersnumberTotal number of lockers in the bloc.
lightsAlwaysOnbooleanIndicates if the lights are always on.
temperatureMonitoringbooleanIndicates if temperature monitoring is enabled.
temperatureSetpointnumberDesired temperature setpoint.
temperatureDeltaSetpointnumberAllowed temperature variation from the setpoint.
temperatureDeltaAlertnumberTemperature variation threshold to trigger an alert.
temperatureMinutesBeforeAlertnumberMinutes before a temperature alert is triggered.
isInTemperatureAlertbooleanIndicates if the locker bloc is currently in a temperature alert state.
disabledbooleanIndicates if the locker bloc is disabled.
moduleIdstringIdentifier of the module the locker bloc belongs to.
createdAtstring (ISO 8601 date)Timestamp when the locker bloc was created.
updatedAtstring (ISO 8601 date)Timestamp when the locker bloc was last updated.

Change the temperature settings of a locker bloc

PUThttps://api.moncasierfrais.fr/v1/locker-blocs/{id}

Changes the temperature setpoint, the alert thresholds and the cold chain break behavior of a locker bloc. Send only the settings to change. The route needs read and write access to /v1/lockers.

The change is sent to the module, which applies it on its next synchronization: the response says "applied": false and GET /v1/locker-blocs shows the new values once the module has synchronized. For a bloc the module has not reported yet, the change is saved at once ("applied": true).

Path Parameters

ParameterTypeDescription
id *stringIdentifier of the locker bloc (see GET /v1/locker-blocs).

Request Body

ParameterTypeDescription
temperatureSetpointintegerTemperature setpoint, in °C, from 0 to 30.
temperatureDeltaSetpointintegerRegulation gap around the setpoint, in tenths of °C, from 20 to 100 (2.0 to 10.0 °C).
heaterEnabledbooleanTurns on the heater of the bloc.
temperatureAlertMinintegerLow alert threshold, in tenths of °C, in whole degrees (multiple of 10).
temperatureAlertMaxintegerHigh alert threshold, in tenths of °C, in whole degrees (multiple of 10).
temperatureMinutesBeforeAlertintegerTime out of the thresholds before the alert, in minutes, from 20 to 120.
breachBlockSalesbooleanBlocks the sales of the bloc during a cold chain break.
breachExpirationMinutesintegerDuration of a cold chain break after which the products of the bloc expire, in minutes, from 0 to 240.

The alert thresholds must stay consistent with the setpoint and the gap (stored values completed with those sent): the low threshold must be below the setpoint, the high threshold above the setpoint plus the gap. Otherwise, the 400 error gives the accepted range.

Example Usage

Set the setpoint to 4 °C
curl -X PUT 'https://api.moncasierfrais.fr/v1/locker-blocs/65a1b2c3d4e5f60718293a4c' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{ "temperatureSetpoint": 4 }'

Response

Sent to the module
{
  "success": true,
  "applied": false,
  "message": "Update queued, the module applies it on its next sync",
  "data": { "temperatureSetpoint": 4 }
}

Error Responses

  • 400 Bad Request: invalid identifier, unknown field, no setting sent, value out of range, or alert threshold inconsistent with the setpoint.
  • 403 Forbidden: the token does not have read and write access to /v1/lockers.
  • 404 Not Found: no locker bloc with this identifier in your modules.

Logs

Retrieve a list of logs

GEThttps://api.moncasierfrais.fr/v1/logs

Retrieve a list of logs.

Data Model

ParameterTypeDescription
idstringUnique identifier for the log entry.
typestringType of the log.
datastringData contained in the log.
moduleIdstringIdentifier of the module associated with the log.
createdAtstring (ISO 8601 date)Timestamp when the log was created.
updatedAtstring (ISO 8601 date)Timestamp when the log was last updated.

Orders

Retrieve a list of orders

GEThttps://api.moncasierfrais.fr/v1/orders

Retrieve a list of orders.

Data Model

ParameterTypeDescription
idstringUnique identifier for the order.
codestringUnique code of the order.
statenumberCurrent state of the order (0: pickedUp | 1: waiting for pick up | 2: not activated | 3: cancelled | 4: cancelledByExternalSystem | 5: toBeDelivered | 6: rejected).
paymentStatenumberPayment status of the order (0: paid, 1: to be paid on pickup).
pricenumberTotal price of the order.
VATnumberValue-added tax percentage.
externalIdstringExternal identifier for the order.
lockerIdsarray of stringsList of locker IDs associated with the order.
pickedUpAtstring (ISO 8601 date)Timestamp when the order was picked up.
clientEmailstringEmail of the client who made the order.
moduleIdstringIdentifier of the module associated with the order.
createdAtstring (ISO 8601 date)Timestamp when the order was created.
updatedAtstring (ISO 8601 date)Timestamp when the order was last updated.

Products

Retrieve a list of products

GEThttps://api.moncasierfrais.fr/v1/products

Retrieve a list of products.

Data Model

ParameterTypeDescription
idstringUnique identifier for the product.
productTypeIdstringIdentifier of the product type.
perUnitbooleanIf true, the product is sold per unit (not by weight).
unitTypestringUnit of measure when not per unit (allowed values: 'kg', 'l', 'unit').
imageBase64DatastringBase64-encoded main image available via the dedicated image endpoint.
thumbnailBase64DatastringBase64-encoded thumbnail generated by the platform.
namestringProduct name.
descriptionstringProduct description.
pricenumberProduct price stored in cents (100 = 1.00 €).
expirebooleanWhether the product expires.
expirationDelaynumberShelf-life duration in seconds.
expirationDiscountarray of objectsDiscounts applied as the product approaches expiration (see table below).
typeOfExpirationenumType of expiration: UBD | BBD. UBD is the use-by date (maximum consumption date), BBD is the best-before date (recommended consumption date).
availableInMixbooleanIf true, can be included in product mixes.
VATnumberVAT percentage (e.g., 5.5).
apiFieldstringAdditional API-related information.
sellerGroupIdstringIdentifier of the seller group.
ownerUserIdstringOwner user identifier (for attribution/transactions).
barcodeIdstring | string[]Single barcode or list of barcodes.
gtinstring | nullGTIN-14 of the product (14 characters), null when not set. Unique within the seller group.
availableOnlinebooleanAvailable for online ordering.
availableInModulebooleanAvailable in physical module/locker.
packagingOptionsobjectPackaging/selection options for weighted products (see table below).
creatorUserIdstringIdentifier of the user who created the product.
productMixCountnumberHow many units participate in a mix, if applicable.
createdAtstring (ISO 8601 date)Creation timestamp.
updatedAtstring (ISO 8601 date)Last update timestamp.

Expiration discount item

ParameterTypeDescription
amountnumberDiscount amount (numeric value, meaning depends on type).
delaynumberTime before expiration to apply this discount, in seconds.
typenumberReduction type: 0 = none, 1 = fixed amount, 2 = percentage.

Packaging options

ParameterTypeDescription
isUnitSelectionbooleanIf true, product is weighted but selectable by unit (e.g., sausages).
minnumberMinimum selectable weight/quantity.
maxnumberMaximum selectable weight/quantity.
stepnumberIncrement step for selection.

Creates a new product

POSThttps://api.moncasierfrais.fr/v1/products

Creates a new product.

Request Body

ParameterTypeDescription
productTypeIdstringIdentifier of the product type.
perUnitbooleanIf true, the product is sold per unit.
unitTypestringUnit of measure when not per unit (allowed values: 'kg', 'l', 'unit').
namestringProduct name.
descriptionstringProduct description.
pricenumberPrice in cents (100 = 1.00 €).
expirebooleanWhether the product expires.
expirationDelaynumberShelf-life duration in seconds.
expirationDiscountarray of objectsDiscount rules near expiration.
typeOfExpirationenumType of expiration: UBD | BBD. UBD is the use-by date (maximum consumption date), BBD is the best-before date (recommended consumption date).
availableInMixbooleanEligible for mixes.
VATnumberVAT percentage.
apiFieldstringAdditional API-related information.
ownerUserIdstringOwner user id.
barcodeIdstring | string[]Barcode(s). Each barcode must not be used by another product of the seller group.
gtinstring | nullGTIN-14 (14 alphanumeric characters). Shorter digit-only codes (EAN-13, UPC-12, GTIN-8) are left-padded with zeros. Must not be used by another product of the seller group. Send null or an empty string to clear it.
availableOnlinebooleanAvailable online.
availableInModulebooleanAvailable in module.
packagingOptionsobjectPackaging/selection options (see above).
creatorUserIdstringCreator user id.
productMixCountnumberMix count if applicable.
Upload product images with PUT /v1/products/{id}/image. The general product endpoints ignore inline imageBase64Data and thumbnailBase64Data fields.

Error Responses

  • 400 Bad Request: The GTIN is not 14 alphanumeric characters.
  • 409 Conflict: A barcode or GTIN is already used by another product of the seller group. The message names the product, details lists each conflicting product (id, name, shared barcodes and gtin). Archived products do not count.

Updates an existing product with field-level sanitation and change tracking

PUThttps://api.moncasierfrais.fr/v1/products/{id}

Updates an existing product with field-level sanitation and change tracking.

Path Parameters

ParameterTypeDescription
idstringID of the resource to update.
Provide the identifier as a path parameter (/:id).

Request Body

ParameterTypeDescription
productTypeIdstringIdentifier of the product type.
perUnitbooleanSold per unit.
unitTypestringUnit of measure when not per unit (allowed values: 'kg', 'l', 'unit').
namestringProduct name.
descriptionstringProduct description.
pricenumberPrice in cents (100 = 1.00 €).
expirebooleanWhether the product expires.
expirationDelaynumberShelf-life duration in seconds.
expirationDiscountarray of objectsDiscount rules near expiration.
typeOfExpirationenumType of expiration: UBD | BBD. UBD is the use-by date (maximum consumption date), BBD is the best-before date (recommended consumption date).
availableInMixbooleanEligible for mixes.
VATnumberVAT percentage.
apiFieldstringAdditional API-related information.
ownerUserIdstringOwner user id.
barcodeIdstring | string[]Barcode(s). Each barcode must not be used by another product of the seller group.
gtinstring | nullGTIN-14 (14 alphanumeric characters). Shorter digit-only codes (EAN-13, UPC-12, GTIN-8) are left-padded with zeros. Must not be used by another product of the seller group. Send null or an empty string to clear it.
availableOnlinebooleanAvailable online.
availableInModulebooleanAvailable in module.
packagingOptionsobjectPackaging/selection options (see above).
creatorUserIdstringCreator user id.
productMixCountnumberMix count if applicable.
Upload product images with PUT /v1/products/{id}/image. The general product endpoints ignore inline imageBase64Data and thumbnailBase64Data fields.

Error Responses

  • 400 – No valid fields supplied. Provide at least one whitelisted property in the payload.
  • 404 – Resource not found in your seller group.
  • 400 Bad Request: The GTIN is not 14 alphanumeric characters.
  • 409 Conflict: A barcode or GTIN is already used by another product of the seller group. The message names the product, details lists each conflicting product (id, name, shared barcodes and gtin). Archived products do not count.
  • 500 – Unexpected server error. The response body contains the failure reason.

Retrieves the full-quality image for a product

GEThttps://api.moncasierfrais.fr/v1/products/{id}/image

Retrieves the full-quality image for a product. Use this endpoint when the thumbnail returned by the catalog endpoints is not enough (e.g., zoom or high-resolution rendering).

Path Parameters

ParameterTypeDescription
idstringIdentifier of the product whose image should be retrieved.

Response Body

ParameterTypeDescription
idstringIdentifier of the product the image belongs to.
imageBase64DatastringBase64-encoded full-quality image (resized to 900×655 on upload).
thumbnailBase64DatastringBase64-encoded thumbnail (90×90) — already exposed in catalog responses.
updatedAtstring (ISO 8601 date)Timestamp of the product's last update.

Example Usage

Retrieve high-quality product image
curl -X GET \
'https://api.moncasierfrais.fr/v1/products/68b6b71f0e55547ab74b5b18/image' \
-H 'Authorization: Bearer YOUR_API_TOKEN'

Error Responses

  • 400 – Missing resource id. Provide it as a path parameter.
  • 404 – Resource not found in your seller group.
  • 500 – Unexpected server error. The response body contains the failure reason.

Uploads or replaces the main image of an existing product

PUThttps://api.moncasierfrais.fr/v1/products/{id}/image

Uploads or replaces the main image of an existing product. The API compresses the original file and generates the thumbnail automatically.

Path Parameters

ParameterTypeDescription
idstringID of the resource to update.

Request Body

ParameterTypeDescription
imageBase64Data *stringBase64-encoded image data. Send only the full-size image; the API derives the thumbnail.
Images are automatically resized to 900×655 and compressed (thumbnail: 90×90).

Error Responses

  • 400 – Missing resource id. Provide it as a path parameter.
  • 400 – No valid fields supplied. Provide at least one whitelisted property in the payload.
  • 404 – Resource not found in your seller group.
  • 500 – Unexpected server error. The response body contains the failure reason.

Deletes an existing product within the current seller group

DELETEhttps://api.moncasierfrais.fr/v1/products/{id}

Deletes an existing product within the current seller group.

Path Parameters

ParameterTypeDescription
idstringID of the resource to delete.
Provide the identifier as a path parameter (/:id).

Error Responses

  • 400 – Missing resource id. Provide it as a path parameter.
  • 404 – Resource not found in your seller group.
  • 500 – Unexpected server error. The response body contains the failure reason.

Product Types

Retrieve a list of product types

GEThttps://api.moncasierfrais.fr/v1/product-types

Retrieve a list of product types.

Data Model

ParameterTypeDescription
idstringUnique identifier for the product type.
namestringName of the product type.
descriptionstringDescription of the product type.
ordernumberDefines sorting priority. Lower values appear first when sorting ascending.
sellerGroupIdstringIdentifier of the seller group.
createdAtstring (ISO 8601 date)Timestamp when the product type was created.
updatedAtstring (ISO 8601 date)Timestamp when the product type was last updated.

Creates a new product type

POSThttps://api.moncasierfrais.fr/v1/product-types

Creates a new product type.

Request Body

ParameterTypeDescription
namestringname of the product type
descriptionstringdescription of the product type
ordernumberOptional custom sort order (defaults to 0).

Updates an existing product type

PUThttps://api.moncasierfrais.fr/v1/product-types/{id}

Updates an existing product type. Returns meaningful feedback when nothing changes.

Path Parameters

ParameterTypeDescription
idstringID of the resource to update.
Provide the identifier as a path parameter (/:id).

Request Body

ParameterTypeDescription
namestringname of the product type
descriptionstringdescription of the product type
ordernumberSorting priority (lower first).

Error Responses

  • 400 – No valid fields supplied. Provide at least one whitelisted property in the payload.
  • 404 – Resource not found in your seller group.
  • 500 – Unexpected server error. The response body contains the failure reason.

Deletes an existing product type scoped to the seller group

DELETEhttps://api.moncasierfrais.fr/v1/product-types/{id}

Deletes an existing product type scoped to the seller group.

Path Parameters

ParameterTypeDescription
idstringID of the resource to delete.
Provide the identifier as a path parameter (/:id).

Error Responses

  • 400 – Missing resource id. Provide it as a path parameter.
  • 404 – Resource not found in your seller group.
  • 500 – Unexpected server error. The response body contains the failure reason.

Temperatures

Retrieve a list of temperature readings

GEThttps://api.moncasierfrais.fr/v1/temperatures

Retrieve a list of temperature readings.

Data Model

ParameterTypeDescription
idstringUnique identifier for the temperature reading.
lockerBlocIdstringIdentifier of the locker bloc.
temperatureSetpointnumberTemperature setpoint.
temperatureDeltaSetpointnumberAllowed variation from the setpoint.
valuenumberRecorded temperature value.
sensorNumbernumberNumber of the temperature sensor.
moduleIdstringIdentifier of the module.
createdAtstring (ISO 8601 date)Timestamp when the temperature was recorded.

Transactions

Retrieve a list of transactions

GEThttps://api.moncasierfrais.fr/v1/transactions

Retrieve a list of transactions.

Data Model

ParameterTypeDescription
idstringUnique identifier for the transaction.
productsobjectDetails of the products involved in the transaction.
ordersobjectDetails of orders involved in the transaction.
couponsobjectDetails of the coupons applied in the transaction.
totalPricenumberTotal price before reductions.
netPricenumberFinal price after reductions.
reductionnumberTotal amount reduced from the original price.
paymentTypestringType of payment used.
maskedCardNumberstringMasked credit card number used for payment.
contactlessbooleanIndicates if the payment was contactless.
conecsbooleanIndicates if the payment used Conecs system.
moduleIdstringIdentifier of the module where the transaction occurred.
createdAtstring (ISO 8601 date)Timestamp when the transaction was created.
updatedAtstring (ISO 8601 date)Timestamp when the transaction was last updated.
MonCasierFrais.fr logoDocs