How to: Manage Dispatch
For information about prerequisites, see Integrate with Dispatch.
To create Dispatch Attributes, call the Post Dispatch Attribute endpoint and pass the following required members in the request body:
Member | Description | Remarks |
---|---|---|
attributes > name | Name of the attribute. | string minLength: 1 maxLength: 32 pattern: ^[a-zA-Z]{1,32}$ |
attributes > dataType | Data type of the attribute. | string Enum: [string, number, boolean, object, array] |
attributes > validation > range > min & max | Field to specify the range that the attribute value must lie. In the case of the "string" datatype, the range will be the length of a string value. This validation allowed only for string and number type of attributes. | number |
Also, specify the dispatchTypeId in the path parameter.
The JSON request body should be similar to the following:
To retrieve the attributes of a Dispatch, call the Get Dispatch Attribute endpoint and specify the dispatchTypeId in the path parameter.
To create a Dispatch, call the Create Dispatch endpoint and pass the following required members in the request body:
Member | Description | Remarks |
---|---|---|
dispatchTypeId | ID of the Dispatch Type. | string minLength: 4 maxLength: 64 |
dispatchRef (optional) | External dispatch reference. | string min Length: 4maxLength: 64 |
dispatchTypeName (optional) | Dispatch type name. | string minLength: 4 maxLength: 64 |
The JSON request body should be similar to the following:
To add a Job to a Dispatch, call the Add Job to Dispatch endpoint and pass the following required members in the request body:
Member | Description | Remarks |
---|---|---|
jobId | ID of the Job. | string minLength: 1 maxLength: 64 |
callback > url | Callback URL to check whether a job can be added to a dispatch. | string |
The JSON request body should be similar to the following:
To add multiple Jobs to a Dispatch, call the Add Multiple Jobs to Dispatch endpoint and pass the following required members in the request body:
Member | Description | Remarks |
---|---|---|
jobs | ID of the Jobs to be added to the dispatch. | string minLength: 1 maxLength: 64 |
callback > url | Callback URL to check whether a job can be added to a dispatch. | string |
The JSON request body should be similar to the following:
To add a Participant to a Dispatch, call the Add Participant to Dispatch endpoint and pass the following required members in the request body:
Here is the markdown table:
Member | Description | Remarks |
---|---|---|
participantId | ID of the Participant. | string minLength: 1 maxLength: 64 |
callback > url | Callback URL to check whether a participant can be added to a dispatch. | string |
The JSON request body should be similar to the following:
To add multiple Participants to a Dispatch, call the Add Multiple Participant to Dispatch endpoint and pass the following required members in the request body:
Here is the markdown table:
Member | Description | Remarks |
---|---|---|
participants | ID of the Participants to be added to the dispatch. | string min Length: 1 maxLength: 64 minItems: 1 maxItems: 10 |
The JSON request body should be similar to the following:
To update the status and sub-status of a Dispatch, call the Change Status and Sub-Status of Dispatch endpoint and pass the required members in the request body. Also, specify the dispatchId in the path parameter.
Member | Description | Remarks |
---|---|---|
status | Dispatch status. | string Enum: [CLOSED, PENDING_CLOSURE, IN_PROGRESS] |
The JSON request body should be similar to the following:
To update the sub-status of a Dispatch, call the Change Sub-Status of Dispatch endpoint and pass the following required members in the request body. Also, specify the dispatchId in the path parameter.
Member | Description | Remarks |
---|---|---|
subStatus | Dispatch sub-status. | string maxLength: 64 |
The JSON request body should be similar to the following:
To remove a Job from a Dispatch, call the Remove Job from Dispatch endpoint. Specify dispatchId and jobId in the path parameter.
The JSON request body should be similar to the following:
To remove multiple Jobs from a Dispatch, call the Remove Multiple Jobs from the Dispatch endpoint. Specify dispatchId in the path parameter. Pass the following required members in the request body:
Member | Description | Remarks |
---|---|---|
jobs | Job IDs of the Jobs to be removed | string minItems: 1 minLength: 1 maxLength: 64 |
The JSON request body should be similar to the following:
To remove a Participant from a Dispatch, call the endpoint. Specify dispatchId and participantId in the path parameter.
The JSON request body should be similar to the following: