Skip to main content

Passing Arguments

A key part of using the API is sending data to the requests that you wish to make. Each endpoint implements arguments which are outlined in this documentation. This page explains how you should submit data for these arguments with your requests. How you pass arguments will depend on the request method.

GET requests

When you wish to provide arguments to a GET request, you should do so by providing them as query string parameters. For example:

https://.../path?name=Joe+Bloggs&organization[id]=org_abcdef123
  • All values should be URL encoded as appropriate
  • If you wish to provide nested arguments, you should use square bracket notation (as shown above)
  • All values provided through the query string are strings but the API will attempt to coerce them to the appropriate type based on the argument you are sending. For example, if the argument is an Decimal a string value of "12.34" can be accepted.

POST PATCH PUT DELETE requests

Arguments for these types of requests must be provided as JSON in the body of the request. For example:

{
"name": "Joe Bloggs",
"age": 38,
"enabled": true,
"organization": {
"id": "org_abcdef123"
}
}

You must send a Content-Type header with the value of application/json if you are providing a JSON-encoded body.