API: Linked contacts (relations)
GET /api/v3/linked-contacts
Request parameter:
No Request parameter
API: _ Default behavior #List defaults
Filtering parameters:
Parameter | Type | IN | Example | Description |
---|---|---|---|---|
contact | int | QUERY | filters[contact]=4 | Filtering by main contact id = value |
Response data:
Metadata: object.
Parameter | Type | Description |
---|---|---|
count | int | Number of all results marching criteria |
status | int | Response status (same as in http code) |
Data: object.data[array]
Parameter | Out Type | In Type | Description |
---|---|---|---|
id | integer | Relation id | |
main_contact | array | int | Main API: Contact data |
related_contact | array | int | Related API: Contact data |
relation_to_main_contact | string|null | string|null | Relation related contact to main contact description |
relation_to_related_contact | string|null | string|null | Relation main contact to related contact description |
priority | int(0->100) | Priority (sorting) 0-100 |
Response (Error):
Parameter | Type | Description |
---|---|---|
code | integer | An error code |
error | string | A message containing some information about the error |
errors | array | List of errors devided by field in associative array {field_name:error message} |
API: _ Default behavior#Authentication defaults
Request
curl -X GET https://public.brokerstar.biz/api/v3/linked-contacts --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'
Response (Success)
200 OK { "count": "2", "data": [ { "main_contact": { "name": "Allianz Suisse Versicherungs-Gesellschaft AG", "name_1": "Allianz Suisse", "name_2": "Versicherungs-Gesellschaft AG", "id": 4 }, "related_contact": { "name": "AXA Winterthur ", "name_1": "AXA Winterthur", "name_2": null, "id": 6 }, "relation_to_main_contact": "Brother", "relation_to_related_contact": "Father", "id": 3, "priority": 55 }, { "main_contact": { "name": "Allianz Suisse Versicherungs-Gesellschaft AG", "name_1": "Allianz Suisse", "name_2": "Versicherungs-Gesellschaft AG", "id": 4 }, "related_contact": { "name": "Allianz Suisse Lebens- Versicherungs-Gesellschaft AG", "name_1": "Allianz Suisse Lebens-", "name_2": "Versicherungs-Gesellschaft AG", "id": 5 }, "relation_to_main_contact": "Brother", "relation_to_related_contact": "Father", "id": 4, "priority": 55 } ], "status": 200 }
Or one of
- API: _ Default behavior #Authentication defaults
- API: _ Default behavior #List defaults
GET /api/v3/linked-contacts/{id}
Request parameter:
Parameter | Type | In | Description |
---|---|---|---|
id | int | url | id of requested relation |
Response data:
Metadata: object.
Parameter | Type | Description |
---|---|---|
status | int | Response status (same as in http code) |
Data: object.data
Parameter | Out Type | In Type | Description |
---|---|---|---|
All fields from Single Relation + | |||
Response (Error):
Parameter | Type | Description |
---|---|---|
code | integer | An error code |
error | string | A message containing some information about the error |
errors | array | List of errors devided by field in associative array {field_name:error message} |
Request
curl -X GET https://public.brokerstar.biz/api/v3/linked-contacts/2 --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'
Response (Success)
200 OK { "data": { "main_contact": { "name": "Allianz Suisse Versicherungs-Gesellschaft AG", "name_1": "Allianz Suisse", "name_2": "Versicherungs-Gesellschaft AG", "id": 4 }, "related_contact": { "name": "Allianz Suisse Lebens- Versicherungs-Gesellschaft AG", "name_1": "Allianz Suisse Lebens-", "name_2": "Versicherungs-Gesellschaft AG", "id": 5 }, "relation_to_main_contact": "sese", "relation_to_related_contact": "seses", "id": 2, "priority": 99 }, "status": 200 }
Response (Error)
404 Not found { "error": "Entity not found", "code": 404 }
Response (Error)
403 Forbidden { "error": "You have no access to contact id:123", "code": 403 }
Or one of
- API: _ Default behavior #Authentication defaults
DELETE /api/v3/linked-contacts/{id}
Request parameter:
Parameter | Type | In | Description |
---|---|---|---|
id | int | url | id of requested relation |
Response data:
Metadata: object.
Parameter | Type | Description |
---|---|---|
status | int | Response status (same as in http code) |
Response (Error):
Parameter | Type | Description |
---|---|---|
code | integer | An error code |
error | string | A message containing some information about the error |
errors | array | List of errors devided by field in associative array {field_name:error message} |
Request
curl -X DELETE https://public.brokerstar.biz/api/v3/linked-contacts/16448 --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'
Response (Success)
200 OK { "status":200 }
Response (Error)
404 Not found { "error": "Entity not found", "code": 404 }
Response (Error)
403 Forbidden { "error": "You have no access to contact id:123", "code": 403 }