# Yotpo

> Read and collect product reviews and questions, and sync orders, products and customers with Yotpo.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/yotpo

## Actions

### Add product to collection

Add a product to one of your Yotpo collections.

**Inputs**

- Collection (`collection_id`, text, required): The collection, by its Yotpo ID.
- Product (`product`, text, required): The product to add, by the ID your store gave it.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "collection_id": "example",
    "product": "example",
    "updated": true
  }
}
```

### Create collection

Create a product collection in your Yotpo catalog.

**Inputs**

- Collection ID (`external_id`, text, required): The collection's ID in your store. It must be new to Yotpo.
- Name (`name`, text, required): The collection's name.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "collection": {
      "yotpo_id": 1
    }
  }
}
```

### Create fulfillment

Record a shipment for an order. A fulfilled shipment lets Yotpo ask the customer for a review.

**Inputs**

- Order (`order_id`, text, required): The order, by its Yotpo ID.
- Fulfillment ID (`external_id`, text, required): The shipment's ID in your store. It must be new for this order.
- Fulfilled at (`fulfillment_date`, date and time, required): When the shipment was made.
- Status (`status`, text, required): The shipment's status. Choose Fulfilled for Yotpo to send a review request. One of: `pending`, `open`, `success` (Fulfilled (Yotpo can send a review request)), `cancelled`, `error`, `failure` (Failed).
- Products (`fulfilled_items`, list, required): The products shipped, each with how many.
- Shipment status (`shipment_status`, text): Where the shipment is now. One of: `label_printed` (Label printed), `label_purchased` (Label purchased), `attempted_delivery` (Attempted delivery), `ready_for_pickup` (Ready for pickup), `confirmed`, `in_transit` (In transit), `out_for_delivery` (Out for delivery), `delivered`, `failure` (Failed).
- Carrier (`tracking_company`, text): The carrier, such as UPS.
- Tracking number (`tracking_number`, text): The carrier's tracking number.
- Tracking page (`tracking_url`, text): The carrier's tracking page for the shipment.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "fulfillment": {
      "yotpo_id": 1
    }
  }
}
```

### Create or update customer

Add a customer to Yotpo, or update the one with the same store ID or email address. Yotpo can take a minute to show the change.

**Inputs**

- Email (`email`, text): The customer's email address. Give it, the customer's store ID, or both.
- Customer ID (`external_id`, text): The customer's ID in your store.
- First name (`first_name`, text): The customer's first name.
- Last name (`last_name`, text): The customer's last name.
- Phone (`phone_number`, text): The customer's phone number, such as +14155552671.
- Gender (`gender`, text): The customer's gender. One of: `F` (Female), `M` (Male), `Other`.
- Account created (`account_created_at`, date and time): When the customer opened their account in your store.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "email": "example",
    "external_id": "example",
    "updated": true
  }
}
```

### Create order

Send an order to Yotpo. Once it has a fulfilled shipment, Yotpo can ask the customer for a review.

**Inputs**

- Order ID (`external_id`, text, required): The order's ID in your store. It must be new to Yotpo.
- Placed at (`order_date`, date and time, required): When the order was placed. Yotpo sends no review requests for orders more than six months old.
- Customer email (`email`, text): The customer's email address, where review requests go.
- First name (`first_name`, text): The customer's first name.
- Last name (`last_name`, text): The customer's last name.
- Phone (`phone_number`, text): The customer's phone number, such as +14155552671.
- Customer ID (`customer_external_id`, text): The customer's ID in your store.
- Products (`line_items`, list, required): The products ordered, each with how many.
- Order name (`order_name`, text): The order's name shown to the customer, such as #1001.
- Total (`total_price`, number): The order total with discounts, shipping, taxes and tips. At least 0.
- Currency (`currency`, text): The order's three-letter currency code, such as USD.
- Payment status (`payment_status`, text): Where the order's payment stands. One of: `pending`, `authorized`, `partially_paid` (Partially paid), `paid`, `partially_refunded` (Partially refunded), `refunded`, `voided`.
- No review request (`suppress_review_requests`, true/false): Stop Yotpo sending this order's customer an automatic review request.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "order": {
      "yotpo_id": 1
    }
  }
}
```

### Create product

Add a product to your Yotpo catalog, so it can collect reviews.

**Inputs**

- Product ID (`external_id`, text, required): The product's ID in your store. It must be new to Yotpo.
- Name (`name`, text, required): The product's name.
- Description (`description`, text): The product's description.
- Status (`status`, text): The product's status in your store. One of: `active`, `draft`, `archived`, `inactive`.
- Page URL (`url`, text): The product's page in your store.
- Image URL (`image_url`, text): A picture of the product.
- Price (`price`, number): The product's price. At least 0.
- Currency (`currency`, text): The price's three-letter currency code, such as USD.
- In stock (`inventory_quantity`, number): How many are in stock. At least 0.
- Discontinued (`is_discontinued`, true/false): Mark the product discontinued. Yotpo then stops asking for its reviews and leaves it out of widgets.
- Review group (`group_name`, text): Products with the same group name share their reviews.
- Brand (`brand`, text): The product's brand.
- SKU (`sku`, text): The product's SKU, without spaces or slashes.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "product": {
      "yotpo_id": 1
    }
  }
}
```

### Create product variant

Add a variant, such as a size or color, to a product in your Yotpo catalog.

**Inputs**

- Product (`product_id`, text, required): The product, by its Yotpo ID.
- Variant ID (`external_id`, text, required): The variant's ID in your store. It must be new to Yotpo.
- Name (`name`, text): The variant's name.
- Price (`price`, number): The variant's price. At least 0.
- Currency (`currency`, text): The price's three-letter currency code, such as USD.
- SKU (`sku`, text): The variant's SKU, without spaces or slashes.
- Page URL (`url`, text): The variant's page in your store.
- Image URL (`image_url`, text): A picture of the variant.
- Options (`options`, list): What sets the variant apart, such as color: blue. Up to 20.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "variant": {
      "yotpo_id": 1
    }
  }
}
```

### Create review

Add a review a customer wrote somewhere else, such as in a survey. Yotpo creates it in the background and moderates it like any other.

**Inputs**

- Product (`sku`, text, required): The product's ID in your store. Use yotpo_site_reviews for a review of the store itself.
- Product name (`product_title`, text, required): The product's name.
- Product page (`product_url`, text): The product's page, used only when Yotpo doesn't know the product yet.
- Reviewer name (`display_name`, text, required): The reviewer's name, as shown with the review.
- Reviewer email (`email`, text, required): The reviewer's email address.
- Stars (`review_score`, number, required): The star rating, from 1 to 5. From 1 to 5.
- Title (`review_title`, text, required): The review's title.
- Review (`review_content`, text, required): What the reviewer wrote.
- Incentivized (`is_incentivized`, true/false): The reviewer was given something for writing it.
- Incentive (`incentive_type`, text): What the reviewer was given. One of: `free_product` (Free product), `coupon`, `loyalty_points` (Loyalty points), `paid_promotion` (Paid promotion), `employee_review` (Employee review), `other`.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "code": 1,
    "message": "example"
  }
}
```

### Get AI review summary

Get Yotpo's AI-written summary of a product's reviews, by topic, with quotes. Empty when the product has none.

**Inputs**

- Product (`product`, text, required): The product, by the ID your store gave it.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "paragraphSummary": "example",
    "summaryHighlights": [
      {
        "highlight": "example",
        "reviewId": 1,
        "reviewerName": "example"
      }
    ],
    "summaryTopics": [
      {
        "avgSentiment": 1,
        "coverage": "example",
        "displayTopic": "example",
        "summary": "example",
        "topic": "example"
      }
    ]
  }
}
```

### Get order

Get an order with its customer, products, payment status and fulfillments.

**Inputs**

- Order (`order_id`, text, required): The order, by its Yotpo ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "order": {
      "cancellation": {
        "cancellation_date": "example"
      },
      "created_at": "example",
      "currency": "example",
      "customer": {
        "email": "example",
        "external_id": "example",
        "first_name": "example",
        "last_name": "example",
        "phone_number": "example"
      },
      "external_id": "example",
      "fulfillments": [
        {
          "external_id": "example",
          "fulfilled_items": [
            {
              "external_product_id": "example",
              "quantity": 1
            }
          ],
          "fulfillment_date": "example",
          "shipment_info": {
            "shipment_status": "example",
            "tracking_company": "example",
            "tracking_number": "example",
            "tracking_url": "example"
          },
          "status": "example"
        }
      ],
      "line_items": [
        {
          "coupon_code": "example",
          "external_product_id": "example",
          "product_id": 1,
          "quantity": 1,
          "subtotal_price": 1,
          "total_price": 1,
          "yotpo_id": 1
        }
      ],
      "order_date": "example",
      "order_name": "example",
      "order_number": "example",
      "payment_method": "example",
      "payment_status": "example",
      "store_id": "example",
      "subtotal_price": 1,
      "total_price": 1,
      "updated_at": "example",
      "yotpo_id": 1
    }
  }
}
```

### Get product

Get a product from your Yotpo catalog.

**Inputs**

- Product (`product_id`, text, required): The product, by its Yotpo ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "product": {
      "brand": "example",
      "created_at": "example",
      "currency": "example",
      "description": "example",
      "external_id": "example",
      "group_name": "example",
      "handle": "example",
      "image_url": "example",
      "inventory_quantity": 1,
      "is_discontinued": true,
      "name": "example",
      "price": 1,
      "sku": "example",
      "status": "example",
      "updated_at": "example",
      "url": "example",
      "yotpo_id": 1
    }
  }
}
```

### Get review

Get a review with its rating, text, reviewer, product and whether it's published.

**Inputs**

- Review ID (`review_id`, number, required): The review's Yotpo ID, a number. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "archived": true,
    "content": "example",
    "created_at": "example",
    "deleted": true,
    "id": 1,
    "new": true,
    "products_apps": [
      {
        "domain_key": "example",
        "id": 1,
        "product": {
          "id": 1,
          "name": "example"
        },
        "product_url": "example"
      }
    ],
    "score": 1,
    "sentiment": 1,
    "title": "example",
    "user": {
      "display_name": "example",
      "id": 1
    },
    "verified_buyer": true,
    "votes_down": 1,
    "votes_up": 1
  }
}
```

### List collections

List the product collections in your Yotpo catalog.

**Inputs**

- Names (`names`, list): Only collections with these names.
- Store IDs (`external_ids`, list): Only these records, by the IDs your store gave them.
- Limit (`limit`, number): How many collections to return, from 1 to 100. Yotpo's default is 100. From 1 to 100.
- Next page (`cursor`, text): To read the next page, the next_page_info a previous list step returned.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "collections": [
      {
        "created_at": "example",
        "external_id": "example",
        "name": "example",
        "updated_at": "example",
        "yotpo_id": 1
      }
    ],
    "pagination": {
      "next_page_info": "example"
    }
  }
}
```

### List customer segments

List your store's customer segments and imported customer lists.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "profileGroups": [
      {
        "createdAt": "example",
        "dataSources": [
          "example"
        ],
        "description": "example",
        "enabled": "example",
        "group": "example",
        "id": 1,
        "name": "example",
        "status": "example",
        "type": "example",
        "updatedAt": "example"
      }
    ]
  }
}
```

### List customers

List your Yotpo customers with their review and loyalty summaries, or find one by email or phone.

**Inputs**

- Email (`email`, text): Only the customer with this email address.
- Phone (`phone_number`, text): Only customers with this phone number, such as +14155552671.
- Updated since (`updated_since`, date): Only customers updated on or after this date.
- Include (`expand`, text): Which summaries to include with each customer. Yotpo's default is both. One of: `all` (Reviews and loyalty), `reviews` (Reviews only), `loyalty` (Loyalty only).
- Store IDs (`external_ids`, list): Only these records, by the IDs your store gave them.
- Limit (`limit`, number): How many customers to return, from 1 to 100. Yotpo's default is 100. From 1 to 100.
- Next page (`cursor`, text): To read the next page, the next_page_info a previous list step returned.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "customers": [
      {
        "account_created_at": "example",
        "account_updated_at": "example",
        "email": "example",
        "external_id": "example",
        "first_name": "example",
        "gender": "example",
        "last_name": "example",
        "phone_number": "example",
        "yotpo_loyalty": {
          "is_opt_in": true,
          "points_balance": 1,
          "points_earned": 1,
          "vip_tier_name": "example"
        },
        "yotpo_ugc": {
          "last_review_date": "example",
          "last_star_rating": 1,
          "total_avg_rating": 1,
          "total_reviews": 1
        }
      }
    ],
    "pagination": {
      "next_page_info": "example"
    }
  }
}
```

### List fulfillments

List an order's shipments with their status and tracking.

**Inputs**

- Order (`order_id`, text, required): The order, by its Yotpo ID.
- Limit (`limit`, number): How many fulfillments to return, from 1 to 100. Yotpo's default is 100. From 1 to 100.
- Next page (`cursor`, text): To read the next page, the next_page_info a previous list step returned.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "fulfillments": [
      {
        "created_at": "example",
        "external_id": "example",
        "fulfilled_items": [
          {
            "external_product_id": "example",
            "quantity": 1
          }
        ],
        "fulfillment_date": "example",
        "id": 1,
        "order_id": 1,
        "shipment_info": {
          "shipment_status": "example",
          "tracking_company": "example",
          "tracking_number": "example",
          "tracking_url": "example"
        },
        "status": "example",
        "updated_at": "example"
      }
    ],
    "pagination": {
      "next_page_info": "example"
    }
  }
}
```

### List orders

List the orders in Yotpo, optionally only those placed between two times.

**Inputs**

- Placed after (`placed_after`, date and time): Only orders placed at or after this time.
- Placed before (`placed_before`, date and time): Only orders placed at or before this time.
- Store IDs (`external_ids`, list): Only these records, by the IDs your store gave them.
- Limit (`limit`, number): How many orders to return, from 1 to 100. Yotpo's default is 100. From 1 to 100.
- Next page (`cursor`, text): To read the next page, the next_page_info a previous list step returned.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "orders": [
      {
        "cancellation": {
          "cancellation_date": "example"
        },
        "created_at": "example",
        "currency": "example",
        "customer": {
          "email": "example",
          "external_id": "example",
          "first_name": "example",
          "last_name": "example",
          "phone_number": "example"
        },
        "external_id": "example",
        "fulfillments": [
          {
            "external_id": "example",
            "fulfilled_items": [
              {
                "external_product_id": "example",
                "quantity": 1
              }
            ],
            "fulfillment_date": "example",
            "shipment_info": {
              "shipment_status": "example",
              "tracking_company": "example",
              "tracking_number": "example",
              "tracking_url": "example"
            },
            "status": "example"
          }
        ],
        "line_items": [
          {
            "coupon_code": "example",
            "external_product_id": "example",
            "product_id": 1,
            "quantity": 1,
            "subtotal_price": 1,
            "total_price": 1,
            "yotpo_id": 1
          }
        ],
        "order_date": "example",
        "order_name": "example",
        "order_number": "example",
        "payment_method": "example",
        "payment_status": "example",
        "store_id": "example",
        "subtotal_price": 1,
        "total_price": 1,
        "updated_at": "example",
        "yotpo_id": 1
      }
    ],
    "pagination": {
      "next_page_info": "example"
    }
  }
}
```

### List product questions

List the published questions shoppers asked about a product, with their public answers.

**Inputs**

- Product (`product`, text, required): The product, by the ID your store gave it.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "page": 1,
    "per_page": 1,
    "questions": [
      {
        "asker": {
          "display_name": "example",
          "id": 1
        },
        "content": "example",
        "created_at": "example",
        "id": 1,
        "sorted_public_answers": [
          {
            "answerer": {
              "display_name": "example",
              "id": 1
            },
            "content": "example",
            "created_at": "example",
            "id": 1,
            "votes_down": 1,
            "votes_up": 1
          }
        ]
      }
    ],
    "total_answers": 1,
    "total_questions": 1
  }
}
```

### List product variants

List a product's variants.

**Inputs**

- Product (`product_id`, text, required): The product, by its Yotpo ID.
- Limit (`limit`, number): How many variants to return, from 1 to 100. Yotpo's default is 100. From 1 to 100.
- Next page (`cursor`, text): To read the next page, the next_page_info a previous list step returned.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "pagination": {
      "next_page_info": "example"
    },
    "variants": [
      {
        "created_at": "example",
        "currency": "example",
        "external_id": "example",
        "image_url": "example",
        "name": "example",
        "options": [
          {
            "name": "example",
            "value": "example"
          }
        ],
        "price": 1,
        "sku": "example",
        "updated_at": "example",
        "url": "example",
        "yotpo_id": 1,
        "yotpo_product_id": 1
      }
    ]
  }
}
```

### List products

List the products in your Yotpo catalog.

**Inputs**

- Store IDs (`external_ids`, list): Only these records, by the IDs your store gave them.
- Limit (`limit`, number): How many products to return, from 1 to 100. Yotpo's default is 100. From 1 to 100.
- Next page (`cursor`, text): To read the next page, the next_page_info a previous list step returned.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "pagination": {
      "next_page_info": "example"
    },
    "products": [
      {
        "brand": "example",
        "created_at": "example",
        "currency": "example",
        "description": "example",
        "external_id": "example",
        "group_name": "example",
        "handle": "example",
        "image_url": "example",
        "inventory_quantity": 1,
        "is_discontinued": true,
        "name": "example",
        "price": 1,
        "sku": "example",
        "status": "example",
        "updated_at": "example",
        "url": "example",
        "yotpo_id": 1
      }
    ]
  }
}
```

### List reviews

List your store's product and site reviews, with their star ratings and reviewers. Yotpo's copy can be up to an hour behind.

**Inputs**

- Written since (`since_date`, date): Only reviews written on or after this date.
- Changed since (`since_updated_at`, date): Only reviews changed on or after this date, such as by being published.
- Include unpublished (`include_unpublished`, true/false): Also return reviews that aren't on your storefront: pending, rejected or escalated ones.
- User reference (`user_reference`, text): Only reviews sent with this user reference of yours.
- Limit (`count`, number): How many reviews to return, up to 100. Yotpo's default is 10. From 1 to 100.
- Page (`page`, number): Which page of reviews to return, starting at 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "reviews": [
      {
        "archived": true,
        "content": "example",
        "created_at": "example",
        "deleted": true,
        "email": "example",
        "escalated": true,
        "id": 1,
        "incentive_type": "example",
        "is_incentivized": true,
        "name": "example",
        "reviewer_type": "example",
        "score": 1,
        "sentiment": 1,
        "sku": "example",
        "title": "example",
        "updated_at": "example",
        "user_reference": "example",
        "votes_down": 1,
        "votes_up": 1
      }
    ]
  }
}
```

### Remove product from collection

Take a product out of one of your Yotpo collections. The product stays in your catalog.

**Inputs**

- Collection (`collection_id`, text, required): The collection, by its Yotpo ID.
- Product (`product`, text, required): The product to remove, by the ID your store gave it.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "collection_id": "example",
    "product": "example",
    "updated": true
  }
}
```

### Update fulfillment

Change a shipment's status or tracking details. Anything left empty stays as it is.

**Inputs**

- Order (`order_id`, text, required): The order, by its Yotpo ID.
- Fulfillment (`fulfillment_id`, text, required): The shipment, by its Yotpo ID.
- Status (`status`, text): The shipment's new status. One of: `pending`, `open`, `success` (Fulfilled (Yotpo can send a review request)), `cancelled`, `error`, `failure` (Failed).
- Shipment status (`shipment_status`, text): Where the shipment is now. One of: `label_printed` (Label printed), `label_purchased` (Label purchased), `attempted_delivery` (Attempted delivery), `ready_for_pickup` (Ready for pickup), `confirmed`, `in_transit` (In transit), `out_for_delivery` (Out for delivery), `delivered`, `failure` (Failed).
- Carrier (`tracking_company`, text): The carrier, such as UPS.
- Tracking number (`tracking_number`, text): The carrier's tracking number.
- Tracking page (`tracking_url`, text): The carrier's tracking page for the shipment.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "fulfillment_id": "example",
    "updated": true
  }
}
```

### Update order

Change an order's payment status, total or name, or mark it canceled. Anything left empty stays as it is.

**Inputs**

- Order (`order_id`, text, required): The order, by its Yotpo ID.
- Payment status (`payment_status`, text): Where the order's payment stands now. One of: `pending`, `authorized`, `partially_paid` (Partially paid), `paid`, `partially_refunded` (Partially refunded), `refunded`, `voided`.
- Total (`total_price`, number): The new order total. At least 0.
- Order name (`order_name`, text): The order's name shown to the customer.
- Canceled at (`cancelled_at`, date and time): When the order was canceled. Fill it in to mark the order canceled.
- No review request (`suppress_review_requests`, true/false): Stop Yotpo sending this order's customer an automatic review request.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "order_id": "example",
    "updated": true
  }
}
```

### Update product

Change a product in your Yotpo catalog. Anything left empty stays as it is.

**Inputs**

- Product (`product_id`, text, required): The product, by its Yotpo ID.
- Name (`name`, text): The product's name.
- Description (`description`, text): The product's description.
- Status (`status`, text): The product's status in your store. One of: `active`, `draft`, `archived`, `inactive`.
- Page URL (`url`, text): The product's page in your store.
- Image URL (`image_url`, text): A picture of the product.
- Price (`price`, number): The product's price. At least 0.
- Currency (`currency`, text): The price's three-letter currency code, such as USD.
- In stock (`inventory_quantity`, number): How many are in stock. At least 0.
- Discontinued (`is_discontinued`, true/false): Mark the product discontinued. Yotpo then stops asking for its reviews and leaves it out of widgets.
- Review group (`group_name`, text): Products with the same group name share their reviews.
- Brand (`brand`, text): The product's brand.
- SKU (`sku`, text): The product's SKU, without spaces or slashes.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "product_id": "example",
    "updated": true
  }
}
```
