components:
  headers:
    xFabricRequestIdResponseHeader:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
      schema:
        type: string
  parameters:
    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
    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
  schemas:
    createShippingMethodRequest:
      description: Details to create shipping method
      properties:
        addressType:
          description: >-
            Address type. For example - APO: Army Post Office or MPO: Military
            Post Office
          enum:
            - APO
            - MPO
            - PO
            - Business
            - Residence
          example: APO
          type: string
        attributes:
          additionalProperties:
            description: >-
              User defined custom attributes. This is a placeholder for addition
              info (in key: value pairs)
            example:
              carrier: FedEx
              type: Next Day
            type: object
          description: >-
            User defined custom attributes. This is a placeholder for addition
            info (in key: value pairs)
          example:
            carrier: FedEx
            type: Next Day
          type: object
        carrier:
          description: Shipping carrier name
          example: FedEx
          type: string
        cartValue:
          $ref: '#/components/schemas/minMaxValues'
        code:
          description: >-
            Shipping method code such as Same Day Delivery (SDD), Standard
            Shipping (STH), etc.
          example: SDD
          type: string
        cost:
          description: Shipping cost given by merchant
          example: 20.5
          format: double
          type: number
        createdBy:
          description: User (ID or name) who created the shipping method
          example: User1
          type: string
        currency:
          default: USD
          description: Three-letter currency code as defined by ISO-4217
          example: USD
          type: string
        cutoffTime:
          description: >-
            Time at which the current 'order day' is over. **Note**: If an order
            is delivered after the cutoff time, it's considered as delivered the
            next working day. For example, if the cutoff time is set to 5:00 PM,
            any orders delivered after this time will be considered to have been
            delivered the following business day.
          example: 1330
          format: int32
          type: integer
        description:
          description: Brief description of shipping method
          example: Express Delivery 2 - 5 days
          type: string
        dimension:
          $ref: '#/components/schemas/minMaxDimensions'
        maximumDays:
          description: >-
            Maximum duration required to deliver an order starting from the time
            it's placed
          example: 5
          format: int32
          type: integer
        minimumDays:
          description: >-
            Minimum duration required to deliver an order starting from the time
            it's placed
          example: 2
          format: int32
          type: integer
        name:
          description: Shipping method name
          example: Express Delivery
          type: string
        region:
          description: State or region of delivery
          example: CA
          type: string
        taxCode:
          description: >-
            Tax code associated with a shipping method. Depends on the
            applicable tax laws and regulations in each jurisdiction.
          example: FR01
          type: string
        weight:
          $ref: '#/components/schemas/minMaxValues'
      required:
        - code
        - name
      type: object
    dimensions:
      description: Item dimensions
      properties:
        height:
          description: Item height
          example: 2.4
          format: double
          type: number
        length:
          description: Item length
          example: 4.6
          format: double
          type: number
        uom:
          description: Unit of measurement (UOM)
          example: EA
          type: string
        width:
          description: Item width
          example: 3.5
          format: double
          type: number
      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
    minMaxDimensions:
      description: Minimum and maximum dimensions
      properties:
        max:
          $ref: '#/components/schemas/dimensions'
        min:
          $ref: '#/components/schemas/dimensions'
      type: object
    minMaxValues:
      description: Minimum and maximum values (weight, cost, etc.)
      properties:
        max:
          description: Maximum value
          example: 3.1
          format: double
          type: number
        min:
          description: Minimum value
          example: 2.1
          format: double
          type: number
      type: object
    pagination:
      description: Pagination response
      properties:
        count:
          description: Total number of search results
          example: 1000
          format: int32
          type: integer
        limit:
          default: 10
          description: Maximum number of records per page
          example: 10
          format: int32
          maximum: 100
          minimum: 1
          type: integer
        offset:
          default: 0
          description: >-
            Number of records to skip before returning all records. For example,
            `offset=20, limit=10` returns records 21-30.
          example: 1
          format: int32
          minimum: 0
          type: integer
      type: object
    shippingMethod:
      description: Shipping method response model
      properties:
        addressType:
          description: >-
            Address type. For example - APO: Army Post Office or MPO: Military
            Post Office
          enum:
            - APO
            - MPO
            - PO
            - Business
            - Residence
          example: APO
          type: string
        attributes:
          additionalProperties:
            description: >-
              User defined custom attributes. This is a placeholder for addition
              info (in key: value pairs)
            example:
              carrier: FedEx
              type: Next Day
            type: object
          description: >-
            User defined custom attributes. This is a placeholder for addition
            info (in key: value pairs)
          example:
            carrier: FedEx
            type: Next Day
          type: object
        carrier:
          description: Shipping carrier name
          example: FedEx
          type: string
        cartValue:
          $ref: '#/components/schemas/minMaxValues'
        channelId:
          description: Channel ID
          example: '12'
          type: string
        code:
          description: >-
            Shipping method code such as Same Day Delivery (SDD), Standard
            Shipping (STH), etc.
          example: SDD
          type: string
        configuredBy:
          description: User (ID or name) who configured the shipping method
          example: User3
          type: string
        cost:
          description: Shipping cost given by merchant
          example: 20.5
          format: double
          type: number
        createdAt:
          description: Time of shipping method creation (UTC)
          example: '2022-08-01T20:03:28.483Z'
          format: date-time
          type: string
        createdBy:
          description: User (ID or name) who created the shipping method
          example: User1
          type: string
        currency:
          default: USD
          description: Three-letter currency code as defined by ISO-4217
          example: USD
          type: string
        cutoffTime:
          description: >-
            Time at which the current 'order day' is over. **Note**: If an order
            is delivered after the cutoff time, it's considered as delivered the
            next working day. For example, if the cutoff time is set to 5:00 PM,
            any orders delivered after this time will be considered to have been
            delivered the following business day.
          example: 1330
          format: int32
          type: integer
        description:
          description: Brief description of shipping method
          example: Express Delivery 2 - 5 days
          type: string
        dimension:
          $ref: '#/components/schemas/minMaxDimensions'
        isDeleted:
          description: >-
            **true:** Shipping method is deleted. **false:** Shipping method
            isn't deleted.
          example: false
          type: boolean
        maximumDays:
          description: >-
            Maximum duration required to deliver an order starting from the time
            it's placed
          example: 5
          format: int32
          type: integer
        minimumDays:
          description: >-
            Minimum duration required to deliver an order starting from the time
            it's placed
          example: 2
          format: int32
          type: integer
        name:
          description: Shipping method name
          example: Express Delivery
          type: string
        region:
          description: State or region of delivery
          example: CA
          type: string
        shippingMethodId:
          description: Shipping method ID
          example: 5349b4ddd2781d08c09890f4
          type: string
        taxCode:
          description: >-
            Tax code associated with a shipping method. Depends on the
            applicable tax laws and regulations in each jurisdiction.
          example: FR01
          type: string
        updatedAt:
          description: Time of last update to shipping method (UTC)
          example: '2022-08-01T20:03:28.483Z'
          format: date-time
          type: string
        updatedBy:
          description: User (ID or name) who update the shipping method
          example: User2
          type: string
        weight:
          $ref: '#/components/schemas/minMaxValues'
      required:
        - code
        - name
      type: object
    shippingMethodItemIdsResponse:
      description: Item IDs associated with a shipping method
      properties:
        data:
          description: Item IDs
          items:
            description: Item
            example: '1233434'
            type: string
          type: array
        pagination:
          $ref: '#/components/schemas/pagination'
      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
    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
    shippingMethodSearchRequest:
      description: Search criteria
      example:
        filters:
          - condition: EQ
            field: shippingMethod.addressType
            value: APO
          - condition: IN
            field: shippingMethod.maximumDays
            values:
              - 10
              - 20
        sort: '-shippingMethod.createdAt'
      properties:
        filters:
          items:
            oneOf:
              - $ref: '#/components/schemas/valueSearchFilter'
              - $ref: '#/components/schemas/valuesSearchFilter'
          maxItems: 50
          minItems: 0
          type: array
        sort:
          default: '-shippingMethod.createdAt'
          description: >-
            Field or property name to sort the results. + represents ascending
            and - represents descending order of sorting
          example: +shippingMethod.createdAt
          pattern: >-
            (^[+-]shippingMethod\.[a-zA-Z.\-_]*)(,([+-]shippingMethod\.[a-zA-Z.\-_]*)){0,}
          type: string
      required:
        - filters
      type: object
    shippingMethodsResponse:
      description: List of shipping methods and their details
      properties:
        shippingMethods:
          description: Details of shipping methods
          items:
            $ref: '#/components/schemas/shippingMethod'
          type: array
      type: object
    shippingMethodsSearchFilter:
      description: >-
        Search criteria to search shipping methods. If shipping methods are
        searched using a single value, valueSearchFilter is considered. If
        shipping methods are searched using multiple values, valuesSearchFilter
        is considered
      discriminator:
        mapping:
          EQ: '#/components/schemas/valueSearchFilter'
          GT: '#/components/schemas/valueSearchFilter'
          GTE: '#/components/schemas/valueSearchFilter'
          IN: '#/components/schemas/valuesSearchFilter'
          LT: '#/components/schemas/valueSearchFilter'
          LTE: '#/components/schemas/valueSearchFilter'
          NEQ: '#/components/schemas/valueSearchFilter'
          NIN: '#/components/schemas/valuesSearchFilter'
        propertyName: condition
      properties:
        condition:
          default: EQ
          description: Search condition to apply filter
          enum:
            - EQ
            - NEQ
            - IN
            - NIN
            - LT
            - GT
            - LTE
            - GTE
          example: EQ
          type: string
        field:
          description: Field name
          example: shippingMethod.addressType
          pattern: ^shippingMethod\.[a-zA-Z.\-_]*
          type: string
      required:
        - condition
        - field
      type: object
    shippingMethodsSearchResponse:
      description: Search response
      properties:
        data:
          items:
            $ref: '#/components/schemas/shippingMethod'
          type: array
        pagination:
          $ref: '#/components/schemas/pagination'
        stats:
          description: A list of stats.
          items:
            description: The stats details.
            type: string
          type: array
      type: object
    updateShippingMethodRequest:
      description: Details to update shipping method
      properties:
        addressType:
          description: >-
            Address type. For example - APO: Army Post Office or MPO: Military
            Post Office
          enum:
            - APO
            - MPO
            - PO
            - Business
            - Residence
          example: APO
          type: string
        attributes:
          additionalProperties:
            description: >-
              User defined custom attributes. This is a placeholder for addition
              info (in key: value pairs)
            example:
              carrier: FedEx
              type: Next Day
            type: object
          description: >-
            User defined custom attributes. This is a placeholder for addition
            info (in key: value pairs)
          example:
            carrier: FedEx
            type: Next Day
          type: object
        carrier:
          description: Shipping carrier name
          example: FedEx
          type: string
        cartValue:
          $ref: '#/components/schemas/minMaxValues'
        code:
          description: >-
            Shipping method code such as Same Day Delivery (SDD), Standard
            Shipping (STH), etc.
          example: SDD
          type: string
        cost:
          description: Shipping cost given by merchant
          example: 20.5
          format: double
          type: number
        createdBy:
          description: User (ID or name) who created the shipping method
          example: User1
          type: string
        currency:
          default: USD
          description: Three-letter currency code as defined by ISO-4217
          example: USD
          type: string
        cutoffTime:
          description: >-
            Time at which the current 'order day' is over. **Note**: If an order
            is delivered after the cutoff time, it's considered as delivered the
            next working day. For example, if the cutoff time is set to 5:00 PM,
            any orders delivered after this time will be considered to have been
            delivered the following business day.
          example: 1330
          format: int32
          type: integer
        description:
          description: Brief description of shipping method
          example: Express Delivery 2 - 5 days
          type: string
        dimension:
          $ref: '#/components/schemas/minMaxDimensions'
        isDeleted:
          description: >-
            **true:** Shipping method is deleted. **false:** Shipping method
            isn't deleted.
          example: false
          type: boolean
        maximumDays:
          description: >-
            Maximum duration required to deliver an order starting from the time
            it's placed
          example: 5
          format: int32
          type: integer
        minimumDays:
          description: >-
            Minimum duration required to deliver an order starting from the time
            it's placed
          example: 2
          format: int32
          type: integer
        name:
          description: Shipping method name
          example: Express Delivery
          type: string
        region:
          description: State or region of delivery
          example: CA
          type: string
        taxCode:
          description: >-
            Tax code associated with a shipping method. Depends on the
            applicable tax laws and regulations in each jurisdiction.
          example: FR01
          type: string
        updatedBy:
          description: User (ID or name) who update the shipping method
          example: User2
          type: string
        weight:
          $ref: '#/components/schemas/minMaxValues'
      required:
        - code
        - name
      type: object
    valueSearchFilter:
      allOf:
        - $ref: '#/components/schemas/shippingMethodsSearchFilter'
        - properties:
            value:
              description: Search criteria using a single value
              example: ORDER_CREATE
              oneOf:
                - description: Target record's non-numeric identifier
                  example: ORDER_CREATE
                  type: string
                - description: Target record's numeric identifier
                  example: 112233
                  format: int64
                  type: number
                - description: Target record's numeric identifier
                  example: 1122.33
                  format: double
                  type: number
          type: object
      description: >-
        Criteria to find shipments by a single value. Condition between `field`
        and `value` is anything except IN and NIN when `valueSearchFilter` is
        used.
      required:
        - condition
        - field
      type: object
    valuesSearchFilter:
      allOf:
        - $ref: '#/components/schemas/shippingMethodsSearchFilter'
        - properties:
            values:
              items:
                description: Search criteria using multiple values
                example: ORDER_CREATE
                oneOf:
                  - description: Target record's non-numeric identifier
                    example: ORDER_CREATE
                    type: string
                  - description: Target record's numeric identifier
                    example: 112233
                    format: int64
                    type: number
                  - description: Target record's numeric identifier
                    example: 1122.33
                    format: double
                    type: number
              maxItems: 25
              minItems: 1
              type: array
          type: object
      description: >-
        Search criteria using multiple values. Condition between `field` and
        `values` is either IN or NIN when `valuesSearchFilter` is used.
      required:
        - condition
        - field
      type: object
  securitySchemes:
    authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http
externalDocs:
  description: Find out more about fabric Orders (also called OMS)
  url: https://developer.fabric.inc/v3/docs/orders-overview
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
openapi: 3.0.1
x-mint:
  mcp:
    enabled: true
paths:
  /shipping-methods:
    post:
      description: >-
        On your storefront, shipping methods determine how products are
        delivered to your customers. Some of the common shipping methods are
        domestic, international, free shipping, and express delivery. <p> This
        endpoint is used to create a new shipping method. In the response, you
        will also get a shipping method ID, which will be required for
        subsequent calls to get, update, and delete this shipping method.</p>
      operationId: createShippingMethod
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xFabricRequestId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createShippingMethodRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shippingMethod'
          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'
        '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'
      summary: Create shipping method
      tags:
        - Shipping Methods
  /shipping-methods/actions/filter-by-item-id:
    post:
      description: >-
        You may need to periodically review shipping methods associated with an
        item, either to answer related queries or to verify they're up to date.
        <p> This endpoint gets shipping methods for the given item ID.</p>
      operationId: getByItemId
      parameters:
        - description: Item ID
          example: 1234
          in: query
          name: itemId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xFabricRequestId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shippingMethodsResponse'
          description: OK
          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:
                message: Shipping method not found
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Shipping method 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'
      summary: Get shipping methods
      tags:
        - Shipping Method Items
  /shipping-methods/search:
    post:
      description: >-
        At checkout, customers choose their preferred shipping method based on
        delivery timelines and costs. Moreover, it may be necessary for you to
        review available shipping methods to ensure they're current and
        accurate. To support these scenarios, you must get the latest shipping
        methods. <p> This endpoint gets shipping methods based on given filter
        conditions.</p>
      operationId: searchShippingMethod
      parameters:
        - description: >-
            Number of records to skip before returning all records. For example,
            `offset=20, limit=10` returns records 21-30.
          example: 0
          in: query
          name: offset
          schema:
            default: 0
            example: 0
            format: int32
            type: integer
        - description: Maximum number of records per page
          example: 10
          in: query
          name: limit
          schema:
            default: 10
            example: 10
            format: int32
            maximum: 100
            minimum: 1
            type: integer
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xFabricRequestId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/shippingMethodSearchRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shippingMethodsSearchResponse'
          description: Returns list of shipping methods
          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'
        '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'
      summary: Find shipping methods
      tags:
        - Shipping Methods
  /shipping-methods/{shippingMethodId}:
    delete:
      description: >-
        When a particular shipping service is discontinued or certain shipping
        methods have become redundant or non-compliant with existing
        regulations, you may want to remove them so they're not shown to
        shoppers. <p> This endpoint deletes a shipping method by ID. </p>
      operationId: deleteShippingMethod
      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'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shippingMethod'
          description: OK
          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:
                message: shipping method not found
                type: CLIENT_ERROR
              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'
      summary: Delete shipping method
      tags:
        - Shipping Methods
    get:
      description: >-
        When an order is placed, the selected shipping method is stored as part
        of order details. You may need to review them for order related queries.
        <p> This endpoint gets details of a single shipping method by ID. </p>
      operationId: getShippingMethod
      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'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shippingMethod'
          description: OK
          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:
                message: Shipping method not found
                type: CLIENT_ERROR
              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'
      summary: Get shipping method
      tags:
        - Shipping Methods
    put:
      description: >-
        To comply with legal regulations and for other purposes, it may be
        necessary to update shipping rates or delivery timelines. <p> With this
        endpoint, you can update shipping details by ID. This completely
        replaced existing information. </p>
      operationId: updateShippingMethod
      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/updateShippingMethodRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shippingMethod'
          description: OK
          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:
                message: Shipping method not found
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Shipping method 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'
      summary: Update shipping method
      tags:
        - Shipping Methods
  /shipping-methods/{shippingMethodId}/actions/add-items:
    post:
      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'
      summary: Add items to shipping method
      tags:
        - Shipping Method Items
  /shipping-methods/{shippingMethodId}/actions/delete-items:
    post:
      description: >-
        Certain items may need to be removed from a shipping method when they're
        discontinued, new shipping restrictions are imposed on hazardous items,
        or when they're not eligible for current promotions.<p> Using this
        endpoint, you can delete one or more items from the given shipping
        method. </p>
      operationId: deleteItems
      parameters:
        - description: >-
            24-character ID generated in the response of Get shipping method
            endpoint - `POST /shipping-methods`
          example: 52fa3796841ea417fa71d2a0
          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:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shippingMethodItemsResponse'
          description: OK
          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:
                message: Shipping method item not found
                type: CLIENT_ERROR
              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'
      summary: Delete items from shipping method
      tags:
        - Shipping Method Items
  /shipping-methods/{shippingMethodId}/items:
    get:
      description: >-
        You may want to determine what items are in a specific shipping method,
        to calculate shipping costs, verify the eligibility of items for
        specific shipping methods, or display the list of items to shoppers
        during the checkout process.<p>This endpoint is used to get item IDs for
        a given shipping method. </p>
      operationId: getItemIds
      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
        - description: >-
            Number of records to skip before returning all records. For example,
            `offset=20, limit=10` returns records 21-30.
          example: 0
          in: query
          name: offset
          schema:
            default: 0
            example: 0
            format: int32
            type: integer
        - description: Maximum number of records per page
          example: 10
          in: query
          name: limit
          schema:
            default: 10
            example: 10
            format: int32
            maximum: 100
            minimum: 1
            type: integer
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xFabricRequestId'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shippingMethodItemIdsResponse'
          description: OK
          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:
                message: Shipping method not found
                type: CLIENT_ERROR
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Shipping method 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'
      summary: Get item IDs for given shipping method
      tags:
        - Shipping Method Items
security:
  - authorization: []
servers:
  - description: Production
    url: https://api.fabric.inc/v3
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
