General Information
...
Service | API | Method |
---|
urac | /join | POST |
Data Model: %Link to Data Model%Models: Users, Tokens
Workflow: %Link to Architecture Page% Join Flow
Input
...
Type: application/json
Name | Source | Mandatory | Type | Special Format | Description |
---|
|
---|
username | Body | YES | String | alphanumeric with _ , - characters only |
|
password | Body | YES | String | N/A |
|
firstName | Body | YES | String | N/A |
|
lastName | Body | YES | String | N/A |
| ...
|
|
email | Body | YES | String | Email Address Format (JSON Schema Validation) |
|
Output
...
Valid Response
Code Block |
---|
language | js |
---|
title | Valid Response Sample |
---|
|
{
"result": true,
"data": {
"..."
}
} |
...
Invalid Response
Code Block |
---|
language | js |
---|
title | Error Response Sample |
---|
|
{
"result":false,
"errors":{
"codes":[400402],
"details":[
{
"code":400402,
"message":"ProblemUser withaccount the provided passwordalready exists."
}
]
}
} |
Error Codes
| |
---|
402 | User account already exists. |
400 | Database |
Error
Example (CURL)
...
Request
Code Block |
---|
language | bash |
---|
title | Calling YOUR Join API |
---|
|
> CURL -X POST http://127.0.0.1:4000/urac/...join -d 'username=john&password=johnpassword&firstName=John&lastName=Doe&email=johndoe@domain.com' |
Response
Code Block |
---|
language | js |
---|
title | YOUR Join API response |
---|
|
{
"result": true,
"data": {
"_id": "57063608622c47b5c097d19b57c6eb28962f94a7caab8a23",
"..."token": "819b0aed-edd8-47d5-ada0-9e5f93cb8248"
}
} |