You are here:

Response Formats

Given the ubiquitous support for JSON both on the client and the server, it is our sole data format for transmission over the wire.

Make sure the Content-Type header is set appropriately e.g. “application/json” for JSON.

We also use our internal lookup values for both input and output messages where they relate to controlled fields. This allows us to change the text of these values yet ensure that the integer constants always remain unchanged.

Tradevine uses 64-bit integers for its ID fields. If consuming the API in the browser or a Javascript based application, these don't tranform properly to Javascript number types (as JS numbers are limited to 53 bits). In these cases, we recommend you send either an HTTP header or query-string value of int64AsString (with any value e.g. int64AsString=true) on your requests. This will cause our API to return all IDs fields to you as strings which will preserve their accuracy for use in Javascript.