Query Parameters

Query parameters define how to filter, sort, and modify the data returned in the query results from GET endpoints. Query parameters are specific to each endpoint and they are listed in the Request section of the API reference documentation under Query Parameters.

Query Parameters in API Reference Documentation

Query Parameters in API Reference Documentation

Query parameters are added to the end of a URI as a name-value pair after a question mark (?). The query parameter and value are separated by an equal sign (=). Multiple query parameters are separated by an ampersand (&) between each name-value pair.

For example, the following call to the orders endpoint URI includes two query parameters to return entities with a status of Draft and an order type of Sales:

GET {base-url}/billing/2/orders?status=DRAFT&order_type=sales

Some endpoints require at one or more query parameters to execute the request successfully. Required query parameters are indicated with * next to the name.

Common Query Parameters

The following query parameters are commonly available for GET endpoints:

Common Query Parameters
Name Description Data Type Notes

filter

Filter query results by specifying a query parameter and value using the Gotransverse API Query Language.

string

Refer to Filter Query Parameter.

sort

Sort query results in ascending or descending order using the available sortable query parameters for the endpoint.

string

Default is to sort results by the ID in ascending order.

Refer to Sort Query Parameter.

expand

Specifies which entities should be expanded in the API response using the expandable query parameters for the endpoint.

array [string]

 

return

Specify if the API response returns all expandable entities as expanded or not expanded.

  • FULL — Expandable entities are returned expanded.

  • SIMPLE — Expandable entities are not returned expanded.

string

Default value is FULL.

page_size

Specify a limit to the number of records returned in the API response body.

integer

Refer to Pagination Query Parameters.

page_number

Specify which set of records to return when the number of records exceeds the value defined by the page_size query parameter.

integer

Default value is 1.

Refer to Pagination Query Parameters.

omit_total_count

Specify if the total number of results are returned in the API response header. Available values are:

  • TRUEX-total-count and X-total-pages are not returned in the response header. This may improve the response time when querying large data sets.

  • FALSEX-total-count and X-total-pages are returned in the response header.

boolean

Default value is FALSE.

Refer to Pagination Query Parameters.

Refer to the following topics for more information:

 

 

 

Topic Updated: 10/2024.