Skip to main content

Inventory API

Authentication: every request needs an IdToken — see Authentication. Error shapes: Errors.

Endpoint: POST https://api.xemelgo.com/graphql

Queries​

inventory​

Retrieve a paginated list of inventory items, optionally filtered.

query Inventory($input: InventoryInput) {
inventory(input: $input) {
nextToken
inventory {
comments
consumedDate
containerId
creationDate
customerPartNumber
customProperties
description
expirationDate
id
images
isConsumed
lastDetectionDate
lastUpdatedDate
lotNumber
name
quantity
state
transferOrderId
transferStatus
uuid
lastDetectedAtLocation {
id
name
}
location {
id
name
}
part {
id
name
number
}
trackers {
serial
}
}
}
}
Example variables
{
"input": {
"filter": "name:\"Forklift*\"",
"nextToken": "eyJpZCI6IjEwMjQifQ=="
}
}
Example response
{
"data": {
"inventory": {
"nextToken": "eyJpZCI6IjEwMjQifQ==",
"inventory": [
{
"comments": "Inspected and approved",
"consumedDate": 1719792000000,
"containerId": "container-001",
"creationDate": 1719792000000,
"customerPartNumber": "example",
"customProperties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"description": "Electric counterbalance forklift",
"expirationDate": 1719792000000,
"id": "inventory-001",
"images": [
"https://cdn.example.com/asset-1024.png"
],
"isConsumed": true,
"lastDetectionDate": 1719792000000,
"lastUpdatedDate": 1719792000000,
"lotNumber": "example",
"name": "Forklift 7",
"quantity": 1,
"state": "ACTIVE",
"transferOrderId": "transferorder-001",
"transferStatus": "example",
"uuid": "uu-001",
"lastDetectedAtLocation": {
"id": "location-001",
"name": "Forklift 7"
},
"location": {
"id": "location-001",
"name": "Forklift 7"
},
"part": {
"id": "inventorypart-001",
"name": "Forklift 7",
"number": "AST-1024"
},
"trackers": [
{
"serial": "E28011700000020ABC12345"
}
]
}
]
}
}
}

Arguments​

input · InventoryInput

InventoryInput​

Input for the inventory query.

FieldTypeDescription
filterStringFilter expression on inventory item properties.
nextTokenStringPagination token from a previous response to fetch the next page.

Returns​

InventoryPayload

InventoryPayload​

Result of the inventory query.

FieldTypeDescription
inventory[Inventory!]!The matching inventory items.
nextTokenStringPagination token to fetch the next page, if any.

inventoryPartLocationMetrics​

Returns aggregated inventory metrics per part at each location.

query InventoryPartLocationMetrics($input: InventoryPartLocationMetricsInput) {
inventoryPartLocationMetrics(input: $input) {
nextToken
inventoryParts {
customerOnHandCount
customProperties
lowStockCount
outOfStockCount
totalCount
location {
id
name
}
}
}
}
Example variables
{
"input": {
"filter": "name:\"Forklift*\"",
"nextToken": "eyJpZCI6IjEwMjQifQ=="
}
}
Example response
{
"data": {
"inventoryPartLocationMetrics": {
"nextToken": "eyJpZCI6IjEwMjQifQ==",
"inventoryParts": [
{
"customerOnHandCount": 10,
"customProperties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"lowStockCount": 10,
"outOfStockCount": 10,
"totalCount": 10,
"location": {
"id": "location-001",
"name": "Forklift 7"
}
}
]
}
}
}

Arguments​

input · InventoryPartLocationMetricsInput

InventoryPartLocationMetricsInput​

Input for the inventoryPartLocationMetrics query, supporting filtering and pagination.

FieldTypeDescription
filterStringFilter expression to select which inventory parts and locations to aggregate.
nextTokenStringPagination token to retrieve the next page of results.

Returns​

InventoryPartLocationMetricsPayload

InventoryPartLocationMetrics​

Aggregated inventory metrics for a single part at a single location.

FieldTypeDescription
customPropertiesAWSJSONAdditional custom properties, serialized as a JSON string.
customerOnHandCountIntNumber of units on hand attributed to the customer.
locationLocationV2Location these metrics are scoped to.
lowStockCountIntNumber of parts below their low-stock threshold at this location.
outOfStockCountIntNumber of parts out of stock at this location.
totalCountIntTotal number of units of this part at this location.
InventoryPartLocationMetricsPayload​

Result of the inventoryPartLocationMetrics query.

FieldTypeDescription
inventoryParts[InventoryPartLocationMetrics!]!Per-part, per-location inventory metrics for this page.
nextTokenStringPagination token to retrieve the next page of results.

inventoryPartMetrics​

Returns aggregated inventory metrics per part (item type).

query InventoryPartMetrics($input: InventoryPartMetricsInput) {
inventoryPartMetrics(input: $input) {
nextToken
inventoryParts {
customerOnHandCount
customProperties
expiredCount
expiringSoonCount
incomingCount
missingCount
onHandCount
stockCount
totalCount
location {
id
name
}
part {
id
name
number
}
}
}
}
Example variables
{
"input": {
"filter": "name:\"Forklift*\"",
"nextToken": "eyJpZCI6IjEwMjQifQ=="
}
}
Example response
{
"data": {
"inventoryPartMetrics": {
"nextToken": "eyJpZCI6IjEwMjQifQ==",
"inventoryParts": [
{
"customerOnHandCount": 10,
"customProperties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"expiredCount": 10,
"expiringSoonCount": 10,
"incomingCount": 10,
"missingCount": 10,
"onHandCount": 10,
"stockCount": 10,
"totalCount": 10,
"location": {
"id": "location-001",
"name": "Forklift 7"
},
"part": {
"id": "inventorypart-001",
"name": "Forklift 7",
"number": "AST-1024"
}
}
]
}
}
}

Arguments​

input · InventoryPartMetricsInput

InventoryPartMetricsInput​

Input for the inventoryPartMetrics query, supporting filtering and pagination.

FieldTypeDescription
filterStringFilter expression to select which inventory parts to aggregate.
nextTokenStringPagination token to retrieve the next page of results.

Returns​

InventoryPartMetricsPayload

InventoryPartMetrics​

Aggregated inventory metrics for a single part (item type).

FieldTypeDescription
customPropertiesAWSJSONAdditional custom properties, serialized as a JSON string.
customerOnHandCountIntNumber of units on hand attributed to the customer.
expiredCountIntNumber of units past their expiry date.
expiringSoonCountIntNumber of units expiring soon.
incomingCountIntNumber of units inbound (on order) for this part.
locationLocationV2Location these metrics are scoped to.
missingCountIntNumber of units expected but not detected.
onHandCountIntNumber of units physically on hand.
partInventoryPartThe inventory part (item type) these metrics describe.
stockCountIntNumber of units currently in stock.
totalCountIntTotal number of units across all states.
InventoryPartMetricsPayload​

Result of the inventoryPartMetrics query.

FieldTypeDescription
inventoryParts[InventoryPartMetrics!]!Per-part inventory metrics for this page.
nextTokenStringPagination token to retrieve the next page of results.

inventoryParts​

Retrieve a paginated list of inventory parts (item types), optionally filtered.

query InventoryParts($input: InventoryPartsInput) {
inventoryParts(input: $input) {
nextToken
inventoryParts {
creationDate
customProperties
description
id
images
lastUpdatedDate
name
number
quantity
unit
uuid
categories {
id
name
}
customerPartNumbers {
customerId
customerPartNumber
}
supplier {
id
name
}
}
}
}
Example variables
{
"input": {
"filter": "name:\"Forklift*\"",
"nextToken": "eyJpZCI6IjEwMjQifQ=="
}
}
Example response
{
"data": {
"inventoryParts": {
"nextToken": "eyJpZCI6IjEwMjQifQ==",
"inventoryParts": [
{
"creationDate": 1719792000000,
"customProperties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"description": "Electric counterbalance forklift",
"id": "inventorypart-001",
"images": [
"https://cdn.example.com/asset-1024.png"
],
"lastUpdatedDate": 1719792000000,
"name": "Forklift 7",
"number": "AST-1024",
"quantity": 10,
"unit": "EA",
"uuid": "uu-001",
"categories": [
{
"id": "inventorypartcategory-001",
"name": "Forklift 7"
}
],
"customerPartNumbers": [
{
"customerId": "customer-001",
"customerPartNumber": "example"
}
],
"supplier": {
"id": "customer-001",
"name": "Forklift 7"
}
}
]
}
}
}

Arguments​

input · InventoryPartsInput

InventoryPartsInput​

Input for the inventoryParts query.

FieldTypeDescription
filterStringFilter expression on inventory part properties.
nextTokenStringPagination token from a previous response to fetch the next page.

Returns​

InventoryPartsPayload

InventoryPartsPayload​

Result of the inventoryParts query.

FieldTypeDescription
inventoryParts[InventoryPart!]!The matching inventory parts.
nextTokenStringPagination token to fetch the next page, if any.

inventoryRoute​

Retrieve the movement history of an inventory item across locations.

query InventoryRoute($input: InventoryRouteInput) {
inventoryRoute(input: $input) {
nextToken
route {
customProperties
duration
endDate
startDate
state
location {
id
name
}
}
}
}
Example variables
{
"input": {
"endDate": 1719792000000,
"id": "inventoryroute-001",
"nextToken": "eyJpZCI6IjEwMjQifQ==",
"startDate": 1719792000000
}
}
Example response
{
"data": {
"inventoryRoute": {
"nextToken": "eyJpZCI6IjEwMjQifQ==",
"route": [
{
"customProperties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"duration": 1719792000000,
"endDate": 1719792000000,
"startDate": 1719792000000,
"state": "ACTIVE",
"location": {
"id": "location-001",
"name": "Forklift 7"
}
}
]
}
}
}

Arguments​

input · InventoryRouteInput

InventoryRouteInput​

Input for the inventoryRoute query.

FieldTypeDescription
endDateAWSTimestampEpoch-millisecond timestamp marking the end of the route window.
idString!Unique identifier of the inventory item whose route is requested.
nextTokenStringPagination token from a previous response to fetch the next page.
startDateAWSTimestampEpoch-millisecond timestamp marking the start of the route window.

Returns​

InventoryRoutePayload

InventoryRoute​

A single segment of an inventory item's movement history.

FieldTypeDescription
customPropertiesAWSJSONAdditional custom properties, serialized as a JSON string.
durationAWSTimestampDuration spent at the location for this segment.
endDateAWSTimestampEpoch-millisecond timestamp when the item left the location.
locationLocationV2Location the item was detected at during this segment.
startDateAWSTimestampEpoch-millisecond timestamp when the item entered the location.
stateStringState of the item during this segment.
InventoryRoutePayload​

Result of the inventoryRoute query.

FieldTypeDescription
nextTokenStringPagination token to fetch the next page, if any.
route[InventoryRoute!]The ordered route segments.

Mutations​

consumeInventory​

Mark one or more inventory items as consumed and return their identifiers.

mutation ConsumeInventory($input: ConsumeInventoryInput!) {
consumeInventory(input: $input) {
inventoryIds
}
}
Example variables
{
"input": {
"inventoryIds": [
"example"
]
}
}
Example response
{
"data": {
"consumeInventory": {
"inventoryIds": [
"example"
]
}
}
}

Arguments​

input · ConsumeInventoryInput!

ConsumeInventoryInput​

Input for the consumeInventory mutation.

FieldTypeDescription
inventoryIds[String!]!Identifiers of the inventory items to mark as consumed.

Returns​

ConsumeInventoryPayload

ConsumeInventoryPayload​

Result of the consumeInventory mutation.

FieldTypeDescription
inventoryIds[String!]!Identifiers of the consumed inventory items.

createInventory​

Creates one or more inventory items. If creation succeeds but complete inventory item details are unavailable, the response includes the created inventory items' id and uuid, along with an error. Do not retry creation for those inventory items.

mutation CreateInventory($input: CreateInventoryInput!) {
createInventory(input: $input) {
inventory {
comments
consumedDate
containerId
creationDate
customerPartNumber
customProperties
description
expirationDate
id
images
isConsumed
lastDetectionDate
lastUpdatedDate
lotNumber
name
quantity
state
transferOrderId
transferStatus
uuid
lastDetectedAtLocation {
id
name
}
location {
id
name
}
part {
id
name
number
}
trackers {
serial
}
}
}
}
Example variables
{
"input": {
"inventory": [
{
"comments": "Inspected and approved",
"customProperties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"customerPartNumber": "example",
"description": "Electric counterbalance forklift",
"expirationDate": 1719792000000,
"id": "createdinventory-001",
"images": [
"https://cdn.example.com/asset-1024.png"
],
"locationId": "location-001",
"lotNumber": "example",
"name": "Forklift 7",
"partId": "part-001",
"partSupplierId": "partsupplier-001",
"quantity": 1,
"trackers": [
{
"customProperties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"encodingFormat": "example",
"reuseTrackerSerial": false,
"serial": "E28011700000020ABC12345"
}
]
}
]
}
}
Example response
{
"data": {
"createInventory": {
"inventory": [
{
"comments": "Inspected and approved",
"consumedDate": 1719792000000,
"containerId": "container-001",
"creationDate": 1719792000000,
"customerPartNumber": "example",
"customProperties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"description": "Electric counterbalance forklift",
"expirationDate": 1719792000000,
"id": "inventory-001",
"images": [
"https://cdn.example.com/asset-1024.png"
],
"isConsumed": true,
"lastDetectionDate": 1719792000000,
"lastUpdatedDate": 1719792000000,
"lotNumber": "example",
"name": "Forklift 7",
"quantity": 1,
"state": "ACTIVE",
"transferOrderId": "transferorder-001",
"transferStatus": "example",
"uuid": "uu-001",
"lastDetectedAtLocation": {
"id": "location-001",
"name": "Forklift 7"
},
"location": {
"id": "location-001",
"name": "Forklift 7"
},
"part": {
"id": "inventorypart-001",
"name": "Forklift 7",
"number": "AST-1024"
},
"trackers": [
{
"serial": "E28011700000020ABC12345"
}
]
}
]
}
}
}

Arguments​

input · CreateInventoryInput!

CreateInventoryInput​

Input for the createInventory mutation.

FieldTypeDescription
inventory[CreatedInventory!]!Inventory items to create.
CreatedInventory​

Definition of a single inventory item to create.

FieldTypeDescription
commentsStringFree-text comments on the item.
customPropertiesAWSJSONAdditional custom properties, serialized as a JSON string.
customerPartNumberStringOptional part number used by your customer.
descriptionStringFree-text description of the item.
expirationDateAWSTimestampEpoch-millisecond timestamp when the item expires.
idString!Serial number of the item; may match the tracker serial when items are not serialized.
images[String]Image URLs for the item.
locationIdStringIdentifier of the location the item is currently being added to.
lotNumberStringLot number of the lot this item belongs to.
nameStringDisplay name of the item.
partIdString!Identifier of the part (item type) this item is an instance of.
partSupplierIdStringSupplier id
quantityFloatQuantity represented by this item.
trackers[TrackerInput!]Trackers to attach to the item.

Returns​

CreateInventoryPayload

CreateInventoryPayload​

Result of the createInventory mutation.

FieldTypeDescription
inventory[Inventory!]The created inventory items.

createInventoryParts​

Create one or more inventory parts (item types) and return their identifiers.

mutation CreateInventoryParts($input: CreateInventoryPartsInput!) {
createInventoryParts(input: $input) {
partIds
}
}
Example variables
{
"input": {
"inventoryParts": [
{
"customProperties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"customerPartNumbers": [
{
"customerId": "customer-001",
"customerPartNumber": "example"
}
],
"description": "Electric counterbalance forklift",
"id": "createinventorypart-001",
"images": [
"https://cdn.example.com/asset-1024.png"
],
"name": "Forklift 7",
"number": "AST-1024",
"quantity": 10,
"supplierId": "supplier-001",
"unit": "EA"
}
]
}
}
Example response
{
"data": {
"createInventoryParts": {
"partIds": [
"example"
]
}
}
}

Arguments​

input · CreateInventoryPartsInput!

CreateInventoryPartInput​

Definition of a single inventory part (item type) to create.

FieldTypeDescription
customPropertiesAWSJSONAdditional custom properties, serialized as a JSON string.
customerPartNumbers[CustomerPartNumberInput!]Per-customer part numbers mapped to this part.
descriptionStringFree-text description of the part.
idString!Unique identifier of the part, usually the item or SKU number; when that number is not unique, combine properties to form a unique value.
images[String!]Image URLs for the part.
nameStringDisplay name of the part.
numberStringPart number.
quantityIntExpected quantity represented by the part.
supplierIdStringSupplier id
unitStringUnit of measure for the part.
CreateInventoryPartsInput​

Input for the createInventoryParts mutation.

FieldTypeDescription
inventoryParts[CreateInventoryPartInput!]Inventory parts (item types) to create.
CustomerPartNumberInput​

Input mapping a customer to its part number for a part.

FieldTypeDescription
customerIdString!Unique identifier of the customer.
customerPartNumberString!The customer's part number for this part.

Returns​

CreateInventoryPartsPayload

CreateInventoryPartsPayload​

Result of the createInventoryParts mutation.

FieldTypeDescription
partIds[String]Identifiers of the created inventory parts.

createItemSet DEPRECATED​

Onboards a set of inventory items as a grouped item set and returns the created set.

mutation CreateItemSet($input: [ItemSetInput!]!) {
createItemSet(input: $input) {
tracker_serials
}
}
Example variables
{
"input": [
{
"category": "example",
"class": "example",
"customer_part_number": "example",
"expiry_date": 1719792000000,
"item_number": "example",
"location": "example",
"lot_number": "example",
"name": "Forklift 7",
"onboarding_location": "example",
"supplier_id": "supplier_-001",
"tenant_properties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"tracker_encoding_format": "example",
"tracker_serial": "E28011700000020ABC12345"
}
]
}
Example response
{
"data": {
"createItemSet": {
"tracker_serials": [
"E28011700000020ABC12345"
]
}
}
}

Arguments​

input · [ItemSetInput!]!

ItemSetInput​

Definition of a single item to onboard as part of an item set.

FieldTypeDescription
categoryStringHigher-level category the item is grouped under.
classStringClass of the item.
customer_part_numberStringCustomer-specific part number for the item.
expiry_dateAWSTimestampEpoch-millisecond timestamp when the item expires.
item_numberStringItem (part) number for the item.
locationStringIdentifier of the location the item is stored at.
lot_numberStringLot number the item belongs to.
nameStringDisplay name of the item.
onboarding_locationStringIdentifier of the location where the item is being onboarded.
supplier_idStringSupplier identifier; attaches an existing supplier or auto-creates one as the item type supplier.
tenant_propertiesAWSJSONAdditional custom properties, serialized as a JSON string.
tracker_encoding_formatStringRFID tag encoding format to assign to the sensor profile on creation.
tracker_serialString!Serial of the RFID tracker to attach to the item.

Returns​

ItemSet

ItemSet​

A set of trackers grouped together when onboarding inventory.

FieldTypeDescription
tracker_serials[String]Serials of the trackers in this set.

deleteInventory​

Permanently delete one or more inventory items and return their identifiers.

mutation DeleteInventory($input: DeleteInventoryInput!) {
deleteInventory(input: $input) {
inventoryIds
}
}
Example variables
{
"input": {
"inventoryIds": [
"example"
]
}
}
Example response
{
"data": {
"deleteInventory": {
"inventoryIds": [
"example"
]
}
}
}

Arguments​

input · DeleteInventoryInput!

DeleteInventoryInput​

Input for the deleteInventory mutation.

FieldTypeDescription
inventoryIds[String!]!Identifiers of the inventory items to delete.

Returns​

DeleteInventoryPayload

DeleteInventoryPayload​

Result of the deleteInventory mutation.

FieldTypeDescription
inventoryIds[String!]!Identifiers of the deleted inventory items.

updateInventory​

Update one or more inventory items and return the updated items.

mutation UpdateInventory($input: UpdateInventoryInput!) {
updateInventory(input: $input) {
inventory {
comments
consumedDate
containerId
creationDate
customerPartNumber
customProperties
description
expirationDate
id
images
isConsumed
lastDetectionDate
lastUpdatedDate
lotNumber
name
quantity
state
transferOrderId
transferStatus
uuid
lastDetectedAtLocation {
id
name
}
location {
id
name
}
part {
id
name
number
}
trackers {
serial
}
}
}
}
Example variables
{
"input": {
"inventory": [
{
"id": "updatedinventory-001",
"updates": {
"addTrackers": [
{
"customProperties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"encodingFormat": "example",
"reuseTrackerSerial": false,
"serial": "E28011700000020ABC12345"
}
],
"comments": "Inspected and approved",
"customProperties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"customerPartNumber": "example",
"description": "Electric counterbalance forklift",
"expirationDate": 1719792000000,
"id": "inventory-001",
"images": [
"https://cdn.example.com/asset-1024.png"
],
"locationId": "location-001",
"lotNumber": "example",
"name": "Forklift 7",
"partId": "part-001",
"quantity": 1,
"removeTrackerSerials": [
"E28011700000020ABC12345"
],
"state": "ACTIVE"
}
}
]
}
}
Example response
{
"data": {
"updateInventory": {
"inventory": [
{
"comments": "Inspected and approved",
"consumedDate": 1719792000000,
"containerId": "container-001",
"creationDate": 1719792000000,
"customerPartNumber": "example",
"customProperties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"description": "Electric counterbalance forklift",
"expirationDate": 1719792000000,
"id": "inventory-001",
"images": [
"https://cdn.example.com/asset-1024.png"
],
"isConsumed": true,
"lastDetectionDate": 1719792000000,
"lastUpdatedDate": 1719792000000,
"lotNumber": "example",
"name": "Forklift 7",
"quantity": 1,
"state": "ACTIVE",
"transferOrderId": "transferorder-001",
"transferStatus": "example",
"uuid": "uu-001",
"lastDetectedAtLocation": {
"id": "location-001",
"name": "Forklift 7"
},
"location": {
"id": "location-001",
"name": "Forklift 7"
},
"part": {
"id": "inventorypart-001",
"name": "Forklift 7",
"number": "AST-1024"
},
"trackers": [
{
"serial": "E28011700000020ABC12345"
}
]
}
]
}
}
}

Arguments​

input · UpdateInventoryInput!

InventoryUpdates​

Fields that can be updated on an inventory item.

FieldTypeDescription
addTrackers[TrackerInput!]Trackers to attach to the item.
commentsStringUpdated free-text comments on the item.
customPropertiesAWSJSONAdditional custom properties, serialized as a JSON string.
customerPartNumberStringUpdated customer-specific part number for this item.
descriptionStringUpdated free-text description of the item.
expirationDateAWSTimestampUpdated epoch-millisecond timestamp when the item expires.
idStringUpdated unique identifier of the item.
images[String]Updated image URLs for the item.
locationIdStringUpdated identifier of the item's location.
lotNumberStringUpdated lot number of the lot this item belongs to.
nameStringUpdated display name of the item.
partIdStringUpdated identifier of the part (item type) this item is an instance of.
quantityFloatUpdated quantity represented by this item.
removeTrackerSerials[String!]Tracker serials to detach from the item.
stateStringUpdated state of the item.
UpdateInventoryInput​

Input for the updateInventory mutation.

FieldTypeDescription
inventory[UpdatedInventory]!Inventory items to update.
UpdatedInventory​

Definition of a single inventory item to update.

FieldTypeDescription
idString!Unique identifier of the item to update.
updatesInventoryUpdates!Updates to apply to the item.

Returns​

UpdateInventoryPayload

UpdateInventoryPayload​

Result of the updateInventory mutation.

FieldTypeDescription
inventory[Inventory!]!The updated inventory items.

updateInventoryParts​

Update one or more inventory parts (item types) and return their identifiers.

mutation UpdateInventoryParts($input: UpdateInventoryPartsInput!) {
updateInventoryParts(input: $input) {
partIds
}
}
Example variables
{
"input": {
"inventoryParts": [
{
"id": "updateinventorypart-001",
"updates": {
"customProperties": "{\"weight\":\"15kg\",\"color\":\"blue\"}",
"description": "Electric counterbalance forklift",
"id": "inventorypart-001",
"images": [
"https://cdn.example.com/asset-1024.png"
],
"name": "Forklift 7",
"number": "AST-1024",
"quantity": 10,
"supplierId": "supplier-001",
"unit": "EA"
}
}
]
}
}
Example response
{
"data": {
"updateInventoryParts": {
"partIds": [
"example"
]
}
}
}

Arguments​

input · UpdateInventoryPartsInput!

InventoryPartUpdates​

Inventory part updates.

FieldTypeDescription
customPropertiesAWSJSONAdditional custom properties, serialized as a JSON string.
descriptionStringUpdated free-text description of the part.
idString!Unique identifier of the part (item type) to update.
images[String!]Updated image URLs for the part.
nameStringUpdated display name of the part.
numberStringUpdated part number.
quantityIntUpdated expected quantity represented by the part.
supplierIdStringSupplier id
unitStringUpdated unit of measure for the part.
UpdateInventoryPartInput​

Definition of a single inventory part (item type) to update.

FieldTypeDescription
idString!Unique identifier of the part (item type) to update.
updatesInventoryPartUpdatesUpdates to apply to the inventory part.
UpdateInventoryPartsInput​

Input for the updateInventoryParts mutation.

FieldTypeDescription
inventoryParts[UpdateInventoryPartInput!]Inventory parts (item types) to update.

Returns​

UpdateInventoryPartsPayload

UpdateInventoryPartsPayload​

Result of the updateInventoryParts mutation.

FieldTypeDescription
partIds[String]Identifiers of the updated inventory parts.

uploadCSV​

Uploads a CSV of inventory data (for example stock on order or stock thresholds) for bulk processing.

mutation UploadCSV($input: UploadCSVInput!) {
uploadCSV(input: $input) {
result
}
}
Example variables
{
"input": {
"batchName": "example",
"fileContent": "example",
"fileName": "example",
"filePath": "example",
"newLineValue": "example",
"type": "ANY"
}
}
Example response
{
"data": {
"uploadCSV": {
"result": "example"
}
}
}

Arguments​

input · UploadCSVInput!

UploadCSVInput​

Input for the uploadCSV mutation.

FieldTypeDescription
batchNameStringName to group the uploaded rows under as a batch.
fileContentString!Base64-encoded contents of the CSV file.
fileNameStringName of the CSV file being uploaded.
filePathStringDestination path or category for the uploaded file.
newLineValueStringNewline delimiter used in the CSV content.
typeUploadDataTypeType of data contained in the CSV.
UploadDataType​

Type of data contained in an uploaded CSV.

ValueDescription
ANYAny or unspecified data type.
STOCK_ON_ORDERStock-on-order data.
STOCK_THRESHOLDStock threshold data.

Returns​

uploadCSVResult

uploadCSVResult​

Result of the uploadCSV mutation.

FieldTypeDescription
resultStringHuman-readable result or status message for the upload.

Shared types​

Entity types used across multiple operations on this page. Type names throughout link here.

Address​

A business address.

FieldTypeDescription
address[String!]Up to 4 street address lines.
adminAreaStringState or administrative area.
contactNameStringName of the contact person at this address.
countryCodeStringISO 3166-1 alpha-2 country code (e.g. US).
countryNameStringFull country name (e.g. United States).
customPropertiesAWSJSONAdditional custom properties as a JSON object.
emailStringEmail address for this contact.
localityStringCity or locality.
phoneNumberStringPhone number for this address.
postalCodeStringPostal or zip code.

CustomerPartNumber​

A customer-specific part number mapped to an inventory part.

FieldTypeDescription
customerIdString!Unique identifier of the customer.
customerPartNumberString!The customer's part number for this part.

CustomerV2​

A customer, supplier, or other external organization associated with tracked items.

FieldTypeDescription
addresses[Address!]Business addresses of this organization.
customPropertiesAWSJSONAdditional custom properties as a JSON object.
descriptionStringFree-text description of the organization.
idStringUnique identifier of the organization.
nameStringDisplay name of the organization.

Inventory​

A tracked inventory item.

FieldTypeDescription
commentsStringFree-text comments on the inventory item.
consumedDateAWSTimestampEpoch-millisecond timestamp when the item was consumed.
containerIdStringIdentifier of the container holding this item, if any.
creationDateAWSTimestampEpoch-millisecond timestamp when the item was created.
customPropertiesAWSJSONAdditional custom properties, serialized as a JSON string.
customerPartNumberStringCustomer-specific part number for this item, if any.
descriptionStringFree-text description of the inventory item.
expirationDateAWSTimestampEpoch-millisecond timestamp when the item expires.
idStringUnique identifier of the inventory item.
images[String]Image URLs for the inventory item.
isConsumedBooleanWhether the item has been consumed.
lastDetectedAtLocationLocationV2Location where the inventory item was last detected.
lastDetectionDateAWSTimestampEpoch-millisecond timestamp when the item was last detected.
lastUpdatedDateAWSTimestampEpoch-millisecond timestamp when the item was last updated.
locationLocationV2Current location of the inventory item.
lotNumberStringLot number of the lot this item belongs to.
nameStringDisplay name of the inventory item.
partInventoryPartThe part (item type) this inventory item is an instance of.
quantityFloatQuantity represented by this inventory item.
stateStringCurrent state of the inventory item (e.g. OnHand).
trackers[Tracker]Trackers attached to this inventory item.
transferOrderIdStringIdentifier of the transfer order this item is part of, if any.
transferStatusStringTransfer status of the inventory item.
uuidStringGlobally unique identifier of the inventory item.

InventoryPart​

An inventory part (item type) describing a class of inventory items.

FieldTypeDescription
categories[InventoryPartCategory!]Categories the part is directly assigned to. Each category links to its parent category, if any.
creationDateAWSTimestampEpoch-millisecond timestamp when the part was created.
customPropertiesAWSJSONAdditional custom properties, serialized as a JSON string.
customerPartNumbers[CustomerPartNumber!]Per-customer part numbers mapped to this part.
descriptionStringFree-text description of the part.
idStringUnique identifier of the inventory part (item type), usually the item or SKU number.
images[String!]Image URLs for the part.
lastUpdatedDateAWSTimestampEpoch-millisecond timestamp when the part was last updated.
nameStringDisplay name of the part.
numberStringPart number.
quantityIntExpected quantity represented by the part.
supplierCustomerV2Supplier for this inventory part, if one is attached.
unitStringUnit of measure for the part.
uuidStringGlobally unique identifier of the inventory part.

InventoryPartCategory​

A category an inventory part belongs to. Categories form a tree through their parent.

FieldTypeDescription
customPropertiesAWSJSONAdditional custom properties, serialized as a JSON string.
descriptionStringFree-text description of the category.
idID!Unique identifier of the category.
nameStringDisplay name of the category.
parentInventoryPartCategoryParent category, if the category is not a root category.
uuidStringGlobally unique identifier of the category.

LocationV2​

A location in the tenant's location hierarchy.

FieldTypeDescription
categoryIdStringIdentifier of the location category this location is classified under.
childLocationIds[String!]Identifiers of locations nested directly beneath this one.
customPropertiesAWSJSONAdditional custom properties, serialized as a JSON string.
customerIdStringIdentifier of the customer this location belongs to, if any.
descriptionStringFree-text description of the location.
idStringUnique identifier of the location.
nameStringDisplay name of the location.
parentLocationIdStringIdentifier of the parent location in the hierarchy, if any.
roleIdStringIdentifier of the location role describing how this location is used.

Tracker​

An identifier tracker (e.g. RFID tag or barcode) attached to a tracked item.

FieldTypeDescription
attachDateAWSTimestampEpoch-millisecond timestamp when the tracker was attached to the item.
customPropertiesAWSJSONTenant-specific sensor profile custom properties.
encodingFormatStringRFID tag encoding format for this tracker.
serialStringEPC or tracker serial identifying this tracker.

TrackerInput​

Input for specifying a tracker to attach when creating or updating an item. Replaces the per-field trackerSerial / reuseTrackerSerial pattern.

FieldTypeDescription
customPropertiesAWSJSONTracker-level custom properties as a JSON object.
encodingFormatStringRFID tag encoding format for this tracker.
reuseTrackerSerialBooleanWhether to reuse a tracker serial already attached to another item.
serialString!EPC or tracker serial to attach.