401? 402? What does that mean?
QuestionLast Updated: Aug 12, 2013
I'm getting an HTTP status code when I try to use the API. What does it mean?
Whether you're using LiveAddress API, or the ZIP Code API, there are a few standard response messages that you might see. Here's a quick chart to explain:
|200||Success. See response body for result payload. Now what?|
|400||Bad input. Required fields missing from input or are malformed. Now what?|
|401||Unauthorized. Authentication failure; invalid credentials. Now what?|
|402||Payment required. No active subscription found. Now what?|
|500||Internal server error. General service failure; retry request. Now what?|
What do I do now?
Most API requests will return a 200 response. This means that everything went through just fine, and you should see your results as expected. Nothing here to worry about. Hooray!
Make sure your request has all the information we need to process it and is formatted correctly. For example, if you
submit this request with the field "street" misspelled:
you would get a 400 response because our system doesn't know how to process a field called "stret."
A 401 response is most often caused by a domain mismatch. Make sure that the domain you're sending the request from matches exactly the host you have registered with us on your account. Go to the API Keys page on your account to manage your hosts and keys.
target.com is different than
checkout.target.com as well as
You can add multiple domains to each auth token by clicking the blue "add host" link for that token. Notice in the
picture above that both
checkout.target.com are linked to the same auth
If your subscription has expired, or if you've used up all the lookups on your account, you'll get a 402 response. Go to your account page to purchase more lookups, then try your request again.
Whoops! Something went wrong with the server. Submit your request again and it should go through just fine. (If it doesn't, give us a call and we'll figure it out for you.)