Create an Analysis
Creating an Analysis is the first step in understand which types of events impact your demand.
Creating an Analysis is the first step in understanding which types of events impact your demand.
Enter your PredictHQ API key. The Bearer prefix is added automatically.
When calling the API directly, send: Authorization: Bearer <YOUR_API_KEY> as documented at https://docs.predicthq.com/api/overview/authenticating
Name of an analysis.
My Location Analysis 1External identifier associated with the Analysis (optional, user-defined).
abc123Comma-separated list of labels that can be used to search and filter analyses.
["label1","label2","label3"]Successful Response
The autogenerated identifier for the analysis.
Bad Request
Unauthorized
Bearer token scope insufficient
POST /v1/beam/analyses HTTP/1.1
Host: api.predicthq.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 317
{
"name": "My Location Analysis 1",
"location": {
"saved_location_id": "8gZ2rn8BRcTjM_3SWdjP"
},
"demand_type": {
"industry": "restaurants",
"currency_code": "USD",
"unit_currency_multiplier": 1,
"unit_descriptor": "Sales"
},
"external_id": "abc123",
"label": [
"label1",
"label2",
"label3"
],
"rank": {
"type": "phq",
"levels": {
"phq": {
"min": 51
}
}
}
}{
"analysis_id": "2iJcUzm3-ZE"
}Examples
The following examples create an Analysis:
OpenAPI spec
See the OpenAPI spec for the Beam API.
Guides
These guides are relevant to this API:
Last updated
Was this helpful?