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.
| Field | Type | Description |
|---|---|---|
filter | String | Filter expression on inventory item properties. |
nextToken | String | Pagination token from a previous response to fetch the next page. |
Returns
InventoryPayload
Result of the inventory query.
| Field | Type | Description |
|---|---|---|
inventory | [Inventory!]! | The matching inventory items. |
nextToken | String | Pagination 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.
| Field | Type | Description |
|---|---|---|
filter | String | Filter expression to select which inventory parts and locations to aggregate. |
nextToken | String | Pagination token to retrieve the next page of results. |
Returns
InventoryPartLocationMetricsPayload
InventoryPartLocationMetrics
Aggregated inventory metrics for a single part at a single location.
| Field | Type | Description |
|---|---|---|
customProperties | AWSJSON | Additional custom properties, serialized as a JSON string. |
customerOnHandCount | Int | Number of units on hand attributed to the customer. |
location | LocationV2 | Location these metrics are scoped to. |
lowStockCount | Int | Number of parts below their low-stock threshold at this location. |
outOfStockCount | Int | Number of parts out of stock at this location. |
totalCount | Int | Total number of units of this part at this location. |
InventoryPartLocationMetricsPayload
Result of the inventoryPartLocationMetrics query.
| Field | Type | Description |
|---|---|---|
inventoryParts | [InventoryPartLocationMetrics!]! | Per-part, per-location inventory metrics for this page. |
nextToken | String | Pagination 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.
| Field | Type | Description |
|---|---|---|
filter | String | Filter expression to select which inventory parts to aggregate. |
nextToken | String | Pagination token to retrieve the next page of results. |
Returns
InventoryPartMetrics
Aggregated inventory metrics for a single part (item type).
| Field | Type | Description |
|---|---|---|
customProperties | AWSJSON | Additional custom properties, serialized as a JSON string. |
customerOnHandCount | Int | Number of units on hand attributed to the customer. |
expiredCount | Int | Number of units past their expiry date. |
expiringSoonCount | Int | Number of units expiring soon. |
incomingCount | Int | Number of units inbound (on order) for this part. |
location | LocationV2 | Location these metrics are scoped to. |
missingCount | Int | Number of units expected but not detected. |
onHandCount | Int | Number of units physically on hand. |
part | InventoryPart | The inventory part (item type) these metrics describe. |
stockCount | Int | Number of units currently in stock. |
totalCount | Int | Total number of units across all states. |
InventoryPartMetricsPayload
Result of the inventoryPartMetrics query.
| Field | Type | Description |
|---|---|---|
inventoryParts | [InventoryPartMetrics!]! | Per-part inventory metrics for this page. |
nextToken | String | Pagination 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.
| Field | Type | Description |
|---|---|---|
filter | String | Filter expression on inventory part properties. |
nextToken | String | Pagination token from a previous response to fetch the next page. |
Returns
InventoryPartsPayload
Result of the inventoryParts query.
| Field | Type | Description |
|---|---|---|
inventoryParts | [InventoryPart!]! | The matching inventory parts. |
nextToken | String | Pagination 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.
| Field | Type | Description |
|---|---|---|
endDate | AWSTimestamp | Epoch-millisecond timestamp marking the end of the route window. |
id | String! | Unique identifier of the inventory item whose route is requested. |
nextToken | String | Pagination token from a previous response to fetch the next page. |
startDate | AWSTimestamp | Epoch-millisecond timestamp marking the start of the route window. |
Returns
InventoryRoute
A single segment of an inventory item's movement history.
| Field | Type | Description |
|---|---|---|
customProperties | AWSJSON | Additional custom properties, serialized as a JSON string. |
duration | AWSTimestamp | Duration spent at the location for this segment. |
endDate | AWSTimestamp | Epoch-millisecond timestamp when the item left the location. |
location | LocationV2 | Location the item was detected at during this segment. |
startDate | AWSTimestamp | Epoch-millisecond timestamp when the item entered the location. |
state | String | State of the item during this segment. |
InventoryRoutePayload
Result of the inventoryRoute query.
| Field | Type | Description |
|---|---|---|
nextToken | String | Pagination 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.
| Field | Type | Description |
|---|---|---|
inventoryIds | [String!]! | Identifiers of the inventory items to mark as consumed. |
Returns
ConsumeInventoryPayload
Result of the consumeInventory mutation.
| Field | Type | Description |
|---|---|---|
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.
| Field | Type | Description |
|---|---|---|
inventory | [CreatedInventory!]! | Inventory items to create. |
CreatedInventory
Definition of a single inventory item to create.
| Field | Type | Description |
|---|---|---|
comments | String | Free-text comments on the item. |
customProperties | AWSJSON | Additional custom properties, serialized as a JSON string. |
customerPartNumber | String | Optional part number used by your customer. |
description | String | Free-text description of the item. |
expirationDate | AWSTimestamp | Epoch-millisecond timestamp when the item expires. |
id | String! | Serial number of the item; may match the tracker serial when items are not serialized. |
images | [String] | Image URLs for the item. |
locationId | String | Identifier of the location the item is currently being added to. |
lotNumber | String | Lot number of the lot this item belongs to. |
name | String | Display name of the item. |
partId | String! | Identifier of the part (item type) this item is an instance of. |
partSupplierId | String | Supplier id |
quantity | Float | Quantity represented by this item. |
trackers | [TrackerInput!] | Trackers to attach to the item. |
Returns
CreateInventoryPayload
Result of the createInventory mutation.
| Field | Type | Description |
|---|---|---|
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.
| Field | Type | Description |
|---|---|---|
customProperties | AWSJSON | Additional custom properties, serialized as a JSON string. |
customerPartNumbers | [CustomerPartNumberInput!] | Per-customer part numbers mapped to this part. |
description | String | Free-text description of the part. |
id | String! | 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. |
name | String | Display name of the part. |
number | String | Part number. |
quantity | Int | Expected quantity represented by the part. |
supplierId | String | Supplier id |
unit | String | Unit of measure for the part. |
CreateInventoryPartsInput
Input for the createInventoryParts mutation.
| Field | Type | Description |
|---|---|---|
inventoryParts | [CreateInventoryPartInput!] | Inventory parts (item types) to create. |
CustomerPartNumberInput
Input mapping a customer to its part number for a part.
| Field | Type | Description |
|---|---|---|
customerId | String! | Unique identifier of the customer. |
customerPartNumber | String! | The customer's part number for this part. |
Returns
CreateInventoryPartsPayload
Result of the createInventoryParts mutation.
| Field | Type | Description |
|---|---|---|
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.
| Field | Type | Description |
|---|---|---|
category | String | Higher-level category the item is grouped under. |
class | String | Class of the item. |
customer_part_number | String | Customer-specific part number for the item. |
expiry_date | AWSTimestamp | Epoch-millisecond timestamp when the item expires. |
item_number | String | Item (part) number for the item. |
location | String | Identifier of the location the item is stored at. |
lot_number | String | Lot number the item belongs to. |
name | String | Display name of the item. |
onboarding_location | String | Identifier of the location where the item is being onboarded. |
supplier_id | String | Supplier identifier; attaches an existing supplier or auto-creates one as the item type supplier. |
tenant_properties | AWSJSON | Additional custom properties, serialized as a JSON string. |
tracker_encoding_format | String | RFID tag encoding format to assign to the sensor profile on creation. |
tracker_serial | String! | Serial of the RFID tracker to attach to the item. |
Returns
ItemSet
A set of trackers grouped together when onboarding inventory.
| Field | Type | Description |
|---|---|---|
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.
| Field | Type | Description |
|---|---|---|
inventoryIds | [String!]! | Identifiers of the inventory items to delete. |
Returns
DeleteInventoryPayload
Result of the deleteInventory mutation.
| Field | Type | Description |
|---|---|---|
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.
| Field | Type | Description |
|---|---|---|
addTrackers | [TrackerInput!] | Trackers to attach to the item. |
comments | String | Updated free-text comments on the item. |
customProperties | AWSJSON | Additional custom properties, serialized as a JSON string. |
customerPartNumber | String | Updated customer-specific part number for this item. |
description | String | Updated free-text description of the item. |
expirationDate | AWSTimestamp | Updated epoch-millisecond timestamp when the item expires. |
id | String | Updated unique identifier of the item. |
images | [String] | Updated image URLs for the item. |
locationId | String | Updated identifier of the item's location. |
lotNumber | String | Updated lot number of the lot this item belongs to. |
name | String | Updated display name of the item. |
partId | String | Updated identifier of the part (item type) this item is an instance of. |
quantity | Float | Updated quantity represented by this item. |
removeTrackerSerials | [String!] | Tracker serials to detach from the item. |
state | String | Updated state of the item. |
UpdateInventoryInput
Input for the updateInventory mutation.
| Field | Type | Description |
|---|---|---|
inventory | [UpdatedInventory]! | Inventory items to update. |
UpdatedInventory
Definition of a single inventory item to update.
| Field | Type | Description |
|---|---|---|
id | String! | Unique identifier of the item to update. |
updates | InventoryUpdates! | Updates to apply to the item. |
Returns
UpdateInventoryPayload
Result of the updateInventory mutation.
| Field | Type | Description |
|---|---|---|
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.
| Field | Type | Description |
|---|---|---|
customProperties | AWSJSON | Additional custom properties, serialized as a JSON string. |
description | String | Updated free-text description of the part. |
id | String! | Unique identifier of the part (item type) to update. |
images | [String!] | Updated image URLs for the part. |
name | String | Updated display name of the part. |
number | String | Updated part number. |
quantity | Int | Updated expected quantity represented by the part. |
supplierId | String | Supplier id |
unit | String | Updated unit of measure for the part. |
UpdateInventoryPartInput
Definition of a single inventory part (item type) to update.
| Field | Type | Description |
|---|---|---|
id | String! | Unique identifier of the part (item type) to update. |
updates | InventoryPartUpdates | Updates to apply to the inventory part. |
UpdateInventoryPartsInput
Input for the updateInventoryParts mutation.
| Field | Type | Description |
|---|---|---|
inventoryParts | [UpdateInventoryPartInput!] | Inventory parts (item types) to update. |
Returns
UpdateInventoryPartsPayload
Result of the updateInventoryParts mutation.
| Field | Type | Description |
|---|---|---|
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.
| Field | Type | Description |
|---|---|---|
batchName | String | Name to group the uploaded rows under as a batch. |
fileContent | String! | Base64-encoded contents of the CSV file. |
fileName | String | Name of the CSV file being uploaded. |
filePath | String | Destination path or category for the uploaded file. |
newLineValue | String | Newline delimiter used in the CSV content. |
type | UploadDataType | Type of data contained in the CSV. |
UploadDataType
Type of data contained in an uploaded CSV.
| Value | Description |
|---|---|
ANY | Any or unspecified data type. |
STOCK_ON_ORDER | Stock-on-order data. |
STOCK_THRESHOLD | Stock threshold data. |
Returns
uploadCSVResult
Result of the uploadCSV mutation.
| Field | Type | Description |
|---|---|---|
result | String | Human-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.
| Field | Type | Description |
|---|---|---|
address | [String!] | Up to 4 street address lines. |
adminArea | String | State or administrative area. |
contactName | String | Name of the contact person at this address. |
countryCode | String | ISO 3166-1 alpha-2 country code (e.g. US). |
countryName | String | Full country name (e.g. United States). |
customProperties | AWSJSON | Additional custom properties as a JSON object. |
email | String | Email address for this contact. |
locality | String | City or locality. |
phoneNumber | String | Phone number for this address. |
postalCode | String | Postal or zip code. |
CustomerPartNumber
A customer-specific part number mapped to an inventory part.
| Field | Type | Description |
|---|---|---|
customerId | String! | Unique identifier of the customer. |
customerPartNumber | String! | The customer's part number for this part. |
CustomerV2
A customer, supplier, or other external organization associated with tracked items.
| Field | Type | Description |
|---|---|---|
addresses | [Address!] | Business addresses of this organization. |
customProperties | AWSJSON | Additional custom properties as a JSON object. |
description | String | Free-text description of the organization. |
id | String | Unique identifier of the organization. |
name | String | Display name of the organization. |
Inventory
A tracked inventory item.
| Field | Type | Description |
|---|---|---|
comments | String | Free-text comments on the inventory item. |
consumedDate | AWSTimestamp | Epoch-millisecond timestamp when the item was consumed. |
containerId | String | Identifier of the container holding this item, if any. |
creationDate | AWSTimestamp | Epoch-millisecond timestamp when the item was created. |
customProperties | AWSJSON | Additional custom properties, serialized as a JSON string. |
customerPartNumber | String | Customer-specific part number for this item, if any. |
description | String | Free-text description of the inventory item. |
expirationDate | AWSTimestamp | Epoch-millisecond timestamp when the item expires. |
id | String | Unique identifier of the inventory item. |
images | [String] | Image URLs for the inventory item. |
isConsumed | Boolean | Whether the item has been consumed. |
lastDetectedAtLocation | LocationV2 | Location where the inventory item was last detected. |
lastDetectionDate | AWSTimestamp | Epoch-millisecond timestamp when the item was last detected. |
lastUpdatedDate | AWSTimestamp | Epoch-millisecond timestamp when the item was last updated. |
location | LocationV2 | Current location of the inventory item. |
lotNumber | String | Lot number of the lot this item belongs to. |
name | String | Display name of the inventory item. |
part | InventoryPart | The part (item type) this inventory item is an instance of. |
quantity | Float | Quantity represented by this inventory item. |
state | String | Current state of the inventory item (e.g. OnHand). |
trackers | [Tracker] | Trackers attached to this inventory item. |
transferOrderId | String | Identifier of the transfer order this item is part of, if any. |
transferStatus | String | Transfer status of the inventory item. |
uuid | String | Globally unique identifier of the inventory item. |
InventoryPart
An inventory part (item type) describing a class of inventory items.
| Field | Type | Description |
|---|---|---|
categories | [InventoryPartCategory!] | Categories the part is directly assigned to. Each category links to its parent category, if any. |
creationDate | AWSTimestamp | Epoch-millisecond timestamp when the part was created. |
customProperties | AWSJSON | Additional custom properties, serialized as a JSON string. |
customerPartNumbers | [CustomerPartNumber!] | Per-customer part numbers mapped to this part. |
description | String | Free-text description of the part. |
id | String | Unique identifier of the inventory part (item type), usually the item or SKU number. |
images | [String!] | Image URLs for the part. |
lastUpdatedDate | AWSTimestamp | Epoch-millisecond timestamp when the part was last updated. |
name | String | Display name of the part. |
number | String | Part number. |
quantity | Int | Expected quantity represented by the part. |
supplier | CustomerV2 | Supplier for this inventory part, if one is attached. |
unit | String | Unit of measure for the part. |
uuid | String | Globally unique identifier of the inventory part. |
InventoryPartCategory
A category an inventory part belongs to. Categories form a tree through their parent.
| Field | Type | Description |
|---|---|---|
customProperties | AWSJSON | Additional custom properties, serialized as a JSON string. |
description | String | Free-text description of the category. |
id | ID! | Unique identifier of the category. |
name | String | Display name of the category. |
parent | InventoryPartCategory | Parent category, if the category is not a root category. |
uuid | String | Globally unique identifier of the category. |
LocationV2
A location in the tenant's location hierarchy.
| Field | Type | Description |
|---|---|---|
categoryId | String | Identifier of the location category this location is classified under. |
childLocationIds | [String!] | Identifiers of locations nested directly beneath this one. |
customProperties | AWSJSON | Additional custom properties, serialized as a JSON string. |
customerId | String | Identifier of the customer this location belongs to, if any. |
description | String | Free-text description of the location. |
id | String | Unique identifier of the location. |
name | String | Display name of the location. |
parentLocationId | String | Identifier of the parent location in the hierarchy, if any. |
roleId | String | Identifier 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.
| Field | Type | Description |
|---|---|---|
attachDate | AWSTimestamp | Epoch-millisecond timestamp when the tracker was attached to the item. |
customProperties | AWSJSON | Tenant-specific sensor profile custom properties. |
encodingFormat | String | RFID tag encoding format for this tracker. |
serial | String | EPC 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.
| Field | Type | Description |
|---|---|---|
customProperties | AWSJSON | Tracker-level custom properties as a JSON object. |
encodingFormat | String | RFID tag encoding format for this tracker. |
reuseTrackerSerial | Boolean | Whether to reuse a tracker serial already attached to another item. |
serial | String! | EPC or tracker serial to attach. |