Ir al contenido
Maple

Orders

Partner reports whether an order can be accepted (item availability, pricing feasibility, POS injectability).

Esta página aún no está disponible en tu idioma.

POSThttps://api.maple.inc/v1/orders/{orderId}/validation_resultAPI key

Partner 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

  • orderId string path required

Request body

application/json, required.

Option 1

  • validation_id string required

  • status string required

    Always valid.

  • partner_reference string or null

  • warnings string[] or null

Option 2

  • validation_id string required

  • status string required

    Always invalid.

  • reason object required

  • reason.code string required

  • reason.explanation string or null

  • reason.item_external_ids string[] or null

Responses

200 OK

  • object string required

    Always order_validation.

  • id string required

  • livemode boolean required

  • created number required

  • order string required

  • status string required

    One of pending, valid, invalid, expired.

  • expires_at number or null required

  • partner_reference string or null required

  • reason object or null required

  • reason.code string required

  • reason.explanation string or null

  • reason.item_external_ids string[] or null

  • warnings string[] required

Errors

  • 400 Bad request DeveloperApiBadRequest

  • 401 Unauthorized DeveloperApiUnauthorized

  • 403 Forbidden DeveloperApiForbidden

  • 404 Not found DeveloperApiNotFound

  • 429 Too many requests DeveloperApiRateLimited

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.