:::open-api-operation
---
operation:
  kind: webhook
  method: post
  path: consignmentChanged
  summary: A consignment changed
  deprecated: false
  requestBody:
    required: false
    content:
      - type: application/json
        schema:
          name: Consignment
          ref: "#/components/schemas/Consignment"
          types:
            - object
          description: One consignment, as the API sees it.
          properties:
            - name: id
              required: true
              schema:
                types:
                  - string
                format: uuid
                readOnly: true
            - name: reference
              required: true
              schema:
                types:
                  - string
                constraints:
                  minLength: 1
                  maxLength: 120
            - name: status
              required: true
              schema:
                name: ConsignmentStatus
                ref: "#/components/schemas/ConsignmentStatus"
                types:
                  - string
                description: Where a consignment has got to.
                enum:
                  - booked
                  - loading
                  - sailing
                  - landed
                  - cancelled
            - name: createdAt
              required: false
              schema:
                types:
                  - string
                format: date-time
                readOnly: true
            - name: parent
              required: false
              schema:
                ref: "#/components/schemas/Consignment"
                name: Consignment
                circular: true
            - name: tags
              required: false
              schema:
                types:
                  - array
                constraints:
                  uniqueItems: true
                items:
                  types:
                    - string
            - name: metadata
              required: false
              schema:
                types:
                  - object
                additionalProperties:
                  types:
                    - string
  responses:
    - status: "200"
      description: Acknowledged.
servers:
  - url: https://api.example.org/{stage}
    description: The invented production host.
    variables:
      - name: stage
        default: v3
        enum:
          - v1
          - v2
          - v3
        description: Which line of the API to talk to.
  - url: http://localhost:8080
    description: A local process, for trying things out.
security:
  - - key: apiKey
      scheme:
        key: apiKey
        type: apiKey
        description: A key from the account page.
        name: X-Api-Key
        in: header
  - - key: bearer
      scheme:
        key: bearer
        type: http
        description: A token obtained from the authorisation server.
        scheme: bearer
        example: demo-token
        bearerFormat: JWT
securitySchemes:
  - key: apiKey
    type: apiKey
    description: A key from the account page.
    name: X-Api-Key
    in: header
  - key: bearer
    type: http
    description: A token obtained from the authorisation server.
    scheme: bearer
    example: demo-token
    bearerFormat: JWT
  - key: oauth
    type: oauth2
    description: For applications acting on someone else's behalf.
    flows:
      - name: authorizationCode
        authorizationUrl: https://auth.example.org/authorize
        tokenUrl: https://auth.example.org/token
        scopes:
          - name: consignments:read
            description: Read consignments
          - name: consignments:write
            description: Book and change consignments
---
Sent to the address registered for your account whenever a consignment
you can see changes. Answer with any 2xx.
:::