Conventions

Passing Parameters

URI-based

Resource identifiers are typically passed in the URI itself. For example, if you wanted to GET a resource with a particular ID, you would pass the ID as a parameter after the resource name:

https://api.zenginehq.com/v1/{resource}/{RESOURCE_ID}

Sub-resource paths are also built using one or more URI parameters:

https://api.zenginehq.com/v1/{resource}/{RESOURCE_ID}/{sub-resource}

Query String

Parameters are used in the query string for two primary reasons:

  1. Filter down the results retrieved by a GET request
  2. Format the data being received by any request

For more information on query string parameters, see Querying Options

POST, PUT

Parameters to save or update are sent in the body of POST or PUT requests, respectively. For more information, see Media Type Support.