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

# Récupérer une commande d'achat

> Renvoie une commande d'achat par son identifiant.

Renvoie une commande d'achat par son identifiant.

```json Réponse theme={null}
{
  "purchaseOrdersByPk": {
    "id": 8,
    "reference": "OA-0008",
    "dueDate": "2026-08-10",
    "supplier": {
      "id": 5,
      "name": "Polymères SA"
    },
    "site": {
      "id": 1,
      "name": "Atelier Nord"
    },
    "lines": [
      {
        "id": 20,
        "quantity": 500,
        "unitPrice": 42,
        "total": 21000,
        "article": {
          "code": "MAT-PEEK",
          "name": "Granulés PEEK"
        }
      }
    ]
  }
}
```


## OpenAPI

````yaml openapi.json GET /purchase-orders/{id}
openapi: 3.0.0
info:
  title: Bonx API
  version: 1.0.0
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: https://YOUR-API-URL
        description: Your space API URL, available in Settings → API tokens.
security: []
paths:
  /purchase-orders/{id}:
    get:
      summary: Retrieve a purchase order
      parameters:
        - in: header
          name: x-api-key
          schema:
            type: string
          description: API token from your Bonx space.
        - description: _"id" is required as part of the path_
          in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  purchaseOrdersByPk:
                    nullable: true
                    properties:
                      currency:
                        nullable: true
                        properties:
                          code:
                            nullable: false
                            type: string
                        type: object
                      dueDate:
                        $ref: '#/components/schemas/date'
                      id:
                        nullable: false
                        type: integer
                      issuanceDate:
                        $ref: '#/components/schemas/date'
                      lines:
                        items:
                          nullable: false
                          properties:
                            article:
                              description: >-
                                Articles with physical reality (= manage-able in
                                stock). This table includes all article types
                                (raw materials, semi-finished, finished
                                products, consumables, etc.)
                              nullable: true
                              properties:
                                code:
                                  nullable: true
                                  type: string
                                id:
                                  nullable: false
                                  type: integer
                                name:
                                  nullable: false
                                  type: string
                                unit:
                                  nullable: true
                                  type: string
                              type: object
                            description:
                              nullable: true
                              type: string
                            id:
                              nullable: false
                              type: integer
                            quantity:
                              $ref: '#/components/schemas/numeric'
                            total:
                              $ref: '#/components/schemas/numeric'
                            unitPrice:
                              $ref: '#/components/schemas/numeric'
                          type: object
                        nullable: false
                        type: array
                      reference:
                        nullable: false
                        type: string
                      site:
                        nullable: false
                        properties:
                          id:
                            nullable: false
                            type: integer
                          name:
                            nullable: false
                            type: string
                        type: object
                      step:
                        nullable: true
                        properties:
                          id:
                            nullable: false
                            type: integer
                          name:
                            nullable: false
                            type: string
                        type: object
                      supplier:
                        description: A client or supplier organisation
                        nullable: true
                        properties:
                          id:
                            nullable: false
                            type: integer
                          name:
                            nullable: false
                            type: string
                        type: object
                    type: object
          description: Response
components:
  schemas:
    date:
      nullable: false
    numeric:
      nullable: false

````