Appearance
ERP hand-off
API reference
Trigger the send of a reviewed order to your ERP receive endpoint. The contract of that endpoint is under Outbound: webhooks. Guide: Sending to the ERP.
Send an order to the ERP receive endpoint
POST/erp/send/{request_id}integration key
Hands a reviewed order to your ERP by calling the receive endpoint configured for the tenant (see webhooks → erpReceiveOrder). The call is synchronous: AIOTIC waits for your response (timeout configurable, default 30 s) and returns its outcome.
- Only orders in
PROCESSED,MODIFIEDorATTENTIONcan be sent. Sending anATTENTIONorder is an explicit override of the review flag. - The order is atomically locked (
SENDING) — concurrent sends of the same order get409. On success the status becomesSENTanderp_refis stored. - On any failure the status rolls back to what it was, so the send can be retried.
- Operator corrections made in the AIOTIC app are merged into the payload before it leaves AIOTIC.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
request_id | path | string | yes | The order's id (UUID) as returned by the upload endpoints |
Responses
| Status | Description | Body |
|---|---|---|
200 | Your ERP accepted the order | ErpSendResponse |
400 | Invalid request (malformed UUID, unsupported file, …) | ErrorResponse |
401 | Missing or invalid API key | ErrorResponse |
404 | Resource not found | ErrorResponse |
409 | Order is not in a sendable status, or another send is in progress | ErrorResponse |
422 | Your ERP answered success: false; detail carries your error text | ErrorResponse |
500 | Your ERP returned a non-JSON body, timed out or was unreachable (status rolled back) | ErrorResponse |
503 | No ERP endpoint configured for this tenant | ErrorResponse |
bash
curl -X POST "https://acme.aiotic.ai/erp/send/<request_id>" -H "X-API-Key: $AIOTIC_API_KEY"python
from aiotic import AioticErpRejectedError
try:
res = client.erp.send(request_id) # res.erp_order_number
except AioticErpRejectedError as e:
print(e.erp_error) # your endpoint's error textjson
{
"success": true,
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"data": {
"success": true,
"order_number": "SO-2026-00981"
}
}