# Arketa

> See a studio's classes, clients and purchases, and book, cancel or check in class reservations.

App · 13 actions. Web page: https://docs.lodol.com/docs/integrations/arketa

## Actions

### Book a new client into a class

Reserve a spot in a class for someone new: Arketa adds them as a client.

**Inputs**

- Class ID (`class_id`, text, required): The class, by ID.
- First name (`first_name`, text, required): The client's first name.
- Last name (`last_name`, text, required): The client's last name.
- Email (`email`, text, required): The client's email address.
- Phone (`phone`, text): The client's phone number, such as +14155550123.
- Purchase ID (`purchase_id`, text): A purchase that pays for the class, by ID. Leave empty if the class needs none.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "item": {
      "checked_in": true,
      "checked_in_at": "example",
      "class_id": "example",
      "client": {
        "email": "example",
        "first_name": "example",
        "last_name": "example",
        "phone": "example"
      },
      "client_id": "example",
      "created_at": "example",
      "id": "example",
      "spot_id": "example",
      "spot_name": "example",
      "status": "BOOKED",
      "updated_at": "example"
    }
  }
}
```

### Book an existing client into a class

Reserve a spot in a class for a client already in Arketa, using one of their purchases.

**Inputs**

- Class ID (`class_id`, text, required): The class, by ID.
- Client ID (`client_id`, text, required): The client to book, by ID.
- Purchase ID (`purchase_id`, text, required): The client's purchase (membership or class pack) that pays for the class, by ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "item": {
      "checked_in": true,
      "checked_in_at": "example",
      "class_id": "example",
      "client": {
        "email": "example",
        "first_name": "example",
        "last_name": "example",
        "phone": "example"
      },
      "client_id": "example",
      "created_at": "example",
      "id": "example",
      "spot_id": "example",
      "spot_name": "example",
      "status": "BOOKED",
      "updated_at": "example"
    }
  }
}
```

### Cancel a reservation

Cancel a client's reservation in a class, with or without a refund.

**Inputs**

- Class ID (`class_id`, text, required): The class, by ID.
- Reservation ID (`reservation_id`, text, required): The reservation, by ID.
- Late cancellation (`is_late_cancel`, true/false): On to record it as a late cancellation, under the studio's late-cancel rules.
- Issue refund (`issue_refund`, true/false): On to give back what the client paid for the class.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "item": {
      "success": true,
      "updated_at": "example"
    }
  }
}
```

### Check in a reservation

Mark a client as arrived for the class they reserved.

**Inputs**

- Class ID (`class_id`, text, required): The class, by ID.
- Reservation ID (`reservation_id`, text, required): The reservation, by ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "item": {
      "success": true,
      "updated_at": "example"
    }
  }
}
```

### Get a class

Get one class: its time, room, capacity and how many have booked.

**Inputs**

- Class ID (`class_id`, text, required): The class, by ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "item": {
      "canceled": true,
      "deleted": true,
      "description": "example",
      "duration": 1,
      "id": "example",
      "instructor_name": "example",
      "location_id": "example",
      "max_capacity": 1,
      "name": "example",
      "room_id": "example",
      "start_time": "example",
      "total_booked": 1,
      "updated_at": "example"
    }
  }
}
```

### Get a client

Get one client's name, contact details and birthday.

**Inputs**

- Client ID (`client_id`, text, required): The client, by ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "item": {
      "created_at": "example",
      "date_of_birth": "example",
      "email": "example",
      "first_name": "example",
      "gender": "male",
      "id": "example",
      "last_name": "example",
      "phone": "example",
      "removed": true,
      "updated_at": "example"
    }
  }
}
```

### List class reservations

List the reservations made for one class.

**Inputs**

- Class ID (`class_id`, text, required): The class, by ID.
- Limit (`limit`, number): How many records to return, from 1 to 100. Arketa returns 10 when this is empty. From 1 to 100.
- Start after ID (`start_after`, text): To read the next page, the **nextStartAfterId** from the page before.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "items": [
      {
        "checked_in": true,
        "checked_in_at": "example",
        "class_id": "example",
        "client": {
          "email": "example",
          "first_name": "example",
          "last_name": "example",
          "phone": "example"
        },
        "client_id": "example",
        "created_at": "example",
        "id": "example",
        "spot_id": "example",
        "spot_name": "example",
        "status": "BOOKED",
        "updated_at": "example"
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "nextStartAfterId": "example"
    }
  }
}
```

### List classes

List classes, optionally for one location and between two times.

**Inputs**

- Limit (`limit`, number): How many records to return, from 1 to 100. Arketa returns 10 when this is empty. From 1 to 100.
- Start after ID (`start_after`, text): To read the next page, the **nextStartAfterId** from the page before.
- Location (`location_id`, text): Only classes at this location.
- Starts after (`start_date`, date and time): Only classes that start at or after this time.
- Ends before (`end_date`, date and time): Only classes that end before this time.
- IDs (`ids`, list): Fetch only these records, by ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "items": [
      {
        "canceled": true,
        "deleted": true,
        "description": "example",
        "duration": 1,
        "id": "example",
        "instructor_name": "example",
        "location_id": "example",
        "max_capacity": 1,
        "name": "example",
        "room_id": "example",
        "start_time": "example",
        "total_booked": 1,
        "updated_at": "example"
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "nextStartAfterId": "example"
    }
  }
}
```

### List clients

List the studio's clients, optionally only those changed in a time range.

**Inputs**

- Limit (`limit`, number): How many records to return, from 1 to 100. Arketa returns 10 when this is empty. From 1 to 100.
- Start after ID (`start_after`, text): To read the next page, the **nextStartAfterId** from the page before.
- Updated after (`updated_at_min`, date and time): Only records changed at or after this time.
- Updated before (`updated_at_max`, date and time): Only records changed at or before this time.
- IDs (`ids`, list): Fetch only these records, by ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "items": [
      {
        "created_at": "example",
        "date_of_birth": "example",
        "email": "example",
        "first_name": "example",
        "gender": "male",
        "id": "example",
        "last_name": "example",
        "phone": "example",
        "removed": true,
        "updated_at": "example"
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "nextStartAfterId": "example"
    }
  }
}
```

### List locations

List the studio's locations, with their addresses.

**Inputs**

- Limit (`limit`, number): How many records to return, from 1 to 100. Arketa returns 10 when this is empty. From 1 to 100.
- Start after ID (`start_after`, text): To read the next page, the **nextStartAfterId** from the page before.
- Updated after (`updated_at_min`, date and time): Only records changed at or after this time.
- Updated before (`updated_at_max`, date and time): Only records changed at or before this time.
- IDs (`ids`, list): Fetch only these records, by ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "items": [
      {
        "address": {
          "city": "example",
          "country": "example",
          "line1": "example",
          "line2": "example",
          "postal_code": "example",
          "state": "example"
        },
        "deleted": true,
        "description": "example",
        "id": "example",
        "name": "example",
        "updated_at": "example"
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "nextStartAfterId": "example"
    }
  }
}
```

### List purchases

List clients' memberships, class packs and drop-ins, with what each has left.

**Inputs**

- Limit (`limit`, number): How many records to return, from 1 to 100. Arketa returns 10 when this is empty. From 1 to 100.
- Start after ID (`start_after`, text): To read the next page, the **nextStartAfterId** from the page before.
- Updated after (`updated_at_min`, date and time): Only records changed at or after this time.
- Updated before (`updated_at_max`, date and time): Only records changed at or before this time.
- IDs (`ids`, list): Fetch only these records, by ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "items": [
      {
        "client_id": "example",
        "end_date": "example",
        "id": "example",
        "name": "example",
        "offering_id": "example",
        "price": 1,
        "remaining_uses": 1,
        "start_date": "example",
        "status": "ACTIVE",
        "type": "subscription",
        "updated_at": "example"
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "nextStartAfterId": "example"
    }
  }
}
```

### List referrals

List who referred whom, and the reward each got.

**Inputs**

- Limit (`limit`, number): How many records to return, from 1 to 100. Arketa returns 10 when this is empty. From 1 to 100.
- Start after ID (`start_after`, text): To read the next page, the **nextStartAfterId** from the page before.
- Updated after (`updated_at_min`, date and time): Only records changed at or after this time.
- Updated before (`updated_at_max`, date and time): Only records changed at or before this time.
- IDs (`ids`, list): Fetch only these records, by ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "items": [
      {
        "id": "example",
        "referral_date": "example",
        "referred_user_id": "example",
        "referred_user_reward": {
          "type": "amount",
          "value": 1
        },
        "referring_user_id": "example",
        "referring_user_reward": {
          "type": "amount",
          "value": 1
        },
        "updated_at": "example"
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "nextStartAfterId": "example"
    }
  }
}
```

### List rooms

List the rooms of one location.

**Inputs**

- Location (`location_id`, text, required): The location whose rooms to list.
- Limit (`limit`, number): How many records to return, from 1 to 100. Arketa returns 10 when this is empty. From 1 to 100.
- Start after ID (`start_after`, text): To read the next page, the **nextStartAfterId** from the page before.
- Updated after (`updated_at_min`, date and time): Only records changed at or after this time.
- Updated before (`updated_at_max`, date and time): Only records changed at or before this time.
- IDs (`ids`, list): Fetch only these records, by ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "items": [
      {
        "description": "example",
        "id": "example",
        "location_id": "example",
        "name": "example",
        "spot_map": {},
        "updated_at": "example"
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "nextStartAfterId": "example"
    }
  }
}
```
