Skip to main content

Terminals GraphQL API

Terminals expose organization-specific operating locations with optional Port linkage and custom values.

Queries

terminal

Fetch a single terminal.

query {
terminal(organizationId: 1, terminalId: 42) {
terminalId
name
code
portId
port {
portId
name
}
}
}

terminals

Paginated terminal list. Supports standard filter, search, and orderBy parameters. Search matches terminal name, code, and customValues.

query {
terminals(organizationId: 1, search: "LAX", orderBy: "name", skip: 0, take: 20) {
items {
terminalId
code
name
portId
}
totalCount
}
}

Mutations

createTerminal

mutation {
createTerminal(organizationId: 1, values: {
name: "Los Angeles Terminal"
code: "LAX-T1"
portId: "USLAX"
customValues: { region: "West" }
}) {
terminalId
name
code
}
}

Input fields:

FieldTypeRequiredDescription
nameStringYesTerminal display name
codeStringNoOrganization-unique code when present
portIdStringNoOptional port in the same organization
customValuesMapNoJSON custom values

updateTerminal

updateTerminal accepts a dynamic map of fields to update.

mutation {
updateTerminal(organizationId: 1, terminalId: 42, values: {
name: "Updated Terminal"
customValues: { dockCount: 12 }
}) {
terminalId
name
customValues
}
}

deleteTerminal

Soft-deletes the terminal and returns a standard delete result.

mutation {
deleteTerminal(organizationId: 1, terminalId: 42) {
success
id
}
}