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

# Add items to shipping method

> You may want to offer different shipping options for items based on their weight and dimensions, or you may want to offer promotional shipping rates based on order value, customer loyalty, etc. <p> This endpoint lets you add items to an existing shipping method so that shoppers can see the options. </p>



## OpenAPI

````yaml shipping-methods.openapi post /shipping-methods/{shippingMethodId}/actions/add-items
openapi: 3.0.1
info:
  contact:
    email: support@fabric.inc
    name: fabric Support team
  description: >-
    fabric **Shipping Methods** API is a multi-tenant service that enables you
    to manage carriers and expose shipping methods on your Storefront. With the
    Shipping Methods API, you can configure shipping methods and associate items
    to specific shipping methods. When shoppers browse through your e-commerce
    platform (website or app), they'll see the items with their shipping
    methods, which gives an estimate of when they can get the item.
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
  title: Orders - Shipping Methods API
  version: 3.0.0
  x-audience: external-public
servers:
  - description: Production
    url: https://api.fabric.inc/v3
security:
  - authorization: []
tags:
  - description: >-
      fabric **Shipping Methods** API is a multi-tenant service that enables you
      to manage carriers and expose shipping methods on your Storefront. With
      the Shipping Methods API, you can configure shipping methods and associate
      items to specific shipping methods. When shoppers browse through your
      e-commerce platform (website or app), they'll see the items with their
      shipping methods, which gives an estimate of when they can get the item.
    name: Shipping Methods
  - description: >-
      These endpoints perform CRUD operations on items tagged to the shipping
      methods
    name: Shipping Method Items
externalDocs:
  description: Find out more about fabric Orders (also called OMS)
  url: https://developer.fabric.inc/v3/docs/orders-overview
paths:
  /shipping-methods/{shippingMethodId}/actions/add-items:
    post:
      tags:
        - Shipping Method Items
      summary: Add items to shipping method
      description: >-
        You may want to offer different shipping options for items based on
        their weight and dimensions, or you may want to offer promotional
        shipping rates based on order value, customer loyalty, etc. <p> This
        endpoint lets you add items to an existing shipping method so that
        shoppers can see the options. </p>
      operationId: addItems
      parameters:
        - description: >-
            24-character ID generated in the response of Get shipping method
            endpoint - `POST /shipping-methods`
          example: 62fa3796841ea417fa71d2a9
          in: path
          name: shippingMethodId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xFabricRequestId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/shippingMethodItemsRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shippingMethodItemsResponse'
          description: Created
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '400':
          content:
            application/json:
              example:
                errors:
                  - message: Invalid request
                    type: CLIENT_ERROR
                message: Bad request
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '401':
          content:
            application/json:
              example:
                message: Unauthorized request
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '404':
          content:
            application/json:
              example: ' "type": "CLIENT_ERROR", {"message": "Shipping method not found." }'
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Not found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
        '500':
          content:
            application/json:
              example:
                message: Internal server error
                type: SERVER_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
components:
  parameters:
    xFabricTenantId:
      description: >-
        A header used by fabric to identify the tenant making the request. You
        must include tenant id in the authentication header for an API request
        to access any of fabric’s endpoints. You can retrieve the tenant id ,
        which is also called account id, from
        [Copilot](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
      example: 5f328bf0b5f328bf0b5f328b
      in: header
      name: x-fabric-tenant-id
      required: true
      schema:
        type: string
    xFabricChannelId:
      description: >-
        x-fabric-channel-id identifies the sales channel where the API request
        is being made; primarily for multichannel use cases. The channel ids are
        12 corresponding to US and 13 corresponding to Canada. The default
        channel id is 12. This field is required.
      example: '12'
      in: header
      name: x-fabric-channel-id
      required: true
      schema:
        type: string
    xFabricRequestId:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      in: header
      name: x-fabric-request-id
      required: false
      schema:
        type: string
  schemas:
    shippingMethodItemsRequest:
      description: Items to be associated with a shipping method
      properties:
        itemIds:
          description: Item IDs associated with a shipping method
          example:
            - 111223
            - 224444
          items:
            description: Shipping methods items
            example: 111223
            format: int32
            type: integer
          maxItems: 50
          minItems: 1
          type: array
      required:
        - itemIds
      type: object
    shippingMethodItemsResponse:
      description: Details to add items to or delete items from shipping method
      properties:
        shippingMethodItems:
          items:
            $ref: '#/components/schemas/shippingMethodItemResource'
          type: array
      required:
        - shippingMethodItems
      type: object
    errorResponse:
      description: Error response
      properties:
        errors:
          description: Errors
          items:
            $ref: '#/components/schemas/errorResponse'
          type: array
        message:
          description: Error message
          example: Bad request
          type: string
        type:
          description: Error type
          example: CLIENT_ERROR
          type: string
      type: object
    shippingMethodItemResource:
      description: Details to add items to or delete items from shipping method
      properties:
        isDeleted:
          description: >-
            **true:** Shipping method is deleted. **false:** Shipping method
            isn't deleted.
          example: false
          type: boolean
        itemId:
          description: Item ID
          example: 1234
          format: int32
          type: integer
        shippingMethodId:
          description: 24-character system-generated shipping method ID
          example: 5349b4ddd2781d08c09890f4
          type: string
      required:
        - itemId
        - shippingMethodId
      type: object
  headers:
    xFabricRequestIdResponseHeader:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
      schema:
        type: string
  securitySchemes:
    authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````