API Reference
OpenAPI Specification
Twins API (1.0)
Service allow to search links of object aka twins in 2GIS and partner systems
Get object relationships by 2GIS IDs
The method searches for identical objects from partners by 2GIS IDs.
The method will not return the result if there is no access to one of the partners.
Authorizations:
partner_key
query Parameters
| dgis_id | Array of strings [ 1 .. 50 ] items Example: dgis_id=12345 2GIS object IDs |
| partner_code | Array of strings [ 1 .. 5 ] items Items Enum: "afisha" "delivery-club" "sber-atms" "sber-offices" "sber-terminals" "sber-food" "sber-spasibo" "sber-ryadom" Partner codes |
Responses
Response Schema: application/json
required | object |
required | object |
Response samples
- 200
- 400
- 403
- 500
Content type
application/json
{- "meta": {
- "code": 200,
- "message": "ok"
}, - "result": {
- "items": [
- {
- "dgis_id": 12345,
- "dgis_type": "branch",
- "twins": [
- {
- "partner_id": 67890,
- "partner_code": "partner1",
- "partner_type": "branch"
}
]
}
], - "total": 1
}
}Get object relationships by partner IDs
The method searches for identical objects in 2GIS by the partner IDs.
The method will not return the result if there is no access to the partner.
Authorizations:
partner_key
query Parameters
| partner_code | string Enum: "afisha" "delivery-club" "sber-atms" "sber-offices" "sber-terminals" "sber-food" "sber-spasibo" "sber-ryadom" Partner code |
| partner_id | Array of strings [ 1 .. 50 ] items Example: partner_id=12345 Partner object IDs |
Responses
Response Schema: application/json
required | object |
required | object |
Response samples
- 200
- 400
- 403
- 500
Content type
application/json
{- "meta": {
- "code": 200,
- "message": "ok"
}, - "result": {
- "items": [
- {
- "partner_id": 12345,
- "partner_type": "branch",
- "twins": [
- {
- "dgis_id": 67890,
- "dgis_type": "branch"
}
]
}
], - "total": 1
}
}Get all the links of the partner objects
Authorizations:
partner_key
query Parameters
| partner_code | string Enum: "afisha" "delivery-club" "sber-atms" "sber-offices" "sber-terminals" "sber-food" "sber-spasibo" "sber-ryadom" Partner code |
Responses
Response Schema: text/csv
string (SuccessfulExportResponse)
Response samples
- 400
- 403
- 500
Content type
application/json
{- "meta": {
- "code": 400,
- "message": "invalid params"
}
}