NAV
shell

Introduction

Welcome to the Solsten API!

The Solsten API is a REST API, which accepts and returns JSON-encoded data, and uses standard HTTP response codes, authentication, and verbs.

Authentication

The Solsten API uses API Keys to authenticate requests. You can view and manage your API Keys in the Solsten Dashboard. Each dashboard has its own API Key.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Send your API Key with the request.

curl -XPOST -H "Authorization: Bearer {API_KEY}" https://api.solsten.io/v1/...

Assessment: Users

Request

curl -XGET \
-H "Authorization: Bearer <API_KEY>" \
https://api.solsten.io/v1/assessment/users?page={PAGE_NUMBER}

Response

{
    "current_page": 1,
    "total_pages": 8,
    "users": [
        {
            "id": "1001",
            "completed_at": "2021-02-25 03:51:11 EST"
        },
        {
            "id": "1002",
            "completed_at": "2021-03-02 14:05:22 EST"
        }
    ]
}

This endpoint allows you to get the list of users that completed the assessment.

Assessment: User Status

Request

curl -XGET \
-H "Authorization: Bearer <API_KEY>" \
https://api.solsten.io/v1/assessment/user/status?id=:userid

Response

{
    "completed": true,
    "completed_at": 1585806949
}

This endpoint allows you to check if user has completed the assessment or not.

Assessment: Info

Request

curl -XGET \
-H "Authorization: Bearer <API_KEY>" \
https://api.solsten.io/v1/assessment

Response

{
    "result_ok": true,
    "data": {
        "status": "Launched",
        "created_on": "2021-03-05 04:43:56",
        "modified_on": "2021-03-08 15:44:54",
        "completed_at": 0,
        "type": "Solsten 360",
        "title": "Solsten 360 Assessment",
        "internal_title": "Solsten 360 Assessment",
        "statistics": {
            "Partial": 2,
            "Disqualified": 1,
            "Complete": 7
        }
    }
}

This endpoint allows you to check the assessment details. Possible assessment statuses are: Launched, Closed, Deleted.

Delete User

Request

curl -XDELETE \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{ "id": "{USER_ID}" }' \
https://api.solsten.io/v1/userData

Deletes user data permanently. This endpoint can be used if a given user requested data deletion.

Persona: User IDs

Request

curl -XGET \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
https://api.solsten.io/v1/segments/{SEGMENT_ID}/personas/{PERSONA}/user-ids

Response

{
    "ids": ["1001", "1002"]
}

Get the list of Segment / Persona user IDs.

Microsoft Azure PlayFab

If you are using Microsoft Azure PlayFab you are able to integrate it with Solsten by using PlayFab Webhooks. You can simply configure PlayFab to send all events to Solsten by using this endpoint.

Webhook URL

https://api.solsten.io/v1/playfab?api_key={SOLSTEN_API_KEY}

How to configure a PlayFab webhook

  1. Go to PlayFab Analytics
  2. Open "Webhooks" tab
  3. Click "New Webhook"
  4. Give it a name
  5. Set Endpoint URL

Errors

Error Response Format

{
    "code": 400,
    "message": "bad request",
    "errors": {
        "price": "price must have a positive float value"
    }
}

Solsten API uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided. Codes in the 5xx range indicate an error with Solsten servers (these are rare).

The Solsten Ingestion API uses the following error codes:

Error Code Meaning
400 Bad Request - Please check the Reference
401 Unauthorized - API Key is not valid
404 Not Found - The specified resource not found
500 Internal Server Error - We had a problem with our server. Try again later.