{"_id":"59778bba32f043002002f5e4","category":{"_id":"59778bb932f043002002f5d4","version":"59778bb932f043002002f5d3","project":"5425e663ffd4411c319a65b4","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-09-26T23:22:58.179Z","from_sync":false,"order":0,"slug":"getting-started","title":"Getting Started"},"project":"5425e663ffd4411c319a65b4","user":"5425e31affd4411c319a65b1","version":{"_id":"59778bb932f043002002f5d3","project":"5425e663ffd4411c319a65b4","__v":1,"createdAt":"2017-07-25T18:19:37.272Z","releaseDate":"2017-07-25T18:19:37.272Z","categories":["59778bb932f043002002f5d4","59778bb932f043002002f5d5"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.5.0","version":"2.5"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-09-29T18:52:14.976Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"never","params":[],"url":""},"isReference":false,"order":3,"body":"The API has been designed with standards at its core. The following promises are kept throughout all endpoints:\n\n* With very few exceptions, numbers are numbers, and not strings. The API adheres strictly to the most natural representation of the underlying data, and ```null``` is always returned for optional properties which have not yet been assigned a value.\n* Geographic coordinates are formatted as ```[ longitude, latitude ]```, as per the [GeoJSON](http://geojson.org/) standard.\n* Timestamps are consumed and produced in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) format, with millisecond precision. You can get a sample timestamp in this format on a \\*nix machine by running the following command.\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ echo $(($(date +'%s * 1000 + %-N / 1000000')))\\n1455054888000\",\n      \"language\": \"shell\",\n      \"name\": null\n    }\n  ]\n}\n[/block]\n* Most endpoints return the requested target resource, however, there are some exceptions, such as deleting a resource, which will simply respond with a ```200``` and no body. To the extent possible, the API is both resource-driven and oriented.\n* The API uses 24-character long encoded IDs which may contain URL-safe, non-alphanumeric characters, as in this sample Onfleet resource ID ```cBrUjKvQQgdRp~s1qvQNLpK*```.\n* Phone numbers will always be returned in [E.164 format](https://en.wikipedia.org/wiki/E.164), however, they may be provided in E.164 or a localized format that is valid based on your organization's `country` configuration. If you wish to provide numbers from countries other than your organization's, you must use E.164 only. We strongly recommend the use of libraries like [libphonenumber](https://github.com/googlei18n/libphonenumber) for managing phone number validation and formatting.","excerpt":"","slug":"data-types-and-response-formats","type":"basic","title":"Data Types and Response Formats"}

Data Types and Response Formats


The API has been designed with standards at its core. The following promises are kept throughout all endpoints: * With very few exceptions, numbers are numbers, and not strings. The API adheres strictly to the most natural representation of the underlying data, and ```null``` is always returned for optional properties which have not yet been assigned a value. * Geographic coordinates are formatted as ```[ longitude, latitude ]```, as per the [GeoJSON](http://geojson.org/) standard. * Timestamps are consumed and produced in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) format, with millisecond precision. You can get a sample timestamp in this format on a \*nix machine by running the following command. [block:code] { "codes": [ { "code": "$ echo $(($(date +'%s * 1000 + %-N / 1000000')))\n1455054888000", "language": "shell", "name": null } ] } [/block] * Most endpoints return the requested target resource, however, there are some exceptions, such as deleting a resource, which will simply respond with a ```200``` and no body. To the extent possible, the API is both resource-driven and oriented. * The API uses 24-character long encoded IDs which may contain URL-safe, non-alphanumeric characters, as in this sample Onfleet resource ID ```cBrUjKvQQgdRp~s1qvQNLpK*```. * Phone numbers will always be returned in [E.164 format](https://en.wikipedia.org/wiki/E.164), however, they may be provided in E.164 or a localized format that is valid based on your organization's `country` configuration. If you wish to provide numbers from countries other than your organization's, you must use E.164 only. We strongly recommend the use of libraries like [libphonenumber](https://github.com/googlei18n/libphonenumber) for managing phone number validation and formatting.