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

# A submitted order

> What became of a submission: `received` (still processing; poll again), `accepted` with its order, or `refused` with the problem. A submission that does not exist, or belongs to another account or environment, is `404 not_found`.



## OpenAPI

````yaml /api/partners/openapi.json get /api/partners/v1/order-submissions/{submissionId}
openapi: 3.1.0
info:
  title: DEKHQ Partner REST API
  version: 1.0.0
  description: >-
    JSON versions of the PromoStandards Order Status and Order Shipment
    Notification services, and the partner order API. Same credentials, scopes
    and rate limit as the SOAP endpoints. Generated from the dekhq repo; do not
    edit by hand.
servers:
  - url: https://partners.dekhq.com
security:
  - basicAuth: []
paths:
  /api/partners/v1/order-submissions/{submissionId}:
    get:
      summary: A submitted order
      description: >-
        What became of a submission: `received` (still processing; poll again),
        `accepted` with its order, or `refused` with the problem. A submission
        that does not exist, or belongs to another account or environment, is
        `404 not_found`.
      operationId: getOrderSubmission
      parameters:
        - name: submissionId
          in: path
          required: true
          description: The submission id.
          schema:
            type: string
            pattern: ^sub_[A-Za-z0-9]{1,64}$
      responses:
        '200':
          description: Success.
          headers:
            X-Request-Id:
              description: Id of this call. Quote it when you contact us.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderSubmission'
              example:
                submissionId: sub_4f8c2a7e9b1d3f5a7c9e1b3d5f7a9c1e
                status: accepted
                order:
                  orderId: ord_0123456789abcdef0123456789
                  orderNumber: '00058817'
                  status: pending_approval
        '202':
          description: Still processing (`received`). Poll again.
          headers:
            X-Request-Id:
              description: Id of this call. Quote it when you contact us.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderSubmission'
        '400':
          description: >-
            A query parameter or body field is missing or invalid. `errors[]`
            lists each field.
          headers:
            X-Request-Id:
              description: Id of this call. Quote it when you contact us.
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://docs.dekhq.com/api/partners/errors#invalid_request
                title: Invalid request
                status: 400
                detail: >-
                  A query parameter or body field is missing or invalid.
                  `errors[]` lists each field.
                code: invalid_request
                requestId: req_0123456789abcdef
        '401':
          description: Missing or invalid credentials.
          headers:
            X-Request-Id:
              description: Id of this call. Quote it when you contact us.
              schema:
                type: string
            WWW-Authenticate:
              description: Basic realm="DEKHQ Partner API"
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://docs.dekhq.com/api/partners/errors#unauthenticated
                title: Unauthenticated
                status: 401
                detail: Missing or invalid credentials.
                code: unauthenticated
                requestId: req_0123456789abcdef
        '403':
          description: Your credential is not enabled for the scope this endpoint needs.
          headers:
            X-Request-Id:
              description: Id of this call. Quote it when you contact us.
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://docs.dekhq.com/api/partners/errors#forbidden
                title: Forbidden
                status: 403
                detail: >-
                  Your credential is not enabled for the scope this endpoint
                  needs.
                code: forbidden
                requestId: req_0123456789abcdef
        '404':
          description: >-
            No such resource for your credential: it does not exist, or it
            belongs to a client your credential is not linked to.
          headers:
            X-Request-Id:
              description: Id of this call. Quote it when you contact us.
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://docs.dekhq.com/api/partners/errors#not_found
                title: Not found
                status: 404
                detail: >-
                  No such resource for your credential: it does not exist, or it
                  belongs to a client your credential is not linked to.
                code: not_found
                requestId: req_0123456789abcdef
        '429':
          description: More than the allowed requests per minute.
          headers:
            X-Request-Id:
              description: Id of this call. Quote it when you contact us.
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://docs.dekhq.com/api/partners/errors#rate_limited
                title: Rate limited
                status: 429
                detail: More than the allowed requests per minute.
                code: rate_limited
                requestId: req_0123456789abcdef
        '500':
          description: An unexpected error on our side. It is logged; retry later.
          headers:
            X-Request-Id:
              description: Id of this call. Quote it when you contact us.
              schema:
                type: string
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://docs.dekhq.com/api/partners/errors#internal
                title: Internal error
                status: 500
                detail: An unexpected error on our side. It is logged; retry later.
                code: internal
                requestId: req_0123456789abcdef
components:
  schemas:
    OrderSubmission:
      oneOf:
        - type: object
          properties:
            submissionId:
              type: string
              pattern: ^sub_[A-Za-z0-9]{1,64}$
              description: The submission id.
            status:
              type: string
              const: accepted
            order:
              type: object
              properties:
                orderId:
                  type: string
                  pattern: ^ord_[A-Za-z0-9]{1,64}$
                  description: >-
                    The order id, e.g. `ord_22699286ac3294327ea813dd8d`. Stable
                    for the life of the order.
                orderNumber:
                  description: Our order number, once assigned.
                  type:
                    - string
                    - 'null'
                status:
                  $ref: '#/components/schemas/OrderStatus'
              required:
                - orderId
                - orderNumber
                - status
              additionalProperties: false
          required:
            - submissionId
            - status
            - order
          additionalProperties: false
        - type: object
          properties:
            submissionId:
              type: string
              pattern: ^sub_[A-Za-z0-9]{1,64}$
              description: The submission id.
            status:
              type: string
              const: refused
            problem:
              $ref: '#/components/schemas/Problem'
          required:
            - submissionId
            - status
            - problem
          additionalProperties: false
        - type: object
          properties:
            submissionId:
              type: string
              pattern: ^sub_[A-Za-z0-9]{1,64}$
              description: The submission id.
            status:
              type: string
              const: received
          required:
            - submissionId
            - status
          additionalProperties: false
      description: >-
        A submitted order and what became of it. `received` means it is still
        being processed: poll it.
    Problem:
      type: object
      properties:
        type:
          type: string
          description: URI of the docs entry for this error code.
        title:
          type: string
          description: Short summary of the error code; the same for every occurrence.
        status:
          type: integer
          description: The HTTP status code.
        detail:
          type: string
          description: What went wrong in this request.
        code:
          type: string
          enum:
            - forbidden
            - idempotency_conflict
            - internal
            - invalid_request
            - not_found
            - order_refused
            - payload_too_large
            - rate_limited
            - unauthenticated
            - upload_refused
          description: Stable, machine-readable error code.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ProblemFieldError'
          description: The rejected fields, for `invalid_request` and `order_refused`.
        currentTotal:
          type: string
          pattern: ^\d{1,10}\.\d{2}$
          description: >-
            With `order_refused` and a `total_changed` field error: the order's
            current total in US dollars, e.g. `1234.50`. Send it back as
            `expectedTotal` once you accept it.
        requestId:
          type: string
          description: >-
            The X-Request-Id of the call that produced this problem. Quote it
            when you contact us. A submission's stored refusal, replayed for its
            Idempotency-Key or a poll, keeps the id of the call that refused it.
      required:
        - type
        - title
        - status
        - detail
        - code
        - requestId
      additionalProperties: false
      description: An RFC 9457 problem (application/problem+json).
    OrderStatus:
      type: string
      enum:
        - draft
        - pending_approval
        - approved
        - in_production
        - shipped
        - delivered
        - cancelled
      description: >-
        Where the order is. `shipped` and `delivered` are distinct; `cancelled`
        is final.
    ProblemFieldError:
      type: object
      properties:
        field:
          type: string
          description: >-
            Dotted path of the field, e.g. `lines.0.quantity`, or the query
            parameter name.
        code:
          type: string
          description: >-
            Why the field was rejected, e.g. `invalid_type`, `too_small`,
            `unrecognized_keys`, `not_supported_yet`, `total_changed`.
      required:
        - field
        - code
      additionalProperties: false
      description: One rejected field.
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Your DEKHQ partner `id` and `password`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.