The PureSpectrum API is a REST based API. The URL structure is as follows:
URL Structure
{Base URI}/{Module}/{API Version}/{Resource}
eg:
http://staging.spectrumsurveys.com/suppliers/v2/surveys
Base URLs
https://api.spectrumsurveys.com (Production)
Modules
Supplier
Resources
surveys {get} surveys/:survey_id {get} surveys/register {post} surveys/qualifications-quotas {get} surveys/:survey_id/PSIDRef {get} surveys/:survey_id/PSIDEligible {get}
Response Content Type
application/JSON
To access the API, you will need to include an authorization parameter in the request header.
Each request needs to include your API access token.
Parameter | Type | Required | Description |
---|---|---|---|
access-token | String | Yes | Token used to identify the authenticity of the user. |
Example:
headers: { 'access-token': '$accessToken' }
Please do not expose your access-token to anyone or in public as this could compromise the Integrity of your integration.
Access tokens are issued by your PureSpectrum representative.
Postman example:
The Supplier API uses standard HTTP status codes to indicate success or failure of an API Request. In general, API status would indicate success or failure status.
Parameter | Value |
---|---|
status | "Success" or "Failure" |
msg | A detailed error message describing what went wrong |
Status Code Summary
200 | Everything Worked As Expected |
400 | Bad Request |
403 | Invalid Access Token |
404 | Resources Not Found |
5xx | Something Went Wrong On PureSpectrum |