Sections below contain API details used by LetsDecide partners to perform various administrative activities programmatically through Partner API.
Prerequisites & Guidelines:
- You will need a partner key to access all REST API calls.
- When a partner key is generated, it is associated with one or more license types that can be used by partners to create new tribes.
- Please contact us at contact@letsdecide.ai to get one.
- Every request must set the Authorization request header with the value: LetsDecide <partner key>.
- Unless specified, all request parameters are mandatory.
- All request responses are in the standard JSON format. Make sure Content-Type is set to application/json.
Create a new Tribe | PUT /partner/tribe |
Request | { "externalId": "string", "licenseType": "string", "name": "string" }
|
Response (200) | { "externalId": "string", "statusMessage": "string", "tribeId": "string" }
|
Possible Errors | 400 - Partner not found, invalid license type. 401 - Invalid or missing partner key 500 - Tribe name is not unique. |
Update a Tribe | POST /partner/tribe |
Request | { "name": "string", "tribeId": "string" }
|
Response(200) | { "name": "string", "statusMessage": "string", "tribeId": "string" }
|
Possible Errors | 400 - Partner not owner, invalid license type, missing one or more values in the request payload 401 - Invalid or missing partner key |
Get tribe details | GET /partner/tribe/{tribeId} |
Request | tribeId - tribe's Id, pass it as part of the URI. |
Response(200) | { "externalId": "string", "name": "string", "statusMessage": "string", "tribeId": "string" }
|
Possible Errors | 400 - Partner not owner 401 - Invalid or missing partner key |
Remove tribe | DELETE /partner/tribe/{tribeId} |
Request | tribeId - tribe's Id, pass it as part of the URI. |
Response(200) | { "statusMessage": "string", "tribeId": "string" }
|
Possible Errors | 400 - Partner not owner 401 - Invalid or missing partner key |
Create a new user in the tribe | PUT /partner/user |
Request | { "email": "string", "firstName": "string", "lastName": "string", "tribeId": "string" }
|
Response(200) | { "statusMessage": "string", "tribeId": "string", "userId": "string" }
|
Possible Errors | 400 - Partner not owner, user already exists in that tribe, missing one or more values in the request payload 401 - Invalid or missing partner key |
Update user details | POST /partner/user |
Request | { "firstName": "string", "lastName": "string", "userId": "string" }
|
Response(200) | { "email": "string", "firstName": "string", "lastName": "string", "statusMessage": "string", "userId": "string", "isActive": bool }
|
Possible Errors | 400 - Partner not owner, missing one or more values in the request payload 401 - Invalid or missing partner key |
Activate/Deactivate user | POST /partner/user/active |
Request | { "userId": "string", "isActive": bool }
|
Response(200) | { "email": "string", "firstName": "string", "lastName": "string", "statusMessage": "string", "userId": "string", "isActive": bool
|
Possible Errors | 400 - Partner not owner, missing one or more values in the request payload 401 - Invalid or missing partner key |
Get user details | GET /partner/user/{userId} |
Request | userId - user's Id, pass it as part of the URI. |
Response(200) | { "email": "string", "firstName": "string", "lastName": "string", "statusMessage": "string", "userId": "string", "isActive": bool }
|
Possible Errors | 400 - Partner not owner 401 - Invalid or missing partner key |
Remove user from tribe | DELETE /partner/user/{userId} |
Request | userId - user's Id, pass it as part of the URI. |
Response(200) | { "statusMessage": "string", "tribeId": "string", "userId": "string" }
|
400 - Partner not owner 401 - Invalid or missing partner key |
Generate user login URL | POST /partner/user/login |
Request | { "userId": "string" }
|
Response(200) | { "statusMessage": "string", "url": "string" }
|
Possible Errors | 400 - Partner not found 401 - Invalid or missing partner key, invalid user |