Create a user by external reference
POST/api/users/by-reference
Requires admin token. Create a user in the Ownli System identified only by the partner's remote-system id (externalReference). Email, phone, address and policy are all optional. Identity is externalReference + contributor.
Request
Query Parameters
Return the user object if a user matching externalReference for this contributor exists. Default behavior is to return an error.
- application/json
Body
required
Possible values: Value must match regular expression ^[A-Za-z0-9._:\-/]{1,128}$
The user's id in the partner's remote/login system. This is the only required field. (Required)
User's First Name. (Optional)
User's Last Name. (Optional)
User's Email. (Optional)
Has the user's email been verified by the partner?
Cell Phone Number in the E.164 format +15556667777. (Optional)
Has the user's phone been verified by the partner?
Custom Field 1
Custom Field 2
Custom Field 3
Custom Field 4
Custom Field 5
address
object
Address
Street Address
City
2 Letter State Code (eg. AL, CA, CO etc.
2 Letter Country Code. Must be US.
Zipcode
policyInfo
object
Address
Policy Number
[startDate] The start date of the policy. ISO8601 UTC format YYY-MM-DDThh:mm:ss.SSSZ (e.g. 2024-01-01T00:00:00.000Z). Required unless caller is in policy.dates-optional.partner-ids.
[endDate] The end date of the policy. ISO8601 UTC format YYY-MM-DDThh:mm:ss.SSSZ (e.g. 2024-01-01T00:00:00.000Z). Required unless caller is in policy.dates-optional.partner-ids.
Responses
- 200
- 400
- 401
- 409
- 500
The created user object.
- application/json
- Schema
- Example (from schema)
Schema
Unique Id for the user
User's first name
User's last name
User's email address
User's cell phone number
Internal admin note
The user's id in the partner's remote/login system, if the user was created via the external-reference endpoint. Null otherwise.
Custom Field 1
Custom Field 2
Custom Field 3
Custom Field 4
Custom Field 5
address
object
Address
Street Address Line 1
Street Address Line 2
City
2 Letter State Code
2 Letter Country Code
Zip
policyInfo
object
Policy
Policy Number
Start Date
End Date
Possible values: [None, Accepted, Declined]
User's answer to terms of service for sharing data with Partner. (Only valid for certain partners)
A code generated for the user to share with Partner. (Only valid for certain partners)
Time at which user was registered on the system
Last updated timestamp
{
"id": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"phone": "string",
"adminNote": "string",
"externalReference": "string",
"customField1": "string",
"customField2": "string",
"customField3": "string",
"customField4": "string",
"customField5": "string",
"address": {
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string"
},
"policyInfo": {
"policyNumber": "string",
"startDate": "string",
"endDate": "string"
},
"tosAnswer": "None",
"partnerCode": "string",
"dateRegistered": "string",
"updated": "string",
"emailVerified": true,
"phoneVerified": true,
"fraud": true
}
Invalid parameters or invalid state code passed in address. Possible error codes
-
ERROR_INVALID_STATE_CODE
-
ERROR_INVALID_PARAMETERS
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Authorization error e.g. due to an invalid or missing API keys.
User exists with same externalReference for this contributor (when returnExistingUserIfExists is false). Possible error codes
-
ERROR_USER_ALREADY_EXISTS
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Internal error. Possible error codes
-
INTERNAL_SERVER_ERROR
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}