Convenius API API documentation version 1.0
/locals
Resource to actions of locals like hospitals
Endpoint to list all locals
Endpoint to create a new local
get /locals
Endpoint to list all locals
Query Parameters
- length: (integer)
Quantity of items to return
Example:
10
- offset: (integer)
Where items will be fetched must start
HTTP status code 200
Body
Type: application/json
Example:
{
"meta" : {},
"data" : [
{
"id" : 1,
"name" : "Local 1",
"type" : "hospital",
"address" : {
"street" : "Name of Street",
"number": 10,
"neighborhood" : "Name of Neighborhood",
"city" : "Name of City",
"state" : "Name of State",
"country" : "Name of Country"
},
"geolocation" : {
"latitude" : "1.3242352",
"longitude" : "23.423432"
}
}
]
}
HTTP status code 404
Body
Type: application/json
Example:
{"message" : "No locals found"}
post /locals
Endpoint to create a new local
Body
Type: application/json
Schema:
{
"meta" : {},
"data" : [
{
"id" : 1,
"name" : "Local 1",
"type" : "hospital",
"address" : {
"street" : "Name of Street",
"number": 10,
"neighborhood" : "Name of Neighborhood",
"city" : "Name of City",
"state" : "Name of State",
"country" : "Name of Country"
},
"geolocation" : {
"latitude" : "1.3242352",
"longitude" : "23.423432"
}
}
]
}
Resource of actions about one local item
Endpoint to get item information
Endpoint to update item
Endpoint to delete item
get /locals/{id}
Endpoint to get item information
URI Parameters
- id: required (string)
HTTP status code 200
Body
Type: application/json
Example:
{
"meta" : {},
"data" : [
{
"id" : 1,
"name" : "Local 1",
"type" : "hospital",
"address" : {
"street" : "Name of Street",
"number": 10,
"neighborhood" : "Name of Neighborhood",
"city" : "Name of City",
"state" : "Name of State",
"country" : "Name of Country"
},
"geolocation" : {
"latitude" : "1.3242352",
"longitude" : "23.423432"
}
}
]
}
HTTP status code 404
Body
Type: application/json
Example:
{"message" : "Local not found"}
put /locals/{id}
Endpoint to update item
URI Parameters
- id: required (string)
Body
Type: application/json
Schema:
{
"meta" : {},
"data" : [
{
"id" : 1,
"name" : "Local 1",
"type" : "hospital",
"address" : {
"street" : "Name of Street",
"number": 10,
"neighborhood" : "Name of Neighborhood",
"city" : "Name of City",
"state" : "Name of State",
"country" : "Name of Country"
},
"geolocation" : {
"latitude" : "1.3242352",
"longitude" : "23.423432"
}
}
]
}
Endpoint to list all locals
get /locals/search
Endpoint to list all locals
Query Parameters
- Latitude: required (string)
Example:
13.232142
- Longitude: required (string)
Example:
54.2345234
- radius: (string)
- length: (integer)
Quantity of items to return
Example:
10
- offset: (integer)
Where items will be fetched must start
HTTP status code 200
Body
Type: application/json
Example:
{
"meta" : {},
"data" : [
{
"id" : 1,
"name" : "Local 1",
"type" : "hospital",
"address" : {
"street" : "Name of Street",
"number": 10,
"neighborhood" : "Name of Neighborhood",
"city" : "Name of City",
"state" : "Name of State",
"country" : "Name of Country"
},
"geolocation" : {
"latitude" : "1.3242352",
"longitude" : "23.423432"
}
},
{
"id" : 2,
"name" : "Local 2",
"type" : "hospital",
"address" : {
"street" : "Name of Street",
"number": 20,
"neighborhood" : "Name of Neighborhood",
"city" : "Name of City",
"state" : "Name of State",
"country" : "Name of Country"
},
"geolocation" : {
"latitude" : "1.3242352",
"longitude" : "23.423432"
}
}
]
}
HTTP status code 404
Body
Type: application/json
Example:
{"message" : "No items found"}
/cares
Resource of actions of heath cares
Endpoint to list all health cares registered
Endpoint to create a new health care
get /cares
Endpoint to list all health cares registered
Query Parameters
- length: (integer)
Quantity of items to return
Example:
10
- offset: (integer)
Where items will be fetched must start
HTTP status code 200
Body
Type: application/json
Example:
{
"meta" : {},
"data" : [
{
"_id" : "233423f34",
"name" : "Teste 1",
"address" : {
"street" : "Name of Street",
"number" : 100,
"neighborhood" : "Name of Neighborhood",
"city" : "Name of City",
"state" : "Name of State",
"country" : "Name of Country"
},
"geolocation" : {
"latitude" : "1.3242352",
"longitude" : "23.423432"
}
},
{
"_id" : "233423f3DW",
"name" : "Teste 2",
"address" : {
"street" : "Name of Street",
"number" : 100,
"neighborhood" : "Name of Neighborhood",
"city" : "Name of City",
"state" : "Name of State",
"country" : "Name of Country"
},
"geolocation" : {
"latitude" : "1.3242352",
"longitude" : "23.423432"
}
}
]
}
post /cares
Endpoint to create a new health care
Body
Type: application/json
Schema:
{
"meta" : {},
"data" : {
"_id" : "233423f34",
"name" : "Teste 1",
"address" : {
"street" : "Name of Street",
"number" : 100,
"neighborhood" : "Name of Neighborhood",
"city" : "Name of City",
"state" : "Name of State",
"country" : "Name of Country"
},
"geolocation" : {
"latitude" : "1.3242352",
"longitude" : "23.423432"
}
}
}
Endpoint to get health care from id
Endpoint to update item of care
Endpoint to delete item
get /cares/{id}
Endpoint to get health care from id
URI Parameters
- id: required (string)
HTTP status code 200
Body
Type: application/json
Schema:
{
"meta" : {},
"data" : {
"_id" : "233423f34",
"name" : "Teste 1",
"address" : {
"street" : "Name of Street",
"number" : 100,
"neighborhood" : "Name of Neighborhood",
"city" : "Name of City",
"state" : "Name of State",
"country" : "Name of Country"
},
"geolocation" : {
"latitude" : "1.3242352",
"longitude" : "23.423432"
}
}
}
HTTP status code 404
Body
Type: application/json
Example:
{"message" : "Health care not found"}
put /cares/{id}
Endpoint to update item of care
URI Parameters
- id: required (string)
Body
Type: application/json
Schema:
{
"name" : "Teste 1",
"address" : {
"street" : "Name of Street",
"number" : 100,
"neighborhood" : "Name of Neighborhood",
"city" : "Name of City",
"state" : "Name of State",
"country" : "Name of Country"
},
"geolocation" : {
"latitude" : "1.3242352",
"longitude" : "23.423432"
}
}
/plans
Resource of actions about plans
Endpoint to list all plans
Endpoint to create a new item
get /plans
Endpoint to list all plans
Query Parameters
- length: (integer)
Quantity of items to return
Example:
10
- offset: (integer)
Where items will be fetched must start
HTTP status code 200
Body
Type: application/json
Schema:
{
"meta" : {},
"data" : [
{
"id" : 1,
"name" : "Plan Name",
"code" : "code",
"health_care" : {
"id" : 1,
"name" : "Health Care 1"
}
},
{
"id" : 2,
"name" : "Plan Name",
"code" : "code",
"health_care" : {
"id" : 2,
"name" : "Health Care 2"
}
}
]
}
HTTP status code 404
Body
Type: application/json
Example:
{"message" : "no plans found"}
Resource of actions of an item
Endpoint to get item by Id
Endpoint to update an item by Id
Endpoint to delete an item
get /plans/{id}
put /plans/{id}
Endpoint to update an item by Id
URI Parameters
- id: required (string)
Body
Type: application/json
Schema:
{
"name" : "Plan Name",
"code" : "code",
"health_care" : {
"id" : 1,
"name" : "Health Care 1"
}
}
/specialities
Resource of actions about specialities
Endpoint to list all specialities
Endpoint to create a new speciality
get /specialities
Endpoint to list all specialities
Query Parameters
- length: (integer)
Quantity of items to return
Example:
10
- offset: (integer)
Where items will be fetched must start
Endpoint to get item description
Endpoint to delete speciality