Skip to main content
PUT
https://api.zenflow.com.ar
/
api
/
v1
/
orders
/
{id}
Update Order
curl --request PUT \
  --url https://api.zenflow.com.ar/api/v1/orders/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "assembly_date": "<string>",
  "customer_name": "<string>",
  "shipping_address": "<string>",
  "state_id": 123
}
'

Update Order

Update an existing order’s details.
Requires write:orders scope.

Request

PUT /api/v1/orders/{id}

Path Parameters

id
integer
required
The order ID

Body Parameters

assembly_date
string
Updated assembly date (YYYY-MM-DD)
customer_name
string
Updated customer name
shipping_address
string
Updated shipping address
state_id
integer
New state ID

Example

curl -X PUT "https://api.zenflow.com.ar/api/v1/orders/12345" \
  -H "X-API-Key: zenflow_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "assembly_date": "2024-01-16",
    "shipping_address": "456 New Address, City"
  }'

Response

{
  "success": true,
  "data": {
    "id": 12345,
    "order_tenant_id": "ORD-001",
    "state_id": 1,
    "assembly_date": "2024-01-16",
    "customer_name": "John Doe",
    "shipping_address": "456 New Address, City",
    "updated_at": "2024-01-14T15:30:00Z"
  }
}

Error Responses

404 Not Found

{
  "success": false,
  "error": {
    "code": "not_found",
    "message": "Order not found"
  }
}

400 Bad Request

{
  "success": false,
  "error": {
    "code": "update_error",
    "message": "Cannot update order in current state"
  }
}