Upsert Order
Insert or update an order in Prophet 21 and optionally fetch validation status.
Operation
Section titled “Operation”upsertOrder
Resource
Section titled “Resource”order
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Order | JSON | Yes | - | Order object to send to P21 (e.g. from webhook payload) |
| Upsert Path | string | No | /uiserver0/api/v2/transaction | Endpoint path for upsert operation |
| Fetch Status for v2 Orders | boolean | No | true | Fetch order header for validation status on success (v2 orders only) |
| Status View Path | string | No | /uiserver0/odataservice/odata/view/datalytics_view_combined_order_header | Endpoint path for order header status |
| Include Raw Responses | boolean | No | true | Attach raw responses alongside normalized output |
Additional Options
Section titled “Additional Options”| Option | Type | Default | Description |
|---|---|---|---|
| Debug | boolean | false | Output debug information including API URLs and request bodies |
Response
Section titled “Response”Success
Section titled “Success”{ "version": "v2", "data": { "order_no": "12345", "validation_status": "validated" }, "raw": { "insert": {}, "status": {} }}{ "version": "v2", "data": { "errors": [] }, "raw": { "insert": {}, "status": null }}Error Handling
Section titled “Error Handling”- Missing Order Object: Order object is required
- Validation Errors: Returned in the errors array
- Debug Mode: When enabled, returns error details with debug info instead of throwing