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

  1. Subscribe to Discovery and get your sandbox credentials.
  2. Fetch prices and stock for a SKU.
  3. 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 /stock

Return availability by site for one or more SKUs.

Request

ParamTypeRequiredDescription
skustring | arrayYesSKU or list of SKUs
sitestring | arrayNoOne or more site codes (e.g., LYS,PAR)
availabilityAtdatetimeNoDesired 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 /prices

Return negotiated net prices for one or more SKUs.

Request

ParamTypeRequiredDescription
skustring | arrayYesSKU(s)
accountIdstringYesBuyer account identifier
contractIdstringNoContract 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/me

Return 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

  • 400 Validation
  • 401/403 Auth / ACL
  • 404 Not found
  • 409 Idempotency conflict
  • 429 Rate limit (with Retry-After)
  • 5xx Server

Limits & Quotas

PlanSteadyBurstDaily capSupportSLA
Discovery10 rps20 rps500kCommunity/email99.5%
Premium20 rps40 rps2MPriority99.9%

Need more throughput? Request higher limits.

Changelog