dispatchv2
OS1 App developers can use these GraphQL endpoints to retrieve lists for dispatches and jobs using a single API enabling developers to build higher-performing apps that can retrieve large lists of data in a single query.
The dispatchV2 type represents a dispatch in OS1. It's defined with the following arguments and fields:
This example queries a dispatch and its associated dispatchTypeName and dispatchTypeID.
- dispatchReference (String, Optional): The reference string associated with the dispatch. It can be used for identifying the dispatch in the system.
- dispatchId (String, Optional): A unique identifier of the dispatch. It's a primary key that can be used for fetching specific dispatch information from the database.
- tenant (String, Required): Identifier for the tenant.
📘 Fields & Objects
Please note that all fields and objects are optional and may be left blank.
- createdAt (DateTime): The timestamp when the dispatch was created. It's automatically set by the system at the time of dispatch creation.
- customData (JSON): A field to store custom user-defined data related to the dispatch. The data stored in this field is flexible and can be of any valid JSON format.
- createdBy (String): The identifier (such as a username or user ID) of the user who created the dispatch.
- dispatchRef (String): This is another reference string for the dispatch. It may be utilized for alternative identification or categorization of the dispatches within the system.
- dispatchTypeId (String): An identifier (UUID format) representing the type of the dispatch. It's a foreign key referencing the DispatchType entity in the database.
- dispatchTypeName (String): The human-readable name of the dispatch type, providing more context about the type of dispatch.
- id (String): The unique identifier (UUID format) for this instance of the dispatchV2 type. This is an auto-generated field that uniquely identifies each dispatch instance.
- status (String): This field is a string that describes the current status of the dispatch event. The status could be any predefined status value in the system, such as pending, in progress, delivered, canceled, etc.
- subStatus (String): The subStatus field is a supplementary field to the status field, providing more granular information about the status. This is also a string. For example, if status is in progress,
This object provides an aggregation of jobs associated with the dispatch.
- aggregations (String): Defines the specific job aggregations to return.
- filter (String): A filter that narrows down the jobs included in the aggregation.
This object represents a list of jobs associated with the dispatch.
- filter (String): A filter for narrowing down the jobs returned.
- searchAfter (String): Pagination helper to retrieve the next set of results.
- size (Int): The number of jobs to return, up to a maximum of 10.
- sort (String): The criteria used to sort the jobs.
This object represents the ledger data associated with the dispatch.
- sort (String): The criteria used to sort the ledger data.
- size (Int): The number of ledger entries to return, up to a maximum of 10.
- filter (String): A filter for narrowing down the ledger entries returned.
- searchAfter (String): Pagination helper to retrieve the next set of results.
The ledger object contains a data array with the following fields:
- custodyEntityId (String): Unique identifier for the custody entity.
- custodyEntityAmount (String): The amount tied to the custody entity.
- custodyLocationId (String): The identifier for the location of the custody entity.
- custodyType (String): The type of custody entity.
- dispatchId (String): The system-generated ID of a dispatch.
- jobId (String): The system-generated ID of a job.
- tenantId (String): The identifier of the tenant the ledger entry belongs to.
- txnId (String): Unique identifier for a transaction within the ledger.
- custodyEntity (String): The name or description of the custody entity.
This object represents the participants associated with the dispatch.
- properties (String): Additional metadata about the participant.
- state (String): The current state of the participant.
- tenantId (String): The identifier of the tenant the participant belongs to.
- uniqueCode (String): A unique code associated with the participant.
- participantType (String): The type or role of the participant.
- owner (String): The owner of the participant.
- name (String): The name of the participant.
- isActive (Boolean): Indicates whether the participant is currently active.