Rexel API Reference
Connect your ERP to live Stock, Prices, Quotes and Orders. Copy‑ready code, exact schemas, and the fastest route to a first successful call.
OpenAPI
Postman
Idempotency
OAuth2 / API key
Authentication
Authenticate using OAuth 2.0 Client Credentials (recommended) or an APIM subscription key. Requests must be made over HTTPS.
OAuth 2.0 — get a token
# curl
curl -X POST "https://auth.rexel.com/oauth2/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=YOUR_ID&client_secret=YOUR_SECRET&scope=prices stock quotes orders"
Use the token
# python (requests)
import requests
hdrs = {"Authorization": f"Bearer {TOKEN}"}
res = requests.get("https://api.rexel.com/prices?sku=100012&accountId=demo", headers=hdrs)
print(res.json())
APIM subscription key (alternative)
curl -H "Ocp-Apim-Subscription-Key: <your-key>" https://api.rexel.com/stock?sku=100012
5‑minute quickstart
- Subscribe to Discovery and get your sandbox credentials.
- Fetch prices and stock for a SKU.
- Create a quote, then place an idempotent order.
Step 1
Price & availability
import requests
H = {"Authorization": f"Bearer {TOKEN}"}
prices = requests.get(f"{API}/prices", params={"sku":"100012","accountId":"demo"}, headers=H).json()
stock = requests.get(f"{API}/stock", params={"sku":"100012","site":"LYS,PAR"}, headers=H).json()
Step 2
Quote → Order (idempotent)
body = {"accountId":"demo","lines":[{"sku":"100012","qty":5}],"validUntil":"2025-12-31"}
q = requests.post(f"{API}/quotes", json=body, headers=H).json()
order = requests.post(f"{API}/orders", json={"quoteId": q["id"]}, headers={**H, "Idempotency-Key":"uuid-here"}).json()
Stock
GET /stockReturn availability by site for one or more SKUs.
Request
| Param | Type | Required | Description |
|---|---|---|---|
| sku | string | array | Yes | SKU or list of SKUs |
| site | string | array | No | One or more site codes (e.g., LYS,PAR) |
| availabilityAt | datetime | No | Desired date to check |
# curl
curl -H "Authorization: Bearer $TOKEN" \
"https://api.rexel.com/stock?sku=100012&site=LYS,PAR"
Response
{
"items": [
{ "sku": "100012", "site": "LYS", "availableQty": 42, "leadTimeDays": 0 },
{ "sku": "100012", "site": "PAR", "availableQty": 5, "leadTimeDays": 2 }
]
}
Prices
GET /pricesReturn negotiated net prices for one or more SKUs.
Request
| Param | Type | Required | Description |
|---|---|---|---|
| sku | string | array | Yes | SKU(s) |
| accountId | string | Yes | Buyer account identifier |
| contractId | string | No | Contract override if applicable |
# python
import requests
requests.get(f"{API}/prices", params={"sku":"100012,100013","accountId":"demo"}, headers=H).json()
Response
{
"items": [
{ "sku": "100012", "netPrice": 12.9, "currency": "EUR", "validUntil": "2025-12-31" },
{ "sku": "100013", "netPrice": 7.4, "currency": "EUR", "validUntil": "2025-12-31" }
]
}
Quotes
POST /quotes, GET /quotes/{id}Create a quote (lines + business terms) and retrieve it deterministically.
Create
{
"accountId": "demo",
"lines": [{"sku":"100012","qty":5}],
"validUntil": "2025-12-31"
}
# curl
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d @body.json "https://api.rexel.com/quotes"
Retrieve
{
"id": "q_01H7...",
"totalNet": 64.50,
"currency": "EUR",
"validUntil": "2025-12-31",
"lines": [ {"sku":"100012","qty":5,"netPrice":12.9} ]
}
Orders
POST /orders, GET /orders/{id}Submit orders safely with Idempotency‑Key to avoid duplicates.
Create (idempotent)
# curl
curl -X POST "https://api.rexel.com/orders" \
-H "Authorization: Bearer $TOKEN" \
-H "Idempotency-Key: 7c2f8c8b-2a0f-4e8f-9a3e-1a1f7a9c9b01" \
-H "Content-Type: application/json" \
-d '{"accountId":"demo","lines":[{"sku":"100012","qty":5}],"shipTo":"LYS"}'
Response
{
"orderId": "ord_01H9...",
"status": "received",
"createdAt": "2025-11-07T10:15:00Z"
}
Retrieve status timeline
{
"orderId": "ord_01H9...",
"timeline": [
{"status":"received","at":"2025-11-07T10:15:00Z"},
{"status":"confirmed","at":"2025-11-07T10:16:12Z"}
]
}
Customer
GET /customers/meReturn customer metadata for the authenticated account (addresses, terms).
{
"id": "acc_demo",
"name": "Demo Buyer",
"addresses": [{"type":"shipTo","code":"LYS","city":"Lyon"}],
"paymentTerm": "30NET"
}
Errors
All errors use a standard envelope and include a correlationId for tracing.
Envelope
{
"error": {
"status": 401,
"errorCode": "auth.invalid_token",
"message": "Access token is invalid or expired",
"correlationId": "b8f1-..."
}
}
Mapping
400Validation401/403Auth / ACL404Not found409Idempotency conflict429Rate limit (withRetry-After)5xxServer
Limits & Quotas
| Plan | Steady | Burst | Daily cap | Support | SLA |
|---|---|---|---|---|---|
| Discovery | 10 rps | 20 rps | 500k | Community/email | 99.5% |
| Premium | 20 rps | 40 rps | 2M | Priority | 99.9% |
Need more throughput? Request higher limits.
Changelog
- 2025‑11‑07 Added
leadTimeDaysto/stockresponse. - 2025‑10‑18 Introduced
Retry-Afterheader on429. - 2025‑09‑01 Initial public sandbox for Prices, Stock, Quotes, Orders.