Skip to content

Cancel a store reservation (shopper)​

POST
/store-reservations/{reservationNumber}/cancel

Cancels a pending, confirmed or ready reservation (cancelledBy = customer) and notifies the vendor's bell. Same gating as the GET (owner customer OR ?token=). Returns the updated reservation. 409 INVALID_TRANSITION when it is already collected / cancelled / expired, or changed concurrently.

Auth: Bearer JWT optional; token-gated.

Authorizations​

bearerAuth

Jeton client obtenu par POST /auth/login (ou /auth/register), renouvelé par POST /auth/refresh.

Type
HTTP (bearer)
or

Parameters​

Path Parameters

reservationNumber*

Human reservation number, e.g. R-7KQ2MX.

Type
string
Required

Query Parameters

token

The reservation's accessToken (32 hex). Required unless the Bearer is the owner customer's.

Type
string

Request Body​

application/json
JSON
{
  
"reason": "string"
}

Responses​

The cancelled reservation

application/json
JSON
{
  
"ok": true,
  
"data": {
  
  
"reservationId": "rsv_3f9a0c1b2d4e5f6a7b8c9d0e",
  
  
"reservationNumber": "R-7KQ2MX",
  
  
"status": "pending",
  
  
"quantity": 0,
  
  
"unitPrice": 0,
  
  
"compareAtPrice": 0,
  
  
"product": {
  
  
  
"productId": "string",
  
  
  
"variantId": "string",
  
  
  
"title": "string",
  
  
  
"variantLabel": "Noir / 42",
  
  
  
"imageUrl": "string"
  
  
},
  
  
"store": {
  
  
  
"storeId": "string",
  
  
  
"name": "string",
  
  
  
"city": "string",
  
  
  
"address": "string",
  
  
  
"phone": "string",
  
  
  
"openingHours": "string"
  
  
},
  
  
"vendor": {
  
  
  
"vendorId": "string",
  
  
  
"name": "string"
  
  
},
  
  
"customer": {
  
  
  
"firstName": "string",
  
  
  
"lastName": "string",
  
  
  
"phone": "+21622123456",
  
  
  
"email": "string"
  
  
},
  
  
"note": "string",
  
  
"expiresAt": "2024-01-01T00:00:00Z",
  
  
"createdAt": "2024-01-01T00:00:00Z",
  
  
"confirmedAt": "2024-01-01T00:00:00Z",
  
  
"readyAt": "2024-01-01T00:00:00Z",
  
  
"collectedAt": "2024-01-01T00:00:00Z",
  
  
"cancelledAt": "2024-01-01T00:00:00Z",
  
  
"accessToken": "string"
  
}
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​

Powered by VitePress OpenAPI

Tarifs : contactez-nous — contact@marketkit.ai