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

# Create a new delivery note



## OpenAPI

````yaml openapi.json post /delivery-notes
openapi: 3.1.0
info:
  title: Pink Platform
  version: 0.0.1
servers:
  - url: http://localhost/api
security: []
paths:
  /delivery-notes:
    post:
      tags:
        - DeliveryNote
      summary: Create a new delivery note
      operationId: delivery-notes.create
      requestBody:
        description: '`DeliveryNote`'
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeliveryNote'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Delivery note created successfully
                  '':
                    type: string
                  transmission_id:
                    type: string
                required:
                  - message
                  - null
                  - transmission_id
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid request data
                  errors:
                    type: string
                required:
                  - error
                  - errors
components:
  schemas:
    DeliveryNote:
      type: object
      properties:
        identification:
          $ref: '#/components/schemas/DeliveryNoteIdentification'
        issue_date:
          type: string
          format: date-time
        delivery_date:
          type: string
          format: date-time
        lines:
          type: array
          items:
            $ref: '#/components/schemas/DeliveryNoteLine'
        references:
          type: array
          description: Document references
          items:
            $ref: '#/components/schemas/DeliveryNoteReferenceIdentification'
      required:
        - identification
        - issue_date
        - delivery_date
        - lines
      title: DeliveryNote
    DeliveryNoteIdentification:
      type: object
      properties:
        pink_id:
          type: string
          description: Internal platform UUID
        seller_delivery_note_id:
          type: string
          description: Delivery note number from the source system
        seller:
          $ref: '#/components/schemas/PartnerIdentification'
          description: Seller identification
        buyer:
          $ref: '#/components/schemas/PartnerIdentification'
          description: Buyer identification
      required:
        - seller
        - buyer
      title: DeliveryNoteIdentification
    DeliveryNoteLine:
      type: object
      properties:
        line_number:
          type: string
        product_id:
          type: string
        product_name:
          type: string
        quantity:
          type: number
        unit:
          $ref: '#/components/schemas/Unit'
        batch_number:
          type: string
        expiry_date:
          type: string
          format: date-time
        origin:
          $ref: '#/components/schemas/Origin'
      required:
        - line_number
        - product_name
        - quantity
        - unit
      title: DeliveryNoteLine
    DeliveryNoteReferenceIdentification:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DocumentType'
        seller_document_id:
          type: string
        pink_id:
          type: string
      required:
        - type
        - seller_document_id
      title: DeliveryNoteReferenceIdentification
    PartnerIdentification:
      type: object
      properties:
        pink_id:
          type: string
          description: Internal platform UUID
        gln:
          type: string
          description: Global Location Number (GLN)
      title: PartnerIdentification
    Unit:
      type: string
      enum:
        - pc
        - box
        - ctn
        - plt
        - pack
        - bundle
        - kg
        - g
        - mg
        - t
        - l
        - ml
        - m3
      title: Unit
    Origin:
      type: object
      properties:
        generic:
          type: string
          description: Generic origin of the product
        detailed_meat:
          $ref: '#/components/schemas/DetailedMeatOrigin'
          description: Detailed meat origin information
      title: Origin
    DocumentType:
      type: string
      enum:
        - DELIVERY_NOTE
        - ORDER
      title: DocumentType
    DetailedMeatOrigin:
      type: object
      properties:
        born:
          $ref: '#/components/schemas/Region'
          description: Region where the animal was born
        rearing:
          $ref: '#/components/schemas/Region'
          description: Region where the animal was reared
        slaughter:
          $ref: '#/components/schemas/Region'
          description: Region where the animal was slaughtered
        cutting:
          $ref: '#/components/schemas/Region'
          description: Region where the meat was cut
      required:
        - born
        - rearing
        - slaughter
        - cutting
      title: DetailedMeatOrigin
    Region:
      type: string
      enum:
        - NOT_EU
        - EU
        - DK
        - EE
        - FI
        - IS
        - IE
        - LV
        - LT
        - 'NO'
        - SE
        - GB
        - AT
        - BE
        - FR
        - DE
        - LI
        - LU
        - MC
        - NL
        - CH
        - BY
        - BG
        - CZ
        - HU
        - MD
        - PL
        - RO
        - RU
        - SK
        - UA
        - AL
        - AD
        - BA
        - HR
        - CY
        - GI
        - GR
        - VA
        - IT
        - MT
        - ME
        - MK
        - PT
        - SM
        - RS
        - SI
        - ES
        - AX
        - FO
        - GG
        - IM
        - JE
        - SJ
        - AT-1
        - AT-2
        - AT-3
        - AT-4
        - AT-5
        - AT-6
        - AT-7
        - AT-8
        - AT-9
        - DE-BW
        - DE-BY
        - DE-BE
        - DE-BB
        - DE-HB
        - DE-HH
        - DE-HE
        - DE-MV
        - DE-NI
        - DE-NW
        - DE-RP
        - DE-SL
        - DE-SN
        - DE-ST
        - DE-SH
        - DE-TH
      title: Region
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message

````