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

# Create a new equipment order for a person or office

> Places a new order for one or more SKUs, delivered to either a person or an office. Exactly one of `personId` or `officeId` must be provided. Shipping address is auto-resolved from the recipient when not explicitly supplied. Returns the newly created order, including its ID and initial status.



## OpenAPI

````yaml /openapi.json post /api/v1/orders
openapi: 3.1.0
info:
  title: Firstbase API Specification Beta
  description: Integration endpoints for Firstbase
  version: 0.1.0
servers:
  - url: /
    description: Default
security:
  - ApiKey: []
tags:
  - name: Inventory Orders
    description: Create and manage inventory orders
  - name: Shipment Notices V1
    description: 'Query shipment notice orders (V1: package items expose `inventories` list)'
  - name: Packages
    description: ''
  - name: Categories
    description: Query available categories for asset creation
  - name: Catalog
    description: ''
  - name: New Joiners
    description: New joiner provisioning pipeline for the organization
  - name: Orders
    description: ''
  - name: People
    description: >-
      Manage the users of Firstbase for your organization. API follows the SCIM
      standard.
    externalDocs:
      url: https://scim.cloud/
  - name: People — Lifecycle
    description: Offboard and reactivate users.
  - name: Assets
    description: Manage inventory assets
  - name: Regions V1
    description: Query regions (V1)
  - name: Warehouses V1
    description: Query warehouses (V1)
  - name: Brands
    description: Query available brands for asset creation
  - name: Inventory
    description: ''
  - name: Replacements
    description: Create and manage equipment replacements
  - name: Offices
    description: Manage and query office locations for the authenticated organization
  - name: Returns
    description: Return and Replacements
paths:
  /api/v1/orders:
    post:
      tags:
        - Orders
      summary: Create a new equipment order for a person or office
      description: >-
        Places a new order for one or more SKUs, delivered to either a person or
        an office. Exactly one of `personId` or `officeId` must be provided.
        Shipping address is auto-resolved from the recipient when not explicitly
        supplied. Returns the newly created order, including its ID and initial
        status.
      operationId: createOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicAPICreateOrderRequest'
        required: true
      responses:
        '200':
          description: Order created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicAPICreateOrderResponse'
        '400':
          description: >-
            Bad request — validation error, missing required field, or invalid
            SKU/person/office combination
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
        '404':
          description: Person, office, or SKU not found in the caller's organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
        '409':
          description: Conflict
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
components:
  schemas:
    PublicAPICreateOrderRequest:
      type: object
      description: >-
        Request body for creating a new order. Either `personId` or `officeId`
        must be provided, but not both.
      properties:
        shippingAddress:
          $ref: '#/components/schemas/PublicAPICreateShippingAddress'
          description: >-
            The shipping address for the order. If not provided, it will be
            auto-resolved from the deliverToOffice address, the person's address
            (personId), or the office's address (officeId) — in that priority
            order.
        personId:
          type: string
          format: uuid
          description: >-
            The ID of the person receiving the order. Either this or `officeId`
            must be set, but not both.
          example: 123e4567-e89b-12d3-a456-426614174000
        officeId:
          type: string
          format: uuid
          description: >-
            The ID of the office receiving the order. Either this or `personId`
            must be set, but not both.
          example: 123e4567-e89b-12d3-a456-426614174001
        deliverToPersonId:
          type: string
          format: uuid
          description: >-
            The ID of the person to whom the order should be delivered. Used to
            auto-resolve the shipping address when shippingAddress is not
            provided.
          example: 123e4567-e89b-12d3-a456-426614174002
        deliverToOfficeId:
          type: string
          format: uuid
          description: >-
            The ID of the office to which the order should be delivered. Used to
            auto-resolve the shipping address when shippingAddress is not
            provided.
          example: 123e4567-e89b-12d3-a456-426614174003
        skus:
          type: array
          description: A list of SKUs (items) to include in the order.
          items:
            $ref: '#/components/schemas/PublicAPISkuInformation'
      required:
        - skus
    PublicAPICreateOrderResponse:
      type: object
      properties:
        orderId:
          type: string
          format: uuid
        itemIds:
          type: array
          items:
            type: string
            format: uuid
      required:
        - itemIds
        - orderId
    PublicApiHttpErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/PublicApiError'
      required:
        - errors
    PublicAPICreateShippingAddress:
      type: object
      description: Shipping address
      properties:
        addressLine1:
          type: string
          description: The primary line of the address (e.g., house number and street name)
          example: 123
        addressLine2:
          type: string
          description: Additional address information (e.g., apartment or suite number)
          example: Apartment B
        administrativeArea:
          type: string
          description: The state, province, or region within the country
          example: California
        countryCode:
          type: string
          description: A two-letter ISO 3166-1 alpha-2 code representing the country
          example: US
        dependentLocality:
          type: string
          description: >-
            A smaller subdivision within the locality, often used for
            neighborhoods or districts
          example: Mission Bay
        locality:
          type: string
          description: The city or town within the administrative area
          example: San Francisco
        postalCode:
          type: string
          description: The ZIP code or equivalent postal code
          example: 94158
        sortingCode:
          type: string
          description: >-
            A code used for routing or sorting mail, often specific to postal
            systems.
          example: 94158-1234
        phoneNumber:
          type: string
          description: A contact phone number, including the international dialing code
          example: +1-415-555-1234
      required:
        - countryCode
    PublicAPISkuInformation:
      type: object
      description: >-
        A SKU (product variant) to include in an order, with optional shipping
        and condition preferences
      properties:
        id:
          type: string
          format: uuid
          description: ID of the SKU to order
          example: 123e4567-e89b-12d3-a456-426614174000
        expeditedShippingOption:
          type: string
          description: >-
            Expedited shipping option for this SKU; null means standard shipping
            applies
          enum:
            - EXPEDITED_STANDARD
        preferredCondition:
          type: string
          description: >-
            Preferred item condition: NEW (new-only) or USED (used preferred).
            Omit to default to NEW-only preference
          enum:
            - NEW
            - USED
      required:
        - id
    PublicApiError:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable description of the error
          example: Invalid request
        source:
          type: string
          description: >-
            Entity or field path that caused the error (for example order,
            shipmentNotice, or person:email)
          example: request
      required:
        - detail
        - source
  securitySchemes:
    ApiKey:
      type: apiKey
      description: Prefix the value with "ApiKey" to indicate the custom authorization type
      name: Authorization
      in: header

````