@celigo/api-specs 0.2.289 → 0.2.291

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 (53) hide show
  1. package/dist/account.yml +70 -59
  2. package/dist/agent.yml +30 -19
  3. package/dist/agentgroup.yml +30 -19
  4. package/dist/ai-agent.yml +46 -30
  5. package/dist/alert.yml +30 -19
  6. package/dist/api.yml +31 -20
  7. package/dist/apim.yml +30 -19
  8. package/dist/asynchelper.yml +48 -37
  9. package/dist/audit.yml +30 -19
  10. package/dist/bartendertemplate.yml +30 -19
  11. package/dist/connection.yml +92 -64
  12. package/dist/connector.yml +30 -19
  13. package/dist/ediprofile.yml +43 -32
  14. package/dist/editransaction.yml +30 -19
  15. package/dist/enduser.yml +30 -19
  16. package/dist/environment.yml +30 -19
  17. package/dist/eventreport.yml +70 -59
  18. package/dist/export.yml +71 -60
  19. package/dist/filedefinition.yml +65 -54
  20. package/dist/fileserver.yml +30 -19
  21. package/dist/filestorage.yml +30 -19
  22. package/dist/flow.yml +31 -20
  23. package/dist/guardrail.yml +85 -68
  24. package/dist/httpconnector.yml +71 -60
  25. package/dist/httpconnectorendpoint.yml +30 -19
  26. package/dist/httpconnectorresource.yml +31 -20
  27. package/dist/iclient.yml +51 -40
  28. package/dist/import.yml +103 -81
  29. package/dist/integration.yml +37 -26
  30. package/dist/job.yml +30 -19
  31. package/dist/lookupcache.yml +35 -24
  32. package/dist/marketplace.yml +30 -19
  33. package/dist/mcp-oauth-provider.yml +42 -31
  34. package/dist/mcp-server.yml +52 -41
  35. package/dist/networkpolicy.yml +30 -19
  36. package/dist/notification.yml +30 -19
  37. package/dist/processor.yml +70 -59
  38. package/dist/profile.yml +43 -32
  39. package/dist/recyclebin.yml +30 -19
  40. package/dist/script.yml +70 -59
  41. package/dist/stack.yml +30 -19
  42. package/dist/state.yml +30 -19
  43. package/dist/storagequery.yml +30 -19
  44. package/dist/subscription.yml +70 -19
  45. package/dist/sync.yml +30 -19
  46. package/dist/tag.yml +46 -35
  47. package/dist/template.yml +30 -19
  48. package/dist/tool.yml +72 -50
  49. package/dist/topic.yml +30 -19
  50. package/dist/tradingpartnerconnector.yml +31 -20
  51. package/dist/user.yml +30 -19
  52. package/package.json +1 -1
  53. package/schemas.json +1 -1
@@ -3769,23 +3769,6 @@ components:
3769
3769
  external API plus references to the status export (polled to check
3770
3770
  progress) and the result export (fetches the final payload). It is
3771
3771
  referenced from an export or import via `http._asyncHelperId`.
3772
- AsyncHelperRequest:
3773
- type: object
3774
- description: |
3775
- Request body for creating or replacing an async helper resource. All
3776
- required fields must be present for both POST (create) and PUT (replace)
3777
- operations.
3778
- required:
3779
- - name
3780
- - http
3781
- allOf:
3782
- - $ref: '#/components/schemas/AsyncHelperBase'
3783
- x-celigo-ai-guidance:
3784
- - |-
3785
- `name` and the status configuration (`http.status._exportId` and
3786
- `http.status.statusPath`) are the required fields. The status and result
3787
- exports referenced here must be ordinary exports that do not themselves
3788
- reference an async helper.
3789
3772
  Error:
3790
3773
  type: object
3791
3774
  description: Standard error response envelope returned by integrator.io APIs.
@@ -3826,6 +3809,23 @@ components:
3826
3809
  - message
3827
3810
  required:
3828
3811
  - errors
3812
+ AsyncHelperRequest:
3813
+ type: object
3814
+ description: |
3815
+ Request body for creating or replacing an async helper resource. All
3816
+ required fields must be present for both POST (create) and PUT (replace)
3817
+ operations.
3818
+ required:
3819
+ - name
3820
+ - http
3821
+ allOf:
3822
+ - $ref: '#/components/schemas/AsyncHelperBase'
3823
+ x-celigo-ai-guidance:
3824
+ - |-
3825
+ `name` and the status configuration (`http.status._exportId` and
3826
+ `http.status.statusPath`) are the required fields. The status and result
3827
+ exports referenced here must be ordinary exports that do not themselves
3828
+ reference an async helper.
3829
3829
  DependencyEntry:
3830
3830
  type: object
3831
3831
  description: A single resource that depends on the queried resource.
@@ -3912,29 +3912,34 @@ components:
3912
3912
  responses:
3913
3913
  401-unauthorized:
3914
3914
  description: |-
3915
- Unauthorized. The request lacks a valid bearer token, or the provided token
3916
- failed to authenticate.
3917
-
3918
- Note: the 401 response is produced by the auth middleware **before** the
3919
- request reaches the endpoint handler, so it does **not** follow the
3920
- standard `{errors: [...]}` envelope. Instead the body is a bare
3921
- `{message: string}` object with no `code`, no `errors` array. Callers
3922
- handling 401s should key off the HTTP status and the `message` string,
3923
- not try to destructure an `errors[]`.
3915
+ Unauthorized, in one of two shapes.
3916
+
3917
+ No valid bearer token: the auth middleware answers before the endpoint
3918
+ handler runs, with a bare `{message: string}` body — no `code`, no
3919
+ `errors` array — so key off the HTTP status and `message`.
3920
+
3921
+ An API token with a custom scope calling an operation its scope does not
3922
+ grant: the token authenticated, and the body is the standard
3923
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
3924
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
3925
+ passed both, a personal access token `GET /v1/exports/{_id}`.
3924
3926
  content:
3925
3927
  application/json:
3926
3928
  schema:
3927
- type: object
3928
- properties:
3929
- message:
3930
- type: string
3931
- description: |-
3932
- Human-readable description of the auth failure. Known values:
3933
- - `"Unauthorized"` — no `Authorization` header on the request.
3934
- - `"Bearer Authentication Failed"` — header present but token
3935
- is invalid, revoked, or expired.
3936
- required:
3937
- - message
3929
+ oneOf:
3930
+ - type: object
3931
+ description: The auth middleware's bare body for a missing or invalid token.
3932
+ properties:
3933
+ message:
3934
+ type: string
3935
+ description: |-
3936
+ Human-readable description of the auth failure. Known values:
3937
+ - `"Unauthorized"` — no `Authorization` header on the request.
3938
+ - `"Bearer Authentication Failed"` — header present but token
3939
+ is invalid, revoked, or expired.
3940
+ required:
3941
+ - message
3942
+ - $ref: '#/components/schemas/Error'
3938
3943
  examples:
3939
3944
  missing_token:
3940
3945
  summary: No Authorization header sent
@@ -3944,6 +3949,12 @@ components:
3944
3949
  summary: Bearer token invalid or revoked
3945
3950
  value:
3946
3951
  message: Bearer Authentication Failed
3952
+ scoped_token:
3953
+ summary: An API token with a custom scope reading a resource
3954
+ value:
3955
+ errors:
3956
+ - code: access_restricted
3957
+ message: You don't have the required permissions to perform the action.
3947
3958
  400-bad-request:
3948
3959
  description: |
3949
3960
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
package/dist/audit.yml CHANGED
@@ -2131,29 +2131,34 @@ components:
2131
2131
  message: 'Please make sure that the time provided for field: "from" is in ISO8601 time format.'
2132
2132
  401-unauthorized:
2133
2133
  description: |-
2134
- Unauthorized. The request lacks a valid bearer token, or the provided token
2135
- failed to authenticate.
2134
+ Unauthorized, in one of two shapes.
2136
2135
 
2137
- Note: the 401 response is produced by the auth middleware **before** the
2138
- request reaches the endpoint handler, so it does **not** follow the
2139
- standard `{errors: [...]}` envelope. Instead the body is a bare
2140
- `{message: string}` object with no `code`, no `errors` array. Callers
2141
- handling 401s should key off the HTTP status and the `message` string,
2142
- not try to destructure an `errors[]`.
2136
+ No valid bearer token: the auth middleware answers before the endpoint
2137
+ handler runs, with a bare `{message: string}` body — no `code`, no
2138
+ `errors` array — so key off the HTTP status and `message`.
2139
+
2140
+ An API token with a custom scope calling an operation its scope does not
2141
+ grant: the token authenticated, and the body is the standard
2142
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
2143
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
2144
+ passed both, a personal access token `GET /v1/exports/{_id}`.
2143
2145
  content:
2144
2146
  application/json:
2145
2147
  schema:
2146
- type: object
2147
- properties:
2148
- message:
2149
- type: string
2150
- description: |-
2151
- Human-readable description of the auth failure. Known values:
2152
- - `"Unauthorized"` — no `Authorization` header on the request.
2153
- - `"Bearer Authentication Failed"` — header present but token
2154
- is invalid, revoked, or expired.
2155
- required:
2156
- - message
2148
+ oneOf:
2149
+ - type: object
2150
+ description: The auth middleware's bare body for a missing or invalid token.
2151
+ properties:
2152
+ message:
2153
+ type: string
2154
+ description: |-
2155
+ Human-readable description of the auth failure. Known values:
2156
+ - `"Unauthorized"` — no `Authorization` header on the request.
2157
+ - `"Bearer Authentication Failed"` — header present but token
2158
+ is invalid, revoked, or expired.
2159
+ required:
2160
+ - message
2161
+ - $ref: '#/components/schemas/Error'
2157
2162
  examples:
2158
2163
  missing_token:
2159
2164
  summary: No Authorization header sent
@@ -2163,6 +2168,12 @@ components:
2163
2168
  summary: Bearer token invalid or revoked
2164
2169
  value:
2165
2170
  message: Bearer Authentication Failed
2171
+ scoped_token:
2172
+ summary: An API token with a custom scope reading a resource
2173
+ value:
2174
+ errors:
2175
+ - code: access_restricted
2176
+ message: You don't have the required permissions to perform the action.
2166
2177
  404-not-found:
2167
2178
  description: |
2168
2179
  Not found. The requested resource does not exist or is not visible to the caller.
@@ -472,29 +472,34 @@ components:
472
472
  responses:
473
473
  401-unauthorized:
474
474
  description: |-
475
- Unauthorized. The request lacks a valid bearer token, or the provided token
476
- failed to authenticate.
475
+ Unauthorized, in one of two shapes.
477
476
 
478
- Note: the 401 response is produced by the auth middleware **before** the
479
- request reaches the endpoint handler, so it does **not** follow the
480
- standard `{errors: [...]}` envelope. Instead the body is a bare
481
- `{message: string}` object with no `code`, no `errors` array. Callers
482
- handling 401s should key off the HTTP status and the `message` string,
483
- not try to destructure an `errors[]`.
477
+ No valid bearer token: the auth middleware answers before the endpoint
478
+ handler runs, with a bare `{message: string}` body — no `code`, no
479
+ `errors` array — so key off the HTTP status and `message`.
480
+
481
+ An API token with a custom scope calling an operation its scope does not
482
+ grant: the token authenticated, and the body is the standard
483
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
484
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
485
+ passed both, a personal access token `GET /v1/exports/{_id}`.
484
486
  content:
485
487
  application/json:
486
488
  schema:
487
- type: object
488
- properties:
489
- message:
490
- type: string
491
- description: |-
492
- Human-readable description of the auth failure. Known values:
493
- - `"Unauthorized"` — no `Authorization` header on the request.
494
- - `"Bearer Authentication Failed"` — header present but token
495
- is invalid, revoked, or expired.
496
- required:
497
- - message
489
+ oneOf:
490
+ - type: object
491
+ description: The auth middleware's bare body for a missing or invalid token.
492
+ properties:
493
+ message:
494
+ type: string
495
+ description: |-
496
+ Human-readable description of the auth failure. Known values:
497
+ - `"Unauthorized"` — no `Authorization` header on the request.
498
+ - `"Bearer Authentication Failed"` — header present but token
499
+ is invalid, revoked, or expired.
500
+ required:
501
+ - message
502
+ - $ref: '#/components/schemas/Error'
498
503
  examples:
499
504
  missing_token:
500
505
  summary: No Authorization header sent
@@ -504,5 +509,11 @@ components:
504
509
  summary: Bearer token invalid or revoked
505
510
  value:
506
511
  message: Bearer Authentication Failed
512
+ scoped_token:
513
+ summary: An API token with a custom scope reading a resource
514
+ value:
515
+ errors:
516
+ - code: access_restricted
517
+ message: You don't have the required permissions to perform the action.
507
518
  x-enable-proxy: true
508
519
  x-internal: false
@@ -10350,6 +10350,46 @@ components:
10350
10350
  then:
10351
10351
  required:
10352
10352
  - rest
10353
+ Error:
10354
+ type: object
10355
+ description: Standard error response envelope returned by integrator.io APIs.
10356
+ properties:
10357
+ errors:
10358
+ type: array
10359
+ description: List of errors that occurred while processing the request.
10360
+ items:
10361
+ type: object
10362
+ properties:
10363
+ code:
10364
+ oneOf:
10365
+ - type: string
10366
+ - type: integer
10367
+ description: |-
10368
+ Machine-readable error code. Usually a string like
10369
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
10370
+ may be an **integer** when the error mirrors an upstream HTTP
10371
+ status (e.g. `500`) — most commonly returned by connection-ping
10372
+ and adaptor-proxy responses.
10373
+ message:
10374
+ type: string
10375
+ description: Human-readable description of the error.
10376
+ field:
10377
+ type: string
10378
+ description: |-
10379
+ Optional pointer to the document field that caused the error.
10380
+ Used by structural validation errors (`missing_required_field`,
10381
+ `invalid_ref`) to indicate which field is at fault
10382
+ (e.g. `_id`, `type`, `http.baseURI`).
10383
+ source:
10384
+ type: string
10385
+ description: |-
10386
+ Optional origin layer for the error — e.g. `application` when
10387
+ the error came from the remote system the adaptor called,
10388
+ `connector` when the adaptor itself rejected the request.
10389
+ required:
10390
+ - message
10391
+ required:
10392
+ - errors
10353
10393
  Request:
10354
10394
  type: object
10355
10395
  description: Fields that can be sent when creating or updating a connection.
@@ -10461,7 +10501,7 @@ components:
10461
10501
  x-enumDescriptions:
10462
10502
  full: Every custom API, listener and standard integrator.io API in the account, and every Celigo Storage folder
10463
10503
  custom: Only the APIs, listeners and Celigo Storage folders listed in the sibling arrays
10464
- integration: Only the integrations listed in `_integrationIds`
10504
+ integration: The standard integrator.io APIs, for the resources of the integrations listed in `_integrationIds`
10465
10505
  description: |-
10466
10506
  How much of the account the connection may reach. Each type takes its own
10467
10507
  selections: `full` takes none, `custom` takes APIs, listeners and folder paths,
@@ -10486,7 +10526,10 @@ components:
10486
10526
  type: string
10487
10527
  format: objectId
10488
10528
  x-celigo-refModel: integrations
10489
- description: Integrations whose resources the connection may reach. Present when `type` is `integration`.
10529
+ description: |-
10530
+ Integrations whose resources — the integration, its flows and their errors, its
10531
+ exports, imports and connections — the connection may reach through the standard
10532
+ integrator.io APIs. Present when `type` is `integration`.
10490
10533
  _fileStoragePaths:
10491
10534
  type: array
10492
10535
  items:
@@ -10555,9 +10598,23 @@ components:
10555
10598
  - |-
10556
10599
  Choose the narrowest `type` the connection's use needs: a flow that reads or writes Celigo
10557
10600
  Storage files → `custom` with the folder paths it uses (`/Reports/` grants that folder and
10558
- everything beneath it); specific custom APIs or listeners → `custom` with their ids; the
10559
- standard integrator.io REST APIs → `full`. A `custom` connection with `_fileStoragePaths`
10560
- omitted or empty has no storage access — its storage step fails at run time with 401.
10601
+ everything beneath it); specific custom APIs or listeners → `custom` with their ids; a
10602
+ flow that reads one integration's resources through the standard integrator.io REST APIs
10603
+ (its flows, a flow's errors) → `integration` with that integration; the standard APIs
10604
+ across the account → `full`. A `custom` connection with `_fileStoragePaths` omitted or
10605
+ empty has no storage access — its storage step fails at run time with 401.
10606
+ - |-
10607
+ Through a `custom` connection listing one listener, `POST /v1/exports/{_id}/data` to
10608
+ that listener answered 204, while `GET /v1/exports/{_id}` for the same listener,
10609
+ `GET /v1/connections`, `GET /v1/integrations/{_id}`, `GET /v1/flows`,
10610
+ `GET /v1/flows/{_id}/errors`, `GET /v1/imports` and `GET /v1/jobs` were each refused
10611
+ with 401 `access_restricted` ("You don't have the required permissions to perform the
10612
+ action."). Through an `integration` connection the same reads answered 200
10613
+ (`GET /v1/jobs` asks for the integration `_id`: 400 `query_param_required`), and
10614
+ `GET /v1/integrations/{_id}` for another integration answered 403 `invalid_access`.
10615
+ - |-
10616
+ An id in `_exportIds` that is not a listener is accepted and dropped: the stored scope
10617
+ comes back without it.
10561
10618
  - |-
10562
10619
  The connection document never carries `accessScope`; read the stored scope from
10563
10620
  `GET /v1/accessScope/connections/{_id}` (`scope`, `apis`, `exports`, `integrations`,
@@ -11001,46 +11058,6 @@ components:
11001
11058
  then:
11002
11059
  required:
11003
11060
  - rest
11004
- Error:
11005
- type: object
11006
- description: Standard error response envelope returned by integrator.io APIs.
11007
- properties:
11008
- errors:
11009
- type: array
11010
- description: List of errors that occurred while processing the request.
11011
- items:
11012
- type: object
11013
- properties:
11014
- code:
11015
- oneOf:
11016
- - type: string
11017
- - type: integer
11018
- description: |-
11019
- Machine-readable error code. Usually a string like
11020
- `invalid_ref`, `missing_required_field`, or `unauthorized`;
11021
- may be an **integer** when the error mirrors an upstream HTTP
11022
- status (e.g. `500`) — most commonly returned by connection-ping
11023
- and adaptor-proxy responses.
11024
- message:
11025
- type: string
11026
- description: Human-readable description of the error.
11027
- field:
11028
- type: string
11029
- description: |-
11030
- Optional pointer to the document field that caused the error.
11031
- Used by structural validation errors (`missing_required_field`,
11032
- `invalid_ref`) to indicate which field is at fault
11033
- (e.g. `_id`, `type`, `http.baseURI`).
11034
- source:
11035
- type: string
11036
- description: |-
11037
- Optional origin layer for the error — e.g. `application` when
11038
- the error came from the remote system the adaptor called,
11039
- `connector` when the adaptor itself rejected the request.
11040
- required:
11041
- - message
11042
- required:
11043
- - errors
11044
11061
  JsonPatchOperation:
11045
11062
  type: object
11046
11063
  description: A single JSON Patch operation (RFC 6902).
@@ -12155,29 +12172,34 @@ components:
12155
12172
  responses:
12156
12173
  401-unauthorized:
12157
12174
  description: |-
12158
- Unauthorized. The request lacks a valid bearer token, or the provided token
12159
- failed to authenticate.
12175
+ Unauthorized, in one of two shapes.
12160
12176
 
12161
- Note: the 401 response is produced by the auth middleware **before** the
12162
- request reaches the endpoint handler, so it does **not** follow the
12163
- standard `{errors: [...]}` envelope. Instead the body is a bare
12164
- `{message: string}` object with no `code`, no `errors` array. Callers
12165
- handling 401s should key off the HTTP status and the `message` string,
12166
- not try to destructure an `errors[]`.
12177
+ No valid bearer token: the auth middleware answers before the endpoint
12178
+ handler runs, with a bare `{message: string}` body — no `code`, no
12179
+ `errors` array — so key off the HTTP status and `message`.
12180
+
12181
+ An API token with a custom scope calling an operation its scope does not
12182
+ grant: the token authenticated, and the body is the standard
12183
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
12184
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
12185
+ passed both, a personal access token `GET /v1/exports/{_id}`.
12167
12186
  content:
12168
12187
  application/json:
12169
12188
  schema:
12170
- type: object
12171
- properties:
12172
- message:
12173
- type: string
12174
- description: |-
12175
- Human-readable description of the auth failure. Known values:
12176
- - `"Unauthorized"` — no `Authorization` header on the request.
12177
- - `"Bearer Authentication Failed"` — header present but token
12178
- is invalid, revoked, or expired.
12179
- required:
12180
- - message
12189
+ oneOf:
12190
+ - type: object
12191
+ description: The auth middleware's bare body for a missing or invalid token.
12192
+ properties:
12193
+ message:
12194
+ type: string
12195
+ description: |-
12196
+ Human-readable description of the auth failure. Known values:
12197
+ - `"Unauthorized"` — no `Authorization` header on the request.
12198
+ - `"Bearer Authentication Failed"` — header present but token
12199
+ is invalid, revoked, or expired.
12200
+ required:
12201
+ - message
12202
+ - $ref: '#/components/schemas/Error'
12181
12203
  examples:
12182
12204
  missing_token:
12183
12205
  summary: No Authorization header sent
@@ -12187,6 +12209,12 @@ components:
12187
12209
  summary: Bearer token invalid or revoked
12188
12210
  value:
12189
12211
  message: Bearer Authentication Failed
12212
+ scoped_token:
12213
+ summary: An API token with a custom scope reading a resource
12214
+ value:
12215
+ errors:
12216
+ - code: access_restricted
12217
+ message: You don't have the required permissions to perform the action.
12190
12218
  403-forbidden:
12191
12219
  description: |
12192
12220
  Forbidden. The authenticated caller does not have permission to perform this operation.
@@ -1361,29 +1361,34 @@ components:
1361
1361
  responses:
1362
1362
  401-unauthorized:
1363
1363
  description: |-
1364
- Unauthorized. The request lacks a valid bearer token, or the provided token
1365
- failed to authenticate.
1364
+ Unauthorized, in one of two shapes.
1366
1365
 
1367
- Note: the 401 response is produced by the auth middleware **before** the
1368
- request reaches the endpoint handler, so it does **not** follow the
1369
- standard `{errors: [...]}` envelope. Instead the body is a bare
1370
- `{message: string}` object with no `code`, no `errors` array. Callers
1371
- handling 401s should key off the HTTP status and the `message` string,
1372
- not try to destructure an `errors[]`.
1366
+ No valid bearer token: the auth middleware answers before the endpoint
1367
+ handler runs, with a bare `{message: string}` body — no `code`, no
1368
+ `errors` array — so key off the HTTP status and `message`.
1369
+
1370
+ An API token with a custom scope calling an operation its scope does not
1371
+ grant: the token authenticated, and the body is the standard
1372
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1373
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1374
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1373
1375
  content:
1374
1376
  application/json:
1375
1377
  schema:
1376
- type: object
1377
- properties:
1378
- message:
1379
- type: string
1380
- description: |-
1381
- Human-readable description of the auth failure. Known values:
1382
- - `"Unauthorized"` — no `Authorization` header on the request.
1383
- - `"Bearer Authentication Failed"` — header present but token
1384
- is invalid, revoked, or expired.
1385
- required:
1386
- - message
1378
+ oneOf:
1379
+ - type: object
1380
+ description: The auth middleware's bare body for a missing or invalid token.
1381
+ properties:
1382
+ message:
1383
+ type: string
1384
+ description: |-
1385
+ Human-readable description of the auth failure. Known values:
1386
+ - `"Unauthorized"` — no `Authorization` header on the request.
1387
+ - `"Bearer Authentication Failed"` — header present but token
1388
+ is invalid, revoked, or expired.
1389
+ required:
1390
+ - message
1391
+ - $ref: '#/components/schemas/Error'
1387
1392
  examples:
1388
1393
  missing_token:
1389
1394
  summary: No Authorization header sent
@@ -1393,6 +1398,12 @@ components:
1393
1398
  summary: Bearer token invalid or revoked
1394
1399
  value:
1395
1400
  message: Bearer Authentication Failed
1401
+ scoped_token:
1402
+ summary: An API token with a custom scope reading a resource
1403
+ value:
1404
+ errors:
1405
+ - code: access_restricted
1406
+ message: You don't have the required permissions to perform the action.
1396
1407
  403-partner-only:
1397
1408
  description: |-
1398
1409
  The account isn't a Celigo Partner account. Every caller on such an account is refused with
@@ -733,19 +733,6 @@ components:
733
733
  - |-
734
734
  Contains the complete EDI profile configuration including metadata and
735
735
  all interchange control fields for the configured file type (X12 or EDIFACT).
736
- Request:
737
- type: object
738
- description: |-
739
- EDI profile configuration. The `fileType` field determines which set of
740
- interchange control fields apply (X12 ISA/GS or EDIFACT UNB) and is
741
- immutable after creation. Fields for the other standard are ignored.
742
- x-celigo-ai-guidance:
743
- - Request schema for creating or updating an EDI profile.
744
- required:
745
- - name
746
- - fileType
747
- allOf:
748
- - $ref: '#/components/schemas/EDIProfileBase'
749
736
  Error:
750
737
  type: object
751
738
  description: Standard error response envelope returned by integrator.io APIs.
@@ -786,6 +773,19 @@ components:
786
773
  - message
787
774
  required:
788
775
  - errors
776
+ Request:
777
+ type: object
778
+ description: |-
779
+ EDI profile configuration. The `fileType` field determines which set of
780
+ interchange control fields apply (X12 ISA/GS or EDIFACT UNB) and is
781
+ immutable after creation. Fields for the other standard are ignored.
782
+ x-celigo-ai-guidance:
783
+ - Request schema for creating or updating an EDI profile.
784
+ required:
785
+ - name
786
+ - fileType
787
+ allOf:
788
+ - $ref: '#/components/schemas/EDIProfileBase'
789
789
  DependencyEntry:
790
790
  type: object
791
791
  description: A single resource that depends on the queried resource.
@@ -872,29 +872,34 @@ components:
872
872
  responses:
873
873
  401-unauthorized:
874
874
  description: |-
875
- Unauthorized. The request lacks a valid bearer token, or the provided token
876
- failed to authenticate.
875
+ Unauthorized, in one of two shapes.
876
+
877
+ No valid bearer token: the auth middleware answers before the endpoint
878
+ handler runs, with a bare `{message: string}` body — no `code`, no
879
+ `errors` array — so key off the HTTP status and `message`.
877
880
 
878
- Note: the 401 response is produced by the auth middleware **before** the
879
- request reaches the endpoint handler, so it does **not** follow the
880
- standard `{errors: [...]}` envelope. Instead the body is a bare
881
- `{message: string}` object with no `code`, no `errors` array. Callers
882
- handling 401s should key off the HTTP status and the `message` string,
883
- not try to destructure an `errors[]`.
881
+ An API token with a custom scope calling an operation its scope does not
882
+ grant: the token authenticated, and the body is the standard
883
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
884
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
885
+ passed both, a personal access token `GET /v1/exports/{_id}`.
884
886
  content:
885
887
  application/json:
886
888
  schema:
887
- type: object
888
- properties:
889
- message:
890
- type: string
891
- description: |-
892
- Human-readable description of the auth failure. Known values:
893
- - `"Unauthorized"` — no `Authorization` header on the request.
894
- - `"Bearer Authentication Failed"` — header present but token
895
- is invalid, revoked, or expired.
896
- required:
897
- - message
889
+ oneOf:
890
+ - type: object
891
+ description: The auth middleware's bare body for a missing or invalid token.
892
+ properties:
893
+ message:
894
+ type: string
895
+ description: |-
896
+ Human-readable description of the auth failure. Known values:
897
+ - `"Unauthorized"` — no `Authorization` header on the request.
898
+ - `"Bearer Authentication Failed"` — header present but token
899
+ is invalid, revoked, or expired.
900
+ required:
901
+ - message
902
+ - $ref: '#/components/schemas/Error'
898
903
  examples:
899
904
  missing_token:
900
905
  summary: No Authorization header sent
@@ -904,6 +909,12 @@ components:
904
909
  summary: Bearer token invalid or revoked
905
910
  value:
906
911
  message: Bearer Authentication Failed
912
+ scoped_token:
913
+ summary: An API token with a custom scope reading a resource
914
+ value:
915
+ errors:
916
+ - code: access_restricted
917
+ message: You don't have the required permissions to perform the action.
907
918
  422-unprocessable-entity:
908
919
  description: |
909
920
  Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.