Skip to main content

Sublocations

Schema​

Sublocation​

NameTypeDescriptionExample
descriptionstring?The description of the sublocation"My description"
displayIdIDThe display for the sublocation"A1-B2"
idIDThe unique sublocation ID"ckmnpybisiy5x08abky4g2d1f"
locationIdIDThe ID of the location"ckmnpybisiy5x08abky4g2d1f"
locationLocationThe locationSee the Location docs
parentIdID?The ID of the parent location"ckmnpybisiy5x08abky4g2d1f"
updatedAtDateTimeWhen this location was last updated"2021-03-24 17:26:46.983Z"

Queries​

sublocation​

Used to read a single sublocation.

Parameters​

NameDescriptionExample
idThe ID of the sublocation to fetch"ckmnpybisiy5x08abky4g2d1f"

Response​

A single Sublocation object.

Example Query​

query {
sublocation(id: "ckmnpybisiy5x08abky4g2d1f") {
id
displayId
}
}

Example Response​

{
"id": "ckmnpybisiy5x08abky4g2d1f",
"displayId": "A1"
}

sublocations​

Read all sublocations, with pagination.

Parameters​

Accepts all standard pagination parameters.

Allowed orderBy fields: createdAt, id, updatedAt.

Allowed filter fields: createdAt, id, locationId, parentId, updatedAt.

Response​

A list of Sublocation objects.

Example Query​

query {
sublocations(limit: 10) {
id
path
}
}

Example Response​

[
{
"id": "ckmnpybisiy5x08abky4g2d1f",
"path": "A1-B2"
},
{
"id": "ckmnpyirsiy8c04abky2g2d5c",
"path": "A5-B9"
}
]