{"info":{"_postman_id":"5cf29647-a41e-3244-5585-d1280233c1dc","name":"PredictHQ API","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"3967924","collectionId":"5cf29647-a41e-3244-5585-d1280233c1dc","publishedId":"RW1Ypg6H","public":true,"customColor":null,"publishDate":"2018-04-25T12:09:46.000Z"},"item":[{"name":"accounts","item":[{"name":"Retrieve Account Details","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [200].indexOf(responseCode.code) > -1;","","if (responseCode.code === 200) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"object\",","    \"description\": \"Your account details.\",","    \"required\": [","        \"id\",","        \"name\",","        \"description\",","        \"created_at\",","        \"updated_at\"","    ],","    \"properties\": {","        \"id\": {","            \"type\": \"string\",","            \"description\": \"The unique identifier of the account.\",","            \"example\": \"3HgPJyIwoUWa\"","        },","        \"name\": {","            \"type\": \"string\",","            \"description\": \"The full name of the account.\",","            \"example\": \"PredictHQ Ltd\"","        },","        \"description\": {","            \"type\": \"string\",","            \"description\": \"A short description of the account.\",","            \"example\": \"PredictHQ is a new global events intelligence platform.\"","        },","        \"created_at\": {","            \"type\": \"string\",","            \"format\": \"date-time\",","            \"description\": \"UTC date and time of the account's creation in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.\",","            \"example\": \"2014-07-16T01:35:26Z\"","        },","        \"updated_at\": {","            \"type\": \"string\",","            \"format\": \"date-time\",","            \"description\": \"UTC date and time of the last update to the account in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.\",","            \"example\": \"2015-01-08T03:14:32Z\"","        }","    },","    \"definitions\": {}","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}"]}}],"id":"dab4dbae-3044-d68e-dd73-2768f334c26e","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{oauth2_access_token}}"}],"body":{"mode":"raw","raw":""},"url":"https://api.predicthq.com/v1/accounts/self/","description":"<p>If you need your account details for whatever reason, it's really easy to get them.</p>\n","urlObject":{"protocol":"https","path":["v1","accounts","self",""],"host":["api","predicthq","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"dab4dbae-3044-d68e-dd73-2768f334c26e"}],"id":"af09bab8-999f-bb6f-4ec9-09cc885b1fb4","_postman_id":"af09bab8-999f-bb6f-4ec9-09cc885b1fb4","description":""},{"name":"events","item":[{"name":"Retrieve All Events","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [200].indexOf(responseCode.code) > -1;","","if (responseCode.code === 200) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"object\",","    \"required\": [","        \"count\",","        \"previous\",","        \"next\",","        \"results\"","    ],","    \"properties\": {","        \"count\": {","            \"type\": \"integer\",","            \"description\": \"The total number of results.\",","            \"minimum\": 0,","            \"example\": 189","        },","        \"previous\": {","            \"type\": [","                \"string\",","                \"null\"","            ],","            \"description\": \"A URL to the previous page, or `null` if this is the first page.\",","            \"example\": \"https://api.predicthq.com/v1/events/?offset=0&limit=10\"","        },","        \"next\": {","            \"type\": [","                \"string\",","                \"null\"","            ],","            \"description\": \"A URL to the next page, or `null` if this is the last page.\",","            \"example\": \"https://api.predicthq.com/v1/events/?offset=10&limit=10\"","        },","        \"results\": {","            \"type\": \"array\",","            \"items\": {","                \"$ref\": \"#/definitions/Event\"","            }","        }","    },","    \"definitions\": {","        \"Event\": {","            \"type\": \"object\",","            \"description\": \"An event represents something happening at a specific date, time and location, which is either scheduled or unscheduled.\\n\",","            \"required\": [","                \"id\"","            ],","            \"properties\": {","                \"id\": {","                    \"type\": \"string\",","                    \"description\": \"The unique identifier of the event.\",","                    \"example\": \"z13B3870YOgv\"","                },","                \"scope\": {","                    \"type\": \"string\",","                    \"description\": \"The geographical scope the events apply to.\",","                    \"enum\": [","                        \"locality\",","                        \"county\",","                        \"region\",","                        \"country\"","                    ],","                    \"example\": \"locality\"","                },","                \"title\": {","                    \"type\": \"string\",","                    \"description\": \"The title of the event.\",","                    \"example\": \"Katy Perry\"","                },","                \"description\": {","                    \"type\": \"string\",","                    \"description\": \"A description of the event.\",","                    \"example\": \"A world class, indoor, multi-purpose, all weather arena [...]\"","                },","                \"start\": {","                    \"type\": \"string\",","                    \"format\": \"date-time\",","                    \"description\": \"The start date of the event in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.\\n\\nAll start dates are in UTC if the event time zone is provided, and in local time otherwise. For example, Independence Day falls on the 4th of July regardless of the time zone, and will have a `null` time zone.\\n\\nIf an event has a start time of midnight (in the event time zone) this is an indication that the actual time may be unknown. You may wish to omit the time when displaying these events.\\n\",","                    \"example\": \"2014-12-19T06:00:00Z\"","                },","                \"end\": {","                    \"type\": \"string\",","                    \"format\": \"date-time\",","                    \"description\": \"The start date of the event in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.\\n\\nAll end dates are in UTC if the event time zone is provided, and in local time otherwise. For example, Independence Day falls on the 4th of July regardless of the time zone, and will have a `null` time zone.\\n\",","                    \"example\": \"2014-12-19T06:00:00Z\"","                },","                \"updated\": {","                    \"type\": \"string\",","                    \"format\": \"date-time\",","                    \"description\": \"The last modification date of the event in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. All dates are in UTC.\",","                    \"example\": \"2014-12-19T06:00:00Z\"","                },","                \"timezone\": {","                    \"type\": [","                        \"string\",","                        \"null\"","                    ],","                    \"description\": \"The time zone of the event in [TZ Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) format. This is helpful so you know which time zone to convert the dates to (if needed).\\n\\nIf the time zone is `null`, the `start` and `end` date should be regarded as time zone agnostic and already being in local time. Our `start` and `end` filters take this into account when specifying a lower and higher bound on dates.\\n\",","                    \"example\": \"Pacific/Auckland\"","                },","                \"duration\": {","                    \"type\": \"integer\",","                    \"description\": \"The duration of the event in seconds.\",","                    \"example\": 3600","                },","                \"category\": {","                    \"$ref\": \"#/definitions/Category\"","                },","                \"labels\": {","                    \"type\": \"array\",","                    \"description\": \"The labels associated with the event.\",","                    \"uniqueItems\": true,","                    \"items\": {","                        \"type\": \"string\"","                    },","                    \"example\": \"[\\\"holiday\\\", \\\"holiday-national\\\"]\"","                },","                \"country\": {","                    \"$ref\": \"#/definitions/CountryCode\"","                },","                \"rank\": {","                    \"type\": \"integer\",","                    \"description\": \"A number between 0 and 100 representing the estimated importance of the event.\",","                    \"minimum\": 0,","                    \"maximum\": 100,","                    \"example\": 50","                },","                \"location\": {","                    \"type\": \"array\",","                    \"description\": \"A 2-tuple representing the geo location of the event. Note that the longitude/latitude coordinates use the [GeoJSON order](http://geojson.org/) [lon, lat].\",","                    \"items\": {","                        \"type\": \"number\"","                    },","                    \"minItems\": 2,","                    \"maxItems\": 2,","                    \"example\": \"[174.776792, -36.847319]\"","                },","                \"relevance\": {","                    \"type\": \"number\",","                    \"description\": \"Relative relevance of the event when performing a search, fuzzy date or signal query.\",","                    \"example\": 2.9654586","                },","                \"state\": {","                    \"type\": \"string\",","                    \"description\": \"The publication state of the event.\\n\\nPossible values:\\n- `active`: the event is published and valid.\\n- `deleted`: the event was removed, either because it was cancelled or is a duplicate.\\n\",","                    \"enum\": [","                        \"active\",","                        \"deleted\"","                    ]","                }","            }","        },","        \"Category\": {","            \"type\": \"string\",","            \"description\": \"The category of the event.\",","            \"enum\": [","                \"school-holidays\",","                \"public-holidays\",","                \"observances\",","                \"concerts\",","                \"conferences\",","                \"expos\",","                \"festivals\",","                \"performing-arts\",","                \"community\",","                \"sports\",","                \"daylight-savings\",","                \"airport-delays\",","                \"severe-weather\",","                \"disasters\",","                \"terror\"","            ],","            \"example\": \"concerts\"","        },","        \"CountryCode\": {","            \"type\": \"string\",","            \"description\": \"The country code in [ISO 3166-1 alpha 2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.\",","            \"example\": \"NZ\"","        }","    }","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}"]}}],"id":"fc8a4e8d-58f7-4a37-36ad-5cb55f587893","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{oauth2_access_token}}"}],"body":{"mode":"raw","raw":""},"url":"https://api.predicthq.com/v1/events/","description":"<p>Use the below parameters to search and filter all events that are available to your account.</p>\n","urlObject":{"protocol":"https","path":["v1","events",""],"host":["api","predicthq","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"fc8a4e8d-58f7-4a37-36ad-5cb55f587893"},{"name":"Retrieve Events Count","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [200].indexOf(responseCode.code) > -1;","","if (responseCode.code === 200) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"object\",","    \"description\": \"The aggregated counts of events by different criteria.\",","    \"required\": [","        \"count\",","        \"top_rank\",","        \"rank_levels\",","        \"categories\",","        \"labels\"","    ],","    \"properties\": {","        \"count\": {","            \"type\": \"integer\",","            \"description\": \"The total count of events.\",","            \"minimum\": 0","        },","        \"top_rank\": {","            \"type\": \"integer\",","            \"description\": \"The rank of the highest ranked event.\",","            \"minimum\": 0,","            \"maximum\": 100,","            \"example\": 50","        },","        \"rank_levels\": {","            \"type\": \"object\",","            \"description\": \"The count of events broken down by rank level.\",","            \"required\": [","                \"1\",","                \"2\",","                \"3\",","                \"4\",","                \"5\"","            ],","            \"properties\": {","                \"1\": {","                    \"type\": \"integer\",","                    \"description\": \"Minor (rank between 0 and 20).\",","                    \"minimum\": 0","                },","                \"2\": {","                    \"type\": \"integer\",","                    \"description\": \"Moderate (rank between 21 and 40).\",","                    \"minimum\": 0","                },","                \"3\": {","                    \"type\": \"integer\",","                    \"description\": \"Important (rank between 41 and 60).\",","                    \"minimum\": 0","                },","                \"4\": {","                    \"type\": \"integer\",","                    \"description\": \"Significant (rank between 61 and 80).\",","                    \"minimum\": 0","                },","                \"5\": {","                    \"type\": \"integer\",","                    \"description\": \"Major (rank between 81 and 100).\",","                    \"minimum\": 0","                }","            }","        },","        \"categories\": {","            \"type\": \"object\",","            \"description\": \"The count of events broken down by category.\",","            \"additionalProperties\": {","                \"type\": \"integer\",","                \"minimum\": 1","            }","        },","        \"labels\": {","            \"type\": \"object\",","            \"description\": \"The count of events broken down by label. As events can have any number of labels these counts are not expected to sum to the total count of events.\",","            \"additionalProperties\": {","                \"type\": \"integer\",","                \"minimum\": 1","            }","        }","    },","    \"definitions\": {}","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}"]}}],"id":"af10d519-ada3-b650-a204-d68d75d32edd","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{oauth2_access_token}}"}],"body":{"mode":"raw","raw":""},"url":"https://api.predicthq.com/v1/events/count/","description":"<p>This endpoint accepts the same parameters as the ones described in Retrieve All Events and can be used to get aggregated counts of all matching events that are available to your account.</p>\n","urlObject":{"protocol":"https","path":["v1","events","count",""],"host":["api","predicthq","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"af10d519-ada3-b650-a204-d68d75d32edd"},{"name":"Retrieve Events Calendar","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [200].indexOf(responseCode.code) > -1;","","if (responseCode.code === 200) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"object\",","    \"required\": [","        \"count\",","        \"results\"","    ],","    \"properties\": {","        \"count\": {","            \"type\": \"integer\",","            \"description\": \"The total number of results.\",","            \"minimum\": 0,","            \"example\": 189","        },","        \"results\": {","            \"type\": \"array\",","            \"items\": {","                \"$ref\": \"#/definitions/EventCalendarDay\"","            }","        }","    },","    \"definitions\": {","        \"EventCalendarDay\": {","            \"type\": \"object\",","            \"description\": \"The aggregated counts of active events for a day by different criteria.\",","            \"required\": [","                \"date\",","                \"count\",","                \"top_rank\",","                \"rank_levels\",","                \"categories\",","                \"labels\"","            ],","            \"properties\": {","                \"date\": {","                    \"type\": \"string\",","                    \"format\": \"date\",","                    \"description\": \"The date the counts are for.\"","                },","                \"count\": {","                    \"type\": \"integer\",","                    \"description\": \"The total count of events.\",","                    \"minimum\": 0","                },","                \"top_rank\": {","                    \"type\": \"integer\",","                    \"description\": \"The rank of the highest ranked event.\",","                    \"minimum\": 0,","                    \"maximum\": 100,","                    \"example\": 50","                },","                \"rank_levels\": {","                    \"type\": \"object\",","                    \"description\": \"The count of events broken down by rank level.\",","                    \"required\": [","                        \"1\",","                        \"2\",","                        \"3\",","                        \"4\",","                        \"5\"","                    ],","                    \"properties\": {","                        \"1\": {","                            \"type\": \"integer\",","                            \"description\": \"Minor (rank between 0 and 20).\",","                            \"minimum\": 0","                        },","                        \"2\": {","                            \"type\": \"integer\",","                            \"description\": \"Moderate (rank between 21 and 40).\",","                            \"minimum\": 0","                        },","                        \"3\": {","                            \"type\": \"integer\",","                            \"description\": \"Important (rank between 41 and 60).\",","                            \"minimum\": 0","                        },","                        \"4\": {","                            \"type\": \"integer\",","                            \"description\": \"Significant (rank between 61 and 80).\",","                            \"minimum\": 0","                        },","                        \"5\": {","                            \"type\": \"integer\",","                            \"description\": \"Major (rank between 81 and 100).\",","                            \"minimum\": 0","                        }","                    }","                },","                \"categories\": {","                    \"type\": \"object\",","                    \"description\": \"The count of events broken down by category.\",","                    \"additionalProperties\": {","                        \"type\": \"integer\",","                        \"minimum\": 1","                    }","                },","                \"labels\": {","                    \"type\": \"object\",","                    \"description\": \"The count of events broken down by label. As events can have any number of labels these counts are not expected to sum to the total count of events.\",","                    \"additionalProperties\": {","                        \"type\": \"integer\",","                        \"minimum\": 1","                    }","                }","            }","        }","    }","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}"]}}],"id":"af9986df-988b-b8d7-a270-99f28ef6ba85","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{oauth2_access_token}}"}],"body":{"mode":"raw","raw":""},"url":"https://api.predicthq.com/v1/events/calendar/","description":"<p>This endpoint accepts the same parameters as the ones described in Retrieve All Events and can be used to get a calendar view of all matching events that are available to your account.</p>\n<p>Each day in the calendar contains aggregate counts of all <em>active</em> events for that day.</p>\n","urlObject":{"protocol":"https","path":["v1","events","calendar",""],"host":["api","predicthq","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"af9986df-988b-b8d7-a270-99f28ef6ba85"}],"id":"99fbe49e-3d6d-ee59-ca64-6060ee0923a7","_postman_id":"99fbe49e-3d6d-ee59-ca64-6060ee0923a7","description":""},{"name":"oauth2","item":[{"name":"Requesting an Access Token","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [200].indexOf(responseCode.code) > -1;","","if (responseCode.code === 200) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"object\",","    \"required\": [","        \"access_token\",","        \"token_type\",","        \"scope\"","    ],","    \"properties\": {","        \"access_token\": {","            \"type\": \"string\",","            \"description\": \"The access token.\"","        },","        \"token_type\": {","            \"type\": \"string\",","            \"description\": \"The type of token.\"","        },","        \"scope\": {","            \"type\": \"string\",","            \"description\": \"The scopes that can be accessed via this token, separated by spaces.\"","        }","    },","    \"definitions\": {}","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}"]}}],"id":"d7900f5b-7a38-53fd-34f4-9511d9a2924e","request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{basic_username}}"},{"key":"password","value":"{{basic_password}}"}],"advancedConfig":[{"key":"saveHelperData","value":"<save-helper-data>"},{"key":"showPassword","value":"<show-password>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"grant_type","value":"{{grant_type}}"},{"key":"scope","value":"{{scope}}"}]},"url":"https://api.predicthq.com/oauth2/token/","description":"<p>When requesting an Access Token, use the <code>client_credentials</code> grant type, then request the scope or scopes you wish to have access to.</p>\n<p>These scopes can be any or all of the following, separated by a space:</p>\n<ul>\n<li><code>account</code> Grants access to the account endpoint.</li>\n<li><code>events</code> Grants access to the events endpoint.</li>\n<li><code>places</code> Grants access to the places endpoint.</li>\n<li><code>signals</code> Grants access to the signals endpoint.</li>\n</ul>\n<p>Please note that Access Tokens requested via the client_credentials grant type never expire.</p>\n","urlObject":{"protocol":"https","path":["oauth2","token",""],"host":["api","predicthq","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"d7900f5b-7a38-53fd-34f4-9511d9a2924e"},{"name":"Revoking an Access Token","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [200].indexOf(responseCode.code) > -1;"]}}],"id":"546f940f-f68b-cc1c-0efc-39447e42eebb","request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{basic_username}}"},{"key":"password","value":"{{basic_password}}"}],"advancedConfig":[{"key":"saveHelperData","value":"<save-helper-data>"},{"key":"showPassword","value":"<show-password>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"token_type_hint","value":"{{token_type_hint}}"},{"key":"token","value":"{{token}}"}]},"url":"https://api.predicthq.com/oauth2/revoke/","description":"<p>Access Tokens never expire so once you have it, it's yours for the life of your PredictHQ API subscription.</p>\n<p>However, if you think your token may have been compromised, you have the power to revoke it at any time.</p>\n","urlObject":{"protocol":"https","path":["oauth2","revoke",""],"host":["api","predicthq","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"546f940f-f68b-cc1c-0efc-39447e42eebb"}],"id":"2ae60283-38ac-f35c-e6ba-4c857beb2766","_postman_id":"2ae60283-38ac-f35c-e6ba-4c857beb2766","description":""},{"name":"places","item":[{"name":"Search Places","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [200].indexOf(responseCode.code) > -1;","","if (responseCode.code === 200) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"object\",","    \"required\": [","        \"count\",","        \"previous\",","        \"next\",","        \"results\"","    ],","    \"properties\": {","        \"count\": {","            \"type\": \"integer\",","            \"description\": \"The total number of results.\",","            \"minimum\": 0,","            \"example\": 189","        },","        \"previous\": {","            \"type\": [","                \"string\",","                \"null\"","            ],","            \"description\": \"A URL to the previous page, or `null` if this is the first page.\",","            \"example\": \"https://api.predicthq.com/v1/places/?offset=0&limit=10\"","        },","        \"next\": {","            \"type\": [","                \"string\",","                \"null\"","            ],","            \"description\": \"A URL to the next page, or `null` if this is the last page.\",","            \"example\": \"https://api.predicthq.com/v1/places/?offset=10&limit=10\"","        },","        \"results\": {","            \"type\": \"array\",","            \"items\": {","                \"$ref\": \"#/definitions/Place\"","            }","        }","    },","    \"definitions\": {","        \"Place\": {","            \"type\": \"object\",","            \"description\": \"A place represents a Geonames Feature, which can be either an Area, an Administrative Feature, or a Populated Place.\",","            \"required\": [","                \"id\",","                \"type\",","                \"name\"","            ],","            \"properties\": {","                \"id\": {","                    \"type\": \"string\",","                    \"description\": \"The unique identifier of the place.\",","                    \"example\": 5115985","                },","                \"type\": {","                    \"type\": \"string\",","                    \"description\": \"The administrative level of the place.\\n\\nPossible values:\\n  - `neighbourhood`: subdivision of a populated place\\n  - `locality`: populated place\\n  - `localadmin`: administrative level 3\\n  - `county`: administrative level 2\\n  - `region`: administrative level 1\\n  - `country`: administrative level 0\\n  - `continent`: Africa, North America, South America, Antarctica, Asia, Europe, Oceania\\n  - `planet`: Earth is the only supported planet at the moment, but we will work hard to support more planets as relevant events become available!\\n\",","                    \"enum\": [","                        \"neighbourhood\",","                        \"locality\",","                        \"localadmin\",","                        \"county\",","                        \"region\",","                        \"country\",","                        \"continent\",","                        \"planet\"","                    ],","                    \"example\": \"locality\"","                },","                \"name\": {","                    \"type\": \"string\",","                    \"description\": \"The name of the place.\",","                    \"example\": \"East New York\"","                },","                \"county\": {","                    \"type\": [","                        \"string\",","                        \"null\"","                    ],","                    \"description\": \"The name of the place's administrative level 2 place, or `null` if it does not apply.\",","                    \"example\": \"Kings County\"","                },","                \"region\": {","                    \"type\": [","                        \"string\",","                        \"null\"","                    ],","                    \"description\": \"The name of the place's administrative level 1 place, or `null` if it does not apply.\",","                    \"example\": \"New York\"","                },","                \"country\": {","                    \"type\": [","                        \"string\",","                        \"null\"","                    ],","                    \"description\": \"The name of the place's administrative level 0 place, or `null` if it does not apply.\",","                    \"example\": \"United States\"","                },","                \"country_alpha2\": {","                    \"type\": \"string\",","                    \"description\": \"The ISO 3166-1 alpha-2 country code.\",","                    \"minLength\": 2,","                    \"maxLength\": 2,","                    \"example\": \"US\"","                },","                \"country_alpha3\": {","                    \"type\": \"string\",","                    \"description\": \"The ISO 3166-1 alpha-3 country code.\",","                    \"minLength\": 3,","                    \"maxLength\": 3,","                    \"example\": \"USA\"","                },","                \"localtion\": {","                    \"type\": \"array\",","                    \"description\": \"A 2-tuple representing the centroid of the place. Note that the longitude/latitude coordinates use the [GeoJSON order](http://geojson.org/) [lon, lat].\",","                    \"items\": {","                        \"type\": \"number\"","                    },","                    \"minItems\": 2,","                    \"maxItems\": 2,","                    \"example\": [","                        -73.88236,","                        40.66677","                    ]","                }","            }","        }","    }","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}"]}}],"id":"19e9d86e-1583-b1b7-2f96-f7d43869ba47","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{oauth2_access_token}}"}],"body":{"mode":"raw","raw":""},"url":"https://api.predicthq.com/v1/places/","description":"<p>Use the below parameters to search and filter all places. Places are sorted by relevance (location or text query proximity).</p>\n<p>A search requires at least one of the <code>q</code>, <code>id</code>, <code>country</code> or <code>location</code> parameters.</p>\n","urlObject":{"protocol":"https","path":["v1","places",""],"host":["api","predicthq","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"19e9d86e-1583-b1b7-2f96-f7d43869ba47"}],"id":"c15f8211-0419-636b-30ee-583f92c32a2e","_postman_id":"c15f8211-0419-636b-30ee-583f92c32a2e","description":""},{"name":"signals","item":[{"name":"Retrieve All Signals","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [200].indexOf(responseCode.code) > -1;","","if (responseCode.code === 200) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"object\",","    \"required\": [","        \"count\",","        \"previous\",","        \"next\",","        \"results\"","    ],","    \"properties\": {","        \"count\": {","            \"type\": \"integer\",","            \"description\": \"The total number of results.\",","            \"minimum\": 0,","            \"example\": 189","        },","        \"previous\": {","            \"type\": [","                \"string\",","                \"null\"","            ],","            \"description\": \"A URL to the previous page, or `null` if this is the first page.\",","            \"example\": \"https://api.predicthq.com/v1/signals/?offset=0&limit=10\"","        },","        \"next\": {","            \"type\": [","                \"string\",","                \"null\"","            ],","            \"description\": \"A URL to the next page, or `null` if this is the last page.\",","            \"example\": \"https://api.predicthq.com/v1/signals/?offset=10&limit=10\"","        },","        \"results\": {","            \"type\": \"array\",","            \"items\": {","                \"$ref\": \"#/definitions/Signal\"","            }","        }","    },","    \"definitions\": {","        \"Signal\": {","            \"type\": \"object\",","            \"description\": \"A Signal represents a time series that's important to your business.\\n\",","            \"required\": [","                \"name\",","                \"country\",","                \"dimensions\"","            ],","            \"properties\": {","                \"name\": {","                    \"type\": \"string\",","                    \"description\": \"The name of the Signal.\",","                    \"example\": \"My Bookings\"","                },","                \"country\": {","                    \"$ref\": \"#/definitions/CountryCode\"","                },","                \"dimensions\": {","                    \"type\": \"array\",","                    \"description\": \"A list of custom dimensions.\",","                    \"items\": {","                        \"$ref\": \"#/definitions/CustomDimension\"","                    },","                    \"example\": [","                        {","                            \"type\": \"category\",","                            \"name\": \"my_dimension\"","                        }","                    ]","                }","            }","        },","        \"CountryCode\": {","            \"type\": \"string\",","            \"description\": \"The country code in [ISO 3166-1 alpha 2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.\",","            \"example\": \"NZ\"","        },","        \"CustomDimension\": {","            \"type\": \"object\",","            \"description\": \"Custom Dimensions are extra fields on a Signal's Data Points that can help you narrow down your results\\n\",","            \"required\": [","                \"type\",","                \"name\"","            ],","            \"properties\": {","                \"type\": {","                    \"type\": \"string\",","                    \"description\": \"The type of dimension.\\n\\nPossible values:\\n- `category` - For options associated with your Data Points. E.g. a product category, etc.\\n- `number` - For quantities associated with your Data Points. E.g. a quantity, a price, etc.\\n- `date` - For dates that are relevant to your business and are different from the supported types.\\n\\nEven though it's possible to store currencies in a dimension of type number, please note that all numbers are stored internally as floats, which means you will encounter rounding issues when you filter your results with a number range.\\n\",","                    \"enum\": [","                        \"category\",","                        \"number\",","                        \"date\"","                    ],","                    \"example\": \"category\"","                },","                \"name\": {","                    \"type\": \"string\",","                    \"description\": \"The name of the dimension. Please note that names are transformed using underscore notation.\\n\",","                    \"example\": \"room_type\"","                }","            }","        }","    }","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}"]}}],"id":"ae42de69-2819-ac0b-c7fa-631913d97393","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{oauth2_access_token}}"}],"body":{"mode":"raw","raw":""},"url":"https://api.predicthq.com/v1/signals/","description":"<p>It's easy to get a list of all Signals that are associated with your account.</p>\n","urlObject":{"protocol":"https","path":["v1","signals",""],"host":["api","predicthq","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"ae42de69-2819-ac0b-c7fa-631913d97393"},{"name":"Create a Signal","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [201].indexOf(responseCode.code) > -1;","","if (responseCode.code === 201) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"object\",","    \"description\": \"A Signal represents a time series that's important to your business.\\n\",","    \"required\": [","        \"id\",","        \"name\",","        \"country\",","        \"dimensions\"","    ],","    \"properties\": {","        \"id\": {","            \"type\": \"string\",","            \"description\": \"The unique identifier of the Signal.\",","            \"example\": \"BpBJK358Sbhw\"","        },","        \"name\": {","            \"type\": \"string\",","            \"description\": \"The name of the Signal.\",","            \"example\": \"My Bookings\"","        },","        \"country\": {","            \"$ref\": \"#/definitions/CountryCode\"","        },","        \"dimensions\": {","            \"type\": \"array\",","            \"description\": \"A list of custom dimensions.\",","            \"items\": {","                \"$ref\": \"#/definitions/CustomDimension\"","            },","            \"example\": [","                {","                    \"type\": \"category\",","                    \"name\": \"my_dimension\"","                }","            ]","        },","        \"created_at\": {","            \"type\": \"string\",","            \"format\": \"date-time\",","            \"description\": \"UTC date and time of the Signal's creation in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.\\n\",","            \"example\": \"2014-07-16T01:35:26Z\"","        },","        \"updated_at\": {","            \"type\": \"string\",","            \"format\": \"date-time\",","            \"description\": \"UTC date and time of the last update to the Signal in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.\\n\",","            \"example\": \"2015-01-08T03:14:32Z\"","        }","    },","    \"definitions\": {","        \"CountryCode\": {","            \"type\": \"string\",","            \"description\": \"The country code in [ISO 3166-1 alpha 2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.\",","            \"example\": \"NZ\"","        },","        \"CustomDimension\": {","            \"type\": \"object\",","            \"description\": \"Custom Dimensions are extra fields on a Signal's Data Points that can help you narrow down your results\\n\",","            \"required\": [","                \"type\",","                \"name\"","            ],","            \"properties\": {","                \"type\": {","                    \"type\": \"string\",","                    \"description\": \"The type of dimension.\\n\\nPossible values:\\n- `category` - For options associated with your Data Points. E.g. a product category, etc.\\n- `number` - For quantities associated with your Data Points. E.g. a quantity, a price, etc.\\n- `date` - For dates that are relevant to your business and are different from the supported types.\\n\\nEven though it's possible to store currencies in a dimension of type number, please note that all numbers are stored internally as floats, which means you will encounter rounding issues when you filter your results with a number range.\\n\",","                    \"enum\": [","                        \"category\",","                        \"number\",","                        \"date\"","                    ],","                    \"example\": \"category\"","                },","                \"name\": {","                    \"type\": \"string\",","                    \"description\": \"The name of the dimension. Please note that names are transformed using underscore notation.\\n\",","                    \"example\": \"room_type\"","                }","            }","        }","    }","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}"]}}],"id":"7acc062c-b20a-3510-6342-dc3b57fbde76","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{oauth2_access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n   \"name\": \"My Bookings\",\n   \"country\": \"NZ\",\n   \"dimensions\": [\n      {\n         \"type\": \"category\",\n         \"name\": \"my_dimension\"\n      }\n   ]\n}"},"url":"https://api.predicthq.com/v1/signals/","description":"<p>Before you do anything else, you need to create a new Signal that represents a time series that's important to your business.</p>\n","urlObject":{"protocol":"https","path":["v1","signals",""],"host":["api","predicthq","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"7acc062c-b20a-3510-6342-dc3b57fbde76"},{"name":"Retrieve A Signal","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [200].indexOf(responseCode.code) > -1;","","if (responseCode.code === 200) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"object\",","    \"description\": \"A Signal represents a time series that's important to your business.\\n\",","    \"required\": [","        \"name\",","        \"country\",","        \"dimensions\"","    ],","    \"properties\": {","        \"name\": {","            \"type\": \"string\",","            \"description\": \"The name of the Signal.\",","            \"example\": \"My Bookings\"","        },","        \"country\": {","            \"$ref\": \"#/definitions/CountryCode\"","        },","        \"dimensions\": {","            \"type\": \"array\",","            \"description\": \"A list of custom dimensions.\",","            \"items\": {","                \"$ref\": \"#/definitions/CustomDimension\"","            },","            \"example\": [","                {","                    \"type\": \"category\",","                    \"name\": \"my_dimension\"","                }","            ]","        }","    },","    \"definitions\": {","        \"CountryCode\": {","            \"type\": \"string\",","            \"description\": \"The country code in [ISO 3166-1 alpha 2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.\",","            \"example\": \"NZ\"","        },","        \"CustomDimension\": {","            \"type\": \"object\",","            \"description\": \"Custom Dimensions are extra fields on a Signal's Data Points that can help you narrow down your results\\n\",","            \"required\": [","                \"type\",","                \"name\"","            ],","            \"properties\": {","                \"type\": {","                    \"type\": \"string\",","                    \"description\": \"The type of dimension.\\n\\nPossible values:\\n- `category` - For options associated with your Data Points. E.g. a product category, etc.\\n- `number` - For quantities associated with your Data Points. E.g. a quantity, a price, etc.\\n- `date` - For dates that are relevant to your business and are different from the supported types.\\n\\nEven though it's possible to store currencies in a dimension of type number, please note that all numbers are stored internally as floats, which means you will encounter rounding issues when you filter your results with a number range.\\n\",","                    \"enum\": [","                        \"category\",","                        \"number\",","                        \"date\"","                    ],","                    \"example\": \"category\"","                },","                \"name\": {","                    \"type\": \"string\",","                    \"description\": \"The name of the dimension. Please note that names are transformed using underscore notation.\\n\",","                    \"example\": \"room_type\"","                }","            }","        }","    }","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}"]}}],"id":"0b2939c1-ff1a-637b-a28a-82413f39ad89","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{oauth2_access_token}}"}],"body":{"mode":"raw","raw":""},"url":"https://api.predicthq.com/v1/signals/:signal_id/","description":"<p>This action returns a Signal according to the unique identifier you provide.</p>\n","urlObject":{"protocol":"https","path":["v1","signals",":signal_id",""],"host":["api","predicthq","com"],"query":[],"variable":[{"type":"any","value":"{{signal_id}}","key":"signal_id"}]}},"response":[],"_postman_id":"0b2939c1-ff1a-637b-a28a-82413f39ad89"},{"name":"Update a Signal","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [200].indexOf(responseCode.code) > -1;","","if (responseCode.code === 200) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"object\",","    \"description\": \"A Signal represents a time series that's important to your business.\\n\",","    \"required\": [","        \"name\",","        \"country\",","        \"dimensions\"","    ],","    \"properties\": {","        \"name\": {","            \"type\": \"string\",","            \"description\": \"The name of the Signal.\",","            \"example\": \"My Bookings\"","        },","        \"country\": {","            \"$ref\": \"#/definitions/CountryCode\"","        },","        \"dimensions\": {","            \"type\": \"array\",","            \"description\": \"A list of custom dimensions.\",","            \"items\": {","                \"$ref\": \"#/definitions/CustomDimension\"","            },","            \"example\": [","                {","                    \"type\": \"category\",","                    \"name\": \"my_dimension\"","                }","            ]","        }","    },","    \"definitions\": {","        \"CountryCode\": {","            \"type\": \"string\",","            \"description\": \"The country code in [ISO 3166-1 alpha 2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.\",","            \"example\": \"NZ\"","        },","        \"CustomDimension\": {","            \"type\": \"object\",","            \"description\": \"Custom Dimensions are extra fields on a Signal's Data Points that can help you narrow down your results\\n\",","            \"required\": [","                \"type\",","                \"name\"","            ],","            \"properties\": {","                \"type\": {","                    \"type\": \"string\",","                    \"description\": \"The type of dimension.\\n\\nPossible values:\\n- `category` - For options associated with your Data Points. E.g. a product category, etc.\\n- `number` - For quantities associated with your Data Points. E.g. a quantity, a price, etc.\\n- `date` - For dates that are relevant to your business and are different from the supported types.\\n\\nEven though it's possible to store currencies in a dimension of type number, please note that all numbers are stored internally as floats, which means you will encounter rounding issues when you filter your results with a number range.\\n\",","                    \"enum\": [","                        \"category\",","                        \"number\",","                        \"date\"","                    ],","                    \"example\": \"category\"","                },","                \"name\": {","                    \"type\": \"string\",","                    \"description\": \"The name of the dimension. Please note that names are transformed using underscore notation.\\n\",","                    \"example\": \"room_type\"","                }","            }","        }","    }","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}"]}}],"id":"04d83989-042c-77dc-0a82-7d86736da1a5","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{oauth2_access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n   \"name\": \"My Bookings\",\n   \"country\": \"NZ\",\n   \"dimensions\": [\n      {\n         \"type\": \"category\",\n         \"name\": \"my_dimension\"\n      }\n   ]\n}"},"url":"https://api.predicthq.com/v1/signals/:signal_id/","description":"<p>This action modifies a Signal according to the unique identifier you provide.</p>\n","urlObject":{"protocol":"https","path":["v1","signals",":signal_id",""],"host":["api","predicthq","com"],"query":[],"variable":[{"type":"any","value":"{{signal_id}}","key":"signal_id"}]}},"response":[],"_postman_id":"04d83989-042c-77dc-0a82-7d86736da1a5"},{"name":"Delete A Signal","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [204].indexOf(responseCode.code) > -1;"]}}],"id":"6aadd949-0c1c-d7c5-7329-d602024a20ef","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{oauth2_access_token}}"}],"body":{"mode":"raw","raw":""},"url":"https://api.predicthq.com/v1/signals/:signal_id/","description":"<p>This action will delete a Signal altogether along with the Data Points associated with it, according to the unique identifier you provide.</p>\n","urlObject":{"protocol":"https","path":["v1","signals",":signal_id",""],"host":["api","predicthq","com"],"query":[],"variable":[{"type":"any","value":"{{signal_id}}","key":"signal_id"}]}},"response":[],"_postman_id":"6aadd949-0c1c-d7c5-7329-d602024a20ef"},{"name":"Create Data Points","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [201,202].indexOf(responseCode.code) > -1;","","if (responseCode.code === 201) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"array\",","    \"items\": {","        \"$ref\": \"#/definitions/InvalidDataPoint\"","    },","    \"maxItems\": 0,","    \"definitions\": {","        \"InvalidDataPoint\": {","            \"type\": \"object\",","            \"required\": [","                \"item\",","                \"errors\"","            ],","            \"properties\": {","                \"item\": {","                    \"$ref\": \"#/definitions/DataPoint\"","                },","                \"errors\": {","                    \"type\": \"object\",","                    \"additionalProperties\": {","                        \"type\": \"array\",","                        \"items\": {","                            \"type\": \"string\",","                            \"description\": \"A message describing an error with the provided data point.\"","                        },","                        \"minItems\": 1","                    }","                }","            }","        },","        \"DataPoint\": {","            \"type\": \"object\",","            \"description\": \"At the bare minimum, a Data Point is characterised by an identifier that is unique to your business (but multiple Signals can contain the same Data), a date, and a geo-location.\\n\\nOptionally, Data Points can be given a date at which a transaction was initiated, and a date at which it was completed. This can be used to take into consideration lead time and time span when aligning your Signal with events. This is particularly useful for booking transactions.\\n\\nAny custom dimensions defined in the Signal can be included in the Data Point object as additional properties e.g. `\\\"room_type\\\": \\\"Double Room\\\"`\\n\\nGeo-location is compulsory to align your Signal with relevant events. If you don't have or know the exact geo-location for your Data Points, consider using the centre of the city, region or country that is of interest for your business needs.\\n\",","            \"required\": [","                \"uid\",","                \"date\",","                \"latitude\",","                \"longitude\"","            ],","            \"properties\": {","                \"uid\": {","                    \"type\": \"string\",","                    \"description\": \"Unique identifier of the transaction.\\n\",","                    \"example\": \"1354861a5\"","                },","                \"date\": {","                    \"type\": \"string\",","                    \"format\": \"date-time\",","                    \"description\": \"Date of the Data Point in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. This corresponds to your main date (e.g. Check-in, Pick-up, Transaction, etc.).\\n\",","                    \"example\": \"2015-09-01T00:00:00Z\"","                },","                \"latitude\": {","                    \"type\": \"number\",","                    \"description\": \"The latitude for the location of the Data Point.\\n\",","                    \"example\": -27.46846","                },","                \"longitude\": {","                    \"type\": \"number\",","                    \"description\": \"The longitude for the location of the Data Point.\\n\",","                    \"example\": 153.02342","                },","                \"initiated\": {","                    \"type\": \"string\",","                    \"format\": \"date-time\",","                    \"description\": \"An initiation date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. This must be anterior to the date of the Data Point.\\n\",","                    \"example\": \"2015-08-25T00:00:00Z\"","                },","                \"completed\": {","                    \"type\": \"string\",","                    \"format\": \"date-time\",","                    \"description\": \"A completion date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. This must be posterior to the date of the Data Point.\\n\",","                    \"example\": \"2015-09-03T00:00:00Z\"","                }","            },","            \"additionalProperties\": {","                \"type\": [","                    \"string\",","                    \"number\"","                ],","                \"description\": \"Any custom dimensions defined in the Signal can be included as additional properties.\"","            }","        }","    }","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}","","if (responseCode.code === 202) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"array\",","    \"items\": {","        \"$ref\": \"#/definitions/InvalidDataPoint\"","    },","    \"minItems\": 1,","    \"definitions\": {","        \"InvalidDataPoint\": {","            \"type\": \"object\",","            \"required\": [","                \"item\",","                \"errors\"","            ],","            \"properties\": {","                \"item\": {","                    \"$ref\": \"#/definitions/DataPoint\"","                },","                \"errors\": {","                    \"type\": \"object\",","                    \"additionalProperties\": {","                        \"type\": \"array\",","                        \"items\": {","                            \"type\": \"string\",","                            \"description\": \"A message describing an error with the provided data point.\"","                        },","                        \"minItems\": 1","                    }","                }","            }","        },","        \"DataPoint\": {","            \"type\": \"object\",","            \"description\": \"At the bare minimum, a Data Point is characterised by an identifier that is unique to your business (but multiple Signals can contain the same Data), a date, and a geo-location.\\n\\nOptionally, Data Points can be given a date at which a transaction was initiated, and a date at which it was completed. This can be used to take into consideration lead time and time span when aligning your Signal with events. This is particularly useful for booking transactions.\\n\\nAny custom dimensions defined in the Signal can be included in the Data Point object as additional properties e.g. `\\\"room_type\\\": \\\"Double Room\\\"`\\n\\nGeo-location is compulsory to align your Signal with relevant events. If you don't have or know the exact geo-location for your Data Points, consider using the centre of the city, region or country that is of interest for your business needs.\\n\",","            \"required\": [","                \"uid\",","                \"date\",","                \"latitude\",","                \"longitude\"","            ],","            \"properties\": {","                \"uid\": {","                    \"type\": \"string\",","                    \"description\": \"Unique identifier of the transaction.\\n\",","                    \"example\": \"1354861a5\"","                },","                \"date\": {","                    \"type\": \"string\",","                    \"format\": \"date-time\",","                    \"description\": \"Date of the Data Point in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. This corresponds to your main date (e.g. Check-in, Pick-up, Transaction, etc.).\\n\",","                    \"example\": \"2015-09-01T00:00:00Z\"","                },","                \"latitude\": {","                    \"type\": \"number\",","                    \"description\": \"The latitude for the location of the Data Point.\\n\",","                    \"example\": -27.46846","                },","                \"longitude\": {","                    \"type\": \"number\",","                    \"description\": \"The longitude for the location of the Data Point.\\n\",","                    \"example\": 153.02342","                },","                \"initiated\": {","                    \"type\": \"string\",","                    \"format\": \"date-time\",","                    \"description\": \"An initiation date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. This must be anterior to the date of the Data Point.\\n\",","                    \"example\": \"2015-08-25T00:00:00Z\"","                },","                \"completed\": {","                    \"type\": \"string\",","                    \"format\": \"date-time\",","                    \"description\": \"A completion date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. This must be posterior to the date of the Data Point.\\n\",","                    \"example\": \"2015-09-03T00:00:00Z\"","                }","            },","            \"additionalProperties\": {","                \"type\": [","                    \"string\",","                    \"number\"","                ],","                \"description\": \"Any custom dimensions defined in the Signal can be included as additional properties.\"","            }","        }","    }","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}"]}}],"id":"8f399f4c-2111-6006-f478-9a94ab0ef74a","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{oauth2_access_token}}"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"[\n   {\n      \"uid\": \"1354861a5\",\n      \"date\": \"2015-09-01T00:00:00Z\",\n      \"latitude\": -27.46846,\n      \"longitude\": 153.02342,\n      \"initiated\": \"2015-08-25T00:00:00Z\",\n      \"completed\": \"2015-09-03T00:00:00Z\"\n   }\n]"},"url":"https://api.predicthq.com/v1/signals/:signal_id/sink/","description":"<p>Every Signal needs a series of Data Points for the API to do its job.</p>\n<p>Unlike the other endpoints, the Data Point sink accepts three content types for uploading your data:</p>\n<ul>\n<li><code>application/json</code>: A JSON array of Data Points.</li>\n<li><code>application/x-ldjson</code>: A list of JSON Data Points, one on each line.</li>\n<li><code>text/csv</code>: A list of Data Points with each column comma-separated, and column names on the first row.</li>\n</ul>\n<p>As a rule of thumb, you should limit the number of records you upload with any single request to 1,000. If you use the CSV format, make sure to repeat the CSV header with each call.</p>\n<p>The global rate limit applies, but to prevent any disruption on critical aspects of your systems, this endpoint will never respond with a <code>402 Payment Required</code> in case your subscription expires.</p>\n<p>When required details are missing for some Data Points, instead of rejecting the whole batch, the valid Data Points will be accepted, and the invalid ones will be returned as an array in the body of the response along with a description of the problem.\nIf this is the case, the response code will be <code>202 Accepted</code> instead of <code>201 Created</code>.</p>\n","urlObject":{"protocol":"https","path":["v1","signals",":signal_id","sink",""],"host":["api","predicthq","com"],"query":[],"variable":[{"type":"any","value":"{{signal_id}}","key":"signal_id"}]}},"response":[],"_postman_id":"8f399f4c-2111-6006-f478-9a94ab0ef74a"},{"name":"Retrieve All Dimensions","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [200].indexOf(responseCode.code) > -1;","","if (responseCode.code === 200) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"object\",","    \"description\": \"Dimension data for a signal.\\n\",","    \"required\": [","        \"date\",","        \"initiated\",","        \"completed\",","        \"location\"","    ],","    \"properties\": {","        \"date\": {","            \"$ref\": \"#/definitions/DateDimension\"","        },","        \"initiated\": {","            \"$ref\": \"#/definitions/DateDimension\"","        },","        \"completed\": {","            \"$ref\": \"#/definitions/DateDimension\"","        },","        \"location\": {","            \"type\": \"object\",","            \"required\": [","                \"type\",","                \"bbox\"","            ],","            \"properties\": {","                \"type\": {","                    \"type\": \"string\",","                    \"enum\": [","                        \"geo\"","                    ]","                },","                \"bbox\": {","                    \"type\": \"array\",","                    \"description\": \"The bounding box encompassing the Data Points in the signal.\\n\",","                    \"items\": {","                        \"type\": \"number\"","                    },","                    \"minItems\": 4,","                    \"maxItems\": 4","                }","            }","        }","    },","    \"definitions\": {","        \"DateDimension\": {","            \"type\": \"object\",","            \"required\": [","                \"count\",","                \"min\",","                \"max\",","                \"type\"","            ],","            \"properties\": {","                \"count\": {","                    \"type\": \"integer\",","                    \"description\": \"The number of Data Points with this dimension in the signal.\",","                    \"minimum\": 0","                },","                \"min\": {","                    \"type\": \"string\",","                    \"format\": \"date-time\",","                    \"description\": \"The date of this dimension for the eariest Data Point in the signal.\"","                },","                \"max\": {","                    \"type\": \"string\",","                    \"format\": \"date-time\",","                    \"description\": \"The date of this dimension for the latest Data Point in the signal.\"","                },","                \"type\": {","                    \"type\": \"string\",","                    \"enum\": [","                        \"date\"","                    ]","                }","            }","        }","    }","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}"]}}],"id":"d0c660bc-aab2-7f5f-7b2e-978ce96654cf","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{oauth2_access_token}}"}],"body":{"mode":"raw","raw":""},"url":"https://api.predicthq.com/v1/signals/:signal_id/dimensions/","description":"<p>This action returns a summary for each dimension of your Signal.</p>\n","urlObject":{"protocol":"https","path":["v1","signals",":signal_id","dimensions",""],"host":["api","predicthq","com"],"query":[],"variable":[{"type":"any","value":"{{signal_id}}","key":"signal_id"}]}},"response":[],"_postman_id":"d0c660bc-aab2-7f5f-7b2e-978ce96654cf"},{"name":"Retrieve Analysis","event":[{"listen":"test","script":{"type":"text/javascript","exec":["tests[\"Status code is expected\"] = [200].indexOf(responseCode.code) > -1;","","if (responseCode.code === 200) {","\tvar data = JSON.parse(responseBody);","\tvar schema = {","    \"type\": \"object\",","    \"required\": [","        \"count\",","        \"results\"","    ],","    \"properties\": {","        \"count\": {","            \"type\": \"integer\",","            \"description\": \"The total number of results.\",","            \"minimum\": 0,","            \"example\": 189","        },","        \"results\": {","            \"type\": \"array\",","            \"items\": {","                \"$ref\": \"#/definitions/Analysis\"","            }","        }","    },","    \"definitions\": {","        \"Analysis\": {","            \"type\": \"object\",","            \"description\": \"Analysis of a signal for a date.\\n\",","            \"required\": [","                \"date\",","                \"demand\"","            ],","            \"properties\": {","                \"date\": {","                    \"type\": \"string\",","                    \"format\": \"date-time\",","                    \"description\": \"The date the analysis is for.\"","                },","                \"demand\": {","                    \"type\": \"object\",","                    \"required\": [","                        \"count\",","                        \"expected\",","                        \"excess\"","                    ],","                    \"properties\": {","                        \"count\": {","                            \"type\": \"integer\",","                            \"description\": \"The number of Data Points on the date.\",","                            \"minimum\": 0","                        },","                        \"expected\": {","                            \"type\": \"number\",","                            \"description\": \"The expected number of Data Points on the date.\"","                        },","                        \"excess\": {","                            \"type\": \"number\",","                            \"description\": \"The difference between the expected and actual number of Data Points on the date.\"","                        }","                    }","                },","                \"lead\": {","                    \"type\": \"object\",","                    \"required\": [","                        \"expected\",","                        \"std_deviation\",","                        \"mean\",","                        \"excess\"","                    ],","                    \"properties\": {","                        \"expected\": {","                            \"type\": \"number\"","                        },","                        \"std_deviation\": {","                            \"type\": \"number\"","                        },","                        \"mean\": {","                            \"type\": \"number\"","                        },","                        \"excess\": {","                            \"type\": \"number\"","                        }","                    }","                },","                \"span\": {","                    \"type\": \"object\",","                    \"required\": [","                        \"expected\",","                        \"std_deviation\",","                        \"mean\",","                        \"excess\"","                    ],","                    \"properties\": {","                        \"expected\": {","                            \"type\": \"number\"","                        },","                        \"std_deviation\": {","                            \"type\": \"number\"","                        },","                        \"mean\": {","                            \"type\": \"number\"","                        },","                        \"excess\": {","                            \"type\": \"number\"","                        }","                    }","                }","            }","        }","    }","};","\ttests[\"Response Body respects JSON schema documentation\"] = tv4.validate(data, schema);","\tif(tests[\"Response Body respect JSON schema documentation\"] === false){","\t\tconsole.log(tv4.error);","\t}","}"]}}],"id":"81641d40-e9a4-2a22-501e-e31aa456548f","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{oauth2_access_token}}"}],"body":{"mode":"raw","raw":""},"url":"https://api.predicthq.com/v1/signals/:signal_id/analysis/","description":"<p>This action returns a complete analysis of your Signal, which includes what your actual figures were, what could be expected, and what was in excess in terms of <strong>demand</strong>, <strong>lead time</strong> and <strong>duration</strong> and can be explained using events. Note that lead time (<code>lead</code>) and duration (<code>span</code>) analysis are only available when an <code>initiated</code> and <code>completed</code> dates are provided with data points, respectively.</p>\n<p>To retrieve a list of events that we estimate impacted your business at a specific date in the past, use the <code>signal.id</code> and <code>signal.explain</code> parameters with the events endpoint.</p>\n<p>Alternatively, to retrieve a list of predicted events that we estimate will impact your business in the future, use the <code>signal.id</code> parameter and the date range you wish a prediction for using <code>active</code> or <code>start</code>.</p>\n<p>See the events endpoint for more details.</p>\n<p>The <code>significance</code> parameter corresponds to percentage of variation in your data that is considered normal when computing excess that can be attributed to events. If you were to look at a normal distribution, it would correspond to the percentage of values that lie within a band around the mean.</p>\n<p>As an example:</p>\n<ul>\n<li>~68.27% = 1 standard deviation from the mean</li>\n<li>~95.45% = 2 standard deviations from the mean</li>\n<li>~99.73% = 3 standard deviations from the mean</li>\n</ul>\n<p>A high <code>significance</code> means that only extreme spikes and troughs will be attributed to events. We use 50% as a default, which corresponds to ~0.68 standard deviations.</p>\n","urlObject":{"protocol":"https","path":["v1","signals",":signal_id","analysis",""],"host":["api","predicthq","com"],"query":[],"variable":[{"type":"any","value":"{{signal_id}}","key":"signal_id"}]}},"response":[],"_postman_id":"81641d40-e9a4-2a22-501e-e31aa456548f"}],"id":"67deb1f9-b2e6-4015-4f92-f562817767b9","_postman_id":"67deb1f9-b2e6-4015-4f92-f562817767b9","description":""}]}