GraphQL API
CargoXplorer provides a comprehensive GraphQL API for interacting with the system. The API supports queries, mutations, and subscriptions for real-time updates.
Base URL
https://api.cargoxplorer.com/graphql
Authentication
All GraphQL requests require authentication via Bearer token in the Authorization header:
Authorization: Bearer <your-access-token>
Common Patterns
Pagination
List queries support offset-based pagination with the following parameters:
| Parameter | Type | Description |
|---|---|---|
skip | Int | Number of items to skip |
take | Int | Number of items to return (default: 20, max: 100) |
Filtering
Most list queries support filtering via the filter parameter using Lucene query syntax:
query {
getAttachments(organizationId: 1, filter: "attachmentType:Picture") {
items {
attachmentId
fileName
}
}
}
Sorting
Use the orderBy parameter to sort results:
query {
getAttachments(organizationId: 1, orderBy: "created desc") {
items {
attachmentId
fileName
}
}
}
Search
Full-text search is available via the search parameter:
query {
getAttachments(organizationId: 1, search: "invoice") {
items {
attachmentId
fileName
}
}
}
Available APIs
- Attachments - File attachments and document management