Contacts Service APIs
{id}
{id}
{id}
Create a new contact record in the Contacts Service system. Note that this is a POST API call which is typically used for when you want to create a new record in the database.
Request headers
The publishable api key for application identification
Authorization Token
Request body
The contact name
The contact surname
The contact age
The contact’s phone(s)
The phone type
The phone number
The country code
The contact’s address
The contact’s street address line 1
The contact’s street address line 2
The address post code
The address area, town or city
The address district
The address country
Responses
The request has succeeded
Body
Contact unique identifier
POST /contacts/ HTTP/1.1
Content-Type: application/json
{
"name": "Sozos",
"surname": "Karageorgiou",
"age": 39,
"phone": [
{
"type": "MOBILE",
"number": "96303540",
"country_code": "CYP"
}
],
"address": {
"address_line_1": "eBOs Tower, Office 101",
"address_line_2": "Arch. Makariou III and Mesaorias 1",
"post_code": "2322",
"area_town_city": "Lakatamia",
"district": "Nicosia",
"country": "CYP"
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "771aa519-20de-1c1d-871c-bb7771e37dc5"
}
{id}
Update a contact record in the Contacts Service system. Note that this is a PUT API call which is typically used for when you want to update an existing record in the database. In order for the Contacts Service system to identify which contact it must update this API call requires the contact’s id as a URL parameter (/contacts/{id}).
Path variables
The unique identifier of the contact
Request headers
The publishable api key for application identification
Authorization Token
Request body
The contact name
The contact surname
The contact age
The contact’s phone(s)
The phone type
The phone number
The country code
The contact’s address
The contact’s street address line 1
The contact’s street address line 2
The address post code
The address area, town or city
The address district
The address country
Responses
The request has succeeded
Body
Contact unique identifier
PUT /contacts/1d875242-310a-a1f4-9371-259e14d8801e HTTP/1.1
Content-Type: application/json
{
"name": "Sozos",
"surname": "Karageorgiou",
"age": 39,
"phone": [
{
"type": "LANDLINE",
"number": "96303540",
"country_code": "CYP"
}
],
"address": {
"address_line_1": "eBOs Tower, Office 101",
"address_line_2": "Arch. Makariou III and Mesaorias 1",
"post_code": "2322",
"area_town_city": "Lakatamia",
"district": "Nicosia",
"country": "CYP"
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "1d875242-310a-a1f4-9371-259e14d8801e"
}
Retreive a list of all contacts in the Contacts Service system. Note that this is a GET API call which is typically used for when you want to get data from the database. This API call has a list of parameters that the caller can configure in order to filter the contacts that will be retreived from the Contacts Service system.
Request parameters
Text search on name and surname
Filter based on contact age
Filter based on contact address country
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
The publishable api key for application identification
Authorization Token
Responses
The request has succeeded
Body
The unique identifier of the contact
The contact name
The contact surname
The contact age
The contact’s phone(s)
The phone type
The phone number
The country code
The contact’s address
The contact’s street address line 1
The contact’s street address line 2
The address post code
The address area, town or city
The address district
The address country
GET /contacts/ HTTP/1.1
api_key: 1bda235f-1454-ef42-c457-1e988e346db4
Authorization: 8649cb12-9093-5765-2720-107f5210cc8e
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "4b315ac8-0d54-2f94-e9bb-8741ebae982a",
"name": "Sozos",
"surname": "Karageorgiou",
"age": 42,
"phone": [
{
"type": "MOBILE",
"number": "96303540",
"country_code": "CYP"
},
{
"type": "LANDLINE",
"number": "22303540",
"country_code": "CYP"
}
],
"address": {
"address_line_1": "eBOs Tower, Office 101",
"address_line_2": "Arch. Makariou III and Mesaorias 1",
"post_code": "2322",
"area_town_city": "Lakatamia",
"district": "Nicosia",
"country": "CYP"
}
},
{
"id": "750b2f62-d7a5-4cc2-9fe5-59ffb191d343",
"name": "Jane",
"surname": "smith",
"age": 40,
"phone": [
{
"type": "MOBILE",
"number": "96123453",
"country_code": "CYP"
},
{
"type": "LANDLINE",
"number": "22983647",
"country_code": "CYP"
}
],
"address": {
"address_line_1": "125 Spyros Kyprianou Ave",
"address_line_2": "",
"post_code": "2543",
"area_town_city": "Lykavitos",
"district": "Nicosia",
"country": "CYP"
}
}
]
{id}
Get information of a contact from the Contacts Service system. Note that this is a GET API call which is typically used for when you want to update an existing record in the database. In order for the Contacts Service system to identify which contact it must retrieve this API call requires the contact’s id as a URL parameter (/contacts/{id}).
Path variables
The unique identifier of the contact
Request headers
The publishable api key for application identification
Authorization Token
Responses
The request has succeeded
Body
The unique identifier of the contact
The contact name
The contact surname
The contact age
The contact’s phone(s)
The phone type
The phone number
The country code
The contact’s address
The contact’s street address line 1
The contact’s street address line 2
The address post code
The address area, town or city
The address district
The address country
{id}
Delete a contact from the Contacts Service system. Note that this is a DELETE API call which is typically used for when you want to delete an existing record in the database. In order for the Contacts Service system to identify which contact it must delete this API call requires the contact’s id as a URL parameter (/contacts/{id}).
Path variables
The unique identifier of the contact
Request headers
The publishable api key for application identification
Authorization Token
Responses
The request has succeeded
DELETE /contacts/4b315ac8-0d54-2f94-e9bb-8741ebae982a HTTP/1.1
api_key: 1bda235f-1454-ef42-c457-1e988e346db4
Authorization: 8649cb12-9093-5765-2720-107f5210cc8e
HTTP/1.1 200 OK
Authenticate a user and provide a token for subsequent API access
Request headers
The publishable api key for application identification
Request body
The user’s username
The user’s password
Responses
The request has succeeded
Body
The token that can be used in subsequent API calls
Used when access token gets expired in order to refresh
Details about the authorised user
The user’s unique identifier
The user’s name
The user’s surname
The user’s role
POST /users/authenticate HTTP/1.1
api-key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"username": "johndoe@ebos.com.cy",
"password": "password1234"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"refresh_token": "",
"user": {
"id": "2f2f9afe-4399-59b7-cbb8-da18c2255064",
"name": "Sozos",
"surname": "Karageorgiou",
"role": "EDITOR"
}
}
Invite a new user with a specific role
Request headers
Authorization Token
Request body
The user’s name
The user’s surname
The user’s role
The user’s username
Responses
Body
The user’s unique identifier
POST /users/invite HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
Content-Type: application/json
{
"name": "Jane",
"surname": "Doe",
"role": "VIEWER",
"username": "jane.doe@ebos.com.cy"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}