v1

latestOpenAPI 3.0.12026-07-245277551.2 MB
Stock reports

Get stock reports based on search results

Get stock reports filtered by different search criteria

Notes:

  • Rows are returned if title contains values (case-insensitive comparison)
  • The API returns 200 even if no results are found.
get/datainsights/v1.1/stock_reports/search

Query parameters

offsetinteger

The difference between start of the data and the start of the response data

limitinteger
Example:5

The maximum number of results in the response

sort'id,asc' | 'id,desc' | 'title,asc' | 'title,desc' | 'description,asc' | 'description,desc' | 'dataset_id,asc' | 'dataset_id,desc' | 'updated_at,asc' | 'updated_at,desc'

Sort stock_reports

idsinteger[]

Filter by Report IDs

titlestring
Example:Stock Report Title

Filter by Stock Report title

descriptionstring nullable
Example:Report description

Filter by Report description

dataset_idsinteger[]

Dataset IDs

include_cloudbedsboolean

Flag to determine if response should include all cloudbeds reports, regardless of property access. Restricted by permission. Bad request exception if used with property_country_only.

property_country_onlyboolean

Flag to determine if response should only include stock reports that are specified to the property country, stock reports without a designated country will not be included. Bad request exception if used with include_cloudbeds.

folder_idsinteger[]

Filter by Folder IDs

search_termstring
Example:in-house

A text string to search for in any of the search column fields

search_columnsstring[]
publishedboolean nullable

Filter by published status

Headers

X-PROPERTY-IDinteger required

Property id of the client

Response

OK

offsetinteger

The difference between start of the data and the start of the response data

limitinteger

The maximum number of results in the response

totalinteger

The total number of records

Example response

{
  "limit": 5,
  "total": 42,
  "stock_reports": [
    {
      "title": "Report title",
      "description": "Report description",
      "dataset_id": 1,
      "rules": {
        "feature_ids": [
          "1"
        ],
        "country_codes": [
          "US"
        ]
      },
      "published": true,
      "custom_cdfs": [
        {
          "column": "full_address",
          "name": "Full address",
          "description": "CDF with the full address information",
          "kind": "String",
          "format": "currency"
        }
      ]
    }
  ]
}