> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maple.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit order validation result

> 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.



## OpenAPI

````yaml /openapi/developer-api.json post /orders/{orderId}/validation_result
openapi: 3.1.0
info:
  title: Maple Developer API
  version: 0.0.1
  description: >-
    Public API for POS and platform partners to integrate with Maple: granted
    locations and connections, the order loop (validation, notification,
    accept/deny, status updates), payment-link visibility, menu publishing, and
    HMAC-signed webhooks. Authenticate every request with a Bearer API key
    (`mpk_test_…` / `mpk_live_…`). The credential determines the environment:
    test-mode credentials only see test data, live-mode credentials only see
    live data.
servers:
  - url: https://api.maple.inc/v1
    description: Production
  - url: https://api.staging.maple.inc/v1
    description: Sandbox (development and testing)
security: []
tags:
  - name: General
    description: Service status and credential introspection.
  - name: Locations
    description: The restaurant locations your app has been granted access to.
  - name: Connections
    description: Become (or stop being) a granted location’s order receiver.
  - name: Menu
    description: Publish and read a connected location’s menu.
  - name: Orders
    description: 'The order loop: read orders, submit validation results, and decide orders.'
  - name: Webhooks
    description: Event-type catalog, subscriptions, the event ledger, and replay.
paths:
  /orders/{orderId}/validation_result:
    post:
      tags:
        - Orders
      summary: Submit order validation result
      description: >-
        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.
      operationId: developer-api.submitOrderValidationResult
      parameters:
        - name: orderId
          in: path
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - type: object
                  properties:
                    validation_id:
                      type: string
                      allOf:
                        - pattern: ^\S[\s\S]*\S$|^\S$|^$
                        - minLength: 1
                    status:
                      type: string
                      enum:
                        - valid
                    partner_reference:
                      anyOf:
                        - type: string
                        - type: 'null'
                    warnings:
                      anyOf:
                        - type: array
                          items:
                            type: string
                        - type: 'null'
                  required:
                    - validation_id
                    - status
                  additionalProperties: false
                - type: object
                  properties:
                    validation_id:
                      type: string
                      allOf:
                        - pattern: ^\S[\s\S]*\S$|^\S$|^$
                        - minLength: 1
                    status:
                      type: string
                      enum:
                        - invalid
                    reason:
                      type: object
                      properties:
                        code:
                          type: string
                          allOf:
                            - pattern: ^\S[\s\S]*\S$|^\S$|^$
                            - minLength: 1
                        explanation:
                          anyOf:
                            - type: string
                            - type: 'null'
                        item_external_ids:
                          anyOf:
                            - type: array
                              items:
                                type: string
                            - type: 'null'
                      required:
                        - code
                      additionalProperties: false
                  required:
                    - validation_id
                    - status
                    - reason
                  additionalProperties: false
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                      - order_validation
                  id:
                    type: string
                  livemode:
                    type: boolean
                  created:
                    anyOf:
                      - anyOf:
                          - type: number
                          - type: string
                            enum:
                              - NaN
                          - type: string
                            enum:
                              - Infinity
                          - type: string
                            enum:
                              - '-Infinity'
                      - type: string
                        enum:
                          - Infinity
                          - '-Infinity'
                          - NaN
                  order:
                    type: string
                  status:
                    type: string
                    enum:
                      - pending
                      - valid
                      - invalid
                      - expired
                  expires_at:
                    anyOf:
                      - anyOf:
                          - anyOf:
                              - type: number
                              - type: string
                                enum:
                                  - NaN
                              - type: string
                                enum:
                                  - Infinity
                              - type: string
                                enum:
                                  - '-Infinity'
                          - type: string
                            enum:
                              - Infinity
                              - '-Infinity'
                              - NaN
                      - type: 'null'
                  partner_reference:
                    anyOf:
                      - type: string
                      - type: 'null'
                  reason:
                    anyOf:
                      - type: object
                        properties:
                          code:
                            type: string
                            allOf:
                              - pattern: ^\S[\s\S]*\S$|^\S$|^$
                              - minLength: 1
                          explanation:
                            anyOf:
                              - type: string
                              - type: 'null'
                          item_external_ids:
                            anyOf:
                              - type: array
                                items:
                                  type: string
                              - type: 'null'
                        required:
                          - code
                        additionalProperties: false
                      - type: 'null'
                  warnings:
                    type: array
                    items:
                      type: string
                required:
                  - object
                  - id
                  - livemode
                  - created
                  - order
                  - status
                  - expires_at
                  - partner_reference
                  - reason
                  - warnings
                additionalProperties: false
        '401':
          description: DeveloperApiUnauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeveloperApiUnauthorized'
        '403':
          description: DeveloperApiForbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeveloperApiForbidden'
        '404':
          description: DeveloperApiNotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeveloperApiNotFound'
      security:
        - bearer: []
components:
  schemas:
    DeveloperApiUnauthorized:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - DeveloperApiUnauthorized
        message:
          type: string
      required:
        - _tag
        - message
      additionalProperties: false
    DeveloperApiForbidden:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - DeveloperApiForbidden
        code:
          type: string
          enum:
            - insufficient_scope
            - wrong_environment
        message:
          type: string
      required:
        - _tag
        - code
        - message
      additionalProperties: false
    DeveloperApiNotFound:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - DeveloperApiNotFound
        message:
          type: string
      required:
        - _tag
        - message
      additionalProperties: false
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        API key — `mpk_test_…` for the sandbox, `mpk_live_…` for production.
        Issued by Maple during partner onboarding.

````