Lookup collection contents
Retrieve the rows of a collection.
Without query parameters, this request returns the whole collection as JSON Lines: each line of the response is one row, as a JSON object. Use keys to read specific rows from a collection with a key field, or limit and cursor to page through the collection. Both return a JSON object with a rows array instead.
- Type: integercollection
_id requiredThe identifier for a collection.
- Type: array string[] …1000keys
The keys of the rows you want, separated by commas. The collection needs a key field. Customer.io returns rows in the order of your keys, and leaves out keys that don't match a row.
- Type: integerlimitmin:1max:1000
The number of rows to return in a page.
- Type: stringcursor
The
next_cursorfrom the previous page. Leave it out to get the first page. Rows you change while you page show up in later pages. If a write rebuilds the collection while you page, like a largereplace, the cursor expires and you need to start over.
- application/json
- 404
The collection
iddoes not exist. - 409
A write rebuilt the collection since you read the
cursor. Start again without one. - application/json
curl https://api.customer.io/v1/collections/1/content \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{"sku":"A-100","price":19}
{"sku":"A-101","price":24}
{"sku":"A-102","price":12}
Returns your collection's rows.