Send the generated gatepass to the preferred notification channel of the driver associated to the given precheck
Headers
-
Specify effective organization_id for Admin and Group Organization Admins. This is a global header for all endpoints only taken into consideration when it makes sense (it won't be used in Auth, for example)
Query parameters
-
yard_id
-
generateGatepassIfNotExists boolean
If true, a Gatepass Code will be generated if the precheck doesn't have one already
Responses
-
200 */*
Gatepass successfully sent to the channel provider. It does not mean that the driver has received the gatepass
-
Created
-
Error while sending the gatepass to the channel provider. The message has not been sent. Eg. the driver does not have a phone number or email address
-
Unauthorized
-
Forbidden
-
Not Found
-
Unexpected server error.
POST /api/yardmovement-precheck/{id}/gatepass/send
curl \
-X POST http://127.0.0.1:8080/api/yardmovement-precheck/{id}/gatepass/send \
-H "Content-Type: application/json" \
-d '{"driver":{"notification_email":"string","notification_name":"string","notification_phone":"string","notification_preference_channel":"EMAIL"}}'
Request examples
# Headers
# Payload
{
"driver": {
"notification_email": "string",
"notification_name": "string",
"notification_phone": "string",
"notification_preference_channel": "EMAIL"
}
}
Response examples (200)
{
"current_status": "UNKNOWN",
"delivery_id": "string"
}