...
GET /api/revoke-tokens{user_id}
Where
user_id
is the ID of the user whose token is being revoked.Response
HTTP 200
Code Block language json { "message": "Tokens revoked" }
Users
GET api/users/email-lookup?email=[email]
Returns an existing User record with the given email or 404s
Response
Code Block language json { "user": { "id": 1, "email": "nathan@fivable.com", "role": "admin", "salutation": null, ... }, }
POST api/users
Returns a paginated list of users.
Response
Code Block language json { "users": { "current_page": 1, "data": [ { "id": 1, "email": "nathan@fivable.com", "role": "admin", "salutation": null, "first_name": "Nathan", "last_name": "Williams", "suffix": null, "impersonating_user_id": null, "stackable_person_id": 7824, "virtus_id": null, "virtus_status": 0, "learner_type": null, "phone": null, "last_login": "2023-08-28 19:08:08", "language": "en-US", "time_zone": "America/New_York", "enrolled_in_academy": 0, "sms_opt_in": 0, "disable_notifications": 1, "stripe_customer_id": "cus_123", "profile_picture": null, "email_verified_at": "2021-06-08T15:14:25.000000Z", "email_verification_redirect": null, "created_at": "2020-02-18T02:17:55.000000Z", "updated_at": "2023-08-28T19:08:08.000000Z", "deleted_at": null, "name": "Nathan Williams", "full_name": "Nathan Williams", "profile_picture_url": "<url>" }, ... ], "first_page_url": "<http://localhost:8060/api/users?page=1",> "from": 1, "last_page": 334, "last_page_url": "<http://localhost:8060/api/users?page=334",> "links": [ { "url": null, "label": "« Previous", "active": false }, ... ], "next_page_url": "<url>", "path": "<url>", "per_page": 25, "prev_page_url": null, "to": 25, "total": 8350 }
POST api/users
Stores a new User record.
Form-Data Parameters
email
:string
, required - The email address of the user.password
:string
, required - The password of the user.role
:string
, required - The role of the user. Must be one ofadmin
,global_leader
,learner
.salutation
:string
, optional - The salutation of the user.first_name
:string
, required - The first name of the user.last_name
:string
, required - The last name of the user.suffix
:string
, optional - The suffix of the user.stackable_person_id
:integer
, optional - The Stackable ID of the user.virtus_id
:integer
, optional - The Virtus ID of the user.phone
:string
, optional - The phone number of the user.language
:string
, required - The language of the user. Must be one ofen-US
,es-US
.time_zone
:string
, required - The time zone of the user. Must be a valid time zone string.enrolled_in_academy
:boolean
, optional - Whether or not the user is enrolled in the Academy.sms_opt_in
:boolean
, optional - Whether or not the user has opted in to receive SMS messages.disable_notifications
:boolean
, optional - Whether or not the user has opted out of receiving notifications.stripe_customer_id
:string
, optional - The Stripe Customer ID of the user.profile_picture_file
:file
, optional - The profile picture of the user.profile_picture
:string
, optional - The URL of the profile picture of the user.learner_place_ids
:array
, optional - The IDs of the places the user is enrolled in.local_leader_place_ids
:array
, optional - The IDs of the places the user is a local leader of.address
:JSON
, optional - The address of the user.street_1
:string
, optional - The first line of the address.street_2
:string
, optional - The second line of the address.city
:string
, optional - The city of the address.state
:string
, optional - The state of the address.zip
:string
, optional - The zip code of the address.
user_metas
:JSON
, optional - The meta data of the user.slug
:string
, The slug of the meta data.name
:string
, The key (name) of the meta data.value
:string
, The value of the meta data.
Response
HTTP 200
Code Block language json { "status": 201, "message": "User successfully stored", "user": { "id": 8783, "email": "nathan+api@fivable.com", "role": "learner", "salutation": null, "first_name": "Nathan", "last_name": "Williams", "suffix": null, "impersonating_user_id": null, "stackable_person_id": 144, "virtus_id": null, "virtus_status": 0, "learner_type": null, "phone": null, "last_login": null, "language": "en-US", "time_zone": null, "enrolled_in_academy": 0, "sms_opt_in": 0, "disable_notifications": 0, "stripe_customer_id": "cus_OfPpGfJGhyBitw", "profile_picture": null, "email_verified_at": null, "email_verification_redirect": null, "created_at": "2023-09-19T14:33:20.000000Z", "updated_at": "2023-09-19T14:33:20.000000Z", "deleted_at": null, "name": "Nathan Williams", "full_name": "Nathan Williams", "profile_picture_url": "<url>", "team_roles": [], "cohorts": [], "subscriptions": [], "groups": [], "learning_paths": [], "courses": [], "course_containers": [] } }
PUT api/users/{user}
Updates a specified User
URL Parameters
user
:int
, required - The ID of the User to update.
Form-Data Parameters
email
:string
, required - The email address of the user.password
:string
, required - The password of the user.role
:string
, required - The role of the user. Must be one ofadmin
,global_leader
,learner
.salutation
:string
, optional - The salutation of the user.first_name
:string
, required - The first name of the user.last_name
:string
, required - The last name of the user.suffix
:string
, optional - The suffix of the user.stackable_person_id
:integer
, optional - The Stackable ID of the user.virtus_id
:integer
, optional - The Virtus ID of the user.phone
:string
, optional - The phone number of the user.language
:string
, required - The language of the user. Must be one ofen-US
,es-US
.time_zone
:string
, required - The time zone of the user. Must be a valid time zone string.enrolled_in_academy
:boolean
, optional - Whether or not the user is enrolled in the Academy.sms_opt_in
:boolean
, optional - Whether or not the user has opted in to receive SMS messages.disable_notifications
:boolean
, optional - Whether or not the user has opted out of receiving notifications.stripe_customer_id
:string
, optional - The Stripe Customer ID of the user.profile_picture_file
:file
, optional - The profile picture of the user.profile_picture
:string
, optional - The URL of the profile picture of the user.learner_place_ids
:array
, optional - The IDs of the places the user is enrolled in.local_leader_place_ids
:array
, optional - The IDs of the places the user is a local leader of.address
:JSON
, optional - The address of the user.street_1
:string
, optional - The first line of the address.street_2
:string
, optional - The second line of the address.city
:string
, optional - The city of the address.state
:string
, optional - The state of the address.zip
:string
, optional - The zip code of the address.
user_metas
:JSON
, optional - The meta data of the user.slug
:string
, The slug of the meta data.name
:string
, The key (name) of the meta data.value
:string
, The value of the meta data.
Response
HTTP 200
Code Block language json { "message": "User successfully updated", "user": { "id": 8784, "email": "nathan+api1@fivable.com", "role": "admin", "salutation": null, "first_name": "NathanUpdated", "last_name": "Williams", "suffix": null, "impersonating_user_id": null, "stackable_person_id": 145, "virtus_id": null, "virtus_status": 0, "learner_type": null, "phone": null, "last_login": null, "language": "en-US", "time_zone": null, "enrolled_in_academy": 0, "sms_opt_in": 0, "disable_notifications": 0, "stripe_customer_id": "cus_OfQEUcoYax3A4g", "profile_picture": null, "email_verified_at": null, "email_verification_redirect": null, "created_at": "2023-09-19T14:58:26.000000Z", "updated_at": "2023-09-19T15:06:58.000000Z", "deleted_at": null, "name": "NathanUpdated Williams", "full_name": "NathanUpdated Williams", "profile_picture_url": "<url>", "user_metas": [ { "id": 32969, "user_id": 8784, "slug": "address-object", "name": "Address Object", "value": "{\"street_1\":null,\"street_2\":null,\"city\":null,\"state\":null,\"zip\":null}", "created_at": "2023-09-19T14:58:29.000000Z", "updated_at": "2023-09-19T14:58:29.000000Z" } ] } }
DELETE api/users/{user}
Soft-deletes a specified User
** URL Parameters**
user
:int
, required - The ID of the User to soft-delete.
Response
HTTP 200
Code Block language json { "message": "User deleted" }
GET api/users/{user}/courses
List all of the specified User’s Courses
URL Parameters
user
:int
, required - The ID of the User to retrieve Courses for.
Response
HTTP 200
Code Block language json { "courses": [ { "id": 1, "name": "The Extraordinary Minister of Holy Communion", "type": null, "description": "The Extraordinary Minister of Holy Communion (EMHC) is...", "status": "published", "featured_image_id": 131, "instructor_id": null, "objectives": null, "length": "00:45:00", "completion_url": null, "experience_completion_urls": null, "custom_completion_message": null, "event_dates": null, "event_dates_requirement": null, "allow_local_leader_read_only": 0, "should_invite_users": 0, "due_date": null, "credit_value": null, "user_limit": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "registration_fee": null, "stackable_place_ids": null, "opens_at": null, "closes_at": null, "published_at": null, "created_at": "2020-02-19T17:09:39.000000Z", "updated_at": "2022-11-18T02:56:18.000000Z", "deleted_at": null, "class_name": "App\\Models\\Course", "image_url": "<url>", "excerpt": "The Extraordinary Minister of Holy Communion (EMHC) is...", "is_actionable": true, "pivot": { "user_id": 1, "course_id": 1, "term_id": null, "credit_id": null, "status_mask": 2, "has_paid": 0, "rsvp_time": null, "rsvp_id": null, "completed_by": null, "completed_at": null, "bookmarked_at": null, "created_at": "2020-03-06T03:53:39.000000Z", "updated_at": "2020-03-06T03:59:43.000000Z", "is_bookmarked": false }, "featured_image": {} }, ... ] }
GET api/users/{user}/assignments
List all of the specified User’s Assignments
URL Parameters
user
:int
, required - The ID of the User to retrieve Assignments for.
Response
HTTP 200
Code Block language json { "assignments": [ { "id": 3, "description": "<html>", "submission_option": "wysiwyg", "featured_image_id": 104, "language": null, "stackable_place_ids": null, "is_lor": 0, "created_at": "2020-03-16T15:36:24.000000Z", "updated_at": "2022-11-21T19:05:05.000000Z", "deleted_at": null, "name": "Catechist's Reflection", "enable_grouping": 0, "due_date": null, "learning_path_id": 2, "learning_path_name": "Catechist Formation", "status_label": "Submitted", "completion_date": null, "view_url": "<url>", "class_name": "App\\Models\\Assignment", "image_url": "<url>", "excerpt": "Watch Bishop Frank's invitation...", "featured_image": {} }, ... ], }
GET api/users/{user}/course-containers
List all of the specified User’s Course Containers
URL Parameters
user
:int
, required - The ID of the User to retrieve Course Containers for.
Response
HTTP 200
Code Block language json { "course_containers": [ { "id": 34, "name": "Nathan's Testing Course Container", "description": "<p>description</p>", "featured_image_id": 524, "instructor_id": 86, "objectives": [], "custom_completion_message": null, "credit_value": null, "feedback_url": null, "feedback_label": null, "feedback_description": null, "language": null, "hidden": 0, "premium": 0, "learners_receive_new_content": 0, "new_content_invalidates_completions": 0, "registration_fee": null, "stackable_place_ids": null, "created_at": "2023-06-06T01:38:26.000000Z", "updated_at": "2023-06-06T01:38:26.000000Z", "deleted_at": null, "class_name": "App\\Models\\CourseContainer", "excerpt": "description ", "image_url": "<url>", "featured_image": {} }, ... ] }
GET api/users/{user}/groups
List all of the specified User’s Groups
URL Parameters
user
:int
, required - The ID of the User to retrieve Groups for.
Response
HTTP 200
Code Block language json { "groups": [ { "id": 56, "name": "Mentees", "featured_image_id": null, "parent_group_id": null, "inherit_parent_properties": 0, "group_type_id": 11, "user_can_view": 1, "user_can_assign": 0, "has_authorization_status": 1, "authorization_interval": null, "authorization_renewal_notice_days": 0, "compliance_expiry_interval": null, "uses_virtus": 0, "created_at": "2023-03-09T15:05:41.000000Z", "updated_at": "2023-03-09T15:05:41.000000Z", "deleted_at": null, "class_name": "App\\Models\\Group", "image_url": "<url>", "pivot": { "user_id": 1, "group_id": 56, "authorization_expires_at": null, "authorization_status": null, "authorization_status_override": null, "authorization_status_override_reason": null, "authorized_at": null, "id": 7168, "initial_learning_path_id": 49, "is_manager": 0, "is_member": 1, "created_at": "2023-08-11T18:24:14.000000Z", "updated_at": "2023-08-11T18:24:14.000000Z" }, "featured_image": null }, ... ] }
GET api/users/{user}/terms
List all of the specified User’s Terms
URL Parameters
user
:int
, required - The ID of the User to retrieve Terms for.
Response
HTTP 200
Code Block language json { "groups": [ { "id": 2, "name": "EMHC Continuing Formation Part One", "description": "As an EMHC, we know you are committed to...", "include_users": "custom", "user_dependent_dates": 1, "start_date": null, "end_date": null, "minimum_start_date": "2022-06-02T00:00:00.000000Z", "length": 200, "learning_path_trigger_id": 1, "term_trigger_id": null, "override_credit_goal": 1, "credit_goal": 1, "featured_image_url": "terms/eucharist-g8193efb71_1280.jpg", "featured_image_id": 98, "language": null, "require_virtus": 1, "recognition_type": null, "recognition_template_id": null, "recognition_generation_type": null, "recognition_content": null, "allow_termable_addition_after_end_date": 1, "created_at": "2022-05-13T17:17:44.000000Z", "updated_at": "2023-01-17T20:20:59.000000Z", "deleted_at": null, "has_ended": false, "is_upcoming": false, "pivot": { "user_id": 115, "term_id": 2, "id": 1862, "term_start_date": "2022-06-02T00:00:00.000000Z", "term_end_date": "2022-11-29T00:00:00.000000Z", "created_at": "2022-05-31T19:25:56.000000Z", "updated_at": "2022-05-31T19:25:56.000000Z", "credits_goal": 1, "credits_added_completed_object": { "required_credits_added": 1, "required_credits_completed": 1, "total_credits_added": 1, "total_credits_completed": 1, "credits_added_percentage": 100, "credits_completed_percentage": 100 } } }, ... ] }
...