Sending API calls
Base URL
The API base URL is https://app.hockeystack.com/integration/sales/
.
Authentication
Authentication with the API is done via a bearer token created on the previous step.
Simply include an Authorization: Bearer YOUR_API_TOKEN
header in your request.
Request Body
POST requests require a Content-Type: application/json
header and JSON body.
Rate Limits
10 requests per 30 seconds per IP address.
When rate limit is reached, the API will return a 429 error code. In this case, we recommend an exponential backoff retry strategy.
Long-Running Tasks
Some requests may take longer to process and so will return a 202 status code, indicating you should retry. In this case set up a retry with an identical request for every 30 seconds, up to 40 times.
If no response is received within 40 retries, treat it as an error and contact our support team.
Errors
Authentication Errors
No Authorization Header (403)
{
"message": "No token provided"
}
Invalid Token Format (403)
{
"message": "Invalid token format"
}
Invalid or Inactive Token (403)
{
"message": "Invalid or inactive token"
}
Validation Errors
Missing Company Domain (400)
{
"message": "companyDomain is required"
}
Invalid Domain Format (400)
{
"message": "Invalid company domain format. Must be a properly formatted domain name."
}
Invalid Fields Parameter (400)
{
"message": "fields_to_get must be a string like: field_1,field_2"
}
Company Not Found (404)
{
"result": {
"status": "error",
"code": 404,
"error": "Requested company not found in hockeystack",
"companyDomain": "nonexistent.com",
"research": {}
}
}
Server Errors
In the below cases, please contact our support team.
Internal Server Error (500)
{
"message": "Internal error"
}
{
"message": "An error occurred while processing your request."
}
API Support
For API support, contact [email protected]
Last updated