ZapyFlow/API documentationopenapi.json

Orders

Orders

GET/api/orders

List the team's orders

Required scope: orders.read

ParameterInRequired
pagequeryno
limitqueryno
aiAgentIdqueryno
statusqueryno
sourcequeryno
sortqueryno
searchqueryno
dateFromqueryno
dateToqueryno
bash
curl "https://api.zapyflow.com.br/api/orders" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 200 — OK
  • 400 — Malformed request

POST/api/orders

Create an order by hand

Required scope: orders.write

Request body

FieldTypeRequiredConstraints
aiAgentIdstringyesmin 1
clientNamestringyesmin 1, max 100
clientPhonestringyesmin 8, max 24
clientEmailstringnomax 160
itemsobject[]yes≥ 1 items, ≤ 50 items
totalnumberyes≥ 0, ≤ 9999999
paymentMethod"PIX" | "CREDIT_CARD" | "DEBIT_CARD" | "CASH" | "BOLETO"no—
paymentStatus"PENDING" | "PAID"no—
addressstringnomax 200
deliveryFeenumberno≥ 0, ≤ 9999999
notesstringnomax 500
bash
curl -X POST "https://api.zapyflow.com.br/api/orders" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Responses
  • 200 — OK
  • 201 — Created
  • 400 — Malformed request

GET/api/orders/{id}

One order in detail

Required scope: orders.read

ParameterInRequired
idpathyes
bash
curl "https://api.zapyflow.com.br/api/orders/{id}" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 200 — OK
  • 404 — Not found — also returned when the resource belongs to another workspace

PATCH/api/orders/{id}

Update an order

Required scope: orders.write

ParameterInRequired
idpathyes

Request body

FieldTypeRequiredConstraints
status"AWAITING_PAYMENT" | "PREPARING" | "READY_FOR_PICKUP" | "OUT_FOR_DELIVERY" | "COMPLETED" | "CANCELLED"no—
clientNamestringnomin 1, max 100
itemsobject[]no≥ 1 items, ≤ 50 items
totalnumberno≥ 0, ≤ 9999999
paymentMethod"PIX" | "CREDIT_CARD" | "DEBIT_CARD" | "CASH" | "BOLETO"no—
paymentStatus"PENDING" | "PAID"no—
addressstringnomax 200
deliveryFeenumberno≥ 0, ≤ 9999999
notesstringnomax 500
notifyClientbooleanno—
bash
curl -X PATCH "https://api.zapyflow.com.br/api/orders/{id}" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Responses
  • 200 — OK
  • 400 — Malformed request
  • 404 — Not found — also returned when the resource belongs to another workspace
  • 409 — Conflict with the current state

DELETE/api/orders/{id}

Delete an order

Required scope: orders.write

ParameterInRequired
idpathyes
bash
curl -X DELETE "https://api.zapyflow.com.br/api/orders/{id}" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 200 — OK
  • 403 — Forbidden, or the key lacks this scope
  • 404 — Not found — also returned when the resource belongs to another workspace

GET/api/orders/overview

Order summary for the period (counts, revenue and average ticket)

Required scope: orders.read

ParameterInRequired
aiAgentIdqueryno
statusqueryno
searchqueryno
dateFromqueryno
dateToqueryno
bash
curl "https://api.zapyflow.com.br/api/orders/overview" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 200 — OK
  • 400 — Malformed request

GET/api/orders/stats

Order counts by status

Required scope: analytics.read

bash
curl "https://api.zapyflow.com.br/api/orders/stats" \
  -H "Authorization: Bearer $ZAPYFLOW_API_KEY"
Responses
  • 200 — OK