API reference
Instance access
Manage which users can access a merchant's company, through the instance gateway.
Get access
GET
Retrieves all users that have access to the merchant's company
Query parameters:
| Name | Type | Required | Description |
|---|---|---|---|
merchant_id |
string | No | Merchant ID (takes priority over domain_id and property_id) |
domain_id |
string | No | Domain ID (takes priority over property_id) |
property_id |
string | No | Property ID |
200An array with all usersapplication/json
Pagination metadata
Show properties
Show properties
The user id
The user email address
The user first name, optional
The user last name, optional
The user's role in the company.
Possible values:
OWNER ADMINAccess is active or not
The user that granted access to this user, optional.
Show properties
get/portal/instance/access/users
GET /api/portal/instance/access/users HTTP/1.1 Host: partners.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
200An array with all users
{
"meta": {
"current_page": 0,
"next_page": 0,
"prev_page": 0
},
"result": [{
"id": "c4111c2607214aaaa9349371wkflsagx",
"email": "john@doe.com",
"first_name": "John",
"last_name": "Doe",
"role": "OWNER",
"is_active": true,
"created_by": {
"id": "string",
"email": "string",
"first_name": "string",
"last_name": "string"
}
}]
}Grant access
POST
Grant company access to the specified user with the specified role. The system will send an invitation email to the newly created user.
Query parameters:
| Name | Type | Required | Description |
|---|---|---|---|
merchant_id |
string | No | Merchant ID (takes priority over domain_id and property_id) |
domain_id |
string | No | Domain ID (takes priority over property_id) |
property_id |
string | No | Property ID |
Request bodyapplication/json
The target email address
The role the user will be granted in the company.
Possible values:
OWNER ADMIN200Merchant added to the partner accountapplication/json
An instance company-level user access
Show properties
The user id
The user email address
The user first name, optional
The user last name, optional
The user's role in the company.
Possible values:
OWNER ADMINAccess is active or not
The user that granted access to this user, optional.
Show properties
post/portal/instance/access/users
POST /api/portal/instance/access/users HTTP/1.1 Host: partners.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* { "target_email": "john@doe.com", "role": "OWNER" }
200Merchant added to the partner account
{
"result": {
"id": "c4111c2607214aaaa9349371wkflsagx",
"email": "john@doe.com",
"first_name": "John",
"last_name": "Doe",
"role": "OWNER",
"is_active": true,
"created_by": {
"id": "string",
"email": "string",
"first_name": "string",
"last_name": "string"
}
}
}Provision access
POST
Instantly provision the specified user and role in the company and return a magic link. This performs just-in-time user access creation or access updating.
Query parameters:
| Name | Type | Required | Description |
|---|---|---|---|
merchant_id |
string | No | Merchant ID (takes priority over domain_id and property_id) |
domain_id |
string | No | Domain ID (takes priority over property_id) |
property_id |
string | No | Property ID |
Request bodyapplication/json
The email account of the user you want to provision
The role to assign to the specified user
Possible values:
OWNER ADMINSet this field to false to disable switching between companies for the target user.
200The user access information and authentication informationapplication/json
Show properties
The provisioned account id
The provisioned account email
The provisioned account role
Possible values:
OWNER ADMINThe magic link that can be returned to the user in order for them to authenticate to their account.
post/portal/instance/access/users/provision
POST /api/portal/instance/access/users/provision HTTP/1.1 Host: partners.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* { "email": "string", "role": "OWNER", "access_switch": false }
200The user access information and authentication information
{
"result": {
"id": "string",
"email": "string",
"role": "OWNER",
"is_active": false,
"login_url": "string"
}
}Get access
GET
Retrieve information about a user's access
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
userId |
string | Yes | User id |
Query parameters:
| Name | Type | Required | Description |
|---|---|---|---|
merchant_id |
string | No | Merchant ID (takes priority over domain_id and property_id) |
domain_id |
string | No | Domain ID (takes priority over property_id) |
property_id |
string | No | Property ID |
200The user access informationapplication/json
An instance company-level user access
Show properties
The user id
The user email address
The user first name, optional
The user last name, optional
The user's role in the company.
Possible values:
OWNER ADMINAccess is active or not
The user that granted access to this user, optional.
Show properties
get/portal/instance/access/users/{userId}
GET /api/portal/instance/access/users/{userId} HTTP/1.1 Host: partners.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
200The user access information
{
"result": {
"id": "c4111c2607214aaaa9349371wkflsagx",
"email": "john@doe.com",
"first_name": "John",
"last_name": "Doe",
"role": "OWNER",
"is_active": true,
"created_by": {
"id": "string",
"email": "string",
"first_name": "string",
"last_name": "string"
}
}
}Update access
PUT
Update access information for the specified user
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
userId |
string | Yes | User id |
Query parameters:
| Name | Type | Required | Description |
|---|---|---|---|
merchant_id |
string | No | Merchant ID (takes priority over domain_id and property_id) |
domain_id |
string | No | Domain ID (takes priority over property_id) |
property_id |
string | No | Property ID |
Request bodyapplication/json
The id of the role to assign to the user. Look up role ids with GET /portal/instance/company/roles, for example `?code=ADMIN`.
Enables or disables the user's access in the company. Defaults to true, so omitting it re-activates a deactivated user.
put/portal/instance/access/users/{userId}
PUT /api/portal/instance/access/users/{userId} HTTP/1.1 Host: partners.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* { "role_id": 0, "is_active": false }
200Acknowledgement that request was successful.
{}Delete access
DELETE
Removes the specified user's access in the company.
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
userId |
string | Yes | User id |
Query parameters:
| Name | Type | Required | Description |
|---|---|---|---|
merchant_id |
string | No | Merchant ID (takes priority over domain_id and property_id) |
domain_id |
string | No | Domain ID (takes priority over property_id) |
property_id |
string | No | Property ID |
200User access deletion confirmationapplication/json
delete/portal/instance/access/users/{userId}
DELETE /api/portal/instance/access/users/{userId} HTTP/1.1 Host: partners.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Accept: */*
200User access deletion confirmation
{
"result": {}
}