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
Type | Endpoint | Description |
---|
POST | /partner/genericmatch | Bulk 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/match | Determine 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"
}
}
]
}'
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 |
---|
callback_url | String | Yes | URL shared by partner to receive and consume registered callback events. |
requests | Array | Yes | Requests contains a list of location and address pairs. |
reference_id | String | Yes | EAR reference identifier as created by partner. |
address | String | No | Address of user by whom the order has been placed. |
location | Object | Yes | Location of user by whom the order has been placed. |
latitude | Double | Yes | Latitude as part of location object. |
longitude | Double | Yes | Longitude as part of location object. |
Response
{
"es": "Integer",
"message": "String"
}
Response Attributes
Name | Type | Description |
---|
es | Integer | Denotes error status. |
message | String | Success or failure message. |
Possible Combinations of Error State and Message
es | message |
---|
1 | Resource access denied. |
0 | Request Successfully Received |
Sample Callback Event
{
"status": "Enum",
"status_code": "Integer",
"reference_id": "String",
"time": "Long",
"es": "Integer",
"message": "String"
}
Callback Event Attributes
Response Attributes
Name | Type | Description |
---|
status | Enum | Current status of EAR. |
status_code | Integer | HTTP status code. |
reference_id | String | EAR reference identifier as created by partner. |
time | Long | Current EPOCH time. |
es | Integer | Denotes error status. |
message | String | Success 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"
}
}'
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 |
---|
location | Object | Yes | Location of the user by whom order has been placed. |
latitude | Double | Yes | Latitude as part of the location. |
longitude | Double | Yes | Longitude as part of the location. |
Response
{
"es": "Integer",
"message": "String",
"status": "Enum",
"status_code": "Integer",
"time": "Long"
}
Response Attributes
Name | Type | Description |
---|
es | Integer | Denotes error status. |
message | String | Success or failure message. |
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 | Reason for exception | 51 |
0 | Success | 22 |
0 | Success | 23 |