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:
| Field | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Terminal display name |
code | String | No | Organization-unique code when present |
portId | String | No | Optional port in the same organization |
customValues | Map | No | JSON 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
}
}