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

# Create subscriptions orders

> Create subscriptions orders



## OpenAPI

````yaml oms_v1 post /api-order/subscriptions/orders
openapi: 3.0.0
info:
  description: Order Management System
  version: 1.0.0
  title: Orders v1 (OMS v1)
  contact:
    email: oms-team@fabric.inc
  license:
    name: fabric API license
    url: https://fabric.inc/api-license
servers:
  - url: https://prod01-apigw.{customer_name}.fabric.zone
    description: Production
    variables:
      customer_name:
        default: yourcompany
        description: Customer name, provided by support team
security: []
tags:
  - name: Cart
    description: >-
      Cart APIs<br /><br />**Note:** These are the legacy Cart APIs. To view
      fabric's new Cart APIs, navigate to *Cart API > Cart* from the left side
      navigation pane.
  - name: Bill To
    description: Bill To APIs [Deprecated]
  - name: Ship To
    description: >-
      Ship To APIs<br /><br />**Note:** These are the legacy Ship To APIs. To
      view fabric's new Shipping APIs, navigate to *Cart API > Shipping* from
      the left side navigation pane.
  - name: Wishlist
    description: Wishlist APIs
  - name: Cart Decoupled
    description: Cart Decoupled APIs
  - name: Warehouse
    description: Warehouse APIs
  - name: Inventory
    description: Inventory APIs
  - name: Attributes
    description: >-
      Attributes APIs<br /><br />**Note:** These are the legacy Attribute APIs.
      To view fabric's new Attribute APIs, navigate to *Cart API > Attribute*
      from the left side navigation pane.
  - name: List
    description: List APIs
  - name: Tax/Address Validate
    description: Tax/Address Validate APIs
  - name: Shipping
    description: Shipping APIs
  - name: Payments
    description: Payments APIs
  - name: Order
    description: Order APIs
paths:
  /api-order/subscriptions/orders:
    post:
      tags:
        - Order
      summary: Create subscriptions orders
      description: Create subscriptions orders
      operationId: createSubscriptionsOrders
      parameters:
        - in: header
          name: x-api-key
          schema:
            type: string
            example: 0LybWR49k95cCwYh3cu0waCYoh4H2Eux2J52wn4k
        - $ref: '#/components/parameters/xSiteContent'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - cartId
                - channel
                - orderTotal
                - taxTotal
                - orderCurrency
                - status
                - shipTo
              anyOf:
                - required:
                    - customerUserId
                - required:
                    - customerEmail
                - required:
                    - customerPhone
              properties:
                cartId:
                  type: string
                  minLength: 24
                  maxLength: 24
                  example: 5e4876e10cfe1d8902005d33
                orderReference:
                  type: string
                channel:
                  type: number
                  example: 11
                orderTotal:
                  type: number
                  example: 125.99
                  minimum: 0
                taxTotal:
                  type: number
                  example: 5.23
                  minimum: 0
                orderCurrency:
                  type: string
                  maxLength: 3
                  minLength: 3
                  example: USD
                status:
                  type: string
                  enum:
                    - ORDER_CREATED
                    - ORDER_CONFIRMED
                    - ORDER_CANCELLED
                    - ORDER_PARTIALLY_SHIPPED
                    - ORDER_SHIPPED
                    - ORDER_PARTIALLY_DELIVERED
                    - ORDER_DELIVERED
                    - ORDER_RETURNED
                    - ORDER_PARTIALLY_RETURNED
                    - ORDER_PAYMENT_AUTHORIZED
                    - ORDER_PAYMENT_INVALID
                    - ORDER_FULFILLED
                    - ORDER_PARTIALLY_FULFILLED
                    - ORDER_REFUNDED
                  example: ORDER_CREATED
                  minLength: 5
                statusLog:
                  type: string
                  example: Order has been cancelled
                customerUserId:
                  type: string
                  minLength: 24
                  maxLength: 24
                  example: 5e3598e3007c5e00080d2bb8
                customerAccountId:
                  type: string
                  example: 5e3598e3007c5e00080d2bb8
                  minLength: 3
                customerEmail:
                  type: string
                  format: email
                  minLength: 3
                customerPhone:
                  type: object
                  required:
                    - number
                  properties:
                    number:
                      type: string
                      minLength: 3
                    kind:
                      type: string
                notes:
                  type: string
                  minLength: 1
                tags:
                  type: array
                  items:
                    type: string
                  example:
                    - tag100
                    - tag101
                events:
                  type: array
                  items:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - ORDER_CREATED
                          - ORDER_CONFIRMED
                          - ORDER_CANCELLED
                          - ORDER_PARTIALLY_SHIPPED
                          - ORDER_SHIPPED
                          - ORDER_PARTIALLY_DELIVERED
                          - ORDER_DELIVERED
                          - ORDER_RETURNED
                          - ORDER_PARTIALLY_RETURNED
                          - ORDER_PAYMENT_AUTHORIZED
                          - ORDER_PAYMENT_INVALID
                          - ORDER_FULFILLED
                          - ORDER_PARTIALLY_FULFILLED
                          - ORDER_REFUNDED
                        example: ORDER_CREATED
                        minLength: 5
                      data:
                        type: object
                shipTo:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    required:
                      - shipToId
                      - shipToType
                    properties:
                      shipToId:
                        type: number
                        example: 1000001
                      shipToType:
                        type: string
                        enum:
                          - BOPIS
                          - SHIP_TO_STORE
                          - SHIP_TO_ADDRESS
                          - STORE_PICKUP
                        example: SHIP_TO_ADDRESS
                      price:
                        type: number
                        example: 24.87
                      currency:
                        type: string
                        example: USD
                      estimatedTax:
                        type: number
                        example: 10.25
                      committedTax:
                        type: number
                        example: 10.25
                      promosApplied:
                        type: array
                        items:
                          type: object
                      total:
                        type: number
                        minimum: 0
                      taxCode:
                        type: string
                        minLength: 2
                        example: FR020000
                      shipmentCarrier:
                        type: string
                        example: Fedex
                      shipmentMethod:
                        type: string
                        example: Express
                      shipmentMethodId:
                        type: string
                        example: '10000001'
                      promisedDeliveryDate:
                        type: string
                        example: '2019-12-14'
                      shipmentInstructions:
                        type: string
                        example: Leave at back door
                      shipmentStatus:
                        type: string
                        example: Delivered
                      address:
                        type: object
                        required:
                          - name
                          - email
                          - street1
                          - city
                          - state
                          - country
                          - zipCode
                        properties:
                          name:
                            type: object
                            required:
                              - first
                              - last
                            properties:
                              first:
                                type: string
                                minLength: 2
                                maxLength: 50
                                example: John
                              middle:
                                type: string
                                minLength: 1
                                maxLength: 50
                                example: Paul
                              last:
                                type: string
                                minLength: 2
                                maxLength: 50
                                example: Smith
                          email:
                            type: string
                            format: email
                            example: johnsmith@google.com
                            minLength: 3
                          phone:
                            type: object
                            required:
                              - number
                            properties:
                              number:
                                type: string
                                minLength: 3
                              kind:
                                type: string
                          street1:
                            type: string
                            example: 10400 NE 4th St
                          street2:
                            type: string
                            example: Suite 500
                          city:
                            type: string
                            example: Bellevue
                            minLength: 2
                          state:
                            type: string
                            example: WA
                            minLength: 2
                          country:
                            type: string
                            example: USA
                            minLength: 2
                          zipCode:
                            type: string
                            example: '98004'
                            minLength: 2
                          kind:
                            type: string
                            example: Ship to address
      responses:
        '200':
          description: Created subscription order
          content:
            application/json:
              schema:
                type: object
                properties:
                  tags:
                    type: array
                    items:
                      type: string
                      example: Monthly Penut Bar
                  _id:
                    type: string
                    example: 60b5b8b08766410008dd72be
                  channel:
                    type: number
                    example: 13
                  orderTotal:
                    type: number
                    example: 125.33
                  taxTotal:
                    type: number
                    example: 5.23
                  orderCurrency:
                    type: string
                    example: USD
                  status:
                    type: string
                    example: ORDER_CREATED
                  statusLog:
                    type: string
                    example: Order has been created
                  customerUserId:
                    type: string
                    example: 5e3598e3007c5e00080d2bb8
                  customerAccountId:
                    type: string
                    example: 5e3598e3007c5e00080d2bb8
                  customerEmail:
                    type: string
                    example: ino@fabric.inc
                  customerPhone:
                    type: object
                    properties:
                      number:
                        type: string
                        example: 555-555-5555
                      kind:
                        type: string
                        example: mobile
                  orderId:
                    type: string
                    example: 2468-1668-79485
                  shipTo:
                    type: array
                    items:
                      type: object
                      properties:
                        address:
                          type: object
                          properties:
                            name:
                              type: object
                              properties:
                                first:
                                  type: string
                                  example: Mark
                                middle:
                                  type: string
                                  example: p
                                last:
                                  type: string
                                  example: styler
                            email:
                              type: string
                              example: mark@google.com
                            phone:
                              type: object
                              properties:
                                number:
                                  type: string
                                  example: 555-555-5555
                                kind:
                                  type: string
                                  example: mobile
                            street1:
                              type: string
                              example: 10400 NE 4th St
                            street2:
                              type: string
                              example: Suite 500
                            city:
                              type: string
                              example: Bellevue
                            state:
                              type: string
                              example: WA
                            country:
                              type: string
                              example: USA
                            zipCode:
                              type: string
                              example: 98004
                            kind:
                              type: string
                              example: Ship to address
                        promosApplied:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                example: test1
                        _id:
                          type: string
                          example: 60b5b8b08766410008dd72bf
                        shipToId:
                          type: number
                          example: 1000001
                        shipToType:
                          type: string
                          example: SHIP_TO_ADDRESS
                        price:
                          type: number
                          example: 24.87
                        currency:
                          type: string
                          example: USD
                        estimatedTax:
                          type: number
                          example: 10
                        committedTax:
                          type: number
                          example: 10
                        total:
                          type: number
                          example: 34.87
                        taxCode:
                          type: string
                          example: FR020000
                        shipmentCarrier:
                          type: string
                          example: Fedex
                        shipmentMethod:
                          type: string
                          example: Express
                        shipmentMethodId:
                          type: string
                          example: 10000001
                        promisedDeliveryDate:
                          type: string
                          example: '2021-02-14T00:00:00.000Z'
                        shipmentInstructions:
                          type: string
                          example: Leave at back door
                        shipmentStatus:
                          type: string
                          example: Delivered
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        group:
                          type: array
                          items:
                            type: string
                            example: Group1
                        promosApplied:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                example: test
                        _id:
                          type: string
                          example: 60b5b8b08766410008dd72c0
                        lineItemId:
                          type: number
                          example: 1
                        itemId:
                          type: number
                          example: 1000000051
                        priceListId:
                          type: number
                          example: 100003
                        sku:
                          type: string
                          example: 1538910
                        title:
                          type: string
                          example: Luminous Cushion Lagoon
                        quantity:
                          type: number
                          example: 10
                        price:
                          type: number
                          example: 4.5
                        discount:
                          type: number
                          example: 1
                        currency:
                          type: string
                          example: USD
                        shipToId:
                          type: number
                          example: 1000001
                        estimatedTax:
                          type: number
                          example: 10.25
                        committedTax:
                          type: number
                          example: 10.25
                        total:
                          type: number
                          example: 4.54
                        taxCode:
                          type: string
                          example: FR020000
                        weight:
                          type: number
                          example: 10
                        weightUnit:
                          type: string
                          example: lb
                        reservedLocation:
                          type: array
                        attributes:
                          type: array
                  shipments:
                    type: array
                  payments:
                    type: array
                    items:
                      type: object
                      properties:
                        billToAddress:
                          type: object
                          properties:
                            name:
                              type: object
                              properties:
                                first:
                                  type: string
                                  example: Marl
                                middle:
                                  type: string
                                  example: p
                                last:
                                  type: string
                                  example: styler
                            email:
                              type: string
                              example: mark@google.com
                            phone:
                              type: object
                              properties:
                                number:
                                  type: string
                                  example: 555-555-5555
                                kind:
                                  type: string
                                  example: mobile
                            street1:
                              type: string
                              example: 10400 NE 4th St
                            street2:
                              type: string
                              example: Suite 500
                            city:
                              type: string
                              example: Bellevue
                            state:
                              type: string
                              example: WA
                            country:
                              type: string
                              example: USA
                            zipCode:
                              type: string
                              example: 98004
                            kind:
                              type: string
                              example: Ship to address
                        shipToId:
                          type: array
                          items:
                            type: number
                            example: 1000001
                        _id:
                          type: string
                          example: 60b5b8b08766410008dd72c1
                        billToId:
                          type: number
                          example: 1000001
                        paymentIdentifier:
                          type: object
                          properties:
                            cardIdentifier:
                              type: number
                              example: 4242
                        paymentMethod:
                          type: string
                          example: Visa
                        paymentToken:
                          type: object
                          properties:
                            token:
                              type: number
                              example: 12345689
                        paymentKind:
                          type: string
                          example: Default payment
                        amount:
                          type: number
                          example: 533.33
                        currency:
                          type: string
                          example: USD
                        conversion:
                          type: number
                          example: 1
                        paymentStatus:
                          type: string
                          example: Pending
                  revision:
                    type: number
                    example: 0
                  totalQuantity:
                    type: number
                    example: 10
                  statusDescriptions:
                    type: array
                  events:
                    type: array
                  attributes:
                    type: array
                  createdAt:
                    type: string
                    example: '2021-06-01T04:33:52.118Z'
                  updatedAt:
                    type: string
                    example: '2021-06-01T04:33:52.118Z'
        '400':
          $ref: '#/components/responses/GenericClientError'
        '403':
          $ref: '#/components/responses/MissingXApiKeyHeader'
        '404':
          description: Not Found error while creating subscriptions orders
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    description: The error code
                    type: string
                  message:
                    description: The error message
                    type: string
              examples:
                Supscription order create failure when mentioned pricelist is not mapped against ITEM:
                  value:
                    code: PRICE_LIST_ITEM_ID_NOT_FOUND
                    message: ItemIds, PriceListIds [1000000050, 100073] not found.
                Not Found in Stock:
                  value:
                    code: NOT_IN_STOCK
                    message: ItemIds 1000011037 are not in stock.
        '500':
          $ref: '#/components/responses/GenericServerError'
components:
  parameters:
    xSiteContent:
      name: x-site-context
      in: header
      description: >-
        The `x-site-context` header is a JSON object that contains information
        about the source you wish to pull from. The mandatory `account` is the
        24 character identifier found in Copilot. The `channel` (Sales channel
        ID), `stage` (environment name), and `date` attributes can be used to
        further narrow the scope of your data source.
      required: true
      schema:
        type: string
        example: >-
          {"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account":
          "1234abcd5678efgh9ijklmno","stage":"production"}
  responses:
    GenericClientError:
      description: A generic client error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                description: The error code
                type: string
              message:
                description: The error message
                type: string
    MissingXApiKeyHeader:
      description: Missing x-api-key in header
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                description: The error message
                example: Forbidden
                type: string
    GenericServerError:
      description: A generic server error
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                description: The error code
                type: string
              message:
                description: The error message
                type: string

````