openapi: 3.0.1 info: title: Cart Actions Endpoints ReservedNetwork Endpoints API description: fabric's **Cart API** lets you add, update, and remove items from your Storefront cart, either as a guest user or as a logged-in user. It also provides functionality to merge carts when you switch from guest user to logged-in user, and apply coupons and other attributes (for example, gift wrapping) to the line items. Additionally, the API supports more advanced tasks such as using multiple carts within a B2B organization, sharing carts, and supporting a unified cart experience for multi-region and multi-brand businesses.

The Cart API provides high performance, scalability, multi-tenancy, and configurability to the end-to-end order processing actions that start from the item being added to the cart; through the pre-checkout stage that includes billing, shipping, and payment details; to the checkout stage where the order is processed and confirmed by fabric's Order Management System (OMS) contact: name: Cart Support email: support.cnc@fabric.inc license: name: fabric API License url: https://fabric.inc/api-license version: 3.0.0 servers: - url: https://api.fabric.inc/v3 security: - bearerAuth: [] tags: - description: These endpoints help in performing reserved network operations name: ReservedNetwork Endpoints paths: /inventory-networks/actions/soft-release: post: description: Release soft reservation. operationId: releaseQuantity parameters: - $ref: '#/components/parameters/xFabricTenantId' - $ref: '#/components/parameters/xFabricChannelId' - $ref: '#/components/parameters/xFabricRequestId' requestBody: content: application/json: schema: $ref: '#/components/schemas/softReserve' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/aggregatedNetworksResponse' 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' '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: Release Soft Reservation tags: - ReservedNetwork Endpoints /inventory-networks/actions/soft-reserve: post: description: Soft reserve quantity. operationId: reserveQuantity parameters: - $ref: '#/components/parameters/xFabricTenantId' - $ref: '#/components/parameters/xFabricChannelId' - $ref: '#/components/parameters/xFabricRequestId' requestBody: content: application/json: schema: $ref: '#/components/schemas/softReserve' required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/aggregatedNetworksResponse' 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: Soft Reservation tags: - ReservedNetwork Endpoints 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: softReserve: description: SoftReserveRequest model properties: cartId: description: CartId for which soft reserve requested, at least one of orderNumber or cartId or OrderId is required example: b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569 type: string createdAt: description: Date when soft reservation was created example: '2022-08-01T18:03:28.483971941Z' format: date-time type: string expiresAt: description: Date when soft reservation will expire example: '2022-08-01T18:03:28.483971941Z' format: date-time type: string id: description: ID example: '"Infinity"' type: string items: description: Items which needs to be reserved. Required parameter items: $ref: '#/components/schemas/ItemResource' type: array networkCode: description: Network for which items needs to be reserved. Optional parameter example: DCOnly type: string orderId: description: Order ID for which soft reserve requested, at least one of orderNumber or cartId or OrderId is required example: 62ab7af89ed14510827fe074 type: string orderNumber: deprecated: true description: OrderNumber for which soft reserve requested, at least one of orderNumber or cartId or OrderId is required example: order_20220729_883 type: string orderType: description: Order type, default value is STANDARD. Optional parameter example: '[''STANDARD'',''CSR'']' type: string updatedAt: description: Date when soft reservation was updated example: '2022-08-01T18:03:28.483971941Z' format: date-time type: string vendorId: description: VendorId for which soft reserve requested. Optional parameter example: test_vendor type: string required: - items type: object virtualCounters: description: Virtual counters are calculated at run time from counters properties: availableBackorder: type: string availablePreorder: type: string availableToPurchase: type: string type: object aggregatedNetwork: description: Displays an aggregate representation of the SKU that includes all locations for which the sku is available in that network. properties: backorderLimit: description: The maximum restock inventory quantity. example: 50 format: int32 type: integer backorderShipmentAt: description: The timestamp for when a backorder is shipped. example: '2022-08-01T20:03:28.483Z' format: date-time type: string channelId: description: The sales channel ID; identifies business operations location. example: channel_xyz type: string counters: additionalProperties: description: Merchant-defined inventory counter (also known as inventory position) format: int32 type: integer description: Your defined inventory positions. These can be included in availability calculations. example: allocated: 10 onHand: 100 shipped: 20 type: object createdAt: description: Time of inventory creation example: '2022-08-01T18:03:28.483Z' format: date-time type: string customAttributes: additionalProperties: description: Placeholder for additional info example: '{"isBopis":true}' type: string description: Placeholder for additional info example: isBopis: true type: object hasInfiniteInventory: default: false description: The infinite inventory flag. Setting this to true means inventory can be used any number of times and does not have a consumption limit. Setting this to false means inventory can't be used infinitely, and has a consumption limit. example: false type: boolean inventoryId: description: The fabric system-generated inventory ID. This ID is generated during inventory creation. example: 723910d81723 type: string isNoStock: description: An attribute used to indicate that a SKU is out of stock. example: false type: boolean itemId: description: Merchant-defined item ID whose inventory is created or updated. If omitted, fabric Inventory service generates the `itemId`. If you choose to use the `itemId` in your environment, you must include it in all inventory *Write* requests. example: 12345 format: int32 type: integer leadTime: description: The time between when an order is placed to replenish inventory and when the order is received at warehouse. example: 5 days type: string locationNumber: description: Represents the warehouse or store location where the inventory is stored. The locationNumber is crucial for inventory management. When creating or updating inventory, you need to include the locationNumber to specify which location the inventory belongs to. example: 12345 format: int32 type: integer lowStock: description: The lowStock parameter is used to alert low stock at a location when inventory is below a set number. example: 10 format: int32 type: integer networkCode: description: Code of the network to which the inventory belongs example: ShipToHome type: string networkCounters: additionalProperties: description: Indicates inventory positions at network format: int32 type: integer description: Indicates inventory positions at network example: softReserve: 10 type: object preorderLimit: description: The maximum preorder limit. example: 40 format: int32 type: integer preorderShipmentAt: description: Time when preorder is shipped example: '2022-08-01T20:03:28.483Z' format: date-time type: string region: description: Region where inventory is managed example: North America type: string safetyStock: description: Reserved inventory quantity at the location example: 10 format: int32 type: integer segment: description: Segment of the inventory example: Sample Segment type: string sku: description: Product SKU (Stock Keeping Unit) identifier. It serves as the primary reference key for the inventory and provides uniqueness to the item. example: SKU1 type: string status: description: Inventory status IN_STOCK, LOW_STOCK, etc. enum: - IN_STOCK - LOW_STOCK - OUT_OF_STOCK - BACKORDER_STOCK - PREORDER_STOCK example: ' IN_STOCK' type: string type: description: Inventory type - a classifier attribute that provides flexibility to define inventory types example: primary type: string updatedAt: description: Time when inventory was last updated example: '2022-08-01T20:03:28.483Z' format: date-time type: string vendorId: description: ID of the vendor who will replenish the inventory for the retailer example: vendor1 type: string virtualCounters: $ref: '#/components/schemas/virtualCounters' virtualCountersStatus: $ref: '#/components/schemas/virtualCounters' type: object aggregatedNetworksResponse: description: AggregatedNetworksResponse model properties: aggregatedNetworks: description: Aggregated networks items: $ref: '#/components/schemas/aggregatedNetwork' type: array type: object ItemResource: properties: backorderQuantity: description: Back order quantity that needs to be reserved example: 5 format: int32 type: integer channelId: description: ChannelId for the item which needs to be reserved. Required parameter example: '3' type: string errorMessage: type: string itemId: description: itemId of product. Optional parameter example: '451008962041' type: string lineItemId: description: 'lineItemId of product. Required parameter ' example: '2' type: string locationNumber: description: LocationNumber for which this item needs to be reserved. Optional parameter example: 999 format: int32 type: integer networkCode: description: Network for which this item needs to be reserved. Optional parameter example: ShipToHome type: string preorderQuantity: description: Pre order quantity that needs to be reserved example: 5 format: int32 type: integer quantity: description: quantity that needs to be reserved. Required parameter example: 5 format: int32 type: integer reservedNetworkCodes: items: type: string type: array sku: description: sku of product. Required parameter example: OMSTESTSKU1 type: string status: type: string type: description: Order type, default value is STANDARD. Optional parameter example: '[''STANDARD'',''PREORDER'',''BACKORDER'']' type: string required: - channelId - lineItemId - quantity - sku 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 headers: xFabricRequestIdResponseHeader: description: Unique request ID example: 263e731c-45c8-11ed-b878-0242ac120002 required: false schema: type: string securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: 'This is the authorization token used to authenticate the request. You must pass the access token generated from the system app. For more information, see the [Making your first API request](/v3/api-reference/getting-started/getting-started-with-fabric-apis#procedure) section. '