# Rebuy

> Read recommendations, trending products and customer product history from Rebuy.

App · 9 actions. Web page: https://docs.lodol.com/docs/integrations/rebuy

## Actions

### List collection products

Find products in selected Shopify collections.

**Inputs**

- Collection Ids (`collection_ids`, list, required): Shopify collection IDs to look up.
- Excluded Product Ids (`excluded_product_ids`, list): Shopify product IDs to omit.
- Smart Sort (`smart_sort`, text): How to order the products. One of: `yes`, `top_sellers` (Top sellers).
- Limit (`limit`, number): The maximum number of products to return. At least 1.

**Outputs**

- `data` (object): The response from Rebuy.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "handle": "example",
        "id": 1,
        "product_type": "example",
        "title": "example",
        "variants": [
          {}
        ],
        "vendor": "example"
      }
    ],
    "metadata": {}
  }
}
```

### List previously purchased products

Find items a customer has previously ordered.

**Inputs**

- Customer Id (`customer_id`, text, required): A Shopify customer ID.
- Limit (`limit`, number): The maximum number of products to return. At least 1.

**Outputs**

- `data` (object): The response from Rebuy.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "handle": "example",
        "id": 1,
        "product_type": "example",
        "title": "example",
        "variants": [
          {}
        ],
        "vendor": "example"
      }
    ],
    "metadata": {}
  }
}
```

### List product recommendations

Find products Rebuy recommends for the store.

**Inputs**

- Excluded Product Ids (`excluded_product_ids`, list): Shopify product IDs to omit.
- Limit (`limit`, number): The maximum number of products to return. At least 1.

**Outputs**

- `data` (object): The response from Rebuy.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "handle": "example",
        "id": 1,
        "product_type": "example",
        "title": "example",
        "variants": [
          {}
        ],
        "vendor": "example"
      }
    ],
    "metadata": {}
  }
}
```

### List recently viewed products

Find products a customer recently viewed.

**Inputs**

- Customer Id (`customer_id`, text, required): A Shopify customer ID.
- Limit (`limit`, number): The maximum number of products to return. At least 1.

**Outputs**

- `data` (object): The response from Rebuy.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "handle": "example",
        "id": 1,
        "product_type": "example",
        "title": "example",
        "variants": [
          {}
        ],
        "vendor": "example"
      }
    ],
    "metadata": {}
  }
}
```

### List recommendations from views

Find products related to items a customer viewed.

**Inputs**

- Customer Id (`customer_id`, text, required): A Shopify customer ID.
- Limit (`limit`, number): The maximum number of products to return. At least 1.

**Outputs**

- `data` (object): The response from Rebuy.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "handle": "example",
        "id": 1,
        "product_type": "example",
        "title": "example",
        "variants": [
          {}
        ],
        "vendor": "example"
      }
    ],
    "metadata": {}
  }
}
```

### List selected products

Look up specified products by Shopify IDs or handles.

**Inputs**

- Product Id (`product_id`, text): One Shopify product ID.
- Product Ids (`product_ids`, list): Shopify product IDs to look up.
- Handles (`handles`, list): Shopify product handles to look up.
- Limit (`limit`, number): The maximum number of products to return. At least 1.

**Outputs**

- `data` (object): The response from Rebuy.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "handle": "example",
        "id": 1,
        "product_type": "example",
        "title": "example",
        "variants": [
          {}
        ],
        "vendor": "example"
      }
    ],
    "metadata": {}
  }
}
```

### List similar products

Find similar items for a Shopify product.

**Inputs**

- Product Id (`product_id`, text, required): A Shopify product ID.
- Limit (`limit`, number): The maximum number of products to return. At least 1.

**Outputs**

- `data` (object): The response from Rebuy.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "handle": "example",
        "id": 1,
        "product_type": "example",
        "title": "example",
        "variants": [
          {}
        ],
        "vendor": "example"
      }
    ],
    "metadata": {}
  }
}
```

### List top sellers

Find the store’s best-selling products.

**Inputs**

- Excluded Product Ids (`excluded_product_ids`, list): Shopify product IDs to omit.
- Limit (`limit`, number): The maximum number of products to return. At least 1.

**Outputs**

- `data` (object): The response from Rebuy.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "handle": "example",
        "id": 1,
        "product_type": "example",
        "title": "example",
        "variants": [
          {}
        ],
        "vendor": "example"
      }
    ],
    "metadata": {}
  }
}
```

### List trending products

Find products currently trending in the store.

**Inputs**

- Excluded Product Ids (`excluded_product_ids`, list): Shopify product IDs to omit.
- Limit (`limit`, number): The maximum number of products to return. At least 1.

**Outputs**

- `data` (object): The response from Rebuy.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "handle": "example",
        "id": 1,
        "product_type": "example",
        "title": "example",
        "variants": [
          {}
        ],
        "vendor": "example"
      }
    ],
    "metadata": {}
  }
}
```
