Delivery EAR APIs are the most important set of APIs which are necessary to trigger and fulfill mygate Express Entry flow.
Every incoming request to mygate Platform is labelled as an 'EAR' - Entry Approval Request and all status transitions for the respective EAR are notified to the partner by registered callbacks.
Base URLs For cab type For other types API Endpoints & Summary Type Endpoint Description POST /approvalrequest/create Trigger delivery or cab EAR. GET /approvalrequest/status Fetch delivery or cab EAR status. POST /approvalrequest/cancel Cancel delivery or cab EAR.
'x-api-key' is visible on Express Entry Dashboard.
Create EAR Sample cURL Copy curl --location --request POST 'https://ecom.kappa.mgmaglev.xyz/delivery/devops-intg/approvalrequest/create' \
--header 'Content-Type: application/json' \
--header 'x-api-key: XxXxXx' \
--data-raw '{
"delivery_requests": [
{
"transport_details": {
"riders": [
{
"pic": "String",
"name": "String",
"mobile": "String",
"is_verified": "Boolean"
}
],
"vehicle_number": "String",
"arrive_by" : "Long",
},
"deliveries": [
{
"delivery_type": "Enum",
"delivery_id": "String",
"source_company": "String",
"customer": {
"address": "String",
"name": "String",
"mobile": "String",
"location": {
"latitude": "String",
"longitude": "String"
}
}
}
],
"callback_url": "String"
}
]
}'
Name Value Mandatory Description Content-Type application/json Yes Data transfer format. x-api-key XxXxXx Yes Partner access API key.
Request Attributes Name Type Mandatory Description delivery_requests Array Yes Delivery requests array which contains EARs and currently supports only one element. callback_url String No URL shared by partner to receive and consume registered callback events. transport_details Object Yes Object which contains partner executive details. riders Array Yes Array which contains details for a particular partner executive and currently supports only one element. is_verified Boolean No Denotes whether the executive has been verified by the partner or not. pic String No Picture of the executive. Character length should not exceed more than 255. name (rider) String Yes Name of the executive. mobile (rider) String Yes Mobile number of the executive. This will be utilized to enter a mygate community. vehicle_number String No Vehicle number of the executive. deliveries Array Yes Deliveries array contains the details of the partner and user. Currently supports only one element. delivery_type Enum Yes Delivery type can either be a drop or a pick up. delivery_id String Yes Unique identifier for each EAR as shared by partner. source_company String Yes Name of the partner triggering EAR. customer Object Yes Object containing details of the user by whom the order has been placed. address String Yes Address of the user. name (customer) String Yes Name of the user. mobile (customer) String Yes Mobile number of the user. location Object Yes Location of the customer's address. latitude String Yes Latitude as part of location object. longitude String Yes Longitude as part of location object.
Response Copy {
"success_count" : "Integer" ,
"failure_count" : "Integer" ,
"delivery_status_list" : [
{
"es" : "Integer" ,
"message" : "String" ,
"delivery_id" : "String" ,
"request_id" : "String" ,
"status" : "Enum" ,
"status_code" : "Integer" ,
"time" : "Long"
}
]
}
Response Attributes Name Type Description success_count Integer Denotes success of EAR trigger process. failure_count Integer Denotes failure of EAR trigger process. delivery_status_list Array Contains list of details for the triggered EAR. es Integer Denotes error status. message String Success or failure message. delivery_id String Delivery identifier for EAR as shared by partner. request_id String Unique identifier for each EAR generated by mygate. status Enum Current status of EAR. status_code Integer HTTP status code. time Long Current EPOCH time.
Possible Combinations of Error State, Message and Status Code es message 1 Resource access denied.
delivery_status_list.es delivery_status_list.message delivery_status_list.status delivery_status_list.status_code 0 Request Successfully Received Request successfully received 20
Fetch EAR Status Sample cURL Copy curl --location --request GET 'https://ecom.kappa.mgmaglev.xyz/delivery/devops-intg/approvalrequest/status?request_id=XxXxXx' \
--header 'x-api-key: XxXxXx'
Name Value Mandatory Description x-api-key XxXxXx Yes Partner access API key.
Query Parameters Name Type Mandatory Description request_id String Yes Unique identifier for each EAR generated by mygate.
Response Copy {
"es" : "Integer" ,
"message" : "String" ,
"delivery_id" : "String" ,
"request_id" : "String" ,
"status" : "Enum" ,
"status_code" : "Integer" ,
"time" : "Long" ,
"passcode" : "Integer"
}
Response Attributes Name Type Description es Integer Denotes error status. message String Success or failure message. delivery_id String Delivery identifier for EAR as shared by partner. request_id String Unique identifier for each EAR generated by mygate. status Enum Current status of EAR. status_code Integer HTTP status code. time Long Current EPOCH time. passcode Integer Unique 6 digit code generated by mygate. Partner executive can use this to gain entry into the mygate community.
Possible Combinations of Error State, Message and Status Code es message status_code 1 Resource access denied. 1 No Request found for the given id 0 Status Fetched Successfully Code from Entry Approval Status table
Cancel EAR An Early Approval Request can only be cancelled till the delivery executive checks into the society.
Sample cURL Copy curl --location --request POST 'https://ecom.kappa.mgmaglev.xyz/delivery/devops-intg/approvalrequest/cancel' \
--header 'Content-Type: application/json' \
--header 'x-api-key: XxXxXx' \
--data-raw '{
"request_id": "String"
}'
Name Value Mandatory Description Content-Type application/json Yes Data transfer format. x-api-key XxXxXx Yes Partner access API key.
Request Attributes Name Type Mandatory Description request_id String Yes Unique identifier for each EAR generated by mygate.
Response Copy {
"es" : "Integer" ,
"message" : "String" ,
"delivery_id" : "String" ,
"request_id" : "String" ,
"status" : "Enum" ,
"status_code" : "Integer" ,
"time" : "Long"
}
Response Attributes Name Type Description es Integer Denotes error status. message String Success or failure message. delivery_id String Delivery identifier for EAR as shared by partner. request_id String Unique identifier for each EAR generated by mygate. status Enum Current status of EAR. status_code Integer HTTP status code. time Long Current EPOCH time.
Possible Combinations of Error State, Message and Status Code es message status_code 1 Resource access denied. 1 Invalid request id. 1 No Request found for the given id 0 Entry Approval Request Cancelled Successfully Code from Entry Approval Status table 0 Entry Approval Request Cannot be cancelled. Code from Entry Approval Status table
Create EAR (for cab type) Sample cURL Copy curl --location 'https://ecom.kappa.mgmaglev.xyz/cab/devops-intg/approvalrequest/create' \
- -header 'Content-Type: application/json' \
- -header 'x-api-key: XxXxXx' \
- -data '{
"cab_approval_requests": [
{
"ride_id": "String",
"source_company": "String",
"callback_url": "String",
"num_passengers": "Integer",
"ride_type": "String",
"eta": "Long",
"driver": {
"name": "String",
"mobile": "String",
"vehicle_number": "String",
"pic": "String",
"vehicle_type": "String",
"is_verified": "Boolean"
},
"customer": {
"name": "String",
"mobile": "String",
"address": "String",
"location": {
"latitude": "String",
"longitude": "String"
}
}
}
]
}'
Name Value Mandatory Description Content-Type application/json Yes Data transfer format. x-api-key XxXxXx Yes Partner access API key.
Request Attributes Name Type Mandatory Description cab_approval_requests Array Yes Requests array which contains cab EARs and currently supports only one element. ride_id String Yes Unique identifier for each cab EAR as shared by partner. source_company String Yes Name of the partner triggering cab EAR. callback_url String No URL shared by partner to receive and consume registered callback events. num_passengers Integer No Denotes the number of passengers taking the given ride. ride_type String No Ride type can either be a DROP or a PICKUP. eta Long No Denotes the start time of the cab EAR. driver Object Yes Cab driver details. name (driver) String Yes Name of the cab driver. mobile (rider) String Yes Mobile number of the cab driver. This will be utilized to enter a mygate community. vehicle_number String Yes Vehicle number of the cab driver. pic String No Picture of the cab driver. Character length should not exceed more than 255. vehicle_type String No Denotes whether the cab is 2W, 3W or 4W. is_verified Boolean No Denotes whether the cab driver has been verified by the partner or not. customer Object Yes Object containing details of the user by whom the order has been placed. name (customer) String Yes Name of the user. mobile (customer) String Yes Mobile number of the user. address String Yes Address of the user. location Object Yes Location of the customer's address. latitude String Yes Latitude as part of location object. longitude String Yes Longitude as part of location object.
Response Copy {
"success_count" : "Integer" ,
"failure_count" : "Integer" ,
"cab_approval_status_list" : [
{
"es" : "Integer" ,
"message" : "String" ,
"ride_id" : "String" ,
"request_id" : "String" ,
"status" : "Enum" ,
"status_code" : "Integer" ,
"time" : "Long"
}
]
}
Response Attributes Name Type Description success_count Integer Denotes success of cab EAR trigger process. failure_count Integer Denotes failure of cab EAR trigger process. cab_approval_status_list Array Contains list of details for the triggered cab EAR. es Integer Denotes error status. message String Success or failure message. ride_id String Unique identifier for cab EAR as shared by partner. request_id String Unique identifier for each cab EAR generated by mygate. status Enum Current status of EAR. status_code Integer HTTP status code. time Long Current EPOCH time.
Possible Combinations of Error State, Message and Status Code es message 1 Resource access denied.
cab_approval_status_list.es cab_approval_status_list.message cab_approval_status_list.status cab_approval_status_list.status_code 0 Request Successfully Received Request successfully received 20 1 Missing/Invalid parameters in request Request is Invalid. Please check message for details 40
Fetch EAR Status (for cab type) Sample cURL Copy curl --location --request GET 'https://ecom.kappa.mgmaglev.xyz/cab/devops-intg/approvalrequest/status?request_id=XxXxXx' \
--header 'x-api-key: XxXxXx'
Name Value Mandatory Description x-api-key XxXxXx Yes Partner access API key.
Query Parameters Name Type Mandatory Description request_id String Yes Unique identifier for each cab EAR generated by mygate.
Response Copy {
"es" : "Integer" ,
"message" : "String" ,
"ride_id" : "String" ,
"request_id" : "String" ,
"status" : "Enum" ,
"status_code" : "Integer" ,
"time" : "Long"
}
Response Attributes Name Type Description es Integer Denotes error status. message String Success or failure message. ride_id String Unique identifier for cab EAR as shared by partner. request_id String Unique identifier for each cab EAR generated by mygate. status Enum Current status of EAR. status_code Integer HTTP status code. time Long Current EPOCH time.
Possible Combinations of Error State, Message and Status Code es message status_code 1 No Request found for the given id 0 Status Fetched Successfully Code from Entry Approval Status table
Cancel EAR (for cab type) A Cab Early Approval Request can only be cancelled till the driver checks into the society.
Sample cURL Copy curl --location --request POST 'https://ecom.kappa.mgmaglev.xyz/cab/devops-intg/approvalrequest/cancel' \
--header 'Content-Type: application/json' \
--header 'x-api-key: XxXxXx' \
--data-raw '{
"request_id": "String"
}'
Name Value Mandatory Description Content-Type application/json Yes Data transfer format. x-api-key XxXxXx Yes Partner access API key.
Request Attributes Name Type Mandatory Description request_id String Yes Unique identifier for each cab EAR generated by mygate.
Response Copy {
"es" : "Integer" ,
"message" : "String" ,
"ride_id" : "String" ,
"request_id" : "String" ,
"status" : "Enum" ,
"status_code" : "Integer" ,
"time" : "Long"
}
Response Attributes Name Type Description es Integer Denotes error status. message String Success or failure message. ride_id String Unique identifier for cab EAR as shared by partner. request_id String Unique identifier for each cab EAR generated by mygate. status Enum Current status of EAR. status_code Integer HTTP status code. time Long Current EPOCH time.
Possible Combinations of Error State, Message and Status Code es message status_code 1 No Request found for the given id 0 Entry Approval Request Cancelled Successfully Code from Entry Approval Status table 0 Entry Approval Request Cannot be cancelled. Code from Entry Approval Status table
Entry Approval Status Code Status Message 20 Request successfully received 42 Duplicate request received 21 Entry approval validation process started 50 There was a problem with processing the request. Please check the request body 22 Address matched to a user 23 We were not able to find a matching user record in our system 24 Entry approved by user 25 Request cancelled 26 Entry request denied by user 27 Delivery executive/cab has checked in 28 Delivery executive/cab has checked out 51 Internal error encountered. Please try the request again 41 Given ETA is already elapsed 29 Request completed successfully 40 Request is Invalid. Please check message for details 52 Request expired 43 This feature is disabled 31 Entry asked to deliver at gate by user 32 Parcel accepted by Security 33 Parcel collected by User 34 Parcel Declined by security 34 Parcel Declined by delivery executive 35 Temporary Disabled 36 The flat has opted out