Hello!

I am trying to retrieve a forecast by postal code, and I am getting an HTTP "204" - No Content when attempting to query for a postal code in Germany.

https://api.weatherbit.io/v2.0/forecast/daily?postal_code=53343&key=API_KEY

Any ideas? Thanks!

Stan

Category: API

Replies

John says:
October, Wednesday, 2019 at 12:02AM

Hello Stan,

This can happen when there are many countries with the same postal code. In this case, the API cannot determine which you are interested in, so a "204" No Content response is returned.

You can fix this by specifying the country in your request:

ie.
https://api.weatherbit.io/v2.0/forecast/daily?postal_code=53343&country=DE&key=API_KEY

Which will return data for the postal code you are interested in.

Thanks for using our API,

John at Weatherbit

Leave A Reply

What is two plus 0?