API / Tools

API Reference

The REST API provide programmatic access to read and write Qareo data. The REST API identifies Qareo applications and users using an api key; request body and responses are available in JSON. Access to the API  requires a premium account.

 

Callers must add to each call a custom header named x-api-key, along with the value of the API key. For example, if the API key value is bkayZOMvuy8aZOhIgxq94K9Oe7Y70Hw55, the custom header would be as follows:

x-api-key: bkayZOMvuy8aZOhIgxq94K9Oe7Y70Hw55

The API base url is

https://api.qareo.com/pub

Users

An user can be a contact or a member. The difference between contact and member is: a contact is an user not registered yet, a member is a registered user that shares the timeline of his pet with the clinic.

GET /users

Returns the clinic’s user list on Qareo.

HTTP request

GET /users

Parameters

Parameter name

Value

Required

Description

firstName

string

false

The user first name

lastName

string

false

The user last name

fiscalCode

string

false

The user fiscal code

Request body

Do not supply a request body with this method.

HTTP response

If successful, this method returns a response body with the following structure:

[

{

“id”: “234”,
“firstName”: “Mario”,
“lastName”: “Rossi”,
“email”: “mario.rossi@email.com”,
“phone”: “+393471234353”,
“sex”: “male”,
“avatar”: “https://”,
“active”: false

},

{

“id”: “154”,
“firstName”: “Giuseppe”,
“lastName”: “Verdi”,
“email”: “giuseppe.verdi@email.com”,
“phone”: “+393481275355”,
“sex”: “male”,
“fiscalCode”: “SMRGTN98E28E239T”,
“avatar”: “https://”,
“active”: true

},

{

“id”: “567”,
“firstName”: “Anna”,
“lastName”: “Bianchi”,
“email”: “anna.bianchi@email.com”,
“phone”: “+393494443563”,
“sex”: “female”,
“avatar”: “https://”,
“active”: false

}

]

Property name

Value

Description

id

string

The id of the person

firstName

string

The first name of the person

lastName

string

The last name of the person

email

string

The email address of the person

phone

string

The phone number of the person (international format)

sex

string

The sex of the person (“male”, “female” or empty)

avatar

string

The avatar url of the person

active

boolean

The flag indicating if the person is a contact (false) or a member (true)

HTTP response status code

Code

Description

200

Success

404

Resource not found

POST /people

Creates a contact on Qareo.

HTTP request

POST /people

Parameters
Do not supply any parameters with this method.

 

Request body
In the request body, supply a Person resource with the following properties.

Property name

Value

Description

firstName

string

The first name of the person

lastName

string

The last name of the person

email

string

The email address of the person

phone

string

The phone number of the person (international format)

sex

string

The sex of the person (“male”, “female” or empty)

avatar

string

The avatar url of the person

HTTP response

If successful, the response contains an header “ Location ” with the id of the new resource created

Location: /people/{personId}

Status code

Code

Description

201

Created

404

Resource not found

GET /people/{personId}

Returns a person (contact/member) on Qareo.

HTTP request

GET /people/{personId}

Parameters

Property name

Value

Description

personId

string

The id of the person

Request body

Do not supply a request body with this method.

HTTP response

If successful, this method returns a response body with the following structure:

{

“id”: “234”,
“firstName”: “Mario”,
“lastName”: “Rossi”,
“email”: “mario.rossi@email.com”,
“phone”: “+393471234353”,
“sex”: “male”,
“avatar”: “https://”,
“active”: false

}

Property name

Value

Description

id

string

The id of the person

firstName

string

The first name of the person

lastName

string

The last name of the person

email

string

The email address of the person

phone

string

The phone number of the person (international format)

sex

string

The sex of the person (“male”, “female” or empty)

avatar

string

The avatar url of the person

active

boolean

The flag indicating if the person is a contact (false) or a member (true)

Status code

Code

Description

200

Success

404

Resource not found

GET /people/{personId}/animals

Returns the animals of the person on Qareo.

HTTP request

GET /people/{personId}/animals

Parameters

Property name

Value

Description

personId

string

The id of the person

Request body

Do not supply a request body with this method.

HTTP response

If successful, this method returns a response body with the following structure:

[

{

“id”: “546”,
“name”: “Pluto”,
“avatar”: “https://”,
“microchip”: “4343241564”,
“species”: “dog”,
“breed”: “”,
“sex”: “female”,
“weight”: 13.5,
“activity”: 7,
“birthday”: “23/12/2009”

},

{

“id”: “372”,
“name”: “Micio”,
“avatar”: “https://”,
“microchip”: “65547664”,
“species”: “cat”,
“breed”: “”,
“sex”: “male”,
“weight”: 7,
“activity”: 5,
“birthday”: “13/03/2015”

}

]

Property name

Value

Description

id

string

The id of the animal

name

string

The name of the animal

avatar

string

The avatar url of the animal

microchip

string

The microchip identifier of the animal

species

string

The species of the animal (“cat”, “dog” or “other”)

breed

string

The breed of the animal

sex

string

The sex of the animal (“male”, “female” or empty)

weight

double

The weight of the animal

activity

integer

The activity level of the animal (between 1 and 10)

birthday

string

The birthdate of the animal (yyyy-MM-dd)

Status code

Code

Description

200

Success

404

Resource not found

POST /people/{personId}/animals

Creates an animal for the person on Qareo.

HTTP request

POST /people/{personId}/animals

Parameters

Property name

Value

Description

personId

string

The id of the person

Request body

In the request body, supply an Animal resource with the following properties.

Property name

Value

Description

name

string

The name of the animal

avatar

string

The avatar url of the animal

microchip

string

The microchip identifier of the animal

species

string

The species of the animal (“cat”, “dog” or “other”)

breed

string

The breed of the animal

sex

string

The sex of the animal (“male”, “female” or empty)

weight

double

The weight of the animal

activity

integer

The activity level of the animal (between 1 and 10)

birthday

string

The birthdate of the animal (yyyy-MM-dd)

HTTP response

If successful, the response contains an header “ Location ” with the id of the new resource created

Location: /animals/{animalId}

Status code

Code

Description

201

Created

404

Resource not found

Animals

This resource represents an animal on Qareo.

GET /animals/{animalId}

Returns an animal on Qareo.

HTTP request

GET /animals/{animalId}

Parameters

Parameter name

Value

Description

animalId

string

The id of the animal

Request body

Do not supply a request body with this method.

HTTP response

If successful, this method returns a response body with the following structure:

{

“id”: “546”,
“name”: “Pluto”,
“avatar”: “https://”,
“microchip”: “4343241564”,
“species”: “dog”,
“breed”: “”,
“sex”: “female”,
“weight”: 13.5,
“activity”: 7,
“birthday”: “23/12/2009”

}

Property name

Value

Description

id

string

The id of the animal

name

string

The name of the animal

avatar

string

The avatar url of the animal

microchip

string

The microchip identifier of the animal

species

string

The species of the animal (“cat”, “dog” or “other”)

breed

string

The breed of the animal

sex

string

The sex of the animal (“male”, “female” or empty)

weight

double

The weight of the animal

activity

integer

The activity level of the animal (between 1 and 10)

birthday

string

The birthdate of the animal (yyyy-MM-dd)

Status code

Code

Description

200

Success

404

Resource not found

GET /animals/{animalId}/events

Returns the list of animal events on Qareo.

HTTP request

GET /animals/{animalId}/events

Parameters

Property name

Value

Description

animalId

string

The id of the animal

Request body

Do not supply a request body with this method.

HTTP response

If successful, this method returns a response body with the following structure:

[

{

“id”: “546”,
“date”: “23/09/2016”,
“type”: “service”,
“category”: “visit”,
“content”: “Cardiologia”

},

{

“id”: “456”,
“date”: “13/08/2016”,
“type”: “service”,
“category”: “vaccination”,
“content”: “Leishmaniosi”

},

{

“id”: “343”,
“date”: “28/07/2016”,
“type”: “booking”,
“category”: “analysis”,
“content”: “Biochimico”

}

]

Property name

Value

Description

id

string

The id of the event

date

string

The date of the event (yyyy-MM-dd)

type

string

The type of the event (“booking”, “service”)

category

string

The category of the event (“visit”, “vaccination”, “analysis”, “activity”)

content

string

The content description of the event

Status code

Code

Description

200

Success

404

Resource not found

POST /animals/{animalId}/events

Creates an animal event on Qareo.

HTTP request

POST /animals/{animalId}/events

Parameters

Property name

Value

Description

animalId

string

The id of the animal

Request body

In the request body, supply an Event resource with the following properties.

Property name

Value

Description

date

string

The date of the event (yyyy-MM-dd)

type

string

The type of the event (“booking”, “service”)

category

string

The category of the event (“visit”, “vaccination”, “analysis”, “activity”)

content

string

The content description of the event

HTTP response

If successful, the response contains an header “ Location ” with the id of the new resource
created

Location: /events/{eventId}

Status code

Code

Description

201

Created

404

Resource not found

Events

This resource represents an animal event on Qareo.

GET /events/{eventId}

Returns an animal event on Qareo.

HTTP request

GET /events/{eventId}

Parameters

Parameter name

Value

Description

eventId

string

The id of the animal event

Request body

Do not supply a request body with this method.

HTTP response

If successful, this method returns a response body with the following structure:

{

“id”: “456”,
“date”: “13/08/2016”,
“type”: “booking”,
“category”: “vaccination”,
“content”: “Leishmaniosi”

}

Property name

Value

Description

id

string

The id of the event

date

string

The date of the event (yyyy-MM-dd)

type

string

The type of the event (“booking”, “service”)

category

string

The category of the event (“visit”, “vaccination”, “analysis”, “activity”)

content

string

The content description of the event

Status code

Code

Description

200

Success

404

Resource not found

POST /events/{eventId}/files

Uploads an attachment for the animal event on Qareo.
To upload a file, the POST must be a multipart/form-data request.

HTTP request

POST /events/{eventId}/files

Parameters

Parameter name

Value

Description

eventId

string

The id of the animal event

Request body

In the request body, supply the byte array of the file to be uploaded.

HTTP response

If successful, the response contains an header “ Location ” with the id of the new resource created

Location: /files/{fileId}

Status code

Code

Description

201

Created

404

Resource not found

500

Internal server error

Sono già tanti i veterinari che hanno scelto Qareo, inizia subito anche tu!

 

Sei un veterinario?