> ## 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.

# Remove items from single order

> Remove items from order specified by order ID



## OpenAPI

````yaml smt post /v1/orders/{id}/remove-items
openapi: 3.0.0
info:
  title: Subscriptions (SMT API)
  description: >-
    fabric's Subscriptions API lets your customers set recurring purchases of
    their desired products or services for a scheduled period (weekly, monthly,
    etc.). In addition, Subscriptions helps you retrieve and update subscription
    details, and lets your customers skip one or more subscription schedules, or
    remove a subscription. This API also lets you create and updates customers
    cancellation reasons, and subscription discounts.
  version: 2.0.0
  contact:
    email: support@fabric.inc
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
servers:
  - url: https://prod01.copilot.fabric.inc/data-subscription
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Subscribers
    description: >-
      These endpoints let you create, update, or get one or all of your
      subscribers (customers who have subscriptions). If you request all
      subscribers, you will receive a paginated response; you can specify the
      page size, and which page you want.
  - name: Subscriptions
    description: >-
      These endpoints let your customers set recurring purchases of their
      desired products or services for a scheduled period (weekly, monthly,
      etc.). In addition, these endpoints let you get and update subscription
      details, and let your customers skip one or more subscription schedules,
      or remove a subscription.
  - name: Orders
    description: >-
      These endpoints let your customers purchase products and services from
      your store.
  - name: Cancellation Reasons
    description: These endpoints let you create and get cancellation reasons.
  - name: Subscription Discounts
    description: >-
      These endpoints let you create, update, deactivate, and get discount
      offers for the orders placed by your customers.
paths:
  /v1/orders/{id}/remove-items:
    post:
      tags:
        - Orders
      summary: Remove items from single order
      description: Remove items from order specified by order ID
      operationId: removeItemsFromOrder
      parameters:
        - in: path
          name: id
          description: Order ID
          required: true
          schema:
            $ref: '#/components/schemas/Id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/removeItemsFromOrderRequest'
      responses:
        '200':
          description: Request processed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveItemsFromOrderResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequestError'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unAuthError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notFoundError'
components:
  schemas:
    Id:
      type: string
      description: General object ID
      example: 606f01f441b8fc0008529916
    removeItemsFromOrderRequest:
      type: object
      description: Remove items from order
      properties:
        lineItemIds:
          description: Line items to remove from order
          type: array
          items:
            type: integer
            example: 1
    RemoveItemsFromOrderResponse:
      type: object
      description: Order details after removing items from order
      properties:
        responseStatus:
          description: Brief response status
          type: string
          example: OK
        message:
          description: Full response message
          type: string
          example: Request processed successfully
        data:
          description: Order details
          type: object
          properties:
            order:
              $ref: '#/components/schemas/Order'
    badRequestError:
      type: object
      description: Bad request error
      properties:
        responseStatus:
          type: string
          description: Brief response status
          example: BAD_REQUEST
        message:
          type: string
          description: Full response message
          example: Bad request
    unAuthError:
      type: object
      description: Unauthenticated error
      properties:
        Message:
          description: Full response message
          example: User is not authorized to access this resource with an explicit deny
          type: string
    notFoundError:
      type: object
      description: Not found
      properties:
        responseStatus:
          description: Brief response status
          type: string
          example: NOT_FOUND
        message:
          description: Full response message
          type: string
          example: Not found
    Order:
      required:
        - status
        - scheduledDate
        - totalAmount
        - currencyCode
        - customer
      type: object
      description: Order details
      properties:
        shipTo:
          $ref: '#/components/schemas/AddressShipTo'
        billTo:
          $ref: '#/components/schemas/Address'
        paymentDetails:
          $ref: '#/components/schemas/PaymentDetails'
        isDeleted:
          type: boolean
          description: 'true: Order is deleted<br />false: Order is not deleted'
          example: false
        deletedAt:
          type: string
          description: >-
            If `isDeleted`=true, time at which the order was deleted<br />If
            `isDeleted`=false, NULL
          example: '2019-01-01T00:00:00.000Z'
        id:
          type: string
          description: Order ID
          example: 6384462ab645220008a4358a
        status:
          type: string
          description: Order status
          example: SCHEDULED
          enum:
            - SCHEDULED
            - CANCELED
            - SUCCESS
            - SKIPPED
            - RETRY
            - SUBMITTED
            - FAILED
        totalAmount:
          type: integer
          description: Total order price
          example: 100
        totalTax:
          type: integer
          description: Total tax on order
          example: 10
        totalDiscount:
          type: integer
          description: Total discount for order (amount, not percentage)
          example: 10
        currencyCode:
          type: string
          description: Order currency code
          example: USD
        scheduledDate:
          type: string
          description: Date on which order is scheduled to be created
          example: '2019-01-01T00:00:00.000Z'
        customer:
          $ref: '#/components/schemas/Customer'
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/Items'
        createdAt:
          type: string
          description: Time order was created
          example: '2021-10-12T21:35:05.756Z'
        updatedAt:
          type: string
          description: Most recent time order was updated
          example: '2021-10-14T05:40:55.997Z'
        statusUpdatedAt:
          type: string
          description: Most recent time order status was updated
          example: '2021-10-14T10:24:36.468Z'
        Retry:
          $ref: '#/components/schemas/OrderRetry'
        error:
          $ref: '#/components/schemas/OrderError'
    AddressShipTo:
      required:
        - name
        - streetAddress
        - city
        - state
        - postalCode
        - country
        - phone
      type: object
      description: Ship-to address and phone details
      properties:
        name:
          $ref: '#/components/schemas/Name'
        streetAddress:
          $ref: '#/components/schemas/StreetAddress'
        city:
          description: City name
          type: string
          example: Boston
        state:
          description: State name
          type: string
          example: MA
        postalCode:
          description: Postal code
          type: string
          example: '02127'
        country:
          description: Country name
          type: string
          example: US
        phone:
          $ref: '#/components/schemas/Phone'
    Address:
      required:
        - name
        - streetAddress
        - city
        - state
        - postalCode
        - country
        - phone
      type: object
      description: Bill-to address and phone details
      properties:
        name:
          $ref: '#/components/schemas/Name'
        streetAddress:
          $ref: '#/components/schemas/StreetAddress'
        city:
          description: City name
          type: string
          example: Boston
        state:
          description: State name
          type: string
          example: MA
        postalCode:
          description: Postal code
          type: string
          example: '02127'
        country:
          description: Country name
          type: string
          example: US
        phone:
          $ref: '#/components/schemas/Phone'
    PaymentDetails:
      required:
        - paymentIdentifier
      type: object
      description: Payment details
      properties:
        paymentIdentifier:
          $ref: '#/components/schemas/PaymentIdentifier'
        paymentMethod:
          type: string
          description: Payment method
          example: credit_card
        paymentKind:
          type: string
          description: Payment type
          example: Visa
    Customer:
      required:
        - customerReferenceId
        - locale
        - email
        - firstName
        - lastName
      type: object
      description: Customer information
      properties:
        customerReferenceId:
          type: string
          description: Customer reference ID
          example: '12345'
        locale:
          type: string
          description: Customer locale (language_country)
          example: en_US
        email:
          type: string
          description: Customer's email address
          example: customer@example.com
        contactnumber:
          type: string
          description: Customer's contact number
          example: '5555551234'
        firstName:
          type: string
          example: Pat
          description: Customer's first name
        middleName:
          type: string
          example: E
          description: Customer's middle name or initial
        lastName:
          type: string
          example: Kake
          description: Customer's last name
        segments:
          type: array
          description: Customer's segments
          items:
            type: string
            example: employee
            description: Customer's segment (employee, management, pro user, etc.)
        employeeId:
          type: string
          example: '345'
          description: Customer employee ID
        status:
          type: string
          description: Customer status
          example: ACTIVE
          enum:
            - ACTIVE
            - INACTIVE
        isDeleted:
          type: boolean
          description: 'true: Customer is deleted<br />false: Customer is not deleted'
          example: false
        DeletedAt:
          type: string
          description: >-
            If `isDeleted`=true, time at which the customer was deleted<br />If
            `isDeleted`=false, NULL
          example: '2021-01-01T00:00:00.000Z'
        createdAt:
          type: string
          description: Time customer was created
          example: '2019-10-12T21:35:05.756Z'
        updatedAt:
          type: string
          description: Most recent time customer was updated
          example: '2021-10-14T05:40:55.997Z'
        communicationPreference:
          $ref: '#/components/schemas/communicationPreference'
    Items:
      required:
        - lineItemId
      type: object
      description: Item details
      properties:
        subscription:
          $ref: '#/components/schemas/OrderSubscription'
        item:
          $ref: '#/components/schemas/Item'
        shipping:
          $ref: '#/components/schemas/Shipping'
        offer:
          $ref: '#/components/schemas/Offer'
        lineItemId:
          type: integer
          description: Line item ID
          example: 1
        customAttributes:
          $ref: '#/components/schemas/CustomAttributes'
    OrderRetry:
      type: object
      description: Order retry details
      properties:
        maxRetries:
          type: integer
          description: Maximum number of retries
          example: 3
        retryType:
          type: string
          description: Retry type
          example: PAYMENT RETRY
          enum:
            - PAYMENT RETRY
            - INTENTORY RETRY
            - GENERIC RETRY
        retryAfterDays:
          type: integer
          description: Number of days after which to retry
          example: 1
        retryCount:
          type: integer
          description: Number of times to retry order
          example: 2
    OrderError:
      type: object
      description: Order error details
      properties:
        errorCode:
          type: string
          description: Brief error code
          example: ORDER_NOT_FOUND
        errorMessage:
          type: string
          description: Full error message
          example: The order is not found
    Name:
      required:
        - firstName
        - lastName
      type: object
      description: Customer's name
      properties:
        firstName:
          type: string
          example: Pat
          description: Customer's first name
        middleName:
          type: string
          example: E
          description: Customer's middle name or initial
        lastName:
          type: string
          example: Kake
          description: Customer's last name
    StreetAddress:
      required:
        - street1
      description: Street address
      type: object
      properties:
        street1:
          description: Street address field 1
          type: string
          example: 123 Main St
        street2:
          description: Street address field 2
          type: string
          example: Suite 100
    Phone:
      required:
        - number
      type: object
      description: Customer's phone details
      properties:
        number:
          type: string
          description: Phone number
          example: '5555551234'
        kind:
          type: string
          description: Phone type
          example: home
    PaymentIdentifier:
      required:
        - cardIdentifier
        - expiryDate
      type: object
      description: Payment identifier details
      properties:
        cardIdentifier:
          type: string
          description: Last four digits of credit card number
          example: '1234'
        expiryDate:
          type: string
          description: Card expiration date
          example: 12/20
    communicationPreference:
      type: object
      description: Customer's communications preferences
      properties:
        email:
          type: boolean
          description: >-
            true: Customer agrees to be contacted via email<br />false: Customer
            does not want to be contacted via email
          example: true
        sms:
          type: boolean
          description: >-
            true: Customer agrees to be contacted via text message<br />false:
            Customer does not want to be contacted via text message
          example: true
    OrderSubscription:
      required:
        - plan
        - id
      type: object
      description: Subscription details
      properties:
        plan:
          $ref: '#/components/schemas/Plan'
        id:
          type: string
          description: Subscription ID
          example: 6256610bc312410009b7390b
    Item:
      required:
        - id
        - sku
        - quantity
        - itemPrice
      type: object
      description: Item details
      properties:
        id:
          type: integer
          description: Item ID
          example: 1000000006
        sku:
          type: string
          description: Item SKU
          example: MOBO-X570
        quantity:
          type: integer
          description: Number of items
          example: 1
        weight:
          type: integer
          description: Item weight amount
          example: 10
        weightUnit:
          type: string
          description: Item weight unit
          example: lb
        title:
          type: string
          description: Item name
          example: Vitamin
        description:
          type: string
          description: Item description
          example: Vitamin C
        itemPrice:
          $ref: '#/components/schemas/ItemPrice'
        tax:
          $ref: '#/components/schemas/Tax'
    Shipping:
      required:
        - shipmentCarrier
        - shipmentMethod
        - shipmentInstructions
        - shippingAmount
        - taxCode
        - taxAmount
        - currencyCode
      type: object
      description: Shipping details
      properties:
        shipmentCarrier:
          type: string
          description: Shipment carrier
          example: USPS
        shipmentMethod:
          type: string
          description: Shipment method
          example: Ground
        shipmentInstructions:
          type: string
          description: Shipment instructions
          example: Please leave the package in the box
        taxCode:
          type: string
          description: Shipment tax code
          example: SHP020000
        shippingAmount:
          type: integer
          description: Shipping cost
          example: 10
        taxAmount:
          type: integer
          description: Shipment tax amount (value, not percentage)
          example: 1
        currencyCode:
          type: string
          description: Shipment currency code
          example: USD
    Offer:
      required:
        - id
      type: object
      description: Offer details
      properties:
        id:
          type: string
          description: Offer ID
          example: SUB-E10717
        source:
          type: string
          description: Offer source
          example: PDP
          enum:
            - PDP
            - CART
    CustomAttributes:
      type: object
      description: Custom attributes
      properties:
        storeId:
          type: string
          description: Store ID
          example: 60cb07fc20387b000821c5c3
        associateId:
          type: integer
          description: Associate ID
          example: 1
        trackingUrl:
          type: string
          description: Tracking URL
          example: 609436d21baded0008945b05
    Plan:
      required:
        - frequency
        - frequencyType
      type: object
      description: Subscription plan details
      properties:
        id:
          type: string
          description: Subscription plan ID
          example: '1001'
        frequency:
          type: integer
          description: Subscription plan frequency value
          example: 30
        frequencyType:
          type: string
          description: Subscription plan frequency period
          example: Daily
    ItemPrice:
      required:
        - price
        - currencyCode
      type: object
      description: Item price details
      properties:
        price:
          type: integer
          description: Item price
          example: 100
        currencyCode:
          type: string
          description: Item currency code
          example: USD
    Tax:
      required:
        - taxCode
        - taxAmount
        - currencyCode
      type: object
      description: Tax details
      properties:
        taxCode:
          type: string
          description: Tax code
          example: FR020000
        taxAmount:
          type: integer
          description: Tax amount (value, not percentage)
          example: 10
        currencyCode:
          type: string
          description: Tax currency code
          example: USD
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````