Retrieve the entity links for a given resource, entity type and entity. There are multiple endpoints available, depending on the entity type and whether or not you wish to retrieve for a specific entity (based on id).
This set of endpoints will retrieve all relationships for a given resource that are locations. Optionally, if a location ID is provided, it will only return those links for the given ID.
GET ~/resources/:resource-id/relations/locations
GET ~/resources/:resource-id/relations/locations/:location-id
It is also possible, for a specfic location, to retrieve any links to menu items for that location.
GET ~/resources/:resource-id/relations/locations/:location-id/menu/:pos-id
The same is possible for Apps, with a set of endpoints available to retrieve all App relationships for a given resource. Optionally, if an App ID is provided, it will only return those links for the given ID.
GET ~/resources/:resource-id/relations/apps
GET ~/resources/:resource-id/relations/apps/:app-id
POS vendors work the same way. Optionally, if a POS Vendor ID is provided, it will only return those links for the given ID.
GET ~/resources/:resource-id/relations/vendors
GET ~/resources/:resource-id/relations/vendors/:vendor-id
Parameters
Response
Examples
Request: Retrieve locations for a given resource
GET https://sandbox.pos.doshii.co/v3/resources/lLf2X0k6/relations/locations
Response
{
"relations": {
"locations": ["2X3b8q", "hFG45jiX"]
}
}
Request: Retrieve a specific location for a given resource
GET https://sandbox.pos.doshii.co/v3/resources/lLf2X0k6/relations/locations/2X3b8q
Response
{
"relations": {
"locations": ["2X3b8q"]
}
}
Request: Retrieve specific menu items for a given resource
GET https://sandbox.pos.doshii.co/v3/resources/lLf2X0k6/relations/locations/2X3b8q/menu/pizza
Response
{
"relations": {
"menuProducts": [{
"locationId": "2X3b8q",
"posId": "pizza"
}],
}
}
Request: Retrieve apps for a given resource
GET https://sandbox.pos.doshii.co/v3/resources/lLf2X0k6/relations/apps
Response
{
"relations": {
"apps": [123, 789]
}
}
Request: Retrieve a specific App for a given resource
GET https://sandbox.pos.doshii.co/v3/resources/lLf2X0k6/relations/apps/123
Response
{
"relations": {
"apps": [123]
}
}
Request: Retrieve POS vendors for a given resource
GET https://sandbox.pos.doshii.co/v3/resources/lLf2X0k6/relations/vendors
Response
{
"relations": {
"vendors": [456, 675]
}
}
Request: Retrieve a specific POS vendor for a given resource
GET https://sandbox.pos.doshii.co/v3/resources/lLf2X0k6/relations/vendors/456
Response
{
"relations": {
"vendors": [456]
}
}