Jump to content

Are Blank Values Disregarded With The Api?


gutterboy

Recommended Posts

I'm just wondering when you're using the API and you're creating a client for example....... according to the docs, if you pass in a state you must also pass in a country.

 

So if I passed in for example a blank state, would it still require the country or is it treated the same as not passing in anything for the state?

 

Thanks!

Link to comment
Share on other sites

I'm just wondering when you're using the API and you're creating a client for example....... according to the docs, if you pass in a state you must also pass in a country.

 

So if I passed in for example a blank state, would it still require the country or is it treated the same as not passing in anything for the state?

 

Thanks!

 

country is a required field, so passing state empty or not , will return a error as country is not set .

Link to comment
Share on other sites

- state The 3-character ISO 3166-2 subdivision code, requires country (optional)
- country The 3-character ISO 3166-1 country code, required if state is given (optional) 

Looks like you already figured it out, but it should be noted that fields that mention dependency on another if 'given' refer to even passing in the field, regardless of its value.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...