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

# Bulk create orders

Orders can be ingested with an integration or programatically using this endpoint


## OpenAPI

````yaml post /orders/bulk
openapi: 3.0.0
info:
  title: At Last Public Api Service
  description: This is the At Last public api specification.
  version: v1
servers:
  - url: https://api.atlast.co/v1
    description: Production
    variables: {}
security: []
tags: []
paths:
  /orders/bulk:
    post:
      operationId: IngestOrder_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderIngestRequest'
      responses:
        '201':
          description: >-
            The request has succeeded and a new resource has been created as a
            result.
      security:
        - OAuth2Auth: []
components:
  schemas:
    OrderIngestRequest:
      type: object
      required:
        - orders
      properties:
        orders:
          type: array
          items:
            $ref: '#/components/schemas/IngestOrder'
          minItems: 1
          maxItems: 100
    IngestOrder:
      type: object
      required:
        - id
        - createdAt
        - orderNumber
        - orderTotal
        - itemSubTotal
        - shippingTotal
        - items
        - customer
      properties:
        id:
          type: string
          minLength: 1
          description: Unique identifier for this order
        merchantId:
          type: string
          minLength: 1
          description: >-
            At last's internal merchant identifier.

            Depending on your setup you may or may not need to specify this id.

            It will depend on how many merchants your tenant has access to, or
            any specifics on your account setup.

            You will be told the list of ids and which merchant they belong to
            so you can tell us which merchant a specific order belongs to.
        reference:
          type: string
          minLength: 1
          description: >-
            Any reference you want the return to have for easier identification
            (in warehouse or dashboard)
        createdAt:
          type: string
          format: date-time
          description: >-
            When was the order originally created.

            Orders must be at most 60 days old from the day they're being pushed
            to the system.
        userEmail:
          type: string
          format: email
          description: >-
            Email of the user that bought the item.

            If obfuscated or omitted then order import will need to be enabled
            in the At Last dashboard
        orderNumber:
          type: string
          minLength: 1
          description: OMS order number
        orderTotal:
          allOf:
            - $ref: '#/components/schemas/Price'
          description: Order total after discounts and shipping have been applied
        itemSubTotal:
          allOf:
            - $ref: '#/components/schemas/Price'
          description: Subtotal of items before discounts
        shippingTotal:
          allOf:
            - $ref: '#/components/schemas/Price'
          description: Shipping cost
        discount:
          allOf:
            - $ref: '#/components/schemas/Price'
          description: Total discounts applied to the order
        outboundFulfilment:
          $ref: '#/components/schemas/OrderIngestInternationalOutboundFulfilment'
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderIngestItem'
          minItems: 1
          maxItems: 100
          description: Order items in the order
        customer:
          allOf:
            - $ref: '#/components/schemas/OrderIngestCustomer'
          description: Customer details
      description: Order Ingest Request
    Price:
      type: object
      required:
        - value
        - currency
      properties:
        value:
          type: number
          minimum: 0
          description: |-
            Specifies the value price instance, price values can be floats.
            **Min Value: 0**
        currency:
          type: string
          description: ISO 4217 currency codes
      description: Price model used to define any currency exchange or value.
    OrderIngestInternationalOutboundFulfilment:
      type: object
      required:
        - carrier
        - shippingDate
        - trackingNumber
      properties:
        carrier:
          type: string
          minLength: 1
          description: Name of the carrier responsible for the outbound shipment
        shippingDate:
          type: string
          format: date
          description: |-
            Date the outbound shipment was created.
            **Format: YYYY-MM-DD**
          example: '2025-01-20'
        trackingNumber:
          type: string
          minLength: 1
          description: The carrier's outbound tracking number
      description: >-
        International outbound fulfilment order data

        This needs to be sent to enable international returns for the order
        using the customer facing application.

        This information is needed for customs to prove the shipment is a return
    OrderIngestItem:
      type: object
      required:
        - id
        - quantity
        - price
      properties:
        id:
          type: string
          minLength: 1
          description: unique identifier for this order item
        quantity:
          type: integer
          minimum: 1
          description: How many of this product were shipped
        imageUrl:
          type: string
          format: uri
          description: Product image
        sku:
          type: string
          minLength: 1
          description: Product sku
        name:
          type: string
          minLength: 1
          description: Product name
        variantName:
          type: string
          minLength: 1
          description: Product name
        description:
          type: string
          minLength: 1
          description: Product description
        price:
          allOf:
            - $ref: '#/components/schemas/Price'
          description: >-
            Price of the product (single product, not multiplied by quantity).

            This will be used to calculate what the customer paid.

            **If you only know the price AFTER discount, place that value here
            and ignore the discount field.**
        weight:
          allOf:
            - $ref: '#/components/schemas/Weight'
          description: Weight of the product (single product, not multiplied by quantity).
        discount:
          allOf:
            - $ref: '#/components/schemas/Price'
          description: >-
            Discount applied to the product (single product, not multiplied by
            quantity).

            This will be used to calculate what the customer paid.

            **If you only know the price AFTER discount then set this to 0 or
            ignore this field.**
        hsCode:
          type: string
          minLength: 1
          description: |-
            Harmonized System Code for this product.
            **Used for customs.**
            **Mandatory for international.**
        countryCodeOfOrigin:
          type: string
          minLength: 2
          maxLength: 2
          description: |-
            Alpha-2 country code of where the product is from.
            **Mandatory for international.**
            **Used for customs.**
      description: Order Ingest Item
    OrderIngestCustomer:
      type: object
      required:
        - lastName
        - address
      properties:
        lastName:
          type: string
          minLength: 1
          description: the customers's first name
        firstName:
          type: string
          minLength: 1
        phone:
          type: string
          minLength: 1
          description: the customers's phone number
        address:
          allOf:
            - $ref: '#/components/schemas/OrderIngestCustomerAddress'
          description: the customers's address details
      description: Customer's details
    Weight:
      type: object
      required:
        - value
        - unit
      properties:
        value:
          type: number
          description: |-
            Specifies the value of the weight, weights values can be floats.
            **Min Value: 0 non inclusive**
          minimum: 0
          exclusiveMinimum: true
        unit:
          allOf:
            - $ref: '#/components/schemas/WeightUnits'
          description: The unit of the value as seen in WeightUnits enum.
      description: Weight model used to define weights
    OrderIngestCustomerAddress:
      type: object
      required:
        - line1
        - city
        - postCode
        - country
      properties:
        line1:
          type: string
          minLength: 1
        line2:
          type: string
          minLength: 1
        line3:
          type: string
          minLength: 1
        city:
          type: string
          minLength: 1
        postCode:
          type: string
          minLength: 1
        company:
          type: string
          minLength: 1
        country:
          type: string
          minLength: 1
          description: >-
            the country code of the sender, we will make best efforts to resolve
            the country code if data provided is country name instead.
        province:
          type: string
          minLength: 1
          description: >-
            Mandatory for USA, Canada and Australian returns. Ideally it should
            be a province or state code, we will again make best efforts to work
            with province name if code can't be provided
      description: Customer's address details
    WeightUnits:
      type: string
      enum:
        - GRAMS
        - KILOGRAMS
        - OUNCES
        - POUNDS
      description: Supported weight units
  securitySchemes:
    OAuth2Auth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.atlast.co/oauth2/token
          scopes: {}

````