# List Campaigns

Get a list of campaigns. The data fetched for each campaign depends on the values of query params. For example, if you use query parameter full all properties are fetched.

Endpoint: GET /campaigns
Version: 3.0.1807
Security: Auth0

## Query parameters:

  - `page_limit` (integer)
    Number of elements in the collection to retrieve
    Example: 100

  - `page_offset` (integer)
    Index of the first element in the collection to retrieve

  - `sort_by` (string)
    The field to sort by. You can use any field name in ascending or descending order.
For ascending order, use the field name directly, e.g., id. 
For descending order, prefix the field name with a hyphen (-), e.g., -id.
    Example: "id, -id, name, -name"

  - `q` (string)
    Query search for filtering. This parameter can be used to filter results based on various fields.
Supported operators:
- == - numeric equality or case-sensitive string identity, 
- ==(1,2,3) - IN query (only works for integers),
- != - numeric inequality or case-sensitive string non-identity,
- =: - case-insensitive match, allows substring using * wildcards,
- ` - greater than,
- >= - greater than or equal to.
Examples: 
- q=name=:{search}* to find all results with names starting with {search}.
- q=status==true to find all active entities.
- q=id>=1000 to find all entities with id greater than or equal to 1000.
- q=id==(1,2,3) to find specific entities by ID.
- q=created_on>1999-02-02 or q=created_on>1999-02-02T00:00:00Z to find entities created later than date.
- q=id>5&status==true` to find all active entities with id greater than 5.

  - `full` (string)
    To return all fields, set the value to . For example, full= will include all properties.
    Example: "*"

  - `with` (string)
    Get related property in response, values can be combined via , (example: agency,advertiser)
    Enum: "advertiser", "agency"

  - `live_only` (boolean)
    If provided and true only campaigns with start_date  now will be returned. 
Default value is false. Cannot be combined with filter_expired=true.

  - `filter_expired` (boolean)
    If provided and true only campaigns with end_date > now will be returned. 
Default value is false. Cannot be combined with live_only=true.

## Response 400 fields (application/json):

  - `errors` (array, required)

  - `errors.code` (string)

  - `errors.field` (string)
    Optional when it is a schema error

  - `errors.message` (string)

  - `meta` (object, required)

  - `meta.status` (string, required)

## Response 401 fields (application/json):

  - `errors` (array, required)

  - `errors.code` (string)

  - `errors.field` (string)
    Optional when it is a schema error

  - `errors.message` (string)

  - `meta` (object, required)

  - `meta.status` (string, required)

## Response 403 fields (application/json):

  - `errors` (array, required)

  - `errors.code` (string)

  - `errors.field` (string)
    Optional when it is a schema error

  - `errors.message` (string)

  - `meta` (object, required)

  - `meta.status` (string, required)


