Beheer klantbestellingen via de Orders API. Maak nieuwe opdrachten aan, haal bestaande op en werk de status bij.
/api/vendor/ordersGeeft de laatste 100 opdrachten van de leverancier terug, gesorteerd op laatste wijziging.
curl -s https://brutlers.com/api/vendor/orders \
-H "X-Api-Key: brut_your_api_key_here"Response
{
"orders": [
{
"id": "cm...",
"type": "BRIDAL_DRESS",
"status": "ORDERED",
"model": "Valentina A-Line",
"size": "38",
"color": "Ivory",
"description": "Custom bridal dress",
"specialRequests": "Extra lace on sleeves",
"customer": {
"name": "Anna Müller",
"email": "anna@example.com"
},
"updates": [
{
"status": "ORDERED",
"message": "Order created via API",
"createdAt": "2026-03-10T14:30:00.000Z"
}
],
"createdAt": "2026-03-10T14:30:00.000Z",
"updatedAt": "2026-03-10T14:30:00.000Z"
}
]
}/api/vendor/ordersMaakt een nieuwe klantopdracht aan. Als er al een klant bestaat met hetzelfde e-mailadres, wordt deze automatisch gekoppeld.
Request-body
| Field | Type | Description | |
|---|---|---|---|
| customerName | string | Verplicht veld | Naam van de klant |
| type | enum | Verplicht veld | Opdrachttype: BRIDAL_DRESS, SUIT, RENTAL |
| customerEmail | string | Optioneel | E-mailadres van de klant |
| customerPhone | string | Optioneel | Telefoonnummer van de klant |
| weddingDate | string | Optioneel | Trouwdatum (ISO 8601) |
| model | string | Optioneel | Modelaanduiding |
| description | string | Optioneel | Beschrijving van de opdracht |
| size | string | Optioneel | Maat |
| color | string | Optioneel | Kleur |
| specialRequests | string | Optioneel | Speciale wensen |
curl -X POST https://brutlers.com/api/vendor/orders \
-H "X-Api-Key: brut_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"customerName": "Anna Müller",
"customerEmail": "anna@example.com",
"type": "BRIDAL_DRESS",
"model": "Valentina A-Line",
"size": "38",
"color": "Ivory"
}'Response (201)
{ "id": "cm...", "status": "ORDERED" }/api/vendor/orders/{id}/statusWerkt de status van een bestaande opdracht bij. Optioneel kunnen een bericht en een afbeelding worden toegevoegd.
Request-body
| Field | Type | Description | |
|---|---|---|---|
| status | enum | Verplicht veld | Nieuwe status |
| message | string | Optioneel | Statusbericht voor de klant |
| imageUrl | string | Optioneel | URL naar een afbeelding (bijv. voortgangsfoto) |
curl -X PUT https://brutlers.com/api/vendor/orders/ORDER_ID/status \
-H "X-Api-Key: brut_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"status": "IN_PRODUCTION",
"message": "Fabric has been cut, starting assembly."
}'Response
{ "id": "cm...", "status": "IN_PRODUCTION" }