Rest API v2

Taliad API documentation v2

Introduction

In order to access API you must supply an 'apiKey' in HTTP request header.

Your apiKey is obtained from Taliad application.
In order to access endpoints in the API, api key must be granted access to these endpoints.
Please contact support to receive your api key and to get access to the endpoints you need.

API base URL:
https://api.taliad.se/v2

API can only be reached by HTTPS. Trying to connect by HTTP will result in a 404 response.

HTTP response status codes are always included in HTTP header in accordance with the HTTP/1.1 standard.
It is also included in response body, in property 'errorMessages'.

Response from API is always a JSON object with folloing structure:
{ "status": "", "message": "", "error": [] }

"status" - HTTP/1.1 status code
"message" - Data if request was successful
"error" - Error message(s)

Person -> Properties -> Get value-property text types

Description:
Get all active value-properties of the type 'text' for person.

Endpoint URI:
person/property/free/get/ActiveTextTypes.php

HTTP request method:
GET

Parameters:
personId - Person ID

Returned JSON message object:
List of text type properties and their values


curl --location 'https://api.taliad.se/v2/person/property/free/get/ActiveTextTypes.php?personId=0000' \ --header 'apiKey: ......' \ --data ''
{ "status": "200", "message": [ { "propertyId": "1234_99_1234_1", "name": "Test", "value": "Hello!" }, ], "error": [] }
API key has wrong format or is empty.
{ "status": "401", "message": "", "error": ["Invalid api key"] }

Person -> Properties -> Set value to value-property text type

Description:
Set a value on a value-property of the type 'text' for a person.

Endpoint URI:
person/property/free/set/TextType.php

HTTP request method:
POST

Parameters:
personId - Person ID
propertyId - ID received from person/property/free/get/ActiveTextTypes.php
value - Property value (text)

Returned JSON message object:
"OK"


curl --location --request POST 'https://api.taliad.se/v2/person/property/free/set/TextType.php?personId=0000&propertyId=1234_99_123_14&value=Hello2!' \ --header 'apiKey: ......' \ --data ''
{ "status": "200", "message": "OK", "error": "" }
API key has wrong format or is empty.
{ "status": "401", "message": "", "error": ["Invalid api key"] }

Person -> Properties -> Get all active fixed properties.

Description:
Get all active fixed properties with their selectable values, and any set value(s) for person ID

Endpoint URI:
person/property/fixed/get/AllActive.php

HTTP request method:
GET

Parameters:
personId - Person ID

Returned JSON message object:
personId - Person ID, same ID as in request
properties - List of properties
propertyId - Used for identifying a property when setting value(s)
name - Property name
availableValues - List of values which can be set
name - Value name
valueId - Used for identifying property value when setting this value
setValues - List of values set for person ID
name - Value name
valueId - Used for identifying property value
multiValue - 'true' = multiple values can be set, 'false' = only 1 value can be set


curl --location 'https://api.taliad.se/v2/person/property/fixed/get/AllActive.php?personId=0000' \ --header 'apiKey: ......'
{ "status": 200, "message": { "personId": 0000, "properties": [ { "propertyId": "3_0_0000", "name": "Mat", "availableValues": [ { "name": "All mat", "valueId": 1 }, { "name": "Vegetariskt", "valueId": 2 }, ], "setValues": [ { "name": All mat, valueId": 1 }, ], "multiValue": false }, ] }, "error": [] }
API key has wrong format or is empty.
{ "status": "401", "message": "", "error": ["Invalid api key"] }

Person -> Properties -> Set fixed property value(s).

Description:
Set value(s) to a fixed property.

Endpoint URI:
person/property/fixed/set/Value.php

HTTP request method:
POST

Parameters:
personId - Person ID
propertyId - ID obtained from enpoint person/property/fixed/get/AllActive.php
valueIDs - Array of ID(s) obtained from enpoint person/property/fixed/get/AllActive.php. To remove all values, send empty value.

Returned JSON message object:
OK - Request was completed.


curl --location --request POST 'https://api.taliad.se/v2/person/property/fixed/set/Value.php?personId=0000&propertyId=3_0_0000&valueIDs=[1]' \ --header 'apiKey: ....'
{ "status": 200, "message": "OK", "error": [] }
API key has wrong format or is empty.
{ "status": "401", "message": "", "error": ["Invalid api key"] }