Cancelar Pedido
curl --request POST \
--url https://api.zenflow.com.ar/api/v1/orders/{id}/cancel \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"order_tenant_id": "<string>"
}
'import requests
url = "https://api.zenflow.com.ar/api/v1/orders/{id}/cancel"
payload = { "order_tenant_id": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({order_tenant_id: '<string>'})
};
fetch('https://api.zenflow.com.ar/api/v1/orders/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zenflow.com.ar/api/v1/orders/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'order_tenant_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zenflow.com.ar/api/v1/orders/{id}/cancel"
payload := strings.NewReader("{\n \"order_tenant_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.zenflow.com.ar/api/v1/orders/{id}/cancel")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"order_tenant_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenflow.com.ar/api/v1/orders/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_tenant_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyPedidos
Cancelar Pedido
Cancelar un pedido
POST
/
api
/
v1
/
orders
/
{id}
/
cancel
Cancelar Pedido
curl --request POST \
--url https://api.zenflow.com.ar/api/v1/orders/{id}/cancel \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"order_tenant_id": "<string>"
}
'import requests
url = "https://api.zenflow.com.ar/api/v1/orders/{id}/cancel"
payload = { "order_tenant_id": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({order_tenant_id: '<string>'})
};
fetch('https://api.zenflow.com.ar/api/v1/orders/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zenflow.com.ar/api/v1/orders/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'order_tenant_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zenflow.com.ar/api/v1/orders/{id}/cancel"
payload := strings.NewReader("{\n \"order_tenant_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.zenflow.com.ar/api/v1/orders/{id}/cancel")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"order_tenant_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenflow.com.ar/api/v1/orders/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_tenant_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyCancelar Pedido
Cancela un pedido existente.Requiere scope
write:orders.Solicitud
POST /api/v1/orders/{id}/cancel
Parámetros de Ruta
string
required
El ID del pedido o order_tenant_id
Parámetros del Body
string
Alternativa: tu ID externo del pedido
Ejemplo
curl -X POST "https://api.zenflow.com.ar/api/v1/orders/ORD-001/cancel" \
-H "X-API-Key: zenflow_live_your_key" \
-H "Content-Type: application/json"
const response = await fetch(
"https://api.zenflow.com.ar/api/v1/orders/ORD-001/cancel",
{
method: "POST",
headers: { "X-API-Key": "zenflow_live_your_key" },
}
);
import requests
response = requests.post(
'https://api.zenflow.com.ar/api/v1/orders/ORD-001/cancel',
headers={'X-API-Key': 'zenflow_live_your_key'}
)
Respuesta
{
"success": true,
"data": {
"message": "Pedido cancelado exitosamente",
"order_id": "ORD-001"
}
}
Respuestas de Error
404 No Encontrado
{
"success": false,
"error": {
"code": "not_found",
"message": "Pedido no encontrado"
}
}
400 No Se Puede Cancelar
{
"success": false,
"error": {
"code": "cancel_error",
"message": "No se puede cancelar un pedido que ya está completado"
}
}
⌘I

