openapi: 3.0.3
info:
title: WxContext | a Weather Source API
description: "**Description:**\n\nThe WxContext API delivers pre-calculated weather anomaly triggers directly to your application stack. By pairing ECMWF forecasts with our proprietary climatology, it translates complex weather variables into automated True/False signals rooted in local experienced weather. \n\nKey action triggers include Warmer than Normal, Cooler than Normal, Normal Weather, Meaningful Rain, Meaningful Snow and Meaningful Wind. Use these hyper-local signals to seamlessly automate ad targeting, Dynamic Creative Optimization (DCO), CRM push notifications, and digital storefront personalization exactly where consumer buying intent peaks.\n\nThis API returns available daily periods only. Hour periods are not supported. Forecast responses include up to 15 days of available anomaly forecast.\n\nWeather Source APIs are built upon the [OnPoint™ Platform](https://www.pelmorex.com/en/products-and-solutions/weather-source/onpoint-weather-data-suite/) which ensures data that is gap-free, homogeneous, and ready for immediate analysis. We offer one of the highest resolution grids on the market, covering every landmass in the world and up to 200 miles offshore.\n\n**Authorization:**\n\nRequests are authorized by a header named `X-API-KEY` with a value of your API key. If you do not have a Weather Source API key [sign up for a free developer account](https://developer.weathersourceapis.com/account/sign-up/) to trial the data, or contact sales at [weathersource@pelmorex.com](mailto:weathersource@pelmorex.com) to explore the right subscription package for your business.\n\nWhen using the \\\"Try it out\\\" capability in the documentation, your API key should be added by clicking the green \\\"Authorize\\\" button at the top of the page. You may use the evaluation API Key `C0W60UOFRML47ytbXk4xlLBfv` to access example locations found in this documentation.\n"
termsOfService: https://weathersource.com/company/legal/terms-of-service/
contact:
name: Weather Source APIs
url: https://developer.weathersourceapis.com/
email: weathersource@pelmorex.com
license:
name: Proprietary
url: https://weathersource.com/company/legal/terms-of-service/
version: 2.0.0
servers:
- url: https://ecmwfanomalyforecast.weathersourceapis.com/v2
security:
- ApiKeyAuth: []
paths:
/points/{latitude},{longitude}/days:
get:
tags:
- points
summary: Daily ECMWF anomaly forecast for a Latitude/Longitude point.
description: |
Returns available daily ECMWF anomaly forecast data for a Latitude/Longitude point.
Forecast responses include up to 15 days of available anomaly forecast. Hour periods are not supported.
**IMPORTANT:** To authenticate to the Weather Source WxContext API, each request must contain your API key set to a custom header named `X-API-KEY`. If you do not have a Weather Source API key [sign up for a free 30-day developer account](https://developer.weathersourceapis.com/account/sign-up/). You may use the evaluation API Key `C0W60UOFRML47ytbXk4xlLBfv` to access example locations found in this documentation.
When using the \"Try it out\" capability in the documentation, the API key should be added by clicking the green \"Authorize\" button at the top of the page.
operationId: getPointEcmwfAnomalyForecastDays
parameters:
- name: latitude
in: path
description: A latitude value between -90° and 90°.
required: true
schema:
maximum: 90
minimum: -90
type: number
format: float
example: 38.8552
- name: longitude
in: path
description: A longitude value between -180° (West) and 180° (East).
required: true
schema:
maximum: 180
minimum: -180
type: number
format: float
example: -77.0513
- name: fields
in: query
description: |
A comma separated list of field names to return. The date field is always returned.
**Limiting the query to needed fields will improve the query response time.**
In addition to individual field names, the following convenience field groups are supported:
* all *(all fields)*
required: true
schema:
type: array
example:
- all
items:
type: string
enum:
- date
- timestampInit
- tempCooler
- tempNormal
- tempWarmer
- rainLight
- rainMeaningful
- snowfallLight
- snowfallMeaningful
- windMeaningful
- all
- name: unitScale
in: query
description: The unit scale for returned values.
required: false
schema:
type: string
example: IMPERIAL
enum:
- IMPERIAL
- METRIC
- SI
default: IMPERIAL
responses:
"200":
description: Daily ECMWF anomaly forecast response for a Latitude/Longitude point.
content:
application/json:
schema:
$ref: "#/components/schemas/ecmwfanomalyforecastPointDayObj"
"400":
$ref: "#/components/responses/errorResponse"
default:
$ref: "#/components/responses/errorResponse"
/postcodes/{postcode},{countryCode}/days:
get:
tags:
- postcodes
summary: Daily ECMWF anomaly forecast for a postcode.
description: |
Returns available daily ECMWF anomaly forecast data for a postcode.
Forecast responses include up to 15 days of available anomaly forecast. Hour periods are not supported.
**IMPORTANT:** To authenticate to the Weather Source WxContext API, each request must contain your API key set to a custom header named `X-API-KEY`. If you do not have a Weather Source API key [sign up for a free 30-day developer account](https://developer.weathersourceapis.com/account/sign-up/). You may use the evaluation API Key `C0W60UOFRML47ytbXk4xlLBfv` to access example locations found in this documentation.
When using the \"Try it out\" capability in the documentation, the API key should be added by clicking the green \"Authorize\" button at the top of the page.
operationId: getPostcodeEcmwfAnomalyForecastDays
parameters:
- name: postcode
in: path
description: A postcode string.
required: true
schema:
type: string
example: "22222"
- name: countryCode
in: path
description: "An uppercase 2-character [ISO 3166-1 Alpha-2 country code](https://developer.weathersourceapis.com/apis/countries-with-postal-code-support/)."
required: true
schema:
pattern: "^([A-Z]){2}$"
type: string
example: US
- name: fields
in: query
description: |
A comma separated list of field names to return. The date field is always returned.
**Limiting the query to needed fields will improve the query response time.**
In addition to individual field names, the following convenience field groups are supported:
* all *(all fields)*
required: true
schema:
type: array
example:
- all
items:
type: string
enum:
- date
- timestampInit
- tempCooler
- tempNormal
- tempWarmer
- rainLight
- rainMeaningful
- snowfallLight
- snowfallMeaningful
- windMeaningful
- all
- name: unitScale
in: query
description: The unit scale for returned values.
required: false
schema:
type: string
example: IMPERIAL
enum:
- IMPERIAL
- METRIC
- SI
default: IMPERIAL
responses:
"200":
description: Daily ECMWF anomaly forecast response for a postcode.
content:
application/json:
schema:
$ref: "#/components/schemas/ecmwfanomalyforecastPostcodeDayObj"
"400":
$ref: "#/components/responses/errorResponse"
default:
$ref: "#/components/responses/errorResponse"
/dmas/{dmaId}/days:
get:
tags:
- dmas
summary: Daily ECMWF anomaly forecast for a DMA.
description: |
Returns available daily ECMWF anomaly forecast data for a Designated Market Area.
Forecast responses include up to 15 days of available anomaly forecast. Hour periods are not supported.
**IMPORTANT:** To authenticate to the Weather Source WxContext API, each request must contain your API key set to a custom header named `X-API-KEY`. If you do not have a Weather Source API key [sign up for a free 30-day developer account](https://developer.weathersourceapis.com/account/sign-up/). You may use the evaluation API Key `C0W60UOFRML47ytbXk4xlLBfv` to access example locations found in this documentation.
When using the \"Try it out\" capability in the documentation, the API key should be added by clicking the green \"Authorize\" button at the top of the page.
operationId: getDmaEcmwfAnomalyForecastDays
parameters:
- name: dmaId
in: path
description: "A [Designated Market Area ID](https://developer.weathersourceapis.com/apis/supported-dmas/)."
required: true
schema:
type: integer
example: 529
- name: fields
in: query
description: |
A comma separated list of field names to return. The date field is always returned.
**Limiting the query to needed fields will improve the query response time.**
In addition to individual field names, the following convenience field groups are supported:
* all *(all fields)*
required: true
schema:
type: array
example:
- all
items:
type: string
enum:
- date
- timestampInit
- tempCooler
- tempNormal
- tempWarmer
- rainLight
- rainMeaningful
- snowfallLight
- snowfallMeaningful
- windMeaningful
- all
- name: unitScale
in: query
description: The unit scale for returned values.
required: false
schema:
type: string
example: IMPERIAL
enum:
- IMPERIAL
- METRIC
- SI
default: IMPERIAL
responses:
"200":
description: Daily ECMWF anomaly forecast response for a Designated Market Area.
content:
application/json:
schema:
$ref: "#/components/schemas/ecmwfanomalyforecastDmaDayObj"
"400":
$ref: "#/components/responses/errorResponse"
default:
$ref: "#/components/responses/errorResponse"
/onpoints/{onpointId}/days:
get:
tags:
- onpoints
summary: Daily ECMWF anomaly forecast for an OnPoint™ point.
description: |
Returns available daily ECMWF anomaly forecast data for an OnPoint™ point.
Forecast responses include up to 15 days of available anomaly forecast. Hour periods are not supported.
**IMPORTANT:** To authenticate to the Weather Source WxContext API, each request must contain your API key set to a custom header named `X-API-KEY`. If you do not have a Weather Source API key [sign up for a free 30-day developer account](https://developer.weathersourceapis.com/account/sign-up/). You may use the evaluation API Key `C0W60UOFRML47ytbXk4xlLBfv` to access example locations found in this documentation.
When using the \"Try it out\" capability in the documentation, the API key should be added by clicking the green \"Authorize\" button at the top of the page.
operationId: getOnpointEcmwfAnomalyForecastDays
parameters:
- name: onpointId
in: path
description: An OnPoint™ ID.
required: true
schema:
type: integer
example: 10725864
- name: fields
in: query
description: |
A comma separated list of field names to return. The date field is always returned.
**Limiting the query to needed fields will improve the query response time.**
In addition to individual field names, the following convenience field groups are supported:
* all *(all fields)*
required: true
schema:
type: array
example:
- all
items:
type: string
enum:
- date
- timestampInit
- tempCooler
- tempNormal
- tempWarmer
- rainLight
- rainMeaningful
- snowfallLight
- snowfallMeaningful
- windMeaningful
- all
- name: unitScale
in: query
description: The unit scale for returned values.
required: false
schema:
type: string
example: IMPERIAL
enum:
- IMPERIAL
- METRIC
- SI
default: IMPERIAL
responses:
"200":
description: Daily ECMWF anomaly forecast response for an OnPoint™ point.
content:
application/json:
schema:
$ref: "#/components/schemas/ecmwfanomalyforecastOnpointDayObj"
"400":
$ref: "#/components/responses/errorResponse"
default:
$ref: "#/components/responses/errorResponse"
components:
schemas:
ecmwfanomalyforecastPointDayObj:
required:
- dateRange
- fieldList
- forecast
- location
type: object
properties:
location:
$ref: "#/components/schemas/pointObj"
dateRange:
$ref: "#/components/schemas/dateRangeObj"
fieldList:
$ref: "#/components/schemas/fieldListDayObj"
forecast:
$ref: "#/components/schemas/ecmwfanomalyforecastDayArr"
description: Daily Latitude/Longitude ECMWF anomaly forecast weather object
ecmwfanomalyforecastPostcodeDayObj:
required:
- dateRange
- fieldList
- forecast
- location
type: object
properties:
location:
$ref: "#/components/schemas/postcodeObj"
dateRange:
$ref: "#/components/schemas/dateRangeObj"
fieldList:
$ref: "#/components/schemas/fieldListDayObj"
forecast:
$ref: "#/components/schemas/ecmwfanomalyforecastDayArr"
description: Daily Postcode ECMWF anomaly forecast weather object
ecmwfanomalyforecastDmaDayObj:
required:
- dateRange
- fieldList
- forecast
- location
type: object
properties:
location:
$ref: "#/components/schemas/dmaObj"
dateRange:
$ref: "#/components/schemas/dateRangeObj"
fieldList:
$ref: "#/components/schemas/fieldListDayObj"
forecast:
$ref: "#/components/schemas/ecmwfanomalyforecastDayArr"
description: Daily Designated Market Area ECMWF anomaly forecast weather object
ecmwfanomalyforecastOnpointDayObj:
required:
- dateRange
- fieldList
- forecast
- location
type: object
properties:
location:
$ref: "#/components/schemas/onpointObj"
dateRange:
$ref: "#/components/schemas/dateRangeObj"
fieldList:
$ref: "#/components/schemas/fieldListDayObj"
forecast:
$ref: "#/components/schemas/ecmwfanomalyforecastDayArr"
description: Daily OnPoint™ ECMWF anomaly forecast weather object
fieldListDayObj:
title: fieldListObj
required:
- fields
type: object
properties:
fields:
$ref: "#/components/schemas/fields"
description: A list of returned field names and the associated units.
ecmwfanomalyforecastDayArr:
type: array
description: A list of daily ECMWF anomaly forecast weather values.
items:
$ref: "#/components/schemas/ecmwfanomalyforecastDayObj"
ecmwfanomalyforecastDayObj:
required:
- date
type: object
properties:
date:
$ref: "#/components/schemas/date"
timestampInit:
$ref: "#/components/schemas/timestamp"
tempCooler:
type: boolean
description: Indicates temperatures are expected to be cooler than normal.
example: true
tempNormal:
type: boolean
description: Indicates temperatures are expected to be normal.
example: false
tempWarmer:
type: boolean
description: Indicates temperatures are expected to be warmer than normal.
example: false
rainLight:
type: boolean
description: Indicates light rain is expected.
example: false
rainMeaningful:
type: boolean
description: Indicates meaningful rain is expected.
example: true
snowfallLight:
type: boolean
description: Indicates light snowfall is expected.
example: false
snowfallMeaningful:
type: boolean
description: Indicates meaningful snowfall is expected.
example: false
windMeaningful:
type: boolean
description: Indicates meaningful wind is expected.
example: true
description: Daily ECMWF anomaly forecast weather values.
errorObj:
type: object
properties:
errorCode:
maximum: 600
minimum: 100
type: integer
example: 404
errorMessage:
type: string
example: NOT FOUND. Item not found.
pointObj:
required:
- boundingPoints
- elevation
- grid
- latitude
- longitude
- timezone
type: object
properties:
latitude:
$ref: "#/components/schemas/latitude"
longitude:
$ref: "#/components/schemas/longitude"
timezone:
$ref: "#/components/schemas/timezone"
countryCode:
$ref: "#/components/schemas/countryCode"
countryName:
$ref: "#/components/schemas/countryName"
subdivCode:
$ref: "#/components/schemas/subdivCode"
subdivName:
$ref: "#/components/schemas/subdivName"
boundingPoints:
$ref: "#/components/schemas/boundingPoints"
grid:
$ref: "#/components/schemas/grid"
elevation:
$ref: "#/components/schemas/elevation"
description: Metadata object for a postcode
latitude:
maximum: 90
minimum: -90
type: number
description: A latitude value between -90° and 90°.
format: float
example: 38.8552
longitude:
maximum: 180
minimum: -180
type: number
description: A longitude value between -180° (West) and 180° (East).
format: float
example: -77.0513
timezone:
type: string
description: An Olson timezone ID.
example: America/New_York
countryCode:
type: string
description: "An [ISO 3166-1 Alpha-2 country code](https://developer.weathersourceapis.com/apis/countries-with-postal-code-support/)."
example: US
countryName:
type: string
description: A common country name.
example: United States of America
subdivCode:
type: string
description: An ISO 3166-2 country subdivision code.
example: US-VA
subdivName:
type: string
description: A common country subdivision name.
example: Virginia
boundingPoints:
type: array
description: A list of OnPoint™ points related to the location
items:
required:
- distance
- elevation
- grid
- latitude
- longitude
- onpointId
type: object
properties:
onpointId:
$ref: "#/components/schemas/onpointId"
latitude:
$ref: "#/components/schemas/latitude"
longitude:
$ref: "#/components/schemas/longitude"
grid:
$ref: "#/components/schemas/grid"
distance:
$ref: "#/components/schemas/distance"
elevation:
$ref: "#/components/schemas/elevation"
onpointId:
type: integer
description: An OnPoint™ ID.
example: 10725864
grid:
type: string
description: The OnPoint™ grid on which the resource exists.
example: NORTH_AMERICA_GRID
enum:
- GLOBAL_GRID
- NORTH_AMERICA_GRID
distance:
type: number
description: A distance from the provided point in miles.
format: float
example: 2.6772
elevation:
type: number
description: The elevation above sea level of a location in meters
format: float
example: 173.5
dateRangeObj:
required:
- dateEnd
- dateStart
type: object
properties:
dateStart:
$ref: "#/components/schemas/dateStart"
dateEnd:
$ref: "#/components/schemas/dateEnd"
description: A date range object.
dateStart:
type: string
description: A start date for a date range formatted as an RFC3339 date value.
format: date
example: 2020-12-20
dateEnd:
type: string
description: An end date for a date range formatted as an RFC3339 date value.
format: date
example: 2020-12-20
postcodeObj:
required:
- boundingPoints
- countryCode
- countryName
- elevation
- grid
- latitude
- longitude
- postcode
- timezone
type: object
properties:
postcode:
$ref: "#/components/schemas/postcode"
latitude:
$ref: "#/components/schemas/latitude"
longitude:
$ref: "#/components/schemas/longitude"
timezone:
$ref: "#/components/schemas/timezone"
countryCode:
$ref: "#/components/schemas/countryCode"
countryName:
$ref: "#/components/schemas/countryName"
subdivCode:
$ref: "#/components/schemas/subdivCode"
subdivName:
$ref: "#/components/schemas/subdivName"
boundingPoints:
$ref: "#/components/schemas/boundingPoints"
grid:
$ref: "#/components/schemas/grid"
elevation:
$ref: "#/components/schemas/elevation"
description: A postcode location metadata object
postcode:
type: string
description: A postcode string.
example: "22222"
dmaObj:
required:
- countryCode
- countryName
- dmaId
- dmaName
- grid
- population
- samplePoints
- timezone
type: object
properties:
dmaId:
$ref: "#/components/schemas/dmaId"
dmaName:
$ref: "#/components/schemas/dmaName"
timezone:
$ref: "#/components/schemas/timezone"
population:
$ref: "#/components/schemas/population"
countryCode:
$ref: "#/components/schemas/countryCode"
countryName:
$ref: "#/components/schemas/countryName"
samplePoints:
$ref: "#/components/schemas/samplePoints"
grid:
$ref: "#/components/schemas/grid"
description: A Designated Market Area location metadata object
dmaId:
type: integer
description: "A [Designated Market Area ID](https://developer.weathersourceapis.com/apis/supported-dmas/)."
example: 529
dmaName:
type: string
description: A Designated Market Area name.
example: Louisville
population:
type: integer
description: The population as represented in the 2010 census.
example: 1584746
samplePoints:
type: array
description: A list of OnPoint™ points used for interpolation for the Designated Market Area. These points are the OnPoint™ ID closest to the centroid of the 10 most populous postcodes within the target DMA.
items:
required:
- distance
- elevation
- grid
- latitude
- longitude
- onpointId
type: object
properties:
onpointId:
$ref: "#/components/schemas/onpointId"
latitude:
$ref: "#/components/schemas/latitude"
longitude:
$ref: "#/components/schemas/longitude"
grid:
$ref: "#/components/schemas/grid"
distance:
$ref: "#/components/schemas/distancePop"
elevation:
$ref: "#/components/schemas/elevation"
distancePop:
type: integer
description: The difference in population for the whole Designated Market Area and the population for the postcode represented by this sample point.
example: 1536552
onpointObj:
required:
- elevation
- grid
- latitude
- longitude
- onpointId
- timezone
type: object
properties:
onpointId:
$ref: "#/components/schemas/onpointId"
latitude:
$ref: "#/components/schemas/latitude"
longitude:
$ref: "#/components/schemas/longitude"
timezone:
$ref: "#/components/schemas/timezone"
countryCode:
$ref: "#/components/schemas/countryCode"
countryName:
$ref: "#/components/schemas/countryName"
subdivCode:
$ref: "#/components/schemas/subdivCode"
subdivName:
$ref: "#/components/schemas/subdivName"
grid:
$ref: "#/components/schemas/grid"
elevation:
$ref: "#/components/schemas/elevation"
description: An OnPoint™ point location metadata object
fields:
type: object
additionalProperties:
type: string
description: Unit value for field identified in the related key.
example: Fahrenheit
date:
type: string
description: A date formatted as an RFC3339 date value.
format: date
example: 2020-12-20
timestamp:
type: string
description: A timestamp formatted as an RFC3339 date-time value.
format: date-time
example: 2020-12-20T23:00:00-05:00
responses:
errorResponse:
description: Unexpected error response
content:
application/json:
schema:
$ref: "#/components/schemas/errorObj"
parameters:
fieldsDay:
name: fields
in: query
description: |
A comma separated list of field names to return. The date field is always returned.
**Limiting the query to needed fields will improve the query response time.**
In addition to individual field names, the following convenience field groups are supported:
* all *(all fields)*
required: true
schema:
type: array
example:
- all
items:
type: string
enum:
- date
- timestampInit
- tempCooler
- tempNormal
- tempWarmer
- rainLight
- rainMeaningful
- snowfallLight
- snowfallMeaningful
- windMeaningful
- all
latitude:
name: latitude
in: path
description: A latitude value between -90° and 90°.
required: true
schema:
maximum: 90
minimum: -90
type: number
format: float
example: 38.8552
longitude:
name: longitude
in: path
description: A longitude value between -180° (West) and 180° (East).
required: true
schema:
maximum: 180
minimum: -180
type: number
format: float
example: -77.0513
unitScale:
name: unitScale
in: query
description: The unit scale for returned values.
required: false
schema:
type: string
example: IMPERIAL
enum:
- IMPERIAL
- METRIC
- SI
default: IMPERIAL
postcode:
name: postcode
in: path
description: A postcode string.
required: true
schema:
type: string
example: "22222"
countryCode:
name: countryCode
in: path
description: "An uppercase 2-character [ISO 3166-1 Alpha-2 country code](https://developer.weathersourceapis.com/apis/countries-with-postal-code-support/)."
required: true
schema:
pattern: "^([A-Z]){2}$"
type: string
example: US
dmaId:
name: dmaId
in: path
description: "A [Designated Market Area ID](https://developer.weathersourceapis.com/apis/supported-dmas/)."
required: true
schema:
type: integer
example: 529
onpointId:
name: onpointId
in: path
description: An OnPoint™ ID.
required: true
schema:
type: integer
example: 10725864
securitySchemes:
ApiKeyAuth:
type: apiKey
description: |
API key to authorize requests. If you do not have a Weather Source API key [sign up for a free developer account](https://developer.weathersourceapis.com/account/sign-up/) to trial the data, or contact sales at [weathersource@pelmorex.com](mailto:weathersource@pelmorex.com) to explore the right subscription package for your business. You may use the evaluation API Key `C0W60UOFRML47ytbXk4xlLBfv` to access example locations found in this documentation.
name: X-API-KEY
in: header