Skip to main content

Package Management API

Version 1.1 — September 2025

Authentication: All requests require an IdToken from the Login API. See Authentication to obtain one and Errors for authorization errors.

Create Package API​

The Create Packages API allows you to create one or multiple packages with different properties and with or without trackerSerial (RFID tags).

Endpoint Details​

  • URL: https://api.xemelgo.com/graphql
  • Method: POST

Properties​

PropertyTypeDescriptionRequired
idStringSerial/unique identifier for the packageYes
trackerSerialStringRFID tag associated to the package for trackingNo
reuseTrackerSerialBooleanReuse an existing tracker serialNo
nameStringPackage nameNo
descriptionStringDescription of the packageNo
commentsStringAny comments or remarks for the packageNo
locationIdStringLocation of the packageNo
customPropertiesAWSJSONAdditional properties a customer may want to specifyNo

Headers

Authorization – $idToken

Request Body​

mutation {
createPackages(
input: {
packages: [
{
id: "Package-1234"
trackerSerial: "20240925000001"
reuseTrackerSerial: true
name: "Calibration Kit"
description: "Annual calibration tools"
locationId: "Warehouse 1"
customProperties: "{ \"priority\": \"high\" }"
}
]
}
) {
packageIds
}
}

Status Code - 200

Response Body​

{
"data": {
"createPackages": {
"packageIds": ["Package-1234"]
}
}
}

Errors​

See authorization errors.


Update Package API​

The Update Packages API allows updating one or multiple package records at the same time.

Endpoint Details​

  • URL: https://api.xemelgo.com/graphql
  • Method: POST

Properties​

PropertyTypeDescriptionRequired/Updatable
idStringSerial/unique identifier for the packageYes/No
trackerSerialStringRFID tag associated with the packageNo/Yes
reuseTrackerSerialBooleanReuse an existing tracker serialNo/Yes
nameStringPackage nameNo/Yes
descriptionStringPackage descriptionNo/Yes
commentsStringAny comments or remarks for the packageNo/Yes
locationIdStringLocation of the packageNo/Yes
customPropertiesAWSJSONAdditional properties for the packageNo/Yes

Headers

Authorization – $idToken

Request Body​

Input can consist of multiple json of unique items:

mutation {
updatePackages(
input: {
packages: [
{
id: "Package-1234"
updates: {
trackerSerial: "20240925000002"
description: "Updated calibration kit"
locationId: "Warehouse 2"
customProperties: "{ \"priority\": \"medium\" }"
}
}
]
}
) {
packages {
id
trackerSerial
name
description
comments
location {
id
}
lastUpdatedDate
creationDate
customProperties
}
}
}

Response Body​

{
"data": {
"updatePackages": {
"packages": [
{
"id": "Package-1234",
"trackerSerial": "20240925000002",
"name": "Calibration Kit",
"description": "Updated calibration kit",
"comments": null,
"location": { "id": "Warehouse 2" },
"lastUpdatedDate": 1727209539000,
"creationDate": 172710526046,
"customProperties": "{ \"priority\": \"medium\" }"
}
]
}
}
}

Errors​

See authorization errors.

Additional 200-Level Errors​

ErrorError code
Packages not found200

Packages Not Found​

{
"data": {
"updatePackages": {
"packages": []
}
},
"errors": [
{
"path": ["updatePackages"],
"data": null,
"errorType": "ResourceNotFoundError",
"errorInfo": null,
"locations": [
{
"line": 2,
"column": 3,
"sourceName": null
}
],
"message": "Packages not found: Package-BIN-02, Package-BIN-03"
}
]
}

Delete Package API​

The Delete Packages API permanently removes one or more package records.

Graph API​

  • URL: https://api.xemelgo.com/graphql
  • Method: POST

Properties​

PropertyTypeDescriptionRequired
packageIds[String]List of package IDs to be deleted.Yes

Headers

Authorization – $idToken

Request Body​

mutation deletePackages {
deletePackages(input: { packageIds: ["Package-1234"] }) {
packageIds
}
}

StatusCode - 200

Response Body​

{
"data": {
"deletePackages": {
"packageIds": ["Package-1234"]
}
}
}