# Loyverse

> Sync POS receipts, customers, products, and inventory.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/loyverse

## Actions

### Create customer

Add a customer with a name and optional contact details.

**Inputs**

- Name (`name`, text, required): Name.
- Email (`email`, text): Email.
- Phone number (`phone_number`, text): Phone number.
- Note (`note`, text): Note.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "address": "example",
    "city": "example",
    "country_code": "example",
    "created_at": "example",
    "customer_code": "example",
    "deleted_at": "example",
    "email": "example",
    "first_visit": "example",
    "id": "example",
    "last_visit": "example",
    "name": "example",
    "note": "example",
    "permanent_deletion_at": "example",
    "phone_number": "example",
    "postal_code": "example",
    "region": "example",
    "total_points": 1,
    "total_spent": 1,
    "total_visits": 1,
    "updated_at": "example"
  }
}
```

### Delete customer

Delete a Loyverse customer by ID.

**Inputs**

- Customer id (`customer_id`, text, required): Customer id.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "success": true
  }
}
```

### Get category

Get category.

**Inputs**

- Category (`category_id`, text, required): Category ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "color": "GREY",
    "created_at": "example",
    "deleted_at": "example",
    "id": "example",
    "name": "example"
  }
}
```

### Get customer

Get customer.

**Inputs**

- Customer ID (`customer_id`, text, required): Customer ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "address": "example",
    "city": "example",
    "country_code": "example",
    "created_at": "example",
    "customer_code": "example",
    "deleted_at": "example",
    "email": "example",
    "first_visit": "example",
    "id": "example",
    "last_visit": "example",
    "name": "example",
    "note": "example",
    "permanent_deletion_at": "example",
    "phone_number": "example",
    "postal_code": "example",
    "region": "example",
    "total_points": 1,
    "total_spent": 1,
    "total_visits": 1,
    "updated_at": "example"
  }
}
```

### Get employee

Get employee.

**Inputs**

- Employee (`employee_id`, text, required): Employee ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "deleted_at": "example",
    "email": "example",
    "id": "example",
    "is_owner": true,
    "name": "example",
    "phone_number": "example",
    "stores": [
      "example"
    ],
    "updated_at": "example"
  }
}
```

### Get item

Get item.

**Inputs**

- Item ID (`item_id`, text, required): Item ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "category_id": "example",
    "color": "GREY",
    "components": [
      {
        "quantity": 1,
        "variant_id": "example"
      }
    ],
    "created_at": "example",
    "deleted_at": "example",
    "description": "example",
    "form": "SQUARE",
    "handle": "example",
    "id": "example",
    "image_url": "example",
    "is_composite": true,
    "item_name": "example",
    "modifiers_ids": [
      "example"
    ],
    "option1_name": "example",
    "option2_name": "example",
    "option3_name": "example",
    "primary_supplier_id": "example",
    "reference_id": "example",
    "sold_by_weight": true,
    "tax_ids": [
      "example"
    ],
    "track_stock": true,
    "updated_at": "example",
    "use_production": true,
    "variants": [
      {
        "barcode": "example",
        "cost": 1,
        "created_at": "example",
        "default_price": 1,
        "default_pricing_type": "FIXED",
        "deleted_at": "example",
        "item_id": "example",
        "option1_value": "example",
        "option2_value": "example",
        "option3_value": "example",
        "purchase_cost": 1,
        "reference_variant_id": "example",
        "sku": "example",
        "stores": [
          {}
        ],
        "updated_at": "example",
        "variant_id": "example"
      }
    ]
  }
}
```

### Get merchant

Get merchant.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "business_name": "example",
    "country": "example",
    "created_at": "example",
    "currency": {
      "code": "example",
      "decimal_places": 1
    },
    "email": "example",
    "id": "example"
  }
}
```

### Get receipt

Get receipt.

**Inputs**

- Receipt number (`receipt_number`, text, required): The unique number of the receipt

**Outputs**

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

**Example output**

```json
{
  "data": {
    "cancelled_at": "example",
    "created_at": "example",
    "customer_id": "example",
    "dining_option": "example",
    "employee_id": "example",
    "line_items": [
      {
        "cost": 1,
        "cost_total": 1,
        "gross_total_money": 1,
        "id": "example",
        "item_id": "example",
        "item_name": "example",
        "line_discounts": [
          {}
        ],
        "line_modifiers": [
          {}
        ],
        "line_note": "example",
        "line_taxes": [
          {}
        ],
        "price": 1,
        "quantity": 1,
        "sku": "example",
        "total_discount": 1,
        "total_money": 1,
        "variant_id": "example",
        "variant_name": "example"
      }
    ],
    "note": "example",
    "order": "example",
    "payments": [
      {
        "money_amount": 1,
        "name": "example",
        "paid_at": "example",
        "payment_details": {
          "authorization_code": "example",
          "card_company": "example",
          "card_number": "example",
          "entry_method": "example",
          "reference_id": "example"
        },
        "payment_type_id": "example",
        "type": "example"
      }
    ],
    "points_balance": 1,
    "points_deducted": 1,
    "points_earned": 1,
    "pos_device_id": "example",
    "receipt_date": "example",
    "receipt_number": "example",
    "receipt_type": "SALE",
    "refund_for": "example",
    "source": "example",
    "store_id": "example",
    "surcharge": 1,
    "tip": 1,
    "total_discount": 1,
    "total_discounts": [
      {
        "id": "example",
        "money_amount": 1,
        "name": "example",
        "percentage": 1,
        "type": "FIXED_PERCENT"
      }
    ],
    "total_money": 1,
    "total_tax": 1,
    "total_taxes": [
      {
        "id": "example",
        "money_amount": 1,
        "name": "example",
        "rate": 1,
        "type": "INCLUDED"
      }
    ],
    "updated_at": "example"
  }
}
```

### Get store

Get store.

**Inputs**

- Store (`store_id`, text, required): Store ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "address": "example",
    "city": "example",
    "country": "example",
    "created_at": "example",
    "deleted_at": "example",
    "description": "example",
    "id": "example",
    "name": "example",
    "phone_number": "example",
    "postal_code": "example",
    "state": "example",
    "updated_at": "example"
  }
}
```

### Get variant

Get variant.

**Inputs**

- Variant ID (`variant_id`, text, required): Variant ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "barcode": "example",
    "cost": 1,
    "created_at": "example",
    "default_price": 1,
    "default_pricing_type": "FIXED",
    "deleted_at": "example",
    "item_id": "example",
    "option1_value": "example",
    "option2_value": "example",
    "option3_value": "example",
    "purchase_cost": 1,
    "reference_variant_id": "example",
    "sku": "example",
    "stores": [
      {
        "available_for_sale": true,
        "low_stock": 1,
        "optimal_stock": 1,
        "price": 1,
        "pricing_type": "FIXED",
        "store_id": "example"
      }
    ],
    "updated_at": "example",
    "variant_id": "example"
  }
}
```

### List categories

List categories.

**Inputs**

- Limit (`limit`, number): Used for pagination. From 1 to 250.
- Cursor (`cursor`, text): Used for pagination
- Show deleted (`show_deleted`, true/false): Show deleted modifiers and modifier options

**Outputs**

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

**Example output**

```json
{
  "data": {
    "categories": [
      {
        "color": "GREY",
        "created_at": "example",
        "deleted_at": "example",
        "id": "example",
        "name": "example"
      }
    ],
    "cursor": "example"
  }
}
```

### List customers

List customers.

**Inputs**

- Email (`email`, text): Filter customers by email
- Created at min (`created_at_min`, date and time): Show resources created after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Created at max (`created_at_max`, date and time): Show resources created before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at min (`updated_at_min`, date and time): Show resources updated after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at max (`updated_at_max`, date and time): Show resources updated before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Limit (`limit`, number): Used for pagination. From 1 to 250.
- Cursor (`cursor`, text): Used for pagination

**Outputs**

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

**Example output**

```json
{
  "data": {
    "cursor": "example",
    "customers": [
      {
        "address": "example",
        "city": "example",
        "country_code": "example",
        "created_at": "example",
        "customer_code": "example",
        "deleted_at": "example",
        "email": "example",
        "first_visit": "example",
        "id": "example",
        "last_visit": "example",
        "name": "example",
        "note": "example",
        "permanent_deletion_at": "example",
        "phone_number": "example",
        "postal_code": "example",
        "region": "example",
        "total_points": 1,
        "total_spent": 1,
        "total_visits": 1,
        "updated_at": "example"
      }
    ]
  }
}
```

### List employees

List employees.

**Inputs**

- Created at min (`created_at_min`, date and time): Show resources created after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Created at max (`created_at_max`, date and time): Show resources created before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at min (`updated_at_min`, date and time): Show resources updated after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at max (`updated_at_max`, date and time): Show resources updated before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Show deleted (`show_deleted`, true/false): Show deleted modifiers and modifier options
- Limit (`limit`, number): Used for pagination. From 1 to 250.
- Cursor (`cursor`, text): Used for pagination

**Outputs**

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

**Example output**

```json
{
  "data": {
    "cursor": "example",
    "employees": [
      {
        "created_at": "example",
        "deleted_at": "example",
        "email": "example",
        "id": "example",
        "is_owner": true,
        "name": "example",
        "phone_number": "example",
        "stores": [
          "example"
        ],
        "updated_at": "example"
      }
    ]
  }
}
```

### List inventory

List inventory.

**Inputs**

- Store IDs (`store_ids`, list): Store ids.
- Variant IDs (`variant_ids`, list): Variant ids.
- Updated at min (`updated_at_min`, date and time): Show inventory levels updated at or after specified date
- Updated at max (`updated_at_max`, date and time): Show inventory levels updated at or before specified date
- Limit (`limit`, number): Used for pagination. From 1 to 250.
- Cursor (`cursor`, text): Used for pagination

**Outputs**

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

**Example output**

```json
{
  "data": {
    "cursor": "example",
    "inventory_levels": [
      {
        "in_stock": 1,
        "store_id": "example",
        "updated_at": "example",
        "variant_id": "example"
      }
    ]
  }
}
```

### List items

List items.

**Inputs**

- Created at min (`created_at_min`, date and time): Show resources created after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Created at max (`created_at_max`, date and time): Show resources created before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at min (`updated_at_min`, date and time): Show resources updated after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at max (`updated_at_max`, date and time): Show resources updated before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Limit (`limit`, number): Used for pagination. From 1 to 250.
- Cursor (`cursor`, text): Used for pagination
- Show deleted (`show_deleted`, true/false): Show deleted modifiers and modifier options

**Outputs**

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

**Example output**

```json
{
  "data": {
    "cursor": "example",
    "items": [
      {
        "category_id": "example",
        "color": "GREY",
        "components": [
          {}
        ],
        "created_at": "example",
        "deleted_at": "example",
        "description": "example",
        "form": "SQUARE",
        "handle": "example",
        "id": "example",
        "image_url": "example",
        "is_composite": true,
        "item_name": "example",
        "modifiers_ids": [
          {}
        ],
        "option1_name": "example",
        "option2_name": "example",
        "option3_name": "example",
        "primary_supplier_id": "example",
        "reference_id": "example",
        "sold_by_weight": true,
        "tax_ids": [
          {}
        ],
        "track_stock": true,
        "updated_at": "example",
        "use_production": true,
        "variants": [
          {}
        ]
      }
    ]
  }
}
```

### List payment types

List payment types.

**Inputs**

- Created at min (`created_at_min`, date and time): Show resources created after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Created at max (`created_at_max`, date and time): Show resources created before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at min (`updated_at_min`, date and time): Show resources updated after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at max (`updated_at_max`, date and time): Show resources updated before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Show deleted (`show_deleted`, true/false): Show deleted modifiers and modifier options

**Outputs**

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

**Example output**

```json
{
  "data": {
    "payment_types": [
      {
        "created_at": "example",
        "deleted_at": "example",
        "id": "example",
        "name": "example",
        "stores": [
          "example"
        ],
        "type": "CASH",
        "updated_at": "example"
      }
    ]
  }
}
```

### List receipts

List receipts.

**Inputs**

- Store (`store_id`, text): Show receipts only for specified store
- Updated at min (`updated_at_min`, date and time): Show receipts updated after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at max (`updated_at_max`, date and time): Show receipts updated after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Created at min (`created_at_min`, date and time): Show resources created after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Created at max (`created_at_max`, date and time): Show resources created before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Limit (`limit`, number): Used for pagination. From 1 to 250.
- Cursor (`cursor`, text): Used for pagination

**Outputs**

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

**Example output**

```json
{
  "data": {
    "cursor": "example",
    "receipts": [
      {
        "cancelled_at": "example",
        "created_at": "example",
        "customer_id": "example",
        "dining_option": "example",
        "employee_id": "example",
        "line_items": [
          {}
        ],
        "note": "example",
        "order": "example",
        "payments": [
          {}
        ],
        "points_balance": 1,
        "points_deducted": 1,
        "points_earned": 1,
        "pos_device_id": "example",
        "receipt_date": "example",
        "receipt_number": "example",
        "receipt_type": "SALE",
        "refund_for": "example",
        "source": "example",
        "store_id": "example",
        "surcharge": 1,
        "tip": 1,
        "total_discount": 1,
        "total_discounts": [
          {}
        ],
        "total_money": 1,
        "total_tax": 1,
        "total_taxes": [
          {}
        ],
        "updated_at": "example"
      }
    ]
  }
}
```

### List stores

List stores.

**Inputs**

- Created at min (`created_at_min`, date and time): Show resources created after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Created at max (`created_at_max`, date and time): Show resources created before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at min (`updated_at_min`, date and time): Show resources updated after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at max (`updated_at_max`, date and time): Show resources updated before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Show deleted (`show_deleted`, true/false): Show deleted modifiers and modifier options

**Outputs**

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

**Example output**

```json
{
  "data": {
    "stores": [
      {
        "address": "example",
        "city": "example",
        "country": "example",
        "created_at": "example",
        "deleted_at": "example",
        "description": "example",
        "id": "example",
        "name": "example",
        "phone_number": "example",
        "postal_code": "example",
        "state": "example",
        "updated_at": "example"
      }
    ]
  }
}
```

### List taxes

List taxes.

**Inputs**

- Created at min (`created_at_min`, date and time): Show resources created after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Created at max (`created_at_max`, date and time): Show resources created before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at min (`updated_at_min`, date and time): Show resources updated after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at max (`updated_at_max`, date and time): Show resources updated before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Show deleted (`show_deleted`, true/false): Show deleted modifiers and modifier options

**Outputs**

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

**Example output**

```json
{
  "data": {
    "taxes": [
      {
        "created_at": "example",
        "deleted_at": "example",
        "id": "example",
        "name": "example",
        "rate": 1,
        "stores": [
          "example"
        ],
        "type": "INCLUDED",
        "updated_at": "example"
      }
    ]
  }
}
```

### List variants

List variants.

**Inputs**

- Sku (`sku`, text): Filter variants by sku
- Created at min (`created_at_min`, date and time): Show resources created after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Created at max (`created_at_max`, date and time): Show resources created before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at min (`updated_at_min`, date and time): Show resources updated after date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Updated at max (`updated_at_max`, date and time): Show resources updated before date (ISO 8601 format, e.g: 2020-03-30T18:30:00.000Z)
- Limit (`limit`, number): Used for pagination. From 1 to 250.
- Cursor (`cursor`, text): Used for pagination
- Show deleted (`show_deleted`, true/false): Show deleted modifiers and modifier options

**Outputs**

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

**Example output**

```json
{
  "data": {
    "cursor": "example",
    "variants": [
      {
        "barcode": "example",
        "cost": 1,
        "created_at": "example",
        "default_price": 1,
        "default_pricing_type": "FIXED",
        "deleted_at": "example",
        "item_id": "example",
        "option1_value": "example",
        "option2_value": "example",
        "option3_value": "example",
        "purchase_cost": 1,
        "reference_variant_id": "example",
        "sku": "example",
        "stores": [
          {}
        ],
        "updated_at": "example",
        "variant_id": "example"
      }
    ]
  }
}
```
