API: Insurance
GET /api/v3/insurance
Request parameter:
No Request parameter
API: _ Default behavior#List defaults
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 | Type | Description |
---|---|---|
name | string | Contact name (virtual field) - made from name_1 and name_2 |
name_1 | string | Company name |
name_2 | string|null | Company addiction |
id | integer | Contact id |
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} |
/wiki/spaces/BROK/pages/693181 #Authentication defaults
Request
curl -X GET https://public.brokerstar.biz/api/v3/insurance --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'
Response (Success)
200 OK { "count": "3", "status": 200, "data": [ { "name": "CONVITUS Sammelstiftung", "name_1": "CONVITUS", "name_2": "Sammelstiftung", "id": 11478 }, { "name": "Credit Suisse ", "name_1": "Credit Suisse", "name_2": "", "id": 11416 }, [...] ] }
Or one of
- /wiki/spaces/BROK/pages/693181 #Authentication defaults
- /wiki/spaces/BROK/pages/693181 #List defaults
GET /api/v3/insurance/{id}
Request parameter:
Parameter | Type | In | Description |
---|---|---|---|
id | int | url | id of requested insurer |
Response data:
Metadata: object.
Parameter | Type | Description |
---|---|---|
status | int | Response status (same as in http code) |
Data: object.data
Parameter | Type | Description |
---|---|---|
id | integer | Contact id |
name_1 | string | Lastname / Company name of the user |
name_2 | string|null | Firstname / Company addition of the user |
name | string | Contact name (virtual field) - made from name_1 and name_2 |
plz | string|null | Contact post code |
phone_work | string|null | Phone to work |
mobile | string|null | Phone (mobile) |
string|null | ||
mandate_begin | string|null | Mandate/Contract begin date |
phone_direct | string|null | Phone direct |
phone_private | string|null | Prone private |
mail_private | string|null | Email private |
address | string|null | Contact address |
city | string|null | Contact city |
ig_insurance[] | array | Ig insurance |
ig_insurance[id] | string|null | Ig insurance type id |
ig_insurance[name] | string|null | Ig insurance type name |
ig_insurance[code] | string|null | Ig insurance type code |
finma_no | string|null | FirmaNo (XML) |
sub_contacts | array of arrays | List of sub API: Contact data and relation contact data |
sub_contacts[*] | array | Information about related Sub-Contact |
sub_contacts[*][id] | int|null | Id of related sub-contact |
sub_contacts[*][name] | string|null | Name of sub-contact |
sub_contacts[*][name_1] | string|null | Sub contact first name or company name |
sub_contacts[*][name_2] | string|null | Sub contact last name or company addiction |
sub_contacts[*][relation] | array|null | Relation information |
sub_contacts[*][relation][description] | string|null | Description of 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/insurance/227 --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'
Response (Success)
200 OK { "data": { "id": 227, "name_1": "AAR bus+bahn", "name_2": null, "name": "AAR bus+bahn ", "plz": "5001", "phone_work": "+41628328300", "mobile": "+41628328300", "mail": "aar@aar.ch", "mandate_begin": null, "phone_direct": null, "phone_private": null, "mail_private": null, "finma_no": "F12", "ig_insurance": { "id": 4, "name": "Generali", "code": "21S" }, "address": "Centralbahnstrasse 21\r\nPostfach", "city": "Aarau 1", "fax": "+41614832105", "sub_contacts": [ { "id": 228, "name": "Fiabane Roberto", "name_1": "Fiabane", "name_2": "Roberto", "relation": { "description": "Kontaktperson" } }, [...] ] }, "status": 200 }
Response (Error)
404 Not found { "error": "Entity not found", "code": 404 }
Or one of
- /wiki/spaces/BROK/pages/693181 #Authentication defaults
GET /api/v3/insurance/{id}/sub-contact/{sub_contact_id}
Request parameter:
Parameter | Type | In | Description |
---|---|---|---|
id | int | url | id of requested insurer |
sub_contact_id | int | url | id of contact related to insurer |
Response data:
Metadata: object.
Parameter | Type | Description |
---|---|---|
status | int | Response status (same as in http code) |
Data: object.data
Parameter | Type | Description |
---|---|---|
id | int | Id of related sub-contact |
name | string | Name of sub-contact |
relation | array | Relation information |
relation[id] | int | Id of the relation |
relation[description] | string|null | Description of relation |
relation[description_contact] | string|null | Description of relation with contact |
relation[mail] | string|null | Related email address |
relation[phone] | string|null | Related phone nb |
relation[phone_direct] | string|null | Related direct phone nb. |
relation[mobile] | string|null | Related mobile nb. |
relation[fax] | string|null | Related fax nb. |
relation[priority] | intl | Relation priority |
relation_category | array | Relation category |
relation_category[id] | int|null | Category id |
relation_category[name] | string|null | Category name in DE |
relation_category[name_e] | string|null | Category name in EN |
relation_category[name_i] | string|null | Category name in IT |
relation_category[name_f] | string|null | Category name in FR |
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/insurance/227/sub-contact/228 --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NTg[...]cm5hbWUiOiJkZW1vLWRlIn0.VTVp[...]cqIg'
Response (Success)
200 OK { "data": { "id": 228, "name": "Fiabane Roberto", "relation": { "id": 12, "description": "Kontaktperson", "description_contact": "Kontaktperson", "mail": "roberto.fiabane@visana.ch", "phone": "+41 32 626 26 52", "phone_direct": null, "mobile": null, "fax": null, "priority": 1 }, "relation_category": { "id": null, "name": null, "name_e": null, "name_i": null, "name_f": null } }, "status": 200 }
Response (Error)
404 Not found { "error": "Entity not found", "code": 404 }
Or one of
- /wiki/spaces/BROK/pages/693181 #Authentication defaults