# Skilljar

> Manage Skilljar domains, learners, course and path enrollments and groups.

App · 26 actions. Web page: https://docs.lodol.com/docs/integrations/skilljar

## Actions

### Add a user to a domain

Add a learner to a domain by email. A new email creates the learner; an existing one adds them and returns their details.

**Inputs**

- Domain (`domain_name`, text, required): The Skilljar domain (your training site) to work in.
- Email (`email`, text, required): The learner's email address.
- First name (`first_name`, text): The learner's first name.
- Last name (`last_name`, text): The learner's last name.
- Active (`active`, true/false): Whether the learner can reach a private domain. On by default.
- Expires at (`expires_at`, date and time): When access ends. Leave blank for no end date.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "access_code": {
      "code": "example",
      "id": "example",
      "pool": {
        "id": "example",
        "name": "example"
      }
    },
    "active": false,
    "enrolled_at": "example",
    "expires_at": "example",
    "login_token": "example",
    "marketing_optin": false,
    "signup_fields": [],
    "user": {
      "email": "example",
      "first_name": "example",
      "full_name": "example",
      "id": "example",
      "last_name": "example"
    }
  }
}
```

### Add a user to a group

Add a learner to a group.

**Inputs**

- Group (`group_id`, text, required): The group.
- Learner ID (`learner_id`, text, required): The learner's Skilljar user ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "user": {
      "email": "example",
      "first_name": "example",
      "id": "example",
      "last_name": "example"
    }
  }
}
```

### Create a group

Create a group, optionally with email domains whose learners join it automatically.

**Inputs**

- Name (`name`, text, required): The group's name, unique in your organization.
- Discount percent (`discount_percent`, number): A percentage discount on everything the group's members buy. From 0 to 100.
- Email domains (`rule_email_domains`, list): Email domains (such as example.com) whose learners are added to the group when they register.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "discount_percent": 1,
    "group_category_id": "example",
    "id": "example",
    "name": "example",
    "rule_email_domains": [],
    "sign_up_field_rule": {
      "enforce": false,
      "options": [],
      "require_match_all": false
    },
    "user_count": 1
  }
}
```

### Delete a group

Delete a group and its memberships. Its learners are kept.

**Inputs**

- Group (`group_id`, text, required): The group.

**Outputs**

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

**Example output**

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

### Enroll a user in a course

Enroll a learner who belongs to the domain in a course published there.

**Inputs**

- Domain (`domain_name`, text, required): The Skilljar domain (your training site) to work in.
- Published course (`published_course_id`, text, required): The course as published on the domain.
- Learner (`learner_id`, text, required): The learner, picked from the domain's users.
- Expires at (`expires_at`, date and time): When access ends. Leave blank for no end date.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "active": false,
    "enrolled_at": "example",
    "expires_at": "example",
    "feedback": "example",
    "id": "example",
    "purchase": {
      "offer_price": {
        "amount": "example",
        "currency_code": "example"
      },
      "order_id": "example",
      "payment_processor": "example",
      "purchase_id": "example",
      "purchase_price": {
        "amount": "example",
        "currency_code": "example"
      },
      "purchase_state": "CREATED",
      "purchased_at": "example",
      "quantity": 1,
      "tax_price_cents": 1
    },
    "rating": 1,
    "user": {
      "email": "example",
      "first_name": "example",
      "id": "example",
      "last_name": "example"
    }
  }
}
```

### Enroll a user in a path

Enroll a learner who belongs to the domain in a learning path published there.

**Inputs**

- Domain (`domain_name`, text, required): The Skilljar domain (your training site) to work in.
- Published path (`published_path_id`, text, required): The learning path as published on the domain.
- Learner (`learner_id`, text, required): The learner, picked from the domain's users.
- Expires at (`expires_at`, date and time): When access ends. Leave blank for no end date.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "active": false,
    "enrolled_at": "example",
    "expires_at": "example",
    "id": "example",
    "purchase": {
      "offer_price": {
        "amount": "example",
        "currency_code": "example"
      },
      "order_id": "example",
      "payment_processor": "example",
      "purchase_id": "example",
      "purchase_price": {
        "amount": "example",
        "currency_code": "example"
      },
      "purchase_state": "CREATED",
      "purchased_at": "example",
      "quantity": 1,
      "tax_price_cents": 1
    },
    "user": {
      "email": "example",
      "first_name": "example",
      "id": "example",
      "last_name": "example"
    }
  }
}
```

### Get a course

Get one course by its ID.

**Inputs**

- Course (`course_id`, text, required): The course.

**Outputs**

- `data` (object): Course Serializer

**Example output**

```json
{
  "data": {
    "average_rating": 1.0,
    "course_and_lesson_time_format": "example",
    "course_time": "example",
    "created_at": "example",
    "display_course_and_lesson_time": false,
    "display_manual_course_time": false,
    "draft_origin_id": "example",
    "enforce_sequential_navigation": false,
    "id": "example",
    "labels": [],
    "long_description_html": "example",
    "manual_course_time": "example",
    "modified_at": "example",
    "promo_image_url": "example",
    "short_description": "example",
    "title": "example"
  }
}
```

### Get a course enrollment

Get one enrollment in a published course.

**Inputs**

- Domain (`domain_name`, text, required): The Skilljar domain (your training site) to work in.
- Published course (`published_course_id`, text, required): The course as published on the domain.
- Enrollment ID (`enrollment_id`, text, required): The enrollment's ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "active": false,
    "enrolled_at": "example",
    "expires_at": "example",
    "feedback": "example",
    "id": "example",
    "purchase": {
      "offer_price": {
        "amount": "example",
        "currency_code": "example"
      },
      "order_id": "example",
      "payment_processor": "example",
      "purchase_id": "example",
      "purchase_price": {
        "amount": "example",
        "currency_code": "example"
      },
      "purchase_state": "CREATED",
      "purchased_at": "example",
      "quantity": 1,
      "tax_price_cents": 1
    },
    "rating": 1,
    "user": {
      "email": "example",
      "first_name": "example",
      "id": "example",
      "last_name": "example"
    }
  }
}
```

### Get a domain user

Get a learner's membership of a domain.

**Inputs**

- Domain (`domain_name`, text, required): The Skilljar domain (your training site) to work in.
- Learner (`learner_id`, text, required): The learner, picked from the domain's users.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "access_code": {
      "code": "example",
      "id": "example",
      "pool": {
        "id": "example",
        "name": "example"
      }
    },
    "active": false,
    "enrolled_at": "example",
    "expires_at": "example",
    "marketing_optin": false,
    "signup_fields": [],
    "user": {
      "email": "example",
      "first_name": "example",
      "full_name": "example",
      "id": "example",
      "last_name": "example"
    }
  }
}
```

### Get a group

Get one group.

**Inputs**

- Group (`group_id`, text, required): The group.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "discount_percent": 1,
    "group_category_id": "example",
    "id": "example",
    "name": "example",
    "rule_email_domains": [],
    "sign_up_field_rule": {
      "enforce": false,
      "options": [],
      "require_match_all": false
    },
    "user_count": 1
  }
}
```

### Get a published course

Get a course as published on a domain.

**Inputs**

- Domain (`domain_name`, text, required): The Skilljar domain (your training site) to work in.
- Published course (`published_course_id`, text, required): The course as published on the domain.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "allow_self_service_reenroll": false,
    "course": {
      "id": "example",
      "lesson_count": 1,
      "long_description_html": "example",
      "required_lesson_count": 1,
      "short_description": "example",
      "title": "example"
    },
    "course_url": "example",
    "hidden": false,
    "id": "example",
    "offer": {
      "id": "example",
      "price": {
        "amount": "example",
        "currency_code": "example"
      },
      "registration_open": false,
      "registration_url": "example"
    },
    "registration_ends_at": "example",
    "registration_required": false,
    "registration_starts_at": "example",
    "require_all_prerequisites": false,
    "restrict_access_start_end_dates": false,
    "slug": "example",
    "strict_enforce_group_visibility": false,
    "timezone": "example",
    "unique_progress_per_enrollment": false
  }
}
```

### Get a user

Get a learner's overview: their name, email, enrollment and completion counts and latest activity.

**Inputs**

- Learner ID (`learner_id`, text, required): The learner's Skilljar user ID.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "completion_count": 1,
    "inactive_at": "example",
    "latest_activity": "example",
    "registration_count": 1,
    "signed_up_at": "example",
    "user": {
      "email": "example",
      "first_name": "example",
      "id": "example",
      "last_name": "example"
    }
  }
}
```

### List course enrollments

List the enrollments in a course published on a domain.

**Inputs**

- Domain (`domain_name`, text, required): The Skilljar domain (your training site) to work in.
- Published course (`published_course_id`, text, required): The course as published on the domain.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Page size (`page_size`, number): How many results to return on each page. From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": []
  }
}
```

### List courses

List the courses in your organization, optionally only those with a label.

**Inputs**

- Label (`label_name`, text): Only courses with this exact label.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Page size (`page_size`, number): How many results to return on each page. From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": []
  }
}
```

### List domain users

List the learners who belong to a domain, optionally filtered by email, name or status.

**Inputs**

- Domain (`domain_name`, text, required): The Skilljar domain (your training site) to work in.
- Email (`email`, text): Only the learner with this email address.
- First name (`first_name`, text): Only learners with this first name (case sensitive).
- Last name (`last_name`, text): Only learners with this last name (case sensitive).
- Active (`active`, true/false): Only active learners (on) or only inactive ones (off).
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Page size (`page_size`, number): How many results to return on each page. From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": []
  }
}
```

### List domains

List the domains (training sites) in your Skilljar organization.

**Inputs**

- Page (`page`, number): Which page of results to return, starting at 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": []
  }
}
```

### List group users

List the learners in a group.

**Inputs**

- Group (`group_id`, text, required): The group.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Page size (`page_size`, number): How many results to return on each page. From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": []
  }
}
```

### List groups

List the groups in your organization, or find one by its exact name.

**Inputs**

- Name (`name`, text): Only the group with this exact name.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Page size (`page_size`, number): How many results to return on each page. From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": []
  }
}
```

### List path enrollments

List the enrollments in a learning path published on a domain.

**Inputs**

- Domain (`domain_name`, text, required): The Skilljar domain (your training site) to work in.
- Published path (`published_path_id`, text, required): The learning path as published on the domain.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Page size (`page_size`, number): How many results to return on each page. From 1 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": []
  }
}
```

### List published courses

List the courses published on a domain.

**Inputs**

- Domain (`domain_name`, text, required): The Skilljar domain (your training site) to work in.
- Search (`search`, text): Only courses matching this catalog search.
- Course (`course_id`, text): Only the publication of this course.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": []
  }
}
```

### List published paths

List the learning paths published on a domain.

**Inputs**

- Domain (`domain_name`, text, required): The Skilljar domain (your training site) to work in.
- Search (`search`, text): Only paths matching this catalog search.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": 1,
    "next": "example",
    "previous": "example",
    "results": []
  }
}
```

### Remove a user from a group

Take a learner out of a group. Their account is kept.

**Inputs**

- Group (`group_id`, text, required): The group.
- Learner ID (`learner_id`, text, required): The learner's Skilljar user ID.

**Outputs**

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

**Example output**

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

### Update a course enrollment

Deactivate or reactivate an enrollment, or change when it expires.

**Inputs**

- Domain (`domain_name`, text, required): The Skilljar domain (your training site) to work in.
- Published course (`published_course_id`, text, required): The course as published on the domain.
- Enrollment ID (`enrollment_id`, text, required): The enrollment's ID.
- Active (`active`, true/false): Whether the enrollment is active.
- Expires at (`expires_at`, date and time): When access ends. Leave blank for no end date.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "active": false,
    "enrolled_at": "example",
    "expires_at": "example",
    "feedback": "example",
    "id": "example",
    "purchase": {
      "offer_price": {
        "amount": "example",
        "currency_code": "example"
      },
      "order_id": "example",
      "payment_processor": "example",
      "purchase_id": "example",
      "purchase_price": {
        "amount": "example",
        "currency_code": "example"
      },
      "purchase_state": "CREATED",
      "purchased_at": "example",
      "quantity": 1,
      "tax_price_cents": 1
    },
    "rating": 1,
    "user": {
      "email": "example",
      "first_name": "example",
      "id": "example",
      "last_name": "example"
    }
  }
}
```

### Update a domain user

Activate or deactivate a learner on a domain, or change when their access ends.

**Inputs**

- Domain (`domain_name`, text, required): The Skilljar domain (your training site) to work in.
- Learner (`learner_id`, text, required): The learner, picked from the domain's users.
- Active (`active`, true/false): Whether the learner can reach a private domain.
- Expires at (`expires_at`, date and time): When access ends. Leave blank for no end date.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "access_code": {
      "code": "example",
      "id": "example",
      "pool": {
        "id": "example",
        "name": "example"
      }
    },
    "active": false,
    "enrolled_at": "example",
    "expires_at": "example",
    "login_token": "example",
    "marketing_optin": false,
    "signup_fields": [],
    "user": {
      "email": "example",
      "first_name": "example",
      "full_name": "example",
      "id": "example",
      "last_name": "example"
    }
  }
}
```

### Update a group

Rename a group or change its discount.

**Inputs**

- Group (`group_id`, text, required): The group.
- Name (`name`, text): The group's new name.
- Discount percent (`discount_percent`, number): A percentage discount on everything the group's members buy. From 0 to 100.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "discount_percent": 1,
    "group_category_id": "example",
    "id": "example",
    "name": "example",
    "rule_email_domains": [],
    "sign_up_field_rule": {
      "enforce": false,
      "options": [],
      "require_match_all": false
    },
    "user_count": 1
  }
}
```

### Update a user

Change a learner's name or email address.

**Inputs**

- Learner ID (`learner_id`, text, required): The learner's Skilljar user ID.
- Email (`email`, text): The new email address.
- First name (`first_name`, text): The new first name.
- Last name (`last_name`, text): The new last name.

**Outputs**

- `data` (object): Version of the user serializer configured to update a user's name and email address.

**Example output**

```json
{
  "data": {
    "email": "example",
    "first_name": "example",
    "id": "example",
    "inactive_at": "example",
    "last_name": "example"
  }
}
```
