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

# Fetch all order preparations

> Fetch all order preparations



## OpenAPI

````yaml openapi.json get /v1/orderPreparations
openapi: 3.1.0
info:
  title: OneChain API
  version: 1.3.2
  x-logo:
    href: https://www.onechain-tms.com
    url: static/logo.png
servers:
  - url: localhost:8080
security: []
tags:
  - description: |-
      This API lets you fetch your data from ONECHAIN's servers.

      URL: https://api.onechain-tms.com
    name: Introduction
    x-displayName: Introduction
  - description: >-
      To safely access the resources exposed by our API, you will need to
      provide an authenticated token in your requests headers. Please reach out
      to your ONECHAIN’s Account Manager to get your token. 

        | Name of the header | Type of authentication |
        |--------------------|------------------------|
        | Authorization      | API AUTHORIZATION KEY  |

        Please note that the API authorization key must be prefixed with "Bearer "

        For example:

        `Authorization: Bearer 1234567890`
        
        
    name: Authentication
    x-displayName: Authentication
  - description: |-
      All endpoints fetching multiple items are paginated.

        Use `skip` to skip to the items you want to retrieve.

        Use `take` to define how many items you want to retrieve.

        `skip` and `take` are optional parameters.

        If you do not input them, `skip` equals to 0 and `take` equals to 10.

        Example:

        `/v1/shipments?skip=20&take=10`
        
    name: Pagination
    x-displayName: Pagination
  - name: Shipments
  - name: Purchase Orders
  - name: Documents
  - name: Locations
  - name: Invoices
  - name: Users
  - name: Reporting
  - description: <SchemaDefinition schemaRef="#/components/schemas/Shipment" />
    name: ShipmentObject
    x-displayName: ShipmentObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Tracking" />
    name: TrackingObject
    x-displayName: TrackingObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/OrderPreparation" />
    name: OrderPreparationObject
    x-displayName: OrderPreparationObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/PurchaseOrder" />
    name: PurchaseOrderObject
    x-displayName: PurchaseOrderObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/TrackingEvent" />
    name: TrackingEventObject
    x-displayName: TrackingEventObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/TrackingDate" />
    name: TrackingDateObject
    x-displayName: TrackingDateObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/TrackingStep" />
    name: TrackingStepObject
    x-displayName: TrackingStepObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Product" />
    name: ProductObject
    x-displayName: ProductObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Port" />
    name: PortObject
    x-displayName: PortObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Coordinates" />
    name: CoordinatesObject
    x-displayName: CoordinatesObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Container" />
    name: ContainerObject
    x-displayName: ContainerObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/User" />
    name: UserObject
    x-displayName: UserObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Load" />
    name: LoadObject
    x-displayName: LoadObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Document" />
    name: DocumentObject
    x-displayName: DocumentObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Invoice" />
    name: InvoiceObject
    x-displayName: InvoiceObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Location" />
    name: LocationObject
    x-displayName: LocationObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Price" />
    name: PriceObject
    x-displayName: PriceObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Quantity" />
    name: QuantityObject
    x-displayName: QuantityObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Size" />
    name: SizeObject
    x-displayName: SizeObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Volume" />
    name: VolumeObject
    x-displayName: VolumeObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Weight" />
    name: WeightObject
    x-displayName: WeightObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/SimpleDate" />
    name: SimpleDateObject
    x-displayName: SimpleDateObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/DateWithTime" />
    name: DateWithTimeObject
    x-displayName: DateWithTimeObject
paths:
  /v1/orderPreparations:
    get:
      tags:
        - Order Preparations
      summary: Fetch all order preparations
      description: Fetch all order preparations
      parameters:
        - schema:
            default: 0
            type: integer
          in: query
          name: skip
          required: false
        - schema:
            default: 10
            maximum: 100
            type: integer
          in: query
          name: take
          required: false
      responses:
        '200':
          description: Order preparations found
          content:
            application/json:
              schema:
                description: Order preparations found
                items:
                  $ref: '#/components/schemas/OrderPreparation'
                type: array
        '404':
          description: No order preparations found
          content:
            application/json:
              schema:
                description: No order preparations found
                type: object
components:
  schemas:
    OrderPreparation:
      type: object
      modelName: OrderPreparation
      properties:
        client_role_on_order:
          type: string
          description: Role of the client on this order (buyer or seller)
          enum:
            - buyer
            - seller
        commercial_invoice_ids:
          type: array
          description: List of commercial invoice IDs to include in the request
          items:
            type: string
        customer_names_for_whom_order_is_prepared:
          type: array
          description: Names of customers for whom the order is being prepared
          items:
            type: string
        external_user_ids:
          type: array
          description: IDs of external users who should have access
          items:
            type: string
        freight_method:
          type: string
          description: Mode of transportation for the shipment
          enum:
            - air
            - ocean
            - rail
            - truck
        hazardous_details:
          type: string
          description: Details about the hazardous nature of the goods in the OP
          example: UN1845 - Dry ice
        incoterm:
          type: string
          description: International commercial terms for the shipment
          enum:
            - cfr
            - cif
            - cip
            - cpt
            - dap
            - dat
            - ddp
            - dpu
            - exw
            - fas
            - fca
            - fob
        instructions:
          type: object
          description: Packaging and documentation instructions
          properties:
            origin_certification_type:
              type: string
              description: Type of origin certificate required
              enum:
                - atr
                - certificate_of_origin
                - eur1
            should_certify_commercial_invoices:
              type: boolean
              description: Whether commercial invoices need to be certified
            should_label_packages:
              type: boolean
              description: Whether packages should be labeled
            should_palletise:
              type: boolean
              description: Whether goods should be palletized
            target_pickup_date:
              $ref: '#/components/schemas/SimpleDate'
          required:
            - should_label_packages
            - should_palletise
        locations:
          type: object
          description: Warehouse and delivery locations
          properties:
            delivery_location_id:
              type: string
              description: ID of the final delivery location
            preparing_warehouse_id:
              type: string
              description: ID of the warehouse where goods will be prepared
          required:
            - preparing_warehouse_id
        name:
          type: string
          description: Name of the order preparation request
        on_behalf_of_client_id:
          type: string
          description: Client ID if creating on behalf of another client
        on_behalf_of_user_id:
          type: string
          description: User ID if creating on behalf of another user
        owner_in_charge_of_moving_goods_in_fca_export:
          type: boolean
          description: Whether the owner is responsible for moving goods in FCA export
        picking_references:
          type: array
          description: Picking references for the goods to prepare
          items:
            type: string
        refrigerated_details:
          type: string
          description: Temperature instruction details for the OP
          example: +2°C/+8°C
        total_commercial_invoice_amount:
          type: number
          description: Total amount from all commercial invoices
        total_commercial_invoice_amount_currency:
          type: string
          description: Currency of the total commercial invoice amount
          enum:
            - AED
            - AUD
            - BHD
            - BRL
            - CAD
            - CHF
            - CNY
            - EUR
            - GBP
            - HKD
            - IDR
            - INR
            - JPY
            - KRW
            - KWD
            - MXN
            - MYR
            - NZD
            - PLN
            - SEK
            - SGD
            - THB
            - TWD
            - USD
            - XOF
            - XPF
            - ZAR
    SimpleDate:
      modelName: SimpleDate
      type: string
      example: '2021-10-11'

````