• Home

  • Engineering

  • Engineering insights

Engineering insights

1 min read

API Quirks: Unleashed Software

By Bryan Helmig · November 25, 2012
A yellow rectangle with dotted lines running through it.

I won't rag on Unleashed too much as their API is in beta, but there are a few problems that exhausted a lot of my time that I thought I'd cover in a quick post. If you'd like the quick version of my advice:

Don't use their JSON API yet (11/25/2012), suck it up and do XML.

First of all, you'll need to generate your own UUID's. This isn't particularly hard (we use Python's import uuid library), but did throw me for a loop at first. Also, the guid's you generate need to be put in both the URL and the XML you POST.

Next, the JSON formatting of dates is very bizarre (at least at the time of writing). They opt for \/Date(1331550000000)\/ which I assume is milliseconds from epoch? Further, their JSON API doesn't serialize errors very well (read: at all). You'll see a lot of 403: Bad Request with no further details provided. However, their XML API does just fine! So, don't use JSON.

Next, some keys they say are required, aren't (and some they say aren't required, are). The best way around that is to do a few sample POSTs with more or less empty XML. Then you can start adding elements as they return missing key errors. (Be sure to use XML, not JSON!)

Finally, they also let you define related sub elements by various identifiers. For example, you don't need to include the guid of a product: you can alternatively include the code or name instead.

About the "API Quirks" Blog Series

Everyone at Zapier has to deal with API Quirks. We deal with so many APIs each day, we have become almost immune to the often bizarre, undocumented, frustrating behavior exhibited by web APIs. No API or documentation is static. Take any quirks published before "today" with a grain of salt.

Don't want to worry about this? Connect to Unleashed with Zapier

Get productivity tips delivered straight to your inbox

We’ll email you 1-3 times per week—and never share your information.

Related articles

Improve your productivity automatically. Use Zapier to get your apps working together.

Sign up
See how Zapier works
A Zap with the trigger 'When I get a new lead from Facebook,' and the action 'Notify my team in Slack'