Partner API
- Base URL:
https://partner-directory-api.sls.epilot.io - API Docs: https://docs.epilot.io/api/partner-directory
Management of Partners in epilot
Quick Startโ
# List available operations
epilot partner-directory
# Call an operation
epilot partner-directory approvePartner -p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc
Common Flagsโ
| Flag | Description |
|---|---|
-p key=value | Set a named parameter |
-d '{...}' | Request body JSON |
-H 'Key: Value' | Custom header |
-t, --token <token> | Bearer token for authentication |
--profile <name> | Use a named profile |
-s, --server <url> | Override server base URL |
-i, --include | Include response headers in output |
--json | Output raw JSON (no formatting) |
-v, --verbose | Verbose output (show request details) |
--jsonata <expr> | JSONata expression to transform response |
--definition <file> | Override OpenAPI spec file/URL |
--guided | Prompt for all parameters interactively |
--no-interactive | Disable interactive prompts |
Operationsโ
partners
approvePartnerโ Approve partner requestrejectPartnerโ Reject partner requestsearchAssignableโ Search for assignable users/organizations from this organization and PartnersbatchGetAssignableโ Search for assignable users from this organization by its idsgetPartnerByTokenโ Get partner by tokenactivatePartnerโ Activate partner using an invite tokensearchGeolocationForTextโ Converts a given string, in the format of an address, to geo-location latitude and longitudeinvitePartnerV2โ Invite a partner into collaboration. It will send an email to partner and ask to join into collaboration
partner_users
getPartnerUsersโ Get all users for a partner organization with their rolescreatePartnerUserโ Create a new user in a partner organizationdeletePartnerUserโ Delete a user from a partner organizationgetPartnerRolesโ Get all roles for a partner organizationcreatePartnerRoleโ Create a role for a partner organizationupdatePartnerRoleโ Update a role for a partner organizationassignPartnerUserRolesโ Assign roles to a user in a partner organizationunassignPartnerUserRolesโ Unassign roles from a user in a partner organization
approvePartnerโ
Approve partner request
POST /v1/partners/{id}/approve
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The Id of partner |
Sample Call
epilot partner-directory approvePartner \
-p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc
Using positional args for path parameters:
epilot partner-directory approvePartner e45a6dc2-3795-43a3-ae0f-6b6760f310fc
With JSONata filter:
epilot partner-directory approvePartner -p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc --jsonata 'id'
Sample Response
{
"id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc",
"organization_id": "123",
"created_at": "2022-02-08T04:44:32.246Z",
"description": "Description",
"company_name": "Company name",
"invitation_token": "string",
"invitation_email": "user@example.com",
"email": "user@example.com",
"owner_email": "user@example.com",
"signed_up_email": "user@example.com",
"partner_org_id": 123456,
"status": "Pending"
}
rejectPartnerโ
Reject partner request
POST /v1/partners/{id}/reject
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The Id of partner |
Sample Call
epilot partner-directory rejectPartner \
-p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc
Using positional args for path parameters:
epilot partner-directory rejectPartner e45a6dc2-3795-43a3-ae0f-6b6760f310fc
With JSONata filter:
epilot partner-directory rejectPartner -p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc --jsonata 'id'
Sample Response
{
"id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc",
"organization_id": "123",
"created_at": "2022-02-08T04:44:32.246Z",
"description": "Description",
"company_name": "Company name",
"invitation_token": "string",
"invitation_email": "user@example.com",
"email": "user@example.com",
"owner_email": "user@example.com",
"signed_up_email": "user@example.com",
"partner_org_id": 123456,
"status": "Pending"
}
searchAssignableโ
Search for assignable users/organizations from this organization and Partners
POST /v1/partners/assignables:search
Request Body
Sample Call
epilot partner-directory searchAssignable
With request body:
epilot partner-directory searchAssignable \
-d '{
"q": "",
"from": 0,
"size": 25,
"org_ids": ["123"],
"portalUsersEntityIdScope": "",
"types": ["user", "partner_user", "partner_organization", "ecp", "group"]
}'
Using stdin pipe:
cat body.json | epilot partner-directory searchAssignable
With JSONata filter:
epilot partner-directory searchAssignable --jsonata 'results[0]'
Sample Response
{
"hits": 25,
"results": [
{
"type": "user",
"display_name": "Example User",
"image_uri": {
"original": "https://epilot-staging-user-content.s3.eu-central-1.amazonaws.com/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png",
"thumbnail_32": "https://file.sls.epilot.io/v1/files/public/preview?w=32&h=32&key=/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png"
},
"org_id": "123",
"created_at": "2022-02-08T04:44:32.246Z",
"activated_at": "2022-02-08T04:44:32.246Z",
"status": "Active",
"user_id": "456",
"email": "example@example.com"
}
]
}
batchGetAssignableโ
Search for assignable users from this organization by its ids
POST /v1/partners/assignables:batchGet
Request Body
Sample Call
epilot partner-directory batchGetAssignable \
-d '[{"user_id":"string","org_id":"string","group_id":"string"}]'
Using stdin pipe:
cat body.json | epilot partner-directory batchGetAssignable
With JSONata filter:
epilot partner-directory batchGetAssignable --jsonata 'results[0]'
Sample Response
{
"hits": 25,
"results": [
{
"type": "user",
"display_name": "Example User",
"image_uri": {
"original": "https://epilot-staging-user-content.s3.eu-central-1.amazonaws.com/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png",
"thumbnail_32": "https://file.sls.epilot.io/v1/files/public/preview?w=32&h=32&key=/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png"
},
"org_id": "123",
"created_at": "2022-02-08T04:44:32.246Z",
"activated_at": "2022-02-08T04:44:32.246Z",
"status": "Active",
"user_id": "456",
"email": "example@example.com"
}
]
}
getPartnerByTokenโ
Get partner by token
GET /v1/partner-directory/public/getPartnerByToken
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
token | query | string | Yes | Invite Token |
Sample Call
epilot partner-directory getPartnerByToken \
-p token=example
With JSONata filter:
epilot partner-directory getPartnerByToken -p token=example --jsonata 'id'
Sample Response
{
"id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc",
"organization_id": "123",
"created_at": "2022-02-08T04:44:32.246Z",
"description": "Description",
"company_name": "Company name",
"invitation_token": "string",
"invitation_email": "user@example.com",
"email": "user@example.com",
"owner_email": "user@example.com",
"signed_up_email": "user@example.com",
"partner_org_id": 123456,
"status": "Pending"
}
activatePartnerโ
Activate partner using an invite token
POST /v1/partner-directory/public/activate
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
token | query | string | Yes | Invite Token |
Request Body
Sample Call
epilot partner-directory activatePartner \
-p token=example \
-d '{"company_name":"Company name","signed_up_email":"user@example.com","organization_id":"string"}'
Using stdin pipe:
cat body.json | epilot partner-directory activatePartner -p token=example
With JSONata filter:
epilot partner-directory activatePartner -p token=example --jsonata '$'
searchGeolocationForTextโ
Converts a given string, in the format of an address, to geo-location latitude and longitude
POST /v1/geolocation/text:search
Request Body
Sample Call
epilot partner-directory searchGeolocationForText \
-d '{"address":"Auweg 1, 93055 Regensburg, DE"}'
Using stdin pipe:
cat body.json | epilot partner-directory searchGeolocationForText
With JSONata filter:
epilot partner-directory searchGeolocationForText --jsonata 'lat'
Sample Response
{
"lat": 49.013,
"lng": 12.101,
"addressLabel": "string",
"relevance": 0
}
invitePartnerV2โ
Invite a partner into collaboration. It will send an email to partner and ask to join into collaboration
POST /v2/partners/{id}/invite
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The Id of partner |
Request Body
Sample Call
epilot partner-directory invitePartnerV2 \
-p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc \
-d '{"language":"en"}'
Using positional args for path parameters:
epilot partner-directory invitePartnerV2 e45a6dc2-3795-43a3-ae0f-6b6760f310fc
Using stdin pipe:
cat body.json | epilot partner-directory invitePartnerV2 -p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc
With JSONata filter:
epilot partner-directory invitePartnerV2 -p id=e45a6dc2-3795-43a3-ae0f-6b6760f310fc --jsonata 'id'
Sample Response
{
"id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc",
"organization_id": "123",
"created_at": "2022-02-08T04:44:32.246Z",
"description": "Description",
"company_name": "Company name",
"invitation_token": "string",
"invitation_email": "user@example.com",
"email": "user@example.com",
"owner_email": "user@example.com",
"signed_up_email": "user@example.com",
"partner_org_id": 123456,
"status": "Pending"
}
getPartnerUsersโ
Get all users for a partner organization with their roles
GET /v2/partners/{orgId}/users
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orgId | path | string | Yes | The organization ID of the partner |
Sample Call
epilot partner-directory getPartnerUsers \
-p orgId=123
Using positional args for path parameters:
epilot partner-directory getPartnerUsers 123
With JSONata filter:
epilot partner-directory getPartnerUsers -p orgId=123 --jsonata 'results[0]'
Sample Response
{
"results": [
{
"id": "456",
"name": "John Doe",
"email": "user@example.com",
"status": "Active",
"image": {
"original": "https://example.com/path",
"thumbnail_32": "https://example.com/path"
},
"roles": [
{
"id": "role-123",
"slug": "admin",
"name": "Administrator"
}
]
}
]
}
createPartnerUserโ
Create a new user in a partner organization
POST /v2/partners/{orgId}/users
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orgId | path | string | Yes | The Partner organization ID where the user should be created |
Request Body
Sample Call
epilot partner-directory createPartnerUser \
-p orgId=123 \
-d '{"email":"user@example.com","language":"en","roles":["role-123","role-456"]}'
Using positional args for path parameters:
epilot partner-directory createPartnerUser 123
Using stdin pipe:
cat body.json | epilot partner-directory createPartnerUser -p orgId=123
With JSONata filter:
epilot partner-directory createPartnerUser -p orgId=123 --jsonata 'id'
Sample Response
{
"id": "456",
"email": "user@example.com",
"display_name": "John Doe",
"status": "Active"
}
deletePartnerUserโ
Delete a user from a partner organization
DELETE /v2/partners/{orgId}/users/{userId}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orgId | path | string | Yes | The organization ID of the partner |
userId | path | string | Yes | The user ID to delete |
Sample Call
epilot partner-directory deletePartnerUser \
-p orgId=123 \
-p userId=123e4567-e89b-12d3-a456-426614174000
Using positional args for path parameters:
epilot partner-directory deletePartnerUser 123 123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot partner-directory deletePartnerUser -p orgId=123 -p userId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'
Sample Response
{}
getPartnerRolesโ
Get all roles for a partner organization
GET /v2/partners/{orgId}/roles
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orgId | path | string | Yes | The organization ID of the partner |
Sample Call
epilot partner-directory getPartnerRoles \
-p orgId=123
Using positional args for path parameters:
epilot partner-directory getPartnerRoles 123
With JSONata filter:
epilot partner-directory getPartnerRoles -p orgId=123 --jsonata 'results[0]'
Sample Response
{
"results": [
{
"id": "role-123",
"slug": "admin",
"name": "Administrator",
"type": "share_role"
}
]
}
createPartnerRoleโ
Create a role for a partner organization
POST /v2/partners/{orgId}/roles
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orgId | path | string | Yes | The organization ID of the partner |
Request Body
Sample Call
epilot partner-directory createPartnerRole \
-p orgId=123
With request body:
epilot partner-directory createPartnerRole \
-p orgId=123 \
-d '{
"name": "Partner Admin",
"slug": "partner_admin",
"grants": [
{
"action": "entity-read",
"resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",
"effect": "allow",
"conditions": [
{
"attribute": "workflows.primary.task_name",
"operation": "equals",
"values": ["Qualification"]
}
],
"dependencies": [
{
"action": "entity-read",
"resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",
"effect": "allow",
"conditions": [
{
"attribute": "workflows.primary.task_name",
"operation": "equals",
"values": ["Qualification"]
}
]
}
]
}
]
}'
Using positional args for path parameters:
epilot partner-directory createPartnerRole 123
Using stdin pipe:
cat body.json | epilot partner-directory createPartnerRole -p orgId=123
With JSONata filter:
epilot partner-directory createPartnerRole -p orgId=123 --jsonata 'id'
Sample Response
{
"id": "role-123",
"slug": "admin",
"name": "Administrator",
"type": "share_role"
}
updatePartnerRoleโ
Update a role for a partner organization
PUT /v2/partners/{orgId}/roles/{roleId}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orgId | path | string | Yes | The organization ID of the partner |
roleId | path | string | Yes | The role ID to update |
Request Body
Sample Call
epilot partner-directory updatePartnerRole \
-p orgId=123 \
-p roleId=123e4567-e89b-12d3-a456-426614174000
With request body:
epilot partner-directory updatePartnerRole \
-p orgId=123 \
-p roleId=123e4567-e89b-12d3-a456-426614174000 \
-d '{
"grants": [
{
"action": "entity-read",
"resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",
"effect": "allow",
"conditions": [
{
"attribute": "workflows.primary.task_name",
"operation": "equals",
"values": ["Qualification"]
}
],
"dependencies": [
{
"action": "entity-read",
"resource": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947",
"effect": "allow",
"conditions": [
{
"attribute": "workflows.primary.task_name",
"operation": "equals",
"values": ["Qualification"]
}
]
}
]
}
],
"id": "123:owner",
"name": "Owner",
"slug": "owner"
}'
Using positional args for path parameters:
epilot partner-directory updatePartnerRole 123 123e4567-e89b-12d3-a456-426614174000
Using stdin pipe:
cat body.json | epilot partner-directory updatePartnerRole -p orgId=123 -p roleId=123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot partner-directory updatePartnerRole -p orgId=123 -p roleId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'id'
Sample Response
{
"id": "role-123",
"slug": "admin",
"name": "Administrator",
"type": "share_role"
}
assignPartnerUserRolesโ
Assign roles to a user in a partner organization
POST /v2/partners/{orgId}/users/{userId}/roles
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orgId | path | string | Yes | The organization ID of the partner |
userId | path | string | Yes | The user ID |
Request Body
Sample Call
epilot partner-directory assignPartnerUserRoles \
-p orgId=123 \
-p userId=123e4567-e89b-12d3-a456-426614174000 \
-d '{"roleIds":["role-123","role-456"]}'
Using positional args for path parameters:
epilot partner-directory assignPartnerUserRoles 123 123e4567-e89b-12d3-a456-426614174000
Using stdin pipe:
cat body.json | epilot partner-directory assignPartnerUserRoles -p orgId=123 -p userId=123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot partner-directory assignPartnerUserRoles -p orgId=123 -p userId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'results[0]'
Sample Response
{
"results": [
{
"roleId": "string",
"success": true,
"data": {},
"error": {}
}
]
}
unassignPartnerUserRolesโ
Unassign roles from a user in a partner organization
DELETE /v2/partners/{orgId}/users/{userId}/roles
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orgId | path | string | Yes | The organization ID of the partner |
userId | path | string | Yes | The user ID |
Request Body
Sample Call
epilot partner-directory unassignPartnerUserRoles \
-p orgId=123 \
-p userId=123e4567-e89b-12d3-a456-426614174000 \
-d '{"roleIds":["role-123","role-456"]}'
Using positional args for path parameters:
epilot partner-directory unassignPartnerUserRoles 123 123e4567-e89b-12d3-a456-426614174000
Using stdin pipe:
cat body.json | epilot partner-directory unassignPartnerUserRoles -p orgId=123 -p userId=123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot partner-directory unassignPartnerUserRoles -p orgId=123 -p userId=123e4567-e89b-12d3-a456-426614174000 --jsonata 'results[0]'
Sample Response
{
"results": [
{
"roleId": "string",
"success": true,
"data": {},
"error": {}
}
]
}