Getting Started
Authentication v3
- Concepts
- System Apps
- User Apps
- Authentication Endpoints
Product Catalog
- Product Catalog API - Overview
- Developer Guide
- Data Ingestion Best Practices
- Attributes & Attribute Mapping
- Categories
- Products
- Collections
- Background Jobs
- Bulk Import & Export
- Published Products
Orders
- Orders (3.0.0)
- Developer Guide
- Orders FAQ
- Shopping Lists
- Shipping Methods
- Imports
- Exports
- Orders
- Frauds
- Notifications
- Backorders Preorders
- Cancellations
- Allocations
- Shipments
- Inventory Transfers
- Tracking
- Invoices
- Payments
- Credits
- Appeasements
- Returns
Inventory
- Inventory (3.0.0)
- Inventory FAQ
- Imports
- Counters
- Inventory
- Locations
- Networks
Integrations
Offers
- Offers (3.0.0)
- Developer Guide
- Real-time Pricing Engine
- Price Lists
- Prices
- Price Types
- Price Controls
- Price Methods
- Priced Products
- Add-ons
- Promotions
- Coupons
- Coupon Codes
- Redemptions
- Product Exclusion Lists
- Segments
- Imports
- Exports
- Attributes
- Webhook Events
Carts
- Overview
- Developer Guides
- Carts
- Order Draft
- Items
- Addresses
- Payments
- Fulfillment
- Customer
- Coupons
- Validations
- Cart Orchestrator
Customers
- Customer Profile
- Customer Address
- Customer Self
Search for allocations by query
Search for inventory allocations based on the matching filter criteria.
curl --request POST \
--url https://api.fabric.inc/v3/allocations/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-channel-id: <x-fabric-channel-id>' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '{
"filters": [
{
"condition": "EQ",
"field": "allocation.items.orderId",
"value": "Order_*"
},
{
"condition": "IN",
"field": "allocation.items.itemId",
"value": [
"Item_1122",
"Item_2233"
]
}
],
"sort": "-allocation.createdAt"
}'
{
"data": [
{
"allocationId": "62ff5c0bec0aed3c86202c32",
"allocationNumber": 13000004,
"allocationRequestId": "62ff5c0bec0aed3c86202c32",
"auditLogs": [
{
"amount": 2.4,
"auditId": "a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111",
"auditType": "CANCEL",
"auditedAt": "2023-03-12T09:24:54.804Z",
"employeeId": "6227",
"isSuccess": true,
"lineItemId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",
"lineItemNumber": 1,
"note": "Note",
"paymentToken": {
"paymentType": "VISA",
"token": "pi_34tr6787rt"
},
"policyCode": "POS",
"quantity": 1,
"reasonCode": "Scratched item",
"sku": "SKU0023",
"source": "POS",
"subReasonCode": "Scratched item",
"updatedFields": [
{
"fieldName": "UOM",
"fieldOriginalValue": "PK"
}
]
}
],
"createdAt": "2022-08-01T18:03:28.483971941Z",
"currency": "USD",
"decisionContexts": [
{
"allocatedOrderLineIds": [
"<string>"
],
"methodConfigs": {},
"methodName": "<string>",
"ruleName": "<string>",
"ruleSetId": "<string>",
"ruleSetVersion": "<string>"
}
],
"items": [
{
"allocationLineNumber": 3,
"channelId": "4a35cc1b-4e15-46df-96c9-38a697d88dfe",
"cost": 150.6,
"estimatedDeliveryDate": "2022-08-01T18:03:28.483971941Z",
"itemId": 100064,
"itemStatus": "PARTIALLY_ALLOCATED",
"notes": [
{
"createdAt": "2022-05-12T09:30:31.198Z",
"notes": "Fragile - handle with care",
"user": "62272e917b12209e68751d94"
}
],
"orderId": "62f3982438bcab1951be0a19",
"orderLineId": "134fqfaa532qrf",
"orderLineNumber": 1,
"orderNumber": "123k4h123k",
"orderedAt": "2022-08-01T18:03:28.483971941Z",
"parentAllocationLineNumber": 3,
"price": 50.2,
"quantity": 3,
"reallocationReasonCode": "Reallocating due to unavailability of location number",
"reallocationRequestId": "123k4h123k",
"reshipReasonCode": "Stock refilled",
"scratchQuantity": 1,
"scratchedReasonCode": "Out of stock",
"shippedQuantity": 1,
"sku": "123k4h123k",
"uom": "EA",
"weight": 5.5
}
],
"itemsType": "WEB_SHIP",
"locationNumber": "1234B",
"locationType": "DC",
"notifiedToPPSAt": "2022-08-01T18:03:28.483971941Z",
"orderSubType": "ANDROID",
"parentAllocationId": "62ff5c0bec0aed3c86202c32",
"previousAllocatedLocationNums": [
"410"
],
"recipients": [
{
"email": "test@example.com",
"name": {
"firstName": "Alex",
"lastName": "Doe",
"middleName": "E"
},
"phone": {
"number": "123-456-7890",
"type": "MOBILE"
},
"pickupType": "PRIMARY"
}
],
"shipToAddress": {
"addressLine1": "123 Main St.",
"addressLine2": "Suite 100",
"addressLine3": "Seventh floor",
"addressLine4": "Attention: Pat E. Kake",
"city": "Seattle",
"countryCode": "US",
"email": "test@example.com",
"latitude": 47.6205,
"longitude": -122.3493,
"name": {
"firstName": "Alex",
"lastName": "Doe",
"middleName": "E"
},
"phone": {
"number": "123-456-7890",
"type": "MOBILE"
},
"postalCode": "98121",
"region": "WA",
"type": "Home"
},
"shipToId": "98ff5c0bec0aed3c86202c32",
"shipmentMethod": "Parcel Post Delivery",
"shipmentType": "SHIP_TO_ADDRESS",
"shippedAt": "2022-08-01T20:03:28.483971941Z",
"statusCode": "ALLOCATED",
"type": "ALLOCATED",
"updatedAt": "2022-08-01T20:03:28.483971941Z",
"version": 2
}
],
"pagination": {
"count": 1000,
"limit": 10,
"offset": 1
},
"stats": [
"<string>"
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
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. This header is required.
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.
Unique request ID
Query Parameters
Number of records to be skipped before returning all records. Default is 0
when no value is specified.
Maximum number of records per page
1 < x < 100
Body
Sample request to search allocations
Filter conditions. EQ (Equal to): Searches for exact match. NEQ (Not equal to): Searches by excluding the specified value. IN: Search for multiple values. NIN (Not IN): Excludes the specified values in the search. LT (Less than): Searches for values that are less than the specified value. GT (Greater than): Search for values that are greater than the specified value. LTE (Less than or equal to): Searches for values that are less than or equal to the specified value. GTE (Greater than or equal to): Searches for values that are greater than or equal to the specified value.
EQ
, NEQ
, IN
, NIN
, LT
, GT
, LTE
, GTE
Field name
The name of the group.
A single value for field
using which allocation details are searched
Property by which data is sorted
Response
Allocation search response details
24-character system-generated allocation ID
Merchant-specified unique ID. If omitted, this is generated by fabric’s sequence generator using Configuration service.
System-generated time of allocation record creation
Inventory location number to identify ship-from location or Buy Online Pickup from Store (BOPIS) location. This must be the locationNumber
stored in the fabric Location service.
Allocation document version. The version number is incremented each time the allocation document undergoes an update. Update to an allocation document happens automatically when the status changes from one state to another based on the statusCode
.
Merchant-specified unique number assigned to each allocation. If omitted, is this generated by fabric’s sequence generator using Configuration service
Change history details
Amount for which audit's done
Audit time (UTC)
System-generated audit ID (UUID format)
Audit type such as cancel, return, etc.
Employee (ID or name) who made the last update
true: Update operation (any update to the service) is successful. false: Update operation has failed.
Merchant-defined unique identifier for each item in an order. When omitted, fabric will generate it during order creation, in UUID format.
Item identifier
Additional info, if any
Configurable in Copilot as per requirement. If omitted, default policy is used.
Ordered quantity of given item
Merchant-defined reason code, varies from merchant to merchant
Stock keeping unit (SKU), unique item identifier
Merchant-defined source from where the update was initiated. There are no predefined values; possible values could be Customer Service Representative (CSR), Point-of-Sale (POS), etc.
Merchant-defined sub reason code; provides more clarity to audit reason
Currency
A list of decision contexts.
List of items to be shipped
A unique number assigned by merchant to identify an item in an allocation. When this value is not provided, fabric auto generates it in a UUID format during the allocation creation.
System-generated unique identifier of item from fabric Products (previously called PIM) service
Requested quantity of the item
Stock Keeping Unit (SKU), unique identifier of item
Unit in which a product is sold or measured. It's important for accurately fulfilling orders and ensuring customers receive the correct quantity of products they have ordered. The possible values are EA (Each) or GAL (Gallon), DZ (Dozen), etc.
Sales channel ID
The total cost of all the items. This value is calculated based on the unit price and requested quantity.
Estimated delivery date of the item
Current status of item
CANCELLED
, REFUNDED
, ALLOCATED
, REALLOCATED
, SHIPPED
, PENDING_ALLOCATION
, PARTIALLY_ALLOCATED
, PARTIALLY_SHIPPED
, PARTIALLY_CANCELLED
, PENDING_REALLOCATION
An optional notes section. This section can be used by a customer service representative (CSR) to record notes on an allocation.
Merchant-specified order creation time (UTC) of the item
24-character system-generated order ID
Order line ID for tracking purpose
Reference order line number for tracking purpose
Merchant-defined order identifier. If omitted, this is generated by fabric’s sequence generator using Configuration service.
Unique number allocated to each item of the parent allocation (the very first allocation)
Unite price of the item
Reason for reallocation
Reference ID of allocationRequestId
that's being reallocated
A valid predefined reason code for reshipping the item
A valid predefined reason code for scratching or canceling the item
Total number of line items scratched or canceled
Total number of line items shipped
Item weight during shipment
This is an inherited attribute from Orders that pertains to item types such as WEB_SHIP, WEB_PICKUP, WEB_SDD INTERNATIONAL, POS, POS_SHIP, and POS_PICKUP.
Inventory location type such as, DC or Store from where the order is picked up
fabric system-generated time when allocation service sent event notification to package tracking service.
During allocation creation, this attribute is inherited from fabric Orders and includes subtypes such as IOS, ANDROID, INTERNATIONAL, among others.
Allocation ID that's generated while creating the allocation for the first time. Initially this will be the same as allocationRequestId
. If there is a reallocation, the parentAllocationId
will be assigned the same value as the initial allocationRequestId
, and will serve as a means of monitoring all subsequent child allocations.
In case of reallocation, it keeps track of previously allocated location numbers.
Recipient details like name, email address, and phone number
Contact person's email
Order pickup type
PRIMARY
, ALTERNATE
Shipping method. This attribute is inherited from order.shipInfo
during allocation creation.
This attribute is inherited from order.shipInfo
during allocation creation. Acceptable value: SHIP_TO_ADDRESS, CUSTOMER_PICKUP, PICKUP, SDD, SHIP_TO_STORE
Time of order shipment, generated by allocation service when shipment service calls allocation after shipment is created.
Address details
Address line 1
City name
ISO 3166-1 alpha-2 based country code
Address latitude, used with longitude
to specify the address location. Decimal degrees format; negative is degrees South. **Note:**Value must be between -90 and 90, both inclusive.
Address longitude, used with latitude
to specify the address location. Decimal degrees format; negative is degrees South. **Note:**Value must be between -180 and 180, both inclusive.
Postal or ZIP code
Region or state
Address type
Address line 2
Address line 3
Address line 4
Contact person's email
System-generated UUID associated with shipInfo
, generated from CnC service. <p> Note: An order can have multiple ship-to (delivery) locations and items going to the same location have one shipToId
. </p>
Allocation status
ALLOCATED
, PENDING_DROP
, PENDING_ALLOCATION
, PENDING_PICK
, SHIPPED
, PARTIALLY_SHIPPED
, REALLOCATED
, CANCELLED
, PARTIALLY_CANCELLED
, PENDING_REALLOCATION
, PARTIAL_PENDING_REALLOCATION
Allocation type ALLOCATED: Order is allocated for fulfillment SCRATCHED: Order is canceled during allocation due to unavailability of inventory RETURNED: Allocation created for the return items
ALLOCATED
, SCRATCHED
, RETURNED
System-generated time when allocation record was last modified
Pagination response
Total number of search results
Maximum number of records per page
1 < x < 100
Number of records to skip before returning all records. For example, offset=20, limit=10
returns records 21-30.
x > 0
A list of stats.
Was this page helpful?
curl --request POST \
--url https://api.fabric.inc/v3/allocations/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-channel-id: <x-fabric-channel-id>' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '{
"filters": [
{
"condition": "EQ",
"field": "allocation.items.orderId",
"value": "Order_*"
},
{
"condition": "IN",
"field": "allocation.items.itemId",
"value": [
"Item_1122",
"Item_2233"
]
}
],
"sort": "-allocation.createdAt"
}'
{
"data": [
{
"allocationId": "62ff5c0bec0aed3c86202c32",
"allocationNumber": 13000004,
"allocationRequestId": "62ff5c0bec0aed3c86202c32",
"auditLogs": [
{
"amount": 2.4,
"auditId": "a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111",
"auditType": "CANCEL",
"auditedAt": "2023-03-12T09:24:54.804Z",
"employeeId": "6227",
"isSuccess": true,
"lineItemId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",
"lineItemNumber": 1,
"note": "Note",
"paymentToken": {
"paymentType": "VISA",
"token": "pi_34tr6787rt"
},
"policyCode": "POS",
"quantity": 1,
"reasonCode": "Scratched item",
"sku": "SKU0023",
"source": "POS",
"subReasonCode": "Scratched item",
"updatedFields": [
{
"fieldName": "UOM",
"fieldOriginalValue": "PK"
}
]
}
],
"createdAt": "2022-08-01T18:03:28.483971941Z",
"currency": "USD",
"decisionContexts": [
{
"allocatedOrderLineIds": [
"<string>"
],
"methodConfigs": {},
"methodName": "<string>",
"ruleName": "<string>",
"ruleSetId": "<string>",
"ruleSetVersion": "<string>"
}
],
"items": [
{
"allocationLineNumber": 3,
"channelId": "4a35cc1b-4e15-46df-96c9-38a697d88dfe",
"cost": 150.6,
"estimatedDeliveryDate": "2022-08-01T18:03:28.483971941Z",
"itemId": 100064,
"itemStatus": "PARTIALLY_ALLOCATED",
"notes": [
{
"createdAt": "2022-05-12T09:30:31.198Z",
"notes": "Fragile - handle with care",
"user": "62272e917b12209e68751d94"
}
],
"orderId": "62f3982438bcab1951be0a19",
"orderLineId": "134fqfaa532qrf",
"orderLineNumber": 1,
"orderNumber": "123k4h123k",
"orderedAt": "2022-08-01T18:03:28.483971941Z",
"parentAllocationLineNumber": 3,
"price": 50.2,
"quantity": 3,
"reallocationReasonCode": "Reallocating due to unavailability of location number",
"reallocationRequestId": "123k4h123k",
"reshipReasonCode": "Stock refilled",
"scratchQuantity": 1,
"scratchedReasonCode": "Out of stock",
"shippedQuantity": 1,
"sku": "123k4h123k",
"uom": "EA",
"weight": 5.5
}
],
"itemsType": "WEB_SHIP",
"locationNumber": "1234B",
"locationType": "DC",
"notifiedToPPSAt": "2022-08-01T18:03:28.483971941Z",
"orderSubType": "ANDROID",
"parentAllocationId": "62ff5c0bec0aed3c86202c32",
"previousAllocatedLocationNums": [
"410"
],
"recipients": [
{
"email": "test@example.com",
"name": {
"firstName": "Alex",
"lastName": "Doe",
"middleName": "E"
},
"phone": {
"number": "123-456-7890",
"type": "MOBILE"
},
"pickupType": "PRIMARY"
}
],
"shipToAddress": {
"addressLine1": "123 Main St.",
"addressLine2": "Suite 100",
"addressLine3": "Seventh floor",
"addressLine4": "Attention: Pat E. Kake",
"city": "Seattle",
"countryCode": "US",
"email": "test@example.com",
"latitude": 47.6205,
"longitude": -122.3493,
"name": {
"firstName": "Alex",
"lastName": "Doe",
"middleName": "E"
},
"phone": {
"number": "123-456-7890",
"type": "MOBILE"
},
"postalCode": "98121",
"region": "WA",
"type": "Home"
},
"shipToId": "98ff5c0bec0aed3c86202c32",
"shipmentMethod": "Parcel Post Delivery",
"shipmentType": "SHIP_TO_ADDRESS",
"shippedAt": "2022-08-01T20:03:28.483971941Z",
"statusCode": "ALLOCATED",
"type": "ALLOCATED",
"updatedAt": "2022-08-01T20:03:28.483971941Z",
"version": 2
}
],
"pagination": {
"count": 1000,
"limit": 10,
"offset": 1
},
"stats": [
"<string>"
]
}