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. If a collection is too large to return whole, Customer.io responds with a 400, and you need to page through it instead. 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. One read can return up to 16 MB of rows.
- Type: integerlimitmin:1max:1000
The number of rows to return in a page. A page holds up to 4 MB of rows, so it can have fewer rows than your
limit. - 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 you replace the collection's rows while you page, the cursor can expire, and you need to start over.
- application/json
- 400
The collection is too large to return whole. Use
limitandcursorto read it a page at a time. - 404
The collection
iddoes not exist. - 409
The collection's rows were replaced 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.