Inventory APIs (2.0.0)

Download OpenAPI specification:Download

Inventory Support: support@fabric.inc URL: https://www.fabric.inc/ License: fabric Inc

fabric's OMS Inventory APIs are high performance endpoints built on highly scalable architecture, and include a configurable data model to orchestrate the inventory lifecycle events. These endpoints provide functionality to create inventory records, keep a record of inventory quantities, set up inventory availability rules, and update items in the inventory. The endpoints provide support to configure inventory positions (also called as counters), create custom attributes for the inventory records, and set up network rules to control inventory accuracy and collect inventory across locations to create channel-specific inventory availability.
Network: Set inventory availability and accuracy rules using conditional rule builder to create a pool of inventory aggregated from multiple locations.
Counter: Configure the positions of the inventory such as available, in-transit, on-hand, or other custom positions to measure inventory quantities of assortment.
Virtual Counter: Quantify the inventory that is available to sell by calculating the difference between available inventory and reserved for purchase inventory. It helps prevent over-promising of inventory by subtracting the reserved-for-purchase inventory count from the in-warehouse inventory count.
Overlay: Send daily refresh feeds to update the on-hand inventory data in fabric OMS. It includes a configurable failsafe to prevent inventory overrides. It makes easy for merchants to integrate fabric OMS with storefront and warehouse APIs.
Adjustment: Incrementally reserve inventory in real time.
Inventory by Geography: View the list of locations with available inventory, sorted by distance, specifying the radius and customer location.
Safety Stock: Set a threshold level to reserve inventory from purchase, for common use cases such as preventing oversell and retaining inventory in physical locations.
Low Stock Level: Set a threshold level to flag inventory as low stock.
Backorder: Manage the expected restock dates and backorder quantity per inventory.

Network

Network refers to a group of locations having a group of SKUs in each location. Network endpoints let you read, create, and manage an inventory-network by location, brand, or any other custom attributes.

Get all networks

Retrieves paginated list of all networks that were previously created

Request
query Parameters
required
object (PaginationQueryModel)

This object represents the process of separating data into different pages

header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Responses
200

OK

400

Client Error

500

Internal Server Error

get/api/v2/inventory/network
Response samples
application/json
{
  • "pagination": {
    },
  • "network": [
    ]
}

Create network

Creates network using conditional rule to add locations and SKU to the network.

Request
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Request Body schema: application/json
code
string

Network code. It's a unique identifier for the network.

name
string

Name of the network

safetyStock
integer <int32>

Safety stock count. This indicates the reserve quantity of an item, to fulfill an emergency requirement incase of damage of the product that is reserved for sell.

rules
object

Rule specific to location.

Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

post/api/v2/inventory/network
Request samples
application/json
{
  • "code": "DC",
  • "name": "Distribution Center",
  • "safetyStock": 2,
  • "rules": {
    }
}
Response samples
application/json
{
  • "networkId": "62278e49167b6079755aa5e7",
  • "code": "DC",
  • "name": "Distribution Center",
  • "safetyStock": 2,
  • "rules": {
    }
}

Get specific network

Retrieves details of a specific network by specified network ID

Request
path Parameters
networkId
required
string

Unique identifier of a network

Example: 62278e49167b6079755aa5e7
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

get/api/v2/inventory/network/{networkId}
Response samples
application/json
{
  • "networkId": "62278e49167b6079755aa5e7",
  • "code": "DC",
  • "name": "Distribution Center",
  • "safetyStock": 2,
  • "rules": {
    }
}

Updates specific network

Updates details of a specific network by specified network ID. Details to be updated include network code, name, safety stock, and conditional rule for a specific network.

Request
path Parameters
networkId
required
string

Unique identifier of a network

Example: 62278e49167b6079755aa5e7
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Request Body schema: application/json
code
string

Network code. It's a unique identifier for the network.

name
string

Name of the network

safetyStock
integer <int32>

Safety stock count. This indicates the reserve quantity of an item, to fulfill an emergency requirement incase of damage of the product that is reserved for sell.

rules
object

Rule specific to location.

Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

put/api/v2/inventory/network/{networkId}
Request samples
application/json
{
  • "code": "DC",
  • "name": "Distribution Center",
  • "safetyStock": 2,
  • "rules": {
    }
}
Response samples
application/json
{
  • "networkId": "62278e49167b6079755aa5e7",
  • "code": "DC",
  • "name": "Distribution Center",
  • "safetyStock": 2,
  • "rules": {
    }
}

Delete specific network

Deletes a specific network, with all of its details, by specified network ID. Once deleted, it cannot be undone.

Request
path Parameters
networkId
required
string

Network ID

Example: 62278e49167b6079755aa5e7
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

delete/api/v2/inventory/network/{networkId}
Response samples
application/json
{
  • "networkId": "62278e49167b6079755aa5e7",
  • "code": "DC",
  • "name": "Distribution Center",
  • "safetyStock": 2,
  • "rules": {
    }
}

Get aggregated networks

This endpoint lets you view the aggregated count of the inventory-network based on the network rule configuration (either by network ID or by SKU, or by both).

Request
query Parameters
required
object (NetworkSearchModel)
required
object (PaginationQueryModel)

This object represents the process of separating data into different pages

header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

get/api/v2/inventory/aggregatedNetwork/query
Response samples
application/json
{
  • "pagination": {
    },
  • "networkAggregation": [
    ]
}

Inventory

These endpoints let you read, create and bulk update inventory across all locations.

Get inventories

Retrieves a paginated list of inventories based on the filtering criteria including SKUs, itemIds, channels, and location numbers.

Request
query Parameters
required
object (InventorySearchModel)

This object contains all the filtering criteria based on which inventories are searched

required
object (PaginationQueryModel)

This object represents the process of separating data into different pages

header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Responses
200

OK

400

Client Error

500

Internal Server Error

get/api/v2/inventory
Response samples
application/json
{
  • "pagination": {
    },
  • "inventory": [
    ]
}

Create inventory

Enables you to create inventory based on the combination of location number, channel ID, and item ID or item SKU.

Request
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Request Body schema: application/json
sku
string

SKU of the item

itemId
integer <int64>

Item ID

locationNum
integer <int32>

Location number is used to identify the warehouse or location where the inventory is going to be kept

channelId
string

Sales channel ID. This field is used to identify where the business operations are being held.

vendorId
string

Vendor ID

leadTime
string

The amount of time between when a purchase order is placed to replenish products and when the order is received in the warehouse.

inventoryType
string

Inventory type. It is a classifier attribute that provides flexibility to define types.

infiniteInventory
boolean

Infinite inventory flag.
true indicates that the inventory can be consumed any number of times as per need
false indicates that the inventory cannot be used infinitely, and has a limit to be consumed

counters
object

Inventory counter (also known as inventory position) configured by the merchant

attributes
object

Custom attribute of the inventory

Responses
200

OK

400

Client Error

500

Internal Server Error

post/api/v2/inventory
Request samples
application/json
{
  • "sku": "SKU00025",
  • "itemId": 4225678911,
  • "locationNum": 473746,
  • "channelId": 12,
  • "vendorId": "vendor123",
  • "leadTime": 1234,
  • "inventoryType": "primary",
  • "infiniteInventory": true,
  • "counters": {
    },
  • "attributes": {
    }
}
Response samples
application/json
{
  • "virtualCounters": {
    },
  • "id": "62272e917b12209e68751d94",
  • "sku": "SKU00025",
  • "itemId": 4225678911,
  • "locationNum": 473746,
  • "channelId": 12,
  • "vendorId": "vendor123",
  • "leadTime": 1234,
  • "inventoryType": "Safety stock",
  • "infiniteInventory": true,
  • "counters": {
    },
  • "attributes": {
    }
}

Update inventory by overriding existing values

This endpoint updates inventory by overriding the existing values with all the new inventory properties that are specified in the request body, or creates a new inventory if inventory does not exist. If an existing property is not mentioned in the request body, then the value for the existing property will be displayed as null or zero. Inventory is identified based on the combination of location number, channel ID, and item ID or item SKU.

Request
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Request Body schema: application/json
sku
string

SKU of the item

itemId
integer <int64>

Item ID

locationNum
integer <int32>

Location number is used to identify the warehouse or location where the inventory is going to be kept

channelId
string

Sales channel ID. This field is used to identify where the business operations are being held.

vendorId
string

Vendor ID

leadTime
string

The amount of time between when a purchase order is placed to replenish products and when the order is received in the warehouse.

inventoryType
string

Inventory type. It is a classifier attribute that provides flexibility to define types.

infiniteInventory
boolean

Infinite inventory flag.
true indicates that the inventory can be consumed any number of times as per need
false indicates that the inventory cannot be used infinitely, and has a limit to be consumed

counters
object

Inventory counter (also known as inventory position) configured by the merchant

attributes
object

Custom attribute of the inventory

Responses
200

OK

400

Client Error

500

Internal Server Error

put/api/v2/inventory
Request samples
application/json
{
  • "sku": "SKU00025",
  • "itemId": 4225678911,
  • "locationNum": 473746,
  • "channelId": 12,
  • "vendorId": "vendor123",
  • "leadTime": 1234,
  • "inventoryType": "primary",
  • "infiniteInventory": true,
  • "counters": {
    },
  • "attributes": {
    }
}
Response samples
application/json
{
  • "virtualCounters": {
    },
  • "id": "62272e917b12209e68751d94",
  • "sku": "SKU00025",
  • "itemId": 4225678911,
  • "locationNum": 473746,
  • "channelId": 12,
  • "vendorId": "vendor123",
  • "leadTime": 1234,
  • "inventoryType": "Safety stock",
  • "infiniteInventory": true,
  • "counters": {
    },
  • "attributes": {
    }
}

Update inventory by adding new property

This endpoint does not override all the existing properties, rather it updates inventory by adding new properties or by updating the existing inventory properties that are specified in the request body. Inventory is identified based on the combination of location number, channel ID, and item ID or item SKU.

Request
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Request Body schema: application/json
sku
string

SKU of the item

itemId
integer <int64>

Item ID

locationNum
integer <int32>

Location number is used to identify the warehouse or location where the inventory is going to be kept

channelId
string

Sales channel ID. This field is used to identify where the business operations are being held.

vendorId
string

Vendor ID

leadTime
string

The amount of time between when a purchase order is placed to replenish products and when the order is received in the warehouse.

inventoryType
string

Inventory type. It is a classifier attribute that provides flexibility to define types.

infiniteInventory
boolean

Infinite inventory flag.
true indicates that the inventory can be consumed any number of times as per need
false indicates that the inventory cannot be used infinitely, and has a limit to be consumed

counters
object

Inventory counter (also known as inventory position) configured by the merchant

attributes
object

Custom attribute of the inventory

Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

patch/api/v2/inventory
Request samples
application/json
{
  • "sku": "SKU00025",
  • "itemId": 4225678911,
  • "locationNum": 473746,
  • "channelId": 12,
  • "vendorId": "vendor123",
  • "leadTime": 1234,
  • "inventoryType": "primary",
  • "infiniteInventory": true,
  • "counters": {
    },
  • "attributes": {
    }
}
Response samples
application/json
{
  • "virtualCounters": {
    },
  • "id": "62272e917b12209e68751d94",
  • "sku": "SKU00025",
  • "itemId": 4225678911,
  • "locationNum": 473746,
  • "channelId": 12,
  • "vendorId": "vendor123",
  • "leadTime": 1234,
  • "inventoryType": "Safety stock",
  • "infiniteInventory": true,
  • "counters": {
    },
  • "attributes": {
    }
}

Update inventory position or create inventory

This endpoint updates inventory position (also known as counter) as per specified request body, Or it creates inventory if inventory does not exist, and thereby updates the counter. Inventory is identified based on the combination of location number, channel ID, and item ID or item SKU.

Request
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Request Body schema: application/json
itemId
integer <int64>

Item ID whose inventory is to be updated

locationNum
integer <int32>

Location number is used to identify the warehouse or location where the inventory is kept

channelId
string

Channel ID. This field is used to identify where the business operations are being held.

leadTime
string

The amount of time between when a purchase order is placed to replenish products and when the order is received in the warehouse

counters
object

Represents inventory position

attributes
object

Custom attributes for inventory

Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

put/api/v2/inventory/adjustment
Request samples
application/json
{
  • "itemId": 4225678911,
  • "locationNum": 473746,
  • "channelId": 12,
  • "leadTime": 1234,
  • "counters": {
    },
  • "attributes": {
    }
}
Response samples
application/json
{
  • "virtualCounters": {
    },
  • "id": "62272e917b12209e68751d94",
  • "sku": "SKU00025",
  • "itemId": 4225678911,
  • "locationNum": 473746,
  • "channelId": 12,
  • "vendorId": "vendor123",
  • "leadTime": 1234,
  • "inventoryType": "Safety stock",
  • "infiniteInventory": true,
  • "counters": {
    },
  • "attributes": {
    }
}

Update inventory position

This endpoint is very specific to counter update. It updates inventory position (also known as counter), or displays error if inventory does not exist. Inventory is identified based on the combination of location number, channel ID, and item ID or item SKU.

Request
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Request Body schema: application/json
itemId
integer <int64>

Item ID whose inventory is to be updated

locationNum
integer <int32>

Location number is used to identify the warehouse or location where the inventory is kept

channelId
string

Channel ID. This field is used to identify where the business operations are being held.

leadTime
string

The amount of time between when a purchase order is placed to replenish products and when the order is received in the warehouse

counters
object

Represents inventory position

attributes
object

Custom attributes for inventory

Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

patch/api/v2/inventory/adjustment
Request samples
application/json
{
  • "itemId": 4225678911,
  • "locationNum": 473746,
  • "channelId": 12,
  • "leadTime": 1234,
  • "counters": {
    },
  • "attributes": {
    }
}
Response samples
application/json
{
  • "virtualCounters": {
    },
  • "id": "62272e917b12209e68751d94",
  • "sku": "SKU00025",
  • "itemId": 4225678911,
  • "locationNum": 473746,
  • "channelId": 12,
  • "vendorId": "vendor123",
  • "leadTime": 1234,
  • "inventoryType": "Safety stock",
  • "infiniteInventory": true,
  • "counters": {
    },
  • "attributes": {
    }
}

Get inventory of specific item

Retrieves inventory details of a specific item based on specified item ID

Request
path Parameters
itemId
required
number

Item ID

Example: 4225678911
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

get/api/v2/inventory/{itemId}
Response samples
application/json
{
  • "virtualCounters": {
    },
  • "id": "62272e917b12209e68751d94",
  • "sku": "SKU00025",
  • "itemId": 4225678911,
  • "locationNum": 473746,
  • "channelId": 12,
  • "vendorId": "vendor123",
  • "leadTime": 1234,
  • "inventoryType": "Safety stock",
  • "infiniteInventory": true,
  • "counters": {
    },
  • "attributes": {
    }
}

Get inventories in specific region

Retrieves list of inventories in a specific region based on postal code, sku, radius within which the inventories are to be retrieved, latitude and longitude of the location.

Request
query Parameters
required
object (InventoryGeoSearchModel)
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

get/api/v2/inventory/geography
Response samples
application/json
{
  • "inventory": [
    ],
  • "locations": [
    ]
}

Inventory Upload Log

These endpoints let you view the record of the inventory uploads.

Get inventory upload status for specific file

This endpoint checks the progress of bulk upload, for a specific Key ID, triggered by uploading a CSV file to the database.

Request
query Parameters
keyId
required
string

Key ID of the uploaded file.

Example: keyId=981628612_inventory
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

get/api/v2/inventory/upload/log
Response samples
application/json
{
  • "id": "626faf4f352b50680cf2284e",
  • "keyId": "1651486519061_Inventory",
  • "status": "FINISHED",
  • "totalRows": 21,
  • "totalRowsUploaded": 21,
  • "totalRowsErrors": 0
}

Get inventory upload record for all files

Retrieves a paginated list of inventory bulk upload status for all the files that were uploaded to the database to perform inventory operations.

Request
query Parameters
required
object (PaginationQueryModel)

This object represents the process of separating data into different pages

header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

get/api/v2/inventory/upload/log/all
Response samples
application/json
{
  • "pagination": {
    },
  • "networkAggregation": [
    ]
}

Bulk Operation

Bulk Operation endpoints let you upload and download inventory details, in bulk, using a CSV file to and from AWS (Amazon Web Service) server presigned S3 URL that is generated from the Order service.

Create URL to bulk upload inventory

Enables you to create a URL for uploading a CSV file to apply bulk changes to inventory models. This endpoint generates a key ID associated with the URL, and this keyId will be used to fetch the status of an uploaded file or to fetch the error file afterwards.

Request
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Request Body schema: application/json
fileName
string

Name of the file to be uploaded

Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

post/api/v2/inventory/aws/upload-url
Request samples
application/json
{
  • "fileName": "45162930812_inventory"
}
Response samples
application/json
{}

Create URL to download error details for an uploaded file

Enables you to create a URL to download error details for a file that was previously uploaded to apply bulk changes to inventory records. This endpoint generates a key ID associated with the URL, and this keyId will be used to fetch the status of an upload file or to fetch the error file afterwards.

Request
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Request Body schema: application/json
fileName
string

Name of the file to be uploaded

Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

post/api/v2/inventory/aws/download-url
Request samples
application/json
{
  • "fileName": "45162930812_inventory"
}
Response samples
application/json
{}

Attribute

Attribute refers to a set of characteristics that define inventory. Attribute endpoints let you create, read, update, and delete inventory attributes at any hierarchy level (location, SKU, item, channel) or at counter level.

Create inventory attribute

Creates a unique inventory attribute

Request
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Request Body schema: application/json
code
string

Attribute code. It's a unique code that is used to identify an attribute

Responses
200

OK

400

Client Error

409

Conflict

500

Internal Server Error

post/api/v2/inventory/attribute
Request samples
application/json
{
  • "code": "on-hand"
}
Response samples
application/json
{
  • "id": "622786ae0bdb19221a24fb61",
  • "code": "on-hand"
}

Get inventory attribute by code

Retrieves details of a specific attribute by specified attribute code

Request
path Parameters
code
required
string

Attribute code

Example: on-hand
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

get/api/v2/inventory/attribute/{code}
Response samples
application/json
{
  • "id": "622786ae0bdb19221a24fb61",
  • "code": "on-hand"
}

Counter

Counter refers to inventory positions such as, available, in-transit, on-hand, or other custom positions. These endpoints let you read, update, and create custom counters that suit your business use case.

Create counter

Creates counter (also known as inventory position) for better tracking of inventories.

Request
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Request Body schema: application/json
name
string

Name of the counter to be created

code
string

Counter code that is used to identify a counter

Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

post/api/v2/inventory/counter
Request samples
application/json
{
  • "name": "On Hand",
  • "code": "on-hand"
}
Response samples
application/json
{
  • "id": "622786ae0bdb19221a24fb61",
  • "name": "On Hand",
  • "code": "on-hand"
}

Get all counters

Retrieves all the counters that were previously created

Request
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

get/api/v2/inventory/counter
Response samples
application/json
[
  • {
    }
]

Get specific counter

Retrieves details of a specific counter by specified counter code.

Request
path Parameters
code
required
string

Counter code

Example: on-hand
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

get/api/v2/inventory/counter/{code}
Response samples
application/json
{
  • "id": "622786ae0bdb19221a24fb61",
  • "name": "On Hand",
  • "code": "on-hand"
}

Update specific counter

Updates a specific counter based on specified counter-code

Request
path Parameters
code
required
string

Counter code

Example: on-hand
header Parameters
required
object (SiteContext)

JSON object containing channel, account, stage, and date.

Authorization
required
string

Authorization token or access token for the user, provided by fabric.

Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjIyMTU4...
Request Body schema: application/json
name
string

Name of the counter

Responses
200

OK

400

Client Error

404

Not Found

500

Internal Server Error

put/api/v2/inventory/counter/{code}
Request samples
application/json
{
  • "name": "On Hand"
}
Response samples
application/json
{
  • "id": "622786ae0bdb19221a24fb61",
  • "name": "On Hand",
  • "code": "on-hand"
}