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

# Create Order

> Create a new order



## OpenAPI

````yaml /openapi.json post /api/v1/orders/create
openapi: 3.0.0
info:
  title: Authentication API
  description: API for user authentication and token generation
  version: 1.0.0
servers:
  - url: https://api.retailreadyai.com
    description: Production server
  - url: https://stg.retailreadyai.com
    description: Staging server
security: []
paths:
  /api/v1/orders/create:
    post:
      tags:
        - Orders
      summary: Create Order
      description: Create a new order
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                po_number:
                  type: string
                  description: Purchase order number
                  example: some-po-number
                picksheet_code:
                  type: string
                  description: Picksheet Code/Warehouse Order Number
                  example: some-picksheet-code
                external_order_id:
                  type: string
                  description: External Order ID
                  example: some-external-order-id
                brand_id:
                  type: string
                  format: uuid
                  description: UUID of the brand
                  example: 14e517b3-5091-4748-8a25-c497aec2ce98
                retailer_id:
                  type: string
                  format: uuid
                  description: UUID of the retailer
                  example: 14e517b3-5091-4748-8a25-c497aec2ce98
                facility_id:
                  type: string
                  format: uuid
                  description: UUID of the facility
                  example: 14e517b3-5091-4748-8a25-c497aec2ce9z
                dept_number:
                  type: string
                  description: >-
                    Department number. Required for Nordstrom, Walmart, TJX, Von
                    Maur, DICK's Sporting Goods, Macy's, Dillard's, and
                    Bloomingdales.
                  example: '123456'
                purchase_order_type:
                  type: string
                  description: >-
                    Type of purchase order. Required for Walmart, TJX,
                    SaksOffFifth.com, Saks Off Fifth Store, DICK's Sporting
                    Goods, Macy's Store, Macy's.com, and Bloomingdales
                  example: Test Department
                transportation_method:
                  type: string
                  description: Method of transportation
                  example: FREIGHT
                carrier:
                  type: string
                  description: Carrier
                  example: Fedex Freight
                service_method:
                  type: string
                  description: Service Method
                  enum:
                    - ups_ground
                    - fedex_ground
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      sku:
                        type: string
                        description: Stock Keeping Unit
                        example: pillow-sku
                      upc:
                        type: string
                        description: Universal Product Code
                        example: pillow-upc
                      quantity:
                        type: integer
                        description: Quantity of items
                        example: 5
                      case_pack_quantity:
                        type: integer
                        description: Number of items per case
                        example: 5
                      case_barcode:
                        type: string
                        description: Barcode for the case
                        example: pillow-case-upc
                      vendor_pn:
                        type: string
                        description: >-
                          Vendor part number. Required for Dillard's, Target,
                          ULTA, and DICK's Sporting Goods.
                        example: vendor-part-number
                      description:
                        type: string
                        description: Product description
                        example: soft pillows
                    required:
                      - sku
                dates:
                  type: object
                  properties:
                    requested_delivery_date:
                      type: string
                      format: date
                      example: '2024-08-15'
                    earliest_delivery_date:
                      type: string
                      format: date
                      example: '2024-08-10'
                    latest_delivery_date:
                      type: string
                      format: date
                      example: '2024-08-20'
                    earliest_ship_date:
                      type: string
                      format: date
                      example: '2024-08-05'
                      description: Required for TJX and Ross.
                    latest_ship_date:
                      type: string
                      format: date
                      example: '2024-08-12'
                      description: Required for Dillard's and Ross.
                    cancel_by_date:
                      type: string
                      format: date
                      example: '2024-08-25'
                    requested_ship_date:
                      type: string
                      format: date
                      example: '2024-08-08'
                    stage_by:
                      type: string
                      format: date
                      example: '2024-08-01'
                address_data:
                  type: object
                  properties:
                    bill_to_contact:
                      description: Required for Bloomingdales, Macy's Store, and Macy's.com
                      type: object
                      properties:
                        name:
                          type: string
                          description: >-
                            Contact Name. Required for Bloomingdales, Macy's
                            Store, and Macy's.com
                        address_line1:
                          type: string
                          description: >-
                            Street Address. Required for Bloomingdales, Macy's
                            Store, and Macy's.com
                        address_line2:
                          type: string
                          nullable: true
                          description: Address Line 2
                        city:
                          type: string
                          description: >-
                            City Name. Required for Bloomingdales, Macy's Store,
                            and Macy's.com
                        province:
                          type: string
                          description: >-
                            Province. Required for Bloomingdales, Macy's Store,
                            and Macy's.com
                        country:
                          type: string
                          description: Country. Required for Macy's Store and Macy's.com
                        zip:
                          type: string
                          description: >-
                            Postal Code. Required for Bloomingdales, Macy's
                            Store, and Macy's.com
                        facility_code:
                          type: string
                          description: Facility Code
                        address_number:
                          type: string
                          description: Address Number
                    ship_to_contact:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Contact Name
                        address_line1:
                          type: string
                          description: Street Address
                        address_line2:
                          type: string
                          nullable: true
                          description: Address Line 2. Required for Dillard's.
                        city:
                          type: string
                          description: City Name
                        province:
                          type: string
                          description: Province
                        country:
                          type: string
                          description: Country
                        zip:
                          type: string
                          description: Postal Code
                        facility_code:
                          type: string
                          description: Facility Code
                        dc_number:
                          type: string
                          description: >-
                            DC number. Required for Chewy's, Vitamin Shoppe,
                            Tractor Supply Co., CVS, UNFI, ULTA, Nordstrom,
                            Walmart, TJX, Saks Fifth Avenue Store, Saks.com,
                            SaksOffFifth.com, Saks Off Fifth Store, Von Maur,
                            DICK's Sporting Goods, Macy's, and Dillards.
                      required:
                        - name
                        - address_line1
                        - city
                        - province
                        - country
                        - zip
                    mark_for_contact:
                      type: object
                      description: >-
                        Required for Saks Fifth Avenue Store, Saks.com,
                        SaksOffFifth.com, Saks Off Fifth Store, Bloomingdales,
                        and Dillards.
                      properties:
                        name:
                          type: string
                          description: Contact Name
                        address_line1:
                          type: string
                          description: Street Address
                        address_line2:
                          type: string
                          nullable: true
                          description: Address Line 2
                        city:
                          type: string
                          description: City Name
                        state:
                          type: string
                          description: State
                        country:
                          type: string
                          description: Country
                        zip:
                          type: string
                          description: Postal Code
                        facility_code:
                          type: string
                          description: Facility Code
                        address_number:
                          type: string
                          description: >-
                            Address Number. Required for Saks Fifth Avenue
                            Store, Saks.com, SaksOffFifth.com, Saks Off Fifth
                            Store, Bloomingdales, and Dillards.
                  required:
                    - ship_to_contact
              required:
                - facility_id
                - retailer_id
                - brand_id
                - picksheet_code
                - po_number
                - address_data
                - items
      responses:
        '200':
          description: >-
            Order created successfully, with reason for being on hold if
            applicable
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Order created successfully
                  data:
                    type: object
                    example:
                      order_id: 14e517b3-5091-4748-8a25-c497aec2ce98
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: INVALID_REQUEST
              example:
                message: 'Failed to create order: picksheet_code is required'
                error:
                  code: INVALID_REQUEST
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````