BETA. Beta resources may undergo minor revisions and may not have the benefit of complete documentation.
Description
Returns the metadata for the postal code.
Our patented OnPoint™ system uniquely identifies metadata for every postal code location. This resource is available for U.S. and Canadian postal codes.
Requires a subscription plan with the “access_postal_codes” capability to access this resource.
This resource is available to free 30-day developer plans. For access to this resource for longer than 30 days, or for licensed use of the API in production environments, please email sales@weathersource.com or call (844) 813-2617.
Resource URL
https://api.weathersource.com/v1/{{api_key}}/postal_codes/{{postal_code}},{{country}}.{{format}}
Resource URL Replacement Parts
{{api_key}} | Your API Key. If you do not have an API key, you may sign up for a free developer account 30-day trial. |
---|---|
{{postal_code}} | A postal code value (e.g. 22222). Any spaces in the postal code must be URL encoded as %20. For example, the Canadian postal code "X0A 0K0" would be passed as X0A%200K0. More than 5.5 million postal codes are supported globally. |
{{country}} | A supported 2-character ISO 3166-1 Alpha-2 country code. Postal code support is available for 151 countries. |
{{format}} | The desired response format. Allowed formats are:
|
Parameters
fields optional |
Set response to a subset of fields within each element. Available field names: Field groups: Allowed Values: Comma separated list of field names Default Value: all |
---|
Resource Information
API Versions | v1 |
---|---|
Rate Limited? | Yes |
Requires Authentication? | Yes |
Response Formats | JSON JSONP CSV |
HTTP Method | GET |
Related Documentation
Example Request
GET https://api.weathersource.com/v1/{{api_key}}/postal_codes/22222,us.json?fields=all
{"postal_code":"22222","country":"US","latitude":"38.8552","longitude":"-77.0513","timezone":"America\/New_York","grid":"North America","bounding_points":[{"onpoint_id":10724391,"latitude":38.844078,"longitude":-77.032291,"distance":1.27940949706,"timezone":"America\/New_York"},{"onpoint_id":10724390,"latitude":38.849922,"longitude":-77.08867,"distance":2.04364956939,"timezone":"America\/New_York"},{"onpoint_id":10725864,"latitude":38.887981,"longitude":-77.024772,"distance":2.67709871127,"timezone":"America\/New_York"},{"onpoint_id":10725863,"latitude":38.893827,"longitude":-77.081174,"distance":3.11541006251,"timezone":"America\/New_York"}]}