MonCasierFrais API Documentation
This document illustrates how the MonCasierFrais API works and the list of exposed routes.
Copy failed. Please copy manually.
https://api.moncasierfrais.fr/v1The 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:
- Email: support@moncasierfrais.fr
- Phone: +33 4 81 16 12 02
Quickstart
- In the seller back office, open the API Token menu (available with the API option) and create a token with the permissions you need.
- Check the token with
GET /v1/me, which returns its name and permissions. - List your modules with
GET /v1/modules: theiridis themoduleIdexpected by the other routes.
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.
Authorization: Bearer MCF-ge0Ip.....GslMogPermissions
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.
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.
curl 'https://api.moncasierfrais.fr/v1/transactions?limit=100&skip=100' \
-H 'Authorization: Bearer YOUR_API_TOKEN'List Format
{
"count": 2,
"rows": [
{ "id": "668223f4faf0c685cc35d843", "name": "LaClayette Ville d'Avray" },
{ "id": "668223f4faf0c685cc35d851", "name": "LaClayette Denfert" }
]
}Example
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:
{
"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, invalidq,limitorskipparameter, refused body). The message names the field at fault.401: missing or invalid token. Locker actions also answer401when 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. Inq, 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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | The unique identifier of the module to retrieve the real-time catalog for. |
Example Usage
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)
{
"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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | The unique identifier of the module to get inventory for. |
Example Usage
curl -X GET \
'https://api.moncasierfrais.fr/v1/catalog/inventory/66420f8558f23a6a26986d04' \
-H 'Authorization: Bearer YOUR_API_TOKEN'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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | Unique identifier of the module to get delivery catalog for |
Example Usage
curl -X GET \
'https://api.moncasierfrais.fr/v1/catalog/delivery/66420f8558f23a6a26986d04' \
-H 'Authorization: Bearer YOUR_API_TOKEN'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
| Parameter | Type | Description |
|---|---|---|
moduleId * | string | Identifier of the module of the future order. |
Example Usage
curl 'https://api.moncasierfrais.fr/v1/orders/random-code/66420f8558f23a6a26986d04' \
-H 'Authorization: Bearer YOUR_API_TOKEN'Response
{
"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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | Unique identifier of the module where the order will be placed. |
Request Body
| Parameter | Type | Description |
|---|---|---|
name | string | Name of the order. |
code | string | 6-digit pickup code (e.g., '123456') used by customers to identify their order. |
paymentState | number | Payment status (0: paid, 1: to be paid on pickup). |
price | number | Total price in cents. |
VAT | number | VAT percentage. |
lockerIds | array of strings | Array of locker IDs (must be empty array [] for delivery orders). |
products | array of objects | Array of products with quantities (see ProductOrder structure below). |
expectedDeliveryDate | string (ISO 8601 date) | Expected delivery date (required for delivery orders). |
clientEmail | string | Customer email address (required for delivery orders). |
additionalClientInfo | object | Additional client information (required for delivery orders). |
additionalClientInfo.phone | string | Customer phone number. |
additionalClientInfo.name | string | Name of the order. |
externalId | string | External system order ID. |
externalUserId | string | External system user ID. |
comments | string | Comments from the end user to the seller (e.g., special instructions, delivery notes, etc.). |
ProductOrder Structure
| Parameter | Type | Description |
|---|---|---|
productId | string | Product identifier. |
packingQuantity | array of numbers | Array 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
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
{
"message": "Order created successfully"
}Error Responses
400 Bad Request
{
"error": "Invalid JSON: Request body is empty or not valid JSON"
}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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | The unique identifier of the module where the order was placed. |
Request Body
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the order to cancel. |
reason | string | The reason for cancelling the order (required for end-user notification). |
Example Usage
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
{
"message": "Order cancelled successfully"
}Error Responses
Bad Request (400)
{
"error": "Order ID is required"
}Not Found (404)
{
"error": "Order not found"
}Conflict (409)
{
"error": "Order cancellation is already being processed"
}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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | Identifier of the module the order belongs to. |
Request Body
| Parameter | Type | Description |
|---|---|---|
id | string | Identifier of the order. |
paymentState | number | New payment state: 0 = paid, 1 = to be paid on pickup. |
Example Usage
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
{
"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 (
idis not a valid identifier, orpaymentStateis not0or1). - 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
idexists on this module. - 409 Conflict: The same payment state change for this order is already waiting to be processed by the module.
{
"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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | Unique identifier of the module where lockers will be booked. |
Request Body
| Parameter | Type | Description |
|---|---|---|
name | string | Name of the locker booking order. |
code | string | 6-digit pickup code (e.g., '123456') used by customers to identify their order. |
lockerIds | array of strings | Array of locker IDs to book (at least one required). |
clientEmail | string | Customer email address (required). |
isPaid | boolean | Payment status (true: paid upfront, false: to be paid on pickup). |
price | number | Total price in cents (optional). |
VAT | number | VAT percentage (optional). |
externalId | string | External system order ID (optional). |
externalUserId | string | External system user ID (optional). |
comments | string | Comments from the end user to the seller (optional). |
Example Usage
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": true,
"orderId": "order_12345",
"lockerIds": ["locker_001", "locker_002"],
"totalPrice": 1500,
"message": "Lockers booked successfully"
}Error Responses
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
{
"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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | Identifier of the module the lockers belong to. |
Request Body
| Parameter | Type | Description |
|---|---|---|
lockerIds | array of strings | Lockers filled with a classic product (no price or weight override). |
lockerIdsAndPrices | array of objects | Lockers whose price the operator wants to set at filling time (see structure below). |
lockerIdsAndWeights | array of objects | Lockers filled with a weighted product (see structure below). |
productIdsAndAmountMix | array of objects | Products composing a product mix to place in the locker (see structure below). |
Locker price item: lockerIdsAndPrices
| Parameter | Type | Description |
|---|---|---|
lockerId | string | Identifier of the locker. |
price | number | Price to set on the locker, in cents (100 = 1.00 €). |
Locker weight item: lockerIdsAndWeights
| Parameter | Type | Description |
|---|---|---|
lockerId | string | Identifier of the locker. |
weight | number | Weight to set on the locker. |
Mix product item: productIdsAndAmountMix
| Parameter | Type | Description |
|---|---|---|
productId | string | Identifier of the product included in the mix. |
amount | number | Quantity 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
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": 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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | Identifier of the module the lockers belong to. |
Request Body
| Parameter | Type | Description |
|---|---|---|
lockerIds | array of strings | IDs of the lockers to empty. Each must belong to the module. |
Example Usage
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": 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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | Identifier of the module the lockers belong to. |
Request Body
| Parameter | Type | Description |
|---|---|---|
lockerIds | array of strings | IDs of the lockers to open. Each must belong to the module. |
Example Usage
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": 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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | Identifier of the module the lockers belong to. |
Request Body
| Parameter | Type | Description |
|---|---|---|
lockerIds | array of strings | IDs of the lockers to update. Each must belong to the module. |
dateOfExpiration | string (ISO 8601 date) | Expiration date to apply. Must be in the future. |
Example Usage
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": 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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | Identifier of the module the lockers belong to. |
Request Body
| Parameter | Type | Description |
|---|---|---|
lockerIds | array of strings | IDs of the lockers to discount. Each must belong to the module. |
reductionType | number | Reduction type: 0 = none, 1 = fixed amount, 2 = percentage. |
reductionAmount | number | Discount amount. A fixed amount in cents when reductionType is 1, or a percentage when reductionType is 2. |
Example Usage
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": 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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | Identifier of the module the lockers belong to. |
Request Body
| Parameter | Type | Description |
|---|---|---|
lockerIds | array of strings | IDs of the lockers to prepare. Each must belong to the module. |
productId | string | Identifier of the product to prepare in the lockers. |
Example Usage
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": 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
| Parameter | Type | Description |
|---|---|---|
moduleId | string | Identifier of the module the lockers belong to. |
Request Body
| Parameter | Type | Description |
|---|---|---|
lockerIds | array of strings | IDs of the lockers to unprepare. Each must belong to the module. |
Example Usage
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": 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
curl 'https://api.moncasierfrais.fr/v1/me' \
-H 'Authorization: Bearer YOUR_API_TOKEN'Response
{
"id": "6650f1a2b3c4d5e6f7a8b9c0",
"name": "ERP connector",
"sellerGroupId": "64f0a1b2c3d4e5f6a7b8c9d0",
"permissions": {
"/v1/orders": "Read&Write",
"/v1/lockers": "Read",
"/v1/products": "Read"
},
"expireAt": null,
"createdByUserId": "64f0aa11bb22cc33dd44ee55"
}Response Body
| Parameter | Type | Description |
|---|---|---|
id | string | Identifier of the token. |
name | string | Name given to the token when it was created. |
sellerGroupId | string | Seller group whose data the token can read and change. |
permissions | object | Permission per family of routes: Read, or Read&Write. |
expireAt | string (ISO 8601) or null | Expiration date of the token, null if it does not expire. |
createdByUserId | string or null | User 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
curl 'https://api.moncasierfrais.fr/v1/me/consumption' \
-H 'Authorization: Bearer YOUR_API_TOKEN'Response Body
| Parameter | Type | Description |
|---|---|---|
name | string | Name of the token. |
callCount | number | Number of calls since the token was created, not counting the current one. |
dataSent | number | Volume 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
| Parameter | Type | Description |
|---|---|---|
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,$functionand$accumulatorare 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(notid), and amounts are in cents. - The
qparameter of the lists is not used here: filter with a$matchstage.
Example Usage
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
{
"count": 2,
"rows": [
{ "_id": "65a1b2c3d4e5f60718293a4b", "sales": 41 },
{ "_id": "65a1b2c3d4e5f60718293a5c", "sales": 12 }
]
}Error Responses
- 400 Bad Request:
pipelinemissing, invalid JSON, more than 20 stages, unknown stage or refused operator. The message names the stage at fault, for examplepipeline: $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
$matchas 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
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
{
"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
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier of the module. |
name | string | Name of the module. |
location | string | Physical location of the module. |
gpsCoordinates | array of numbers | GPS coordinates in the format [latitude, longitude]. |
lastPoll | number (milliseconds since epoch) | Timestamp of the last poll in milliseconds since January 1, 1970. |
eslShopCode | string | Shop code used for ESL (Electronic Shelf Label) integration. |
frontendVersion | string | Version of the frontend software. |
backendVersion | string | Version of the backend software. |
isOnline | boolean | Indicates whether the module is currently online. |
addons | string[] | List of added plugin (ex: ['esl', 'barcodes', ...] ) |
status | object | Current status details of the module. |
setupState | string | Current setup state of the module (e.g., 'installed'). |
stores | {id,name}[] | List of store provider (id: unique Id in store provider, name: 'uber', 'deliveroo', ...) |
updatedAt | string (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
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the API data. |
key | string | Key of the API data. |
value | mixed | Value associated with the key. |
sellerGroupId | string | Identifier of the seller group. |
createdAt | string (ISO 8601 date) | Timestamp when the record was created. |
updatedAt | string (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
| Parameter | Type | Description |
|---|---|---|
key | string | Key of the API data. |
value | mixed | Value 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
| Parameter | Type | Description |
|---|---|---|
id | string | ID of the resource to update. |
Provide the identifier as a path parameter (/:id).
Request Body
| Parameter | Type | Description |
|---|---|---|
key | string | Key of the API data. |
value | mixed | Value 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
| Parameter | Type | Description |
|---|---|---|
id | string | ID 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
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the constant. |
key | string | Key of the constant. |
type | string | Type of the constant. |
value | mixed | Value of the constant. |
moduleId | string | Identifier of the module associated with the constant. |
createdAt | string (ISO 8601 date) | Timestamp when the constant was created. |
updatedAt | string (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
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the coupon. |
name | string | Name of the coupon. |
type | string | Type of the coupon. |
code | string | Code used to redeem the coupon. |
amount | number | Discount amount provided by the coupon. |
concernedProductIds | array of strings | List of product IDs the coupon applies to. |
startDate | string (ISO 8601 date) | Start date of the coupon's validity. |
endDate | string (ISO 8601 date) | End date of the coupon's validity. |
cumulative | boolean | Indicates if the coupon can be combined with other coupons. |
minCart | number | Minimum cart value required to apply the coupon. |
usage | number | Number of times the coupon has been used. |
maxUsage | number | Maximum number of times the coupon can be used. |
email | string | Email address associated with the coupon. |
phoneNumber | string | Phone number associated with the coupon. |
emailHistory | array of strings | History of email communications related to the coupon. |
moduleId | string | Identifier of the module associated with the coupon. |
createdAt | string (ISO 8601 date) | Timestamp when the coupon was created. |
updatedAt | string (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
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the ESL. |
shopCode | string | Code of the shop the ESL belongs to. |
eslId | string | Identifier of the ESL device. |
goodsCode | string | Code of the goods associated with the ESL. |
eslData | mixed | Data related to the ESL. |
goodsData | mixed | Data related to the goods. |
lockerId | string | Identifier of the locker associated with the ESL. |
lastLockerUpdate | string (ISO 8601 date) | Timestamp of the last locker update. |
moduleId | string | Identifier of the module associated with the ESL. |
createdAt | string (ISO 8601 date) | Timestamp when the ESL record was created. |
updatedAt | string (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
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the locker. |
lockerBlocId | string | Identifier of the locker bloc. |
number | number | Number of the locker. |
numberOnModule | number | Number of the locker on the module. |
state | number | Current state of the locker. |
lockerPrice | number | Price associated with the locker. |
dateOfFilling | string (ISO 8601 date) | Date when the locker was filled. |
dateOfExpiration | string (ISO 8601 date) | Date when the locker expires. |
currentProduct | mixed | Current product stored in the locker. |
currentProductId | string | Identifier of the current product. |
currentProductUnit | string | Unit type of the current product. |
currentProductUnitAmount | number | Unit amount of the current product. |
preparedProductId | string | Identifier of the prepared product. |
eslId | string | Identifier of the ESL associated with the locker. |
moduleId | string | Identifier of the module the locker belongs to. |
createdAt | string (ISO 8601 date) | Timestamp when the locker record was created. |
updatedAt | string (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
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
| Parameter | Type | Description |
|---|---|---|
id | string | Identifier of the event. |
lockerId | string | Locker concerned. |
moduleId | string | Module of the locker. |
userId | string or null | User behind the action, if any. |
action | string | Event type: FILL, FILL_MIX, UNFILL, OPEN, CLOSE, PREPARE, APPLY_EXPIRATION, EXPIRE, WITHDRAW_FROM_SALE, APPLY_DISCOUNT, SOLD, DELIVER, BOOK, BOOK_CANCEL, BOOK_EXPIRE, PICKUP. |
origin | string | USER (action of a person) or SYSTEM (automatic action of the module). |
payload | object | Details specific to the event (see below). |
state | object | State 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). |
createdAt | string (ISO 8601) | Date of the event. |
Details per action
- FILL:
productId, and depending on the fillingquantityorprice. - OPEN and CLOSE:
card, the means of opening. - APPLY_DISCOUNT:
reductionType(0 none, 1 fixed amount, 2 percentage) andreductionAmount(cents or percentage). - BOOK:
orderTypeandqrcode. - PICKUP:
orderId, andclientEmailwhen known. - SOLD:
transactionId, the transaction of the sale (seeGET /v1/transactions). - PREPARE:
preparedProductId, orproductIdsAndAmountMixfor 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
{
"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
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the locker bloc. |
number | number | Number of the locker bloc. |
blocType | number | Type of the locker bloc (0: 6x4, 1: 7x4, 2: 5x3). |
numberOfLockers | number | Total number of lockers in the bloc. |
lightsAlwaysOn | boolean | Indicates if the lights are always on. |
temperatureMonitoring | boolean | Indicates if temperature monitoring is enabled. |
temperatureSetpoint | number | Desired temperature setpoint. |
temperatureDeltaSetpoint | number | Allowed temperature variation from the setpoint. |
temperatureDeltaAlert | number | Temperature variation threshold to trigger an alert. |
temperatureMinutesBeforeAlert | number | Minutes before a temperature alert is triggered. |
isInTemperatureAlert | boolean | Indicates if the locker bloc is currently in a temperature alert state. |
disabled | boolean | Indicates if the locker bloc is disabled. |
moduleId | string | Identifier of the module the locker bloc belongs to. |
createdAt | string (ISO 8601 date) | Timestamp when the locker bloc was created. |
updatedAt | string (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
| Parameter | Type | Description |
|---|---|---|
id * | string | Identifier of the locker bloc (see GET /v1/locker-blocs). |
Request Body
| Parameter | Type | Description |
|---|---|---|
temperatureSetpoint | integer | Temperature setpoint, in °C, from 0 to 30. |
temperatureDeltaSetpoint | integer | Regulation gap around the setpoint, in tenths of °C, from 20 to 100 (2.0 to 10.0 °C). |
heaterEnabled | boolean | Turns on the heater of the bloc. |
temperatureAlertMin | integer | Low alert threshold, in tenths of °C, in whole degrees (multiple of 10). |
temperatureAlertMax | integer | High alert threshold, in tenths of °C, in whole degrees (multiple of 10). |
temperatureMinutesBeforeAlert | integer | Time out of the thresholds before the alert, in minutes, from 20 to 120. |
breachBlockSales | boolean | Blocks the sales of the bloc during a cold chain break. |
breachExpirationMinutes | integer | Duration 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
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
{
"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
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the log entry. |
type | string | Type of the log. |
data | string | Data contained in the log. |
moduleId | string | Identifier of the module associated with the log. |
createdAt | string (ISO 8601 date) | Timestamp when the log was created. |
updatedAt | string (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
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the order. |
code | string | Unique code of the order. |
state | number | Current state of the order (0: pickedUp | 1: waiting for pick up | 2: not activated | 3: cancelled | 4: cancelledByExternalSystem | 5: toBeDelivered | 6: rejected). |
paymentState | number | Payment status of the order (0: paid, 1: to be paid on pickup). |
price | number | Total price of the order. |
VAT | number | Value-added tax percentage. |
externalId | string | External identifier for the order. |
lockerIds | array of strings | List of locker IDs associated with the order. |
pickedUpAt | string (ISO 8601 date) | Timestamp when the order was picked up. |
clientEmail | string | Email of the client who made the order. |
moduleId | string | Identifier of the module associated with the order. |
createdAt | string (ISO 8601 date) | Timestamp when the order was created. |
updatedAt | string (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
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the product. |
productTypeId | string | Identifier of the product type. |
perUnit | boolean | If true, the product is sold per unit (not by weight). |
unitType | string | Unit of measure when not per unit (allowed values: 'kg', 'l', 'unit'). |
imageBase64Data | string | Base64-encoded main image available via the dedicated image endpoint. |
thumbnailBase64Data | string | Base64-encoded thumbnail generated by the platform. |
name | string | Product name. |
description | string | Product description. |
price | number | Product price stored in cents (100 = 1.00 €). |
expire | boolean | Whether the product expires. |
expirationDelay | number | Shelf-life duration in seconds. |
expirationDiscount | array of objects | Discounts applied as the product approaches expiration (see table below). |
typeOfExpiration | enum | Type of expiration: UBD | BBD. UBD is the use-by date (maximum consumption date), BBD is the best-before date (recommended consumption date). |
availableInMix | boolean | If true, can be included in product mixes. |
VAT | number | VAT percentage (e.g., 5.5). |
apiField | string | Additional API-related information. |
sellerGroupId | string | Identifier of the seller group. |
ownerUserId | string | Owner user identifier (for attribution/transactions). |
barcodeId | string | string[] | Single barcode or list of barcodes. |
gtin | string | null | GTIN-14 of the product (14 characters), null when not set. Unique within the seller group. |
availableOnline | boolean | Available for online ordering. |
availableInModule | boolean | Available in physical module/locker. |
packagingOptions | object | Packaging/selection options for weighted products (see table below). |
creatorUserId | string | Identifier of the user who created the product. |
productMixCount | number | How many units participate in a mix, if applicable. |
createdAt | string (ISO 8601 date) | Creation timestamp. |
updatedAt | string (ISO 8601 date) | Last update timestamp. |
Expiration discount item
| Parameter | Type | Description |
|---|---|---|
amount | number | Discount amount (numeric value, meaning depends on type). |
delay | number | Time before expiration to apply this discount, in seconds. |
type | number | Reduction type: 0 = none, 1 = fixed amount, 2 = percentage. |
Packaging options
| Parameter | Type | Description |
|---|---|---|
isUnitSelection | boolean | If true, product is weighted but selectable by unit (e.g., sausages). |
min | number | Minimum selectable weight/quantity. |
max | number | Maximum selectable weight/quantity. |
step | number | Increment step for selection. |
Creates a new product
POSThttps://api.moncasierfrais.fr/v1/products
Creates a new product.
Request Body
| Parameter | Type | Description |
|---|---|---|
productTypeId | string | Identifier of the product type. |
perUnit | boolean | If true, the product is sold per unit. |
unitType | string | Unit of measure when not per unit (allowed values: 'kg', 'l', 'unit'). |
name | string | Product name. |
description | string | Product description. |
price | number | Price in cents (100 = 1.00 €). |
expire | boolean | Whether the product expires. |
expirationDelay | number | Shelf-life duration in seconds. |
expirationDiscount | array of objects | Discount rules near expiration. |
typeOfExpiration | enum | Type of expiration: UBD | BBD. UBD is the use-by date (maximum consumption date), BBD is the best-before date (recommended consumption date). |
availableInMix | boolean | Eligible for mixes. |
VAT | number | VAT percentage. |
apiField | string | Additional API-related information. |
ownerUserId | string | Owner user id. |
barcodeId | string | string[] | Barcode(s). Each barcode must not be used by another product of the seller group. |
gtin | string | null | GTIN-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. |
availableOnline | boolean | Available online. |
availableInModule | boolean | Available in module. |
packagingOptions | object | Packaging/selection options (see above). |
creatorUserId | string | Creator user id. |
productMixCount | number | Mix 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,
detailslists each conflicting product (id,name, sharedbarcodesandgtin). 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
| Parameter | Type | Description |
|---|---|---|
id | string | ID of the resource to update. |
Provide the identifier as a path parameter (/:id).
Request Body
| Parameter | Type | Description |
|---|---|---|
productTypeId | string | Identifier of the product type. |
perUnit | boolean | Sold per unit. |
unitType | string | Unit of measure when not per unit (allowed values: 'kg', 'l', 'unit'). |
name | string | Product name. |
description | string | Product description. |
price | number | Price in cents (100 = 1.00 €). |
expire | boolean | Whether the product expires. |
expirationDelay | number | Shelf-life duration in seconds. |
expirationDiscount | array of objects | Discount rules near expiration. |
typeOfExpiration | enum | Type of expiration: UBD | BBD. UBD is the use-by date (maximum consumption date), BBD is the best-before date (recommended consumption date). |
availableInMix | boolean | Eligible for mixes. |
VAT | number | VAT percentage. |
apiField | string | Additional API-related information. |
ownerUserId | string | Owner user id. |
barcodeId | string | string[] | Barcode(s). Each barcode must not be used by another product of the seller group. |
gtin | string | null | GTIN-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. |
availableOnline | boolean | Available online. |
availableInModule | boolean | Available in module. |
packagingOptions | object | Packaging/selection options (see above). |
creatorUserId | string | Creator user id. |
productMixCount | number | Mix 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,
detailslists each conflicting product (id,name, sharedbarcodesandgtin). 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
| Parameter | Type | Description |
|---|---|---|
id | string | Identifier of the product whose image should be retrieved. |
Response Body
| Parameter | Type | Description |
|---|---|---|
id | string | Identifier of the product the image belongs to. |
imageBase64Data | string | Base64-encoded full-quality image (resized to 900×655 on upload). |
thumbnailBase64Data | string | Base64-encoded thumbnail (90×90) — already exposed in catalog responses. |
updatedAt | string (ISO 8601 date) | Timestamp of the product's last update. |
Example Usage
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
| Parameter | Type | Description |
|---|---|---|
id | string | ID of the resource to update. |
Request Body
| Parameter | Type | Description |
|---|---|---|
imageBase64Data * | string | Base64-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
| Parameter | Type | Description |
|---|---|---|
id | string | ID 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
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the product type. |
name | string | Name of the product type. |
description | string | Description of the product type. |
order | number | Defines sorting priority. Lower values appear first when sorting ascending. |
sellerGroupId | string | Identifier of the seller group. |
createdAt | string (ISO 8601 date) | Timestamp when the product type was created. |
updatedAt | string (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
| Parameter | Type | Description |
|---|---|---|
name | string | name of the product type |
description | string | description of the product type |
order | number | Optional 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
| Parameter | Type | Description |
|---|---|---|
id | string | ID of the resource to update. |
Provide the identifier as a path parameter (/:id).
Request Body
| Parameter | Type | Description |
|---|---|---|
name | string | name of the product type |
description | string | description of the product type |
order | number | Sorting 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
| Parameter | Type | Description |
|---|---|---|
id | string | ID 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
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the temperature reading. |
lockerBlocId | string | Identifier of the locker bloc. |
temperatureSetpoint | number | Temperature setpoint. |
temperatureDeltaSetpoint | number | Allowed variation from the setpoint. |
value | number | Recorded temperature value. |
sensorNumber | number | Number of the temperature sensor. |
moduleId | string | Identifier of the module. |
createdAt | string (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
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier for the transaction. |
products | object | Details of the products involved in the transaction. |
orders | object | Details of orders involved in the transaction. |
coupons | object | Details of the coupons applied in the transaction. |
totalPrice | number | Total price before reductions. |
netPrice | number | Final price after reductions. |
reduction | number | Total amount reduced from the original price. |
paymentType | string | Type of payment used. |
maskedCardNumber | string | Masked credit card number used for payment. |
contactless | boolean | Indicates if the payment was contactless. |
conecs | boolean | Indicates if the payment used Conecs system. |
moduleId | string | Identifier of the module where the transaction occurred. |
createdAt | string (ISO 8601 date) | Timestamp when the transaction was created. |
updatedAt | string (ISO 8601 date) | Timestamp when the transaction was last updated. |