Saltar al contenido
Guías
PedidosBorradores de pedido
draft:update

Cancelar borrador de pedido

POST/v1/order-drafts/{draftId}/cancel

Cancelar borrador de pedido. Una solicitud exitosa devuelve HTTP 200 con el cuerpo de respuesta documentado.

Autorización

bearerAuth
AutorizaciónBearer <token>

Token de acceso OAuth 2.0 emitido por Ecomiq Auth.

Ubicación: header

Parámetros de ruta

draftId*string

Identificador del borrador de pedido.

Parámetros de cabecera

x-Store-Id?string

Tienda sobre la que actúa la solicitud. No hace falta cuando el token ya está vinculado a una tienda.

Authorization*string

Token bearer OAuth 2.0.

Cuerpo de la solicitud

application/json

Definiciones TypeScript

Usa esta definición en TypeScript.

Cuerpo de la respuesta

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/v1/order-drafts/7204558912004325301/cancel" \  -H "x-Store-Id: <store-id>" \  -H "Authorization: Bearer <token>" \  -H "Content-Type: application/json" \  -d '{    "reason": "Example note."  }'
{  "id": "7204558912004325301",  "storeId": "7204558912004325301",  "customerId": "7204558912004325301",  "cartId": "7204558912004325301",  "draftNumber": "example",  "currencyCode": "PEN",  "source": "example",  "notes": "Example note.",  "email": "andrea@example.com",  "phone": "+51987654321",  "firstName": "Andrea",  "lastName": "Ramos",  "identificationType": "example",  "identificationNumber": "example",  "entityTaxId": "7204558912004325301",  "entityName": "Comercial Lima SAC",  "status": "draft",  "draftDate": "2026-08-01T15:30:00Z",  "sentAt": "2026-08-01T15:30:00Z",  "viewedAt": "2026-08-01T15:30:00Z",  "acceptedAt": "2026-08-01T15:30:00Z",  "rejectedAt": "2026-08-01T15:30:00Z",  "expiredAt": "2026-08-01T15:30:00Z",  "cancelledAt": "2026-08-01T15:30:00Z",  "convertedAt": "2026-08-01T15:30:00Z",  "shareToken": "replace_with_the_issued_token",  "shareExpiresAt": "2026-08-01T15:30:00Z",  "allowAnonymousShareAccess": false,  "sharedAt": "2026-08-01T15:30:00Z",  "billingAddress": {    "address1": "example",    "city": "example",    "countryCode": "PE",    "name": "Example resource",    "company": "example",    "address2": "example",    "province": "example",    "postalCode": "example_code"  },  "shippingAddress": {    "address1": "example",    "city": "example",    "countryCode": "PE",    "name": "Example resource",    "company": "example",    "address2": "example",    "province": "example",    "postalCode": "example_code"  },  "metadata": {},  "subTotal": 1,  "discount": 1,  "shipping": 1,  "tax": 1,  "warranty": 1,  "total": 1,  "paymentMethod": "example",  "paymentCode": "example_code",  "items": [    {      "id": "7204558912004325301",      "productId": "7204558912004325301",      "sellerId": "7204558912004325301",      "shippingProfileId": "7204558912004325301",      "variantId": "7204558912004325301",      "title": "Example title",      "subtitle": "Example title",      "thumbnail": "example",      "quantity": 1,      "unitPrice": 1,      "subTotal": 1,      "discount": 1,      "shipping": 1,      "tax": 1,      "warranty": 1,      "total": 1,      "requiresShipping": false,      "isTaxInclusive": false,      "metadata": {}    }  ],  "shippingMethods": [    {      "id": "7204558912004325301",      "name": "Example resource",      "description": "Example description.",      "subtotal": 1,      "discountTotal": 1,      "taxTotal": 1,      "total": 1,      "isTaxInclusive": false,      "sellerId": "7204558912004325301",      "shippingProfileId": "7204558912004325301",      "shippingMethodId": "7204558912004325301",      "connectionId": "7204558912004325301",      "providerName": "Example resource",      "trackingCode": "example_code",      "estimatedDays": 1,      "zoneCode": "example_code",      "locationId": "7204558912004325301",      "pickupPointId": "7204558912004325301",      "scheduledDate": "2026-08-01",      "scheduledTime": "09:00:00Z",      "data": {}    }  ],  "createdOn": "2026-08-01T15:30:00Z",  "updatedOn": "2026-08-01T15:30:00Z"}