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

# Acknowledge an order

> Record the order's number in your ERP. Repeating the same number is safe; a different number for an acknowledged order is refused.

Requires the `orders:write` scope.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/orders/{id}/acknowledge
openapi: 3.1.0
info:
  title: BrandGate API
  version: 1.0.0
  description: >-
    Read orders, products, stock, customers and invoices, acknowledge orders and
    set stock from your ERP. Authenticate with an organization API key or an
    OAuth access token as `Authorization: Bearer <token>`.
servers:
  - url: https://api.brandgate.dev
security:
  - apiKey: []
  - oauth2: []
tags:
  - name: orders
    description: Orders placed by resellers.
  - name: products
    description: The product catalogue.
  - name: inventory
    description: Stock levels per SKU.
  - name: customers
    description: Resellers buying from the organization.
  - name: invoices
    description: Invoices sent to resellers.
  - name: webhook_endpoints
    description: Where BrandGate sends events.
paths:
  /v1/orders/{id}/acknowledge:
    post:
      tags:
        - orders
      summary: Acknowledge an order
      description: >-
        Record the order's number in your ERP. Repeating the same number is
        safe; a different number for an acknowledged order is refused.


        Requires the `orders:write` scope.
      operationId: ordersAcknowledge
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                external_number:
                  type: string
                  minLength: 1
                  maxLength: 100
                  pattern: ^[\p{L}\p{N} ._\-/#:]+$
                note:
                  type: string
                  maxLength: 500
              required:
                - external_number
              additionalProperties: false
      responses:
        '200':
          description: Success.
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  object:
                    const: order
                  number:
                    type: string
                    maxLength: 100
                  status:
                    type: string
                    enum:
                      - draft
                      - pending_payment
                      - processing
                      - shipped
                      - delivered
                      - cancelled
                  order_date:
                    type: string
                    pattern: ^\d{4}-\d{2}-\d{2}$
                  due_date:
                    type:
                      - string
                      - 'null'
                    pattern: ^\d{4}-\d{2}-\d{2}$
                  currency:
                    type: string
                    maxLength: 3
                  total:
                    type: string
                    pattern: ^-?\d{1,15}(\.\d{1,6})?$
                  vat:
                    type: string
                    pattern: ^-?\d{1,15}(\.\d{1,6})?$
                  total_excl_vat:
                    type: string
                    pattern: ^-?\d{1,15}(\.\d{1,6})?$
                  discount_amount:
                    type: string
                    pattern: ^-?\d{1,15}(\.\d{1,6})?$
                  po_reference:
                    type:
                      - string
                      - 'null'
                    maxLength: 200
                  notes:
                    type:
                      - string
                      - 'null'
                    maxLength: 4000
                  customer:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type:
                          - string
                          - 'null'
                        maxLength: 500
                    required:
                      - id
                      - name
                    additionalProperties: false
                  ship_to:
                    type:
                      - object
                      - 'null'
                    additionalProperties: {}
                  lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        product_id:
                          type: string
                          format: uuid
                        sku:
                          type:
                            - string
                            - 'null'
                          maxLength: 200
                        name:
                          type:
                            - string
                            - 'null'
                          maxLength: 500
                        quantity:
                          type: integer
                        unit_price:
                          type: string
                          pattern: ^-?\d{1,15}(\.\d{1,6})?$
                        vat_rate:
                          type: string
                          pattern: ^-?\d{1,15}(\.\d{1,6})?$
                        line_total:
                          type: string
                          pattern: ^-?\d{1,15}(\.\d{1,6})?$
                      required:
                        - id
                        - product_id
                        - sku
                        - name
                        - quantity
                        - unit_price
                        - vat_rate
                        - line_total
                      additionalProperties: false
                  external_reference:
                    type:
                      - object
                      - 'null'
                    properties:
                      number:
                        type: string
                        maxLength: 100
                      acknowledged_at:
                        type: string
                        format: date-time
                      note:
                        type:
                          - string
                          - 'null'
                        maxLength: 500
                    required:
                      - number
                      - acknowledged_at
                      - note
                    additionalProperties: false
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                required:
                  - id
                  - object
                  - number
                  - status
                  - order_date
                  - due_date
                  - currency
                  - total
                  - vat
                  - total_excl_vat
                  - discount_amount
                  - po_reference
                  - notes
                  - customer
                  - ship_to
                  - lines
                  - external_reference
                  - created_at
                  - updated_at
                additionalProperties: false
        '400':
          description: The request is invalid. `error.message` says which field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, unknown, expired or revoked credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The credentials lack the scope this operation needs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found in your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Rate limited. Wait until `X-RateLimit-Reset` (or `Retry-After`
            seconds).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
        - oauth2:
            - orders:write
components:
  headers:
    RequestId:
      description: Quote this when contacting support.
      schema:
        type: string
        format: uuid
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            request_id:
              type: string
          required:
            - code
            - message
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An organization API key (`bg_live_…`), created in BrandGate under
        Settings → Developers.
    oauth2:
      type: oauth2
      description: >-
        For partner apps acting for many organizations. Authorization code with
        PKCE (S256).
      flows:
        authorizationCode:
          authorizationUrl: https://api.brandgate.dev/oauth/authorize
          tokenUrl: https://api.brandgate.dev/oauth/token
          refreshUrl: https://api.brandgate.dev/oauth/token
          scopes:
            orders:read: Read orders and their lines
            orders:write: Acknowledge orders with the ERP's own order number
            products:read: Read products and prices
            inventory:read: Read stock levels
            inventory:write: Update stock levels by SKU
            customers:read: Read customers (resellers), including contact details
            invoices:read: Read invoices
            webhooks:read: List webhook endpoints
            webhooks:write: Create and delete webhook endpoints

````

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