@celigo/api-specs 0.2.27 → 0.2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bartendertemplate.yml +508 -0
- package/package.json +1 -1
- package/schemas.json +1 -1
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
openapi: 3.2.0
|
|
2
|
+
info:
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
title: BarTender Templates
|
|
5
|
+
description: API for listing and downloading Celigo-published BarTender label templates used by EDI label-printing flows.
|
|
6
|
+
x-celigo-ai-guidance:
|
|
7
|
+
- |-
|
|
8
|
+
Call `GET /v1/bartenderTemplates` first — that returns unique published
|
|
9
|
+
`names` only. Then call `GET /v1/bartenderTemplates?name=<selected>` to
|
|
10
|
+
load `s3Key` values and `fieldMappings` for the chosen templates. Download
|
|
11
|
+
a `.btw` with `GET /v1/bartenderTemplates/{name}/download`. Requires EDI
|
|
12
|
+
and EDI label-printing entitlements; returns 422
|
|
13
|
+
`edi_subscription_required` when either is missing and a bare 404 (empty
|
|
14
|
+
body) when the global label-printing kill switch is active.
|
|
15
|
+
servers:
|
|
16
|
+
- url: https://api.integrator.io
|
|
17
|
+
description: Production (US / default region)
|
|
18
|
+
- url: https://api.eu.integrator.io
|
|
19
|
+
description: Production (EU region)
|
|
20
|
+
- url: https://api.au.integrator.io
|
|
21
|
+
description: Production (AU region)
|
|
22
|
+
- url: https://api.ca.integrator.io
|
|
23
|
+
description: Production (CA region)
|
|
24
|
+
security:
|
|
25
|
+
- bearerAuth: []
|
|
26
|
+
tags:
|
|
27
|
+
- name: BarTender Templates
|
|
28
|
+
description: |-
|
|
29
|
+
Celigo-published BarTender (`.btw`) label templates synced daily from
|
|
30
|
+
BarTender Cloud. List unique names, load selected template details and
|
|
31
|
+
lookup-cache field mappings, or download a published `.btw`.
|
|
32
|
+
|
|
33
|
+
Requires a standard integrator.io JWT with manage or monitor role, plus
|
|
34
|
+
EDI and EDI label-printing entitlements on the account.
|
|
35
|
+
|
|
36
|
+
## BarTender template schemas
|
|
37
|
+
|
|
38
|
+
{% openapi-schemas spec="bartendertemplate" schemas="BarTenderTemplateCatalog,BarTenderTemplate,BarTenderFieldMapping" grouped="true" %}
|
|
39
|
+
paths:
|
|
40
|
+
/v1/bartenderTemplates:
|
|
41
|
+
get:
|
|
42
|
+
x-internal: false
|
|
43
|
+
operationId: listBarTenderTemplates
|
|
44
|
+
tags:
|
|
45
|
+
- BarTender Templates
|
|
46
|
+
summary: List BarTender label templates
|
|
47
|
+
description: |-
|
|
48
|
+
Returns Celigo-published BarTender catalog data. The catalog is read from
|
|
49
|
+
S3 (`catalog.json`, written by the daily sync cron) and cached in-process.
|
|
50
|
+
|
|
51
|
+
Omit `name` to get unique published template names (sorted). Pass one or
|
|
52
|
+
more `name` values to get matching templates and lookup-cache field
|
|
53
|
+
mappings plus the catalog `syncedAt`.
|
|
54
|
+
|
|
55
|
+
`name` accepts a comma-separated list or repeated query parameters.
|
|
56
|
+
Matching is case-sensitive and also treats pipe-separated tokens as
|
|
57
|
+
aliases (`amazon | 133` matches `amazon` or `133`). Unknown names return
|
|
58
|
+
empty `templates` and `fieldMappings` — not 404. `limit`, `page`, and
|
|
59
|
+
`search` are ignored.
|
|
60
|
+
parameters:
|
|
61
|
+
- name: name
|
|
62
|
+
in: query
|
|
63
|
+
required: false
|
|
64
|
+
description: |-
|
|
65
|
+
Filter to these published template names. Comma-separated or
|
|
66
|
+
repeated (`?name=amazon&name=walmart`). When omitted or empty, the
|
|
67
|
+
response is `{ names }` only.
|
|
68
|
+
schema:
|
|
69
|
+
type: string
|
|
70
|
+
examples:
|
|
71
|
+
- amazon
|
|
72
|
+
- amazon,walmart
|
|
73
|
+
responses:
|
|
74
|
+
'200':
|
|
75
|
+
description: |-
|
|
76
|
+
Unique names when `name` is omitted; filtered catalog details when
|
|
77
|
+
`name` is provided.
|
|
78
|
+
content:
|
|
79
|
+
application/json:
|
|
80
|
+
schema:
|
|
81
|
+
$ref: '#/components/schemas/BarTenderTemplateCatalog'
|
|
82
|
+
examples:
|
|
83
|
+
names:
|
|
84
|
+
summary: Unique published names (no name query)
|
|
85
|
+
value:
|
|
86
|
+
names:
|
|
87
|
+
- amazon
|
|
88
|
+
- walmart
|
|
89
|
+
details:
|
|
90
|
+
summary: Filtered templates and field mappings
|
|
91
|
+
value:
|
|
92
|
+
syncedAt: '2026-07-10T02:15:00.000Z'
|
|
93
|
+
templates:
|
|
94
|
+
- name: amazon
|
|
95
|
+
s3Key: EDI_BarTender_Templates/templates/FI!1.0!1!0f1c545d-1b36-49af-8e1f-5ce7e8ba43ec.btw
|
|
96
|
+
fieldMappings:
|
|
97
|
+
- key: amazon
|
|
98
|
+
value:
|
|
99
|
+
configurations:
|
|
100
|
+
PACK|*:
|
|
101
|
+
templateName: AMAZON_US_RETAIL_CARTON
|
|
102
|
+
- key: amazon | 133
|
|
103
|
+
value:
|
|
104
|
+
configurations:
|
|
105
|
+
PALLET|*:
|
|
106
|
+
templateName: AMAZON_US_RETAIL_PALLET
|
|
107
|
+
empty_names:
|
|
108
|
+
summary: Catalog has no published templates
|
|
109
|
+
value:
|
|
110
|
+
names: []
|
|
111
|
+
'401':
|
|
112
|
+
$ref: '#/components/responses/401-unauthorized'
|
|
113
|
+
'404':
|
|
114
|
+
description: |-
|
|
115
|
+
The global BarTender label-printing kill switch
|
|
116
|
+
(`BARTENDER_LABEL_PRINTING_DISABLED`) is active. The route responds
|
|
117
|
+
with a bare `404` and an empty body so the feature appears unavailable.
|
|
118
|
+
'422':
|
|
119
|
+
description: |-
|
|
120
|
+
The account lacks a required EDI entitlement. Missing `edi.enabled` or
|
|
121
|
+
`edi.labelPrinting.enabled` both return the same
|
|
122
|
+
`edi_subscription_required` error — the route reuses the standard EDI
|
|
123
|
+
license gate used by other B2B Manager endpoints.
|
|
124
|
+
content:
|
|
125
|
+
application/json:
|
|
126
|
+
schema:
|
|
127
|
+
$ref: '#/components/schemas/Error'
|
|
128
|
+
examples:
|
|
129
|
+
edi_not_enabled:
|
|
130
|
+
summary: EDI is not enabled on the account
|
|
131
|
+
value:
|
|
132
|
+
errors:
|
|
133
|
+
- code: edi_subscription_required
|
|
134
|
+
message: EDI is a premium feature that is not included in your account's current subscription plan. Please upgrade your account to get access to B2B Manager.
|
|
135
|
+
label_printing_not_enabled:
|
|
136
|
+
summary: EDI label printing is not enabled on the account
|
|
137
|
+
value:
|
|
138
|
+
errors:
|
|
139
|
+
- code: edi_subscription_required
|
|
140
|
+
message: EDI is a premium feature that is not included in your account's current subscription plan. Please upgrade your account to get access to B2B Manager.
|
|
141
|
+
'502':
|
|
142
|
+
description: |-
|
|
143
|
+
The catalog could not be read from S3 or the stored `catalog.json` is
|
|
144
|
+
malformed.
|
|
145
|
+
content:
|
|
146
|
+
application/json:
|
|
147
|
+
schema:
|
|
148
|
+
$ref: '#/components/schemas/Error'
|
|
149
|
+
examples:
|
|
150
|
+
catalog_unavailable:
|
|
151
|
+
summary: S3 read or parse failure
|
|
152
|
+
value:
|
|
153
|
+
errors:
|
|
154
|
+
- code: BARTENDER_CATALOG_UNAVAILABLE
|
|
155
|
+
message: The BarTender template catalog is temporarily unavailable. Please try again later.
|
|
156
|
+
'503':
|
|
157
|
+
description: |-
|
|
158
|
+
The catalog has never been published for this environment, or the
|
|
159
|
+
EDI license check could not be completed.
|
|
160
|
+
content:
|
|
161
|
+
application/json:
|
|
162
|
+
schema:
|
|
163
|
+
$ref: '#/components/schemas/Error'
|
|
164
|
+
examples:
|
|
165
|
+
catalog_not_initialized:
|
|
166
|
+
summary: Catalog not yet synced
|
|
167
|
+
value:
|
|
168
|
+
errors:
|
|
169
|
+
- code: BARTENDER_CATALOG_NOT_INITIALIZED
|
|
170
|
+
message: The BarTender template catalog has not been published yet. Please try again later.
|
|
171
|
+
license_check_failed:
|
|
172
|
+
summary: EDI license lookup failed
|
|
173
|
+
value:
|
|
174
|
+
errors:
|
|
175
|
+
- code: edi_license_check_failed
|
|
176
|
+
message: We're unable to verify your EDI license at the moment. Please contact support if the issue persists.
|
|
177
|
+
/v1/bartenderTemplates/{name}/download:
|
|
178
|
+
get:
|
|
179
|
+
x-internal: false
|
|
180
|
+
operationId: downloadBarTenderTemplate
|
|
181
|
+
tags:
|
|
182
|
+
- BarTender Templates
|
|
183
|
+
summary: Download a BarTender label template
|
|
184
|
+
description: |-
|
|
185
|
+
Returns the published `.btw` binary for the named template.
|
|
186
|
+
|
|
187
|
+
`name` must match a published catalog entry exactly — pipe-token alias
|
|
188
|
+
matching from the list route is not applied here. The file is streamed
|
|
189
|
+
as `application/octet-stream` with `Content-Disposition: attachment`.
|
|
190
|
+
x-celigo-ai-guidance:
|
|
191
|
+
- |-
|
|
192
|
+
The name check runs before the catalog lookup, so a published name that
|
|
193
|
+
contains characters outside `[A-Za-z0-9._ -]` (parentheses, for example)
|
|
194
|
+
appears in the list response but answers 400
|
|
195
|
+
BARTENDER_TEMPLATE_INVALID_NAME here and cannot be downloaded through this
|
|
196
|
+
route. Live-verified 2026-09-18.
|
|
197
|
+
parameters:
|
|
198
|
+
- name: name
|
|
199
|
+
in: path
|
|
200
|
+
required: true
|
|
201
|
+
description: |-
|
|
202
|
+
Published template name from `GET /v1/bartenderTemplates`. Allowed
|
|
203
|
+
characters are letters, digits, period, underscore, space, and
|
|
204
|
+
hyphen; `..` is rejected.
|
|
205
|
+
schema:
|
|
206
|
+
type: string
|
|
207
|
+
pattern: ^[A-Za-z0-9._ -]+$
|
|
208
|
+
examples:
|
|
209
|
+
- amazon
|
|
210
|
+
responses:
|
|
211
|
+
'200':
|
|
212
|
+
description: Published `.btw` binary.
|
|
213
|
+
headers:
|
|
214
|
+
Content-Disposition:
|
|
215
|
+
description: |-
|
|
216
|
+
Attachment filename taken from the template object's basename
|
|
217
|
+
(the `.btw` file name).
|
|
218
|
+
schema:
|
|
219
|
+
type: string
|
|
220
|
+
examples:
|
|
221
|
+
- attachment; filename="FI!1.0!1!0f1c545d-1b36-49af-8e1f-5ce7e8ba43ec.btw"
|
|
222
|
+
content:
|
|
223
|
+
application/octet-stream:
|
|
224
|
+
schema:
|
|
225
|
+
type: string
|
|
226
|
+
format: binary
|
|
227
|
+
'400':
|
|
228
|
+
description: |-
|
|
229
|
+
`name` is empty or contains characters outside
|
|
230
|
+
`[A-Za-z0-9._ -]`, or includes `..`.
|
|
231
|
+
content:
|
|
232
|
+
application/json:
|
|
233
|
+
schema:
|
|
234
|
+
$ref: '#/components/schemas/Error'
|
|
235
|
+
examples:
|
|
236
|
+
invalid_name:
|
|
237
|
+
value:
|
|
238
|
+
errors:
|
|
239
|
+
- code: BARTENDER_TEMPLATE_INVALID_NAME
|
|
240
|
+
message: The BarTender template name is invalid.
|
|
241
|
+
'401':
|
|
242
|
+
$ref: '#/components/responses/401-unauthorized'
|
|
243
|
+
'404':
|
|
244
|
+
description: |-
|
|
245
|
+
The template is not in the published catalog, or the global
|
|
246
|
+
label-printing kill switch is active (bare `404`, empty body).
|
|
247
|
+
content:
|
|
248
|
+
application/json:
|
|
249
|
+
schema:
|
|
250
|
+
$ref: '#/components/schemas/Error'
|
|
251
|
+
examples:
|
|
252
|
+
not_found:
|
|
253
|
+
summary: Name is not a published template
|
|
254
|
+
value:
|
|
255
|
+
errors:
|
|
256
|
+
- code: BARTENDER_TEMPLATE_NOT_FOUND
|
|
257
|
+
message: The requested BarTender template was not found in the published catalog.
|
|
258
|
+
'422':
|
|
259
|
+
description: |-
|
|
260
|
+
The account lacks a required EDI entitlement. Missing `edi.enabled` or
|
|
261
|
+
`edi.labelPrinting.enabled` both return `edi_subscription_required`.
|
|
262
|
+
content:
|
|
263
|
+
application/json:
|
|
264
|
+
schema:
|
|
265
|
+
$ref: '#/components/schemas/Error'
|
|
266
|
+
examples:
|
|
267
|
+
edi_subscription_required:
|
|
268
|
+
value:
|
|
269
|
+
errors:
|
|
270
|
+
- code: edi_subscription_required
|
|
271
|
+
message: EDI is a premium feature that is not included in your account's current subscription plan. Please upgrade your account to get access to B2B Manager.
|
|
272
|
+
'502':
|
|
273
|
+
description: |-
|
|
274
|
+
The catalog could not be read, or the `.btw` object could not be
|
|
275
|
+
fetched from S3.
|
|
276
|
+
content:
|
|
277
|
+
application/json:
|
|
278
|
+
schema:
|
|
279
|
+
$ref: '#/components/schemas/Error'
|
|
280
|
+
examples:
|
|
281
|
+
catalog_unavailable:
|
|
282
|
+
summary: Catalog read or parse failure
|
|
283
|
+
value:
|
|
284
|
+
errors:
|
|
285
|
+
- code: BARTENDER_CATALOG_UNAVAILABLE
|
|
286
|
+
message: The BarTender template catalog is temporarily unavailable. Please try again later.
|
|
287
|
+
download_failed:
|
|
288
|
+
summary: Template object read failure
|
|
289
|
+
value:
|
|
290
|
+
errors:
|
|
291
|
+
- code: BARTENDER_TEMPLATE_DOWNLOAD_FAILED
|
|
292
|
+
message: The BarTender template file is temporarily unavailable. Please try again later.
|
|
293
|
+
'503':
|
|
294
|
+
description: |-
|
|
295
|
+
The catalog has never been published for this environment, or the
|
|
296
|
+
EDI license check could not be completed.
|
|
297
|
+
content:
|
|
298
|
+
application/json:
|
|
299
|
+
schema:
|
|
300
|
+
$ref: '#/components/schemas/Error'
|
|
301
|
+
examples:
|
|
302
|
+
catalog_not_initialized:
|
|
303
|
+
summary: Catalog not yet synced
|
|
304
|
+
value:
|
|
305
|
+
errors:
|
|
306
|
+
- code: BARTENDER_CATALOG_NOT_INITIALIZED
|
|
307
|
+
message: The BarTender template catalog has not been published yet. Please try again later.
|
|
308
|
+
license_check_failed:
|
|
309
|
+
summary: EDI license lookup failed
|
|
310
|
+
value:
|
|
311
|
+
errors:
|
|
312
|
+
- code: edi_license_check_failed
|
|
313
|
+
message: We're unable to verify your EDI license at the moment. Please contact support if the issue persists.
|
|
314
|
+
components:
|
|
315
|
+
securitySchemes:
|
|
316
|
+
bearerAuth:
|
|
317
|
+
type: http
|
|
318
|
+
scheme: bearer
|
|
319
|
+
schemas:
|
|
320
|
+
BarTenderTemplate:
|
|
321
|
+
type: object
|
|
322
|
+
description: |-
|
|
323
|
+
One published BarTender label template. Internal catalog fields (`id`,
|
|
324
|
+
`btChecksum`, `modifiedDateTime`, `version`) are not exposed — only `name`
|
|
325
|
+
and `s3Key` are returned.
|
|
326
|
+
required:
|
|
327
|
+
- name
|
|
328
|
+
- s3Key
|
|
329
|
+
properties:
|
|
330
|
+
name:
|
|
331
|
+
type: string
|
|
332
|
+
description: |-
|
|
333
|
+
Published display name, derived from the `.btw` file stem
|
|
334
|
+
(`amazon.btw` → `"amazon"`). Use this value in the `name` query
|
|
335
|
+
parameter and in `GET /v1/bartenderTemplates/{name}/download`.
|
|
336
|
+
examples:
|
|
337
|
+
- amazon
|
|
338
|
+
s3Key:
|
|
339
|
+
type: string
|
|
340
|
+
description: |-
|
|
341
|
+
Object key for the `.btw` binary in the UI-resources bucket. Pass this
|
|
342
|
+
to the downstream S3 export step that pushes the template to the
|
|
343
|
+
customer's BarTender environment.
|
|
344
|
+
examples:
|
|
345
|
+
- EDI_BarTender_Templates/templates/FI!1.0!1!0f1c545d-1b36-49af-8e1f-5ce7e8ba43ec.btw
|
|
346
|
+
BarTenderFieldMapping:
|
|
347
|
+
type: object
|
|
348
|
+
description: |-
|
|
349
|
+
One lookup-cache field mapping from the published catalog. Keys often
|
|
350
|
+
name a template (or a pipe-separated alias such as `amazon | 133`);
|
|
351
|
+
values keep whatever JSON shape the master cache stored.
|
|
352
|
+
required:
|
|
353
|
+
- key
|
|
354
|
+
- value
|
|
355
|
+
properties:
|
|
356
|
+
key:
|
|
357
|
+
type: string
|
|
358
|
+
description: |-
|
|
359
|
+
Mapping key. Filtered with the same case-sensitive exact / pipe-token
|
|
360
|
+
match as template `name` when `name` is supplied on the list route.
|
|
361
|
+
examples:
|
|
362
|
+
- amazon
|
|
363
|
+
- amazon | 133
|
|
364
|
+
- carrier
|
|
365
|
+
value:
|
|
366
|
+
description: |-
|
|
367
|
+
Mapping value from the master lookup cache. May be a string or an
|
|
368
|
+
object; consumers should check the runtime type before use.
|
|
369
|
+
oneOf:
|
|
370
|
+
- title: String value
|
|
371
|
+
type: string
|
|
372
|
+
- title: Object value
|
|
373
|
+
type: object
|
|
374
|
+
additionalProperties: true
|
|
375
|
+
examples:
|
|
376
|
+
- UPS
|
|
377
|
+
- configurations:
|
|
378
|
+
PACK|*:
|
|
379
|
+
templateName: AMAZON_US_RETAIL_CARTON
|
|
380
|
+
BarTenderTemplateCatalog:
|
|
381
|
+
type: object
|
|
382
|
+
description: |-
|
|
383
|
+
Response from `GET /v1/bartenderTemplates`. When `name` is omitted the
|
|
384
|
+
body is `{ names }`. When `name` is provided the body is
|
|
385
|
+
`{ syncedAt, templates, fieldMappings }` for the matching entries.
|
|
386
|
+
properties:
|
|
387
|
+
names:
|
|
388
|
+
type: array
|
|
389
|
+
description: |-
|
|
390
|
+
Unique published template names, sorted. Present when `name` is
|
|
391
|
+
omitted. An empty catalog returns `[]`.
|
|
392
|
+
items:
|
|
393
|
+
type: string
|
|
394
|
+
examples:
|
|
395
|
+
- - amazon
|
|
396
|
+
- walmart
|
|
397
|
+
syncedAt:
|
|
398
|
+
type: string
|
|
399
|
+
format: date-time
|
|
400
|
+
description: |-
|
|
401
|
+
UTC timestamp of the last successful catalog sync. Present when
|
|
402
|
+
`name` is provided.
|
|
403
|
+
examples:
|
|
404
|
+
- '2026-07-10T02:15:00.000Z'
|
|
405
|
+
templates:
|
|
406
|
+
type: array
|
|
407
|
+
description: |-
|
|
408
|
+
Published templates whose `name` matches any requested `name` value.
|
|
409
|
+
Present when `name` is provided. Unknown names yield an empty array,
|
|
410
|
+
not a 404.
|
|
411
|
+
items:
|
|
412
|
+
$ref: '#/components/schemas/BarTenderTemplate'
|
|
413
|
+
fieldMappings:
|
|
414
|
+
type: array
|
|
415
|
+
description: |-
|
|
416
|
+
Published lookup-cache mappings whose `key` matches any requested
|
|
417
|
+
`name` value. Present when `name` is provided. A catalog that predates
|
|
418
|
+
field-mapping sync returns `[]`.
|
|
419
|
+
items:
|
|
420
|
+
$ref: '#/components/schemas/BarTenderFieldMapping'
|
|
421
|
+
if:
|
|
422
|
+
required:
|
|
423
|
+
- names
|
|
424
|
+
then:
|
|
425
|
+
required:
|
|
426
|
+
- names
|
|
427
|
+
else:
|
|
428
|
+
required:
|
|
429
|
+
- syncedAt
|
|
430
|
+
- templates
|
|
431
|
+
- fieldMappings
|
|
432
|
+
Error:
|
|
433
|
+
type: object
|
|
434
|
+
description: Standard error response envelope returned by integrator.io APIs.
|
|
435
|
+
properties:
|
|
436
|
+
errors:
|
|
437
|
+
type: array
|
|
438
|
+
description: List of errors that occurred while processing the request.
|
|
439
|
+
items:
|
|
440
|
+
type: object
|
|
441
|
+
properties:
|
|
442
|
+
code:
|
|
443
|
+
oneOf:
|
|
444
|
+
- type: string
|
|
445
|
+
- type: integer
|
|
446
|
+
description: |-
|
|
447
|
+
Machine-readable error code. Usually a string like
|
|
448
|
+
`invalid_ref`, `missing_required_field`, or `unauthorized`;
|
|
449
|
+
may be an **integer** when the error mirrors an upstream HTTP
|
|
450
|
+
status (e.g. `500`) — most commonly returned by connection-ping
|
|
451
|
+
and adaptor-proxy responses.
|
|
452
|
+
message:
|
|
453
|
+
type: string
|
|
454
|
+
description: Human-readable description of the error.
|
|
455
|
+
field:
|
|
456
|
+
type: string
|
|
457
|
+
description: |-
|
|
458
|
+
Optional pointer to the document field that caused the error.
|
|
459
|
+
Used by structural validation errors (`missing_required_field`,
|
|
460
|
+
`invalid_ref`) to indicate which field is at fault
|
|
461
|
+
(e.g. `_id`, `type`, `http.baseURI`).
|
|
462
|
+
source:
|
|
463
|
+
type: string
|
|
464
|
+
description: |-
|
|
465
|
+
Optional origin layer for the error — e.g. `application` when
|
|
466
|
+
the error came from the remote system the adaptor called,
|
|
467
|
+
`connector` when the adaptor itself rejected the request.
|
|
468
|
+
required:
|
|
469
|
+
- message
|
|
470
|
+
required:
|
|
471
|
+
- errors
|
|
472
|
+
responses:
|
|
473
|
+
401-unauthorized:
|
|
474
|
+
description: |-
|
|
475
|
+
Unauthorized. The request lacks a valid bearer token, or the provided token
|
|
476
|
+
failed to authenticate.
|
|
477
|
+
|
|
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[]`.
|
|
484
|
+
content:
|
|
485
|
+
application/json:
|
|
486
|
+
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
|
|
498
|
+
examples:
|
|
499
|
+
missing_token:
|
|
500
|
+
summary: No Authorization header sent
|
|
501
|
+
value:
|
|
502
|
+
message: Unauthorized
|
|
503
|
+
invalid_token:
|
|
504
|
+
summary: Bearer token invalid or revoked
|
|
505
|
+
value:
|
|
506
|
+
message: Bearer Authentication Failed
|
|
507
|
+
x-enable-proxy: true
|
|
508
|
+
x-internal: false
|
package/package.json
CHANGED