There are 3 main categories of parameters for each endpoint in the Officient API: path, query string and request body. The API Reference includes a list of all available parameters for each possible request, but these sections offer an overview of the 3 main categories.
In an API URL, we include resource names and unique identifiers to help you figure out how to structure your requests. Resource names are immutable, but resource identifiers are required, so you need to replace them with real values from your Officient account. Let’s look at an example:
In that URL, there is 1 path parameters that you need to replace with real values from your Officient account: person_id. When you replace those values with actual data, your final URL should look something like this:
We use query string parameters for pagination in the Officient API. The format for query string parameters is the full resource URL followed by a question mark, and the optional parameters:
Paginate your API requests to limit response results and make them easier to work with.
Page defaults to 0, so if you use page=1, you’ll get the second page in the dataset.
For PATCH, PUT, and POST requests, you may need to include a request body in JSON format. The API Reference shows you all the available request parameters for each endpoint, including required fields. The following example shows you the JSON data required to create a new person in Officient.
"name": "John Malkovich",
"email": "[email protected]"
The Officient API only supports JSON. So instead of XML, HTTP POST parameters, or other serialization formats, most POST and PATCH requests require a valid JSON object for the body.
Updated about 5 years ago