Orders
Submit order validation result
Partner reports whether an order can be accepted (item availability, pricing feasibility, POS injectability).
https://api.maple.inc/v1/orders/{orderId}/validation_resultAPI keyPartner reports whether an order can be accepted (item availability, pricing feasibility, POS injectability). Echo the validation_id from the order.validation_requested event so the result is bound to that attempt — a result naming an expired/older attempt is rejected (404). A valid result lets Maple send the order notification; invalid blocks it. Results expire; Maple revalidates (a new validation_id) before final submission.
Authorization
Send your API key as Authorization: Bearer <key>: mpk_test_… against the sandbox (https://api.staging.maple.inc/v1), mpk_live_… against production. See Authentication. The samples read the key from MAPLE_KEY and the base URL from MAPLE_BASE, as set up in the Quickstart.
Parameters
orderIdstring required
Request body
application/json, required.
Option 1
-
validation_idstring required -
statusstring requiredAlways
valid. -
partner_referencestring or null -
warningsstring[] or null
Option 2
-
validation_idstring required -
statusstring requiredAlways
invalid. -
reasonobject required -
reason.codestring required -
reason.explanationstring or null -
reason.item_external_idsstring[] or null
Responses
200 OK
-
objectstring requiredAlways
order_validation. -
idstring required -
livemodeboolean required -
creatednumber required -
orderstring required -
statusstring requiredOne of
pending,valid,invalid,expired. -
expires_atnumber or null required -
partner_referencestring or null required -
reasonobject or null required -
reason.codestring required -
reason.explanationstring or null -
reason.item_external_idsstring[] or null -
warningsstring[] required
Errors
-
400Bad request -
401Unauthorized -
403Forbidden -
404Not found -
429Too many requests
Every error body names the error in _tag, explains it in message, and says where to report it in feedback. See Errors.
A 429 also sends Retry-After: Seconds to wait before retrying; also returned as retry_after in the body.