Skip to content

API Documentation: Objects: Collect

kpthill edited this page Apr 10, 2013 · 5 revisions

Go back to read introductory information and usage guidelines about the API.

Object name

collect

Associated Capabilities

read_products

Object Description

A Collect is a product-collection pair. It indicates that a certain product is in a collection. It might be used, for example, to get the date when a product was added to a collection, although this functionality is not supported by Lexity at the moment.

The Lexity implementation of this API is intended to be familiar to Shopify developers, and so the fields that a collect may contain are the same as those currently offered by the Shopify API. Because we do not store all of the data that Shopify does, some of these fields may be null. The provided fields are:

Field Description Notes
collection_id A string holding the platform-specific unique collection id.
created_at Always null. Not yet supported.
featured Always null. Not yet supported.
id Always null. Not yet supported.
position Always null. Not yet supported.
product_id A string holding the platform-specific product id.
sort_value Always null. Not yet supported.
updated_at Always null. Not yet supported.

Support for these fields may vary among the different platforms we support.

Query Parameters Available for this Object:

Field Description Notes
limit Limit of number of objects in the response. Defaults to 50, maximum allowed value is 250.
page For paginated responses, the page to show. Defaults to 1.
fields Comma-separated string with the fields to be returned in the response body. Returns all fields by default.

Available API Interactions

Get all collects

Request

GET {base_url}/collects.json

Request data

(empty)

Example response

HTTP/1.1 200 OK

{
    "collects": [{
        "product_id": "11969262",
        "updated_at": null,
        "featured": null,
        "sort_value": null,
        "position": null,
        "id": "1602302",
        "collection_id": "1602302",
        "created_at": null
    }, {
        "product_id": "11969252",
        "updated_at": null,
        "featured": null,
        "sort_value": null,
        "position": null,
        "id": "1602302",
        "collection_id": "1602302",
        "created_at": null
    }, {
        "product_id": "11968932",
        "updated_at": null,
        "featured": null,
        "sort_value": null,
        "position": null,
        "id": "1602302",
        "collection_id": "1602302",
        "created_at": null
    }, {
        "product_id": "11968602",
        "updated_at": null,
        "featured": null,
        "sort_value": null,
        "position": null,
        "id": "1602302",
        "collection_id": "1602302",
        "created_at": null
    }, {
        "product_id": "11968642",
        "updated_at": null,
        "featured": null,
        "sort_value": null,
        "position": null,
        "id": "1602302",
        "collection_id": "1602302",
        "created_at": null
    }]
}

Count collects

Request

GET {base_url}/collects/count.json

Request data

(empty)

Example response

HTTP/1.1 200 OK

{
  "count": 5
}