@epilot/sdk 2.1.1 → 2.1.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.
Files changed (133) hide show
  1. package/definitions/email-settings-runtime.json +1 -1
  2. package/definitions/email-settings.json +121 -0
  3. package/definitions/partner-directory-runtime.json +1 -1
  4. package/definitions/partner-directory.json +795 -229
  5. package/dist/apis/access-token.cjs +6 -6
  6. package/dist/apis/access-token.js +1 -1
  7. package/dist/apis/address-suggestions.cjs +6 -6
  8. package/dist/apis/address-suggestions.js +1 -1
  9. package/dist/apis/address.cjs +6 -6
  10. package/dist/apis/address.js +1 -1
  11. package/dist/apis/ai-agents.cjs +6 -6
  12. package/dist/apis/ai-agents.js +1 -1
  13. package/dist/apis/app.cjs +6 -6
  14. package/dist/apis/app.js +1 -1
  15. package/dist/apis/audit-logs.cjs +6 -6
  16. package/dist/apis/audit-logs.js +1 -1
  17. package/dist/apis/automation.cjs +6 -6
  18. package/dist/apis/automation.js +1 -1
  19. package/dist/apis/billing.cjs +6 -6
  20. package/dist/apis/billing.js +1 -1
  21. package/dist/apis/blueprint-manifest.cjs +6 -6
  22. package/dist/apis/blueprint-manifest.js +1 -1
  23. package/dist/apis/consent.cjs +6 -6
  24. package/dist/apis/consent.js +1 -1
  25. package/dist/apis/customer-portal.cjs +6 -6
  26. package/dist/apis/customer-portal.js +1 -1
  27. package/dist/apis/dashboard.cjs +6 -6
  28. package/dist/apis/dashboard.js +1 -1
  29. package/dist/apis/data-management.cjs +6 -6
  30. package/dist/apis/data-management.js +1 -1
  31. package/dist/apis/deduplication.cjs +6 -6
  32. package/dist/apis/deduplication.js +1 -1
  33. package/dist/apis/design.cjs +6 -6
  34. package/dist/apis/design.js +1 -1
  35. package/dist/apis/document.cjs +6 -6
  36. package/dist/apis/document.js +1 -1
  37. package/dist/apis/email-settings.cjs +8 -8
  38. package/dist/apis/email-settings.d.cts +2 -2
  39. package/dist/apis/email-settings.d.ts +2 -2
  40. package/dist/apis/email-settings.js +2 -2
  41. package/dist/apis/email-template.cjs +6 -6
  42. package/dist/apis/email-template.js +1 -1
  43. package/dist/apis/entity-mapping.cjs +6 -6
  44. package/dist/apis/entity-mapping.js +1 -1
  45. package/dist/apis/entity.cjs +6 -6
  46. package/dist/apis/entity.js +1 -1
  47. package/dist/apis/environments.cjs +6 -6
  48. package/dist/apis/environments.js +1 -1
  49. package/dist/apis/erp-integration.cjs +6 -6
  50. package/dist/apis/erp-integration.js +1 -1
  51. package/dist/apis/event-catalog.cjs +6 -6
  52. package/dist/apis/event-catalog.js +1 -1
  53. package/dist/apis/file.cjs +6 -6
  54. package/dist/apis/file.js +1 -1
  55. package/dist/apis/iban.cjs +6 -6
  56. package/dist/apis/iban.js +1 -1
  57. package/dist/apis/journey.cjs +6 -6
  58. package/dist/apis/journey.js +1 -1
  59. package/dist/apis/kanban.cjs +6 -6
  60. package/dist/apis/kanban.js +1 -1
  61. package/dist/apis/message.cjs +6 -6
  62. package/dist/apis/message.js +1 -1
  63. package/dist/apis/metering.cjs +6 -6
  64. package/dist/apis/metering.js +1 -1
  65. package/dist/apis/notes.cjs +6 -6
  66. package/dist/apis/notes.js +1 -1
  67. package/dist/apis/notification.cjs +6 -6
  68. package/dist/apis/notification.js +1 -1
  69. package/dist/apis/organization.cjs +6 -6
  70. package/dist/apis/organization.js +1 -1
  71. package/dist/apis/partner-directory.cjs +8 -8
  72. package/dist/apis/partner-directory.d.cts +2 -2
  73. package/dist/apis/partner-directory.d.ts +2 -2
  74. package/dist/apis/partner-directory.js +2 -2
  75. package/dist/apis/permissions.cjs +6 -6
  76. package/dist/apis/permissions.js +1 -1
  77. package/dist/apis/pricing-tier.cjs +6 -6
  78. package/dist/apis/pricing-tier.js +1 -1
  79. package/dist/apis/pricing.cjs +6 -6
  80. package/dist/apis/pricing.js +1 -1
  81. package/dist/apis/purpose.cjs +6 -6
  82. package/dist/apis/purpose.js +1 -1
  83. package/dist/apis/sandbox.cjs +6 -6
  84. package/dist/apis/sandbox.js +1 -1
  85. package/dist/apis/submission.cjs +6 -6
  86. package/dist/apis/submission.js +1 -1
  87. package/dist/apis/targeting.cjs +6 -6
  88. package/dist/apis/targeting.js +1 -1
  89. package/dist/apis/template-variables.cjs +6 -6
  90. package/dist/apis/template-variables.js +1 -1
  91. package/dist/apis/user.cjs +6 -6
  92. package/dist/apis/user.js +1 -1
  93. package/dist/apis/validation-rules.cjs +6 -6
  94. package/dist/apis/validation-rules.js +1 -1
  95. package/dist/apis/webhooks.cjs +6 -6
  96. package/dist/apis/webhooks.js +1 -1
  97. package/dist/apis/workflow-definition.cjs +6 -6
  98. package/dist/apis/workflow-definition.js +1 -1
  99. package/dist/apis/workflow.cjs +6 -6
  100. package/dist/apis/workflow.js +1 -1
  101. package/dist/bin/cli.js +1 -1
  102. package/dist/{chunk-RJ3DWFSK.js → chunk-3NLMZLCD.js} +1 -1
  103. package/dist/{chunk-BPHOGIQM.cjs → chunk-A67W5WAP.cjs} +1 -1
  104. package/dist/{chunk-F5JVW2D5.cjs → chunk-BFUNXZRX.cjs} +1 -1
  105. package/dist/{chunk-WSZWUQDD.cjs → chunk-FPO2GB3J.cjs} +4 -4
  106. package/dist/{chunk-AUH6NP6Y.js → chunk-I2XRA5AM.js} +1 -1
  107. package/dist/{chunk-NBYH536J.js → chunk-PDALFDYR.js} +4 -4
  108. package/dist/email-settings-EJ3DCPPN.js +7 -0
  109. package/dist/email-settings-TALOPLBC.cjs +7 -0
  110. package/dist/{email-settings-runtime-NS7MU3RB.cjs → email-settings-runtime-3NJIAWWI.cjs} +2 -2
  111. package/dist/{email-settings-runtime-X7F3EPAB.js → email-settings-runtime-Q2HVKJDS.js} +1 -1
  112. package/dist/{email-settings.d-BXxYjVDr.d.cts → email-settings.d-DUvmLZMN.d.cts} +115 -2
  113. package/dist/{email-settings.d-BXxYjVDr.d.ts → email-settings.d-DUvmLZMN.d.ts} +115 -2
  114. package/dist/index.cjs +12 -12
  115. package/dist/index.d.cts +2 -2
  116. package/dist/index.d.ts +2 -2
  117. package/dist/index.js +3 -3
  118. package/dist/{js-yaml-UPZKYVRY.js → js-yaml-DLCVPJ7G.js} +17 -15
  119. package/dist/partner-directory-THI7JEXK.js +7 -0
  120. package/dist/partner-directory-ZQIBKD5Q.cjs +7 -0
  121. package/dist/{partner-directory-runtime-RSONSDNJ.cjs → partner-directory-runtime-AUHVA5Q3.cjs} +2 -2
  122. package/dist/{partner-directory-runtime-QURDOO4Z.js → partner-directory-runtime-GNVT7U7R.js} +1 -1
  123. package/dist/partner-directory.d-BCIjHoGs.d.cts +2337 -0
  124. package/dist/partner-directory.d-BCIjHoGs.d.ts +2337 -0
  125. package/docs/email-settings.md +80 -1
  126. package/docs/partner-directory.md +295 -127
  127. package/package.json +1 -1
  128. package/dist/email-settings-TQ5GGDYG.js +0 -7
  129. package/dist/email-settings-TQC34GST.cjs +0 -7
  130. package/dist/partner-directory-2XMPQWWX.js +0 -7
  131. package/dist/partner-directory-WHNTKQ5E.cjs +0 -7
  132. package/dist/partner-directory.d-CRNkDF8q.d.cts +0 -1510
  133. package/dist/partner-directory.d-CRNkDF8q.d.ts +0 -1510
@@ -1,33 +1,28 @@
1
1
  {
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
- "title": "Partner API",
5
- "description": "Management of Partners in epilot",
6
- "version": "1.5.0"
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
7
  },
8
8
  "tags": [
9
9
  {
10
- "name": "partners",
10
+ "name": "Partners",
11
11
  "x-displayName": "Partners",
12
- "description": "Partner operations"
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
13
  },
14
14
  {
15
- "name": "partner_users",
15
+ "name": "Partner Users",
16
16
  "x-displayName": "Partner Users",
17
- "description": "Partner user management operations"
18
- },
19
- {
20
- "name": "partner_schema",
21
- "x-displayName": "Partner",
22
- "description": "<SchemaDefinition schemaRef=\"#/components/schemas/Partner\" />\n"
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"
23
18
  }
24
19
  ],
25
20
  "x-tagGroups": [
26
21
  {
27
22
  "name": "APIs",
28
23
  "tags": [
29
- "partners",
30
- "partner_users"
24
+ "Partners",
25
+ "Partner Users"
31
26
  ]
32
27
  },
33
28
  {
@@ -51,9 +46,9 @@
51
46
  "operationId": "approvePartner",
52
47
  "summary": "approvePartner",
53
48
  "tags": [
54
- "partners"
49
+ "Partners"
55
50
  ],
56
- "description": "Approve partner request",
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",
57
52
  "parameters": [
58
53
  {
59
54
  "in": "path",
@@ -62,22 +57,33 @@
62
57
  "$ref": "#/components/schemas/PartnerId"
63
58
  },
64
59
  "required": true,
65
- "description": "The Id of partner"
60
+ "description": "The unique identifier of the partner to approve"
66
61
  }
67
62
  ],
68
63
  "responses": {
69
64
  "201": {
70
- "description": "Approve successfully",
65
+ "description": "Partner approved successfully",
71
66
  "content": {
72
67
  "application/json": {
73
68
  "schema": {
74
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"
75
78
  }
76
79
  }
77
80
  }
78
81
  },
79
82
  "400": {
80
- "description": "Unable to approve"
83
+ "description": "Unable to approve partner - partner may already be approved or in an invalid state"
84
+ },
85
+ "404": {
86
+ "description": "Partner not found"
81
87
  }
82
88
  }
83
89
  }
@@ -87,9 +93,9 @@
87
93
  "operationId": "rejectPartner",
88
94
  "summary": "rejectPartner",
89
95
  "tags": [
90
- "partners"
96
+ "Partners"
91
97
  ],
92
- "description": "Reject partner request",
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",
93
99
  "parameters": [
94
100
  {
95
101
  "in": "path",
@@ -98,22 +104,33 @@
98
104
  "$ref": "#/components/schemas/PartnerId"
99
105
  },
100
106
  "required": true,
101
- "description": "The Id of partner"
107
+ "description": "The unique identifier of the partner to reject"
102
108
  }
103
109
  ],
104
110
  "responses": {
105
111
  "200": {
106
- "description": "Invited successfully",
112
+ "description": "Partner rejected successfully",
107
113
  "content": {
108
114
  "application/json": {
109
115
  "schema": {
110
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"
111
125
  }
112
126
  }
113
127
  }
114
128
  },
115
129
  "400": {
116
- "description": "Unable to reject"
130
+ "description": "Unable to reject partner - partner may already be rejected or in an invalid state"
131
+ },
132
+ "404": {
133
+ "description": "Partner not found"
117
134
  }
118
135
  }
119
136
  }
@@ -121,10 +138,10 @@
121
138
  "/v1/partners/assignables:search": {
122
139
  "post": {
123
140
  "operationId": "searchAssignable",
124
- "summary": "searchAssignables",
125
- "description": "Search for assignable users/organizations from this organization and Partners\n\nResults can include:\n - Users in your organization\n - Users in partner organizations\n - Partner organizations\n",
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",
126
143
  "tags": [
127
- "partners"
144
+ "Partners"
128
145
  ],
129
146
  "requestBody": {
130
147
  "content": {
@@ -133,37 +150,45 @@
133
150
  "type": "object",
134
151
  "properties": {
135
152
  "q": {
136
- "description": "search query to filter results",
153
+ "description": "Search query string to filter results by name or email",
137
154
  "type": "string",
138
- "default": ""
155
+ "default": "",
156
+ "example": "john"
139
157
  },
140
158
  "from": {
141
- "description": "start results from an offset for pagination",
159
+ "description": "Starting offset for pagination (zero-based index)",
142
160
  "type": "integer",
143
161
  "minimum": 0,
144
- "default": 0
162
+ "default": 0,
163
+ "example": 0
145
164
  },
146
165
  "size": {
147
- "description": "limit number of results to return",
166
+ "description": "Maximum number of results to return per page",
148
167
  "type": "integer",
149
168
  "minimum": 1,
150
169
  "maximum": 1000,
151
- "default": 25
170
+ "default": 25,
171
+ "example": 25
152
172
  },
153
173
  "org_ids": {
154
- "description": "filter results to specific organizations. defaults to all orgs",
174
+ "description": "Filter results to specific organization IDs. If not provided, searches all accessible organizations including partners.",
155
175
  "type": "array",
156
176
  "items": {
157
177
  "$ref": "#/components/schemas/OrganizationId"
158
- }
178
+ },
179
+ "example": [
180
+ "123",
181
+ "456"
182
+ ]
159
183
  },
160
184
  "portalUsersEntityIdScope": {
161
- "description": "Optional parameter if 'types' contains 'ecp' type user. Portal Users will only be fetched in the context of an entity, fetching the related ones through relations and not returning placeholders anymore.",
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",
162
186
  "type": "string",
163
- "default": ""
187
+ "default": "",
188
+ "example": "f7c22299-ca72-4bca-8538-0a88eeefc947"
164
189
  },
165
190
  "types": {
166
- "description": "filter results to specific types of assignables. defaults to all types",
191
+ "description": "Filter results to specific types of assignables.\nIf not provided, defaults to all types except `parent_organization_user`.\n",
167
192
  "type": "array",
168
193
  "default": [
169
194
  "user",
@@ -188,22 +213,31 @@
188
213
  "required": [
189
214
  "q"
190
215
  ]
216
+ },
217
+ "example": {
218
+ "q": "john",
219
+ "from": 0,
220
+ "size": 25,
221
+ "types": [
222
+ "user",
223
+ "partner_user"
224
+ ]
191
225
  }
192
226
  }
193
227
  }
194
228
  },
195
229
  "responses": {
196
230
  "200": {
197
- "description": "List of assignable results",
231
+ "description": "List of assignable results matching the search criteria",
198
232
  "content": {
199
233
  "application/json": {
200
234
  "schema": {
201
235
  "type": "object",
202
236
  "properties": {
203
237
  "hits": {
204
- "description": "total number of search results",
238
+ "description": "Total number of matching results (may exceed returned results for pagination)",
205
239
  "type": "integer",
206
- "example": 25
240
+ "example": 42
207
241
  },
208
242
  "results": {
209
243
  "type": "array",
@@ -212,9 +246,34 @@
212
246
  }
213
247
  }
214
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
+ ]
215
271
  }
216
272
  }
217
273
  }
274
+ },
275
+ "400": {
276
+ "description": "Invalid request parameters"
218
277
  }
219
278
  }
220
279
  }
@@ -222,50 +281,66 @@
222
281
  "/v1/partners/assignables:batchGet": {
223
282
  "post": {
224
283
  "operationId": "batchGetAssignable",
225
- "summary": "batchGet",
226
- "description": "Search for assignable users from this organization by its ids\n",
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",
227
286
  "tags": [
228
- "partners"
287
+ "Partners"
229
288
  ],
230
289
  "requestBody": {
231
290
  "content": {
232
291
  "application/json": {
233
292
  "schema": {
234
293
  "type": "array",
294
+ "minItems": 1,
235
295
  "items": {
236
- "minItems": 1,
237
296
  "type": "object",
238
297
  "properties": {
239
298
  "user_id": {
240
- "description": "user id of assignable",
241
- "type": "string"
299
+ "description": "User ID of the assignable to retrieve",
300
+ "type": "string",
301
+ "example": "456"
242
302
  },
243
303
  "org_id": {
244
- "description": "organization id of assignable (optional, defaults to caller org)",
245
- "type": "string"
304
+ "description": "Organization ID of the assignable. If not provided, defaults to the caller's organization.",
305
+ "type": "string",
306
+ "example": "123"
246
307
  },
247
308
  "group_id": {
248
- "description": "group id of assignable (optional)",
249
- "type": "string"
309
+ "description": "Group ID of the assignable to retrieve (mutually exclusive with user_id)",
310
+ "type": "string",
311
+ "example": "group-789"
250
312
  }
251
313
  }
252
314
  }
253
- }
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
+ ]
254
329
  }
255
330
  }
256
331
  },
257
332
  "responses": {
258
333
  "200": {
259
- "description": "List of assignable results",
334
+ "description": "List of assignable results for the requested IDs",
260
335
  "content": {
261
336
  "application/json": {
262
337
  "schema": {
263
338
  "type": "object",
264
339
  "properties": {
265
340
  "hits": {
266
- "description": "total number of search results",
341
+ "description": "Total number of assignables found",
267
342
  "type": "integer",
268
- "example": 25
343
+ "example": 3
269
344
  },
270
345
  "results": {
271
346
  "type": "array",
@@ -274,9 +349,33 @@
274
349
  }
275
350
  }
276
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
+ ]
277
373
  }
278
374
  }
279
375
  }
376
+ },
377
+ "400": {
378
+ "description": "Invalid request - empty array or malformed request body"
280
379
  }
281
380
  }
282
381
  }
@@ -285,10 +384,10 @@
285
384
  "get": {
286
385
  "operationId": "getPartnerByToken",
287
386
  "summary": "getPartnerByToken",
288
- "description": "Get partner by token",
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",
289
388
  "security": [],
290
389
  "tags": [
291
- "partners"
390
+ "Partners"
292
391
  ],
293
392
  "parameters": [
294
393
  {
@@ -298,22 +397,34 @@
298
397
  "$ref": "#/components/schemas/InviteToken"
299
398
  },
300
399
  "required": true,
301
- "description": "Invite Token"
400
+ "description": "The invitation token received via email",
401
+ "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
302
402
  }
303
403
  ],
304
404
  "responses": {
305
405
  "200": {
306
- "description": "Partner",
406
+ "description": "Partner information retrieved successfully",
307
407
  "content": {
308
408
  "application/json": {
309
409
  "schema": {
310
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"
311
419
  }
312
420
  }
313
421
  }
314
422
  },
423
+ "400": {
424
+ "description": "Invalid or malformed token"
425
+ },
315
426
  "404": {
316
- "description": "Token not found for the partner"
427
+ "description": "Token not found or expired - the invitation may have already been used or is no longer valid"
317
428
  }
318
429
  }
319
430
  }
@@ -322,20 +433,21 @@
322
433
  "post": {
323
434
  "operationId": "activatePartner",
324
435
  "summary": "activatePartner",
325
- "description": "Activate partner using an invite token",
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",
326
437
  "security": [],
327
438
  "tags": [
328
- "partners"
439
+ "Partners"
329
440
  ],
330
441
  "parameters": [
331
442
  {
332
443
  "name": "token",
333
- "description": "Invite Token",
444
+ "description": "The invitation token received via email",
334
445
  "in": "query",
335
446
  "required": true,
336
447
  "schema": {
337
448
  "$ref": "#/components/schemas/InviteToken"
338
- }
449
+ },
450
+ "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
339
451
  }
340
452
  ],
341
453
  "requestBody": {
@@ -343,16 +455,27 @@
343
455
  "application/json": {
344
456
  "schema": {
345
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"
346
463
  }
347
464
  }
348
465
  }
349
466
  },
350
467
  "responses": {
351
468
  "200": {
352
- "description": "Activated successfully"
469
+ "description": "Partner activated successfully - the partnership is now active"
470
+ },
471
+ "400": {
472
+ "description": "Invalid request - missing required fields or invalid data"
353
473
  },
354
474
  "404": {
355
- "description": "Token not found for the partner"
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"
356
479
  }
357
480
  }
358
481
  }
@@ -362,34 +485,43 @@
362
485
  "operationId": "searchGeolocationForText",
363
486
  "summary": "searchGeolocationForText",
364
487
  "tags": [
365
- "partners"
488
+ "Partners"
366
489
  ],
367
- "description": "Converts a given string, in the format of an address, to geo-location latitude and longitude",
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",
368
491
  "requestBody": {
369
492
  "content": {
370
493
  "application/json": {
371
494
  "schema": {
372
495
  "$ref": "#/components/schemas/SearchGeolocation"
496
+ },
497
+ "example": {
498
+ "address": "Auweg 1, 93055 Regensburg, DE"
373
499
  }
374
500
  }
375
501
  }
376
502
  },
377
503
  "responses": {
378
504
  "200": {
379
- "description": "Geo-location converted from text",
505
+ "description": "Geolocation successfully retrieved",
380
506
  "content": {
381
507
  "application/json": {
382
508
  "schema": {
383
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
384
516
  }
385
517
  }
386
518
  }
387
519
  },
388
520
  "400": {
389
- "description": "No text provided"
521
+ "description": "Invalid request - address field is missing or empty"
390
522
  },
391
523
  "404": {
392
- "description": "No geo-location found for text"
524
+ "description": "Address could not be geocoded - no matching location found for the provided address"
393
525
  }
394
526
  }
395
527
  }
@@ -399,9 +531,9 @@
399
531
  "operationId": "invitePartnerV2",
400
532
  "summary": "invitePartnerV2",
401
533
  "tags": [
402
- "partners"
534
+ "Partners"
403
535
  ],
404
- "description": "Invite a partner into collaboration. It will send an email to partner and ask to join into collaboration",
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",
405
537
  "parameters": [
406
538
  {
407
539
  "in": "path",
@@ -410,7 +542,7 @@
410
542
  "$ref": "#/components/schemas/PartnerId"
411
543
  },
412
544
  "required": true,
413
- "description": "The Id of partner"
545
+ "description": "The unique identifier of the partner to invite"
414
546
  }
415
547
  ],
416
548
  "requestBody": {
@@ -418,23 +550,38 @@
418
550
  "application/json": {
419
551
  "schema": {
420
552
  "$ref": "#/components/schemas/PartnerInvitationPayload"
553
+ },
554
+ "example": {
555
+ "language": "de"
421
556
  }
422
557
  }
423
558
  }
424
559
  },
425
560
  "responses": {
426
561
  "200": {
427
- "description": "Invited successfully",
562
+ "description": "Invitation sent successfully",
428
563
  "content": {
429
564
  "application/json": {
430
565
  "schema": {
431
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"
432
576
  }
433
577
  }
434
578
  }
435
579
  },
436
580
  "400": {
437
- "description": "Unable to invite"
581
+ "description": "Unable to send invitation - partner may already be invited or email configuration is invalid"
582
+ },
583
+ "404": {
584
+ "description": "Partner not found"
438
585
  }
439
586
  }
440
587
  }
@@ -444,9 +591,9 @@
444
591
  "operationId": "getPartnerUsers",
445
592
  "summary": "getPartnerUsers",
446
593
  "tags": [
447
- "partner_users"
594
+ "Partner Users"
448
595
  ],
449
- "description": "Get all users for a partner organization with their roles",
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",
450
597
  "parameters": [
451
598
  {
452
599
  "in": "path",
@@ -455,12 +602,12 @@
455
602
  "$ref": "#/components/schemas/OrganizationId"
456
603
  },
457
604
  "required": true,
458
- "description": "The organization ID of the partner"
605
+ "description": "The organization ID of the partner whose users to retrieve"
459
606
  }
460
607
  ],
461
608
  "responses": {
462
609
  "200": {
463
- "description": "List of partner users with roles",
610
+ "description": "List of partner users with their roles",
464
611
  "content": {
465
612
  "application/json": {
466
613
  "schema": {
@@ -473,12 +620,35 @@
473
620
  }
474
621
  }
475
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
+ ]
476
640
  }
477
641
  }
478
642
  }
479
643
  },
480
644
  "400": {
481
- "description": "Unable to fetch partner users"
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"
482
652
  },
483
653
  "500": {
484
654
  "description": "Internal server error"
@@ -489,9 +659,9 @@
489
659
  "operationId": "createPartnerUser",
490
660
  "summary": "createPartnerUser",
491
661
  "tags": [
492
- "partner_users"
662
+ "Partner Users"
493
663
  ],
494
- "description": "Create a new user in a partner organization",
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",
495
665
  "parameters": [
496
666
  {
497
667
  "in": "path",
@@ -500,7 +670,7 @@
500
670
  "$ref": "#/components/schemas/OrganizationId"
501
671
  },
502
672
  "required": true,
503
- "description": "The Partner organization ID where the user should be created"
673
+ "description": "The partner organization ID where the user will be created"
504
674
  }
505
675
  ],
506
676
  "requestBody": {
@@ -508,23 +678,43 @@
508
678
  "application/json": {
509
679
  "schema": {
510
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
+ ]
511
689
  }
512
690
  }
513
691
  }
514
692
  },
515
693
  "responses": {
516
694
  "201": {
517
- "description": "User created successfully",
695
+ "description": "User created successfully - an invitation email has been sent",
518
696
  "content": {
519
697
  "application/json": {
520
698
  "schema": {
521
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"
522
706
  }
523
707
  }
524
708
  }
525
709
  },
526
710
  "400": {
527
- "description": "Unable to create partner user"
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"
528
718
  },
529
719
  "500": {
530
720
  "description": "Internal server error"
@@ -537,9 +727,9 @@
537
727
  "operationId": "deletePartnerUser",
538
728
  "summary": "deletePartnerUser",
539
729
  "tags": [
540
- "partner_users"
730
+ "Partner Users"
541
731
  ],
542
- "description": "Delete a user from a partner organization",
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",
543
733
  "parameters": [
544
734
  {
545
735
  "in": "path",
@@ -557,7 +747,8 @@
557
747
  "type": "string"
558
748
  },
559
749
  "required": true,
560
- "description": "The user ID to delete"
750
+ "description": "The unique identifier of the user to delete",
751
+ "example": "456"
561
752
  }
562
753
  ],
563
754
  "responses": {
@@ -567,15 +758,19 @@
567
758
  "application/json": {
568
759
  "schema": {
569
760
  "type": "object"
570
- }
761
+ },
762
+ "example": {}
571
763
  }
572
764
  }
573
765
  },
574
766
  "400": {
575
- "description": "Unable to delete partner user"
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"
576
771
  },
577
772
  "404": {
578
- "description": "User not found"
773
+ "description": "User or partner organization not found"
579
774
  },
580
775
  "500": {
581
776
  "description": "Internal server error"
@@ -588,9 +783,9 @@
588
783
  "operationId": "getPartnerRoles",
589
784
  "summary": "getPartnerRoles",
590
785
  "tags": [
591
- "partner_users"
786
+ "Partner Users"
592
787
  ],
593
- "description": "Get all roles for a partner organization",
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",
594
789
  "parameters": [
595
790
  {
596
791
  "in": "path",
@@ -599,12 +794,12 @@
599
794
  "$ref": "#/components/schemas/OrganizationId"
600
795
  },
601
796
  "required": true,
602
- "description": "The organization ID of the partner"
797
+ "description": "The organization ID of the partner whose roles to retrieve"
603
798
  }
604
799
  ],
605
800
  "responses": {
606
801
  "200": {
607
- "description": "List of partner roles",
802
+ "description": "List of roles available in the partner organization",
608
803
  "content": {
609
804
  "application/json": {
610
805
  "schema": {
@@ -617,12 +812,48 @@
617
812
  }
618
813
  }
619
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
+ ]
620
845
  }
621
846
  }
622
847
  }
623
848
  },
624
849
  "400": {
625
- "description": "Unable to fetch partner roles"
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"
626
857
  },
627
858
  "500": {
628
859
  "description": "Internal server error"
@@ -633,9 +864,9 @@
633
864
  "operationId": "createPartnerRole",
634
865
  "summary": "createPartnerRole",
635
866
  "tags": [
636
- "partner_users"
867
+ "Partner Users"
637
868
  ],
638
- "description": "Create a role for a partner organization",
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",
639
870
  "parameters": [
640
871
  {
641
872
  "in": "path",
@@ -644,7 +875,7 @@
644
875
  "$ref": "#/components/schemas/OrganizationId"
645
876
  },
646
877
  "required": true,
647
- "description": "The organization ID of the partner"
878
+ "description": "The organization ID of the partner where the role will be created"
648
879
  }
649
880
  ],
650
881
  "requestBody": {
@@ -652,6 +883,22 @@
652
883
  "application/json": {
653
884
  "schema": {
654
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
+ ]
655
902
  }
656
903
  }
657
904
  }
@@ -663,12 +910,36 @@
663
910
  "application/json": {
664
911
  "schema": {
665
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
+ ]
666
931
  }
667
932
  }
668
933
  }
669
934
  },
670
935
  "400": {
671
- "description": "Unable to create partner role"
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"
672
943
  },
673
944
  "500": {
674
945
  "description": "Internal server error"
@@ -681,9 +952,9 @@
681
952
  "operationId": "updatePartnerRole",
682
953
  "summary": "updatePartnerRole",
683
954
  "tags": [
684
- "partner_users"
955
+ "Partner Users"
685
956
  ],
686
- "description": "Update a role for a partner organization",
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",
687
958
  "parameters": [
688
959
  {
689
960
  "in": "path",
@@ -701,7 +972,8 @@
701
972
  "type": "string"
702
973
  },
703
974
  "required": true,
704
- "description": "The role ID to update"
975
+ "description": "The unique identifier of the role to update",
976
+ "example": "123:partner_sales"
705
977
  }
706
978
  ],
707
979
  "requestBody": {
@@ -709,6 +981,27 @@
709
981
  "application/json": {
710
982
  "schema": {
711
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
+ ]
712
1005
  }
713
1006
  }
714
1007
  }
@@ -716,6 +1009,81 @@
716
1009
  "responses": {
717
1010
  "200": {
718
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",
719
1087
  "content": {
720
1088
  "application/json": {
721
1089
  "schema": {
@@ -725,7 +1093,16 @@
725
1093
  }
726
1094
  },
727
1095
  "400": {
728
- "description": "Unable to update partner role"
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"
729
1106
  },
730
1107
  "500": {
731
1108
  "description": "Internal server error"
@@ -738,9 +1115,9 @@
738
1115
  "operationId": "assignPartnerUserRoles",
739
1116
  "summary": "assignPartnerUserRoles",
740
1117
  "tags": [
741
- "partner_users"
1118
+ "Partner Users"
742
1119
  ],
743
- "description": "Assign roles to a user in a partner organization",
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",
744
1121
  "parameters": [
745
1122
  {
746
1123
  "in": "path",
@@ -758,7 +1135,8 @@
758
1135
  "type": "string"
759
1136
  },
760
1137
  "required": true,
761
- "description": "The user ID"
1138
+ "description": "The unique identifier of the user to assign roles to",
1139
+ "example": "456"
762
1140
  }
763
1141
  ],
764
1142
  "requestBody": {
@@ -766,13 +1144,19 @@
766
1144
  "application/json": {
767
1145
  "schema": {
768
1146
  "$ref": "#/components/schemas/AssignRolesPayload"
1147
+ },
1148
+ "example": {
1149
+ "roleIds": [
1150
+ "role-123",
1151
+ "role-456"
1152
+ ]
769
1153
  }
770
1154
  }
771
1155
  }
772
1156
  },
773
1157
  "responses": {
774
1158
  "200": {
775
- "description": "Roles assigned successfully",
1159
+ "description": "Role assignment results - each role assignment is processed individually",
776
1160
  "content": {
777
1161
  "application/json": {
778
1162
  "schema": {
@@ -780,31 +1164,56 @@
780
1164
  "properties": {
781
1165
  "results": {
782
1166
  "type": "array",
1167
+ "description": "Results for each role assignment attempt",
783
1168
  "items": {
784
1169
  "type": "object",
785
1170
  "properties": {
786
1171
  "roleId": {
787
- "type": "string"
1172
+ "type": "string",
1173
+ "description": "The role ID that was processed"
788
1174
  },
789
1175
  "success": {
790
- "type": "boolean"
1176
+ "type": "boolean",
1177
+ "description": "Whether the assignment was successful"
791
1178
  },
792
1179
  "data": {
793
- "type": "object"
1180
+ "type": "object",
1181
+ "description": "Additional data on success"
794
1182
  },
795
1183
  "error": {
796
- "type": "object"
1184
+ "type": "object",
1185
+ "description": "Error details on failure"
797
1186
  }
798
1187
  }
799
1188
  }
800
1189
  }
801
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
+ ]
802
1205
  }
803
1206
  }
804
1207
  }
805
1208
  },
806
1209
  "400": {
807
- "description": "Unable to assign roles"
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"
808
1217
  },
809
1218
  "500": {
810
1219
  "description": "Internal server error"
@@ -815,9 +1224,9 @@
815
1224
  "operationId": "unassignPartnerUserRoles",
816
1225
  "summary": "unassignPartnerUserRoles",
817
1226
  "tags": [
818
- "partner_users"
1227
+ "Partner Users"
819
1228
  ],
820
- "description": "Unassign roles from a user in a partner organization",
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",
821
1230
  "parameters": [
822
1231
  {
823
1232
  "in": "path",
@@ -835,7 +1244,8 @@
835
1244
  "type": "string"
836
1245
  },
837
1246
  "required": true,
838
- "description": "The user ID"
1247
+ "description": "The unique identifier of the user to remove roles from",
1248
+ "example": "456"
839
1249
  }
840
1250
  ],
841
1251
  "requestBody": {
@@ -843,13 +1253,18 @@
843
1253
  "application/json": {
844
1254
  "schema": {
845
1255
  "$ref": "#/components/schemas/AssignRolesPayload"
1256
+ },
1257
+ "example": {
1258
+ "roleIds": [
1259
+ "role-456"
1260
+ ]
846
1261
  }
847
1262
  }
848
1263
  }
849
1264
  },
850
1265
  "responses": {
851
1266
  "200": {
852
- "description": "Roles unassigned successfully",
1267
+ "description": "Role unassignment results - each role removal is processed individually",
853
1268
  "content": {
854
1269
  "application/json": {
855
1270
  "schema": {
@@ -857,31 +1272,51 @@
857
1272
  "properties": {
858
1273
  "results": {
859
1274
  "type": "array",
1275
+ "description": "Results for each role removal attempt",
860
1276
  "items": {
861
1277
  "type": "object",
862
1278
  "properties": {
863
1279
  "roleId": {
864
- "type": "string"
1280
+ "type": "string",
1281
+ "description": "The role ID that was processed"
865
1282
  },
866
1283
  "success": {
867
- "type": "boolean"
1284
+ "type": "boolean",
1285
+ "description": "Whether the removal was successful"
868
1286
  },
869
1287
  "data": {
870
- "type": "object"
1288
+ "type": "object",
1289
+ "description": "Additional data on success"
871
1290
  },
872
1291
  "error": {
873
- "type": "object"
1292
+ "type": "object",
1293
+ "description": "Error details on failure"
874
1294
  }
875
1295
  }
876
1296
  }
877
1297
  }
878
1298
  }
1299
+ },
1300
+ "example": {
1301
+ "results": [
1302
+ {
1303
+ "roleId": "role-456",
1304
+ "success": true,
1305
+ "data": {}
1306
+ }
1307
+ ]
879
1308
  }
880
1309
  }
881
1310
  }
882
1311
  },
883
1312
  "400": {
884
- "description": "Unable to unassign roles"
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"
885
1320
  },
886
1321
  "500": {
887
1322
  "description": "Internal server error"
@@ -907,63 +1342,78 @@
907
1342
  },
908
1343
  "schemas": {
909
1344
  "InviteToken": {
910
- "type": "string"
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"
911
1348
  },
912
1349
  "Partner": {
913
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",
914
1352
  "properties": {
915
1353
  "id": {
916
1354
  "$ref": "#/components/schemas/PartnerId"
917
1355
  },
918
1356
  "organization_id": {
919
- "$ref": "#/components/schemas/OrganizationId"
1357
+ "description": "The organization ID of the parent organization that invited this partner",
1358
+ "allOf": [
1359
+ {
1360
+ "$ref": "#/components/schemas/OrganizationId"
1361
+ }
1362
+ ]
920
1363
  },
921
1364
  "created_at": {
922
1365
  "type": "string",
1366
+ "format": "date-time",
1367
+ "description": "Timestamp when the partner record was created",
923
1368
  "example": "2022-02-08T04:44:32.246Z"
924
1369
  },
925
1370
  "description": {
926
1371
  "type": "string",
927
- "description": "Description",
928
- "example": "Description"
1372
+ "description": "Optional description of the partner or partnership",
1373
+ "example": "Regional solar installation partner for Bavaria"
929
1374
  },
930
1375
  "company_name": {
931
1376
  "type": "string",
932
- "description": "Company name",
933
- "example": "Company name"
1377
+ "description": "The legal or trading name of the partner organization",
1378
+ "example": "Acme Solar GmbH"
934
1379
  },
935
1380
  "invitation_token": {
936
- "description": "Invitation token",
937
- "type": "string"
1381
+ "description": "Secure token for partner activation (only present for invited partners)",
1382
+ "type": "string",
1383
+ "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
938
1384
  },
939
1385
  "invitation_email": {
940
1386
  "deprecated": true,
941
- "description": "Email using to receive invitation",
1387
+ "description": "Deprecated: Use 'email' instead. Email address used for the invitation.",
942
1388
  "type": "string",
943
1389
  "format": "email"
944
1390
  },
945
1391
  "email": {
946
- "description": "Email using to receive invitation",
1392
+ "description": "Primary email address of the partner, used for invitation delivery",
947
1393
  "type": "string",
948
- "format": "email"
1394
+ "format": "email",
1395
+ "example": "contact@acme-solar.de"
949
1396
  },
950
1397
  "owner_email": {
951
- "description": "A separate email where the invitation should be sent",
1398
+ "description": "Alternative email address where invitations should be sent (e.g., owner or admin email)",
952
1399
  "type": "string",
953
- "format": "email"
1400
+ "format": "email",
1401
+ "example": "owner@acme-solar.de"
954
1402
  },
955
1403
  "signed_up_email": {
956
- "description": "Email using to sign up",
1404
+ "description": "Email address used by the partner when completing registration",
957
1405
  "type": "string",
958
- "format": "email"
1406
+ "format": "email",
1407
+ "example": "admin@acme-solar.de"
959
1408
  },
960
1409
  "partner_org_id": {
961
- "description": "Target Organization",
1410
+ "description": "Organization ID of the partner organization (populated after activation)",
962
1411
  "type": "string",
963
- "example": 123456
1412
+ "example": "456789"
964
1413
  },
965
1414
  "status": {
966
1415
  "type": "string",
1416
+ "description": "Current status of the partner in the invitation/collaboration lifecycle",
967
1417
  "enum": [
968
1418
  "Pending",
969
1419
  "Request",
@@ -976,28 +1426,33 @@
976
1426
  },
977
1427
  "PartnerId": {
978
1428
  "type": "string",
1429
+ "description": "Unique identifier for a partner record (UUID format)",
979
1430
  "example": "e45a6dc2-3795-43a3-ae0f-6b6760f310fc"
980
1431
  },
981
1432
  "OrganizationId": {
982
1433
  "type": "string",
1434
+ "description": "Unique identifier for an organization in the epilot platform",
983
1435
  "example": "123"
984
1436
  },
985
1437
  "ActivatePartnerPayload": {
986
1438
  "type": "object",
1439
+ "description": "Payload for activating a partner account using an invitation token",
987
1440
  "properties": {
988
1441
  "company_name": {
989
1442
  "type": "string",
990
- "description": "Company name",
991
- "example": "Company name"
1443
+ "description": "The official name of the partner's company",
1444
+ "example": "Acme Solar GmbH"
992
1445
  },
993
1446
  "signed_up_email": {
994
- "description": "Email using to sign up",
1447
+ "description": "Email address of the user completing the partner registration",
995
1448
  "type": "string",
996
- "format": "email"
1449
+ "format": "email",
1450
+ "example": "admin@acme-solar.de"
997
1451
  },
998
1452
  "organization_id": {
999
- "description": "organization id",
1000
- "type": "string"
1453
+ "description": "The organization ID of the partner's existing epilot organization (if they already have one)",
1454
+ "type": "string",
1455
+ "example": "456"
1001
1456
  }
1002
1457
  },
1003
1458
  "required": [
@@ -1007,19 +1462,22 @@
1007
1462
  },
1008
1463
  "PartnerInvitationPayload": {
1009
1464
  "type": "object",
1465
+ "description": "Configuration options for sending a partner invitation",
1010
1466
  "properties": {
1011
1467
  "language": {
1012
1468
  "type": "string",
1013
- "description": "Language for partner invitation email",
1469
+ "description": "Language for the partner invitation email. Determines the email template language.",
1014
1470
  "enum": [
1015
1471
  "en",
1016
1472
  "de"
1017
1473
  ],
1018
- "default": "en"
1474
+ "default": "en",
1475
+ "example": "de"
1019
1476
  }
1020
1477
  }
1021
1478
  },
1022
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",
1023
1481
  "oneOf": [
1024
1482
  {
1025
1483
  "$ref": "#/components/schemas/AssignableUser"
@@ -1036,30 +1494,46 @@
1036
1494
  {
1037
1495
  "$ref": "#/components/schemas/AssignableGroup"
1038
1496
  }
1039
- ]
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
+ }
1040
1508
  },
1041
1509
  "BaseAssignable": {
1042
1510
  "type": "object",
1511
+ "description": "Common properties shared by all assignable types",
1043
1512
  "properties": {
1044
1513
  "type": {
1045
1514
  "type": "string",
1515
+ "description": "Discriminator field indicating the type of assignable",
1046
1516
  "example": "user"
1047
1517
  },
1048
1518
  "display_name": {
1049
1519
  "type": "string",
1050
- "example": "Example User"
1520
+ "description": "Human-readable name for display in UI (user name, organization name, or group name)",
1521
+ "example": "John Smith"
1051
1522
  },
1052
1523
  "image_uri": {
1053
1524
  "type": "object",
1525
+ "description": "Profile image URLs for the assignable",
1054
1526
  "properties": {
1055
1527
  "original": {
1056
1528
  "type": "string",
1057
1529
  "format": "uri",
1530
+ "description": "Full-resolution profile image URL",
1058
1531
  "example": "https://epilot-staging-user-content.s3.eu-central-1.amazonaws.com/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png"
1059
1532
  },
1060
1533
  "thumbnail_32": {
1061
1534
  "type": "string",
1062
1535
  "format": "uri",
1536
+ "description": "32x32 pixel thumbnail image URL for compact displays",
1063
1537
  "example": "https://file.sls.epilot.io/v1/files/public/preview?w=32&h=32&key=/728/8043d909-71fc-4838-a363-1b15dc1d585c/epilot.png"
1064
1538
  }
1065
1539
  },
@@ -1068,18 +1542,28 @@
1068
1542
  ]
1069
1543
  },
1070
1544
  "org_id": {
1071
- "$ref": "#/components/schemas/OrganizationId"
1545
+ "description": "Organization ID the assignable belongs to",
1546
+ "allOf": [
1547
+ {
1548
+ "$ref": "#/components/schemas/OrganizationId"
1549
+ }
1550
+ ]
1072
1551
  },
1073
1552
  "created_at": {
1074
1553
  "type": "string",
1554
+ "format": "date-time",
1555
+ "description": "Timestamp when the assignable was created",
1075
1556
  "example": "2022-02-08T04:44:32.246Z"
1076
1557
  },
1077
1558
  "activated_at": {
1078
1559
  "type": "string",
1560
+ "format": "date-time",
1561
+ "description": "Timestamp when the assignable was activated (for users, when they accepted their invitation)",
1079
1562
  "example": "2022-02-08T04:44:32.246Z"
1080
1563
  },
1081
1564
  "status": {
1082
1565
  "type": "string",
1566
+ "description": "Current status of the assignable",
1083
1567
  "enum": [
1084
1568
  "Active",
1085
1569
  "Pending",
@@ -1095,6 +1579,7 @@
1095
1579
  ]
1096
1580
  },
1097
1581
  "AssignableUser": {
1582
+ "description": "A user within the caller's organization that can be assigned to tasks or entities",
1098
1583
  "allOf": [
1099
1584
  {
1100
1585
  "$ref": "#/components/schemas/BaseAssignable"
@@ -1111,21 +1596,26 @@
1111
1596
  },
1112
1597
  "display_name": {
1113
1598
  "type": "string",
1114
- "example": "Example User"
1599
+ "description": "Full name of the user",
1600
+ "example": "John Smith"
1115
1601
  },
1116
1602
  "user_id": {
1117
1603
  "type": "string",
1604
+ "description": "Unique identifier of the user",
1118
1605
  "example": "456"
1119
1606
  },
1120
1607
  "email": {
1121
1608
  "type": "string",
1122
- "example": "example@example.com"
1609
+ "format": "email",
1610
+ "description": "Email address of the user",
1611
+ "example": "john.smith@example.com"
1123
1612
  }
1124
1613
  }
1125
1614
  }
1126
1615
  ]
1127
1616
  },
1128
1617
  "AssignablePartnerUser": {
1618
+ "description": "A user from a partner organization that can be assigned to shared tasks or entities",
1129
1619
  "allOf": [
1130
1620
  {
1131
1621
  "$ref": "#/components/schemas/BaseAssignable"
@@ -1142,24 +1632,34 @@
1142
1632
  },
1143
1633
  "display_name": {
1144
1634
  "type": "string",
1145
- "example": "Example Partner User"
1635
+ "description": "Full name of the partner user",
1636
+ "example": "Jane Doe (Partner)"
1146
1637
  },
1147
1638
  "partner_id": {
1148
- "$ref": "#/components/schemas/PartnerId"
1639
+ "description": "ID of the partner relationship through which this user is accessible",
1640
+ "allOf": [
1641
+ {
1642
+ "$ref": "#/components/schemas/PartnerId"
1643
+ }
1644
+ ]
1149
1645
  },
1150
1646
  "user_id": {
1151
1647
  "type": "string",
1152
- "example": "456"
1648
+ "description": "Unique identifier of the partner user",
1649
+ "example": "789"
1153
1650
  },
1154
1651
  "email": {
1155
1652
  "type": "string",
1156
- "example": "example@example.com"
1653
+ "format": "email",
1654
+ "description": "Email address of the partner user",
1655
+ "example": "jane.doe@partner.com"
1157
1656
  }
1158
1657
  }
1159
1658
  }
1160
1659
  ]
1161
1660
  },
1162
1661
  "AssignableGroup": {
1662
+ "description": "A user group that can be assigned to tasks or entities. All members of the group will be notified/assigned.",
1163
1663
  "allOf": [
1164
1664
  {
1165
1665
  "$ref": "#/components/schemas/BaseAssignable"
@@ -1167,15 +1667,24 @@
1167
1667
  {
1168
1668
  "type": "object",
1169
1669
  "properties": {
1670
+ "type": {
1671
+ "type": "string",
1672
+ "enum": [
1673
+ "group"
1674
+ ],
1675
+ "example": "group"
1676
+ },
1170
1677
  "group_id": {
1171
1678
  "type": "string",
1172
- "example": "456"
1679
+ "description": "Unique identifier of the user group",
1680
+ "example": "group-456"
1173
1681
  }
1174
1682
  }
1175
1683
  }
1176
1684
  ]
1177
1685
  },
1178
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",
1179
1688
  "allOf": [
1180
1689
  {
1181
1690
  "$ref": "#/components/schemas/BaseAssignable"
@@ -1192,28 +1701,38 @@
1192
1701
  },
1193
1702
  "display_name": {
1194
1703
  "type": "string",
1195
- "example": "Example Partner Organization"
1704
+ "description": "Name of the partner organization",
1705
+ "example": "Acme Solar GmbH"
1196
1706
  },
1197
1707
  "partner_id": {
1198
- "$ref": "#/components/schemas/PartnerId"
1708
+ "description": "ID of the partner relationship",
1709
+ "allOf": [
1710
+ {
1711
+ "$ref": "#/components/schemas/PartnerId"
1712
+ }
1713
+ ]
1199
1714
  },
1200
1715
  "email": {
1201
1716
  "type": "string",
1202
- "example": "Email of Partner Organization"
1717
+ "format": "email",
1718
+ "description": "Primary contact email for the partner organization",
1719
+ "example": "contact@acme-solar.de"
1203
1720
  },
1204
1721
  "geolocations": {
1205
1722
  "type": "array",
1723
+ "description": "Physical locations of the partner organization with addresses and coordinates",
1206
1724
  "items": {
1207
1725
  "$ref": "#/components/schemas/AddressGeolocation"
1208
1726
  }
1209
1727
  },
1210
1728
  "phone": {
1211
1729
  "type": "string",
1212
- "example": "Phone number of Partner"
1730
+ "description": "Primary contact phone number for the partner organization",
1731
+ "example": "+49 941 123456"
1213
1732
  },
1214
1733
  "activity_radius": {
1215
1734
  "type": "number",
1216
- "description": "Activity radius, in km, the partner is operating in",
1735
+ "description": "Geographic service radius in kilometers - the area within which the partner operates",
1217
1736
  "example": 50
1218
1737
  }
1219
1738
  },
@@ -1226,6 +1745,7 @@
1226
1745
  ]
1227
1746
  },
1228
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",
1229
1749
  "allOf": [
1230
1750
  {
1231
1751
  "$ref": "#/components/schemas/BaseAssignable"
@@ -1242,15 +1762,19 @@
1242
1762
  },
1243
1763
  "display_name": {
1244
1764
  "type": "string",
1245
- "example": "Example Ecp Placeholder"
1765
+ "description": "Name of the portal user",
1766
+ "example": "Max Mustermann"
1246
1767
  },
1247
1768
  "user_id": {
1248
1769
  "type": "string",
1249
- "example": "456"
1770
+ "description": "Unique identifier of the portal user",
1771
+ "example": "ecp-456"
1250
1772
  },
1251
1773
  "email": {
1252
1774
  "type": "string",
1253
- "example": "Email of ECP Placeholder"
1775
+ "format": "email",
1776
+ "description": "Email address of the portal user",
1777
+ "example": "max.mustermann@customer.de"
1254
1778
  }
1255
1779
  },
1256
1780
  "required": [
@@ -1263,10 +1787,11 @@
1263
1787
  },
1264
1788
  "SearchGeolocation": {
1265
1789
  "type": "object",
1790
+ "description": "Request payload for geocoding an address to coordinates",
1266
1791
  "properties": {
1267
1792
  "address": {
1268
1793
  "type": "string",
1269
- "description": "Address text to convert into geolocation coordinates",
1794
+ "description": "Full address string to convert to geographic coordinates.\nFor best results, include street, city, postal code, and country.\n",
1270
1795
  "example": "Auweg 1, 93055 Regensburg, DE"
1271
1796
  }
1272
1797
  },
@@ -1276,24 +1801,29 @@
1276
1801
  },
1277
1802
  "Geolocation": {
1278
1803
  "type": "object",
1804
+ "description": "Geographic coordinates with optional metadata",
1279
1805
  "properties": {
1280
1806
  "lat": {
1281
1807
  "type": "number",
1282
- "description": "Latitude",
1808
+ "description": "Latitude coordinate (WGS84)",
1283
1809
  "example": 49.013
1284
1810
  },
1285
1811
  "lng": {
1286
1812
  "type": "number",
1287
- "description": "Longitude",
1813
+ "description": "Longitude coordinate (WGS84)",
1288
1814
  "example": 12.101
1289
1815
  },
1290
1816
  "addressLabel": {
1291
1817
  "type": "string",
1292
- "description": "Full address label as returned by the location service"
1818
+ "description": "Normalized full address as returned by the geocoding service",
1819
+ "example": "Auweg 1, 93055 Regensburg, Germany"
1293
1820
  },
1294
1821
  "relevance": {
1295
1822
  "type": "number",
1296
- "description": "Relevance of the result. A number between 0 and 1. Closer to 1 means more relevant"
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
1297
1827
  }
1298
1828
  },
1299
1829
  "required": [
@@ -1303,36 +1833,38 @@
1303
1833
  },
1304
1834
  "Address": {
1305
1835
  "type": "object",
1836
+ "description": "Structured postal address",
1306
1837
  "properties": {
1307
1838
  "street": {
1308
1839
  "type": "string",
1309
- "description": "Street",
1840
+ "description": "Street name without house number",
1310
1841
  "example": "Auweg"
1311
1842
  },
1312
1843
  "street_number": {
1313
1844
  "type": "string",
1314
- "description": "Street",
1845
+ "description": "House or building number",
1315
1846
  "example": "10"
1316
1847
  },
1317
1848
  "city": {
1318
1849
  "type": "string",
1319
- "description": "City",
1850
+ "description": "City or locality name",
1320
1851
  "example": "Regensburg"
1321
1852
  },
1322
1853
  "postal_code": {
1323
1854
  "type": "string",
1324
- "description": "Postal code",
1855
+ "description": "Postal or ZIP code",
1325
1856
  "example": "93055"
1326
1857
  },
1327
1858
  "country": {
1328
1859
  "type": "string",
1329
- "description": "Country",
1860
+ "description": "Country code (ISO 3166-1 alpha-2)",
1330
1861
  "example": "DE"
1331
1862
  }
1332
1863
  }
1333
1864
  },
1334
1865
  "AddressGeolocation": {
1335
1866
  "type": "object",
1867
+ "description": "Combined address and geographic coordinates for a location",
1336
1868
  "allOf": [
1337
1869
  {
1338
1870
  "type": "object",
@@ -1352,63 +1884,65 @@
1352
1884
  },
1353
1885
  "PartnerUser": {
1354
1886
  "type": "object",
1887
+ "description": "A user within a partner organization, including their assigned roles",
1355
1888
  "properties": {
1356
1889
  "id": {
1357
1890
  "type": "string",
1358
- "description": "User ID",
1891
+ "description": "Unique identifier for the user",
1359
1892
  "example": "456"
1360
1893
  },
1361
1894
  "name": {
1362
1895
  "type": "string",
1363
- "description": "User name",
1896
+ "description": "Full name of the user",
1364
1897
  "example": "John Doe"
1365
1898
  },
1366
1899
  "email": {
1367
1900
  "type": "string",
1368
1901
  "format": "email",
1369
- "description": "User email",
1370
- "example": "user@example.com"
1902
+ "description": "Email address of the user",
1903
+ "example": "user@partner.com"
1371
1904
  },
1372
1905
  "status": {
1373
1906
  "type": "string",
1374
- "description": "User status",
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",
1375
1908
  "example": "Active"
1376
1909
  },
1377
1910
  "image": {
1378
1911
  "type": "object",
1912
+ "description": "Profile image URLs for the user",
1379
1913
  "properties": {
1380
1914
  "original": {
1381
1915
  "type": "string",
1382
1916
  "format": "uri",
1383
- "description": "Original image URI"
1917
+ "description": "Full-resolution profile image URL"
1384
1918
  },
1385
1919
  "thumbnail_32": {
1386
1920
  "type": "string",
1387
1921
  "format": "uri",
1388
- "description": "Thumbnail image URI (32x32)"
1922
+ "description": "32x32 pixel thumbnail image URL"
1389
1923
  }
1390
1924
  }
1391
1925
  },
1392
1926
  "roles": {
1393
1927
  "type": "array",
1394
- "description": "List of roles assigned to the user",
1928
+ "description": "List of roles assigned to the user within the partner organization",
1395
1929
  "items": {
1396
1930
  "type": "object",
1397
1931
  "properties": {
1398
1932
  "id": {
1399
1933
  "type": "string",
1400
- "description": "Role ID",
1401
- "example": "role-123"
1934
+ "description": "Unique identifier for the role",
1935
+ "example": "123:partner_admin"
1402
1936
  },
1403
1937
  "slug": {
1404
1938
  "type": "string",
1405
- "description": "Role slug",
1406
- "example": "admin"
1939
+ "description": "URL-friendly role identifier",
1940
+ "example": "partner_admin"
1407
1941
  },
1408
1942
  "name": {
1409
1943
  "type": "string",
1410
- "description": "Role name",
1411
- "example": "Administrator"
1944
+ "description": "Human-readable role name",
1945
+ "example": "Partner Administrator"
1412
1946
  }
1413
1947
  },
1414
1948
  "required": [
@@ -1428,12 +1962,13 @@
1428
1962
  },
1429
1963
  "CreatePartnerUserPayload": {
1430
1964
  "type": "object",
1965
+ "description": "Request payload for creating a new user in a partner organization",
1431
1966
  "properties": {
1432
1967
  "email": {
1433
1968
  "type": "string",
1434
1969
  "format": "email",
1435
- "description": "User email address",
1436
- "example": "user@example.com"
1970
+ "description": "Email address for the new user. An invitation will be sent to this address.",
1971
+ "example": "newuser@partner.com"
1437
1972
  },
1438
1973
  "language": {
1439
1974
  "type": "string",
@@ -1441,18 +1976,17 @@
1441
1976
  "en",
1442
1977
  "de"
1443
1978
  ],
1444
- "description": "User language",
1445
- "example": "en"
1979
+ "description": "Preferred language for the user. Determines the language of the invitation email and default UI language.",
1980
+ "example": "de"
1446
1981
  },
1447
1982
  "roles": {
1448
1983
  "type": "array",
1449
- "description": "Role IDs that should be automatically assigned to this user upon creation",
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",
1450
1985
  "items": {
1451
1986
  "type": "string"
1452
1987
  },
1453
1988
  "example": [
1454
- "role-123",
1455
- "role-456"
1989
+ "123:partner_viewer"
1456
1990
  ]
1457
1991
  }
1458
1992
  },
@@ -1462,20 +1996,22 @@
1462
1996
  },
1463
1997
  "CreatePartnerRolePayload": {
1464
1998
  "type": "object",
1999
+ "description": "Request payload for creating a new role in a partner organization",
1465
2000
  "properties": {
1466
2001
  "name": {
1467
2002
  "type": "string",
1468
- "description": "Role name",
1469
- "example": "Partner Admin"
2003
+ "description": "Human-readable display name for the role",
2004
+ "example": "Partner Administrator"
1470
2005
  },
1471
2006
  "slug": {
1472
2007
  "type": "string",
1473
- "description": "Role slug",
1474
- "example": "partner_admin"
2008
+ "description": "URL-friendly identifier for the role (lowercase, underscores allowed)",
2009
+ "example": "partner_admin",
2010
+ "pattern": "^[a-z][a-z0-9_]*$"
1475
2011
  },
1476
2012
  "grants": {
1477
2013
  "type": "array",
1478
- "description": "Permission grants for the role",
2014
+ "description": "Permission grants that define what users with this role can do.\nEach grant specifies an action and resource pattern.\n",
1479
2015
  "items": {
1480
2016
  "$ref": "#/components/schemas/GrantWithDependencies"
1481
2017
  }
@@ -1488,11 +2024,13 @@
1488
2024
  ]
1489
2025
  },
1490
2026
  "UpdatePartnerRolePayload": {
2027
+ "description": "Request payload for updating an existing role in a partner organization",
1491
2028
  "allOf": [
1492
2029
  {
1493
2030
  "properties": {
1494
2031
  "grants": {
1495
2032
  "type": "array",
2033
+ "description": "Updated list of permission grants for the role",
1496
2034
  "items": {
1497
2035
  "$ref": "#/components/schemas/GrantWithDependencies"
1498
2036
  }
@@ -1506,18 +2044,22 @@
1506
2044
  },
1507
2045
  "Grant": {
1508
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",
1509
2048
  "properties": {
1510
2049
  "action": {
1511
2050
  "type": "string",
2051
+ "description": "The action being granted or denied.\nCommon actions include: entity-read, entity-create, entity-update, entity-delete\n",
1512
2052
  "example": "entity-read"
1513
2053
  },
1514
2054
  "resource": {
1515
2055
  "type": "string",
1516
- "example": "entity:123:contact:f7c22299-ca72-4bca-8538-0a88eeefc947"
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:*"
1517
2058
  },
1518
2059
  "effect": {
1519
2060
  "type": "string",
1520
2061
  "default": "allow",
2062
+ "description": "Whether this grant allows or denies the action",
1521
2063
  "enum": [
1522
2064
  "allow",
1523
2065
  "deny"
@@ -1525,6 +2067,7 @@
1525
2067
  },
1526
2068
  "conditions": {
1527
2069
  "type": "array",
2070
+ "description": "Additional conditions that must be met for this grant to apply",
1528
2071
  "items": {
1529
2072
  "$ref": "#/components/schemas/GrantCondition"
1530
2073
  }
@@ -1535,6 +2078,7 @@
1535
2078
  ]
1536
2079
  },
1537
2080
  "GrantWithDependencies": {
2081
+ "description": "A grant with optional dependent grants that are automatically included when this grant is assigned",
1538
2082
  "allOf": [
1539
2083
  {
1540
2084
  "$ref": "#/components/schemas/Grant"
@@ -1543,7 +2087,7 @@
1543
2087
  "type": "object",
1544
2088
  "properties": {
1545
2089
  "dependencies": {
1546
- "description": "Provided additional dependencies, exploded when storing the role",
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",
1547
2091
  "type": "array",
1548
2092
  "items": {
1549
2093
  "$ref": "#/components/schemas/Grant"
@@ -1554,9 +2098,9 @@
1554
2098
  ]
1555
2099
  },
1556
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",
1557
2102
  "allOf": [
1558
2103
  {
1559
- "description": "An additional condition that must be met for the grant",
1560
2104
  "type": "object",
1561
2105
  "required": [
1562
2106
  "operation"
@@ -1572,22 +2116,26 @@
1572
2116
  ]
1573
2117
  },
1574
2118
  "EqualsCondition": {
1575
- "description": "Check if attribute equals to any of the values",
1576
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",
1577
2121
  "properties": {
1578
2122
  "attribute": {
1579
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",
1580
2125
  "example": "workflows.primary.task_name"
1581
2126
  },
1582
2127
  "operation": {
1583
2128
  "type": "string",
2129
+ "description": "The comparison operation to perform",
1584
2130
  "enum": [
1585
2131
  "equals"
1586
2132
  ]
1587
2133
  },
1588
2134
  "values": {
1589
2135
  "type": "array",
2136
+ "description": "List of values to match against - the condition is true if the attribute equals any of these values",
1590
2137
  "items": {
2138
+ "type": "string",
1591
2139
  "example": "Qualification"
1592
2140
  }
1593
2141
  }
@@ -1600,31 +2148,33 @@
1600
2148
  },
1601
2149
  "RoleId": {
1602
2150
  "type": "string",
1603
- "example": "123:owner",
1604
- "description": "Format: <organization_id>:<slug>"
2151
+ "description": "Unique identifier for a role, combining organization ID and role slug.\nFormat: <organization_id>:<slug>\n",
2152
+ "example": "123:owner"
1605
2153
  },
1606
2154
  "BaseRoleForCreate": {
1607
2155
  "type": "object",
2156
+ "description": "Base schema for creating or updating a role",
1608
2157
  "properties": {
1609
2158
  "id": {
1610
2159
  "$ref": "#/components/schemas/RoleId"
1611
2160
  },
1612
2161
  "name": {
1613
2162
  "type": "string",
1614
- "example": "Owner",
1615
- "description": "Human-friendly name for the role"
2163
+ "description": "Human-readable display name for the role",
2164
+ "example": "Owner"
1616
2165
  },
1617
2166
  "slug": {
1618
2167
  "type": "string",
2168
+ "description": "URL-friendly identifier for the role (lowercase, no spaces)",
1619
2169
  "example": "owner",
1620
- "description": "URL-friendly name for the role"
2170
+ "pattern": "^[a-z][a-z0-9_]*$"
1621
2171
  },
1622
2172
  "grants": {
1623
2173
  "type": "array",
2174
+ "description": "List of permission grants that define what users with this role can do",
1624
2175
  "items": {
1625
2176
  "$ref": "#/components/schemas/Grant"
1626
- },
1627
- "description": "List of grants (permissions) applied to the role"
2177
+ }
1628
2178
  }
1629
2179
  },
1630
2180
  "required": [
@@ -1635,46 +2185,56 @@
1635
2185
  },
1636
2186
  "PartnerRole": {
1637
2187
  "type": "object",
2188
+ "description": "A role definition for users in a partner organization",
1638
2189
  "properties": {
1639
2190
  "id": {
1640
2191
  "type": "string",
1641
- "description": "Role ID",
1642
- "example": "role-123"
2192
+ "description": "Unique identifier for the role (format: org_id:slug)",
2193
+ "example": "123:partner_admin"
1643
2194
  },
1644
2195
  "slug": {
1645
2196
  "type": "string",
1646
- "description": "Role slug",
1647
- "example": "admin"
2197
+ "description": "URL-friendly identifier for the role",
2198
+ "example": "partner_admin"
1648
2199
  },
1649
2200
  "name": {
1650
2201
  "type": "string",
1651
- "description": "Role name",
1652
- "example": "Administrator"
2202
+ "description": "Human-readable display name for the role",
2203
+ "example": "Partner Administrator"
1653
2204
  },
1654
2205
  "type": {
1655
2206
  "type": "string",
1656
- "description": "Role type",
2207
+ "description": "Type of role. Partner roles are typically 'share_role' indicating\nthey are designed for cross-organization sharing scenarios.\n",
1657
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
+ }
1658
2216
  }
1659
2217
  },
1660
2218
  "required": [
1661
2219
  "id",
1662
2220
  "slug",
1663
- "name"
2221
+ "name",
2222
+ "grants"
1664
2223
  ]
1665
2224
  },
1666
2225
  "AssignRolesPayload": {
1667
2226
  "type": "object",
2227
+ "description": "Request payload for assigning or unassigning roles to/from a user",
1668
2228
  "properties": {
1669
2229
  "roleIds": {
1670
2230
  "type": "array",
1671
- "description": "Array of role IDs to assign/unassign",
2231
+ "description": "Array of role IDs to assign or unassign",
1672
2232
  "items": {
1673
2233
  "type": "string"
1674
2234
  },
1675
2235
  "example": [
1676
- "role-123",
1677
- "role-456"
2236
+ "123:partner_admin",
2237
+ "123:partner_viewer"
1678
2238
  ]
1679
2239
  }
1680
2240
  },
@@ -1684,27 +2244,33 @@
1684
2244
  },
1685
2245
  "User": {
1686
2246
  "type": "object",
2247
+ "description": "A user account in the epilot platform",
1687
2248
  "properties": {
1688
2249
  "id": {
1689
2250
  "type": "string",
1690
- "description": "User ID",
2251
+ "description": "Unique identifier for the user",
1691
2252
  "example": "456"
1692
2253
  },
1693
2254
  "email": {
1694
2255
  "type": "string",
1695
2256
  "format": "email",
1696
- "description": "User email",
2257
+ "description": "Email address of the user",
1697
2258
  "example": "user@example.com"
1698
2259
  },
1699
2260
  "display_name": {
1700
2261
  "type": "string",
1701
- "description": "User display name",
2262
+ "description": "Full name of the user for display purposes",
1702
2263
  "example": "John Doe"
1703
2264
  },
1704
2265
  "status": {
1705
2266
  "type": "string",
1706
- "description": "User status",
1707
- "example": "Active"
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
+ ]
1708
2274
  }
1709
2275
  }
1710
2276
  }