NAV
shell

Introduction

Welcome to the Sitata API! You can use our API to access Sitata API endpoints to provide your users with information on various health and safety entities in our database.

You can view code examples in the dark area to the right.

Using the API

RESTful

When we talk about our API, we use terms like “REST” and “RESTful.” “REST” is an architectural style that’s an alternative to RPC or SOAP-based web services. The acronym stands for Representational State Transfer.

Although there’s no official REST standard, there are common approaches and best practices used across the engineering community that help define how RESTful APIs should work. For example, most RESTful APIs follow six specific constraints or design rules.

Most APIs aren’t fully RESTful, but we follow most of the practices and common definitions of the style. For example, you can take action on most resources using the standard HTTP methods: POST, GET, PATCH, and DELETE.

JSON

Some API providers will use a custom MIME type for their RESTful APIs instead of the generic JSON type (application/json). For the Sitata API, we use the generic JSON content type.

Availablity & Exponential Backoff

In rare cases, the Sitata API might be unavailble. As such, it is highly recommended to consider using a background process to retry important actions using an exponential backoff period between retries.

For example, you might design a process to create traveller or trip records in the background to your normal processing routines. In this situation, it is vital to create those records and so it is suggested that you design your architecture to be able to retry these requests.

Company vs. End User

A few of the API endpoints are designated by the partner namespace. These endpoints are designed to give a Company access to the API for server to server communications and require authentication with the “Partner Company’s” authentication token. Most other endpoints are designed for Traveller or End User access using the Traveller record authentication token.

For example, the Company Retrieve A Trip endpoint is used by a company using the company’s authentication token to query the database and return a trip record. A traveller (end-user) can not acccess this endpoint. However, the Retrieve A Trip endpoint is used only by the traveller (end-user) to retrieve a trip record. For this endpoint, the traveller’s (end-user’s) authentication token must be used, not the company’s.

Typical Use Case

There are many ways to use and access the API depending on your partnership with Sitata. However, the typical use case is one in which a company wishes to provide Sitata’s services for its own travellers. In this case, the following procedure is recommended.

  1. Create a traveller record using the company endpoint.
  2. Create a trip using the company endpoint and the newly created traveller record.
  3. Use the authentication_token of the traveller to access the remaining (client/end-user) portions of the API. Typically, this would include downloading the traveller’s trip information to a mobile device, including country backgrounds, disease information, alerts, advisories, and so on.

Mobile SDKs

Sitata maintains an SDK for Android and for iOS. Use of these SDKs is documented separately.

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "https://www.sitata.com/api/v1/trips" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

Make sure to replace TKN TRAVELLER_API_KEY_HERE with your API key.

Sitata uses API keys to allow access to the API. You can contact Sitata support to request an API key.

Sitata expects the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: TKN TRAVELLER_API_KEY_HERE

This authorization header is handled automatically by the SDKs, but you will need to initalize the SDK’s with a traveller API key.

Pagination

Response headers for paginated result sets will include the following:

Link: <https://www.sitata.com/api/v1/trips?page=2&per_page=10>; rel="next", <https://www.sitata.com/api/v1/trips?page=2&per_page=10>; rel="last"
Total-Count: 11

Certain endpoints on the Sitata API will return paginated result sets to limit the amount of data in a single request. In general, an endpoint that returns a list of items or objects will return 10 items per request.

In this situation, the API will return a Link header which was introduced in RFC 5988. The link header returns a set of ready made links which you can use to determine the total number of pages and retrieve a set of objects for any given page. The API also includes a Total-Count header to indicate the total number of items in the database.

ETags

Response headers for requests will include an etag header like the following:

ETag: d64153a73b5ed6bd109a06316098dc7c
# With shell, you can just pass the correct etag header with each subsequent request to the same endpoint.
curl "https://www.sitata.com/api/v1/trips" \
  -H "If-None-Match: d64153a73b5ed6bd109a06316098dc7c"

Most endpoints on the Sitata API will return an Etag in the headers of the response. ETags, short for entity tags, are a common way to conditionally verify an HTTP cache. An ETag is a digest which represents the contents of a given resource.

When a response is returned by the server it will include an ETag to represent the resource’s state as part of the HTTP response headers. Subsequent HTTP requests which want to know whether or not the resource has changed since the last request can send along the stored ETag via the If-None-Match header.

The server will then compare the current ETag for the resource to the one provided by the client. If the two ETags match, the client’s cache is considered fresh and the server can respond with a “304 Not Modified” status and an empty response body.

Errors

When using the Sitata API, you might encounter the following error codes:

Error Code Meaning
400 Bad Request – Your request was malformed.
401 Unauthorized – Your API key is wrong or expired, or you are not allowed to access the resource.
403 Forbidden – You are not allowed to access the resource requested.
404 Not Found – The specified resource could not be found
405 Method Not Allowed – You tried to access a resource with an invalid method
406 Not Acceptable – You requested a format that isn’t json
429 Too Many Requests – You’re requesting too many resources! Slow down!
500 Internal Server Error – We had a problem with our servers. Try again later.
503 Service Unavailable – We’re temporarily offline for maintenance. Please try again later.
504 Timeout – We were not able to process your request quickly enough.

Geographical Objects

Sitata uses TopoJSON to represent geographical boundaries and areas for display on a map. Typically, these TopoJSON objects are contained within an attribute such as topo_json. In any case, TopoJSON can be converted into GeoJson (for further processing) using the TopoJSON library by using the feature function. Sitata’s SDKs also contain libraries to convert TopoJSON into GeoJson.

Traveller

Example response:

{
  "id": "57eabef0fc0022ae6900003f",
  "created_at": "2016-09-27T14:48:16.993-04:00",
  "updated_at": "2016-09-27T14:48:16.993-04:00",
  "first_name": "Jim",
  "last_name": "Robbins",
  "email": "jimrobbins-email@gmail.com",
  "home_country": "CA",
  "language": "en",
  "authentication_token": "eyJ0eXAiOiJKV1QiLsx4bGciOiJIUzI2NiJ9.eyJpYXQiOjE0NzUwMDIwOTcsu8N1YiI7IjU3ZWFiZWYxZmMwMDIyYWU2OTAwMDA1YiIsInR5cCI6IlVzZXIifQ.5vMi7ARpo21IrO-1I8jWQ1GsMGf9ziWHPk_Tg-6fZU",
  "settings": {
    "send_trip_alert_email": true,
    "send_all_good_email": true,
    "send_trip_alert_push": true,
    "send_all_good_push": true,
    "check_in_with_location": true
  }
}

A traveller wants to be informed about health and safety risks. They can have many trips.

Attributes

Attribute Type Description
first_name String The first name of the traveller
last_name String The last name of the traveller
email String The email address of the traveller
home_country String The country code as specified by ISO 3166-1 alpha-2.
language String The language code as specified by ISO 639-1.
created_at String The date the trip was created. A JSON string representing a datetime using ISO 8601 format
updated_at String The date the trip was last updated. A JSON string representing a datetime using ISO 8601 format
authentication_token String The authentication token which allows the traveller or a mobile client to interact with the non-partner endpoints of the API.

Traveller Settings

Attribute Type Description
send_trip_alert_email Boolean If true, Sitata will send the traveller trip alert emails when appropriate.
send_trip_alert_push Boolean If true, Sitata will send the traveller trip alert push notifications for their device(s) when appropriate.
send_all_good_email Boolean If true and your company account has this setting enabled, Sitata will send the traveller “all is well” emails stating no trip alerts found.
send_all_good_push Boolean If true and your company account has this setting enabled, Sitata will send the traveller “all is well” push notifications for their device(s) stating no trip alerts found.

Company Retrieve All Travellers

curl "https://www.sitata.com/api/v1/partner/travellers" \
  -H "Authorization: TKN COMPANY_API_KEY_HERE"

The above command returns JSON structured like this:

[
{
  "id": "57eabef0fc0022ae6900003f",
  "created_at": "2016-09-27T14:48:16.993-04:00",
  "updated_at": "2016-09-27T14:48:16.993-04:00",
  "first_name": "Jim",
  "last_name": "Robbins",
  "email": "jimrobbins-email@gmail.com",
  "home_country": "CA",
  "language": "en",
  "authentication_token": "eyJ0eXAiOiJKV1QiLsx4bGciOiJIUzI2NiJ9.eyJpYXQiOjE0NzUwMDIwOTcsu8N1YiI7IjU3ZWFiZWYxZmMwMDIyYWU2OTAwMDA1YiIsInR5cCI6IlVzZXIifQ.5vMi7ARpo21IrO-1I8jWQ1GsMGf9ziWHPk_Tg-6fZU",
  "settings": {
    "send_trip_alert_email": true,
    "send_all_good_email": true,
    "send_trip_alert_push": true,
    "send_all_good_push": true,
    "check_in_with_location": true
  }
}

]

GET https://www.sitata.com/api/v1/partner/travellers

This endpoint retrieves all travellers for the partner company using Sitata. Results are paginated.

Query Parameters

Parameter Type Description
since Integer Unix time in seconds. If present, will return trips that have been modified since the given time.
page Integer The current page number.

Company Retrieve A Traveller

curl "https://www.sitata.com/api/v1/partner/travellers/:traveller_id" \
  -H "Authorization: TKN COMPANY_API_KEY_HERE"

The above command returns JSON structured like this:

{
  "id": "57eabef0fc0022ae6900003f",
  "created_at": "2016-09-27T14:48:16.993-04:00",
  "updated_at": "2016-09-27T14:48:16.993-04:00",
  "first_name": "Jim",
  "last_name": "Robbins",
  "email": "jimrobbins-email@gmail.com",
  "home_country": "CA",
  "language": "en",
  "authentication_token": "eyJ0eXAiOiJKV1QiLsx4bGciOiJIUzI2NiJ9.eyJpYXQiOjE0NzUwMDIwOTcsu8N1YiI7IjU3ZWFiZWYxZmMwMDIyYWU2OTAwMDA1YiIsInR5cCI6IlVzZXIifQ.5vMi7ARpo21IrO-1I8jWQ1GsMGf9ziWHPk_Tg-6fZU",
  "settings": {
    "send_trip_alert_email": true,
    "send_all_good_email": true,
    "send_trip_alert_push": true,
    "send_all_good_push": true,
    "check_in_with_location": true
  }
}

GET https://www.sitata.com/api/v1/partner/travellers/:traveller_id

This endpoint retrieves a single traveller for the partner company using Sitata.

Query Parameters

Parameter Type Description
traveller_id String Specified in the url. The id of the traveller that you wish to retreive.

Company Create A Traveller

curl "https://www.sitata.com/api/v1/partner/travellers" \
  -H "Authorization: TKN COMPANY_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"traveller": {"first_name": "Jim", "email": "jimrobbins-email@gmail.com"}}'

The above command returns JSON structured like this:

{
  "id": "57eabef0fc0022ae6900003f",
  "created_at": "2016-09-27T14:48:16.993-04:00",
  "updated_at": "2016-09-27T14:48:16.993-04:00",
  "first_name": "Jim",
  "last_name": "Robbins",
  "email": "jimrobbins-email@gmail.com",
  "home_country": "CA",
  "language": "en",
  "authentication_token": "eyJ0eXAiOiJKV1QiLsx4bGciOiJIUzI2NiJ9.eyJpYXQiOjE0NzUwMDIwOTcsu8N1YiI7IjU3ZWFiZWYxZmMwMDIyYWU2OTAwMDA1YiIsInR5cCI6IlVzZXIifQ.5vMi7ARpo21IrO-1I8jWQ1GsMGf9ziWHPk_Tg-6fZU",
  "settings": {
    "send_trip_alert_email": true,
    "send_all_good_email": true,
    "send_trip_alert_push": true,
    "send_all_good_push": true,
    "check_in_with_location": true
  }
}

POST https://www.sitata.com/api/v1/partner/travellers/

This endpoint allows a partner company to create a traveller record. The traveller parameters should be nested inside a traveller parameter key. To create a traveller, the following must be true:

  1. The traveller must have a first name.
  2. The traveller must have a valid email address.

Request Body Parameters

Parameter Type Description
first_name String The first name of the traveller.
last_name String The last name of the traveller.
email String The traveller’s email address.
home_country String The country code as specified by ISO 3166-1 alpha-2.
language String The language code as specified by ISO 639-1.

Company Update A Traveller

curl "https://www.sitata.com/api/v1/partner/travellers/:traveller_id" \
  -H "Authorization: TKN COMPANY_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -X "PATCH" \
  -d '{"traveller": {"first_name": "Jim", "email": "jimrobbins-email@gmail.com"}}'

The above command returns JSON structured like this:

{
  "id": "57eabef0fc0022ae6900003f",
  "created_at": "2016-09-27T14:48:16.993-04:00",
  "updated_at": "2016-09-27T14:48:16.993-04:00",
  "first_name": "Jim",
  "last_name": "Robbins",
  "email": "jimrobbins-email@gmail.com",
  "home_country": "CA",
  "language": "en",
  "authentication_token": "eyJ0eXAiOiJKV1QiLsx4bGciOiJIUzI2NiJ9.eyJpYXQiOjE0NzUwMDIwOTcsu8N1YiI7IjU3ZWFiZWYxZmMwMDIyYWU2OTAwMDA1YiIsInR5cCI6IlVzZXIifQ.5vMi7ARpo21IrO-1I8jWQ1GsMGf9ziWHPk_Tg-6fZU",
  "settings": {
    "send_trip_alert_email": true,
    "send_all_good_email": true,
    "send_trip_alert_push": true,
    "send_all_good_push": true,
    "check_in_with_location": true
  }
}

PATCH https://www.sitata.com/api/v1/partner/travellers/:traveller_id

This endpoint allows a partner company to update a traveller record. The traveller parameters should be nested inside a traveller parameter key.

Request Body Parameters

Parameter Type Description
first_name String The first name of the traveller.
last_name String The last name of the traveller.
email String The traveller’s email address.
home_country String The country code as specified by ISO 3166-1 alpha-2.
language String The language code as specified by ISO 639-1.

Company Remove A Traveller

curl "https://www.sitata.com/api/v1/partner/travellers/:traveller_id" \
  -H "Authorization: TKN COMPANY_API_KEY_HERE" -X DELETE

The above command returns JSON structured like this:

[]

DELETE https://www.sitata.com/api/v1/partner/traveller/:traveller_id

This endpoint allows a partner company to remove a traveller from their records. The response body will be an empty array with a status code of 200 if successful.

Request Body Parameters

Parameter Type Description
traveller_id String The id of the traveller to remove. Specified in the url.

Trip

Example response:

{
  "id": "57eb15a8fc0022814e000023",
  "name": "My Trip",
  "start": "2016-09-30",
  "finish": "2016-10-03",
  "company_name": "Go Travel Demo",
  "employee_id": null,
  "employee_name": null,
  "muted": false,
  "read": false,
  "user_id": "57eb15a7fc0022814e000021",
  "company_id": "55db6dceb157fd5756000001",
  "trip_type": 0,
  "activities": [
    0
  ],
  "created_at": "2016-09-27T20:58:17.208-04:00",
  "updated_at": "2016-09-27T20:58:17.208-04:00",
  "deleted_at": null,
  "destinations": [
    {
      "id": "57eb15a7fc0022814e00001f",
      "departure_date": "2016-09-30",
      "return_date": "2016-10-03",
      "country_id": "4f831e85fe75bd2c230004fe",
      "country_code": "CN",
      "destination_locations": [
        {
          "friendly_name": "Hong Kong",
          "latitude": 22.3964,
          "longitude": 114.1095
        }
      ]
    }
  ],
  "trip_medication_comments": [
    {
      "comment": "Anti-malarial medication is recommended for travellers going to the following rural provinces:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.   Anti-malaria drug resistance for chloroquine and mefloquine is present.  Recommended medication depends on the provinces visited:  For Yunnan, atovaquone-proguanil or doxycycline.  For Hainan, atovaquone-proguanil, doxycycline, or mefloquine. For Anhui, Guizhou, Henan, and Hubei, atovaquone-proguanil, chloroquine, doxycycline, mefloquine or primaquine.",
      "medication_id": "5261f58633012653cbe9ee1f",
      "medication_name": "Anti-malarial Drugs",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_vaccination_comments": [
    {
      "comment": "This vaccination is recommended for people who plan extensive outdoor activities while visiting rural or farming areas during the months of May to October.  It is not recommended for itineraries that are limited to Beijing or other major cities. ",
      "vaccination_id": "5261f58733012653cbe9ee33",
      "vaccination_name": "Japanese Encephalitis Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_disease_comments": [
    {
      "comment": "In China, cities and popular tourist areas, including Yangtze River cruises, are not at risk and do not require anti-malarial medication. Rural areas only in the following provinces are at risk:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.  Malaria does not occur in urban areas.",
      "disease_id": "4f831e85fe75bd2c230004cc",
      "disease_name": "Malaria",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "past_alert_count": 0,
  "company_master": false,
  "header_image": null
}

A trip belongs to a traveller and contains itinierary and health and safety information.

Attributes

Attribute Type Description
id String The id of the trip.
name String The name of a trip helps the traveller stay organized
start String The departure date of the trip. Date format is “YYYY-MM-DD”. Will be set automatically if destinations present.
finish String The return date of the trip. Date format is “YYYY-MM-DD”. Will be set automatically if destinations present.
company_name String The name of the company that created the trip. Not present in all responses.
company_id String The unique identifier of the company that the trip belongs to. Not present in all responses.
employee_id String The unique identifier of the employee that created the trip for the user. Not present in all responses.
employee_name String The name of the employee that created the trip for the user. Not present in all responses.
muted Boolean If true, the user has silenced all notifications for the trip. Not present in all responses.
read Boolean If true, the user has viewed the trip. Not present in all responses.
user_id String Unique identifier of the user that the trip belongs to. Not present in all responses.
trip_type Integer The type of trip
activities [Integer] An integer array representing the activities that the traveller intends on doing during the trip
created_at String The date the trip was created. A JSON string representing a datetime using ISO 8601 format
updated_at String The date the trip was last updated. A JSON string representing a datetime using ISO 8601 format
deleted_at String The date the trip was removed. Trips are permanently removed 3 months later. A JSON string representing a datetime using ISO 8601 format. Not present in all responses.
destinations [Destination] An array containing Destination objects for the trip
trip_medication_comments [TMC] An array containing TripMedicationComment objects for the trip
trip_vaccination_comments [TVC] An array containing TripVaccinationComment objects for the trip
trip_disease_comments [TDC] An array containing TripDiseaseComment objects for the trip
past_alert_count Integer The number of alerts that were present for the trip at the time of creation. Not present in all responses.

Trip Types

Type Value
Holiday 0
Business 1
Other 2

Trip Activities

Type Value
Beach & Sun 0
Scuba Diving 1
Snorkeling 2
Hiking 3
Camping 4
Kayaking 5
Canoeing 6
Shopping 7
Site Seeing 8
Museums 9
Food 10
Ecotourism 11
Bicycling 12
Backpacking 13
Golf 14
Rock Climbing 15
Skiing 16
Snowboarding 17
Photography 18
Safari 19
Around The World 20
Medical Tourism 21
Humanitarian Work 22
Gambling 23
Jungle Trekking 24
Cruise 25
Road Trip 26
Amusement Park 27

Retrieve All Trips

curl "https://www.sitata.com/api/v1/trips" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

[
  {
  "id": "57eb15a8fc0022814e000023",
  "name": "My Trip",
  "start": "2016-09-30",
  "finish": "2016-10-03",
  "company_name": "Go Travel Demo",
  "employee_id": null,
  "employee_name": null,
  "muted": false,
  "read": false,
  "user_id": "57eb15a7fc0022814e000021",
  "company_id": "55db6dceb157fd5756000001",
  "trip_type": 0,
  "activities": [
    0
  ],
  "created_at": "2016-09-27T20:58:17.208-04:00",
  "updated_at": "2016-09-27T20:58:17.208-04:00",
  "deleted_at": null,
  "destinations": [
    {
      "id": "57eb15a7fc0022814e00001f",
      "departure_date": "2016-09-30",
      "return_date": "2016-10-03",
      "country_id": "4f831e85fe75bd2c230004fe",
      "country_code": "CN",
      "destination_locations": [
        {
          "friendly_name": "Hong Kong",
          "latitude": 22.3964,
          "longitude": 114.1095
        }
      ]
    }
  ],
  "trip_medication_comments": [
    {
      "comment": "Anti-malarial medication is recommended for travellers going to the following rural provinces:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.   Anti-malaria drug resistance for chloroquine and mefloquine is present.  Recommended medication depends on the provinces visited:  For Yunnan, atovaquone-proguanil or doxycycline.  For Hainan, atovaquone-proguanil, doxycycline, or mefloquine. For Anhui, Guizhou, Henan, and Hubei, atovaquone-proguanil, chloroquine, doxycycline, mefloquine or primaquine.",
      "medication_id": "5261f58633012653cbe9ee1f",
      "medication_name": "Anti-malarial Drugs",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_vaccination_comments": [
    {
      "comment": "This vaccination is recommended for people who plan extensive outdoor activities while visiting rural or farming areas during the months of May to October.  It is not recommended for itineraries that are limited to Beijing or other major cities. ",
      "vaccination_id": "5261f58733012653cbe9ee33",
      "vaccination_name": "Japanese Encephalitis Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_disease_comments": [
    {
      "comment": "In China, cities and popular tourist areas, including Yangtze River cruises, are not at risk and do not require anti-malarial medication. Rural areas only in the following provinces are at risk:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.  Malaria does not occur in urban areas.",
      "disease_id": "4f831e85fe75bd2c230004cc",
      "disease_name": "Malaria",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "past_alert_count": 0,
  "company_master": false,
  "header_image": null
}

]

GET https://www.sitata.com/api/v1/trips

This endpoint retrieves all trips for the traveller.

Query Parameters

Parameter Type Description
since Integer Unix time in seconds. If present, will return trips that have been modified since the given time.

Retrieve A Trip

curl "https://www.sitata.com/api/v1/trips/:trip_id" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

{
  "id": "57eb15a8fc0022814e000023",
  "name": "My Trip",
  "start": "2016-09-30",
  "finish": "2016-10-03",
  "company_name": "Go Travel Demo",
  "employee_id": null,
  "employee_name": null,
  "muted": false,
  "read": false,
  "user_id": "57eb15a7fc0022814e000021",
  "company_id": "55db6dceb157fd5756000001",
  "trip_type": 0,
  "activities": [
    0
  ],
  "created_at": "2016-09-27T20:58:17.208-04:00",
  "updated_at": "2016-09-27T20:58:17.208-04:00",
  "deleted_at": null,
  "destinations": [
    {
      "id": "57eb15a7fc0022814e00001f",
      "departure_date": "2016-09-30",
      "return_date": "2016-10-03",
      "country_id": "4f831e85fe75bd2c230004fe",
      "country_code": "CN",
      "destination_locations": [
        {
          "friendly_name": "Hong Kong",
          "latitude": 22.3964,
          "longitude": 114.1095
        }
      ]
    }
  ],
  "trip_medication_comments": [
    {
      "comment": "Anti-malarial medication is recommended for travellers going to the following rural provinces:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.   Anti-malaria drug resistance for chloroquine and mefloquine is present.  Recommended medication depends on the provinces visited:  For Yunnan, atovaquone-proguanil or doxycycline.  For Hainan, atovaquone-proguanil, doxycycline, or mefloquine. For Anhui, Guizhou, Henan, and Hubei, atovaquone-proguanil, chloroquine, doxycycline, mefloquine or primaquine.",
      "medication_id": "5261f58633012653cbe9ee1f",
      "medication_name": "Anti-malarial Drugs",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_vaccination_comments": [
    {
      "comment": "This vaccination is recommended for people who plan extensive outdoor activities while visiting rural or farming areas during the months of May to October.  It is not recommended for itineraries that are limited to Beijing or other major cities. ",
      "vaccination_id": "5261f58733012653cbe9ee33",
      "vaccination_name": "Japanese Encephalitis Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_disease_comments": [
    {
      "comment": "In China, cities and popular tourist areas, including Yangtze River cruises, are not at risk and do not require anti-malarial medication. Rural areas only in the following provinces are at risk:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.  Malaria does not occur in urban areas.",
      "disease_id": "4f831e85fe75bd2c230004cc",
      "disease_name": "Malaria",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "past_alert_count": 0,
  "company_master": false,
  "header_image": null
}

GET https://www.sitata.com/api/v1/trips/:trip_id

This endpoint retrieves a single trip for the traveller.

Query Parameters

Parameter Type Description
trip_id String Specified in the url. The id of the trip that you wish to retreive.

Retrieve The Current Trip

curl "https://www.sitata.com/api/v1/trips/current_trip" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

{
  "id": "57eb15a8fc0022814e000023",
  "name": "My Trip",
  "start": "2016-09-30",
  "finish": "2016-10-03",
  "company_name": "Go Travel Demo",
  "employee_id": null,
  "employee_name": null,
  "muted": false,
  "read": false,
  "user_id": "57eb15a7fc0022814e000021",
  "company_id": "55db6dceb157fd5756000001",
  "trip_type": 0,
  "activities": [
    0
  ],
  "created_at": "2016-09-27T20:58:17.208-04:00",
  "updated_at": "2016-09-27T20:58:17.208-04:00",
  "deleted_at": null,
  "destinations": [
    {
      "id": "57eb15a7fc0022814e00001f",
      "departure_date": "2016-09-30",
      "return_date": "2016-10-03",
      "country_id": "4f831e85fe75bd2c230004fe",
      "country_code": "CN",
      "destination_locations": [
        {
          "friendly_name": "Hong Kong",
          "latitude": 22.3964,
          "longitude": 114.1095
        }
      ]
    }
  ],
  "trip_medication_comments": [
    {
      "comment": "Anti-malarial medication is recommended for travellers going to the following rural provinces:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.   Anti-malaria drug resistance for chloroquine and mefloquine is present.  Recommended medication depends on the provinces visited:  For Yunnan, atovaquone-proguanil or doxycycline.  For Hainan, atovaquone-proguanil, doxycycline, or mefloquine. For Anhui, Guizhou, Henan, and Hubei, atovaquone-proguanil, chloroquine, doxycycline, mefloquine or primaquine.",
      "medication_id": "5261f58633012653cbe9ee1f",
      "medication_name": "Anti-malarial Drugs",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_vaccination_comments": [
    {
      "comment": "This vaccination is recommended for people who plan extensive outdoor activities while visiting rural or farming areas during the months of May to October.  It is not recommended for itineraries that are limited to Beijing or other major cities. ",
      "vaccination_id": "5261f58733012653cbe9ee33",
      "vaccination_name": "Japanese Encephalitis Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_disease_comments": [
    {
      "comment": "In China, cities and popular tourist areas, including Yangtze River cruises, are not at risk and do not require anti-malarial medication. Rural areas only in the following provinces are at risk:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.  Malaria does not occur in urban areas.",
      "disease_id": "4f831e85fe75bd2c230004cc",
      "disease_name": "Malaria",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "past_alert_count": 0,
  "company_master": false,
  "header_image": null
}

GET https://www.sitata.com/api/v1/trips/current_trip

This endpoint retrieves a single trip for the traveller. This trip represents a trip which is either currently ongoing or the next upcoming trip. If there are more than one trip that satisfies these criteria, the trip with the oldest start date is returned.

Query Parameters

None.

Create A Trip

curl "https://www.sitata.com/api/v1/trips" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"trip": {"name": "My trip", "destinations": [{"entry_date": 1475249179, "exit_date": 1475508379, "country_code": "CN", "destination_locations": [{"friendly_name": "Hong Kong", "latitude": 22.3964, "longitude": 114.1095}]}]}}'

The above command returns JSON structured like this:

{
  "id": "57eb15a8fc0022814e000023",
  "name": "My Trip",
  "start": "2016-09-30",
  "finish": "2016-10-03",
  "company_name": "Go Travel Demo",
  "employee_id": null,
  "employee_name": null,
  "muted": false,
  "read": false,
  "user_id": "57eb15a7fc0022814e000021",
  "company_id": "55db6dceb157fd5756000001",
  "trip_type": 0,
  "activities": [
    0
  ],
  "created_at": "2016-09-27T20:58:17.208-04:00",
  "updated_at": "2016-09-27T20:58:17.208-04:00",
  "deleted_at": null,
  "destinations": [
    {
      "id": "57eb15a7fc0022814e00001f",
      "departure_date": "2016-09-30",
      "return_date": "2016-10-03",
      "country_id": "4f831e85fe75bd2c230004fe",
      "country_code": "CN",
      "destination_locations": [
        {
          "friendly_name": "Hong Kong",
          "latitude": 22.3964,
          "longitude": 114.1095
        }
      ]
    }
  ],
  "trip_medication_comments": [
    {
      "comment": "Anti-malarial medication is recommended for travellers going to the following rural provinces:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.   Anti-malaria drug resistance for chloroquine and mefloquine is present.  Recommended medication depends on the provinces visited:  For Yunnan, atovaquone-proguanil or doxycycline.  For Hainan, atovaquone-proguanil, doxycycline, or mefloquine. For Anhui, Guizhou, Henan, and Hubei, atovaquone-proguanil, chloroquine, doxycycline, mefloquine or primaquine.",
      "medication_id": "5261f58633012653cbe9ee1f",
      "medication_name": "Anti-malarial Drugs",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_vaccination_comments": [
    {
      "comment": "This vaccination is recommended for people who plan extensive outdoor activities while visiting rural or farming areas during the months of May to October.  It is not recommended for itineraries that are limited to Beijing or other major cities. ",
      "vaccination_id": "5261f58733012653cbe9ee33",
      "vaccination_name": "Japanese Encephalitis Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_disease_comments": [
    {
      "comment": "In China, cities and popular tourist areas, including Yangtze River cruises, are not at risk and do not require anti-malarial medication. Rural areas only in the following provinces are at risk:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.  Malaria does not occur in urban areas.",
      "disease_id": "4f831e85fe75bd2c230004cc",
      "disease_name": "Malaria",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "past_alert_count": 0,
  "company_master": false,
  "header_image": null
}

POST https://www.sitata.com/api/v1/trips/

This endpoint allows a traveller to create a trip for themselves.

To create a trip, the following must be true:

  1. The trip must have at least one destination with valid attributes.
  2. The trip can not start and finish in the past.

Request Body Parameters

Parameter Type Description
name String The name of the trip to help the user organize their trips. Optional. If not assigned, one is generated automatically.
trip_type Integer The type of trip.
activities [Integer] An integer array of trip activities.
destinations [Destination] An array of destination object attributes.

Update A Trip

curl "https://www.sitata.com/api/v1/trips/:trip_id" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d '{"trip": {"destinations": [{"entry_date": 1475249179, "exit_date": 1475508379, "country_code": "CN", "destination_locations": [{"friendly_name": "Hong Kong", "latitude": 22.3964, "longitude": 114.1095}]}]}}'

The above command returns JSON structured like this:

{
  "id": "57eb15a8fc0022814e000023",
  "name": "My Trip",
  "start": "2016-09-30",
  "finish": "2016-10-03",
  "company_name": "Go Travel Demo",
  "employee_id": null,
  "employee_name": null,
  "muted": false,
  "read": false,
  "user_id": "57eb15a7fc0022814e000021",
  "company_id": "55db6dceb157fd5756000001",
  "trip_type": 0,
  "activities": [
    0
  ],
  "created_at": "2016-09-27T20:58:17.208-04:00",
  "updated_at": "2016-09-27T20:58:17.208-04:00",
  "deleted_at": null,
  "destinations": [
    {
      "id": "57eb15a7fc0022814e00001f",
      "departure_date": "2016-09-30",
      "return_date": "2016-10-03",
      "country_id": "4f831e85fe75bd2c230004fe",
      "country_code": "CN",
      "destination_locations": [
        {
          "friendly_name": "Hong Kong",
          "latitude": 22.3964,
          "longitude": 114.1095
        }
      ]
    }
  ],
  "trip_medication_comments": [
    {
      "comment": "Anti-malarial medication is recommended for travellers going to the following rural provinces:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.   Anti-malaria drug resistance for chloroquine and mefloquine is present.  Recommended medication depends on the provinces visited:  For Yunnan, atovaquone-proguanil or doxycycline.  For Hainan, atovaquone-proguanil, doxycycline, or mefloquine. For Anhui, Guizhou, Henan, and Hubei, atovaquone-proguanil, chloroquine, doxycycline, mefloquine or primaquine.",
      "medication_id": "5261f58633012653cbe9ee1f",
      "medication_name": "Anti-malarial Drugs",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_vaccination_comments": [
    {
      "comment": "This vaccination is recommended for people who plan extensive outdoor activities while visiting rural or farming areas during the months of May to October.  It is not recommended for itineraries that are limited to Beijing or other major cities. ",
      "vaccination_id": "5261f58733012653cbe9ee33",
      "vaccination_name": "Japanese Encephalitis Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_disease_comments": [
    {
      "comment": "In China, cities and popular tourist areas, including Yangtze River cruises, are not at risk and do not require anti-malarial medication. Rural areas only in the following provinces are at risk:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.  Malaria does not occur in urban areas.",
      "disease_id": "4f831e85fe75bd2c230004cc",
      "disease_name": "Malaria",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "past_alert_count": 0,
  "company_master": false,
  "header_image": null
}

PUT https://www.sitata.com/api/v1/trips/:trip_id

This endpoint allows a traveller to update a trip for themselves. The request paramaters and validations are the same as for creating a trip.

Remove A Trip

curl "https://www.sitata.com/api/v1/trips/:trip_id" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE" \
  -X DELETE

The above command returns JSON structured like this:

[]

DELETE https://www.sitata.com/api/v1/trips/:trip_id

This endpoint allows a traveller to remove a trip from their records. The response body will be an empty array with a status code of 200 if successful.

Request Body Parameters

Parameter Type Description
trip_id String The id of the trip to remove. Specified in the url.

Company Retrieve All Trips

curl "https://www.sitata.com/api/v1/partner/trips" \
  -H "Authorization: TKN COMPANY_API_KEY_HERE"

The above command returns JSON structured like this:

[
{
  "id": "57eabef0fc0022ae69000040",
  "start": "2016-09-30",
  "finish": "2016-10-03",
  "company_id": "55db6dceb157fd5756000001",
  "trip_type": 0,
  "activities": [
    0
  ],
  "created_at": "2016-09-27T14:48:16.926-04:00",
  "updated_at": "2016-09-27T14:48:16.926-04:00",
  "destinations": [
    {
      "id": "57eabef0fc0022ae69000059",
      "departure_date": "2016-09-30",
      "return_date": "2016-10-03",
      "country_id": "4f831e85fe75bd2c230004fe",
      "country_code": "CN",
      "destination_locations": [
        {
          "friendly_name": "Hong Kong",
          "latitude": 22.3964,
          "longitude": 114.1095
        }
      ]
    }
  ],
  "trip_medication_comments": [
    {
      "comment": "Anti-malarial medication is recommended for travellers going to the following rural provinces:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.   Anti-malaria drug resistance for chloroquine and mefloquine is present.  Recommended medication depends on the provinces visited:  For Yunnan, atovaquone-proguanil or doxycycline.  For Hainan, atovaquone-proguanil, doxycycline, or mefloquine. For Anhui, Guizhou, Henan, and Hubei, atovaquone-proguanil, chloroquine, doxycycline, mefloquine or primaquine.",
      "medication_id": "5261f58633012653cbe9ee1f",
      "medication_name": "Anti-malarial Drugs",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_vaccination_comments": [
    {
      "comment": "This vaccination is recommended for people who plan extensive outdoor activities while visiting rural or farming areas during the months of May to October.  It is not recommended for itineraries that are limited to Beijing or other major cities. ",
      "vaccination_id": "5261f58733012653cbe9ee33",
      "vaccination_name": "Japanese Encephalitis Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    },
    {
      "comment": "There is a significant risk of exposure to hepatitis A for this country, therefore, the vaccination is recommended.",
      "vaccination_id": "5261f58733012653cbe9ee2d",
      "vaccination_name": "Hepatitis A Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_disease_comments": [
    {
      "comment": "In China, cities and popular tourist areas, including Yangtze River cruises, are not at risk and do not require anti-malarial medication. Rural areas only in the following provinces are at risk:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.  Malaria does not occur in urban areas.",
      "disease_id": "4f831e85fe75bd2c230004cc",
      "disease_name": "Malaria",
      "country_id": "4f831e85fe75bd2c230004fe"
    },
    {
      "comment": "Japanese encephalitis usually occurs in rural farming areas in China.  Outbreaks have been recorded in all provinces except Xizang (Tibet), Xinjiang, and Qinghai. The risk for travellers of contracting Japanese encephalitis is low, but visiting areas where the virus is active and extensive outdoor activity in rural areas will increase this risk.",
      "disease_id": "4f831e85fe75bd2c230004c7",
      "disease_name": "Japanese encephalitis",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "travellers": [
    {
      "id": "57eabef0fc0022ae6900003f",
      "created_at": "2016-09-27T14:48:16.993-04:00",
      "updated_at": "2016-09-27T14:48:16.993-04:00",
      "first_name": "Jim",
      "last_name": "Robbins",
      "email": "jimrobbins-email@gmail.com",
      "home_country": "CA",
      "language": "en",
      "authentication_token": "eyJ0eXAiOiJKV1QiLsx4bGciOiJIUzI2NiJ9.eyJpYXQiOjE0NzUwMDIwOTcsu8N1YiI7IjU3ZWFiZWYxZmMwMDIyYWU2OTAwMDA1YiIsInR5cCI6IlVzZXIifQ.5vMi7ARpo21IrO-1I8jWQ1GsMGf9ziWHPk_Tg-6fZU"
    }
  ]
}

]

GET https://www.sitata.com/api/v1/partner/trips

This endpoint retrieves all trips for the partner company using Sitata. Results are paginated.

Query Parameters

Parameter Type Description
since Integer Unix time in seconds. If present, will return trips that have been modified since the given time.
page Integer The current page number.

Company Retrieve A Trip

curl "https://www.sitata.com/api/v1/partner/trips/:trip_id" \
  -H "Authorization: TKN COMPANY_API_KEY_HERE"

The above command returns JSON structured like this:

{
  "id": "57eabef0fc0022ae69000040",
  "start": "2016-09-30",
  "finish": "2016-10-03",
  "company_id": "55db6dceb157fd5756000001",
  "trip_type": 0,
  "activities": [
    0
  ],
  "created_at": "2016-09-27T14:48:16.926-04:00",
  "updated_at": "2016-09-27T14:48:16.926-04:00",
  "destinations": [
    {
      "id": "57eabef0fc0022ae69000059",
      "departure_date": "2016-09-30",
      "return_date": "2016-10-03",
      "country_id": "4f831e85fe75bd2c230004fe",
      "country_code": "CN",
      "destination_locations": [
        {
          "friendly_name": "Hong Kong",
          "latitude": 22.3964,
          "longitude": 114.1095
        }
      ]
    }
  ],
  "trip_medication_comments": [
    {
      "comment": "Anti-malarial medication is recommended for travellers going to the following rural provinces:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.   Anti-malaria drug resistance for chloroquine and mefloquine is present.  Recommended medication depends on the provinces visited:  For Yunnan, atovaquone-proguanil or doxycycline.  For Hainan, atovaquone-proguanil, doxycycline, or mefloquine. For Anhui, Guizhou, Henan, and Hubei, atovaquone-proguanil, chloroquine, doxycycline, mefloquine or primaquine.",
      "medication_id": "5261f58633012653cbe9ee1f",
      "medication_name": "Anti-malarial Drugs",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_vaccination_comments": [
    {
      "comment": "This vaccination is recommended for people who plan extensive outdoor activities while visiting rural or farming areas during the months of May to October.  It is not recommended for itineraries that are limited to Beijing or other major cities. ",
      "vaccination_id": "5261f58733012653cbe9ee33",
      "vaccination_name": "Japanese Encephalitis Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    },
    {
      "comment": "There is a significant risk of exposure to hepatitis A for this country, therefore, the vaccination is recommended.",
      "vaccination_id": "5261f58733012653cbe9ee2d",
      "vaccination_name": "Hepatitis A Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_disease_comments": [
    {
      "comment": "In China, cities and popular tourist areas, including Yangtze River cruises, are not at risk and do not require anti-malarial medication. Rural areas only in the following provinces are at risk:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.  Malaria does not occur in urban areas.",
      "disease_id": "4f831e85fe75bd2c230004cc",
      "disease_name": "Malaria",
      "country_id": "4f831e85fe75bd2c230004fe"
    },
    {
      "comment": "Japanese encephalitis usually occurs in rural farming areas in China.  Outbreaks have been recorded in all provinces except Xizang (Tibet), Xinjiang, and Qinghai. The risk for travellers of contracting Japanese encephalitis is low, but visiting areas where the virus is active and extensive outdoor activity in rural areas will increase this risk.",
      "disease_id": "4f831e85fe75bd2c230004c7",
      "disease_name": "Japanese encephalitis",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "travellers": [
    {
      "id": "57eabef0fc0022ae6900003f",
      "created_at": "2016-09-27T14:48:16.993-04:00",
      "updated_at": "2016-09-27T14:48:16.993-04:00",
      "first_name": "Jim",
      "last_name": "Robbins",
      "email": "jimrobbins-email@gmail.com",
      "home_country": "CA",
      "language": "en",
      "authentication_token": "eyJ0eXAiOiJKV1QiLsx4bGciOiJIUzI2NiJ9.eyJpYXQiOjE0NzUwMDIwOTcsu8N1YiI7IjU3ZWFiZWYxZmMwMDIyYWU2OTAwMDA1YiIsInR5cCI6IlVzZXIifQ.5vMi7ARpo21IrO-1I8jWQ1GsMGf9ziWHPk_Tg-6fZU"
    }
  ]
}

GET https://www.sitata.com/api/v1/partner/trips/:trip_id

This endpoint retrieves a single trip for the partner company using Sitata.

Query Parameters

Parameter Type Description
trip_id String Specified in the url. The id of the trip that you wish to retreive.

Company Create A Trip

curl "https://www.sitata.com/api/v1/partner/trips" \
  -H "Authorization: TKN COMPANY_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"trip": {"name": "My trip", "destinations": [{"entry_date": 1475249179, "exit_date": 1475508379, "country_code": "CN", "destination_locations": [{"friendly_name": "Hong Kong", "latitude": 22.3964, "longitude": 114.1095}]}], "travellers": [{"first_name": "Jim", "last_name": "Robbins", "email": "jimrobbins7839@gmail.com"}]}}'

The above command returns JSON structured like this:

{
  "id": "57eabef0fc0022ae69000040",
  "start": "2016-09-30",
  "finish": "2016-10-03",
  "company_id": "55db6dceb157fd5756000001",
  "trip_type": 0,
  "activities": [
    0
  ],
  "created_at": "2016-09-27T14:48:16.926-04:00",
  "updated_at": "2016-09-27T14:48:16.926-04:00",
  "destinations": [
    {
      "id": "57eabef0fc0022ae69000059",
      "departure_date": "2016-09-30",
      "return_date": "2016-10-03",
      "country_id": "4f831e85fe75bd2c230004fe",
      "country_code": "CN",
      "destination_locations": [
        {
          "friendly_name": "Hong Kong",
          "latitude": 22.3964,
          "longitude": 114.1095
        }
      ]
    }
  ],
  "trip_medication_comments": [
    {
      "comment": "Anti-malarial medication is recommended for travellers going to the following rural provinces:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.   Anti-malaria drug resistance for chloroquine and mefloquine is present.  Recommended medication depends on the provinces visited:  For Yunnan, atovaquone-proguanil or doxycycline.  For Hainan, atovaquone-proguanil, doxycycline, or mefloquine. For Anhui, Guizhou, Henan, and Hubei, atovaquone-proguanil, chloroquine, doxycycline, mefloquine or primaquine.",
      "medication_id": "5261f58633012653cbe9ee1f",
      "medication_name": "Anti-malarial Drugs",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_vaccination_comments": [
    {
      "comment": "This vaccination is recommended for people who plan extensive outdoor activities while visiting rural or farming areas during the months of May to October.  It is not recommended for itineraries that are limited to Beijing or other major cities. ",
      "vaccination_id": "5261f58733012653cbe9ee33",
      "vaccination_name": "Japanese Encephalitis Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    },
    {
      "comment": "There is a significant risk of exposure to hepatitis A for this country, therefore, the vaccination is recommended.",
      "vaccination_id": "5261f58733012653cbe9ee2d",
      "vaccination_name": "Hepatitis A Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_disease_comments": [
    {
      "comment": "In China, cities and popular tourist areas, including Yangtze River cruises, are not at risk and do not require anti-malarial medication. Rural areas only in the following provinces are at risk:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.  Malaria does not occur in urban areas.",
      "disease_id": "4f831e85fe75bd2c230004cc",
      "disease_name": "Malaria",
      "country_id": "4f831e85fe75bd2c230004fe"
    },
    {
      "comment": "Japanese encephalitis usually occurs in rural farming areas in China.  Outbreaks have been recorded in all provinces except Xizang (Tibet), Xinjiang, and Qinghai. The risk for travellers of contracting Japanese encephalitis is low, but visiting areas where the virus is active and extensive outdoor activity in rural areas will increase this risk.",
      "disease_id": "4f831e85fe75bd2c230004c7",
      "disease_name": "Japanese encephalitis",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "travellers": [
    {
      "id": "57eabef0fc0022ae6900003f",
      "created_at": "2016-09-27T14:48:16.993-04:00",
      "updated_at": "2016-09-27T14:48:16.993-04:00",
      "first_name": "Jim",
      "last_name": "Robbins",
      "email": "jimrobbins-email@gmail.com",
      "home_country": "CA",
      "language": "en",
      "authentication_token": "eyJ0eXAiOiJKV1QiLsx4bGciOiJIUzI2NiJ9.eyJpYXQiOjE0NzUwMDIwOTcsu8N1YiI7IjU3ZWFiZWYxZmMwMDIyYWU2OTAwMDA1YiIsInR5cCI6IlVzZXIifQ.5vMi7ARpo21IrO-1I8jWQ1GsMGf9ziWHPk_Tg-6fZU"
    }
  ]
}

POST https://www.sitata.com/api/v1/partner/trips/

This endpoint allows a partner company to create a trip for a set of travellers. The trip parameters should be nested inside a trip parameter key. Travellers can be created at the same time as the trip by specifying the traveller attributes using the travellers key in the request body. Alternatively, existing travellers can be speicifed using the traveller_ids key in the request body.

To create a trip, the following must be true:

  1. The trip must have at least one traveller with valid attributes.
  2. The trip must have either:

    a) at least one destination with valid attributes; or

    b) zero destinations with valid start and finish dates.

  3. The trip can not start and finish in the past.

Request Body Parameters

Parameter Type Description
trip Trip The properties of the trip you wish to create. See below.
calc_trip_dates Boolean If set to false, Sitata will not calculate the trip’s start and finish date based on the destination list of the trip.

Trip Body Parameters

Parameter Type Description
name String The name of the trip to help the user organize their trips. Optional. If not assigned, one is generated automatically.
trip_type Integer The type of trip.
activities [Integer] An integer array of trip activities.
destinations [Destination] An array of destination object attributes. See below.
travellers [Traveller] An array of traveller object attributes. See below. Must not be used in conjunction with traveller_ids
traveller_ids [String] An array of traveller ids to associate to this trip. Must not be used in conjunction with travellers.

Company Update A Trip

curl "https://www.sitata.com/api/v1/partner/trips/:trip_id" \
  -H "Authorization: TKN COMPANY_API_KEY_HERE" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d '{"trip": {"destinations": [{"entry_date": 1475249179, "exit_date": 1475508379, "country_code": "CN", "destination_locations": [{"friendly_name": "Hong Kong", "latitude": 22.3964, "longitude": 114.1095}]}]}}'

The above command returns JSON structured like this:

{
  "id": "57eabef0fc0022ae69000040",
  "start": "2016-09-30",
  "finish": "2016-10-03",
  "company_id": "55db6dceb157fd5756000001",
  "trip_type": 0,
  "activities": [
    0
  ],
  "created_at": "2016-09-27T14:48:16.926-04:00",
  "updated_at": "2016-09-27T14:48:16.926-04:00",
  "destinations": [
    {
      "id": "57eabef0fc0022ae69000059",
      "departure_date": "2016-09-30",
      "return_date": "2016-10-03",
      "country_id": "4f831e85fe75bd2c230004fe",
      "country_code": "CN",
      "destination_locations": [
        {
          "friendly_name": "Hong Kong",
          "latitude": 22.3964,
          "longitude": 114.1095
        }
      ]
    }
  ],
  "trip_medication_comments": [
    {
      "comment": "Anti-malarial medication is recommended for travellers going to the following rural provinces:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.   Anti-malaria drug resistance for chloroquine and mefloquine is present.  Recommended medication depends on the provinces visited:  For Yunnan, atovaquone-proguanil or doxycycline.  For Hainan, atovaquone-proguanil, doxycycline, or mefloquine. For Anhui, Guizhou, Henan, and Hubei, atovaquone-proguanil, chloroquine, doxycycline, mefloquine or primaquine.",
      "medication_id": "5261f58633012653cbe9ee1f",
      "medication_name": "Anti-malarial Drugs",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_vaccination_comments": [
    {
      "comment": "This vaccination is recommended for people who plan extensive outdoor activities while visiting rural or farming areas during the months of May to October.  It is not recommended for itineraries that are limited to Beijing or other major cities. ",
      "vaccination_id": "5261f58733012653cbe9ee33",
      "vaccination_name": "Japanese Encephalitis Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    },
    {
      "comment": "There is a significant risk of exposure to hepatitis A for this country, therefore, the vaccination is recommended.",
      "vaccination_id": "5261f58733012653cbe9ee2d",
      "vaccination_name": "Hepatitis A Vaccine",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "trip_disease_comments": [
    {
      "comment": "In China, cities and popular tourist areas, including Yangtze River cruises, are not at risk and do not require anti-malarial medication. Rural areas only in the following provinces are at risk:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.  Malaria does not occur in urban areas.",
      "disease_id": "4f831e85fe75bd2c230004cc",
      "disease_name": "Malaria",
      "country_id": "4f831e85fe75bd2c230004fe"
    },
    {
      "comment": "Japanese encephalitis usually occurs in rural farming areas in China.  Outbreaks have been recorded in all provinces except Xizang (Tibet), Xinjiang, and Qinghai. The risk for travellers of contracting Japanese encephalitis is low, but visiting areas where the virus is active and extensive outdoor activity in rural areas will increase this risk.",
      "disease_id": "4f831e85fe75bd2c230004c7",
      "disease_name": "Japanese encephalitis",
      "country_id": "4f831e85fe75bd2c230004fe"
    }
  ],
  "travellers": [
    {
      "id": "57eabef0fc0022ae6900003f",
      "created_at": "2016-09-27T14:48:16.993-04:00",
      "updated_at": "2016-09-27T14:48:16.993-04:00",
      "first_name": "Jim",
      "last_name": "Robbins",
      "email": "jimrobbins-email@gmail.com",
      "home_country": "CA",
      "language": "en",
      "authentication_token": "eyJ0eXAiOiJKV1QiLsx4bGciOiJIUzI2NiJ9.eyJpYXQiOjE0NzUwMDIwOTcsu8N1YiI7IjU3ZWFiZWYxZmMwMDIyYWU2OTAwMDA1YiIsInR5cCI6IlVzZXIifQ.5vMi7ARpo21IrO-1I8jWQ1GsMGf9ziWHPk_Tg-6fZU"
    }
  ]
}

PUT https://www.sitata.com/api/v1/partner/trips/:trip_id

This endpoint allows a company to update one of their trip records. The request paramaters and validations are the same as for creating a trip with the exception that you can not adjust the travellers associated with the trip.

Request Body Parameters

Parameter Type Description
trip Trip The properties of the trip you wish to create. See below.
calc_trip_dates Boolean If set to false, Sitata will not calculate the trip’s start and finish date based on the destination list of the trip.

Trip Body Parameters

Parameter Type Description
name String The name of the trip to help the user organize their trips. Optional. If not assigned, one is generated automatically.
trip_type Integer The type of trip.
activities [Integer] An integer array of trip activities.
destinations [Destination] An array of destination object attributes. See below.
travellers [Traveller] An array of traveller object attributes. See below. Must not be used in conjunction with traveller_ids
traveller_ids [String] An array of traveller ids to associate to this trip. Must not be used in conjunction with travellers.

Trip Start and Finish Date


// After the trip's properties have been updated based on the given parameters, then
// the following pseudo code applies when Sitata determines whether or not to set
// the `start` and `finish` date from the trip's destination list.

if calc_trip_dates is present
  return calc_trip_dates
else if start is present OR finish is present
  return false
else if trip contains destinations
  return true
else
  return false
end

The following logic applies when Sitata determines what the start and finish date of a trip should be.

  1. If you specify the calc_trip_dates boolean parameter, then the desired behavior is forced regardless of the other conditions outlined below. For example, if set to false then the trip’s start and finish date will be set to the values you provide. If set to true, then the trip’s start and finish date will be calculated based on the trip’s destination list.

  2. If there are no destinations provided, Sitata will not calculate trip dates. If creating a trip, you are expected to provide them in this scenario.

  3. If you give Sitata a start or a finish date, then Sitata does not calculate the dates from the destination list.

  4. When the start date is not provided and the finish date is not provided, but destinations are provided, then Sitata will remove the entire prior list of destinations and will re-calculate the start and finish date based on the new destination list given.

Company Remove A Trip

curl "https://www.sitata.com/api/v1/partner/trips/:trip_id" \
  -H "Authorization: TKN COMPANY_API_KEY_HERE" -X DELETE

The above command returns JSON structured like this:

[]

DELETE https://www.sitata.com/api/v1/partner/trips/:trip_id

This endpoint allows a partner company to remove a trip from their records. The response body will be an empty array with a status code of 200 if successful.

Request Body Parameters

Parameter Type Description
trip_id String The id of the trip to remove. Specified in the url.

Trip Disease Comment

Example json:

{
  "comment": "In China, cities and popular tourist areas, including Yangtze River cruises, are not at risk and do not require anti-malarial medication. Rural areas only in the following provinces are at risk:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.  Malaria does not occur in urban areas.",
  "disease_id": "4f831e85fe75bd2c230004cc",
  "disease_name": "Malaria",
  "country_id": "4f831e85fe75bd2c230004fe"
}

A Trip Disease Comment provides a country specific explanation about why a Disease is present for a particular country. This resource is never accessed directly and is only ever accessed or changed when dealing with a Trip.

Attributes

Attribute Type Description
comment String Descriptive text
disease_id String Sitata’s id for the Disease
disease_name String The name of the Disease
country_id String Sitata’s id for the corresponding country

Trip Medication Comment

Example json:

{
  "comment": "Anti-malarial medication is recommended for travellers going to the following rural provinces:  Hainan, Henan, Yunnan, Guizhou, Anhui, Hubei, and Jiangsu.   Anti-malaria drug resistance for chloroquine and mefloquine is present.  Recommended medication depends on the provinces visited:  For Yunnan, atovaquone-proguanil or doxycycline.  For Hainan, atovaquone-proguanil, doxycycline, or mefloquine. For Anhui, Guizhou, Henan, and Hubei, atovaquone-proguanil, chloroquine, doxycycline, mefloquine or primaquine.",
  "medication_id": "5261f58633012653cbe9ee1f",
  "medication_name": "Anti-malarial Drugs",
  "country_id": "4f831e85fe75bd2c230004fe"
}

A Trip Medication Comment provides a country specific explanation about why a Medication is recommended for a particular country. This resource is never accessed directly and is only ever accessed or changed when dealing with a Trip.

Attributes

Attribute Type Description
comment String Descriptive text
medication_id String Sitata’s id for the Medication
medication_name String The name of the Medication
country_id String Sitata’s id for the corresponding country

Trip Vaccination Comment

Example json:

{
  "comment": "This vaccination is recommended for people who plan extensive outdoor activities while visiting rural or farming areas during the months of May to October.  It is not recommended for itineraries that are limited to Beijing or other major cities.",
  "vaccination_id": "5261f58733012653cbe9ee33",
  "vaccination_name": "Japanese Encephalitis Vaccine",
  "country_id": "4f831e85fe75bd2c230004fe"
}

A Trip Vaccination Comment provides a country specific explanation about why a Vaccination is recommended for a particular country. This resource is never accessed directly and is only ever accessed or changed when dealing with a Trip.

Attributes

Attribute Type Description
comment String Descriptive text
vaccination_id String Sitata’s id for the Vaccination
vaccination_name String The name of the Vaccination
country_id String Sitata’s id for the corresponding country

Destination

Example destination json:

{
  "id": "57eabef0fc0022ae69000059",
  "departure_date": "2016-09-30",
  "return_date": "2016-10-03",
  "country_id": "4f831e85fe75bd2c230004fe",
  "country_code": "CN"
}

A trip is made up of one or more destination objects. This resource is never accessed directly and only ever accessed or changed when dealing with a Trip.

Attributes

Attribute Type Description
entry_date String Represents the day the traveller is entering this country. A JSON string representing a datetime using ISO 8601 format
departure_date String Alias for entry_date
exit_date String Represents the day the traveller is leaving this country. A JSON string representing a datetime using ISO 8601 format
return_date String Alias for exit_date
country_code String The country code as specified by ISO 3166-1 alpha-2.
country_id String A unique ID Sitata uses to identify the country.
destination_locations [DestinationLocation] An array containing DestinationLocation objects for the destination.

Destination Location

Example destination json:

{
  "id": "57eabef0fc0022ae69000059",
  "friendly_name": "Waterloo",
  "latitude": 43.4509,
  "longitude": -80.4983
}

A destination can have locations associated with it. This resource is never accessed directly and only ever accessed or changed when dealing with a Trip. These entries are used during Sitata’s Trip Alert process.

Attributes

Attribute Type Description
friendly_name String A name for the location for display purposes.
latitude Double The latitude of the location.
longitude Double The longitude of the location.

Country

Example json:

{
  "id": "4f831e85fe75bd2c230004eb",
  "slug": "argentina",
  "created_at": "2012-04-09T13:38:13.000-04:00",
  "updated_at": "2015-10-24T12:12:05.808-04:00",
  "deleted_at": null,
  "name": "Argentina",
  "country_code": "AR",
  "country_code_3": "ARG",
  "facts": "Argentina is the second largest country in South America, with a...",
  "capital": "Buenos Aires",
  "language": "Spanish.  Languages also spoken are English, Italian, German, and French.",
  "currency_name": "Argentine peso",
  "currency_code": "ARS",
  "division_name": "province",
  "region_name": "municipality",
  "travel_status": 0,
  "sec_emer_num": "\r\n\r\n",
  "sec_personal": "Travellers to Argentina should exercise a high degree...",
  "sec_ext_viol": "",
  "sec_pol_unr": "- Demonstrations, strikes, and roadblocks can occur at any time...",
  "sec_areas": "- Travellers should exercise caution near Iguazú Falls and areas...",
  "flag": {
    "url": "system/countries/AR/flag/AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg",
    "main": "system/countries/AR/flag/main_AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg",
    "list": "system/countries/AR/flag/list_AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg"
  },
  "country_datum": {
    "id": "51322cbc28bfd4464800002b",
    "company_id": "51322b3e28bfd4c7dd000001",
    "country_disease_comments": [
      {
        "comment": "There is a risk for hepatitis A virus exposure in Argentina.",
        "disease": {
          "id": "4f831e85fe75bd2c230004c4",
          "common_name": "Hepatitis A"
        }
      },
      {
        "comment": "There is a low risk of infection with hepatitis B for this country.",
        "disease": {
          "id": "4f831e85fe75bd2c230004c5",
          "common_name": "Hepatitis B"
        }
      },
      {
        "comment": "Unvaccinated people can become infected through contaminated food and water in this country, especially when visiting smaller cities, villages or rural areas where food and water sources may be contaminated.",
        "disease": {
          "id": "4f831e85fe75bd2c230004e3",
          "common_name": "Typhoid Fever"
        }
      }
    ],
    "country_medication_comments": [
      {
        "comment": "Although the risk of malaria is low, travellers may consider anti-malaria medication if travelling in rural areas of northern Salta Province (along the Bolivian border), Chaco and Misiones Provinces (along the Paraguay border).  Recommended anti-malaria medication includes atovaquone-proguanil, chloroquine, doxycycline and mefloquine.",
        "medication": {
          "id": "5261f58633012653cbe9ee1f",
          "name": "Anti-malarial Drugs"
        }
      }
    ],
    "country_vaccination_comments": [
      {
        "comment": "There is a risk of exposure to hepatitis A for this country, therefore, the vaccination is recommended.",
        "vaccination": {
          "id": "5261f58733012653cbe9ee2d",
          "name": "Hepatitis A Vaccine"
        }
      },
      {
        "comment": "Yellow fever vaccination is recommended for northern and northeastern forested areas of Argentina bordering Brazil and Paraguay where altitudes are less than 2300 meters. Travellers to departments in the following provinces should be vaccinated: Misiones (all departments) and Corrientes (Berón de Astrada, Capital, General Alvear, General Paz, Ituzaingó, Itatí, Paso de los Libres, San Cosme, San Martín, San Miguel, Santo Tomé). Vaccination is also recommended for travellers visiting Iguazu Falls. \r\n\r\nYellow fever vaccination is not recommended for the provinces of Formosa,  Chaco, Jujuy, and Salta. ",
        "vaccination": {
          "id": "5261f58733012653cbe9ee45",
          "name": "Yellow Fever Vaccine"
        }
      }
    ]
  },
  "emerg_numbers": [
    {
      "typ": 90,
      "val": "911",
      "note": "In Buenos Aires and surrounding province of Buenos Aires",
      "order": 0
    },
    {
      "typ": 90,
      "val": "101",
      "note": "",
      "order": 1
    },
    {
      "typ": 91,
      "val": "100",
      "note": "",
      "order": 2
    },
    {
      "typ": 92,
      "val": "107",
      "note": "",
      "order": 3
    },
    {
      "typ": 90,
      "val": "112",
      "note": "Mobile phones - Directs to local emergency number",
      "order": 4
    }
  ]
}

A Country object represents a real-world country and contains various health and safety information for the region. A Country object also maintains geographical information used to highlight regions to the end user.

Attributes

Attribute Type Description
id String The id of the country.
slug String An alternative string which can be used to query the database.
created_at String The date the country was created. A JSON string representing a datetime using ISO 8601 format
updated_at String The date the country was last updated. A JSON string representing a datetime using ISO 8601 format
deleted_at String The date the country was removed. A JSON string representing a datetime using ISO 8601 format. Not present in all responses.
name String The name of the country
country_code String The ISO 3166-1 alpha 2 country code.
country_code_3 String The ISO 3166-1 alpha 3 country code.
facts String A descriptive, factual paragraph in Markdown format about the country.
capital String The name of the capital.
language String A sentence about which languages are spoken in the country.
currency_name String The name of the currency used in the country.
currency_code String The ISO 4217 currency code for the country.
travel_status Integer The Travel Status of the country.
sec_emer_num String A textual paragraph in Markdown format describing emergency numbers in the country. Largely deprecated in favour of Contact Details and the emergency numbers field.
sec_personal String Personal Security. A paragraph in Markdown format describing personal security information for the traveller.
sec_ext_viol String Extreme Violence. A paragraph in Markdown format describing if any extreme violence has occurred within the country in the past.
sec_pol_unr String Political Unrest. A paragraph in Markdown format describing if any political unrest such as demonstrations and strikes has occurred within the country in the past.
sec_areas String Areas To Avoid. A paragraph in Markdown format describing areas to avoid within the country.
flag {FlagObject} An object representing urls to the flag assets for the country.
country_datum {CountryDatum} An object containing health information for the country.
emerg_numbers [ContactDetail] An array of ContactDetail objects representing emergency numbers for the country.

Travel Status

Sitata uses only three travel status values to represent risk for a certain country or region.

Status Value Description
Normal 0 Travellers should use normal safety precautions.
Caution 1 Travellers should use heightened safety precautions.
Avoid 2 Travellers should avoid travel to this area.

Flag Object

Example json:

{
  "flag": {
    "url": "system/countries/AR/flag/AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg",
    "main": "system/countries/AR/flag/main_AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg",
    "list": "system/countries/AR/flag/list_AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg"
  }
}

The flag object simply represents various assets available which represent the country’s national flag.

Key Description
url The original flag asset.
main A large version of the flag asset. Maximum 80px wide and 80px tall.
list A smaller version of the flag asset meant for use in list views. Maximum 20px wide and 20px tall.

Country Datum

The country datum is used to contain country health information such as vaccinations, medications, and diseases within it. The reason it is contained as a separate object as the “datum” serves as a layer to allow certain partners of Sitata to customize the health information to their own preferences. This allows, for example, a company in Belgium to choose to serve Belgian health recommendations to their users, while another company might simply wish to use the default health recommendations of Sitata.

Attribute Type Description
country_disease_comments [CountryDiseaseComment] An array containing CountryDiseaseComment objects for the trip.
country_vaccination_comments [CountryVaccinationComment] An array containing CountryVaccinationComment objects for the trip.
country_medication_comments [CountryMedicationComment] An array containing CountryMedicationComment objects for the trip.

Retrieve All Countries

curl "https://www.sitata.com/api/v1/countries" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

[
  {
  "id": "4f831e85fe75bd2c230004eb",
  "slug": "argentina",
  "created_at": "2012-04-09T13:38:13.000-04:00",
  "updated_at": "2015-10-24T12:12:05.808-04:00",
  "deleted_at": null,
  "name": "Argentina",
  "country_code": "AR",
  "country_code_3": "ARG",
  "facts": "Argentina is the second largest country in South America, with a...",
  "capital": "Buenos Aires",
  "language": "Spanish.  Languages also spoken are English, Italian, German, and French.",
  "currency_name": "Argentine peso",
  "currency_code": "ARS",
  "division_name": "province",
  "region_name": "municipality",
  "travel_status": 0,
  "sec_emer_num": "\r\n\r\n",
  "sec_personal": "Travellers to Argentina should exercise a high degree...",
  "sec_ext_viol": "",
  "sec_pol_unr": "- Demonstrations, strikes, and roadblocks can occur at any time...",
  "sec_areas": "- Travellers should exercise caution near Iguazú Falls and areas...",
  "flag": {
    "url": "system/countries/AR/flag/AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg",
    "main": "system/countries/AR/flag/main_AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg",
    "list": "system/countries/AR/flag/list_AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg"
  },
  "country_datum": {
    "id": "51322cbc28bfd4464800002b",
    "company_id": "51322b3e28bfd4c7dd000001",
    "country_disease_comments": [
      {
        "comment": "There is a risk for hepatitis A virus exposure in Argentina.",
        "disease": {
          "id": "4f831e85fe75bd2c230004c4",
          "common_name": "Hepatitis A"
        }
      },
      {
        "comment": "There is a low risk of infection with hepatitis B for this country.",
        "disease": {
          "id": "4f831e85fe75bd2c230004c5",
          "common_name": "Hepatitis B"
        }
      },
      {
        "comment": "Unvaccinated people can become infected through contaminated food and water in this country, especially when visiting smaller cities, villages or rural areas where food and water sources may be contaminated.",
        "disease": {
          "id": "4f831e85fe75bd2c230004e3",
          "common_name": "Typhoid Fever"
        }
      }
    ],
    "country_medication_comments": [
      {
        "comment": "Although the risk of malaria is low, travellers may consider anti-malaria medication if travelling in rural areas of northern Salta Province (along the Bolivian border), Chaco and Misiones Provinces (along the Paraguay border).  Recommended anti-malaria medication includes atovaquone-proguanil, chloroquine, doxycycline and mefloquine.",
        "medication": {
          "id": "5261f58633012653cbe9ee1f",
          "name": "Anti-malarial Drugs"
        }
      }
    ],
    "country_vaccination_comments": [
      {
        "comment": "There is a risk of exposure to hepatitis A for this country, therefore, the vaccination is recommended.",
        "vaccination": {
          "id": "5261f58733012653cbe9ee2d",
          "name": "Hepatitis A Vaccine"
        }
      },
      {
        "comment": "Yellow fever vaccination is recommended for northern and northeastern forested areas of Argentina bordering Brazil and Paraguay where altitudes are less than 2300 meters. Travellers to departments in the following provinces should be vaccinated: Misiones (all departments) and Corrientes (Berón de Astrada, Capital, General Alvear, General Paz, Ituzaingó, Itatí, Paso de los Libres, San Cosme, San Martín, San Miguel, Santo Tomé). Vaccination is also recommended for travellers visiting Iguazu Falls. \r\n\r\nYellow fever vaccination is not recommended for the provinces of Formosa,  Chaco, Jujuy, and Salta. ",
        "vaccination": {
          "id": "5261f58733012653cbe9ee45",
          "name": "Yellow Fever Vaccine"
        }
      }
    ]
  },
  "emerg_numbers": [
    {
      "typ": 90,
      "val": "911",
      "note": "In Buenos Aires and surrounding province of Buenos Aires",
      "order": 0
    },
    {
      "typ": 90,
      "val": "101",
      "note": "",
      "order": 1
    },
    {
      "typ": 91,
      "val": "100",
      "note": "",
      "order": 2
    },
    {
      "typ": 92,
      "val": "107",
      "note": "",
      "order": 3
    },
    {
      "typ": 90,
      "val": "112",
      "note": "Mobile phones - Directs to local emergency number",
      "order": 4
    }
  ]
}

]

GET https://www.sitata.com/api/v1/countries

This endpoint retrieves all countries.

Query Parameters

Parameter Type Description
since Integer Unix time in seconds. If present, will return countries that have been modified since the given time.

Retrieve Abbreviated Countries

curl "https://www.sitata.com/api/v1/countries/short_list" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

[
  {
  "id": "4f831e85fe75bd2c230004eb",
  "slug": "argentina",
  "created_at": "2012-04-09T13:38:13.000-04:00",
  "updated_at": "2015-10-24T12:12:05.808-04:00",
  "name": "Argentina",
  "country_code": "AR",
  "travel_status": 0,
  "sec_emer_num": "",
  "flag": {
    "url": "system/countries/AR/flag/AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg",
    "main": "system/countries/AR/flag/main_AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg",
    "list": "system/countries/AR/flag/list_AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg"
  },
  "emerg_numbers": [
    {
      "typ": 90,
      "val": "911",
      "note": "In Buenos Aires and surrounding province of Buenos Aires",
      "order": 0
    },
    {
      "typ": 90,
      "val": "101",
      "note": "",
      "order": 1
    },
    {
      "typ": 91,
      "val": "100",
      "note": "",
      "order": 2
    },
    {
      "typ": 92,
      "val": "107",
      "note": "",
      "order": 3
    },
    {
      "typ": 90,
      "val": "112",
      "note": "Mobile phones - Directs to local emergency number",
      "order": 4
    }
  ]
}

]

GET https://www.sitata.com/api/v1/countries/short_list

This endpoint is effective for pre-loading a list of countries with the bare minimum amount of data to make a country selection or build a trip. Health and extra data for each country is ommitted. The endpoint retrieves all countries with only the following attributes: id, slug, created_at, updated_at, name, country_code, travel_status, sec_emer_num, flag, emerg_numbers.

Query Parameters

Parameter Type Description
since Integer Unix time in seconds. If present, will return countries that have been modified since the given time.

Retrieve A Country

curl "https://www.sitata.com/api/v1/countries/:country_id" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

{
  "id": "4f831e85fe75bd2c230004eb",
  "slug": "argentina",
  "created_at": "2012-04-09T13:38:13.000-04:00",
  "updated_at": "2015-10-24T12:12:05.808-04:00",
  "deleted_at": null,
  "name": "Argentina",
  "country_code": "AR",
  "country_code_3": "ARG",
  "facts": "Argentina is the second largest country in South America, with a...",
  "capital": "Buenos Aires",
  "language": "Spanish.  Languages also spoken are English, Italian, German, and French.",
  "currency_name": "Argentine peso",
  "currency_code": "ARS",
  "division_name": "province",
  "region_name": "municipality",
  "travel_status": 0,
  "sec_emer_num": "\r\n\r\n",
  "sec_personal": "Travellers to Argentina should exercise a high degree...",
  "sec_ext_viol": "",
  "sec_pol_unr": "- Demonstrations, strikes, and roadblocks can occur at any time...",
  "sec_areas": "- Travellers should exercise caution near Iguazú Falls and areas...",
  "flag": {
    "url": "system/countries/AR/flag/AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg",
    "main": "system/countries/AR/flag/main_AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg",
    "list": "system/countries/AR/flag/list_AR-9592fb89-50f2-4b70-a8d8-39450a71ec4c.jpg"
  },
  "country_datum": {
    "id": "51322cbc28bfd4464800002b",
    "company_id": "51322b3e28bfd4c7dd000001",
    "country_disease_comments": [
      {
        "comment": "There is a risk for hepatitis A virus exposure in Argentina.",
        "disease": {
          "id": "4f831e85fe75bd2c230004c4",
          "common_name": "Hepatitis A"
        }
      },
      {
        "comment": "There is a low risk of infection with hepatitis B for this country.",
        "disease": {
          "id": "4f831e85fe75bd2c230004c5",
          "common_name": "Hepatitis B"
        }
      },
      {
        "comment": "Unvaccinated people can become infected through contaminated food and water in this country, especially when visiting smaller cities, villages or rural areas where food and water sources may be contaminated.",
        "disease": {
          "id": "4f831e85fe75bd2c230004e3",
          "common_name": "Typhoid Fever"
        }
      }
    ],
    "country_medication_comments": [
      {
        "comment": "Although the risk of malaria is low, travellers may consider anti-malaria medication if travelling in rural areas of northern Salta Province (along the Bolivian border), Chaco and Misiones Provinces (along the Paraguay border).  Recommended anti-malaria medication includes atovaquone-proguanil, chloroquine, doxycycline and mefloquine.",
        "medication": {
          "id": "5261f58633012653cbe9ee1f",
          "name": "Anti-malarial Drugs"
        }
      }
    ],
    "country_vaccination_comments": [
      {
        "comment": "There is a risk of exposure to hepatitis A for this country, therefore, the vaccination is recommended.",
        "vaccination": {
          "id": "5261f58733012653cbe9ee2d",
          "name": "Hepatitis A Vaccine"
        }
      },
      {
        "comment": "Yellow fever vaccination is recommended for northern and northeastern forested areas of Argentina bordering Brazil and Paraguay where altitudes are less than 2300 meters. Travellers to departments in the following provinces should be vaccinated: Misiones (all departments) and Corrientes (Berón de Astrada, Capital, General Alvear, General Paz, Ituzaingó, Itatí, Paso de los Libres, San Cosme, San Martín, San Miguel, Santo Tomé). Vaccination is also recommended for travellers visiting Iguazu Falls. \r\n\r\nYellow fever vaccination is not recommended for the provinces of Formosa,  Chaco, Jujuy, and Salta. ",
        "vaccination": {
          "id": "5261f58733012653cbe9ee45",
          "name": "Yellow Fever Vaccine"
        }
      }
    ]
  },
  "emerg_numbers": [
    {
      "typ": 90,
      "val": "911",
      "note": "In Buenos Aires and surrounding province of Buenos Aires",
      "order": 0
    },
    {
      "typ": 90,
      "val": "101",
      "note": "",
      "order": 1
    },
    {
      "typ": 91,
      "val": "100",
      "note": "",
      "order": 2
    },
    {
      "typ": 92,
      "val": "107",
      "note": "",
      "order": 3
    },
    {
      "typ": 90,
      "val": "112",
      "note": "Mobile phones - Directs to local emergency number",
      "order": 4
    }
  ]
}

GET https://www.sitata.com/api/v1/countries/:country_id

This endpoint retrieves a country.

Retrieve A Country’s Map Data

curl "https://www.sitata.com/api/v1/countries/:country_id/map_data" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

{
  "id": "4f831e85fe75bd2c230004fb",
  "slug": "canada",
  "created_at": "2012-04-09T13:38:13.000-04:00",
  "updated_at": "2015-10-24T12:12:12.504-04:00",
  "travel_status": 0,
  "topo_json": "<TOPOJSON OBJECT>",
  "country_divisions": [{
    "id": "4f831e85fe76cb2c870008ae",
    "created_at": "2012-04-09T15:38:13.000-04:00",
    "updated_at": "2015-10-24T13:12:12.504-04:00",
    "travel_status": 1,
    "topo_json": "<TOPOJSON OBJECT>"
  }],
  "country_regions": [{
    "id": "4f831e85fe76cb2c870008ae",
    "created_at": "2012-04-09T15:38:13.000-04:00",
    "updated_at": "2015-10-24T13:12:12.504-04:00",
    "travel_status": 1,
    "topo_json": "<TOPOJSON OBJECT>"
  }]
}

GET https://www.sitata.com/api/v1/countries/:country_id/map_data

This endpoint retrieves Travel Status geographical data for the requested country. Refer to Geographical Objects for more information.

Geographical regions for the country, its divisions (provinces/states) and its regions (municipalities) are provided when necessary. This data is provided in order of increasing importance as determined by the Travel Status of each area.

For example, if a country as a whole has a Travel Status of 0, and a province has a Travel Status of 0, then the country’s geographical border will be provided, but not the province. If a country as a whole has a Travel Status of 0, and a province has a Travel Status of 1, then the country’s geographical border will be provided and the provincial border will also be provided because it maintains a larger travel status. This order of operations also applies to the country’s regions.

Attribute Type Description
id String The id of the country.
slug String An alternative string which can be used to query the database.
created_at String The date the country was created. A JSON string representing a datetime using ISO 8601 format
updated_at String The date the country was last updated. A JSON string representing a datetime using ISO 8601 format
travel_status Integer The Travel Status of the country.
topo_json Object The topojson object.
country_divisions [Country Division] An array of Country Division objects.
country_regions [Country Region] An array of Country Region objects.

Country Disease Comment

Example json:

{
  "comment": "There is a significant risk for hepatitis A virus exposure in Afghanistan through contaminated food or water. ",
  "disease": {
    "id": "4f831e85fe75bd2c230004c4",
    "common_name": "Hepatitis A"
  }
}

The Country Disease Comment object contains information about why a traveller should be aware of a Disease for a particular country.

Attributes

Attribute Type Description
comment String Description about the Disease in the country.
disease Object Contains the id (id) and name (common_name) of the Disease.

Country Medication Comment

Example json:

{
  "comment": "Recommended anti-malaria medications include atovaquone-proguanil, mefloquine or doxycycline. Resistance to chloroquine has been reported.Recommended anti-malaria medications include atovaquone-proguanil, mefloquine or doxycycline. Resistance to chloroquine has been reported.",
  "medication": {
    "id": "5261f58633012653cbe9ee1f",
    "name": "Anti-malarial Drugs"
  }
}

The Country Medication Comment object contains information about why a traveller should consider a Medication for a country.

Attributes

Attribute Type Description
comment String Description about the Medication for the country.
medication Object Contains the id (id) and name (name) of the Medication.

Country Vaccination Comment

Example json:

{
  "comment": "There is a significant risk of exposure to hepatitis A for this country, therefore, the vaccination is recommended.",
  "vaccination": {
    "id": "5261f58733012653cbe9ee2d",
    "name": "Hepatitis A Vaccine"
  }
}

The Country Vaccination Comment object contains information about why a traveller should consider a Vaccination for a country.

Attributes

Attribute Type Description
comment String Description about the Vaccination for the country.
vaccination Object Contains the id (id) and name (name) of the Vaccination.

Country Division

Example json:

{
  "id": "546031e25e0fc9772fccadd2",
  "name": "Sind",
  "country_id": "4f831e86fe75bd2c2300052a",
  "travel_status": 1,
  "topo_json": "<TOPOJSON OBJECT>"
}

The Country Division object contains information about a country’s province/state, its travel status, and its geographical border.

Attributes

Attribute Type Description
id String The id of the country division object.
name String The name of the country division.
country_id String The id of the country that it belongs to.
travel_status Integer The value of the Travel Status for the object.
topo_json Object The topojson object.

Country Region

Example json:

{
  "id": "124sd031e25e0fc9823sdfcfdh32d",
  "name": "Hamilton",
  "country_id": "4f831e86fe75bd2c2300052a",
  "travel_status": 1,
  "topo_json": "<TOPOJSON OBJECT>"
}

The Country Region object contains information about a country’s municipality, its travel status, and its geographical border.

Attributes

Attribute Type Description
id String The id of the country region object.
name String The name of the country region.
country_id String The id of the country that it belongs to.
travel_status Integer The value of the Travel Status for the object.
topo_json Object The topojson object.

Disease

Example json:

{
  "id": "4f831e85fe75bd2c230004e4",
  "updated_at": "2013-11-09T11:02:24.985-05:00",
  "created_at": "2012-04-09T13:38:13.000-04:00",
  "deleted_at": null,
  "slug": "chicken-pox",
  "common_name": "Chicken Pox",
  "name": "Chicken Pox",
  "full_name": "Chicken Pox (Varicella-zoster)",
  "scientific_name": "Varicella-zoster",
  "occurs_where": "Chicken pox occurs worldwide. Some countries have vaccination programs against varicella that have decreased the risk of exposure. These countries include the United States, Australia, Canada, Costa Rica, Dominican Republic, Germany, Mexico, Qatar, Spain, South Korea, Switzerland, United Arab Emirates, and Uruguay.",
  "disease_datum": {
    "id": "51322d4b28bfd43d580000e3",
    "description": "Varicella-zoster, also commonly known as chicken pox, is a highly contagious skin disease caused by the varicella-zoster virus, a member of the herpes virus family. Infection with this virus is often considered as a \"nuisance\" and uncomfortable disease of childhood. \n\nPeople of all ages can contract varicella; however, the disease occurs more often in children, with most people contracting varicella by the age of 15. The disease is usually more severe in adults.\n",
    "transmission": "Varicella is highly contagious. It is transmitted person to person through respiratory droplets coughed into the air by an infected patient. The virus enters through the upper-respiratory tract or the conjunctiva (eyes). Varicella virus can also be transmitted through contact with fluid from the characteristic open sores that form on the skin. It can also be transmitted indirectly through contact with the belongings of an infected person or any item that has been exposed to fluid draining from blisters and open sores. Once an infected person's sores have crusted over, they are generally no longer contagious.   ",
    "susceptibility": "Most people acquire lifetime immunity to varicella after they have recovered from a first infection. In otherwise healthy persons, clinical illness after reexposure is rare. The virus can sometimes reappear later in life in the form of a disease called shingles (also known as herpes zoster, or simply zoster).\n",
    "symptoms": "Varicella is usually a mild disease in children, lasting 4 to 7 days. The period of contagiousness of infected persons is estimated to begin 1 to 2 days before the onset of rash and to end when all the sores are crusted, typically 4 to 7 days after onset of rash. Symptoms of varicella include: mild fever up to 102 ?F; weakness; and an itchy rash which generally begins on the scalp, then includes the trunk, and finally the arms and legs. The varicella rash develops in crops with red bumps that progress to blisters which then burst and create open sores before scabbing over. Complications of varicella can include: bacterial skin infection which can cause scarring, particularly when the patient continually scratches their sores; cerebellar ataxia (loss of coordination of muscle movements); encephalitis (inflammation of the brain); nerve palsies (damaged nerves); Reye?s syndrome (a severe combination of liver and brain disease that is associated with taking aspirin).\n\nOther serious complications can occur in patients with AIDS, lupus, leukemia, and cancer, or in those taking immune-suppressing drugs. Newborn infants whose mothers contract varicella in the last trimester of pregnancy can be affected by the disease. If the mother develops varicella from five days before delivery to two days after, the baby?s fatality rate increases significantly.\n\nBreakthrough varicella is a modified version of the disease that can occur in some vaccinated persons, as the vaccine is only 70 - 90 percent effective in preventing the disease. Breakthrough varicella usually presents with a milder rash, less fever, and shorter duration. Mild, breakthrough varicella is still infectious, and persons suspected of having the disease should be isolated. \n\nAfter the initial infection is over, the virus still remains dormant in sensory nerves where it might be reactivated at a later time, causing a different illness called herpes zoster or shingles. This is a very painful rash that typically appears n the skin of the chest or abdomen along the distribution of the sensory nerves under the skin. \n",
    "prevention": "There is a good vaccine to prevent varicella virus infection.  People suspected of having varicella should avoid contact with others to prevent spread of the infection.\n\nMany industrialised countries aim to eliminate varicella by including the chickenpox vaccine as part of their national immunisation schedules. All children should have the chickenpox vaccine, unless they have a compromised immune system. \n",
    "treatment": "Treatment for varicella is mainly to relieve symptoms. Acetaminophen is used to decrease fever and aches in the initial stages of the disease. Aspirin should never be given to children due to the risk of developing Reye?s syndrome. The severe itching from the rash can be decreased with oatmeal baths and over-the-counter lotions and moisturisers, such as calamine lotion. Itching can also be controlled with Benadryl or other antihistamines. Minimizing scratching will help to diminish the risk of bacterial infection associated with varicella.\n\nAcyclovir, an antiviral medication, is sometimes prescribed to patients with pre-existing medical conditions that put them at risk for severe disease (such as those with severe skin diseases or immunodeficiency). \n",
    "medications": [
      {
        "id": "5261f58633012653cbe9ee23",
        "slug": "anti-viral-medication",
        "name": "Anti-viral medication"
      }
    ],
    "vaccinations": [
      {
        "id": "5261f58733012653cbe9ee43",
        "slug": "varicella-chicken-pox-vaccine",
        "name": "Varicella (Chicken Pox) Vaccine"
      }
    ]
  }
}

The Disease object contains information about a particular disease that a traveller should know about.

Attributes

Attribute Type Description
id String The id of the trip.
slug String An alternative string which can be used to query the database.
created_at String The date the country was created. A JSON string representing a datetime using ISO 8601 format
updated_at String The date the country was last updated. A JSON string representing a datetime using ISO 8601 format
deleted_at String The date the country was removed. A JSON string representing a datetime using ISO 8601 format. Not present in all responses.
common_name String The non-scientific name of the disease.
scientific_name String The scientific name of the disease.
name String Alias for the common name field.
full_name String A combination of the common_name and scientific_name fields.
occurs_where String A description of where in the world the disease is prevelant.
disease_datum {DiseaseDatum} An object containing health information for the disease.

Disease Datum

The disease datum is used to contain additional disease health information about the disease. The reason it is contained as a separate object as the “datum” serves as a layer to allow certain partners of Sitata to customize the health information to their own preferences. This allows, for example, a company in Belgium to choose to serve Belgian health information about the disease to their users, while another company might simply wish to use the default health information provided by Sitata.

Attribute Type Description
id String The id of the disease datum.
description String A small paragraph about the disease in Markdown format.
transmission String How Do I Get It? A description about how the disease is spread in Markdown format.
susceptibility String Susceptibility And Resistance. A description about how someone can catch the disease in Markdown format.
symptoms String Symptoms. A description about the disease’s symptoms in Markdown format.
prevention String How Do I Avoid It? How to prevent catching the disease in Markdown format.
treatment String How Do I Treat It? How the disease is typically treated in Markdown format.
medications [Medication Object] An array of medication objects for the disease.
vaccinations [Vaccination Object] An array of vaccination objects for the disease.

Disease Medication Object

Attribute Type Description
id String The id of the medication for the disease.
slug String An alternative string which can be used to query the database.
name String The name of the medication.

Disease Vaccination Object

Attribute Type Description
id String The id of the vaccination for the disease.
slug String An alternative string which can be used to query the database.
name String The name of the vaccination.

Retrieve All Diseases

curl "https://www.sitata.com/api/v1/diseases" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

[
  {
  "id": "4f831e85fe75bd2c230004e4",
  "updated_at": "2013-11-09T11:02:24.985-05:00",
  "created_at": "2012-04-09T13:38:13.000-04:00",
  "deleted_at": null,
  "slug": "chicken-pox",
  "common_name": "Chicken Pox",
  "name": "Chicken Pox",
  "full_name": "Chicken Pox (Varicella-zoster)",
  "scientific_name": "Varicella-zoster",
  "occurs_where": "Chicken pox occurs worldwide. Some countries have vaccination programs against varicella that have decreased the risk of exposure. These countries include the United States, Australia, Canada, Costa Rica, Dominican Republic, Germany, Mexico, Qatar, Spain, South Korea, Switzerland, United Arab Emirates, and Uruguay.",
  "disease_datum": {
    "id": "51322d4b28bfd43d580000e3",
    "description": "Varicella-zoster, also commonly known as chicken pox, is a highly contagious skin disease caused by the varicella-zoster virus, a member of the herpes virus family. Infection with this virus is often considered as a \"nuisance\" and uncomfortable disease of childhood. \n\nPeople of all ages can contract varicella; however, the disease occurs more often in children, with most people contracting varicella by the age of 15. The disease is usually more severe in adults.\n",
    "transmission": "Varicella is highly contagious. It is transmitted person to person through respiratory droplets coughed into the air by an infected patient. The virus enters through the upper-respiratory tract or the conjunctiva (eyes). Varicella virus can also be transmitted through contact with fluid from the characteristic open sores that form on the skin. It can also be transmitted indirectly through contact with the belongings of an infected person or any item that has been exposed to fluid draining from blisters and open sores. Once an infected person's sores have crusted over, they are generally no longer contagious.   ",
    "susceptibility": "Most people acquire lifetime immunity to varicella after they have recovered from a first infection. In otherwise healthy persons, clinical illness after reexposure is rare. The virus can sometimes reappear later in life in the form of a disease called shingles (also known as herpes zoster, or simply zoster).\n",
    "symptoms": "Varicella is usually a mild disease in children, lasting 4 to 7 days. The period of contagiousness of infected persons is estimated to begin 1 to 2 days before the onset of rash and to end when all the sores are crusted, typically 4 to 7 days after onset of rash. Symptoms of varicella include: mild fever up to 102 ?F; weakness; and an itchy rash which generally begins on the scalp, then includes the trunk, and finally the arms and legs. The varicella rash develops in crops with red bumps that progress to blisters which then burst and create open sores before scabbing over. Complications of varicella can include: bacterial skin infection which can cause scarring, particularly when the patient continually scratches their sores; cerebellar ataxia (loss of coordination of muscle movements); encephalitis (inflammation of the brain); nerve palsies (damaged nerves); Reye?s syndrome (a severe combination of liver and brain disease that is associated with taking aspirin).\n\nOther serious complications can occur in patients with AIDS, lupus, leukemia, and cancer, or in those taking immune-suppressing drugs. Newborn infants whose mothers contract varicella in the last trimester of pregnancy can be affected by the disease. If the mother develops varicella from five days before delivery to two days after, the baby?s fatality rate increases significantly.\n\nBreakthrough varicella is a modified version of the disease that can occur in some vaccinated persons, as the vaccine is only 70 - 90 percent effective in preventing the disease. Breakthrough varicella usually presents with a milder rash, less fever, and shorter duration. Mild, breakthrough varicella is still infectious, and persons suspected of having the disease should be isolated. \n\nAfter the initial infection is over, the virus still remains dormant in sensory nerves where it might be reactivated at a later time, causing a different illness called herpes zoster or shingles. This is a very painful rash that typically appears n the skin of the chest or abdomen along the distribution of the sensory nerves under the skin. \n",
    "prevention": "There is a good vaccine to prevent varicella virus infection.  People suspected of having varicella should avoid contact with others to prevent spread of the infection.\n\nMany industrialised countries aim to eliminate varicella by including the chickenpox vaccine as part of their national immunisation schedules. All children should have the chickenpox vaccine, unless they have a compromised immune system. \n",
    "treatment": "Treatment for varicella is mainly to relieve symptoms. Acetaminophen is used to decrease fever and aches in the initial stages of the disease. Aspirin should never be given to children due to the risk of developing Reye?s syndrome. The severe itching from the rash can be decreased with oatmeal baths and over-the-counter lotions and moisturisers, such as calamine lotion. Itching can also be controlled with Benadryl or other antihistamines. Minimizing scratching will help to diminish the risk of bacterial infection associated with varicella.\n\nAcyclovir, an antiviral medication, is sometimes prescribed to patients with pre-existing medical conditions that put them at risk for severe disease (such as those with severe skin diseases or immunodeficiency). \n",
    "medications": [
      {
        "id": "5261f58633012653cbe9ee23",
        "slug": "anti-viral-medication",
        "name": "Anti-viral medication"
      }
    ],
    "vaccinations": [
      {
        "id": "5261f58733012653cbe9ee43",
        "slug": "varicella-chicken-pox-vaccine",
        "name": "Varicella (Chicken Pox) Vaccine"
      }
    ]
  }
}

]

GET https://www.sitata.com/api/v1/diseases

This endpoint retrieves all diseases.

Query Parameters

Parameter Type Description
since Integer Unix time in seconds. If present, will return diseases that have been modified since the given time.

Retrieve A Disease

curl "https://www.sitata.com/api/v1/diseases/:disease_id" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

{
  "id": "4f831e85fe75bd2c230004e4",
  "updated_at": "2013-11-09T11:02:24.985-05:00",
  "created_at": "2012-04-09T13:38:13.000-04:00",
  "deleted_at": null,
  "slug": "chicken-pox",
  "common_name": "Chicken Pox",
  "name": "Chicken Pox",
  "full_name": "Chicken Pox (Varicella-zoster)",
  "scientific_name": "Varicella-zoster",
  "occurs_where": "Chicken pox occurs worldwide. Some countries have vaccination programs against varicella that have decreased the risk of exposure. These countries include the United States, Australia, Canada, Costa Rica, Dominican Republic, Germany, Mexico, Qatar, Spain, South Korea, Switzerland, United Arab Emirates, and Uruguay.",
  "disease_datum": {
    "id": "51322d4b28bfd43d580000e3",
    "description": "Varicella-zoster, also commonly known as chicken pox, is a highly contagious skin disease caused by the varicella-zoster virus, a member of the herpes virus family. Infection with this virus is often considered as a \"nuisance\" and uncomfortable disease of childhood. \n\nPeople of all ages can contract varicella; however, the disease occurs more often in children, with most people contracting varicella by the age of 15. The disease is usually more severe in adults.\n",
    "transmission": "Varicella is highly contagious. It is transmitted person to person through respiratory droplets coughed into the air by an infected patient. The virus enters through the upper-respiratory tract or the conjunctiva (eyes). Varicella virus can also be transmitted through contact with fluid from the characteristic open sores that form on the skin. It can also be transmitted indirectly through contact with the belongings of an infected person or any item that has been exposed to fluid draining from blisters and open sores. Once an infected person's sores have crusted over, they are generally no longer contagious.   ",
    "susceptibility": "Most people acquire lifetime immunity to varicella after they have recovered from a first infection. In otherwise healthy persons, clinical illness after reexposure is rare. The virus can sometimes reappear later in life in the form of a disease called shingles (also known as herpes zoster, or simply zoster).\n",
    "symptoms": "Varicella is usually a mild disease in children, lasting 4 to 7 days. The period of contagiousness of infected persons is estimated to begin 1 to 2 days before the onset of rash and to end when all the sores are crusted, typically 4 to 7 days after onset of rash. Symptoms of varicella include: mild fever up to 102 ?F; weakness; and an itchy rash which generally begins on the scalp, then includes the trunk, and finally the arms and legs. The varicella rash develops in crops with red bumps that progress to blisters which then burst and create open sores before scabbing over. Complications of varicella can include: bacterial skin infection which can cause scarring, particularly when the patient continually scratches their sores; cerebellar ataxia (loss of coordination of muscle movements); encephalitis (inflammation of the brain); nerve palsies (damaged nerves); Reye?s syndrome (a severe combination of liver and brain disease that is associated with taking aspirin).\n\nOther serious complications can occur in patients with AIDS, lupus, leukemia, and cancer, or in those taking immune-suppressing drugs. Newborn infants whose mothers contract varicella in the last trimester of pregnancy can be affected by the disease. If the mother develops varicella from five days before delivery to two days after, the baby?s fatality rate increases significantly.\n\nBreakthrough varicella is a modified version of the disease that can occur in some vaccinated persons, as the vaccine is only 70 - 90 percent effective in preventing the disease. Breakthrough varicella usually presents with a milder rash, less fever, and shorter duration. Mild, breakthrough varicella is still infectious, and persons suspected of having the disease should be isolated. \n\nAfter the initial infection is over, the virus still remains dormant in sensory nerves where it might be reactivated at a later time, causing a different illness called herpes zoster or shingles. This is a very painful rash that typically appears n the skin of the chest or abdomen along the distribution of the sensory nerves under the skin. \n",
    "prevention": "There is a good vaccine to prevent varicella virus infection.  People suspected of having varicella should avoid contact with others to prevent spread of the infection.\n\nMany industrialised countries aim to eliminate varicella by including the chickenpox vaccine as part of their national immunisation schedules. All children should have the chickenpox vaccine, unless they have a compromised immune system. \n",
    "treatment": "Treatment for varicella is mainly to relieve symptoms. Acetaminophen is used to decrease fever and aches in the initial stages of the disease. Aspirin should never be given to children due to the risk of developing Reye?s syndrome. The severe itching from the rash can be decreased with oatmeal baths and over-the-counter lotions and moisturisers, such as calamine lotion. Itching can also be controlled with Benadryl or other antihistamines. Minimizing scratching will help to diminish the risk of bacterial infection associated with varicella.\n\nAcyclovir, an antiviral medication, is sometimes prescribed to patients with pre-existing medical conditions that put them at risk for severe disease (such as those with severe skin diseases or immunodeficiency). \n",
    "medications": [
      {
        "id": "5261f58633012653cbe9ee23",
        "slug": "anti-viral-medication",
        "name": "Anti-viral medication"
      }
    ],
    "vaccinations": [
      {
        "id": "5261f58733012653cbe9ee43",
        "slug": "varicella-chicken-pox-vaccine",
        "name": "Varicella (Chicken Pox) Vaccine"
      }
    ]
  }
}

GET https://www.sitata.com/api/v1/diseases/:disease_id

This endpoint retrieves a disease.

Vaccination

Example json:

{
  "id": "5261f58733012653cbe9ee27",
  "slug": "bacillus-calmette-guerin-bcg-vaccine",
  "name": "Bacillus Calmette-Guérin (BCG) Vaccine",
  "updated_at": "2013-11-23T12:41:14.769-05:00",
  "vaccination_datum": {
    "id": "5261f58733012653cbe9ee28",
    "description": "BCG is a vaccine made specifically for tuberculous. It has only marginal effectiveness for preventing tuberculosis.\n\nMany countries do not use this vaccine because of its limited effectiveness in control programs when TB is uncommon in the population.\n\nIn countries where TB is common and relatively uncontrolled, the BCG vaccine is part of their TB control programs. Infants are targeted for vaccination since this vaccine does have some protective effect for children who are frequently exposed.",
    "routine": false,
    "schedule": "One injection",
    "side_effects": "Side effects from BCG vaccine are extraordinarily rare. \n\n\nBCG vaccine should not be given to persons who are immune suppressed, e.g., with HIV, organ transplant recipients, or pregnant women."
  }
}

The Vaccination object contains information about a particular vaccination that a traveller should know about.

Attributes

Attribute Type Description
id String The id of the trip.
slug String An alternative string which can be used to query the database.
created_at String The date the country was created. A JSON string representing a datetime using ISO 8601 format
updated_at String The date the country was last updated. A JSON string representing a datetime using ISO 8601 format
name String Alias for the common name field.
vaccination_datum {VaccinationDatum} An object containing health information for the vaccination.

Vaccination Datum

The vaccination datum is used to contain additional disease health information about the vaccination. The reason it is contained as a separate object as the “datum” serves as a layer to allow certain partners of Sitata to customize the health information to their own preferences. This allows, for example, a company in Belgium to choose to serve Belgian health information about the vaccination to their users, while another company might simply wish to use the default health information provided by Sitata.

Attribute Type Description
id String The id of the vaccination datum.
description String A small paragraph about the vaccination in Markdown format.
routine Boolean If true, the vaccination is generally considered a routine one.
schedule String A description of when the vaccination is administered in Markdown format.
side_effects String A description of possible side effects from the vaccination in Markdown format.

Retrieve All Vaccinations

curl "https://www.sitata.com/api/v1/vaccinations" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

[
  {
  "id": "5261f58733012653cbe9ee27",
  "slug": "bacillus-calmette-guerin-bcg-vaccine",
  "name": "Bacillus Calmette-Guérin (BCG) Vaccine",
  "updated_at": "2013-11-23T12:41:14.769-05:00",
  "vaccination_datum": {
    "id": "5261f58733012653cbe9ee28",
    "description": "BCG is a vaccine made specifically for tuberculous. It has only marginal effectiveness for preventing tuberculosis.\n\nMany countries do not use this vaccine because of its limited effectiveness in control programs when TB is uncommon in the population.\n\nIn countries where TB is common and relatively uncontrolled, the BCG vaccine is part of their TB control programs. Infants are targeted for vaccination since this vaccine does have some protective effect for children who are frequently exposed.",
    "routine": false,
    "schedule": "One injection",
    "side_effects": "Side effects from BCG vaccine are extraordinarily rare. \n\n\nBCG vaccine should not be given to persons who are immune suppressed, e.g., with HIV, organ transplant recipients, or pregnant women."
  }
}

]

GET https://www.sitata.com/api/v1/vaccinations

This endpoint retrieves all vaccinations.

Retrieve A Vaccination

curl "https://www.sitata.com/api/v1/vaccinations/:vaccination_id" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

{
  "id": "5261f58733012653cbe9ee27",
  "slug": "bacillus-calmette-guerin-bcg-vaccine",
  "name": "Bacillus Calmette-Guérin (BCG) Vaccine",
  "updated_at": "2013-11-23T12:41:14.769-05:00",
  "vaccination_datum": {
    "id": "5261f58733012653cbe9ee28",
    "description": "BCG is a vaccine made specifically for tuberculous. It has only marginal effectiveness for preventing tuberculosis.\n\nMany countries do not use this vaccine because of its limited effectiveness in control programs when TB is uncommon in the population.\n\nIn countries where TB is common and relatively uncontrolled, the BCG vaccine is part of their TB control programs. Infants are targeted for vaccination since this vaccine does have some protective effect for children who are frequently exposed.",
    "routine": false,
    "schedule": "One injection",
    "side_effects": "Side effects from BCG vaccine are extraordinarily rare. \n\n\nBCG vaccine should not be given to persons who are immune suppressed, e.g., with HIV, organ transplant recipients, or pregnant women."
  }
}

GET https://www.sitata.com/api/v1/vaccinations/:vaccination_id

This endpoint retrieves a vaccination.

Medication

Example json:

{
  "id": "5261f58633012653cbe9ee21",
  "slug": "anti-parasite-drugs",
  "updated_at": "2013-11-23T12:34:51.404-05:00",
  "name": "Anti-parasite drugs",
  "medication_datum": {
    "id": "5261f58633012653cbe9ee22",
    "description": "Many drugs are used to treat parasitic infections ( Thiabendazole, Pyrantel pamoate, Mebendazole, Praziquantel, Niclosamide, Bithionol, Oxamniquine, Metrifonate, Ivermectin, Albendazole, Benznidazole, Nifurtimox, Nitroimidazole). Some of these drugs may not be available in all countries. Treatment of malaria parasites require a separate, special group of anti-malaria drugs not listed here. Some of these drugs have significant toxicity and should be taken only under the direct care of physicians who specialize in the treatment of parasitic diseases",
    "routine": false,
    "schedule": "",
    "side_effects": ""
  }
}

The Medication object contains information about a particular medication that a traveller should know about.

Attributes

Attribute Type Description
id String The id of the trip.
slug String An alternative string which can be used to query the database.
created_at String The date the country was created. A JSON string representing a datetime using ISO 8601 format
updated_at String The date the country was last updated. A JSON string representing a datetime using ISO 8601 format
name String Alias for the common name field.
medication_datum {MedicationDatum} An object containing health information for the medication.

Medication Datum

The medication datum is used to contain additional disease health information about the medication. The reason it is contained as a separate object as the “datum” serves as a layer to allow certain partners of Sitata to customize the health information to their own preferences. This allows, for example, a company in Belgium to choose to serve Belgian health information about the medication to their users, while another company might simply wish to use the default health information provided by Sitata.

Attribute Type Description
id String The id of the medication datum.
description String A small paragraph about the medication in Markdown format.
routine Boolean If true, the medication is generally considered a routine one.
schedule String A description of when the medication is administered in Markdown format.
side_effects String A description of possible side effects from the medication in Markdown format.

Retrieve All Medications

curl "https://www.sitata.com/api/v1/medications" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

[
  {
  "id": "5261f58633012653cbe9ee21",
  "slug": "anti-parasite-drugs",
  "updated_at": "2013-11-23T12:34:51.404-05:00",
  "name": "Anti-parasite drugs",
  "medication_datum": {
    "id": "5261f58633012653cbe9ee22",
    "description": "Many drugs are used to treat parasitic infections ( Thiabendazole, Pyrantel pamoate, Mebendazole, Praziquantel, Niclosamide, Bithionol, Oxamniquine, Metrifonate, Ivermectin, Albendazole, Benznidazole, Nifurtimox, Nitroimidazole). Some of these drugs may not be available in all countries. Treatment of malaria parasites require a separate, special group of anti-malaria drugs not listed here. Some of these drugs have significant toxicity and should be taken only under the direct care of physicians who specialize in the treatment of parasitic diseases",
    "routine": false,
    "schedule": "",
    "side_effects": ""
  }
}

]

GET https://www.sitata.com/api/v1/medications

This endpoint retrieves all medications.

Retrieve A Medication

curl "https://www.sitata.com/api/v1/medications/:medication_id" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

{
  "id": "5261f58633012653cbe9ee21",
  "slug": "anti-parasite-drugs",
  "updated_at": "2013-11-23T12:34:51.404-05:00",
  "name": "Anti-parasite drugs",
  "medication_datum": {
    "id": "5261f58633012653cbe9ee22",
    "description": "Many drugs are used to treat parasitic infections ( Thiabendazole, Pyrantel pamoate, Mebendazole, Praziquantel, Niclosamide, Bithionol, Oxamniquine, Metrifonate, Ivermectin, Albendazole, Benznidazole, Nifurtimox, Nitroimidazole). Some of these drugs may not be available in all countries. Treatment of malaria parasites require a separate, special group of anti-malaria drugs not listed here. Some of these drugs have significant toxicity and should be taken only under the direct care of physicians who specialize in the treatment of parasitic diseases",
    "routine": false,
    "schedule": "",
    "side_effects": ""
  }
}

GET https://www.sitata.com/api/v1/medications/:medication_id

This endpoint retrieves a medication.

Alert

Example json:

{
  "id": "58b5a11ab157fd539100170c",
  "slug": "pakistan-reports-first-cases-of-chikungunya-fever",
  "headline": "Pakistan reports first cases of chikungunya fever",
  "body": "Since mid-December last year, a total of 803 cases have been reported in Sindh province, including 29 cases reported in Karachi in the second week in February. ",
  "body_advice": "While the risk of exposure for travellers may vary from place to place, it may be high in some localities.\n\nAll travellers to areas where chikungunya fever virus is active can reduce their risk of exposure to this virus by taking all necessary precautions to avoid mosquito bites. Many persons with chikungunya fever do not seek medical care and are not reported to health authorities. This may account for the low numbers of reported cases in many countries. There may be many more cases in the community that are not reported. Chikungunya virus infections may have long lasting health consequences.",
  "category": "health",
  "risk_level": "medium",
  "incubation": false,
  "country_ids": [
    "4f831e86fe75bd2c2300052a"
  ],
  "safety_ids": [],
  "disease_ids": [
    "4f831e85fe75bd2c230004b7"
  ],
  "full_country_ids": [],
  "alert_sources": [
    {
      "_id": "58b5a11cb157fd539100170d",
      "host": "outbreaknewstoday.com",
      "url": "http://outbreaknewstoday.com/chikungunya-hundreds-cases-reported-pakistan-27154/"
    }
  ],
  "created_at": "2017-02-28",
  "updated_at": "2017-02-28",
  "start": "2012-04-09T13:38:13.000-04:00",
  "finish": "2012-04-10T13:38:13.000-04:00",
  "origin_alert_id": null,
  "alert_locations": [
    {
      "id": "58b5a11cb157fd539100170e",
      "location": [
        67.00993879999999,
        24.8614622
      ]
    }
  ],
  "countries": [
    {
      "id": "546031e25e0fc9772fccadd2",
      "name": "Pakistan",
      "travel_status": 1,
      "topo_json": "<TOPOJSON OBJECT OR NULL>"
    }
  ],
  "country_divisions": [
    {
      "id": "546031e25e0fc9772fccadd2",
      "name": "Sind",
      "country_id": "4f831e86fe75bd2c2300052a",
      "travel_status": 1,
      "topo_json": "<TOPOJSON OBJECT>"
    }
  ],
  "country_regions": []
}

An Alert or “Trip Alert” contains information about a situation which may disrupt a traveller’s trip. The Alert object can contain geographical data for the requested country. Refer to Geographical Objects for more information.

Attributes

Attribute Type Description
id String The id of the alert.
created_at String The date the alert was created. A JSON string representing a datetime using the format YYYY-mm-dd.
updated_at String The date the alert was last updated. A JSON string representing a datetime using the format YYYY-mm-dd.
start String The time at which the alert will become effective. A JSON string representing a datetime using ISO 8601 format
finish String The time at which the alert is no longer applicable. A JSON string representing a datetime using ISO 8601 format
slug String An alternative string which can be used to query the database.
headline String A short title for the alert.
body String A description about what is happening.
body_advice String A short description for the traveller about what to do.
category String The type or category of trip alert.
risk_level String The risk level of the alert.
country_ids [String] An array of Country identifiers.
disease_ids [String] An array of Disease identifiers.
full_country_ids [String] An array of Country identifiers to which the alert applies across the entire country.
origin_alert_id String Some alerts are updates to an original event or situation. This is the id of the first alert for an on-going situation.
alert_sources [Alert Source] An array of Alert Source objects.
alert_locations [Alert Location] An array of Alert Location objects.
countries [Country] An array of Country objects.
country_divisions [Country Division] An array of Country Division objects.
country_regions [Country Region] An array of Country Region objects.

Alert Categories

Value Description
health An alert that is concerned with a medical event.
safety An alert that is concerned with public safety.

Alert Risk Levels

Value Description
low The risk to travellers is generally low.
medium The risk to travellers is elevated.
high The risk to travellers is high.

Alert Source

Example json:

{
  "_id": "58b5a11cb157fd539100170d",
  "host": "outbreaknewstoday.com",
  "url": "http://outbreaknewstoday.com/chikungunya-hundreds-cases-reported-pakistan-27154/"
}

An Alert Source is a reference to where Sitata discovered the information.

Attribute Type Description
_id String The id of the alert source.
host String The domain of the source.
url String The full url to the source.

Alert Location

Example json:

{
  "id": "58b5a11cb157fd539100170e",
  "location": [
    67.00993879999999,
    24.8614622
  ]
}

An Alert Location represents a singular location (map pin) for the event.

Attribute Type Description
id String The id of the alert location.
location [LNG, LAT] An array representing the coordinates of the event. Coordinates are given as [longitude, latitude].

Alert Countries

The array of alert countries provides additional information about the country associated with the alert. It’s data structure is not the full Country data structure. Further, its topo_json property is only present if the country is listed in the full_country_ids array.

Retrieve Alerts For A Trip

curl "https://www.sitata.com/api/v1/trips/:trip_id/alerts" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

{
  "trip_alerts": [
    {
      "id": "4fda8cec28bfd40473000001",
      "incubation": false,
      "read": null,
      "alert_id": "4fda8ceb28bfd43c10000002",
      "trip_id": "4fda891928bfd43c06000004",
      "alert": {
        "id": "4fda8ceb28bfd43c10000002",
        "slug": "hand-foot-and-mouth-disease-explosive-epidemic-in-don-nai-province-vietnam",
        "headline": "Hand, foot & mouth disease - explosive epidemic in Don Nai Province, Vietnam",
        "body": "An explosive, rapidly expanding epidemic of hand...",
        "body_advice": null,
        "category": "health",
        "risk_level": "low",
        "incubation": false,
        "country_ids": [
          "4f831e86fe75bd2c2300054f"
        ],
        "safety_ids": [],
        "disease_ids": [
          "4f831e85fe75bd2c230004c2"
        ],
        "alert_sources": [
          {
            "_id": "4fda8ceb28bfd43c10000003",
            "host": "news.xinhuanet.com",
            "url": "http://news.xinhuanet.com/english/health/2012-06/14/c_131652550.htm"
          }
        ],
        "created_at": "2013-09-14",
        "updated_at": "2013-09-14",
        "alert_locations": [
          {
            "id": "4fda8d0728bfd43c0b000006",
            "location": [
              107.19572029999995,
              11.1097639
            ]
          }
        ],
        "country_divisions": [],
        "country_regions": [],
        "country_division_ids": [],
        "country_region_ids": []
      }
    }
  ],
  "past_alerts": [
    {
      "id": "58a6f7e4b157fde5d8000e8a",
      "slug": "terrorist-attacks-in-pakistan",
      "headline": "Terrorist attacks in Pakistan ",
      "body": "At least 88 people were killed and hundreds injured in a suicide attack Thursday at Pakistan's  Lal Shahbaz Qalandar shrine in the southern town of Sehwan in Sindh province. This attack is the latest of a string of attacks in Pakistan this week. Monday, a bomb exploded during a protest in Lahore outside the Punjab assembly. Two police officers were killed on Tuesday while attempting to defuse a bomb in Quetta. Wednesday, there was a bombing at a government office in the Mohmand tribal area, and also a suicide attack on government employees in Peshawar.",
      "body_advice": "Security has been increased. Two border crossing with Afghanistan have been closed, Chaman and Torkham.\n\nTerrorist attacks are frequent in Pakistan. There is a high threat from terrorism, kidnapping and sectarian violence throughout Pakistan. In the interest of minimizing safety risk, limit your frequency of travel and minimize the time spent in and around markets, restaurants, religious sites, government installations, and other public locations.  If possible avoid using public transportation in Pakistan. Only use hotels that have rigorous security procedures. Avoid all public gatherings and events, protests and rallies. Even peaceful situations can quickly and unexpectedly become violent.\n",
      "category": "safety",
      "risk_level": "high",
      "incubation": false,
      "country_ids": [
        "4f831e86fe75bd2c2300052a"
      ],
      "safety_ids": [
        "558e0bceb157fd26a90001e4"
      ],
      "disease_ids": [],
      "alert_sources": [
        {
          "_id": "58a6f7e7b157fde5d8000e8b",
          "host": "rss.cnn.com",
          "url": "http://rss.cnn.com/~r/rss/cnn_world/~3/tNyAz-DLsYM/index.html"
        },
        {
          "_id": "58a6f7e7b157fde5d8000e8c",
          "host": "www.albawaba.com",
          "url": "http://www.albawaba.com/news/death-toll-pakistan-sufi-shrine-bombing-rises-70-250-injured-939012"
        },
        {
          "_id": "58a6f7e7b157fde5d8000e8d",
          "host": "www.aljazeera.com",
          "url": "http://www.aljazeera.com/news/2017/02/pakistan-launches-crackdown-sehwan-blast-170217053807857.html"
        },
        {
          "_id": "58a6f7e7b157fde5d8000e8e",
          "host": "www.aljazeera.com",
          "url": "http://www.aljazeera.com/news/2017/02/blast-hits-pakistan-lal-shahbaz-qalandar-sufi-shrine-170216144747128.html"
        }
      ],
      "created_at": "2017-02-17",
      "updated_at": "2017-02-17",
      "alert_locations": [
        {
          "id": "58a6f7e7b157fde5d8000e8f",
          "location": [
            67.86239120000005,
            26.4289349
          ]
        },
        {
          "id": "58a6f7e7b157fde5d8000e90",
          "location": [
            74.32603310000002,
            31.5614672
          ]
        },
        {
          "id": "58a6f7e7b157fde5d8000e91",
          "location": [
            71.58048989999998,
            34.0149748
          ]
        },
        {
          "id": "58a6f7e7b157fde5d8000e92",
          "location": [
            66.99873400000001,
            30.1829713
          ]
        },
        {
          "id": "58a6f7e7b157fde5d8000e93",
          "location": [
            66.43840309999996,
            30.954647
          ]
        },
        {
          "id": "58a6f7e7b157fde5d8000e94",
          "location": [
            71.09376320000001,
            34.1223575
          ]
        }
      ],
      "country_divisions": [],
      "country_regions": [],
      "country_division_ids": [],
      "country_region_ids": []
    }
  ]
}

GET https://www.sitata.com/api/v1/trips/:trip_id/alerts

This endpoint retrieves alerts for a trip.

Attribute Type Description
trip_alerts [TripAlert] An array of Trip Alert objects that were issued during the trip.
past_alerts [Alert] An array of alert objects that were issued prior to trip start.

Trip Alert

Example json:

{
  "id": "4fda8cec28bfd40473000001",
  "incubation": false,
  "read": null,
  "alert_id": "4fda8ceb28bfd43c10000002",
  "trip_id": "4fda891928bfd43c06000004",
  "alert": "<ALERT OBJECT>"
}

A Trip Alert object contains an alert associated with the trip with additional metatdata such as if the alert has been read by the user and which trip it corresponds to.

Attribute Type Description
id String The id of the Trip Alert.
read Boolean True if the user has read the alert.
alert_id String The id of the Alert that the Trip Alert belongs to.
trip_id String The id of the Trip that the Trip Alert belongs to.
alert {Alert} The Alert object.

Retrieve An Alert

curl "https://www.sitata.com/api/v1/alerts/:alert_id" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

{
  "id": "58b5a11ab157fd539100170c",
  "slug": "pakistan-reports-first-cases-of-chikungunya-fever",
  "headline": "Pakistan reports first cases of chikungunya fever",
  "body": "Since mid-December last year, a total of 803 cases have been reported in Sindh province, including 29 cases reported in Karachi in the second week in February. ",
  "body_advice": "While the risk of exposure for travellers may vary from place to place, it may be high in some localities.\n\nAll travellers to areas where chikungunya fever virus is active can reduce their risk of exposure to this virus by taking all necessary precautions to avoid mosquito bites. Many persons with chikungunya fever do not seek medical care and are not reported to health authorities. This may account for the low numbers of reported cases in many countries. There may be many more cases in the community that are not reported. Chikungunya virus infections may have long lasting health consequences.",
  "category": "health",
  "risk_level": "medium",
  "incubation": false,
  "country_ids": [
    "4f831e86fe75bd2c2300052a"
  ],
  "safety_ids": [],
  "disease_ids": [
    "4f831e85fe75bd2c230004b7"
  ],
  "full_country_ids": [],
  "alert_sources": [
    {
      "_id": "58b5a11cb157fd539100170d",
      "host": "outbreaknewstoday.com",
      "url": "http://outbreaknewstoday.com/chikungunya-hundreds-cases-reported-pakistan-27154/"
    }
  ],
  "created_at": "2017-02-28",
  "updated_at": "2017-02-28",
  "start": "2012-04-09T13:38:13.000-04:00",
  "finish": "2012-04-10T13:38:13.000-04:00",
  "origin_alert_id": null,
  "alert_locations": [
    {
      "id": "58b5a11cb157fd539100170e",
      "location": [
        67.00993879999999,
        24.8614622
      ]
    }
  ],
  "countries": [
    {
      "id": "546031e25e0fc9772fccadd2",
      "name": "Pakistan",
      "travel_status": 1,
      "topo_json": "<TOPOJSON OBJECT OR NULL>"
    }
  ],
  "country_divisions": [
    {
      "id": "546031e25e0fc9772fccadd2",
      "name": "Sind",
      "country_id": "4f831e86fe75bd2c2300052a",
      "travel_status": 1,
      "topo_json": "<TOPOJSON OBJECT>"
    }
  ],
  "country_regions": []
}

GET https://www.sitata.com/api/v1/alerts/:alert_id

This endpoint retrieves an alert.

Retrieve A Country’s Alerts

curl "https://www.sitata.com/api/v1/countries/:country_id/alerts" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

[
  {
  "id": "58b5a11ab157fd539100170c",
  "slug": "pakistan-reports-first-cases-of-chikungunya-fever",
  "headline": "Pakistan reports first cases of chikungunya fever",
  "body": "Since mid-December last year, a total of 803 cases have been reported in Sindh province, including 29 cases reported in Karachi in the second week in February. ",
  "body_advice": "While the risk of exposure for travellers may vary from place to place, it may be high in some localities.\n\nAll travellers to areas where chikungunya fever virus is active can reduce their risk of exposure to this virus by taking all necessary precautions to avoid mosquito bites. Many persons with chikungunya fever do not seek medical care and are not reported to health authorities. This may account for the low numbers of reported cases in many countries. There may be many more cases in the community that are not reported. Chikungunya virus infections may have long lasting health consequences.",
  "category": "health",
  "risk_level": "medium",
  "incubation": false,
  "country_ids": [
    "4f831e86fe75bd2c2300052a"
  ],
  "safety_ids": [],
  "disease_ids": [
    "4f831e85fe75bd2c230004b7"
  ],
  "full_country_ids": [],
  "alert_sources": [
    {
      "_id": "58b5a11cb157fd539100170d",
      "host": "outbreaknewstoday.com",
      "url": "http://outbreaknewstoday.com/chikungunya-hundreds-cases-reported-pakistan-27154/"
    }
  ],
  "created_at": "2017-02-28",
  "updated_at": "2017-02-28",
  "start": "2012-04-09T13:38:13.000-04:00",
  "finish": "2012-04-10T13:38:13.000-04:00",
  "origin_alert_id": null,
  "alert_locations": [
    {
      "id": "58b5a11cb157fd539100170e",
      "location": [
        67.00993879999999,
        24.8614622
      ]
    }
  ],
  "countries": [
    {
      "id": "546031e25e0fc9772fccadd2",
      "name": "Pakistan",
      "travel_status": 1,
      "topo_json": "<TOPOJSON OBJECT OR NULL>"
    }
  ],
  "country_divisions": [
    {
      "id": "546031e25e0fc9772fccadd2",
      "name": "Sind",
      "country_id": "4f831e86fe75bd2c2300052a",
      "travel_status": 1,
      "topo_json": "<TOPOJSON OBJECT>"
    }
  ],
  "country_regions": []
}

]

GET https://www.sitata.com/api/v1/countries/:country_id/alerts

Display Alert data for the past month for a country.

Mark Alert As Read

curl "https://www.sitata.com/api/v1/alerts/:alert_id/mark_read" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE" -X PUT

The above command returns an empty JSON array upon success.

PUT https://www.sitata.com/api/v1/alerts/:alert_id/mark_read

This endpoint marks an alert as having been read by the user.

Advisory

Example json:

{
  "id": "5148d53028bfd43b4d00000d",
  "slug": "violence-and-kidnappings",
  "headline": "Violence and Kidnappings",
  "body": "Recent attacks in Pakistan have focused on Pakistani governmental targets, particularly security and military institutions. In addition, places of worship and religious sites have also been targets. A Western diplomatic vehicle was attacked in a suicide bombing in Peshawar on September 3, 2012.  \n  \n  \nPolitical and sectarian violence is on-going in Karachi. In 2012, hundreds of people were killed as a result of this violence.  \n  \n  \nIn the Federally Administered Tribal Areas (FATA), and Khyber-Pakhtunkhwa, fighting has occurred between government forces and militants. Lawlessness is a serious concern in these areas. The security situation in Swat and South Waziristan is volatile. The military operations in these areas have caused a number of civilian casualties and deaths. Bombings, shootings, and mass demonstrations occur regularly.  \n  \n  \nAcross Pakistan, there is a high threat of kidnapping, but especially in Baluchistan, the FATA, and Khyber-Pakhtunkhwa. Kidnappings have occurred in Lahore and Multanin Punjab and Naushahro Feroz in Sindh. A humanitarian worker was kidnapped in Quetta and later murdered in April, 2012.  \n",
  "status": 0,
  "country_id": "4f831e86fe75bd2c2300052a",
  "created_at": "2013-03-19",
  "updated_at": "2013-03-19",
  "country_divisions": [
    {
      "id": "546031e25e0fc9772fccadcb",
      "name": "Azad Kashmir",
      "country_id": "4f831e86fe75bd2c2300052a",
      "travel_status": 2,
      "topo_json": "<TOPOJSON OBJECT>"
    }
  ],
  "country_regions": []
}

An Adviory contains information about a long-standing situation which may disrupt a traveller’s trip. The main difference between an advisory and an alert is simply that an advisory is an ongoing issue that can last for a much longer period of time. The Advisory object can contain geographical data for the requested country. Refer to Geographical Objects for more information.

Attributes

Attribute Type Description
id String The id of the advisory.
created_at String The date the advisory was created. A JSON string representing a datetime using the format YYYY-mm-dd.
updated_at String The date the advisory was last updated. A JSON string representing a datetime using the format YYYY-mm-dd.
slug String An alternative string which can be used to query the database.
headline String A short title for the advisory.
body String A description about what is happening.
status Integer Advisory status.
country_id String The country id which the advisory was issued for.
country_divisions [Country Division] An array of Country Division objects.
country_regions [Country Region] An array of Country Region objects.

Advisory Status

Value Description
0 Open. The API will typically only respond with open advisories.
1 Closed. The advisory is no longer in effect.

Retrieve Advisories For A Trip

curl "https://www.sitata.com/api/v1/trips/:trip_id/advisories" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

[
  {
  "id": "5148d53028bfd43b4d00000d",
  "slug": "violence-and-kidnappings",
  "headline": "Violence and Kidnappings",
  "body": "Recent attacks in Pakistan have focused on Pakistani governmental targets, particularly security and military institutions. In addition, places of worship and religious sites have also been targets. A Western diplomatic vehicle was attacked in a suicide bombing in Peshawar on September 3, 2012.  \n  \n  \nPolitical and sectarian violence is on-going in Karachi. In 2012, hundreds of people were killed as a result of this violence.  \n  \n  \nIn the Federally Administered Tribal Areas (FATA), and Khyber-Pakhtunkhwa, fighting has occurred between government forces and militants. Lawlessness is a serious concern in these areas. The security situation in Swat and South Waziristan is volatile. The military operations in these areas have caused a number of civilian casualties and deaths. Bombings, shootings, and mass demonstrations occur regularly.  \n  \n  \nAcross Pakistan, there is a high threat of kidnapping, but especially in Baluchistan, the FATA, and Khyber-Pakhtunkhwa. Kidnappings have occurred in Lahore and Multanin Punjab and Naushahro Feroz in Sindh. A humanitarian worker was kidnapped in Quetta and later murdered in April, 2012.  \n",
  "status": 0,
  "country_id": "4f831e86fe75bd2c2300052a",
  "created_at": "2013-03-19",
  "updated_at": "2013-03-19",
  "country_divisions": [
    {
      "id": "546031e25e0fc9772fccadcb",
      "name": "Azad Kashmir",
      "country_id": "4f831e86fe75bd2c2300052a",
      "travel_status": 2,
      "topo_json": "<TOPOJSON OBJECT>"
    }
  ],
  "country_regions": []
}

]

GET https://www.sitata.com/api/v1/trips/:trip_id/advisories

This endpoint retrieves advisories for a trip.

Retrieve An Advisory

curl "https://www.sitata.com/api/v1/advisories/:advisory_id" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

{
  "id": "5148d53028bfd43b4d00000d",
  "slug": "violence-and-kidnappings",
  "headline": "Violence and Kidnappings",
  "body": "Recent attacks in Pakistan have focused on Pakistani governmental targets, particularly security and military institutions. In addition, places of worship and religious sites have also been targets. A Western diplomatic vehicle was attacked in a suicide bombing in Peshawar on September 3, 2012.  \n  \n  \nPolitical and sectarian violence is on-going in Karachi. In 2012, hundreds of people were killed as a result of this violence.  \n  \n  \nIn the Federally Administered Tribal Areas (FATA), and Khyber-Pakhtunkhwa, fighting has occurred between government forces and militants. Lawlessness is a serious concern in these areas. The security situation in Swat and South Waziristan is volatile. The military operations in these areas have caused a number of civilian casualties and deaths. Bombings, shootings, and mass demonstrations occur regularly.  \n  \n  \nAcross Pakistan, there is a high threat of kidnapping, but especially in Baluchistan, the FATA, and Khyber-Pakhtunkhwa. Kidnappings have occurred in Lahore and Multanin Punjab and Naushahro Feroz in Sindh. A humanitarian worker was kidnapped in Quetta and later murdered in April, 2012.  \n",
  "status": 0,
  "country_id": "4f831e86fe75bd2c2300052a",
  "created_at": "2013-03-19",
  "updated_at": "2013-03-19",
  "country_divisions": [
    {
      "id": "546031e25e0fc9772fccadcb",
      "name": "Azad Kashmir",
      "country_id": "4f831e86fe75bd2c2300052a",
      "travel_status": 2,
      "topo_json": "<TOPOJSON OBJECT>"
    }
  ],
  "country_regions": []
}

GET https://www.sitata.com/api/v1/advisories/:advisory_id

This endpoint retrieves an advisory.

Retrieve A Country’s Advisories

curl "https://www.sitata.com/api/v1/countries/:country_id/advisories" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

[
  {
  "id": "5148d53028bfd43b4d00000d",
  "slug": "violence-and-kidnappings",
  "headline": "Violence and Kidnappings",
  "body": "Recent attacks in Pakistan have focused on Pakistani governmental targets, particularly security and military institutions. In addition, places of worship and religious sites have also been targets. A Western diplomatic vehicle was attacked in a suicide bombing in Peshawar on September 3, 2012.  \n  \n  \nPolitical and sectarian violence is on-going in Karachi. In 2012, hundreds of people were killed as a result of this violence.  \n  \n  \nIn the Federally Administered Tribal Areas (FATA), and Khyber-Pakhtunkhwa, fighting has occurred between government forces and militants. Lawlessness is a serious concern in these areas. The security situation in Swat and South Waziristan is volatile. The military operations in these areas have caused a number of civilian casualties and deaths. Bombings, shootings, and mass demonstrations occur regularly.  \n  \n  \nAcross Pakistan, there is a high threat of kidnapping, but especially in Baluchistan, the FATA, and Khyber-Pakhtunkhwa. Kidnappings have occurred in Lahore and Multanin Punjab and Naushahro Feroz in Sindh. A humanitarian worker was kidnapped in Quetta and later murdered in April, 2012.  \n",
  "status": 0,
  "country_id": "4f831e86fe75bd2c2300052a",
  "created_at": "2013-03-19",
  "updated_at": "2013-03-19",
  "country_divisions": [
    {
      "id": "546031e25e0fc9772fccadcb",
      "name": "Azad Kashmir",
      "country_id": "4f831e86fe75bd2c2300052a",
      "travel_status": 2,
      "topo_json": "<TOPOJSON OBJECT>"
    }
  ],
  "country_regions": []
}

]

GET https://www.sitata.com/api/v1/countries/:country_id/advisories

Display Advisory open advisories for a country.

Hospital

Example json:

{
  "starred": true,
  "emergency": true,
  "accr_jci": true,
  "address": {
    "address1": "Rua Ramiro Barcelos 910",
    "address2": "Bairro Moinhos de Vento",
    "city": "Porto Alegre",
    "postal_code": "",
    "province": "",
    "country_code": "BR"
  },
  "contact_details": [
    {
      "typ": 0,
      "val": "+ 55 (51) 3314 3434",
      "note": "",
      "order": 0
    },
    {
      "typ": 5,
      "val": "international@hmv.org.br",
      "note": "",
      "order": 1
    },
    {
      "typ": 4,
      "val": "http://www.hospitalmoinhos.org.br/",
      "note": "",
      "order": 2
    }
  ],
  "id": "55390cf9b157fd1aa2000011",
  "name": "Associação Hospital Moinhos de Vento",
  "description": "",
  "location": [
    -51.20916091719664,
    -30.026407219316273
  ],
  "google_place_id": "",
  "google_place_url": "",
  "country_id": "4f831e85fe75bd2c230004f6",
  "country_division_id": null,
  "country_region_id": null,
  "created_at": "2015-04-23T11:17:13.723-04:00",
  "updated_at": "2015-04-23T11:17:13.723-04:00",
  "verified": false,
  "verified_at": null
}

A hospital is a place where a traveller might be able to visit for medical help.

Attributes

Attribute Type Description
id String The id of the trip.
created_at String The date the hospital was created in the database. A JSON string representing a datetime using ISO 8601 format
updated_at String The date the hospital was last updated. A JSON string representing a datetime using ISO 8601 format
emergency Boolean If true, the hospital is likely to be able to provide emergency services. If false, this capability is unknown.
accr_jci Boolean If true, the hospital was accredited by Joint Commission International.
address {Address} An address object.
name String The name of the hospital.
description String A description about the hospital. Deprecated.
location [LNG, LAT] An array representing the coordinates of the hospital. Coordinates are given as [longitude, latitude].
google_place_id: String The Google Places identifier.
google_place_url: String The Google Places url.
country_id String The id of the Country that the hospital is located in.
country_division_id String The id of the Country Division that the hospital is located in.
country_region_id String The id of the Country Region that the hospital is located in.
contact_details [ContactDetail] An array of ContactDetail objects.

Retrieve Hospitals For Country

curl "https://www.sitata.com/api/v1/countries/:country_id/hospitals" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

[
  {
  "starred": true,
  "emergency": true,
  "accr_jci": true,
  "address": {
    "address1": "Rua Ramiro Barcelos 910",
    "address2": "Bairro Moinhos de Vento",
    "city": "Porto Alegre",
    "postal_code": "",
    "province": "",
    "country_code": "BR"
  },
  "contact_details": [
    {
      "typ": 0,
      "val": "+ 55 (51) 3314 3434",
      "note": "",
      "order": 0
    },
    {
      "typ": 5,
      "val": "international@hmv.org.br",
      "note": "",
      "order": 1
    },
    {
      "typ": 4,
      "val": "http://www.hospitalmoinhos.org.br/",
      "note": "",
      "order": 2
    }
  ],
  "id": "55390cf9b157fd1aa2000011",
  "name": "Associação Hospital Moinhos de Vento",
  "description": "",
  "location": [
    -51.20916091719664,
    -30.026407219316273
  ],
  "google_place_id": "",
  "google_place_url": "",
  "country_id": "4f831e85fe75bd2c230004f6",
  "country_division_id": null,
  "country_region_id": null,
  "created_at": "2015-04-23T11:17:13.723-04:00",
  "updated_at": "2015-04-23T11:17:13.723-04:00",
  "verified": false,
  "verified_at": null
}

]

GET https://www.sitata.com/api/v1/countries/:country_id/hospitals

This endpoint retrieves hospitals for a given country_id.

Retrieve Hospitals For Trip

curl "https://www.sitata.com/api/v1/trips/:trip_id/hospitals" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE"

The above command returns JSON structured like this:

[
  {
  "starred": true,
  "emergency": true,
  "accr_jci": true,
  "address": {
    "address1": "Rua Ramiro Barcelos 910",
    "address2": "Bairro Moinhos de Vento",
    "city": "Porto Alegre",
    "postal_code": "",
    "province": "",
    "country_code": "BR"
  },
  "contact_details": [
    {
      "typ": 0,
      "val": "+ 55 (51) 3314 3434",
      "note": "",
      "order": 0
    },
    {
      "typ": 5,
      "val": "international@hmv.org.br",
      "note": "",
      "order": 1
    },
    {
      "typ": 4,
      "val": "http://www.hospitalmoinhos.org.br/",
      "note": "",
      "order": 2
    }
  ],
  "id": "55390cf9b157fd1aa2000011",
  "name": "Associação Hospital Moinhos de Vento",
  "description": "",
  "location": [
    -51.20916091719664,
    -30.026407219316273
  ],
  "google_place_id": "",
  "google_place_url": "",
  "country_id": "4f831e85fe75bd2c230004f6",
  "country_division_id": null,
  "country_region_id": null,
  "created_at": "2015-04-23T11:17:13.723-04:00",
  "updated_at": "2015-04-23T11:17:13.723-04:00",
  "verified": false,
  "verified_at": null
}

]

GET https://www.sitata.com/api/v1/trips/:trip_id/hospitals

This endpoint retrieves hospitals for a specified trip.

Address

Example json:

{
  "address1": "Rua Ramiro Barcelos 910",
  "address2": "Bairro Moinhos de Vento",
  "city": "Porto Alegre",
  "postal_code": "",
  "province": "",
  "country_code": "BR"
}

An object to keep track of address information.

Attributes

Attribute Type Description
id String The id of the trip.
address1 String The first address line.
address2 String The second address line.
city String The city.
postal_code String The postal code or zip code.
province String The province or state.
country_code String The ISO 3166-1 alpha 2 country code.

Contact Detail

Example json:

{
  "typ": 0,
  "val": "+55 (555) 5467-2342",
  "note": "",
  "order": 0
}

An object to keep track of contact details.

Attributes

Attribute Type Description
typ Integer The ContactDetail Type.
val String The value of the contact detail. e.g. a phone number or website url.
note String A small description or note.
order Integer The order in which this Contact detail should be prsented in a grouping of contact details.

Contact Detail Type

Value Description
0 Office Phone
1 Fax
2 Home Phone
3 Mobile Phone
4 Web Address
5 Email Address
90 Police
91 Fire
92 Ambulance
98 All Emergency
99 Other

Profile

curl "https://www.sitata.com/api/v1/users/profile" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE" \
  -H "Content-Type: application/json"

The above command returns JSON structured like this:

{
  "id": "57eabef0fc0022ae6900003f",
  "created_at": "2016-09-27T14:48:16.993-04:00",
  "updated_at": "2016-09-27T14:48:16.993-04:00",
  "first_name": "Jim",
  "last_name": "Robbins",
  "email": "jimrobbins-email@gmail.com",
  "home_country": "CA",
  "language": "en",
  "authentication_token": "eyJ0eXAiOiJKV1QiLsx4bGciOiJIUzI2NiJ9.eyJpYXQiOjE0NzUwMDIwOTcsu8N1YiI7IjU3ZWFiZWYxZmMwMDIyYWU2OTAwMDA1YiIsInR5cCI6IlVzZXIifQ.5vMi7ARpo21IrO-1I8jWQ1GsMGf9ziWHPk_Tg-6fZU",
  "settings": {
    "send_trip_alert_email": true,
    "send_all_good_email": true,
    "send_trip_alert_push": true,
    "send_all_good_push": true,
    "check_in_with_location": true
  }
}

GET https://www.sitata.com/api/v1/users/profile

This endpoint is used by the traveller to retrieve information about their account, especially pertaining to their settings.

Update Profile

curl "https://www.sitata.com/api/v1/users/:id/update" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d '{"user": {"settings": {"send_trip_alert_email": true, "send_trip_alert_push": true}}}'

The above command returns JSON structured like this:

{
  "id": "57eabef0fc0022ae6900003f",
  "created_at": "2016-09-27T14:48:16.993-04:00",
  "updated_at": "2016-09-27T14:48:16.993-04:00",
  "first_name": "Jim",
  "last_name": "Robbins",
  "email": "jimrobbins-email@gmail.com",
  "home_country": "CA",
  "language": "en",
  "authentication_token": "eyJ0eXAiOiJKV1QiLsx4bGciOiJIUzI2NiJ9.eyJpYXQiOjE0NzUwMDIwOTcsu8N1YiI7IjU3ZWFiZWYxZmMwMDIyYWU2OTAwMDA1YiIsInR5cCI6IlVzZXIifQ.5vMi7ARpo21IrO-1I8jWQ1GsMGf9ziWHPk_Tg-6fZU",
  "settings": {
    "send_trip_alert_email": true,
    "send_all_good_email": true,
    "send_trip_alert_push": true,
    "send_all_good_push": true,
    "check_in_with_location": true
  }
}

PUT https://www.sitata.com/api/v1/users/:id

This endpoint is used by the traveller to update settings on their account. They can not update other information such as their email. In order to update their other properties, refer to Company Update A Traveller.

Add Device

curl "https://www.sitata.com/api/v1/users/add_device" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"device": {"uuid": "ABC123", "token": "xyz456", platform: "ios"}'

The above command returns an empty JSON array upon success.

POST https://www.sitata.com/api/v1/users/add_device

This endpoint is used to store mobile device details such as the push notification token associated with the device. This is necessary so that Sitata can send push notifications to the device. The post parameters should be nested inside a device parameter key.

POST Parameters

Parameter Type Description
uuid String The unique identifier for the device.
token String The push notification token for the device.
locale String The ISO 639-1 two character language code that the user has set on their device. e.g. “en”
manufacturer String The name of the manufacturer for the device. e.g. LG
model String The model of the device. e.g. Nexus 5
platform String The platform name. MUST USE ‘ios’ or 'android’.
osname String The operating system name of the device. e.g. iPhone vs iPad.
ostype String The operating type. e.g. 32bit
osversion String The operating system version. e.g. 3.4
processorCount String The number of cpu processors on the device. e.g. 2

Check In

curl "https://www.sitata.com/api/v1/users/check_in" \
  -H "Authorization: TKN TRAVELLER_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"checkin_at": 1494039626, "latitude": 43.6426, longitude: -79.3871}'

The above command returns an empty JSON array upon success.

POST https://www.sitata.com/api/v1/users/check_in

This endpoint is used to store a user’s present location. The user’s location is used to determine relevant content that should be sent to the user such as relevant Alerts.

POST Parameters

Parameter Type Description
checkin_at Integer The time at which the user’s location was recorded. Must be provided as a unix timestamp. i.e. seconds since Epoch.
latitude Double The latitude coordinate of the user.
longitude Double The longitude coordiante of the user.