Skip to content

Collections

GEThttps://rebuyengine.com/api/v1/products/collections

Use Cases

Use this endpoint to offer recommendations and cross-sell opportunities from a specific collection such as sale items, high inventory items, etc.

Query Parameters

shopify_collection_ids · string
Comma separated list of Shopify Collection IDs.
shopify_product_ids · string
Comma separated list of Shopify product IDs to filter from the result set.
smart_sort · string
Valid values: yes, top_sellers. Sorts the returned products based on likelihood to convert / based on highest top-selling product to lowest top-selling product.
metafields · string
Valid values: yes. Returns product objects enriched with a metafields property.
format · string
Valid values: pretty. Use pretty to make the response easy to read.
limit · string · Default: 5
Used to limit the number of returned results.
filter_oos · string · Default: yes
Excludes products that are out of stock (OOS) from the response. To include OOS products, set the parameter to no.

Code Example

// GET https://rebuyengine.com/api/v1/products/collections
const params = new URLSearchParams({
  shopify_collection_ids: "YOUR_VALUE",
  shopify_product_ids: "YOUR_VALUE"
});

fetch(`https://rebuyengine.com/api/v1/products/collections?${params}`)
  .then(response => response.json())
  .then(data => console.log(data));

Response Examples

200 - 200

{
  "data": [
    {
      "id": 562407407652,
      "title": "100 Cotton T",
      "body_html": "100 Cotton T. Now dats wassup.",
      "vendor": "Example Brand",
      "product_type": "",
      "created_at": "2018-03-20T14:17:32-04:00",
      "handle": "hanes-100-cotton-t-shirt",
      "updated_at": "2021-01-06T10:51:08-05:00",
      "published_at": "2019-06-13T15:11:18-04:00",
      "template_suffix": "",
      "published_scope": "global",
      "tags": "clothing",
      "admin_graphql_api_id": "gid://shopify/Product/562407407652",
      "variants": [
        {
          "id": 7162542751780,
          "product_id": 562407407652,
          "title": "White",
          "price": "12.00",
          "sku": "H100CTS-1",
          "position": 1,
          "inventory_policy": "deny",
          "compare_at_price": null,
          "fulfillment_service": "manual",
          "inventory_management": "shopify",
          "option1": "White",
          "option2": null,
          "option3": null,
          "created_at": "2018-03-20T14:17:33-04:00",
          "updated_at": "2020-11-16T16:55:57-05:00",
          "taxable": true,
          "barcode": "",
          "grams": 0,
          "image_id": 2155963711524,
          "weight": 0,
          "weight_unit": "lb",
          "inventory_item_id": 7159766548516,
          "inventory_quantity": -31,
          "old_inventory_quantity": -31,
          "requires_shipping": true,
          "admin_graphql_api_id": "gid://shopify/ProductVariant/7162542751780"
        }
      ],
      "options": [
        {
          "id": 833049690148,
          "product_id": 562407407652,
          "name": "Color",
          "position": 1,
          "values": [
            "White"
          ]
        }
      ],
      "images": [
        {
          "id": 2155963711524,
          "product_id": 562407407652,
          "position": 1,
          "created_at": "2018-03-20T14:17:36-04:00",
          "updated_at": "2019-11-15T23:59:46-05:00",
          "alt": null,
          "width": 1528,
          "height": 1528,
          "src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_100__Cotton_T-shirt-white-A.png?v=1573880386",
          "variant_ids": [
            7162542751780
          ],
          "admin_graphql_api_id": "gid://shopify/ProductImage/2155963711524"
        },
        {
          "id": 2155963744292,
          "product_id": 562407407652,
          "position": 2,
          "created_at": "2018-03-20T14:17:38-04:00",
          "updated_at": "2019-11-15T23:59:46-05:00",
          "alt": null,
          "width": 1528,
          "height": 1528,
          "src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_100__Cotton_T-shirt-white-B.png?v=1573880386",
          "variant_ids": [],
          "admin_graphql_api_id": "gid://shopify/ProductImage/2155963744292"
        },
        {
          "id": 2155964530724,
          "product_id": 562407407652,
          "position": 3,
          "created_at": "2018-03-20T14:17:46-04:00",
          "updated_at": "2019-11-15T23:59:46-05:00",
          "alt": null,
          "width": 1528,
          "height": 1528,
          "src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_100__Cotton_T-shirt-yellow-A.png?v=1573880386",
          "variant_ids": [],
          "admin_graphql_api_id": "gid://shopify/ProductImage/2155964530724"
        },
        {
          "id": 2155964629028,
          "product_id": 562407407652,
          "position": 4,
          "created_at": "2018-03-20T14:17:48-04:00",
          "updated_at": "2019-11-15T23:59:46-05:00",
          "alt": null,
          "width": 1528,
          "height": 1528,
          "src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_100__Cotton_T-shirt-yellow-B.png?v=1573880386",
          "variant_ids": [],
          "admin_graphql_api_id": "gid://shopify/ProductImage/2155964629028"
        }
      ],
      "image": {
        "id": 2155963711524,
        "product_id": 562407407652,
        "position": 1,
        "created_at": "2018-03-20T14:17:36-04:00",
        "updated_at": "2019-11-15T23:59:46-05:00",
        "alt": null,
        "width": 1528,
        "height": 1528,
        "src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_100__Cotton_T-shirt-white-A.png?v=1573880386",
        "variant_ids": [
          7162542751780
        ],
        "admin_graphql_api_id": "gid://shopify/ProductImage/2155963711524"
      }
    }
  ]
}

400 - 400

{
  "error": "Missing required endpoint arg: shopify_customer_id"
}