Create Enrollment
Cloud Mock
Cloud Mock
POST
/v1/site/{siteId}/enrollments
enrollments
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Path Params
siteId
string
required
Body Params application/json
device_ids
array[string]
required
program_id
string <uuid>
Program ID
enroll_method
enum<string>
required
Allowed values:
AUTO_ENROLLUSER_ACTION
has_agreed_to_terms_and_conditions
boolean | null
optional
terms_and_conditions_version
string | null
optional
program_specific_attributes
array [object {2}]
optional
name
string
required
value
string
required
Example
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://mock.apidog.com/m1/479670-0-default/v1/site//enrollments' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200OK
application/json
Body
id
string <uuid>
Id
device_ids
array[string]
required
site_id
string
required
program_id
string <uuid>
Program Id
enroll_method
enum<string>
required
Allowed values:
AUTO_ENROLLUSER_ACTION
status
enum<string>
required
Allowed values:
ACTIVENEEDS_ACTIONPENDINGREJECTEDUNENROLLED
status_reason
string | null
read-onlyrequired
enrolled_at
string <date-time> | null
Enrolled At
unenrolled_at
string <date-time> | null
Unenrolled At
program_specific_attributes
array [object {2}]
required
name
string
required
value
string
required
has_agreed_to_terms_and_conditions
boolean | null
required
terms_and_conditions_version
string | null
required
Example
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"device_ids": [
"string"
],
"site_id": "string",
"program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",
"enroll_method": "AUTO_ENROLL",
"status": "ACTIVE",
"status_reason": "string",
"enrolled_at": "2019-08-24T14:15:22Z",
"unenrolled_at": "2019-08-24T14:15:22Z",
"program_specific_attributes": [
{
"name": "string",
"value": "string"
}
],
"has_agreed_to_terms_and_conditions": true,
"terms_and_conditions_version": "string"
}
🟠400Invalid input
🟠404Record not found
🟠409Conflict
🟠422Missing information
Modified at 2024-12-10 13:27:37