MyGate

Partner Match

Partner Match APIs mentioned below determine whether location being sent by the partner in the EAR is part of a MyGate community or not.

Base URLs

API Endpoints & Summary

TypeEndpointDescription
POST/partner/genericmatchBulk mode API to determine whether location is a part of MyGate community or not. The results are sent to partner via registered callbacks.
POST/partner/matchDetermine whether a single location is part of a MyGate community or not. This API is to be invoked by partners with <=10,000 requests per day.

'x-api-key' is visible on Express Entry Dashboard.

Generic Match

  • Response for each generic match location along with reference identifier will be sent via registered callback events.

Sample cURL

curl --location --request POST 'https://ecom.kappa.mgmaglev.xyz/delivery/devops-intg/partner/genericmatch' \
--header 'Content-Type: application/json' \
--header 'x-api-key: XxXxXx' \
--data-raw '{
"callback_url": "String",
"requests": [
{
"reference_id": "String",
"address": "String",
"location": {
"latitude": "Double",
"longitude": "Double"
}
},
{
"reference_id": "String",
"address": "String",
"location": {
"latitude": "Double",
"longitude": "Double"
}
}
]
}'

Request Headers

NameValueMandatoryDescription
Content-Typeapplication/jsonYesData transfer format.
x-api-keyXxXxXxYesPartner access API key.

Request Attributes

NameTypeMandatoryDescription
callback_urlStringYesURL shared by partner to receive and consume registered callback events.
requestsArrayYesRequests contains a list of location and address pairs.
reference_idStringYesEAR reference identifier as created by partner.
addressStringNoAddress of user by whom the order has been placed.
locationObjectYesLocation of user by whom the order has been placed.
latitudeDoubleYesLatitude as part of location object.
longitudeDoubleYesLongitude as part of location object.

Response

{
"es": "Integer",
"message": "String"
}

Response Attributes

NameTypeDescription
esIntegerDenotes error status.
messageStringSuccess or failure message.

Possible Combinations of Error State and Message

esmessage
1Resource access denied.
0Request Successfully Received

Sample Callback Event

{
"status": "Enum",
"status_code": "Integer",
"reference_id": "String",
"time": "Long",
"es": "Integer",
"message": "String"
}

Callback Event Attributes

Response Attributes

NameTypeDescription
statusEnumCurrent status of EAR.
status_codeIntegerHTTP status code.
reference_idStringEAR reference identifier as created by partner.
timeLongCurrent EPOCH time.
esIntegerDenotes error status.
messageStringSuccess or failure message.

Partner Match

Sample cURL

curl --location --request POST 'https://ecom.kappa.mgmaglev.xyz//delivery/devops-intg/partner/match' \
--header 'Content-Type: application/json' \
--header 'x-api-key: XxXxXx' \
--data-raw '{
"location": {
"latitude": "Double",
"longitude": "Double"
}
}'

Request Headers

NameValueMandatoryDescription
Content-Typeapplication/jsonYesData transfer format.
x-api-keyXxXxXxYesPartner access API key.

Request Attributes

NameTypeMandatoryDescription
locationObjectYesLocation of the user by whom order has been placed.
latitudeDoubleYesLatitude as part of the location.
longitudeDoubleYesLongitude as part of the location.

Response

{
"es": "Integer",
"message": "String",
"status": "Enum",
"status_code": "Integer",
"time": "Long"
}

Response Attributes

NameTypeDescription
esIntegerDenotes error status.
messageStringSuccess or failure message.
statusEnumCurrent status of EAR.
status_codeIntegerHTTP status code.
timeLongCurrent EPOCH time.

Possible Combinations of Error State, Message and Status Code

esmessagestatus_code
1Resource access denied.
1Reason for exception51
0Success22
0Success23
Suggestions, contact, support and error reporting: tech@mygate.in