Receive inventory tracking - Fabric
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
cURL
curl --request POST \
--url https://api.fabric.inc/v3/shipments/inventory-transfer/{transferShipmentId}/action/receiving \
--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 '
{
"cartons": [
{
"cartonNumber": "1",
"items": [
{
"quantity": 1,
"shipmentLineItemId": "13432-34343-34343-3434",
"adjustments": [
{
"adjustmentQuantity": 2,
"attributes": {
"attribute1": "value"
},
"reasonCode": "DAMAGED",
"subReasonCode": "DAMAGED"
}
],
"attributes": {
"attribute1": "value"
}
}
]
}
]
}
'
Python Example
import requests
url = "https://api.fabric.inc/v3/shipments/inventory-transfer/{transferShipmentId}/action/receiving"
payload = { "cartons": [
{
"cartonNumber": "1",
"items": [
{
"quantity": 1,
"shipmentLineItemId": "13432-34343-34343-3434",
"adjustments": [
{
"adjustmentQuantity": 2,
"attributes": { "attribute1": "value" },
"reasonCode": "DAMAGED",
"subReasonCode": "DAMAGED"
}
],
"attributes": { "attribute1": "value" }
}
]
}
] }
headers = {
"x-fabric-tenant-id": "<x-fabric-tenant-id>",
"x-fabric-channel-id": "<x-fabric-channel-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
Response Object
Here’s an example of what you can expect from the response:
{
"shipFrom": {
"locationNumber": "WH334",
"locationName": "Store1",
"locationType": "STORE",
"shipFromAddress": {
"address1": "House No 129",
"address2": "10 Downing Street",
"city": "Beaumont",
"country": "USA",
"postalCode": "77705",
"state": "TX"
}
},
"shipTo": {
"locationNumber": "WH334",
"locationName": "Store1",
"locationType": "STORE",
"shipToAddress": {
"addressLine1": "254 House number",
"city": "New York",
"country": "USA",
"postalCode": "1003",
"state": "NY"
}
},
"shipmentNumber": "78974156816152",
"transferId": "112345678912340",
"transferNumber": "112345678912340",
"attributes": {
"attribute1": "value"
},
"cartons": [
{
"cartonNumber": "1",
"items": [
{
"quantity": 1,
"shipmentLineItemId": "13432-34343-34343-3434"
}
]
}
],
"createdAt": "2022-06-06T07:58:30.996Z",
"statusCode": "TRANSFER_SHIPMENT_CREATED",
"totalCartons": 2
}
Error Responses
Example of error response when the request is invalid:
{
"errors": [
{
"message": "Invalid request",
"type": "CLIENT_ERROR"
}
],
"message": "Bad request",
"type": "CLIENT_ERROR"
}