@epilot/sdk 2.2.1 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/access-token-runtime.json +1 -0
- package/definitions/access-token.json +663 -0
- package/definitions/address-runtime.json +1 -0
- package/definitions/address-suggestions-runtime.json +1 -0
- package/definitions/address-suggestions.json +582 -0
- package/definitions/address.json +578 -0
- package/definitions/ai-agents-runtime.json +1 -0
- package/definitions/ai-agents.json +1711 -0
- package/definitions/app-runtime.json +1 -0
- package/definitions/app.json +4493 -0
- package/definitions/audit-logs-runtime.json +1 -0
- package/definitions/audit-logs.json +305 -0
- package/definitions/automation-runtime.json +1 -0
- package/definitions/automation.json +4819 -0
- package/definitions/billing-runtime.json +1 -0
- package/definitions/billing.json +837 -0
- package/definitions/blueprint-manifest-runtime.json +1 -0
- package/definitions/blueprint-manifest.json +3490 -0
- package/definitions/consent-runtime.json +1 -0
- package/definitions/consent.json +344 -0
- package/definitions/customer-portal-runtime.json +1 -0
- package/definitions/customer-portal.json +15676 -0
- package/definitions/dashboard-runtime.json +1 -0
- package/definitions/dashboard.json +484 -0
- package/definitions/data-management-runtime.json +1 -0
- package/definitions/data-management.json +972 -0
- package/definitions/deduplication-runtime.json +1 -0
- package/definitions/deduplication.json +183 -0
- package/definitions/design-runtime.json +1 -0
- package/definitions/design.json +1423 -0
- package/definitions/document-runtime.json +1 -0
- package/definitions/document.json +758 -0
- package/definitions/email-settings-runtime.json +1 -0
- package/definitions/email-settings.json +2748 -0
- package/definitions/email-template-runtime.json +1 -0
- package/definitions/email-template.json +1441 -0
- package/definitions/entity-mapping-runtime.json +1 -0
- package/definitions/entity-mapping.json +1642 -0
- package/definitions/entity-runtime.json +1 -0
- package/definitions/entity.json +10404 -0
- package/definitions/environments-runtime.json +1 -0
- package/definitions/environments.json +363 -0
- package/definitions/erp-integration-runtime.json +1 -0
- package/definitions/erp-integration.json +6780 -0
- package/definitions/event-catalog-runtime.json +1 -0
- package/definitions/event-catalog.json +1051 -0
- package/definitions/file-runtime.json +1 -0
- package/definitions/file.json +2842 -0
- package/definitions/iban-runtime.json +1 -0
- package/definitions/iban.json +132 -0
- package/definitions/journey-runtime.json +1 -0
- package/definitions/journey.json +2594 -0
- package/definitions/kanban-runtime.json +1 -0
- package/definitions/kanban.json +1505 -0
- package/definitions/message-runtime.json +1 -0
- package/definitions/message.json +2660 -0
- package/definitions/metering-runtime.json +1 -0
- package/definitions/metering.json +2321 -0
- package/definitions/notes-runtime.json +1 -0
- package/definitions/notes.json +1531 -0
- package/definitions/notification-runtime.json +1 -0
- package/definitions/notification.json +1425 -0
- package/definitions/organization-runtime.json +1 -0
- package/definitions/organization.json +1192 -0
- package/definitions/partner-directory-runtime.json +1 -0
- package/definitions/partner-directory.json +2284 -0
- package/definitions/permissions-runtime.json +1 -0
- package/definitions/permissions.json +1515 -0
- package/definitions/pricing-runtime.json +1 -0
- package/definitions/pricing-tier-runtime.json +1 -0
- package/definitions/pricing-tier.json +105 -0
- package/definitions/pricing.json +9884 -0
- package/definitions/purpose-runtime.json +1 -0
- package/definitions/purpose.json +524 -0
- package/definitions/sandbox-runtime.json +1 -0
- package/definitions/sandbox.json +453 -0
- package/definitions/submission-runtime.json +1 -0
- package/definitions/submission.json +313 -0
- package/definitions/targeting-runtime.json +1 -0
- package/definitions/targeting.json +1474 -0
- package/definitions/template-variables-runtime.json +1 -0
- package/definitions/template-variables.json +1408 -0
- package/definitions/user-runtime.json +1 -0
- package/definitions/user.json +2408 -0
- package/definitions/validation-rules-runtime.json +1 -0
- package/definitions/validation-rules.json +1491 -0
- package/definitions/webhooks-runtime.json +1 -0
- package/definitions/webhooks.json +1634 -0
- package/definitions/workflow-definition-runtime.json +1 -0
- package/definitions/workflow-definition.json +3417 -0
- package/definitions/workflow-runtime.json +1 -0
- package/definitions/workflow.json +4146 -0
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.d.cts +2 -2
- package/dist/apis/automation.d.ts +2 -2
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-management.cjs +6 -6
- package/dist/apis/data-management.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +8 -8
- package/dist/apis/entity.d.cts +2 -2
- package/dist/apis/entity.d.ts +2 -2
- package/dist/apis/entity.js +2 -2
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/erp-integration.cjs +8 -8
- package/dist/apis/erp-integration.d.cts +2 -2
- package/dist/apis/erp-integration.d.ts +2 -2
- package/dist/apis/erp-integration.js +2 -2
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.d.cts +2 -2
- package/dist/apis/journey.d.ts +2 -2
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{automation.d-KOiZ6ru5.d.cts → automation.d-D7BzN7Gq.d.cts} +4 -0
- package/dist/{automation.d-KOiZ6ru5.d.ts → automation.d-D7BzN7Gq.d.ts} +4 -0
- package/dist/bin/cli.js +1 -1
- package/dist/{chunk-6TKKEGYU.cjs → chunk-EH7KVFLO.cjs} +5 -5
- package/dist/{chunk-TPA4HEAO.js → chunk-LHVRAAFH.js} +1 -1
- package/dist/{chunk-IGVVJMX7.cjs → chunk-ODD4JQVS.cjs} +1 -1
- package/dist/chunk-RKSUIRD2.js +14 -0
- package/dist/{chunk-G33CBNJD.js → chunk-TUSCE6W2.js} +5 -5
- package/dist/chunk-XLQ4ZRBF.cjs +14 -0
- package/dist/entity-RCWJZZXM.cjs +7 -0
- package/dist/entity-X374X6EQ.js +7 -0
- package/dist/{entity-runtime-QSFVEFJ6.js → entity-runtime-CWQUEFCS.js} +1 -1
- package/dist/entity-runtime-EOWSEXC7.cjs +5 -0
- package/dist/{entity.d-DtiajmaY.d.cts → entity.d-t9R21446.d.cts} +140 -4
- package/dist/{entity.d-DtiajmaY.d.ts → entity.d-t9R21446.d.ts} +140 -4
- package/dist/erp-integration-6I4B4BIU.cjs +7 -0
- package/dist/erp-integration-G54BMGGE.js +7 -0
- package/dist/{erp-integration-runtime-FNJXDO75.js → erp-integration-runtime-6SBLYZ34.js} +1 -1
- package/dist/{erp-integration-runtime-WXZIQCLJ.cjs → erp-integration-runtime-HZI2P4X7.cjs} +2 -2
- package/dist/{erp-integration.d-DOhxy4P5.d.cts → erp-integration.d-BV3Rv9e6.d.cts} +479 -14
- package/dist/{erp-integration.d-DOhxy4P5.d.ts → erp-integration.d-BV3Rv9e6.d.ts} +479 -14
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/journey-HKN7QXCZ.cjs +7 -0
- package/dist/journey-UBZCOJNW.js +7 -0
- package/dist/{journey.d-ClXO0xK8.d.cts → journey.d-BguKXj73.d.cts} +0 -8
- package/dist/{journey.d-ClXO0xK8.d.ts → journey.d-BguKXj73.d.ts} +0 -8
- package/dist/{js-yaml-UPZKYVRY.js → js-yaml-DLCVPJ7G.js} +17 -15
- package/docs/entity.md +337 -5
- package/docs/erp-integration.md +643 -16
- package/docs/journey.md +0 -6
- package/package.json +1 -1
- package/dist/chunk-24T6CJTG.js +0 -14
- package/dist/chunk-TTNPMFXL.cjs +0 -14
- package/dist/entity-FA6PZX6S.js +0 -7
- package/dist/entity-IX5NSHPX.cjs +0 -7
- package/dist/entity-runtime-XSAICIVR.cjs +0 -5
- package/dist/erp-integration-EP2XFEH5.js +0 -7
- package/dist/erp-integration-NNV72VFI.cjs +0 -7
- package/dist/journey-KDR5EU3W.js +0 -7
- package/dist/journey-REBN4TGQ.cjs +0 -7
|
@@ -0,0 +1,2284 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.3",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Partner Directory API",
|
|
5
|
+
"description": "The Partner Directory API enables organizations to manage partnerships within the epilot platform.\n\n- **Partner Directory Management**: Maintain a directory of partner organizations that collaborate with your business\n- **Partner Invitations**: Invite external organizations to become partners through a secure token-based invitation flow\n- **Assignable Search**: Find users and organizations that can be assigned to tasks, workflows, or entities across your organization and partners\n- **Partner User Management**: Manage users within partner organizations, including creating users and assigning roles\n- **Geolocation Services**: Convert addresses to geographic coordinates for partner location-based features\n",
|
|
6
|
+
"version": "1.7.0"
|
|
7
|
+
},
|
|
8
|
+
"tags": [
|
|
9
|
+
{
|
|
10
|
+
"name": "Partners",
|
|
11
|
+
"x-displayName": "Partners",
|
|
12
|
+
"description": "Operations for managing the partner directory including:\n- Inviting new partners to collaborate\n- Approving or rejecting partner requests\n- Searching for assignable users and organizations across partners\n- Looking up partners by invitation token\n- Converting addresses to geolocation coordinates for partner location features\n"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "Partner Users",
|
|
16
|
+
"x-displayName": "Partner Users",
|
|
17
|
+
"description": "Operations for managing users within partner organizations:\n- Listing users in a partner organization\n- Creating new users in partner organizations\n- Deleting users from partner organizations\n- Managing roles and role assignments for partner users\n\nThese operations allow Vendor organizations to control access and permissions for users in their partner network.\n"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"x-tagGroups": [
|
|
21
|
+
{
|
|
22
|
+
"name": "APIs",
|
|
23
|
+
"tags": [
|
|
24
|
+
"Partners",
|
|
25
|
+
"Partner Users"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "Schemas",
|
|
30
|
+
"tags": [
|
|
31
|
+
"partner_schema"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"security": [
|
|
36
|
+
{
|
|
37
|
+
"EpilotAuth": []
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"AsOrganization": []
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"paths": {
|
|
44
|
+
"/v1/partners/{id}/approve": {
|
|
45
|
+
"post": {
|
|
46
|
+
"operationId": "approvePartner",
|
|
47
|
+
"summary": "approvePartner",
|
|
48
|
+
"tags": [
|
|
49
|
+
"Partners"
|
|
50
|
+
],
|
|
51
|
+
"description": "Approves a pending partner request, allowing the partner to begin collaboration.\n\nWhen a partner requests to join your organization's partner network, this endpoint\nis used to approve the request and activate the partnership.\n",
|
|
52
|
+
"parameters": [
|
|
53
|
+
{
|
|
54
|
+
"in": "path",
|
|
55
|
+
"name": "id",
|
|
56
|
+
"schema": {
|
|
57
|
+
"$ref": "#/components/schemas/PartnerId"
|
|
58
|
+
},
|
|
59
|
+
"required": true,
|
|
60
|
+
"description": "The unique identifier of the partner to approve"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"responses": {
|
|
64
|
+
"201": {
|
|
65
|
+
"description": "Partner approved successfully",
|
|
66
|
+
"content": {
|
|
67
|
+
"application/json": {
|
|
68
|
+
"schema": {
|
|
69
|
+
"$ref": "#/components/schemas/Partner"
|
|
70
|
+
},
|
|
71
|
+
"example": {
|
|
72
|
+
"id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc",
|
|
73
|
+
"organization_id": "123",
|
|
74
|
+
"company_name": "Acme Solar GmbH",
|
|
75
|
+
"email": "partner@acme-solar.de",
|
|
76
|
+
"status": "Invited",
|
|
77
|
+
"created_at": "2024-01-15T10:30:00.000Z"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"400": {
|
|
83
|
+
"description": "Unable to approve partner - partner may already be approved or in an invalid state"
|
|
84
|
+
},
|
|
85
|
+
"404": {
|
|
86
|
+
"description": "Partner not found"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"/v1/partners/{id}/reject": {
|
|
92
|
+
"post": {
|
|
93
|
+
"operationId": "rejectPartner",
|
|
94
|
+
"summary": "rejectPartner",
|
|
95
|
+
"tags": [
|
|
96
|
+
"Partners"
|
|
97
|
+
],
|
|
98
|
+
"description": "Rejects a pending partner request, declining the partnership.\n\nWhen a partner requests to join your organization's partner network, this endpoint\nis used to reject the request if the partnership is not desired.\n",
|
|
99
|
+
"parameters": [
|
|
100
|
+
{
|
|
101
|
+
"in": "path",
|
|
102
|
+
"name": "id",
|
|
103
|
+
"schema": {
|
|
104
|
+
"$ref": "#/components/schemas/PartnerId"
|
|
105
|
+
},
|
|
106
|
+
"required": true,
|
|
107
|
+
"description": "The unique identifier of the partner to reject"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"responses": {
|
|
111
|
+
"200": {
|
|
112
|
+
"description": "Partner rejected successfully",
|
|
113
|
+
"content": {
|
|
114
|
+
"application/json": {
|
|
115
|
+
"schema": {
|
|
116
|
+
"$ref": "#/components/schemas/Partner"
|
|
117
|
+
},
|
|
118
|
+
"example": {
|
|
119
|
+
"id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc",
|
|
120
|
+
"organization_id": "123",
|
|
121
|
+
"company_name": "Declined Partner Co",
|
|
122
|
+
"email": "partner@declined.de",
|
|
123
|
+
"status": "Rejected",
|
|
124
|
+
"created_at": "2024-01-15T10:30:00.000Z"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"400": {
|
|
130
|
+
"description": "Unable to reject partner - partner may already be rejected or in an invalid state"
|
|
131
|
+
},
|
|
132
|
+
"404": {
|
|
133
|
+
"description": "Partner not found"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"/v1/partners/assignables:search": {
|
|
139
|
+
"post": {
|
|
140
|
+
"operationId": "searchAssignable",
|
|
141
|
+
"summary": "searchAssignable",
|
|
142
|
+
"description": "Search for users and organizations that can be assigned to tasks, workflows, or entities.\n\nThis endpoint searches across your organization and all connected partner organizations\nto find assignable resources. Use this when you need to assign someone to a task,\nworkflow step, or entity and want to include partners in the search.\n\n**Results can include:**\n- `user`: Users in your organization\n- `partner_user`: Users in partner organizations\n- `partner_organization`: Partner organizations themselves (for organization-level assignments)\n- `ecp`: End Customer Portal users\n- `group`: User groups\n- `parent_organization_user`: Users from parent organization (for sub-organizations)\n\n**Pagination:** Use `from` and `size` parameters for paginated results.\n",
|
|
143
|
+
"tags": [
|
|
144
|
+
"Partners"
|
|
145
|
+
],
|
|
146
|
+
"requestBody": {
|
|
147
|
+
"content": {
|
|
148
|
+
"application/json": {
|
|
149
|
+
"schema": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"properties": {
|
|
152
|
+
"q": {
|
|
153
|
+
"description": "Search query string to filter results by name or email",
|
|
154
|
+
"type": "string",
|
|
155
|
+
"default": "",
|
|
156
|
+
"example": "john"
|
|
157
|
+
},
|
|
158
|
+
"from": {
|
|
159
|
+
"description": "Starting offset for pagination (zero-based index)",
|
|
160
|
+
"type": "integer",
|
|
161
|
+
"minimum": 0,
|
|
162
|
+
"default": 0,
|
|
163
|
+
"example": 0
|
|
164
|
+
},
|
|
165
|
+
"size": {
|
|
166
|
+
"description": "Maximum number of results to return per page",
|
|
167
|
+
"type": "integer",
|
|
168
|
+
"minimum": 1,
|
|
169
|
+
"maximum": 1000,
|
|
170
|
+
"default": 25,
|
|
171
|
+
"example": 25
|
|
172
|
+
},
|
|
173
|
+
"org_ids": {
|
|
174
|
+
"description": "Filter results to specific organization IDs. If not provided, searches all accessible organizations including partners.",
|
|
175
|
+
"type": "array",
|
|
176
|
+
"items": {
|
|
177
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
178
|
+
},
|
|
179
|
+
"example": [
|
|
180
|
+
"123",
|
|
181
|
+
"456"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"portalUsersEntityIdScope": {
|
|
185
|
+
"description": "Entity ID to scope portal user search. Required when `types` includes `ecp`.\nWhen provided, only portal users related to the specified entity are returned\ninstead of placeholder users.\n",
|
|
186
|
+
"type": "string",
|
|
187
|
+
"default": "",
|
|
188
|
+
"example": "f7c22299-ca72-4bca-8538-0a88eeefc947"
|
|
189
|
+
},
|
|
190
|
+
"types": {
|
|
191
|
+
"description": "Filter results to specific types of assignables.\nIf not provided, defaults to all types except `parent_organization_user`.\n",
|
|
192
|
+
"type": "array",
|
|
193
|
+
"default": [
|
|
194
|
+
"user",
|
|
195
|
+
"partner_user",
|
|
196
|
+
"partner_organization",
|
|
197
|
+
"ecp",
|
|
198
|
+
"group"
|
|
199
|
+
],
|
|
200
|
+
"items": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"enum": [
|
|
203
|
+
"user",
|
|
204
|
+
"partner_user",
|
|
205
|
+
"partner_organization",
|
|
206
|
+
"ecp",
|
|
207
|
+
"group",
|
|
208
|
+
"parent_organization_user"
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"required": [
|
|
214
|
+
"q"
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
"example": {
|
|
218
|
+
"q": "john",
|
|
219
|
+
"from": 0,
|
|
220
|
+
"size": 25,
|
|
221
|
+
"types": [
|
|
222
|
+
"user",
|
|
223
|
+
"partner_user"
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"responses": {
|
|
230
|
+
"200": {
|
|
231
|
+
"description": "List of assignable results matching the search criteria",
|
|
232
|
+
"content": {
|
|
233
|
+
"application/json": {
|
|
234
|
+
"schema": {
|
|
235
|
+
"type": "object",
|
|
236
|
+
"properties": {
|
|
237
|
+
"hits": {
|
|
238
|
+
"description": "Total number of matching results (may exceed returned results for pagination)",
|
|
239
|
+
"type": "integer",
|
|
240
|
+
"example": 42
|
|
241
|
+
},
|
|
242
|
+
"results": {
|
|
243
|
+
"type": "array",
|
|
244
|
+
"items": {
|
|
245
|
+
"$ref": "#/components/schemas/Assignable"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"example": {
|
|
251
|
+
"hits": 2,
|
|
252
|
+
"results": [
|
|
253
|
+
{
|
|
254
|
+
"type": "user",
|
|
255
|
+
"display_name": "John Smith",
|
|
256
|
+
"user_id": "456",
|
|
257
|
+
"email": "john.smith@example.com",
|
|
258
|
+
"org_id": "123",
|
|
259
|
+
"status": "Active"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"type": "partner_user",
|
|
263
|
+
"display_name": "John Doe",
|
|
264
|
+
"user_id": "789",
|
|
265
|
+
"email": "john.doe@partner.com",
|
|
266
|
+
"org_id": "321",
|
|
267
|
+
"partner_id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc",
|
|
268
|
+
"status": "Active"
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"400": {
|
|
276
|
+
"description": "Invalid request parameters"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"/v1/partners/assignables:batchGet": {
|
|
282
|
+
"post": {
|
|
283
|
+
"operationId": "batchGetAssignable",
|
|
284
|
+
"summary": "batchGetAssignable",
|
|
285
|
+
"description": "Retrieve multiple assignable users or groups by their IDs in a single request.\n\nUse this endpoint when you have a list of user or group IDs and need to fetch\ntheir full assignable information. This is more efficient than making multiple\nindividual requests.\n\nEach item in the request array should specify either a `user_id` or `group_id`.\n",
|
|
286
|
+
"tags": [
|
|
287
|
+
"Partners"
|
|
288
|
+
],
|
|
289
|
+
"requestBody": {
|
|
290
|
+
"content": {
|
|
291
|
+
"application/json": {
|
|
292
|
+
"schema": {
|
|
293
|
+
"type": "array",
|
|
294
|
+
"minItems": 1,
|
|
295
|
+
"items": {
|
|
296
|
+
"type": "object",
|
|
297
|
+
"properties": {
|
|
298
|
+
"user_id": {
|
|
299
|
+
"description": "User ID of the assignable to retrieve",
|
|
300
|
+
"type": "string",
|
|
301
|
+
"example": "456"
|
|
302
|
+
},
|
|
303
|
+
"org_id": {
|
|
304
|
+
"description": "Organization ID of the assignable. If not provided, defaults to the caller's organization.",
|
|
305
|
+
"type": "string",
|
|
306
|
+
"example": "123"
|
|
307
|
+
},
|
|
308
|
+
"group_id": {
|
|
309
|
+
"description": "Group ID of the assignable to retrieve (mutually exclusive with user_id)",
|
|
310
|
+
"type": "string",
|
|
311
|
+
"example": "group-789"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"example": [
|
|
317
|
+
{
|
|
318
|
+
"user_id": "456",
|
|
319
|
+
"org_id": "123"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"user_id": "789",
|
|
323
|
+
"org_id": "321"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"group_id": "group-123"
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"responses": {
|
|
333
|
+
"200": {
|
|
334
|
+
"description": "List of assignable results for the requested IDs",
|
|
335
|
+
"content": {
|
|
336
|
+
"application/json": {
|
|
337
|
+
"schema": {
|
|
338
|
+
"type": "object",
|
|
339
|
+
"properties": {
|
|
340
|
+
"hits": {
|
|
341
|
+
"description": "Total number of assignables found",
|
|
342
|
+
"type": "integer",
|
|
343
|
+
"example": 3
|
|
344
|
+
},
|
|
345
|
+
"results": {
|
|
346
|
+
"type": "array",
|
|
347
|
+
"items": {
|
|
348
|
+
"$ref": "#/components/schemas/Assignable"
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"example": {
|
|
354
|
+
"hits": 2,
|
|
355
|
+
"results": [
|
|
356
|
+
{
|
|
357
|
+
"type": "user",
|
|
358
|
+
"display_name": "John Smith",
|
|
359
|
+
"user_id": "456",
|
|
360
|
+
"email": "john.smith@example.com",
|
|
361
|
+
"org_id": "123",
|
|
362
|
+
"status": "Active"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"type": "user",
|
|
366
|
+
"display_name": "Jane Doe",
|
|
367
|
+
"user_id": "789",
|
|
368
|
+
"email": "jane.doe@partner.com",
|
|
369
|
+
"org_id": "321",
|
|
370
|
+
"status": "Active"
|
|
371
|
+
}
|
|
372
|
+
]
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"400": {
|
|
378
|
+
"description": "Invalid request - empty array or malformed request body"
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"/v1/partner-directory/public/getPartnerByToken": {
|
|
384
|
+
"get": {
|
|
385
|
+
"operationId": "getPartnerByToken",
|
|
386
|
+
"summary": "getPartnerByToken",
|
|
387
|
+
"description": "Retrieves partner information using an invitation token.\n\nThis is a **public endpoint** that does not require authentication.\nIt is used during the partner onboarding flow to display partner information\nbefore the invited organization completes their registration.\n\nThe token is sent to the partner via email when they are invited.\n",
|
|
388
|
+
"security": [],
|
|
389
|
+
"tags": [
|
|
390
|
+
"Partners"
|
|
391
|
+
],
|
|
392
|
+
"parameters": [
|
|
393
|
+
{
|
|
394
|
+
"in": "query",
|
|
395
|
+
"name": "token",
|
|
396
|
+
"schema": {
|
|
397
|
+
"$ref": "#/components/schemas/InviteToken"
|
|
398
|
+
},
|
|
399
|
+
"required": true,
|
|
400
|
+
"description": "The invitation token received via email",
|
|
401
|
+
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
"responses": {
|
|
405
|
+
"200": {
|
|
406
|
+
"description": "Partner information retrieved successfully",
|
|
407
|
+
"content": {
|
|
408
|
+
"application/json": {
|
|
409
|
+
"schema": {
|
|
410
|
+
"$ref": "#/components/schemas/Partner"
|
|
411
|
+
},
|
|
412
|
+
"example": {
|
|
413
|
+
"id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc",
|
|
414
|
+
"organization_id": "123",
|
|
415
|
+
"company_name": "Inviting Company GmbH",
|
|
416
|
+
"email": "partner@invited.de",
|
|
417
|
+
"status": "Invited",
|
|
418
|
+
"created_at": "2024-01-15T10:30:00.000Z"
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"400": {
|
|
424
|
+
"description": "Invalid or malformed token"
|
|
425
|
+
},
|
|
426
|
+
"404": {
|
|
427
|
+
"description": "Token not found or expired - the invitation may have already been used or is no longer valid"
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"/v1/partner-directory/public/activate": {
|
|
433
|
+
"post": {
|
|
434
|
+
"operationId": "activatePartner",
|
|
435
|
+
"summary": "activatePartner",
|
|
436
|
+
"description": "Activates a partner account using an invitation token.\n\nThis is a **public endpoint** that does not require authentication.\nIt is called when an invited partner completes their registration to establish\nthe partnership between the two organizations.\n\n**Activation Flow:**\n1. Partner receives invitation email with token\n2. Partner clicks link and views invitation details (via `getPartnerByToken`)\n3. Partner completes registration form\n4. This endpoint is called to activate the partnership\n\nAfter activation, the partner organization can begin collaborating with\nthe inviting organization through shared entities and assignments.\n",
|
|
437
|
+
"security": [],
|
|
438
|
+
"tags": [
|
|
439
|
+
"Partners"
|
|
440
|
+
],
|
|
441
|
+
"parameters": [
|
|
442
|
+
{
|
|
443
|
+
"name": "token",
|
|
444
|
+
"description": "The invitation token received via email",
|
|
445
|
+
"in": "query",
|
|
446
|
+
"required": true,
|
|
447
|
+
"schema": {
|
|
448
|
+
"$ref": "#/components/schemas/InviteToken"
|
|
449
|
+
},
|
|
450
|
+
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
|
451
|
+
}
|
|
452
|
+
],
|
|
453
|
+
"requestBody": {
|
|
454
|
+
"content": {
|
|
455
|
+
"application/json": {
|
|
456
|
+
"schema": {
|
|
457
|
+
"$ref": "#/components/schemas/ActivatePartnerPayload"
|
|
458
|
+
},
|
|
459
|
+
"example": {
|
|
460
|
+
"company_name": "New Partner GmbH",
|
|
461
|
+
"signed_up_email": "admin@newpartner.de",
|
|
462
|
+
"organization_id": "456"
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
"responses": {
|
|
468
|
+
"200": {
|
|
469
|
+
"description": "Partner activated successfully - the partnership is now active"
|
|
470
|
+
},
|
|
471
|
+
"400": {
|
|
472
|
+
"description": "Invalid request - missing required fields or invalid data"
|
|
473
|
+
},
|
|
474
|
+
"404": {
|
|
475
|
+
"description": "Token not found or expired - the invitation may have already been used or is no longer valid"
|
|
476
|
+
},
|
|
477
|
+
"409": {
|
|
478
|
+
"description": "Partner already activated - this token has already been used"
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"/v1/geolocation/text:search": {
|
|
484
|
+
"post": {
|
|
485
|
+
"operationId": "searchGeolocationForText",
|
|
486
|
+
"summary": "searchGeolocationForText",
|
|
487
|
+
"tags": [
|
|
488
|
+
"Partners"
|
|
489
|
+
],
|
|
490
|
+
"description": "Converts an address string to geographic coordinates (latitude and longitude).\n\nThis endpoint is used to geocode partner addresses for location-based features such as:\n- Partner search by proximity\n- Displaying partners on a map\n- Calculating activity radius coverage\n\nThe address should be provided as a complete, well-formatted string for best results.\n",
|
|
491
|
+
"requestBody": {
|
|
492
|
+
"content": {
|
|
493
|
+
"application/json": {
|
|
494
|
+
"schema": {
|
|
495
|
+
"$ref": "#/components/schemas/SearchGeolocation"
|
|
496
|
+
},
|
|
497
|
+
"example": {
|
|
498
|
+
"address": "Auweg 1, 93055 Regensburg, DE"
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
"responses": {
|
|
504
|
+
"200": {
|
|
505
|
+
"description": "Geolocation successfully retrieved",
|
|
506
|
+
"content": {
|
|
507
|
+
"application/json": {
|
|
508
|
+
"schema": {
|
|
509
|
+
"$ref": "#/components/schemas/Geolocation"
|
|
510
|
+
},
|
|
511
|
+
"example": {
|
|
512
|
+
"lat": 49.013,
|
|
513
|
+
"lng": 12.101,
|
|
514
|
+
"addressLabel": "Auweg 1, 93055 Regensburg, Germany",
|
|
515
|
+
"relevance": 0.95
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
"400": {
|
|
521
|
+
"description": "Invalid request - address field is missing or empty"
|
|
522
|
+
},
|
|
523
|
+
"404": {
|
|
524
|
+
"description": "Address could not be geocoded - no matching location found for the provided address"
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
"/v2/partners/{id}/invite": {
|
|
530
|
+
"post": {
|
|
531
|
+
"operationId": "invitePartnerV2",
|
|
532
|
+
"summary": "invitePartnerV2",
|
|
533
|
+
"tags": [
|
|
534
|
+
"Partners"
|
|
535
|
+
],
|
|
536
|
+
"description": "Sends an invitation email to a partner organization to begin collaboration.\n\nThis endpoint generates an invitation token and sends an email to the partner\nwith a link to complete their registration. The partner can then accept the\ninvitation to establish a B2B partnership.\n\n**Invitation Flow:**\n1. Create a partner record (via entity API)\n2. Call this endpoint to send the invitation email\n3. Partner receives email with unique invitation link\n4. Partner activates their account via the public activation endpoint\n\nThe invitation email language can be customized via the request body.\n",
|
|
537
|
+
"parameters": [
|
|
538
|
+
{
|
|
539
|
+
"in": "path",
|
|
540
|
+
"name": "id",
|
|
541
|
+
"schema": {
|
|
542
|
+
"$ref": "#/components/schemas/PartnerId"
|
|
543
|
+
},
|
|
544
|
+
"required": true,
|
|
545
|
+
"description": "The unique identifier of the partner to invite"
|
|
546
|
+
}
|
|
547
|
+
],
|
|
548
|
+
"requestBody": {
|
|
549
|
+
"content": {
|
|
550
|
+
"application/json": {
|
|
551
|
+
"schema": {
|
|
552
|
+
"$ref": "#/components/schemas/PartnerInvitationPayload"
|
|
553
|
+
},
|
|
554
|
+
"example": {
|
|
555
|
+
"language": "de"
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
"responses": {
|
|
561
|
+
"200": {
|
|
562
|
+
"description": "Invitation sent successfully",
|
|
563
|
+
"content": {
|
|
564
|
+
"application/json": {
|
|
565
|
+
"schema": {
|
|
566
|
+
"$ref": "#/components/schemas/Partner"
|
|
567
|
+
},
|
|
568
|
+
"example": {
|
|
569
|
+
"id": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc",
|
|
570
|
+
"organization_id": "123",
|
|
571
|
+
"company_name": "Invited Partner GmbH",
|
|
572
|
+
"email": "contact@invited-partner.de",
|
|
573
|
+
"status": "Invited",
|
|
574
|
+
"invitation_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
|
|
575
|
+
"created_at": "2024-01-15T10:30:00.000Z"
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
"400": {
|
|
581
|
+
"description": "Unable to send invitation - partner may already be invited or email configuration is invalid"
|
|
582
|
+
},
|
|
583
|
+
"404": {
|
|
584
|
+
"description": "Partner not found"
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
"/v2/partners/{orgId}/users": {
|
|
590
|
+
"get": {
|
|
591
|
+
"operationId": "getPartnerUsers",
|
|
592
|
+
"summary": "getPartnerUsers",
|
|
593
|
+
"tags": [
|
|
594
|
+
"Partner Users"
|
|
595
|
+
],
|
|
596
|
+
"description": "Retrieves all users belonging to a partner organization along with their assigned roles.\n\nThis endpoint allows parent organizations to view and manage the users within\ntheir partner organizations. The response includes user details and their\nrole assignments within the partner organization.\n",
|
|
597
|
+
"parameters": [
|
|
598
|
+
{
|
|
599
|
+
"in": "path",
|
|
600
|
+
"name": "orgId",
|
|
601
|
+
"schema": {
|
|
602
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
603
|
+
},
|
|
604
|
+
"required": true,
|
|
605
|
+
"description": "The organization ID of the partner whose users to retrieve"
|
|
606
|
+
}
|
|
607
|
+
],
|
|
608
|
+
"responses": {
|
|
609
|
+
"200": {
|
|
610
|
+
"description": "List of partner users with their roles",
|
|
611
|
+
"content": {
|
|
612
|
+
"application/json": {
|
|
613
|
+
"schema": {
|
|
614
|
+
"type": "object",
|
|
615
|
+
"properties": {
|
|
616
|
+
"results": {
|
|
617
|
+
"type": "array",
|
|
618
|
+
"items": {
|
|
619
|
+
"$ref": "#/components/schemas/PartnerUser"
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
"example": {
|
|
625
|
+
"results": [
|
|
626
|
+
{
|
|
627
|
+
"id": "456",
|
|
628
|
+
"name": "John Smith",
|
|
629
|
+
"email": "john.smith@partner.com",
|
|
630
|
+
"status": "Active",
|
|
631
|
+
"roles": [
|
|
632
|
+
{
|
|
633
|
+
"id": "role-123",
|
|
634
|
+
"slug": "partner_admin",
|
|
635
|
+
"name": "Partner Administrator"
|
|
636
|
+
}
|
|
637
|
+
]
|
|
638
|
+
}
|
|
639
|
+
]
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
"400": {
|
|
645
|
+
"description": "Invalid request - organization ID may be invalid or not a partner organization"
|
|
646
|
+
},
|
|
647
|
+
"403": {
|
|
648
|
+
"description": "Access denied - caller does not have permission to view users in this partner organization"
|
|
649
|
+
},
|
|
650
|
+
"404": {
|
|
651
|
+
"description": "Partner organization not found"
|
|
652
|
+
},
|
|
653
|
+
"500": {
|
|
654
|
+
"description": "Internal server error"
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
"post": {
|
|
659
|
+
"operationId": "createPartnerUser",
|
|
660
|
+
"summary": "createPartnerUser",
|
|
661
|
+
"tags": [
|
|
662
|
+
"Partner Users"
|
|
663
|
+
],
|
|
664
|
+
"description": "Creates a new user in a partner organization.\n\nThis endpoint allows parent organizations to create users directly within\ntheir partner organizations. The new user will receive an invitation email\nto set up their account.\n\nOptionally, roles can be assigned to the user at creation time.\n",
|
|
665
|
+
"parameters": [
|
|
666
|
+
{
|
|
667
|
+
"in": "path",
|
|
668
|
+
"name": "orgId",
|
|
669
|
+
"schema": {
|
|
670
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
671
|
+
},
|
|
672
|
+
"required": true,
|
|
673
|
+
"description": "The partner organization ID where the user will be created"
|
|
674
|
+
}
|
|
675
|
+
],
|
|
676
|
+
"requestBody": {
|
|
677
|
+
"content": {
|
|
678
|
+
"application/json": {
|
|
679
|
+
"schema": {
|
|
680
|
+
"$ref": "#/components/schemas/CreatePartnerUserPayload"
|
|
681
|
+
},
|
|
682
|
+
"example": {
|
|
683
|
+
"email": "newuser@partner.com",
|
|
684
|
+
"language": "de",
|
|
685
|
+
"roles": [
|
|
686
|
+
"role-123",
|
|
687
|
+
"role-456"
|
|
688
|
+
]
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
"responses": {
|
|
694
|
+
"201": {
|
|
695
|
+
"description": "User created successfully - an invitation email has been sent",
|
|
696
|
+
"content": {
|
|
697
|
+
"application/json": {
|
|
698
|
+
"schema": {
|
|
699
|
+
"$ref": "#/components/schemas/User"
|
|
700
|
+
},
|
|
701
|
+
"example": {
|
|
702
|
+
"id": "789",
|
|
703
|
+
"email": "newuser@partner.com",
|
|
704
|
+
"display_name": "newuser@partner.com",
|
|
705
|
+
"status": "Pending"
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
"400": {
|
|
711
|
+
"description": "Invalid request - email may be invalid or user already exists in the organization"
|
|
712
|
+
},
|
|
713
|
+
"403": {
|
|
714
|
+
"description": "Access denied - caller does not have permission to create users in this partner organization"
|
|
715
|
+
},
|
|
716
|
+
"404": {
|
|
717
|
+
"description": "Partner organization not found"
|
|
718
|
+
},
|
|
719
|
+
"500": {
|
|
720
|
+
"description": "Internal server error"
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
"/v2/partners/{orgId}/users/{userId}": {
|
|
726
|
+
"delete": {
|
|
727
|
+
"operationId": "deletePartnerUser",
|
|
728
|
+
"summary": "deletePartnerUser",
|
|
729
|
+
"tags": [
|
|
730
|
+
"Partner Users"
|
|
731
|
+
],
|
|
732
|
+
"description": "Removes a user from a partner organization.\n\nThis endpoint allows parent organizations to delete users from their partner\norganizations. The user will lose access to the partner organization immediately.\n\n**Note:** This action is permanent and cannot be undone.\n",
|
|
733
|
+
"parameters": [
|
|
734
|
+
{
|
|
735
|
+
"in": "path",
|
|
736
|
+
"name": "orgId",
|
|
737
|
+
"schema": {
|
|
738
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
739
|
+
},
|
|
740
|
+
"required": true,
|
|
741
|
+
"description": "The organization ID of the partner"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"in": "path",
|
|
745
|
+
"name": "userId",
|
|
746
|
+
"schema": {
|
|
747
|
+
"type": "string"
|
|
748
|
+
},
|
|
749
|
+
"required": true,
|
|
750
|
+
"description": "The unique identifier of the user to delete",
|
|
751
|
+
"example": "456"
|
|
752
|
+
}
|
|
753
|
+
],
|
|
754
|
+
"responses": {
|
|
755
|
+
"200": {
|
|
756
|
+
"description": "User deleted successfully",
|
|
757
|
+
"content": {
|
|
758
|
+
"application/json": {
|
|
759
|
+
"schema": {
|
|
760
|
+
"type": "object"
|
|
761
|
+
},
|
|
762
|
+
"example": {}
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
"400": {
|
|
767
|
+
"description": "Invalid request - user ID may be invalid"
|
|
768
|
+
},
|
|
769
|
+
"403": {
|
|
770
|
+
"description": "Access denied - caller does not have permission to delete users in this partner organization"
|
|
771
|
+
},
|
|
772
|
+
"404": {
|
|
773
|
+
"description": "User or partner organization not found"
|
|
774
|
+
},
|
|
775
|
+
"500": {
|
|
776
|
+
"description": "Internal server error"
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
"/v2/partners/{orgId}/roles": {
|
|
782
|
+
"get": {
|
|
783
|
+
"operationId": "getPartnerRoles",
|
|
784
|
+
"summary": "getPartnerRoles",
|
|
785
|
+
"tags": [
|
|
786
|
+
"Partner Users"
|
|
787
|
+
],
|
|
788
|
+
"description": "Retrieves all roles defined for a partner organization.\n\nRoles define the permissions that users in the partner organization have.\nParent organizations can use this endpoint to view available roles before\nassigning them to partner users.\n",
|
|
789
|
+
"parameters": [
|
|
790
|
+
{
|
|
791
|
+
"in": "path",
|
|
792
|
+
"name": "orgId",
|
|
793
|
+
"schema": {
|
|
794
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
795
|
+
},
|
|
796
|
+
"required": true,
|
|
797
|
+
"description": "The organization ID of the partner whose roles to retrieve"
|
|
798
|
+
}
|
|
799
|
+
],
|
|
800
|
+
"responses": {
|
|
801
|
+
"200": {
|
|
802
|
+
"description": "List of roles available in the partner organization",
|
|
803
|
+
"content": {
|
|
804
|
+
"application/json": {
|
|
805
|
+
"schema": {
|
|
806
|
+
"type": "object",
|
|
807
|
+
"properties": {
|
|
808
|
+
"results": {
|
|
809
|
+
"type": "array",
|
|
810
|
+
"items": {
|
|
811
|
+
"$ref": "#/components/schemas/PartnerRole"
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
},
|
|
816
|
+
"example": {
|
|
817
|
+
"results": [
|
|
818
|
+
{
|
|
819
|
+
"id": "role-123",
|
|
820
|
+
"slug": "partner_admin",
|
|
821
|
+
"name": "Partner Administrator",
|
|
822
|
+
"type": "share_role",
|
|
823
|
+
"grants": [
|
|
824
|
+
{
|
|
825
|
+
"action": "entity-read",
|
|
826
|
+
"resource": "entity:*:opportunity:*",
|
|
827
|
+
"effect": "allow"
|
|
828
|
+
}
|
|
829
|
+
]
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"id": "role-456",
|
|
833
|
+
"slug": "partner_viewer",
|
|
834
|
+
"name": "Partner Viewer",
|
|
835
|
+
"type": "share_role",
|
|
836
|
+
"grants": [
|
|
837
|
+
{
|
|
838
|
+
"action": "entity-read",
|
|
839
|
+
"resource": "entity:*:*:*",
|
|
840
|
+
"effect": "allow"
|
|
841
|
+
}
|
|
842
|
+
]
|
|
843
|
+
}
|
|
844
|
+
]
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
"400": {
|
|
850
|
+
"description": "Invalid request - organization ID may be invalid"
|
|
851
|
+
},
|
|
852
|
+
"403": {
|
|
853
|
+
"description": "Access denied - caller does not have permission to view roles in this partner organization"
|
|
854
|
+
},
|
|
855
|
+
"404": {
|
|
856
|
+
"description": "Partner organization not found"
|
|
857
|
+
},
|
|
858
|
+
"500": {
|
|
859
|
+
"description": "Internal server error"
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
"post": {
|
|
864
|
+
"operationId": "createPartnerRole",
|
|
865
|
+
"summary": "createPartnerRole",
|
|
866
|
+
"tags": [
|
|
867
|
+
"Partner Users"
|
|
868
|
+
],
|
|
869
|
+
"description": "Creates a new role for a partner organization.\n\nRoles define permissions for partner users. The parent organization can create\ncustom roles with specific permission grants to control what partner users\ncan access and modify.\n\n**Permission Grants:**\nEach role contains a list of grants that define allowed (or denied) actions\non specific resources. See the Grant schema for details on defining permissions.\n",
|
|
870
|
+
"parameters": [
|
|
871
|
+
{
|
|
872
|
+
"in": "path",
|
|
873
|
+
"name": "orgId",
|
|
874
|
+
"schema": {
|
|
875
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
876
|
+
},
|
|
877
|
+
"required": true,
|
|
878
|
+
"description": "The organization ID of the partner where the role will be created"
|
|
879
|
+
}
|
|
880
|
+
],
|
|
881
|
+
"requestBody": {
|
|
882
|
+
"content": {
|
|
883
|
+
"application/json": {
|
|
884
|
+
"schema": {
|
|
885
|
+
"$ref": "#/components/schemas/CreatePartnerRolePayload"
|
|
886
|
+
},
|
|
887
|
+
"example": {
|
|
888
|
+
"name": "Partner Sales",
|
|
889
|
+
"slug": "partner_sales",
|
|
890
|
+
"grants": [
|
|
891
|
+
{
|
|
892
|
+
"action": "entity-read",
|
|
893
|
+
"resource": "entity:*:opportunity:*",
|
|
894
|
+
"effect": "allow"
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"action": "entity-update",
|
|
898
|
+
"resource": "entity:*:opportunity:*",
|
|
899
|
+
"effect": "allow"
|
|
900
|
+
}
|
|
901
|
+
]
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
"responses": {
|
|
907
|
+
"201": {
|
|
908
|
+
"description": "Role created successfully",
|
|
909
|
+
"content": {
|
|
910
|
+
"application/json": {
|
|
911
|
+
"schema": {
|
|
912
|
+
"$ref": "#/components/schemas/PartnerRole"
|
|
913
|
+
},
|
|
914
|
+
"example": {
|
|
915
|
+
"id": "123:partner_sales",
|
|
916
|
+
"slug": "partner_sales",
|
|
917
|
+
"name": "Partner Sales",
|
|
918
|
+
"type": "share_role",
|
|
919
|
+
"grants": [
|
|
920
|
+
{
|
|
921
|
+
"action": "entity-read",
|
|
922
|
+
"resource": "entity:*:opportunity:*",
|
|
923
|
+
"effect": "allow"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"action": "entity-update",
|
|
927
|
+
"resource": "entity:*:opportunity:*",
|
|
928
|
+
"effect": "allow"
|
|
929
|
+
}
|
|
930
|
+
]
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
"400": {
|
|
936
|
+
"description": "Invalid request - role name or slug may be invalid or already exists"
|
|
937
|
+
},
|
|
938
|
+
"403": {
|
|
939
|
+
"description": "Access denied - caller does not have permission to create roles in this partner organization"
|
|
940
|
+
},
|
|
941
|
+
"404": {
|
|
942
|
+
"description": "Partner organization not found"
|
|
943
|
+
},
|
|
944
|
+
"500": {
|
|
945
|
+
"description": "Internal server error"
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
"/v2/partners/{orgId}/roles/{roleId}": {
|
|
951
|
+
"put": {
|
|
952
|
+
"operationId": "updatePartnerRole",
|
|
953
|
+
"summary": "updatePartnerRole",
|
|
954
|
+
"tags": [
|
|
955
|
+
"Partner Users"
|
|
956
|
+
],
|
|
957
|
+
"description": "Updates an existing role in a partner organization.\n\nUse this endpoint to modify the permissions (grants) or metadata of an existing\nrole. All users with this role will immediately have the updated permissions.\n\n**Note:** Changing role permissions affects all users currently assigned to the role.\n",
|
|
958
|
+
"parameters": [
|
|
959
|
+
{
|
|
960
|
+
"in": "path",
|
|
961
|
+
"name": "orgId",
|
|
962
|
+
"schema": {
|
|
963
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
964
|
+
},
|
|
965
|
+
"required": true,
|
|
966
|
+
"description": "The organization ID of the partner"
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"in": "path",
|
|
970
|
+
"name": "roleId",
|
|
971
|
+
"schema": {
|
|
972
|
+
"type": "string"
|
|
973
|
+
},
|
|
974
|
+
"required": true,
|
|
975
|
+
"description": "The unique identifier of the role to update",
|
|
976
|
+
"example": "123:partner_sales"
|
|
977
|
+
}
|
|
978
|
+
],
|
|
979
|
+
"requestBody": {
|
|
980
|
+
"content": {
|
|
981
|
+
"application/json": {
|
|
982
|
+
"schema": {
|
|
983
|
+
"$ref": "#/components/schemas/UpdatePartnerRolePayload"
|
|
984
|
+
},
|
|
985
|
+
"example": {
|
|
986
|
+
"name": "Partner Sales Updated",
|
|
987
|
+
"slug": "partner_sales",
|
|
988
|
+
"grants": [
|
|
989
|
+
{
|
|
990
|
+
"action": "entity-read",
|
|
991
|
+
"resource": "entity:*:opportunity:*",
|
|
992
|
+
"effect": "allow"
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"action": "entity-update",
|
|
996
|
+
"resource": "entity:*:opportunity:*",
|
|
997
|
+
"effect": "allow"
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"action": "entity-create",
|
|
1001
|
+
"resource": "entity:*:opportunity:*",
|
|
1002
|
+
"effect": "allow"
|
|
1003
|
+
}
|
|
1004
|
+
]
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
"responses": {
|
|
1010
|
+
"200": {
|
|
1011
|
+
"description": "Role updated successfully",
|
|
1012
|
+
"content": {
|
|
1013
|
+
"application/json": {
|
|
1014
|
+
"schema": {
|
|
1015
|
+
"$ref": "#/components/schemas/PartnerRole"
|
|
1016
|
+
},
|
|
1017
|
+
"example": {
|
|
1018
|
+
"id": "123:partner_sales",
|
|
1019
|
+
"slug": "partner_sales",
|
|
1020
|
+
"name": "Partner Sales Updated",
|
|
1021
|
+
"type": "share_role",
|
|
1022
|
+
"grants": [
|
|
1023
|
+
{
|
|
1024
|
+
"action": "entity-read",
|
|
1025
|
+
"resource": "entity:*:opportunity:*",
|
|
1026
|
+
"effect": "allow"
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"action": "entity-update",
|
|
1030
|
+
"resource": "entity:*:opportunity:*",
|
|
1031
|
+
"effect": "allow"
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
"action": "entity-create",
|
|
1035
|
+
"resource": "entity:*:opportunity:*",
|
|
1036
|
+
"effect": "allow"
|
|
1037
|
+
}
|
|
1038
|
+
]
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
},
|
|
1043
|
+
"400": {
|
|
1044
|
+
"description": "Invalid request - role data may be invalid"
|
|
1045
|
+
},
|
|
1046
|
+
"403": {
|
|
1047
|
+
"description": "Access denied - caller does not have permission to update roles in this partner organization"
|
|
1048
|
+
},
|
|
1049
|
+
"404": {
|
|
1050
|
+
"description": "Role or partner organization not found"
|
|
1051
|
+
},
|
|
1052
|
+
"500": {
|
|
1053
|
+
"description": "Internal server error"
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1057
|
+
"delete": {
|
|
1058
|
+
"operationId": "deletePartnerRole",
|
|
1059
|
+
"summary": "deletePartnerRole",
|
|
1060
|
+
"tags": [
|
|
1061
|
+
"Partner Users"
|
|
1062
|
+
],
|
|
1063
|
+
"description": "Delete a role from a partner organization",
|
|
1064
|
+
"parameters": [
|
|
1065
|
+
{
|
|
1066
|
+
"in": "path",
|
|
1067
|
+
"name": "orgId",
|
|
1068
|
+
"schema": {
|
|
1069
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
1070
|
+
},
|
|
1071
|
+
"required": true,
|
|
1072
|
+
"description": "The organization ID of the partner"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"in": "path",
|
|
1076
|
+
"name": "roleId",
|
|
1077
|
+
"schema": {
|
|
1078
|
+
"type": "string"
|
|
1079
|
+
},
|
|
1080
|
+
"required": true,
|
|
1081
|
+
"description": "The role ID to delete"
|
|
1082
|
+
}
|
|
1083
|
+
],
|
|
1084
|
+
"responses": {
|
|
1085
|
+
"200": {
|
|
1086
|
+
"description": "Role deleted successfully",
|
|
1087
|
+
"content": {
|
|
1088
|
+
"application/json": {
|
|
1089
|
+
"schema": {
|
|
1090
|
+
"$ref": "#/components/schemas/PartnerRole"
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
},
|
|
1095
|
+
"400": {
|
|
1096
|
+
"description": "Unable to delete partner role"
|
|
1097
|
+
},
|
|
1098
|
+
"403": {
|
|
1099
|
+
"description": "Forbidden - insufficient permissions or role cannot be deleted"
|
|
1100
|
+
},
|
|
1101
|
+
"404": {
|
|
1102
|
+
"description": "Role not found"
|
|
1103
|
+
},
|
|
1104
|
+
"409": {
|
|
1105
|
+
"description": "Role is currently assigned to users and cannot be deleted"
|
|
1106
|
+
},
|
|
1107
|
+
"500": {
|
|
1108
|
+
"description": "Internal server error"
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
"/v2/partners/{orgId}/users/{userId}/roles": {
|
|
1114
|
+
"post": {
|
|
1115
|
+
"operationId": "assignPartnerUserRoles",
|
|
1116
|
+
"summary": "assignPartnerUserRoles",
|
|
1117
|
+
"tags": [
|
|
1118
|
+
"Partner Users"
|
|
1119
|
+
],
|
|
1120
|
+
"description": "Assigns one or more roles to a user in a partner organization.\n\nRoles define the permissions that the user has within the partner organization.\nMultiple roles can be assigned in a single request. The response indicates\nthe success or failure of each role assignment.\n",
|
|
1121
|
+
"parameters": [
|
|
1122
|
+
{
|
|
1123
|
+
"in": "path",
|
|
1124
|
+
"name": "orgId",
|
|
1125
|
+
"schema": {
|
|
1126
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
1127
|
+
},
|
|
1128
|
+
"required": true,
|
|
1129
|
+
"description": "The organization ID of the partner"
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
"in": "path",
|
|
1133
|
+
"name": "userId",
|
|
1134
|
+
"schema": {
|
|
1135
|
+
"type": "string"
|
|
1136
|
+
},
|
|
1137
|
+
"required": true,
|
|
1138
|
+
"description": "The unique identifier of the user to assign roles to",
|
|
1139
|
+
"example": "456"
|
|
1140
|
+
}
|
|
1141
|
+
],
|
|
1142
|
+
"requestBody": {
|
|
1143
|
+
"content": {
|
|
1144
|
+
"application/json": {
|
|
1145
|
+
"schema": {
|
|
1146
|
+
"$ref": "#/components/schemas/AssignRolesPayload"
|
|
1147
|
+
},
|
|
1148
|
+
"example": {
|
|
1149
|
+
"roleIds": [
|
|
1150
|
+
"role-123",
|
|
1151
|
+
"role-456"
|
|
1152
|
+
]
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
},
|
|
1157
|
+
"responses": {
|
|
1158
|
+
"200": {
|
|
1159
|
+
"description": "Role assignment results - each role assignment is processed individually",
|
|
1160
|
+
"content": {
|
|
1161
|
+
"application/json": {
|
|
1162
|
+
"schema": {
|
|
1163
|
+
"type": "object",
|
|
1164
|
+
"properties": {
|
|
1165
|
+
"results": {
|
|
1166
|
+
"type": "array",
|
|
1167
|
+
"description": "Results for each role assignment attempt",
|
|
1168
|
+
"items": {
|
|
1169
|
+
"type": "object",
|
|
1170
|
+
"properties": {
|
|
1171
|
+
"roleId": {
|
|
1172
|
+
"type": "string",
|
|
1173
|
+
"description": "The role ID that was processed"
|
|
1174
|
+
},
|
|
1175
|
+
"success": {
|
|
1176
|
+
"type": "boolean",
|
|
1177
|
+
"description": "Whether the assignment was successful"
|
|
1178
|
+
},
|
|
1179
|
+
"data": {
|
|
1180
|
+
"type": "object",
|
|
1181
|
+
"description": "Additional data on success"
|
|
1182
|
+
},
|
|
1183
|
+
"error": {
|
|
1184
|
+
"type": "object",
|
|
1185
|
+
"description": "Error details on failure"
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
},
|
|
1192
|
+
"example": {
|
|
1193
|
+
"results": [
|
|
1194
|
+
{
|
|
1195
|
+
"roleId": "role-123",
|
|
1196
|
+
"success": true,
|
|
1197
|
+
"data": {}
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
"roleId": "role-456",
|
|
1201
|
+
"success": true,
|
|
1202
|
+
"data": {}
|
|
1203
|
+
}
|
|
1204
|
+
]
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
},
|
|
1209
|
+
"400": {
|
|
1210
|
+
"description": "Invalid request - role IDs may be invalid"
|
|
1211
|
+
},
|
|
1212
|
+
"403": {
|
|
1213
|
+
"description": "Access denied - caller does not have permission to assign roles in this partner organization"
|
|
1214
|
+
},
|
|
1215
|
+
"404": {
|
|
1216
|
+
"description": "User or partner organization not found"
|
|
1217
|
+
},
|
|
1218
|
+
"500": {
|
|
1219
|
+
"description": "Internal server error"
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
},
|
|
1223
|
+
"delete": {
|
|
1224
|
+
"operationId": "unassignPartnerUserRoles",
|
|
1225
|
+
"summary": "unassignPartnerUserRoles",
|
|
1226
|
+
"tags": [
|
|
1227
|
+
"Partner Users"
|
|
1228
|
+
],
|
|
1229
|
+
"description": "Removes one or more roles from a user in a partner organization.\n\nThis endpoint removes the specified roles from the user, reducing their permissions\nwithin the partner organization. The response indicates the success or failure\nof each role removal.\n\n**Note:** Removing all roles from a user may result in the user having no access\nto the partner organization.\n",
|
|
1230
|
+
"parameters": [
|
|
1231
|
+
{
|
|
1232
|
+
"in": "path",
|
|
1233
|
+
"name": "orgId",
|
|
1234
|
+
"schema": {
|
|
1235
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
1236
|
+
},
|
|
1237
|
+
"required": true,
|
|
1238
|
+
"description": "The organization ID of the partner"
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
"in": "path",
|
|
1242
|
+
"name": "userId",
|
|
1243
|
+
"schema": {
|
|
1244
|
+
"type": "string"
|
|
1245
|
+
},
|
|
1246
|
+
"required": true,
|
|
1247
|
+
"description": "The unique identifier of the user to remove roles from",
|
|
1248
|
+
"example": "456"
|
|
1249
|
+
}
|
|
1250
|
+
],
|
|
1251
|
+
"requestBody": {
|
|
1252
|
+
"content": {
|
|
1253
|
+
"application/json": {
|
|
1254
|
+
"schema": {
|
|
1255
|
+
"$ref": "#/components/schemas/AssignRolesPayload"
|
|
1256
|
+
},
|
|
1257
|
+
"example": {
|
|
1258
|
+
"roleIds": [
|
|
1259
|
+
"role-456"
|
|
1260
|
+
]
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
},
|
|
1265
|
+
"responses": {
|
|
1266
|
+
"200": {
|
|
1267
|
+
"description": "Role unassignment results - each role removal is processed individually",
|
|
1268
|
+
"content": {
|
|
1269
|
+
"application/json": {
|
|
1270
|
+
"schema": {
|
|
1271
|
+
"type": "object",
|
|
1272
|
+
"properties": {
|
|
1273
|
+
"results": {
|
|
1274
|
+
"type": "array",
|
|
1275
|
+
"description": "Results for each role removal attempt",
|
|
1276
|
+
"items": {
|
|
1277
|
+
"type": "object",
|
|
1278
|
+
"properties": {
|
|
1279
|
+
"roleId": {
|
|
1280
|
+
"type": "string",
|
|
1281
|
+
"description": "The role ID that was processed"
|
|
1282
|
+
},
|
|
1283
|
+
"success": {
|
|
1284
|
+
"type": "boolean",
|
|
1285
|
+
"description": "Whether the removal was successful"
|
|
1286
|
+
},
|
|
1287
|
+
"data": {
|
|
1288
|
+
"type": "object",
|
|
1289
|
+
"description": "Additional data on success"
|
|
1290
|
+
},
|
|
1291
|
+
"error": {
|
|
1292
|
+
"type": "object",
|
|
1293
|
+
"description": "Error details on failure"
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
},
|
|
1300
|
+
"example": {
|
|
1301
|
+
"results": [
|
|
1302
|
+
{
|
|
1303
|
+
"roleId": "role-456",
|
|
1304
|
+
"success": true,
|
|
1305
|
+
"data": {}
|
|
1306
|
+
}
|
|
1307
|
+
]
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
},
|
|
1312
|
+
"400": {
|
|
1313
|
+
"description": "Invalid request - role IDs may be invalid"
|
|
1314
|
+
},
|
|
1315
|
+
"403": {
|
|
1316
|
+
"description": "Access denied - caller does not have permission to unassign roles in this partner organization"
|
|
1317
|
+
},
|
|
1318
|
+
"404": {
|
|
1319
|
+
"description": "User, role, or partner organization not found"
|
|
1320
|
+
},
|
|
1321
|
+
"500": {
|
|
1322
|
+
"description": "Internal server error"
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
},
|
|
1328
|
+
"components": {
|
|
1329
|
+
"securitySchemes": {
|
|
1330
|
+
"EpilotAuth": {
|
|
1331
|
+
"type": "http",
|
|
1332
|
+
"scheme": "bearer",
|
|
1333
|
+
"description": "Authorization header with epilot OAuth2 bearer token",
|
|
1334
|
+
"bearerFormat": "JWT"
|
|
1335
|
+
},
|
|
1336
|
+
"AsOrganization": {
|
|
1337
|
+
"type": "apiKey",
|
|
1338
|
+
"in": "header",
|
|
1339
|
+
"name": "x-ivy-org-id",
|
|
1340
|
+
"description": "Set organization id when using internal auth"
|
|
1341
|
+
}
|
|
1342
|
+
},
|
|
1343
|
+
"schemas": {
|
|
1344
|
+
"InviteToken": {
|
|
1345
|
+
"type": "string",
|
|
1346
|
+
"description": "A secure token used for partner invitation and activation. Sent via email to the invited partner.",
|
|
1347
|
+
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVySWQiOiIxMjM0NSJ9.abcdef"
|
|
1348
|
+
},
|
|
1349
|
+
"Partner": {
|
|
1350
|
+
"type": "object",
|
|
1351
|
+
"description": "Represents a partner organization in the partner directory.\n\nPartners go through a lifecycle from invitation to active collaboration:\n- **Pending**: Initial state when partner record is created\n- **Invited**: Invitation email has been sent to the partner\n- **Request**: Partner has requested to join (self-registration)\n- **Rejected**: Partnership request was declined\n- **Deleted**: Partner relationship has been terminated\n",
|
|
1352
|
+
"properties": {
|
|
1353
|
+
"id": {
|
|
1354
|
+
"$ref": "#/components/schemas/PartnerId"
|
|
1355
|
+
},
|
|
1356
|
+
"organization_id": {
|
|
1357
|
+
"description": "The organization ID of the parent organization that invited this partner",
|
|
1358
|
+
"allOf": [
|
|
1359
|
+
{
|
|
1360
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
1361
|
+
}
|
|
1362
|
+
]
|
|
1363
|
+
},
|
|
1364
|
+
"created_at": {
|
|
1365
|
+
"type": "string",
|
|
1366
|
+
"format": "date-time",
|
|
1367
|
+
"description": "Timestamp when the partner record was created",
|
|
1368
|
+
"example": "2022-02-08T04:44:32.246Z"
|
|
1369
|
+
},
|
|
1370
|
+
"description": {
|
|
1371
|
+
"type": "string",
|
|
1372
|
+
"description": "Optional description of the partner or partnership",
|
|
1373
|
+
"example": "Regional solar installation partner for Bavaria"
|
|
1374
|
+
},
|
|
1375
|
+
"company_name": {
|
|
1376
|
+
"type": "string",
|
|
1377
|
+
"description": "The legal or trading name of the partner organization",
|
|
1378
|
+
"example": "Acme Solar GmbH"
|
|
1379
|
+
},
|
|
1380
|
+
"invitation_token": {
|
|
1381
|
+
"description": "Secure token for partner activation (only present for invited partners)",
|
|
1382
|
+
"type": "string",
|
|
1383
|
+
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
|
1384
|
+
},
|
|
1385
|
+
"invitation_email": {
|
|
1386
|
+
"deprecated": true,
|
|
1387
|
+
"description": "Deprecated: Use 'email' instead. Email address used for the invitation.",
|
|
1388
|
+
"type": "string",
|
|
1389
|
+
"format": "email"
|
|
1390
|
+
},
|
|
1391
|
+
"email": {
|
|
1392
|
+
"description": "Primary email address of the partner, used for invitation delivery",
|
|
1393
|
+
"type": "string",
|
|
1394
|
+
"format": "email",
|
|
1395
|
+
"example": "contact@acme-solar.de"
|
|
1396
|
+
},
|
|
1397
|
+
"owner_email": {
|
|
1398
|
+
"description": "Alternative email address where invitations should be sent (e.g., owner or admin email)",
|
|
1399
|
+
"type": "string",
|
|
1400
|
+
"format": "email",
|
|
1401
|
+
"example": "owner@acme-solar.de"
|
|
1402
|
+
},
|
|
1403
|
+
"signed_up_email": {
|
|
1404
|
+
"description": "Email address used by the partner when completing registration",
|
|
1405
|
+
"type": "string",
|
|
1406
|
+
"format": "email",
|
|
1407
|
+
"example": "admin@acme-solar.de"
|
|
1408
|
+
},
|
|
1409
|
+
"partner_org_id": {
|
|
1410
|
+
"description": "Organization ID of the partner organization (populated after activation)",
|
|
1411
|
+
"type": "string",
|
|
1412
|
+
"example": "456789"
|
|
1413
|
+
},
|
|
1414
|
+
"status": {
|
|
1415
|
+
"type": "string",
|
|
1416
|
+
"description": "Current status of the partner in the invitation/collaboration lifecycle",
|
|
1417
|
+
"enum": [
|
|
1418
|
+
"Pending",
|
|
1419
|
+
"Request",
|
|
1420
|
+
"Deleted",
|
|
1421
|
+
"Invited",
|
|
1422
|
+
"Rejected"
|
|
1423
|
+
]
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
},
|
|
1427
|
+
"PartnerId": {
|
|
1428
|
+
"type": "string",
|
|
1429
|
+
"description": "Unique identifier for a partner record (UUID format)",
|
|
1430
|
+
"example": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc"
|
|
1431
|
+
},
|
|
1432
|
+
"OrganizationId": {
|
|
1433
|
+
"type": "string",
|
|
1434
|
+
"description": "Unique identifier for an organization in the epilot platform",
|
|
1435
|
+
"example": "123"
|
|
1436
|
+
},
|
|
1437
|
+
"ActivatePartnerPayload": {
|
|
1438
|
+
"type": "object",
|
|
1439
|
+
"description": "Payload for activating a partner account using an invitation token",
|
|
1440
|
+
"properties": {
|
|
1441
|
+
"company_name": {
|
|
1442
|
+
"type": "string",
|
|
1443
|
+
"description": "The official name of the partner's company",
|
|
1444
|
+
"example": "Acme Solar GmbH"
|
|
1445
|
+
},
|
|
1446
|
+
"signed_up_email": {
|
|
1447
|
+
"description": "Email address of the user completing the partner registration",
|
|
1448
|
+
"type": "string",
|
|
1449
|
+
"format": "email",
|
|
1450
|
+
"example": "admin@acme-solar.de"
|
|
1451
|
+
},
|
|
1452
|
+
"organization_id": {
|
|
1453
|
+
"description": "The organization ID of the partner's existing epilot organization (if they already have one)",
|
|
1454
|
+
"type": "string",
|
|
1455
|
+
"example": "456"
|
|
1456
|
+
}
|
|
1457
|
+
},
|
|
1458
|
+
"required": [
|
|
1459
|
+
"signed_up_email",
|
|
1460
|
+
"organization_id"
|
|
1461
|
+
]
|
|
1462
|
+
},
|
|
1463
|
+
"PartnerInvitationPayload": {
|
|
1464
|
+
"type": "object",
|
|
1465
|
+
"description": "Configuration options for sending a partner invitation",
|
|
1466
|
+
"properties": {
|
|
1467
|
+
"language": {
|
|
1468
|
+
"type": "string",
|
|
1469
|
+
"description": "Language for the partner invitation email. Determines the email template language.",
|
|
1470
|
+
"enum": [
|
|
1471
|
+
"en",
|
|
1472
|
+
"de"
|
|
1473
|
+
],
|
|
1474
|
+
"default": "en",
|
|
1475
|
+
"example": "de"
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1479
|
+
"Assignable": {
|
|
1480
|
+
"description": "A user, organization, or group that can be assigned to tasks, workflows, or entities.\nThe `type` field discriminates between different assignable types.\n",
|
|
1481
|
+
"oneOf": [
|
|
1482
|
+
{
|
|
1483
|
+
"$ref": "#/components/schemas/AssignableUser"
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
"$ref": "#/components/schemas/AssignablePartnerUser"
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
"$ref": "#/components/schemas/AssignableOrganization"
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
"$ref": "#/components/schemas/AssignableEcpPlaceholder"
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
"$ref": "#/components/schemas/AssignableGroup"
|
|
1496
|
+
}
|
|
1497
|
+
],
|
|
1498
|
+
"discriminator": {
|
|
1499
|
+
"propertyName": "type",
|
|
1500
|
+
"mapping": {
|
|
1501
|
+
"user": "#/components/schemas/AssignableUser",
|
|
1502
|
+
"partner_user": "#/components/schemas/AssignablePartnerUser",
|
|
1503
|
+
"partner_organization": "#/components/schemas/AssignableOrganization",
|
|
1504
|
+
"ecp": "#/components/schemas/AssignableEcpPlaceholder",
|
|
1505
|
+
"group": "#/components/schemas/AssignableGroup"
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
},
|
|
1509
|
+
"BaseAssignable": {
|
|
1510
|
+
"type": "object",
|
|
1511
|
+
"description": "Common properties shared by all assignable types",
|
|
1512
|
+
"properties": {
|
|
1513
|
+
"type": {
|
|
1514
|
+
"type": "string",
|
|
1515
|
+
"description": "Discriminator field indicating the type of assignable",
|
|
1516
|
+
"example": "user"
|
|
1517
|
+
},
|
|
1518
|
+
"display_name": {
|
|
1519
|
+
"type": "string",
|
|
1520
|
+
"description": "Human-readable name for display in UI (user name, organization name, or group name)",
|
|
1521
|
+
"example": "John Smith"
|
|
1522
|
+
},
|
|
1523
|
+
"image_uri": {
|
|
1524
|
+
"type": "object",
|
|
1525
|
+
"description": "Profile image URLs for the assignable",
|
|
1526
|
+
"properties": {
|
|
1527
|
+
"original": {
|
|
1528
|
+
"type": "string",
|
|
1529
|
+
"format": "uri",
|
|
1530
|
+
"description": "Full-resolution profile image URL",
|
|
1531
|
+
"example": "https://epilot-staging-user-content.s3.eu-central-1.amazonaws.com/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png"
|
|
1532
|
+
},
|
|
1533
|
+
"thumbnail_32": {
|
|
1534
|
+
"type": "string",
|
|
1535
|
+
"format": "uri",
|
|
1536
|
+
"description": "32x32 pixel thumbnail image URL for compact displays",
|
|
1537
|
+
"example": "https://file.sls.epilot.io/v1/files/public/preview?w=32&h=32&key=/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png"
|
|
1538
|
+
}
|
|
1539
|
+
},
|
|
1540
|
+
"required": [
|
|
1541
|
+
"original"
|
|
1542
|
+
]
|
|
1543
|
+
},
|
|
1544
|
+
"org_id": {
|
|
1545
|
+
"description": "Organization ID the assignable belongs to",
|
|
1546
|
+
"allOf": [
|
|
1547
|
+
{
|
|
1548
|
+
"$ref": "#/components/schemas/OrganizationId"
|
|
1549
|
+
}
|
|
1550
|
+
]
|
|
1551
|
+
},
|
|
1552
|
+
"created_at": {
|
|
1553
|
+
"type": "string",
|
|
1554
|
+
"format": "date-time",
|
|
1555
|
+
"description": "Timestamp when the assignable was created",
|
|
1556
|
+
"example": "2022-02-08T04:44:32.246Z"
|
|
1557
|
+
},
|
|
1558
|
+
"activated_at": {
|
|
1559
|
+
"type": "string",
|
|
1560
|
+
"format": "date-time",
|
|
1561
|
+
"description": "Timestamp when the assignable was activated (for users, when they accepted their invitation)",
|
|
1562
|
+
"example": "2022-02-08T04:44:32.246Z"
|
|
1563
|
+
},
|
|
1564
|
+
"status": {
|
|
1565
|
+
"type": "string",
|
|
1566
|
+
"description": "Current status of the assignable",
|
|
1567
|
+
"enum": [
|
|
1568
|
+
"Active",
|
|
1569
|
+
"Pending",
|
|
1570
|
+
"Deactivated",
|
|
1571
|
+
"Deleted"
|
|
1572
|
+
]
|
|
1573
|
+
}
|
|
1574
|
+
},
|
|
1575
|
+
"required": [
|
|
1576
|
+
"type",
|
|
1577
|
+
"display_name",
|
|
1578
|
+
"org_id"
|
|
1579
|
+
]
|
|
1580
|
+
},
|
|
1581
|
+
"AssignableUser": {
|
|
1582
|
+
"description": "A user within the caller's organization that can be assigned to tasks or entities",
|
|
1583
|
+
"allOf": [
|
|
1584
|
+
{
|
|
1585
|
+
"$ref": "#/components/schemas/BaseAssignable"
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
"type": "object",
|
|
1589
|
+
"properties": {
|
|
1590
|
+
"type": {
|
|
1591
|
+
"type": "string",
|
|
1592
|
+
"enum": [
|
|
1593
|
+
"user"
|
|
1594
|
+
],
|
|
1595
|
+
"example": "user"
|
|
1596
|
+
},
|
|
1597
|
+
"display_name": {
|
|
1598
|
+
"type": "string",
|
|
1599
|
+
"description": "Full name of the user",
|
|
1600
|
+
"example": "John Smith"
|
|
1601
|
+
},
|
|
1602
|
+
"user_id": {
|
|
1603
|
+
"type": "string",
|
|
1604
|
+
"description": "Unique identifier of the user",
|
|
1605
|
+
"example": "456"
|
|
1606
|
+
},
|
|
1607
|
+
"email": {
|
|
1608
|
+
"type": "string",
|
|
1609
|
+
"format": "email",
|
|
1610
|
+
"description": "Email address of the user",
|
|
1611
|
+
"example": "john.smith@example.com"
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
]
|
|
1616
|
+
},
|
|
1617
|
+
"AssignablePartnerUser": {
|
|
1618
|
+
"description": "A user from a partner organization that can be assigned to shared tasks or entities",
|
|
1619
|
+
"allOf": [
|
|
1620
|
+
{
|
|
1621
|
+
"$ref": "#/components/schemas/BaseAssignable"
|
|
1622
|
+
},
|
|
1623
|
+
{
|
|
1624
|
+
"type": "object",
|
|
1625
|
+
"properties": {
|
|
1626
|
+
"type": {
|
|
1627
|
+
"type": "string",
|
|
1628
|
+
"enum": [
|
|
1629
|
+
"partner_user"
|
|
1630
|
+
],
|
|
1631
|
+
"example": "partner_user"
|
|
1632
|
+
},
|
|
1633
|
+
"display_name": {
|
|
1634
|
+
"type": "string",
|
|
1635
|
+
"description": "Full name of the partner user",
|
|
1636
|
+
"example": "Jane Doe (Partner)"
|
|
1637
|
+
},
|
|
1638
|
+
"partner_id": {
|
|
1639
|
+
"description": "ID of the partner relationship through which this user is accessible",
|
|
1640
|
+
"allOf": [
|
|
1641
|
+
{
|
|
1642
|
+
"$ref": "#/components/schemas/PartnerId"
|
|
1643
|
+
}
|
|
1644
|
+
]
|
|
1645
|
+
},
|
|
1646
|
+
"user_id": {
|
|
1647
|
+
"type": "string",
|
|
1648
|
+
"description": "Unique identifier of the partner user",
|
|
1649
|
+
"example": "789"
|
|
1650
|
+
},
|
|
1651
|
+
"email": {
|
|
1652
|
+
"type": "string",
|
|
1653
|
+
"format": "email",
|
|
1654
|
+
"description": "Email address of the partner user",
|
|
1655
|
+
"example": "jane.doe@partner.com"
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
]
|
|
1660
|
+
},
|
|
1661
|
+
"AssignableGroup": {
|
|
1662
|
+
"description": "A user group that can be assigned to tasks or entities. All members of the group will be notified/assigned.",
|
|
1663
|
+
"allOf": [
|
|
1664
|
+
{
|
|
1665
|
+
"$ref": "#/components/schemas/BaseAssignable"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
"type": "object",
|
|
1669
|
+
"properties": {
|
|
1670
|
+
"type": {
|
|
1671
|
+
"type": "string",
|
|
1672
|
+
"enum": [
|
|
1673
|
+
"group"
|
|
1674
|
+
],
|
|
1675
|
+
"example": "group"
|
|
1676
|
+
},
|
|
1677
|
+
"group_id": {
|
|
1678
|
+
"type": "string",
|
|
1679
|
+
"description": "Unique identifier of the user group",
|
|
1680
|
+
"example": "group-456"
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
]
|
|
1685
|
+
},
|
|
1686
|
+
"AssignableOrganization": {
|
|
1687
|
+
"description": "A partner organization that can be assigned to tasks or entities at the organization level.\nUseful when you want to assign work to a partner company rather than a specific individual.\n",
|
|
1688
|
+
"allOf": [
|
|
1689
|
+
{
|
|
1690
|
+
"$ref": "#/components/schemas/BaseAssignable"
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
"type": "object",
|
|
1694
|
+
"properties": {
|
|
1695
|
+
"type": {
|
|
1696
|
+
"type": "string",
|
|
1697
|
+
"enum": [
|
|
1698
|
+
"partner_organization"
|
|
1699
|
+
],
|
|
1700
|
+
"example": "partner_organization"
|
|
1701
|
+
},
|
|
1702
|
+
"display_name": {
|
|
1703
|
+
"type": "string",
|
|
1704
|
+
"description": "Name of the partner organization",
|
|
1705
|
+
"example": "Acme Solar GmbH"
|
|
1706
|
+
},
|
|
1707
|
+
"partner_id": {
|
|
1708
|
+
"description": "ID of the partner relationship",
|
|
1709
|
+
"allOf": [
|
|
1710
|
+
{
|
|
1711
|
+
"$ref": "#/components/schemas/PartnerId"
|
|
1712
|
+
}
|
|
1713
|
+
]
|
|
1714
|
+
},
|
|
1715
|
+
"email": {
|
|
1716
|
+
"type": "string",
|
|
1717
|
+
"format": "email",
|
|
1718
|
+
"description": "Primary contact email for the partner organization",
|
|
1719
|
+
"example": "contact@acme-solar.de"
|
|
1720
|
+
},
|
|
1721
|
+
"geolocations": {
|
|
1722
|
+
"type": "array",
|
|
1723
|
+
"description": "Physical locations of the partner organization with addresses and coordinates",
|
|
1724
|
+
"items": {
|
|
1725
|
+
"$ref": "#/components/schemas/AddressGeolocation"
|
|
1726
|
+
}
|
|
1727
|
+
},
|
|
1728
|
+
"phone": {
|
|
1729
|
+
"type": "string",
|
|
1730
|
+
"description": "Primary contact phone number for the partner organization",
|
|
1731
|
+
"example": "+49 941 123456"
|
|
1732
|
+
},
|
|
1733
|
+
"activity_radius": {
|
|
1734
|
+
"type": "number",
|
|
1735
|
+
"description": "Geographic service radius in kilometers - the area within which the partner operates",
|
|
1736
|
+
"example": 50
|
|
1737
|
+
}
|
|
1738
|
+
},
|
|
1739
|
+
"required": [
|
|
1740
|
+
"type",
|
|
1741
|
+
"display_name",
|
|
1742
|
+
"partner_id"
|
|
1743
|
+
]
|
|
1744
|
+
}
|
|
1745
|
+
]
|
|
1746
|
+
},
|
|
1747
|
+
"AssignableEcpPlaceholder": {
|
|
1748
|
+
"description": "An End Customer Portal (ECP) user that can be assigned to tasks or entities.\nThese are external users who access the system through the customer portal.\n",
|
|
1749
|
+
"allOf": [
|
|
1750
|
+
{
|
|
1751
|
+
"$ref": "#/components/schemas/BaseAssignable"
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
"type": "object",
|
|
1755
|
+
"properties": {
|
|
1756
|
+
"type": {
|
|
1757
|
+
"type": "string",
|
|
1758
|
+
"enum": [
|
|
1759
|
+
"ecp"
|
|
1760
|
+
],
|
|
1761
|
+
"example": "ecp"
|
|
1762
|
+
},
|
|
1763
|
+
"display_name": {
|
|
1764
|
+
"type": "string",
|
|
1765
|
+
"description": "Name of the portal user",
|
|
1766
|
+
"example": "Max Mustermann"
|
|
1767
|
+
},
|
|
1768
|
+
"user_id": {
|
|
1769
|
+
"type": "string",
|
|
1770
|
+
"description": "Unique identifier of the portal user",
|
|
1771
|
+
"example": "ecp-456"
|
|
1772
|
+
},
|
|
1773
|
+
"email": {
|
|
1774
|
+
"type": "string",
|
|
1775
|
+
"format": "email",
|
|
1776
|
+
"description": "Email address of the portal user",
|
|
1777
|
+
"example": "max.mustermann@customer.de"
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
"required": [
|
|
1781
|
+
"type",
|
|
1782
|
+
"display_name",
|
|
1783
|
+
"user_id"
|
|
1784
|
+
]
|
|
1785
|
+
}
|
|
1786
|
+
]
|
|
1787
|
+
},
|
|
1788
|
+
"SearchGeolocation": {
|
|
1789
|
+
"type": "object",
|
|
1790
|
+
"description": "Request payload for geocoding an address to coordinates",
|
|
1791
|
+
"properties": {
|
|
1792
|
+
"address": {
|
|
1793
|
+
"type": "string",
|
|
1794
|
+
"description": "Full address string to convert to geographic coordinates.\nFor best results, include street, city, postal code, and country.\n",
|
|
1795
|
+
"example": "Auweg 1, 93055 Regensburg, DE"
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
"required": [
|
|
1799
|
+
"address"
|
|
1800
|
+
]
|
|
1801
|
+
},
|
|
1802
|
+
"Geolocation": {
|
|
1803
|
+
"type": "object",
|
|
1804
|
+
"description": "Geographic coordinates with optional metadata",
|
|
1805
|
+
"properties": {
|
|
1806
|
+
"lat": {
|
|
1807
|
+
"type": "number",
|
|
1808
|
+
"description": "Latitude coordinate (WGS84)",
|
|
1809
|
+
"example": 49.013
|
|
1810
|
+
},
|
|
1811
|
+
"lng": {
|
|
1812
|
+
"type": "number",
|
|
1813
|
+
"description": "Longitude coordinate (WGS84)",
|
|
1814
|
+
"example": 12.101
|
|
1815
|
+
},
|
|
1816
|
+
"addressLabel": {
|
|
1817
|
+
"type": "string",
|
|
1818
|
+
"description": "Normalized full address as returned by the geocoding service",
|
|
1819
|
+
"example": "Auweg 1, 93055 Regensburg, Germany"
|
|
1820
|
+
},
|
|
1821
|
+
"relevance": {
|
|
1822
|
+
"type": "number",
|
|
1823
|
+
"minimum": 0,
|
|
1824
|
+
"maximum": 1,
|
|
1825
|
+
"description": "Confidence score for the geocoding result (0-1).\nValues closer to 1 indicate higher confidence that the coordinates match the input address.\n",
|
|
1826
|
+
"example": 0.95
|
|
1827
|
+
}
|
|
1828
|
+
},
|
|
1829
|
+
"required": [
|
|
1830
|
+
"lat",
|
|
1831
|
+
"lng"
|
|
1832
|
+
]
|
|
1833
|
+
},
|
|
1834
|
+
"Address": {
|
|
1835
|
+
"type": "object",
|
|
1836
|
+
"description": "Structured postal address",
|
|
1837
|
+
"properties": {
|
|
1838
|
+
"street": {
|
|
1839
|
+
"type": "string",
|
|
1840
|
+
"description": "Street name without house number",
|
|
1841
|
+
"example": "Auweg"
|
|
1842
|
+
},
|
|
1843
|
+
"street_number": {
|
|
1844
|
+
"type": "string",
|
|
1845
|
+
"description": "House or building number",
|
|
1846
|
+
"example": "10"
|
|
1847
|
+
},
|
|
1848
|
+
"city": {
|
|
1849
|
+
"type": "string",
|
|
1850
|
+
"description": "City or locality name",
|
|
1851
|
+
"example": "Regensburg"
|
|
1852
|
+
},
|
|
1853
|
+
"postal_code": {
|
|
1854
|
+
"type": "string",
|
|
1855
|
+
"description": "Postal or ZIP code",
|
|
1856
|
+
"example": "93055"
|
|
1857
|
+
},
|
|
1858
|
+
"country": {
|
|
1859
|
+
"type": "string",
|
|
1860
|
+
"description": "Country code (ISO 3166-1 alpha-2)",
|
|
1861
|
+
"example": "DE"
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
},
|
|
1865
|
+
"AddressGeolocation": {
|
|
1866
|
+
"type": "object",
|
|
1867
|
+
"description": "Combined address and geographic coordinates for a location",
|
|
1868
|
+
"allOf": [
|
|
1869
|
+
{
|
|
1870
|
+
"type": "object",
|
|
1871
|
+
"properties": {
|
|
1872
|
+
"address": {
|
|
1873
|
+
"$ref": "#/components/schemas/Address"
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
},
|
|
1877
|
+
{
|
|
1878
|
+
"$ref": "#/components/schemas/Geolocation"
|
|
1879
|
+
}
|
|
1880
|
+
],
|
|
1881
|
+
"required": [
|
|
1882
|
+
"address"
|
|
1883
|
+
]
|
|
1884
|
+
},
|
|
1885
|
+
"PartnerUser": {
|
|
1886
|
+
"type": "object",
|
|
1887
|
+
"description": "A user within a partner organization, including their assigned roles",
|
|
1888
|
+
"properties": {
|
|
1889
|
+
"id": {
|
|
1890
|
+
"type": "string",
|
|
1891
|
+
"description": "Unique identifier for the user",
|
|
1892
|
+
"example": "456"
|
|
1893
|
+
},
|
|
1894
|
+
"name": {
|
|
1895
|
+
"type": "string",
|
|
1896
|
+
"description": "Full name of the user",
|
|
1897
|
+
"example": "John Doe"
|
|
1898
|
+
},
|
|
1899
|
+
"email": {
|
|
1900
|
+
"type": "string",
|
|
1901
|
+
"format": "email",
|
|
1902
|
+
"description": "Email address of the user",
|
|
1903
|
+
"example": "user@partner.com"
|
|
1904
|
+
},
|
|
1905
|
+
"status": {
|
|
1906
|
+
"type": "string",
|
|
1907
|
+
"description": "Current status of the user account:\n- Active: User has completed registration and can access the system\n- Pending: User has been invited but not yet completed registration\n- Deactivated: User account has been disabled\n",
|
|
1908
|
+
"example": "Active"
|
|
1909
|
+
},
|
|
1910
|
+
"image": {
|
|
1911
|
+
"type": "object",
|
|
1912
|
+
"description": "Profile image URLs for the user",
|
|
1913
|
+
"properties": {
|
|
1914
|
+
"original": {
|
|
1915
|
+
"type": "string",
|
|
1916
|
+
"format": "uri",
|
|
1917
|
+
"description": "Full-resolution profile image URL"
|
|
1918
|
+
},
|
|
1919
|
+
"thumbnail_32": {
|
|
1920
|
+
"type": "string",
|
|
1921
|
+
"format": "uri",
|
|
1922
|
+
"description": "32x32 pixel thumbnail image URL"
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
},
|
|
1926
|
+
"roles": {
|
|
1927
|
+
"type": "array",
|
|
1928
|
+
"description": "List of roles assigned to the user within the partner organization",
|
|
1929
|
+
"items": {
|
|
1930
|
+
"type": "object",
|
|
1931
|
+
"properties": {
|
|
1932
|
+
"id": {
|
|
1933
|
+
"type": "string",
|
|
1934
|
+
"description": "Unique identifier for the role",
|
|
1935
|
+
"example": "123:partner_admin"
|
|
1936
|
+
},
|
|
1937
|
+
"slug": {
|
|
1938
|
+
"type": "string",
|
|
1939
|
+
"description": "URL-friendly role identifier",
|
|
1940
|
+
"example": "partner_admin"
|
|
1941
|
+
},
|
|
1942
|
+
"name": {
|
|
1943
|
+
"type": "string",
|
|
1944
|
+
"description": "Human-readable role name",
|
|
1945
|
+
"example": "Partner Administrator"
|
|
1946
|
+
}
|
|
1947
|
+
},
|
|
1948
|
+
"required": [
|
|
1949
|
+
"id",
|
|
1950
|
+
"slug",
|
|
1951
|
+
"name"
|
|
1952
|
+
]
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
},
|
|
1956
|
+
"required": [
|
|
1957
|
+
"id",
|
|
1958
|
+
"email",
|
|
1959
|
+
"status",
|
|
1960
|
+
"roles"
|
|
1961
|
+
]
|
|
1962
|
+
},
|
|
1963
|
+
"CreatePartnerUserPayload": {
|
|
1964
|
+
"type": "object",
|
|
1965
|
+
"description": "Request payload for creating a new user in a partner organization",
|
|
1966
|
+
"properties": {
|
|
1967
|
+
"email": {
|
|
1968
|
+
"type": "string",
|
|
1969
|
+
"format": "email",
|
|
1970
|
+
"description": "Email address for the new user. An invitation will be sent to this address.",
|
|
1971
|
+
"example": "newuser@partner.com"
|
|
1972
|
+
},
|
|
1973
|
+
"language": {
|
|
1974
|
+
"type": "string",
|
|
1975
|
+
"enum": [
|
|
1976
|
+
"en",
|
|
1977
|
+
"de"
|
|
1978
|
+
],
|
|
1979
|
+
"description": "Preferred language for the user. Determines the language of the invitation email and default UI language.",
|
|
1980
|
+
"example": "de"
|
|
1981
|
+
},
|
|
1982
|
+
"roles": {
|
|
1983
|
+
"type": "array",
|
|
1984
|
+
"description": "Role IDs to automatically assign to the user upon creation.\nIf not provided, the user will have no roles until manually assigned.\n",
|
|
1985
|
+
"items": {
|
|
1986
|
+
"type": "string"
|
|
1987
|
+
},
|
|
1988
|
+
"example": [
|
|
1989
|
+
"123:partner_viewer"
|
|
1990
|
+
]
|
|
1991
|
+
}
|
|
1992
|
+
},
|
|
1993
|
+
"required": [
|
|
1994
|
+
"email"
|
|
1995
|
+
]
|
|
1996
|
+
},
|
|
1997
|
+
"CreatePartnerRolePayload": {
|
|
1998
|
+
"type": "object",
|
|
1999
|
+
"description": "Request payload for creating a new role in a partner organization",
|
|
2000
|
+
"properties": {
|
|
2001
|
+
"name": {
|
|
2002
|
+
"type": "string",
|
|
2003
|
+
"description": "Human-readable display name for the role",
|
|
2004
|
+
"example": "Partner Administrator"
|
|
2005
|
+
},
|
|
2006
|
+
"slug": {
|
|
2007
|
+
"type": "string",
|
|
2008
|
+
"description": "URL-friendly identifier for the role (lowercase, underscores allowed)",
|
|
2009
|
+
"example": "partner_admin",
|
|
2010
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
2011
|
+
},
|
|
2012
|
+
"grants": {
|
|
2013
|
+
"type": "array",
|
|
2014
|
+
"description": "Permission grants that define what users with this role can do.\nEach grant specifies an action and resource pattern.\n",
|
|
2015
|
+
"items": {
|
|
2016
|
+
"$ref": "#/components/schemas/GrantWithDependencies"
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
},
|
|
2020
|
+
"required": [
|
|
2021
|
+
"name",
|
|
2022
|
+
"slug",
|
|
2023
|
+
"grants"
|
|
2024
|
+
]
|
|
2025
|
+
},
|
|
2026
|
+
"UpdatePartnerRolePayload": {
|
|
2027
|
+
"description": "Request payload for updating an existing role in a partner organization",
|
|
2028
|
+
"allOf": [
|
|
2029
|
+
{
|
|
2030
|
+
"properties": {
|
|
2031
|
+
"grants": {
|
|
2032
|
+
"type": "array",
|
|
2033
|
+
"description": "Updated list of permission grants for the role",
|
|
2034
|
+
"items": {
|
|
2035
|
+
"$ref": "#/components/schemas/GrantWithDependencies"
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
},
|
|
2040
|
+
{
|
|
2041
|
+
"$ref": "#/components/schemas/BaseRoleForCreate"
|
|
2042
|
+
}
|
|
2043
|
+
]
|
|
2044
|
+
},
|
|
2045
|
+
"Grant": {
|
|
2046
|
+
"type": "object",
|
|
2047
|
+
"description": "A permission grant that allows or denies a specific action on a resource.\n\nGrants are the building blocks of roles and define what users can do within the system.\n",
|
|
2048
|
+
"properties": {
|
|
2049
|
+
"action": {
|
|
2050
|
+
"type": "string",
|
|
2051
|
+
"description": "The action being granted or denied.\nCommon actions include: entity-read, entity-create, entity-update, entity-delete\n",
|
|
2052
|
+
"example": "entity-read"
|
|
2053
|
+
},
|
|
2054
|
+
"resource": {
|
|
2055
|
+
"type": "string",
|
|
2056
|
+
"description": "The resource pattern this grant applies to.\nFormat: entity:<org_id>:<schema>:<entity_id>\nUse wildcards (*) to match multiple resources.\n",
|
|
2057
|
+
"example": "entity:123:contact:*"
|
|
2058
|
+
},
|
|
2059
|
+
"effect": {
|
|
2060
|
+
"type": "string",
|
|
2061
|
+
"default": "allow",
|
|
2062
|
+
"description": "Whether this grant allows or denies the action",
|
|
2063
|
+
"enum": [
|
|
2064
|
+
"allow",
|
|
2065
|
+
"deny"
|
|
2066
|
+
]
|
|
2067
|
+
},
|
|
2068
|
+
"conditions": {
|
|
2069
|
+
"type": "array",
|
|
2070
|
+
"description": "Additional conditions that must be met for this grant to apply",
|
|
2071
|
+
"items": {
|
|
2072
|
+
"$ref": "#/components/schemas/GrantCondition"
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
},
|
|
2076
|
+
"required": [
|
|
2077
|
+
"action"
|
|
2078
|
+
]
|
|
2079
|
+
},
|
|
2080
|
+
"GrantWithDependencies": {
|
|
2081
|
+
"description": "A grant with optional dependent grants that are automatically included when this grant is assigned",
|
|
2082
|
+
"allOf": [
|
|
2083
|
+
{
|
|
2084
|
+
"$ref": "#/components/schemas/Grant"
|
|
2085
|
+
},
|
|
2086
|
+
{
|
|
2087
|
+
"type": "object",
|
|
2088
|
+
"properties": {
|
|
2089
|
+
"dependencies": {
|
|
2090
|
+
"description": "Additional grants that are automatically included when this grant is assigned.\nDependencies are expanded and stored with the role to ensure users have all\nnecessary permissions for the primary action.\n",
|
|
2091
|
+
"type": "array",
|
|
2092
|
+
"items": {
|
|
2093
|
+
"$ref": "#/components/schemas/Grant"
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
]
|
|
2099
|
+
},
|
|
2100
|
+
"GrantCondition": {
|
|
2101
|
+
"description": "An additional condition that must be met for a grant to apply.\nConditions allow fine-grained control over when permissions are active.\n",
|
|
2102
|
+
"allOf": [
|
|
2103
|
+
{
|
|
2104
|
+
"type": "object",
|
|
2105
|
+
"required": [
|
|
2106
|
+
"operation"
|
|
2107
|
+
]
|
|
2108
|
+
},
|
|
2109
|
+
{
|
|
2110
|
+
"anyOf": [
|
|
2111
|
+
{
|
|
2112
|
+
"$ref": "#/components/schemas/EqualsCondition"
|
|
2113
|
+
}
|
|
2114
|
+
]
|
|
2115
|
+
}
|
|
2116
|
+
]
|
|
2117
|
+
},
|
|
2118
|
+
"EqualsCondition": {
|
|
2119
|
+
"type": "object",
|
|
2120
|
+
"description": "A condition that checks if an attribute equals one of the specified values.\nThe grant only applies when the condition is satisfied.\n",
|
|
2121
|
+
"properties": {
|
|
2122
|
+
"attribute": {
|
|
2123
|
+
"type": "string",
|
|
2124
|
+
"description": "The attribute path to check (dot notation for nested attributes).\nExample: workflows.primary.task_name checks the task name in the primary workflow.\n",
|
|
2125
|
+
"example": "workflows.primary.task_name"
|
|
2126
|
+
},
|
|
2127
|
+
"operation": {
|
|
2128
|
+
"type": "string",
|
|
2129
|
+
"description": "The comparison operation to perform",
|
|
2130
|
+
"enum": [
|
|
2131
|
+
"equals"
|
|
2132
|
+
]
|
|
2133
|
+
},
|
|
2134
|
+
"values": {
|
|
2135
|
+
"type": "array",
|
|
2136
|
+
"description": "List of values to match against - the condition is true if the attribute equals any of these values",
|
|
2137
|
+
"items": {
|
|
2138
|
+
"type": "string",
|
|
2139
|
+
"example": "Qualification"
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
},
|
|
2143
|
+
"required": [
|
|
2144
|
+
"attribute",
|
|
2145
|
+
"operation",
|
|
2146
|
+
"values"
|
|
2147
|
+
]
|
|
2148
|
+
},
|
|
2149
|
+
"RoleId": {
|
|
2150
|
+
"type": "string",
|
|
2151
|
+
"description": "Unique identifier for a role, combining organization ID and role slug.\nFormat: <organization_id>:<slug>\n",
|
|
2152
|
+
"example": "123:owner"
|
|
2153
|
+
},
|
|
2154
|
+
"BaseRoleForCreate": {
|
|
2155
|
+
"type": "object",
|
|
2156
|
+
"description": "Base schema for creating or updating a role",
|
|
2157
|
+
"properties": {
|
|
2158
|
+
"id": {
|
|
2159
|
+
"$ref": "#/components/schemas/RoleId"
|
|
2160
|
+
},
|
|
2161
|
+
"name": {
|
|
2162
|
+
"type": "string",
|
|
2163
|
+
"description": "Human-readable display name for the role",
|
|
2164
|
+
"example": "Owner"
|
|
2165
|
+
},
|
|
2166
|
+
"slug": {
|
|
2167
|
+
"type": "string",
|
|
2168
|
+
"description": "URL-friendly identifier for the role (lowercase, no spaces)",
|
|
2169
|
+
"example": "owner",
|
|
2170
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
2171
|
+
},
|
|
2172
|
+
"grants": {
|
|
2173
|
+
"type": "array",
|
|
2174
|
+
"description": "List of permission grants that define what users with this role can do",
|
|
2175
|
+
"items": {
|
|
2176
|
+
"$ref": "#/components/schemas/Grant"
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
},
|
|
2180
|
+
"required": [
|
|
2181
|
+
"name",
|
|
2182
|
+
"slug",
|
|
2183
|
+
"grants"
|
|
2184
|
+
]
|
|
2185
|
+
},
|
|
2186
|
+
"PartnerRole": {
|
|
2187
|
+
"type": "object",
|
|
2188
|
+
"description": "A role definition for users in a partner organization",
|
|
2189
|
+
"properties": {
|
|
2190
|
+
"id": {
|
|
2191
|
+
"type": "string",
|
|
2192
|
+
"description": "Unique identifier for the role (format: org_id:slug)",
|
|
2193
|
+
"example": "123:partner_admin"
|
|
2194
|
+
},
|
|
2195
|
+
"slug": {
|
|
2196
|
+
"type": "string",
|
|
2197
|
+
"description": "URL-friendly identifier for the role",
|
|
2198
|
+
"example": "partner_admin"
|
|
2199
|
+
},
|
|
2200
|
+
"name": {
|
|
2201
|
+
"type": "string",
|
|
2202
|
+
"description": "Human-readable display name for the role",
|
|
2203
|
+
"example": "Partner Administrator"
|
|
2204
|
+
},
|
|
2205
|
+
"type": {
|
|
2206
|
+
"type": "string",
|
|
2207
|
+
"description": "Type of role. Partner roles are typically 'share_role' indicating\nthey are designed for cross-organization sharing scenarios.\n",
|
|
2208
|
+
"example": "share_role"
|
|
2209
|
+
},
|
|
2210
|
+
"grants": {
|
|
2211
|
+
"type": "array",
|
|
2212
|
+
"description": "List of permission grants that define what users with this role can do",
|
|
2213
|
+
"items": {
|
|
2214
|
+
"$ref": "#/components/schemas/Grant"
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
},
|
|
2218
|
+
"required": [
|
|
2219
|
+
"id",
|
|
2220
|
+
"slug",
|
|
2221
|
+
"name",
|
|
2222
|
+
"grants"
|
|
2223
|
+
]
|
|
2224
|
+
},
|
|
2225
|
+
"AssignRolesPayload": {
|
|
2226
|
+
"type": "object",
|
|
2227
|
+
"description": "Request payload for assigning or unassigning roles to/from a user",
|
|
2228
|
+
"properties": {
|
|
2229
|
+
"roleIds": {
|
|
2230
|
+
"type": "array",
|
|
2231
|
+
"description": "Array of role IDs to assign or unassign",
|
|
2232
|
+
"items": {
|
|
2233
|
+
"type": "string"
|
|
2234
|
+
},
|
|
2235
|
+
"example": [
|
|
2236
|
+
"123:partner_admin",
|
|
2237
|
+
"123:partner_viewer"
|
|
2238
|
+
]
|
|
2239
|
+
}
|
|
2240
|
+
},
|
|
2241
|
+
"required": [
|
|
2242
|
+
"roleIds"
|
|
2243
|
+
]
|
|
2244
|
+
},
|
|
2245
|
+
"User": {
|
|
2246
|
+
"type": "object",
|
|
2247
|
+
"description": "A user account in the epilot platform",
|
|
2248
|
+
"properties": {
|
|
2249
|
+
"id": {
|
|
2250
|
+
"type": "string",
|
|
2251
|
+
"description": "Unique identifier for the user",
|
|
2252
|
+
"example": "456"
|
|
2253
|
+
},
|
|
2254
|
+
"email": {
|
|
2255
|
+
"type": "string",
|
|
2256
|
+
"format": "email",
|
|
2257
|
+
"description": "Email address of the user",
|
|
2258
|
+
"example": "user@example.com"
|
|
2259
|
+
},
|
|
2260
|
+
"display_name": {
|
|
2261
|
+
"type": "string",
|
|
2262
|
+
"description": "Full name of the user for display purposes",
|
|
2263
|
+
"example": "John Doe"
|
|
2264
|
+
},
|
|
2265
|
+
"status": {
|
|
2266
|
+
"type": "string",
|
|
2267
|
+
"description": "Current status of the user account:\n- Active: User has completed registration and can access the system\n- Pending: User has been invited but not yet completed registration\n- Deactivated: User account has been disabled\n",
|
|
2268
|
+
"example": "Active",
|
|
2269
|
+
"enum": [
|
|
2270
|
+
"Active",
|
|
2271
|
+
"Pending",
|
|
2272
|
+
"Deactivated"
|
|
2273
|
+
]
|
|
2274
|
+
}
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
},
|
|
2279
|
+
"servers": [
|
|
2280
|
+
{
|
|
2281
|
+
"url": "https://partner-directory-api.sls.epilot.io"
|
|
2282
|
+
}
|
|
2283
|
+
]
|
|
2284
|
+
}
|