Order User Guides
- Overview
- Order Management
- Order Fulfillment Logic
- Activity Log
- Settings
Inventory User Guides
Orders API Endpoints
- 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 API Endpoints
- Inventory (3.0.0)
- Inventory FAQ
- Imports
- Counters
- Inventory
- Locations
- Networks
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.
0
Maximum number of records per page
1 <= x <= 100
10
Body
Sample request to search allocations
Criteria to find allocations by a single value. Condition between field
and value
is anything except IN and NIN when valueSearchFilter
is used.
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
"EQ"
Field name
"allocation.type"
The name of the group.
"GroupA"
A single value for field
using which allocation details are searched
"SHIPPING"
Property by which data is sorted
"+allocation.createdAt"
The stats filter resource.
A list of fields for the stats type.
"allocation.channelId, allocation.statusCode"
The stats type.
COUNT
, SUM
, AVG
"COUNT"
A field used to UnwindOn/Flatten a resource.
"allocation.items"
Response
Allocation search response details
Allocation response details
24-character system-generated allocation ID
"62ff5c0bec0aed3c86202c32"
Merchant-specified unique ID. If omitted, this is generated by fabric’s sequence generator using Configuration service.
"62ff5c0bec0aed3c86202c32"
System-generated time of allocation record creation
"2022-08-01T18:03:28.483971941Z"
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.
"1234B"
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
.
2
Merchant-specified unique number assigned to each allocation. If omitted, is this generated by fabric’s sequence generator using Configuration service
13000004
Change history details
Audit log to capture change history
Amount for which audit's done
2.4
System-generated audit ID (UUID format)
"a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111"
Audit type such as cancel, return, etc.
"CANCEL"
Audit time (UTC)
"2023-03-12T09:24:54.804Z"
Employee (ID or name) who made the last update
"6227"
true: Update operation (any update to the service) is successful. false: Update operation has failed.
true
Merchant-defined unique identifier for each item in an order. When omitted, fabric will generate it during order creation, in UUID format.
"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569"
Item identifier
1
Additional info, if any
"Note"
Configurable in Copilot as per requirement. If omitted, default policy is used.
"POS"
Ordered quantity of given item
1
Merchant-defined reason code, varies from merchant to merchant
"Scratched item"
Stock keeping unit (SKU), unique item identifier
"SKU0023"
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.
"POS"
Merchant-defined sub reason code; provides more clarity to audit reason
"Scratched item"
Currency
"USD"
A list of decision contexts.
List of items to be shipped
The details of the allocation item.
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.
3
System-generated unique identifier of item from fabric Products (previously called PIM) service
100064
Requested quantity of the item
3
Stock Keeping Unit (SKU), unique identifier of item
"123k4h123k"
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.
"EA"
Sales channel ID
"4a35cc1b-4e15-46df-96c9-38a697d88dfe"
The total cost of all the items. This value is calculated based on the unit price and requested quantity.
150.6
Estimated delivery date of the item
"2022-08-01T18:03:28.483971941Z"
Current status of item
CANCELLED
, REFUNDED
, ALLOCATED
, REALLOCATED
, SHIPPED
, PENDING_ALLOCATION
, PARTIALLY_ALLOCATED
, PARTIALLY_SHIPPED
, PARTIALLY_CANCELLED
, PENDING_REALLOCATION
"PARTIALLY_ALLOCATED"
An optional notes section. This section can be used by a customer service representative (CSR) to record notes on an allocation.
An order note added by a CSR.
The time the note was created in UTC format.
"2022-05-12T09:30:31.198Z"
Optional additional info about the order.
"Fragile - handle with care"
The Customer Service Representative or Employee (ID or name) who created the note.
"62272e917b12209e68751d94"
24-character system-generated order ID
"62f3982438bcab1951be0a19"
Order line ID for tracking purpose
"134fqfaa532qrf"
Reference order line number for tracking purpose
1
Merchant-defined order identifier. If omitted, this is generated by fabric’s sequence generator using Configuration service.
"123k4h123k"
Merchant-specified order creation time (UTC) of the item
"2022-08-01T18:03:28.483971941Z"
Unique number allocated to each item of the parent allocation (the very first allocation)
3
Unite price of the item
50.2
Reason for reallocation
"Reallocating due to unavailability of location number"
Reference ID of allocationRequestId
that's being reallocated
"123k4h123k"
A valid predefined reason code for reshipping the item
"Stock refilled"
Total number of line items scratched or canceled
1
A valid predefined reason code for scratching or canceling the item
"Out of stock"
Total number of line items shipped
1
Item weight during shipment
5.5
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.
"WEB_SHIP"
Inventory location type such as, DC or Store from where the order is picked up
"DC"
fabric system-generated time when allocation service sent event notification to package tracking service.
"2022-08-01T18:03:28.483971941Z"
During allocation creation, this attribute is inherited from fabric Orders and includes subtypes such as IOS, ANDROID, INTERNATIONAL, among others.
"ANDROID"
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.
"62ff5c0bec0aed3c86202c32"
In case of reallocation, it keeps track of previously allocated location numbers.
Previously allocated location numbers
Recipient details like name, email address, and phone number
Order pickup details
Contact person's email
"test@example.com"
Order pickup type
PRIMARY
, ALTERNATE
"PRIMARY"
Address details
Address line 1
"123 Main St."
City name
"Seattle"
ISO 3166-1 alpha-2 based country code
"US"
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.
47.6205
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.
-122.3493
Postal or ZIP code
"98121"
Region or state
"WA"
Address type
"Home"
Address line 2
"Suite 100"
Address line 3
"Seventh floor"
Address line 4
"Attention: Pat E. Kake"
Contact person's email
"test@example.com"
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>
"98ff5c0bec0aed3c86202c32"
Shipping method. This attribute is inherited from order.shipInfo
during allocation creation.
"Parcel Post Delivery"
This attribute is inherited from order.shipInfo
during allocation creation. Acceptable value: SHIP_TO_ADDRESS, CUSTOMER_PICKUP, PICKUP, SDD, SHIP_TO_STORE
"SHIP_TO_ADDRESS"
Time of order shipment, generated by allocation service when shipment service calls allocation after shipment is created.
"2022-08-01T20:03:28.483971941Z"
Allocation status
ALLOCATED
, PENDING_DROP
, PENDING_ALLOCATION
, PENDING_PICK
, SHIPPED
, PARTIALLY_SHIPPED
, REALLOCATED
, CANCELLED
, PARTIALLY_CANCELLED
, PENDING_REALLOCATION
, PARTIAL_PENDING_REALLOCATION
"ALLOCATED"
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
"ALLOCATED"
System-generated time when allocation record was last modified
"2022-08-01T20:03:28.483971941Z"
Pagination response
Total number of search results
1000
Maximum number of records per page
1 <= x <= 100
10
Number of records to skip before returning all records. For example, offset=20, limit=10
returns records 21-30.
x >= 0
1
A list of stats.
The stats details.
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>"
]
}