# Mariana Tek

> Find and update customers, see classes and orders, and book, cancel or check in class reservations.

App · 24 actions. Web page: https://docs.lodol.com/docs/integrations/mariana-tek

## Actions

### Add a customer note

Add a staff note to a customer's profile. Customers never see it.

**Inputs**

- Customer ID (`customer_id`, number, required): The customer the note is about, by ID. At least 1.
- Note (`text`, text, required): The note.
- Pinned (`is_pinned`, true/false): On to pin the note to the top.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "is_pinned": true,
        "note_datetime": "example",
        "text": "example",
        "user": 1
      },
      "id": "example",
      "relationships": {},
      "type": "user_notes"
    }
  }
}
```

### Archive a customer

Archive a customer's account, so it no longer shows among active customers.

**Inputs**

- Customer ID (`customer_id`, number, required): The customer, by ID. At least 1.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {}
}
```

### Book a class

Book a customer into a class, paid with one of their memberships or credits.

**Inputs**

- Customer ID (`customer_id`, text, required): The customer to book, by ID.
- Class ID (`class_session_id`, text, required): The class to book, by ID.
- Pay with (`payment_type`, text): What pays for the class: one of the customer's memberships or a credit pack. One of: `membership`, `credit`.
- Payment option ID (`payment_option_id`, number): The ID of that membership or credit pack, from the customer's payment options. At least 1.
- Reservation type (`reservation_type`, text): Standard books a spot; waitlist puts the customer on the waitlist of a full class. One of: `standard`, `waitlist`.
- Spot ID (`spot_id`, text): A particular spot (a bike or a mat) by ID. Leave empty for any free spot.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "cancel_date": "example",
        "check_in_date": "example",
        "creation_date": "example",
        "guest_email": "example",
        "guest_name": "example",
        "reservation_type": "standard",
        "reserved_for_guest": true,
        "status": "pending"
      },
      "id": "example",
      "relationships": {},
      "type": "reservations"
    }
  }
}
```

### Cancel a reservation

Cancel a customer's reservation, under the studio's late-cancel rules unless waived.

**Inputs**

- Reservation ID (`reservation_id`, number, required): The reservation, by ID. At least 1.
- Waive penalty (`grace`, true/false): On to cancel without the late-cancel penalty. Needs a staff account allowed to waive it.
- Don't notify the customer (`suppress_notifications`, true/false): On to cancel without emailing the customer.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "cancel_date": "example",
        "check_in_date": "example",
        "creation_date": "example",
        "guest_email": "example",
        "guest_name": "example",
        "reservation_type": "standard",
        "reserved_for_guest": true,
        "status": "pending"
      },
      "id": "example",
      "relationships": {},
      "type": "reservations"
    }
  }
}
```

### Check in a reservation

Mark that the customer has arrived for their class.

**Inputs**

- Reservation ID (`reservation_id`, number, required): The reservation, by ID. At least 1.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "cancel_date": "example",
        "check_in_date": "example",
        "creation_date": "example",
        "guest_email": "example",
        "guest_name": "example",
        "reservation_type": "standard",
        "reserved_for_guest": true,
        "status": "pending"
      },
      "id": "example",
      "relationships": {},
      "type": "reservations"
    }
  }
}
```

### Create a customer

Add a customer account. Mariana Tek requires a password for every account.

**Inputs**

- Email (`email`, text, required): The customer's email address.
- First name (`first_name`, text, required): First name.
- Last name (`last_name`, text, required): Last name.
- Password (`password`, text, required): A password for the account. The customer can change it later.
- Phone number (`phone_number`, text): Phone number.
- Date of birth (`birth_date`, date): Date of birth.
- Gender (`gender`, text): Gender, as Mariana Tek records it. One of: `female`, `male`, `transgender_female` (Transgender female), `transgender_male` (Transgender male), `genderqueer`, `agender`, `non_binary` (Non binary), `other`, `prefer_not_to_say` (Prefer not to say).
- Address line 1 (`address_line1`, text): First line of the address.
- Address line 2 (`address_line2`, text): Second line of the address.
- City (`city`, text): Town or city.
- State or province (`state_province`, text): State or province.
- Postal code (`postal_code`, text): Postal or ZIP code.
- Country (`country`, text): Country.
- Emergency contact name (`emergency_contact_name`, text): Who to contact in an emergency.
- Emergency contact phone (`emergency_contact_phone`, text): The emergency contact's phone number.
- Marketing opt-in (`marketing_opt_in`, true/false): On if the customer agreed to marketing email.
- Home location (`home_location`, text): The customer's home studio.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "address_line1": "example",
        "address_line2": "example",
        "archived_at": "example",
        "birth_date": "example",
        "city": "example",
        "completed_class_count": 1,
        "country": "example",
        "date_joined": "example",
        "email": "example",
        "first_class_taken_date": "example",
        "first_name": "example",
        "full_name": "example",
        "gender": "example",
        "last_class_taken_date": "example",
        "last_name": "example",
        "marketing_opt_in": true,
        "phone_number": "example",
        "postal_code": "example",
        "signed_waiver": true,
        "state_province": "example"
      },
      "id": "example",
      "relationships": {},
      "type": "users"
    }
  }
}
```

### Delete a customer note

Delete a staff note from a customer's profile.

**Inputs**

- Note ID (`note_id`, number, required): The note, by ID. At least 1.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {}
}
```

### Get a class

Get one class: when it is, who teaches it and how many spots are left.

**Inputs**

- Class ID (`class_session_id`, number, required): The class, by ID. At least 1.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "available_spots": 1,
        "cancellation_datetime": "example",
        "capacity": 1,
        "checked_in_user_count": 1,
        "class_type_display": "example",
        "classroom_display": "example",
        "end_datetime": "example",
        "instructor_names": [
          "example"
        ],
        "is_free_class": true,
        "location_display": "example",
        "public": true,
        "public_note": "example",
        "standard_reservation_user_count": 1,
        "start_date": "example",
        "start_datetime": "example",
        "start_time": "example",
        "waitlist_reservation_user_count": 1
      },
      "id": "example",
      "relationships": {},
      "type": "class_sessions"
    }
  }
}
```

### Get a customer

Get one customer's profile: contact details, waiver and class history.

**Inputs**

- Customer ID (`customer_id`, number, required): The customer, by ID. At least 1.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "address_line1": "example",
        "address_line2": "example",
        "archived_at": "example",
        "birth_date": "example",
        "city": "example",
        "completed_class_count": 1,
        "country": "example",
        "date_joined": "example",
        "email": "example",
        "first_class_taken_date": "example",
        "first_name": "example",
        "full_name": "example",
        "gender": "example",
        "last_class_taken_date": "example",
        "last_name": "example",
        "marketing_opt_in": true,
        "phone_number": "example",
        "postal_code": "example",
        "signed_waiver": true,
        "state_province": "example"
      },
      "id": "example",
      "relationships": {},
      "type": "users"
    }
  }
}
```

### Get a customer membership

Get one membership a customer holds: its status, renewal and next charge.

**Inputs**

- Membership ID (`membership_id`, number, required): The customer membership, by ID. At least 1.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "cancellation_datetime": "example",
        "cancellation_reason": "example",
        "end_date": "example",
        "membership_name": "example",
        "next_charge_date": "example",
        "payment_interval": "example",
        "purchase_date": "example",
        "renewal_currency": "example",
        "renewal_rate": "example",
        "start_date": "example",
        "status": "example"
      },
      "id": "example",
      "relationships": {},
      "type": "membership_instances"
    }
  }
}
```

### Get a reservation

Get one reservation: its status, spot and check-in time.

**Inputs**

- Reservation ID (`reservation_id`, number, required): The reservation, by ID. At least 1.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "cancel_date": "example",
        "check_in_date": "example",
        "creation_date": "example",
        "guest_email": "example",
        "guest_name": "example",
        "reservation_type": "standard",
        "reserved_for_guest": true,
        "status": "pending"
      },
      "id": "example",
      "relationships": {},
      "type": "reservations"
    }
  }
}
```

### Get an order

Get one order with its totals, taxes and discounts.

**Inputs**

- Order ID (`order_id`, number, required): The order, by ID. At least 1.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "currency": "example",
        "date_placed": "example",
        "is_refundable": true,
        "number": "example",
        "status": "example",
        "subtotal": "example",
        "total": "example",
        "total_discount": "example",
        "total_tax": "example"
      },
      "id": "example",
      "relationships": {},
      "type": "orders"
    }
  }
}
```

### List class types

List the kinds of class the studio runs, such as a 45-minute ride.

**Inputs**

- Page (`page`, number): Which page to read, from 1. At least 1.
- Page size (`page_size`, number): How many records to return on a page, up to 100. From 1 to 100.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "description": "example",
          "duration": 1,
          "enabled": true,
          "is_live_stream": true,
          "name": "example"
        },
        "id": "example",
        "relationships": {},
        "type": "class_session_types"
      }
    ],
    "meta": {
      "pagination": {
        "count": 1,
        "page": 1,
        "pages": 1,
        "per_page": 1
      }
    }
  }
}
```

### List classes

List scheduled classes, by date, location, class type or instructor.

**Inputs**

- From (`min_date`, date): Only classes on or after this day.
- To (`max_date`, date): Only classes on or before this day.
- Location (`location`, text): Only classes at this location.
- Class type (`class_session_type`, text): Only classes of this type.
- Instructor ID (`instructor`, text): Only classes taught by this instructor, by employee ID.
- Canceled (`is_cancelled`, true/false): On for canceled classes only, off to leave them out.
- Updated after (`min_updated_datetime`, date and time): Only records changed at or after this time.
- Page (`page`, number): Which page to read, from 1. At least 1.
- Page size (`page_size`, number): How many records to return on a page, up to 100. From 1 to 100.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "available_spots": 1,
          "cancellation_datetime": "example",
          "capacity": 1,
          "checked_in_user_count": 1,
          "class_type_display": "example",
          "classroom_display": "example",
          "end_datetime": "example",
          "instructor_names": [
            "example"
          ],
          "is_free_class": true,
          "location_display": "example",
          "public": true,
          "public_note": "example",
          "standard_reservation_user_count": 1,
          "start_date": "example",
          "start_datetime": "example",
          "start_time": "example",
          "waitlist_reservation_user_count": 1
        },
        "id": "example",
        "relationships": {},
        "type": "class_sessions"
      }
    ],
    "meta": {
      "pagination": {
        "count": 1,
        "page": 1,
        "pages": 1,
        "per_page": 1
      }
    }
  }
}
```

### List customer memberships

List the memberships customers hold, by customer or status.

**Inputs**

- Customer ID (`user`, number): Only this customer's memberships, by customer ID. At least 1.
- Status (`status`, text): Only memberships in this status. One of: `active`, `cancelled`, `converted`, `ding_failure` (Ding failure), `done`, `frozen`, `payment_failure` (Payment failure), `pending_bank_authorization` (Pending bank authorization), `pending_customer_activation` (Pending customer activation), `pending_start_date` (Pending start date), `terminated`.
- Updated after (`min_updated_datetime`, date and time): Only records changed at or after this time.
- Updated before (`max_updated_datetime`, date and time): Only records changed at or before this time.
- Page (`page`, number): Which page to read, from 1. At least 1.
- Page size (`page_size`, number): How many records to return on a page, up to 100. From 1 to 100.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "cancellation_datetime": "example",
          "cancellation_reason": "example",
          "end_date": "example",
          "membership_name": "example",
          "next_charge_date": "example",
          "payment_interval": "example",
          "purchase_date": "example",
          "renewal_currency": "example",
          "renewal_rate": "example",
          "start_date": "example",
          "status": "example"
        },
        "id": "example",
        "relationships": {},
        "type": "membership_instances"
      }
    ],
    "meta": {
      "pagination": {
        "count": 1,
        "page": 1,
        "pages": 1,
        "per_page": 1
      }
    }
  }
}
```

### List customer notes

List the staff notes kept on customers.

**Inputs**

- Customer ID (`user`, number): Only notes on this customer, by customer ID. At least 1.
- Pinned (`is_pinned`, true/false): On for pinned notes only.
- Page (`page`, number): Which page to read, from 1. At least 1.
- Page size (`page_size`, number): How many records to return on a page, up to 100. From 1 to 100.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "is_pinned": true,
          "note_datetime": "example",
          "text": "example",
          "user": 1
        },
        "id": "example",
        "relationships": {},
        "type": "user_notes"
      }
    ],
    "meta": {
      "pagination": {
        "count": 1,
        "page": 1,
        "pages": 1,
        "per_page": 1
      }
    }
  }
}
```

### List customers

Find customers by name, email or phone, or list those changed in a time range.

**Inputs**

- Search (`query`, text): Search customers by name, email or ID.
- Email (`email`, text): Only the customer with this exact email.
- Phone number (`phone_number`, text): Only customers with this phone number.
- Home location (`home_location`, number): Only customers whose home studio is this location. At least 1.
- Staff only (`is_employee`, true/false): On for staff only, off for customers only.
- Updated after (`min_updated_datetime`, date and time): Only records changed at or after this time.
- Updated before (`max_updated_datetime`, date and time): Only records changed at or before this time.
- Page (`page`, number): Which page to read, from 1. At least 1.
- Page size (`page_size`, number): How many records to return on a page, up to 100. From 1 to 100.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "address_line1": "example",
          "address_line2": "example",
          "archived_at": "example",
          "birth_date": "example",
          "city": "example",
          "completed_class_count": 1,
          "country": "example",
          "date_joined": "example",
          "email": "example",
          "first_class_taken_date": "example",
          "first_name": "example",
          "full_name": "example",
          "gender": "example",
          "last_class_taken_date": "example",
          "last_name": "example",
          "marketing_opt_in": true,
          "phone_number": "example",
          "postal_code": "example",
          "signed_waiver": true,
          "state_province": "example"
        },
        "id": "example",
        "relationships": {},
        "type": "users"
      }
    ],
    "meta": {
      "pagination": {
        "count": 1,
        "page": 1,
        "pages": 1,
        "per_page": 1
      }
    }
  }
}
```

### List employees

List the studio's staff accounts.

**Inputs**

- Page (`page`, number): Which page to read, from 1. At least 1.
- Page size (`page_size`, number): How many records to return on a page, up to 100. From 1 to 100.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "can_chat": true,
          "is_active": true,
          "payroll_id": "example"
        },
        "id": "example",
        "relationships": {},
        "type": "employees"
      }
    ],
    "meta": {
      "pagination": {
        "count": 1,
        "page": 1,
        "pages": 1,
        "per_page": 1
      }
    }
  }
}
```

### List locations

List the studio's locations.

**Inputs**

- Page (`page`, number): Which page to read, from 1. At least 1.
- Page size (`page_size`, number): How many records to return on a page, up to 100. From 1 to 100.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "address_line1": "example",
          "city": "example",
          "currency_code": "example",
          "email_address": "example",
          "listed": true,
          "name": "example",
          "phone_number": "example",
          "postal_code": "example",
          "state_province": "example",
          "timezone": "example"
        },
        "id": "example",
        "relationships": {},
        "type": "locations"
      }
    ],
    "meta": {
      "pagination": {
        "count": 1,
        "page": 1,
        "pages": 1,
        "per_page": 1
      }
    }
  }
}
```

### List orders

List purchases made in the studio's shop and at the front desk.

**Inputs**

- Customer ID (`user`, number): Only this customer's orders, by customer ID. At least 1.
- Location (`location`, text): Only orders at this location.
- Order number (`number`, text): Only the order with this number.
- Updated after (`min_updated_datetime`, date and time): Only records changed at or after this time.
- Updated before (`max_updated_datetime`, date and time): Only records changed at or before this time.
- Page (`page`, number): Which page to read, from 1. At least 1.
- Page size (`page_size`, number): How many records to return on a page, up to 100. From 1 to 100.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "currency": "example",
          "date_placed": "example",
          "is_refundable": true,
          "number": "example",
          "status": "example",
          "subtotal": "example",
          "total": "example",
          "total_discount": "example",
          "total_tax": "example"
        },
        "id": "example",
        "relationships": {},
        "type": "orders"
      }
    ],
    "meta": {
      "pagination": {
        "count": 1,
        "page": 1,
        "pages": 1,
        "per_page": 1
      }
    }
  }
}
```

### List regions

List the regions the studio's locations are grouped into.

**Inputs**

- Page (`page`, number): Which page to read, from 1. At least 1.
- Page size (`page_size`, number): How many records to return on a page, up to 100. From 1 to 100.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "listed": true,
          "name": "example"
        },
        "id": "example",
        "relationships": {},
        "type": "regions"
      }
    ],
    "meta": {
      "pagination": {
        "count": 1,
        "page": 1,
        "pages": 1,
        "per_page": 1
      }
    }
  }
}
```

### List reservations

List class reservations, for a customer, a class or a status.

**Inputs**

- Customer ID (`user`, number): Only this customer's reservations, by customer ID. At least 1.
- Class ID (`class_session`, number): Only reservations in this class, by class ID. At least 1.
- Status (`status`, text): Only reservations in this status. One of: `pending`, `check in`, `standard cancel`, `penalty cancel`, `graced cancel`, `penalty no show`, `no fee no show`, `graced no show`, `removed`, `class cancelled`, `penalty removed`.
- Reservation type (`reservation_type`, text): Only booked, waitlisted or standby reservations. One of: `standard`, `waitlist`, `standby`.
- Classes from (`class_session_min_date`, date): Only reservations for classes on or after this day.
- Classes to (`class_session_max_date`, date): Only reservations for classes on or before this day.
- Updated after (`min_updated_datetime`, date and time): Only records changed at or after this time.
- Page (`page`, number): Which page to read, from 1. At least 1.
- Page size (`page_size`, number): How many records to return on a page, up to 100. From 1 to 100.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "cancel_date": "example",
          "check_in_date": "example",
          "creation_date": "example",
          "guest_email": "example",
          "guest_name": "example",
          "reservation_type": "standard",
          "reserved_for_guest": true,
          "status": "pending"
        },
        "id": "example",
        "relationships": {},
        "type": "reservations"
      }
    ],
    "meta": {
      "pagination": {
        "count": 1,
        "page": 1,
        "pages": 1,
        "per_page": 1
      }
    }
  }
}
```

### Mark a reservation as a no-show

Record that the customer didn't come to their class.

**Inputs**

- Reservation ID (`reservation_id`, number, required): The reservation, by ID. At least 1.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "cancel_date": "example",
        "check_in_date": "example",
        "creation_date": "example",
        "guest_email": "example",
        "guest_name": "example",
        "reservation_type": "standard",
        "reserved_for_guest": true,
        "status": "pending"
      },
      "id": "example",
      "relationships": {},
      "type": "reservations"
    }
  }
}
```

### Update a customer

Change a customer's details. Only the fields filled in change.

**Inputs**

- Customer ID (`customer_id`, number, required): The customer, by ID. At least 1.
- Email (`email`, text): New email address.
- First name (`first_name`, text): New first name.
- Last name (`last_name`, text): New last name.
- Phone number (`phone_number`, text): Phone number.
- Date of birth (`birth_date`, date): Date of birth.
- Gender (`gender`, text): Gender, as Mariana Tek records it. One of: `female`, `male`, `transgender_female` (Transgender female), `transgender_male` (Transgender male), `genderqueer`, `agender`, `non_binary` (Non binary), `other`, `prefer_not_to_say` (Prefer not to say).
- Address line 1 (`address_line1`, text): First line of the address.
- Address line 2 (`address_line2`, text): Second line of the address.
- City (`city`, text): Town or city.
- State or province (`state_province`, text): State or province.
- Postal code (`postal_code`, text): Postal or ZIP code.
- Country (`country`, text): Country.
- Emergency contact name (`emergency_contact_name`, text): Who to contact in an emergency.
- Emergency contact phone (`emergency_contact_phone`, text): The emergency contact's phone number.
- Marketing opt-in (`marketing_opt_in`, true/false): On if the customer agreed to marketing email.
- Home location (`home_location`, text): The customer's home studio.

**Outputs**

- `data` (object): The response from Mariana Tek.

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "address_line1": "example",
        "address_line2": "example",
        "archived_at": "example",
        "birth_date": "example",
        "city": "example",
        "completed_class_count": 1,
        "country": "example",
        "date_joined": "example",
        "email": "example",
        "first_class_taken_date": "example",
        "first_name": "example",
        "full_name": "example",
        "gender": "example",
        "last_class_taken_date": "example",
        "last_name": "example",
        "marketing_opt_in": true,
        "phone_number": "example",
        "postal_code": "example",
        "signed_waiver": true,
        "state_province": "example"
      },
      "id": "example",
      "relationships": {},
      "type": "users"
    }
  }
}
```
