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

# Your orders

> Every order for the clients your credential is linked to, a page at a time. Follow `nextCursor` until it is `null`. Pages follow a fixed order, so no order appears twice in one pass; an order placed while you page can fall before your cursor and appear on your next pass.



## OpenAPI

````yaml /api/partners/openapi.json get /api/partners/v1/orders
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/orders:
    get:
      summary: Your orders
      description: >-
        Every order for the clients your credential is linked to, a page at a
        time. Follow `nextCursor` until it is `null`. Pages follow a fixed
        order, so no order appears twice in one pass; an order placed while you
        page can fall before your cursor and appear on your next pass.
      operationId: listOrders
      parameters:
        - name: cursor
          in: query
          required: false
          description: The `nextCursor` from the previous page. Omit it for the first page.
          schema:
            type: string
            minLength: 1
            maxLength: 200
        - name: limit
          in: query
          required: false
          description: Orders per page, 1 to 100. Without it a page holds 100.
          schema:
            type: string
            pattern: ^(?:100|[1-9][0-9]?)$
      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:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      $ref: '#/components/schemas/Order'
                    description: One page of your orders, in a fixed order.
                  nextCursor:
                    description: >-
                      Pass as `cursor` to get the next page; `null` on the last
                      page.
                    type:
                      - string
                      - 'null'
                required:
                  - orders
                  - nextCursor
                additionalProperties: false
              example:
                orders:
                  - orderId: ord_0123456789abcdef0123456789
                    orderNumber: '00058817'
                    purchaseOrderNumber: PO-10042
                    status: in_production
                    open: true
                    onHold: false
                    createdAt: '2026-02-02T15:30:00.000Z'
                    requestedDeliveryDate: '2026-02-16T00:00:00.000Z'
                    shipTo:
                      address1: 200 Sample St
                      address2: Suite 300
                      city: Riverton
                      region: WY
                      postalCode: '82501'
                      country: US
                nextCursor: null
        '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
        '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:
    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: The DEKHQ order number shown on documents, e.g. `00066077`.
          type:
            - string
            - 'null'
        purchaseOrderNumber:
          description: >-
            Your purchase order number, as your own system holds it. `null` when
            no PO is on file.
          type:
            - string
            - 'null'
        status:
          $ref: '#/components/schemas/OrderStatus'
        open:
          type: boolean
          description: True until the order is shipped, delivered or cancelled.
        onHold:
          type: boolean
          description: True while the order is on hold before it ships.
        createdAt:
          type: string
          format: date-time
          description: When the order was placed.
        requestedDeliveryDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: The in-hands date you asked for, if any.
        shipTo:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
          description: >-
            Where the order ships. `null` when the order has no single ship-to
            address: it ships to several destinations (each shipment lists its
            own), it is picked up, or no complete ship-to address is on file
            yet. Where it ships from is on each shipment, not the order.
      required:
        - orderId
        - orderNumber
        - purchaseOrderNumber
        - status
        - open
        - onHold
        - createdAt
        - requestedDeliveryDate
        - shipTo
      additionalProperties: false
      description: One of your orders.
    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.
    Address:
      type: object
      properties:
        address1:
          type: string
          description: Address line 1.
        address2:
          type: string
          description: Address line 2.
        city:
          type: string
          description: City.
        region:
          type: string
          description: State or province code, e.g. `OH`.
        postalCode:
          type: string
          description: ZIP or postal code.
        country:
          type: string
          pattern: ^[A-Z]{2}$
          description: ISO 3166-1 alpha-2 country code, e.g. `US`.
      required:
        - address1
        - city
        - region
        - postalCode
        - country
      additionalProperties: false
      description: A postal address.
    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.