# Smile.io

> Read customers, points, rewards and loyalty settings in Smile.io.

App · 11 actions. Web page: https://docs.lodol.com/docs/integrations/smile-io

## Actions

### Get customer

Get customer.

**Inputs**

- Customer (`customer_id`, number, required): ID of the customer (in Smile) to retrieve.

**Outputs**

- `data` (object): The response from Smile.io.

**Example output**

```json
{
  "data": {
    "customer": {
      "created_at": "example",
      "date_of_birth": "example",
      "email": "example",
      "first_name": "example",
      "id": 1,
      "last_name": "example",
      "points_balance": 1,
      "referral_url": "example",
      "state": "candidate",
      "updated_at": "example",
      "vip_status": {
        "current_vip_period_end": "example",
        "delta_to_next_vip_tier": 1.0,
        "delta_to_retain_vip_tier": 1.0,
        "next_vip_tier_id": 1,
        "progress_value": 1.0,
        "vip_tier_expires_at": "example",
        "vip_tier_id": 1
      },
      "vip_tier_id": 1
    }
  }
}
```

### Get points product

Get points product.

**Inputs**

- Points product (`points_product_id`, number, required): ID of the points product to retrieve.

**Outputs**

- `data` (object): The response from Smile.io.

**Example output**

```json
{
  "data": {
    "points_product": {
      "created_at": "example",
      "exchange_description": "example",
      "exchange_type": "fixed",
      "id": 1,
      "points_price": 1,
      "reward": {
        "created_at": "example",
        "description": "example",
        "id": 1,
        "image_url": "example",
        "name": "example",
        "updated_at": "example"
      },
      "updated_at": "example",
      "variable_points_max": 1,
      "variable_points_min": 1,
      "variable_points_step": 1,
      "variable_points_step_reward_value": 1
    }
  }
}
```

### Get points settings

Get points settings.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Smile.io.

**Example output**

```json
{
  "data": {
    "points_settings": {
      "points_label": {
        "one": "example",
        "other": "example"
      }
    }
  }
}
```

### Get points transaction

Get points transaction.

**Inputs**

- Points transaction (`points_transaction_id`, number, required): ID of the points transaction to retrieve.

**Outputs**

- `data` (object): The response from Smile.io.

**Example output**

```json
{
  "data": {
    "points_transaction": {
      "created_at": "example",
      "customer_id": 1,
      "description": "example",
      "id": 1,
      "internal_note": "example",
      "points_change": 1,
      "updated_at": "example"
    }
  }
}
```

### Get referral settings

Get referral settings.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Smile.io.

**Example output**

```json
{
  "data": {
    "referral_settings": {
      "receiver_reward": {
        "image": {
          "content_type": "example",
          "url": "example"
        },
        "name": "example"
      },
      "sender_reward": {
        "image": {
          "content_type": "example",
          "url": "example"
        },
        "name": "example"
      },
      "status": "active"
    }
  }
}
```

### List customers

List customers.

**Inputs**

- Email (`email`, text): Filter results to only customers with the provided email address.
- State (`state`, text): Filter results to only customers with the provided state. One of: `candidate`, `member`, `disabled`.
- Updated at min (`updated_at_min`, date and time): Filter results to only customers updated after the provided date and time.
- Limit (`limit`, number): The maximum number of customers to retrieve. From 1 to 250.
- Cursor (`cursor`, text): Cursor for the page of customers to retrieve.

**Outputs**

- `data` (object): The response from Smile.io.

**Example output**

```json
{
  "data": {
    "customers": [],
    "metadata": {
      "next_cursor": "example",
      "previous_cursor": "example"
    }
  }
}
```

### List earning rules

List earning rules.

**Inputs**

- Limit (`limit`, number): The maximum number of earning rules to retrieve. From 1 to 250.
- Cursor (`cursor`, text): Cursor for the page of earning rules to retrieve.

**Outputs**

- `data` (object): The response from Smile.io.

**Example output**

```json
{
  "data": {
    "earning_rules": [],
    "metadata": {
      "next_cursor": "example",
      "previous_cursor": "example"
    }
  }
}
```

### List points products

List points products.

**Inputs**

- Exchange type (`exchange_type`, text): Filter results to only points products with the provided `exchange_type`. One of: `fixed`, `variable`.
- Page size (`page_size`, number): The maximum number of points products to retrieve. From 1 to 250.
- Page (`page`, number): The page of points products to retrieve.

**Outputs**

- `data` (object): The response from Smile.io.

**Example output**

```json
{
  "data": {
    "points_products": []
  }
}
```

### List points transactions

List points transactions.

**Inputs**

- Customer id (`customer_id`, number): Filter results to only points transactions with the provided Smile customer ID.
- Updated at min (`updated_at_min`, date and time): Filter results to only points transactions updated at or after the provided date and time.
- Limit (`limit`, number): The maximum number of points transactions to retrieve. From 1 to 250.
- Cursor (`cursor`, text): Cursor for the page of points transactions to retrieve.

**Outputs**

- `data` (object): The response from Smile.io.

**Example output**

```json
{
  "data": {
    "metadata": {
      "next_cursor": "example",
      "previous_cursor": "example"
    },
    "points_transactions": []
  }
}
```

### List reward fulfillments

List reward fulfillments.

**Inputs**

- Customer id (`customer_id`, number): Filter results to only reward fulfillments with the provided Smile customer ID.
- Fulfillment status (`fulfillment_status`, text): Filter results to only reward fulfillments whose fulfillment status matches the provided value. One of: `pending`, `issued`, `cancelled`, `failed`.
- Usage status (`usage_status`, text): Filter results to only reward fulfillments whose usage status matches the provided values. One of: `used`, `unused`, `untracked`.
- Updated at min (`updated_at_min`, date and time): Filter results to only reward fulfillments updated after the provided date and time.
- Limit (`limit`, number): The maximum number of reward fulfillments to retrieve. From 1 to 250.
- Cursor (`cursor`, text): Cursor for the page of reward fulfillments to retrieve.

**Outputs**

- `data` (object): The response from Smile.io.

**Example output**

```json
{
  "data": {
    "metadata": {
      "next_cursor": "example",
      "previous_cursor": "example"
    },
    "reward_fulfillments": []
  }
}
```

### List vip tiers

List vip tiers.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Smile.io.

**Example output**

```json
{
  "data": {
    "vip_tiers": []
  }
}
```
