Tema
Cancela un pedido creado por API
POST
/orders/{ref}/cancel
Solo pedidos creados por API en pending o processing. Devuelve el stock de los
productos propios con control de stock y el cupo del compartido en los que revende; no revierte el
costo de excedente. Es idempotente: cancelar un pedido ya cancelado responde 200.
Autorizaciones
bearerAuth
API key de la florería, con formato rf_live_<prefix>_<secreto>. Se entrega una sola
vez; se envía en cada solicitud como Authorization: Bearer <key>.
Tipo
HTTP (bearer)
Parámetros
Path Parameters
ref*
Id numérico del pedido, o ext:<external_id> (solo pedidos creados por API).
Tipo
Requeridostring
Ejemplos
"70123"Respuestas
Pedido cancelado.
application/json
JSON "error": false, "order": { "id": 0, "external_id": "string", "external_url": "string", "status": { "slug": "string", "name": "string" }, "is_internal": true, "created_by_api": true, "secure_key": "string", "status_url": "string", "shipping_date": "string", "schedule_id": 0, "schedule_text": "string", "zone_id": 0, "zone_text": "string", "customer": { "name": "string", "email": "string", "phone_code": "string", "phone": "string" }, "address": { "type": "string", "name": "string", "street": "string", "street_number": "string", "more_info": "string", "phone": "string", "latitude": 0, "longitude": 0 }, "card_message": "string", "anonymous": true, "total_products": 0, "total_shipping": 0, "total_discount": 0, "total": 0, "delivered_at": "string", "created_at": "string", "updated_at": "string", "warnings": [ { "code": "string", "message": "string", "reason": "string" } ], "url_photo": "string", "photos": { "xs": "string", "md": "string", "lg": "string" }, "products": [ { "id": 0, "product_id": 0, "variant_id": 0, "shared": true, "name": "string", "quantity": 0, "price": 0, "note": "string", "options": [ { "id": 0, "name": "string", "quantity": 0, "price": 0 } ] } ], "history": [ { "status": "string", "status_name": "string", "message": "string", "created_at": "string" } ], "document_type": "string", "document": { "number": "string", "date": "string", "file_url": "string", "page_url": "string", "validation": "string" } }
{
}
POST
/orders/{ref}/cancel