Getting Started with Setster API - Developer's Guide (2.0)
Begin your journey with Setster's API. This guide provides step-by-step instructions for initial setup, authentication, and basic requests to kickstart your application's integration.
The Setster API is used to control your account's data programmatically. The API is organized around REST and standard HTTP verbs. A consistent envelope is used for all responses alongside response codes to indicate the status of the message and any error codes. JSON is returned on all our API responses with a consistent structure for all messages.
- All requests to the API must be made using HTTPS.
- Majority of API endpoints authenticated
- All requests require your account's
company_idto be included - All POST and PUT should be made via
application/json
All responses include a statusCode, description, and some data.
- The statusCode may be
nullor0for a successful operation - Date formats may be returned with slight variations depending on the endpoint
- Resource IDs are returned as strings.
| StatusCode | Description |
|---|---|
| 0 | OK |
| 1 | INVALID_PARAMETERS |
| 2 | INVALID_CREDENTIALS |
| 3 | ACCOUNT_NOT_ACTIVE |
| 4 | INTERNAL_ERROR |
| 5 | ERROR_SAVING_ENTITY |
| 6 | ERROR_DELETING |
| 7 | NOT_FOUND |
| 8 | NOT_ALLOWED |
| 9 | SLOT_NOT_AVAILABLE |
| 10 | SLOT_OCCUPIED |
| 11 | ACCOUNTS_LIMIT_REACHED |
To use the Setster API, you will need the API key that you can find within your Setster account. Treat your Setster API key as you would any other password taking care to never expose it in any public website's client-side code.
The first step to using the Setster API is to use your key to obtain a session token. To authenticate, you'll need to make a request to the /account/authenticate endpoint with your API key and the email tied to your Setster account. The returned session_token and company_id are used for all API calls.
curl --location --request POST 'https://www.setster.com/api/v2/account/authenticate?email=EMAIL&token=TOKEN'
When the session token expires, a 403 Forbidden response will be received, indicating the need for re-authentication and retrieval of a new token to maintain the connection. Instead of reauthenticating at regular intervals, it is advisable to perform this action as needed.
Occasionally you might encounter errors, but if something seems to be working incorrectly, please reach out to Setster support at support@setster.com.
| Error Code | Error Type |
|---|---|
| 400 | Bad or invalid request |
| 401 | Unauthorized |
| 404 | Not Found |
| 500 | Internal Server Error Server error |
We recommend using the Setster Postman collection for debugging requests.