docs: generate API reference for 2.12.3 (#14341)
This commit is contained in:
155
www/apps/api-reference/specs/admin/paths/admin_locales.yaml
Normal file
155
www/apps/api-reference/specs/admin/paths/admin_locales.yaml
Normal file
@@ -0,0 +1,155 @@
|
||||
get:
|
||||
operationId: GetLocales
|
||||
summary: List Locales
|
||||
description: >-
|
||||
Retrieve a list of locales. The locales can be filtered by fields such as
|
||||
`code`. The locales can also be sorted or paginated.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- name: q
|
||||
in: query
|
||||
description: Search query to filter locales by code or other fields.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: q
|
||||
description: Search query to filter locales by code or other fields.
|
||||
- name: code
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: code
|
||||
description: Filter locales by a code.
|
||||
- type: array
|
||||
description: Filter locales by multiple codes.
|
||||
items:
|
||||
type: string
|
||||
title: code
|
||||
description: A locale code.
|
||||
- name: limit
|
||||
in: query
|
||||
description: Limit the number of items returned in the list.
|
||||
required: false
|
||||
schema:
|
||||
type: number
|
||||
title: limit
|
||||
description: Limit the number of items returned in the list.
|
||||
externalDocs:
|
||||
url: '#pagination'
|
||||
- name: offset
|
||||
in: query
|
||||
description: The number of items to skip when retrieving a list.
|
||||
required: false
|
||||
schema:
|
||||
type: number
|
||||
title: offset
|
||||
description: The number of items to skip when retrieving a list.
|
||||
externalDocs:
|
||||
url: '#pagination'
|
||||
- name: order
|
||||
in: query
|
||||
description: >-
|
||||
The field to sort the data by. By default, the sort order is ascending.
|
||||
To change the order to descending, prefix the field name with `-`.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: order
|
||||
description: >-
|
||||
The field to sort the data by. By default, the sort order is
|
||||
ascending. To change the order to descending, prefix the field name
|
||||
with `-`.
|
||||
externalDocs:
|
||||
url: '#pagination'
|
||||
- name: with_deleted
|
||||
in: query
|
||||
description: The locale's with deleted.
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
title: with_deleted
|
||||
description: The locale's with deleted.
|
||||
- name: fields
|
||||
in: query
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data. If
|
||||
a field is prefixed with `+` it will be added to the default fields,
|
||||
using `-` will remove it from the default fields. Without prefix it will
|
||||
replace the entire default fields.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: fields
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
If a field is prefixed with `+` it will be added to the default
|
||||
fields, using `-` will remove it from the default fields. Without
|
||||
prefix it will replace the entire default fields.
|
||||
externalDocs:
|
||||
url: '#select-fields-and-relations'
|
||||
- name: $and
|
||||
in: query
|
||||
description: >-
|
||||
Join query parameters with an AND condition. Each object's content is
|
||||
the same type as the expected query parameters.
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an AND condition. Each object's content is
|
||||
the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $and
|
||||
- name: $or
|
||||
in: query
|
||||
description: >-
|
||||
Join query parameters with an OR condition. Each object's content is the
|
||||
same type as the expected query parameters.
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an OR condition. Each object's content is
|
||||
the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $or
|
||||
security:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS SDK
|
||||
source:
|
||||
$ref: ../code_samples/JavaScript/admin_locales/get.js
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/admin_locales/get.sh
|
||||
tags:
|
||||
- Locales
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AdminLocaleListResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
x-since: 2.12.3
|
||||
x-featureFlag: translation
|
||||
@@ -0,0 +1,72 @@
|
||||
get:
|
||||
operationId: GetLocalesCode
|
||||
summary: Get a Locale
|
||||
x-sidebar-summary: Get Locale
|
||||
description: >-
|
||||
Retrieve a locale by its code. You can expand the locale's relations or
|
||||
select the fields that should be returned.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- name: code
|
||||
in: path
|
||||
description: >-
|
||||
The locale's code in [BCP 47
|
||||
format](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1).
|
||||
example: fr-FR
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: fields
|
||||
in: query
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data. If
|
||||
a field is prefixed with `+` it will be added to the default fields,
|
||||
using `-` will remove it from the default fields. Without prefix it will
|
||||
replace the entire default fields.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: fields
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
If a field is prefixed with `+` it will be added to the default
|
||||
fields, using `-` will remove it from the default fields. Without
|
||||
prefix it will replace the entire default fields.
|
||||
externalDocs:
|
||||
url: '#select-fields-and-relations'
|
||||
security:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS SDK
|
||||
source:
|
||||
$ref: ../code_samples/JavaScript/admin_locales_{code}/get.js
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/admin_locales_{code}/get.sh
|
||||
tags:
|
||||
- Locales
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AdminLocaleResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
x-since: 2.12.3
|
||||
x-featureFlag: translation
|
||||
@@ -0,0 +1,528 @@
|
||||
post:
|
||||
operationId: PostOrdersExport
|
||||
summary: Export Orders
|
||||
description: >
|
||||
Start an order export process to retrieve a CSV of exported orders.
|
||||
|
||||
|
||||
You'll receive in the response the transaction ID of the workflow generating
|
||||
the CSV file. To check the status of the execution, send a GET request to
|
||||
`/admin/workflows-executions/export-orders/:transaction-id`.
|
||||
|
||||
|
||||
Once the execution finishes successfully, a notification is created for the
|
||||
export. You can retrieve the notifications using the `/admin/notification`
|
||||
API route to retrieve the file's download URL.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- name: id
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: id
|
||||
description: The ID of the order to export.
|
||||
- type: array
|
||||
description: The IDs of the orders to export.
|
||||
items:
|
||||
type: string
|
||||
title: id
|
||||
description: An order ID.
|
||||
- name: sales_channel_id
|
||||
in: query
|
||||
description: The IDs of the sales channels to export their orders.
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
description: The IDs of the sales channels to export their orders.
|
||||
items:
|
||||
type: string
|
||||
title: sales_channel_id
|
||||
description: A sales channel ID.
|
||||
- name: region_id
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: region_id
|
||||
description: The ID of a region to export orders in it.
|
||||
- type: array
|
||||
description: The IDs of regions to export their orders.
|
||||
items:
|
||||
type: string
|
||||
title: region_id
|
||||
description: A region ID.
|
||||
- name: customer_id
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: customer_id
|
||||
description: The ID of a customer to export their orders.
|
||||
- type: array
|
||||
description: The IDs of customers to export their orders.
|
||||
items:
|
||||
type: string
|
||||
title: customer_id
|
||||
description: A customer ID.
|
||||
- name: q
|
||||
in: query
|
||||
description: A search query to filter exported orders by.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: q
|
||||
description: A search query to filter exported orders by.
|
||||
- name: created_at
|
||||
in: query
|
||||
description: Filter by an order's creation date.
|
||||
required: false
|
||||
schema:
|
||||
type: object
|
||||
description: Filter by an order's creation date.
|
||||
properties:
|
||||
$and:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an AND condition. Each object's content
|
||||
is the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $and
|
||||
$or:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an OR condition. Each object's content
|
||||
is the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $or
|
||||
$eq:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: $eq
|
||||
description: Filter by an exact match.
|
||||
- type: array
|
||||
description: Filter by an exact match.
|
||||
items:
|
||||
type: string
|
||||
title: $eq
|
||||
description: Filter by an exact match.
|
||||
$ne:
|
||||
type: string
|
||||
title: $ne
|
||||
description: Filter by values not equal to this parameter.
|
||||
$in:
|
||||
type: array
|
||||
description: Filter by values in this array.
|
||||
items:
|
||||
type: string
|
||||
title: $in
|
||||
description: Filter by values in this array.
|
||||
$nin:
|
||||
type: array
|
||||
description: Filter by values not in this array.
|
||||
items:
|
||||
type: string
|
||||
title: $nin
|
||||
description: Filter by values not in this array.
|
||||
$not:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: $not
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
- type: object
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
- type: array
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $not
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
$gt:
|
||||
type: string
|
||||
title: $gt
|
||||
description: >-
|
||||
Filter by values greater than this parameter. Useful for numbers
|
||||
and dates only.
|
||||
$gte:
|
||||
type: string
|
||||
title: $gte
|
||||
description: >-
|
||||
Filter by values greater than or equal to this parameter. Useful
|
||||
for numbers and dates only.
|
||||
$lt:
|
||||
type: string
|
||||
title: $lt
|
||||
description: >-
|
||||
Filter by values less than this parameter. Useful for numbers and
|
||||
dates only.
|
||||
$lte:
|
||||
type: string
|
||||
title: $lte
|
||||
description: >-
|
||||
Filter by values less than or equal to this parameter. Useful for
|
||||
numbers and dates only.
|
||||
$like:
|
||||
type: string
|
||||
title: $like
|
||||
description: Apply a `like` filter. Useful for strings only.
|
||||
$re:
|
||||
type: string
|
||||
title: $re
|
||||
description: Apply a regex filter. Useful for strings only.
|
||||
$ilike:
|
||||
type: string
|
||||
title: $ilike
|
||||
description: Apply a case-insensitive `like` filter. Useful for strings only.
|
||||
$fulltext:
|
||||
type: string
|
||||
title: $fulltext
|
||||
description: Filter to apply on full-text properties.
|
||||
$overlap:
|
||||
type: array
|
||||
description: Filter arrays that have overlapping values with this parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $overlap
|
||||
description: Filter arrays that have overlapping values with this parameter.
|
||||
$contains:
|
||||
type: array
|
||||
description: Filter arrays that contain some of the values of this parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $contains
|
||||
description: Filter arrays that contain some of the values of this parameter.
|
||||
$contained:
|
||||
type: array
|
||||
description: Filter arrays that contain all values of this parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $contained
|
||||
description: Filter arrays that contain all values of this parameter.
|
||||
$exists:
|
||||
type: boolean
|
||||
title: $exists
|
||||
description: Filter by whether a value for this parameter exists (not `null`).
|
||||
- name: updated_at
|
||||
in: query
|
||||
description: Filter by an order's update date.
|
||||
required: false
|
||||
schema:
|
||||
type: object
|
||||
description: Filter by an order's update date.
|
||||
properties:
|
||||
$and:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an AND condition. Each object's content
|
||||
is the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $and
|
||||
$or:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an OR condition. Each object's content
|
||||
is the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $or
|
||||
$eq:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: $eq
|
||||
description: Filter by an exact match.
|
||||
- type: array
|
||||
description: Filter by an exact match.
|
||||
items:
|
||||
type: string
|
||||
title: $eq
|
||||
description: Filter by an exact match.
|
||||
$ne:
|
||||
type: string
|
||||
title: $ne
|
||||
description: Filter by values not equal to this parameter.
|
||||
$in:
|
||||
type: array
|
||||
description: Filter by values in this array.
|
||||
items:
|
||||
type: string
|
||||
title: $in
|
||||
description: Filter by values in this array.
|
||||
$nin:
|
||||
type: array
|
||||
description: Filter by values not in this array.
|
||||
items:
|
||||
type: string
|
||||
title: $nin
|
||||
description: Filter by values not in this array.
|
||||
$not:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: $not
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
- type: object
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
- type: array
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $not
|
||||
description: >-
|
||||
Filter by values not matching the conditions in this
|
||||
parameter.
|
||||
$gt:
|
||||
type: string
|
||||
title: $gt
|
||||
description: >-
|
||||
Filter by values greater than this parameter. Useful for numbers
|
||||
and dates only.
|
||||
$gte:
|
||||
type: string
|
||||
title: $gte
|
||||
description: >-
|
||||
Filter by values greater than or equal to this parameter. Useful
|
||||
for numbers and dates only.
|
||||
$lt:
|
||||
type: string
|
||||
title: $lt
|
||||
description: >-
|
||||
Filter by values less than this parameter. Useful for numbers and
|
||||
dates only.
|
||||
$lte:
|
||||
type: string
|
||||
title: $lte
|
||||
description: >-
|
||||
Filter by values less than or equal to this parameter. Useful for
|
||||
numbers and dates only.
|
||||
$like:
|
||||
type: string
|
||||
title: $like
|
||||
description: Apply a `like` filter. Useful for strings only.
|
||||
$re:
|
||||
type: string
|
||||
title: $re
|
||||
description: Apply a regex filter. Useful for strings only.
|
||||
$ilike:
|
||||
type: string
|
||||
title: $ilike
|
||||
description: Apply a case-insensitive `like` filter. Useful for strings only.
|
||||
$fulltext:
|
||||
type: string
|
||||
title: $fulltext
|
||||
description: Filter to apply on full-text properties.
|
||||
$overlap:
|
||||
type: array
|
||||
description: Filter arrays that have overlapping values with this parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $overlap
|
||||
description: Filter arrays that have overlapping values with this parameter.
|
||||
$contains:
|
||||
type: array
|
||||
description: Filter arrays that contain some of the values of this parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $contains
|
||||
description: Filter arrays that contain some of the values of this parameter.
|
||||
$contained:
|
||||
type: array
|
||||
description: Filter arrays that contain all values of this parameter.
|
||||
items:
|
||||
type: string
|
||||
title: $contained
|
||||
description: Filter arrays that contain all values of this parameter.
|
||||
$exists:
|
||||
type: boolean
|
||||
title: $exists
|
||||
description: Filter by whether a value for this parameter exists (not `null`).
|
||||
- name: limit
|
||||
in: query
|
||||
description: Limit the number of items returned in the list.
|
||||
required: false
|
||||
schema:
|
||||
type: number
|
||||
title: limit
|
||||
description: Limit the number of items returned in the list.
|
||||
externalDocs:
|
||||
url: '#pagination'
|
||||
- name: offset
|
||||
in: query
|
||||
description: The number of items to skip when retrieving a list.
|
||||
required: false
|
||||
schema:
|
||||
type: number
|
||||
title: offset
|
||||
description: The number of items to skip when retrieving a list.
|
||||
externalDocs:
|
||||
url: '#pagination'
|
||||
- name: order
|
||||
in: query
|
||||
description: >-
|
||||
The field to sort the data by. By default, the sort order is ascending.
|
||||
To change the order to descending, prefix the field name with `-`.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: order
|
||||
description: >-
|
||||
The field to sort the data by. By default, the sort order is
|
||||
ascending. To change the order to descending, prefix the field name
|
||||
with `-`.
|
||||
externalDocs:
|
||||
url: '#pagination'
|
||||
- name: with_deleted
|
||||
in: query
|
||||
description: Whether to include deleted orders in the export.
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
title: with_deleted
|
||||
description: Whether to include deleted orders in the export.
|
||||
- name: fields
|
||||
in: query
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data. If
|
||||
a field is prefixed with `+` it will be added to the default fields,
|
||||
using `-` will remove it from the default fields. Without prefix it will
|
||||
replace the entire default fields.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: fields
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
If a field is prefixed with `+` it will be added to the default
|
||||
fields, using `-` will remove it from the default fields. Without
|
||||
prefix it will replace the entire default fields.
|
||||
externalDocs:
|
||||
url: '#select-fields-and-relations'
|
||||
- name: status
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: status
|
||||
description: The status of the orders to export.
|
||||
enum:
|
||||
- canceled
|
||||
- completed
|
||||
- pending
|
||||
- draft
|
||||
- archived
|
||||
- requires_action
|
||||
- type: array
|
||||
description: The statuses of the orders to export.
|
||||
items:
|
||||
type: string
|
||||
description: The order status.
|
||||
enum:
|
||||
- canceled
|
||||
- completed
|
||||
- pending
|
||||
- draft
|
||||
- archived
|
||||
- requires_action
|
||||
- type: object
|
||||
description: The order's status.
|
||||
properties:
|
||||
$and:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an AND condition. Each object's
|
||||
content is the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $and
|
||||
$or:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an OR condition. Each object's
|
||||
content is the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $or
|
||||
- name: $and
|
||||
in: query
|
||||
description: >-
|
||||
Join query parameters with an AND condition. Each object's content is
|
||||
the same type as the expected query parameters.
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an AND condition. Each object's content is
|
||||
the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $and
|
||||
- name: $or
|
||||
in: query
|
||||
description: >-
|
||||
Join query parameters with an OR condition. Each object's content is the
|
||||
same type as the expected query parameters.
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an OR condition. Each object's content is
|
||||
the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $or
|
||||
security:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS SDK
|
||||
source:
|
||||
$ref: ../code_samples/JavaScript/admin_orders_export/post.js
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/admin_orders_export/post.sh
|
||||
tags:
|
||||
- Orders
|
||||
responses:
|
||||
'202':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AdminExportOrderResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
x-workflow: exportOrdersWorkflow
|
||||
x-events: []
|
||||
x-since: 2.12.3
|
||||
@@ -0,0 +1,66 @@
|
||||
get:
|
||||
operationId: GetPriceListsIdPrices
|
||||
summary: List Prices in a Price List
|
||||
x-sidebar-summary: List Prices
|
||||
description: Retrieve a list of prices in a price list. The prices can also be paginated.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: The ID of the price list to retrieve prices from.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: fields
|
||||
in: query
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data. If
|
||||
a field is prefixed with `+` it will be added to the default fields,
|
||||
using `-` will remove it from the default fields. Without prefix it will
|
||||
replace the entire default fields.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: fields
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
If a field is prefixed with `+` it will be added to the default
|
||||
fields, using `-` will remove it from the default fields. Without
|
||||
prefix it will replace the entire default fields.
|
||||
externalDocs:
|
||||
url: '#select-fields-and-relations'
|
||||
security:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS SDK
|
||||
source:
|
||||
$ref: ../code_samples/JavaScript/admin_price-lists_{id}_prices/get.js
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/admin_price-lists_{id}_prices/get.sh
|
||||
tags:
|
||||
- Price Lists
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AdminPriceListPriceListResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
x-since: 2.12.3
|
||||
228
www/apps/api-reference/specs/admin/paths/admin_translations.yaml
Normal file
228
www/apps/api-reference/specs/admin/paths/admin_translations.yaml
Normal file
@@ -0,0 +1,228 @@
|
||||
get:
|
||||
operationId: GetTranslations
|
||||
summary: List Translations
|
||||
description: >-
|
||||
Retrieve a list of translations. The translations can be filtered by fields
|
||||
such as `reference_id` (For example, the ID of a product). The translations
|
||||
can also be sorted or paginated.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- name: q
|
||||
in: query
|
||||
description: Search query to filter translations by their fields.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: q
|
||||
description: Search query to filter translations by their fields.
|
||||
- name: reference_id
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: reference_id
|
||||
description: >-
|
||||
Filter translations by a reference ID. For example, the ID of a
|
||||
product.
|
||||
example: prod_123
|
||||
- type: array
|
||||
description: >-
|
||||
Filter translations by multiple reference IDs. For example, the
|
||||
IDs of products.
|
||||
items:
|
||||
type: string
|
||||
title: reference_id
|
||||
description: The reference ID's details. For example, the ID of a product.
|
||||
example: prod_123
|
||||
- name: reference
|
||||
in: query
|
||||
description: >-
|
||||
Filter translations by the resource they belong to. For example,
|
||||
`product` or `product_variant`.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: reference
|
||||
description: >-
|
||||
Filter translations by the resource they belong to. For example,
|
||||
`product` or `product_variant`.
|
||||
- name: locale_code
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: locale_code
|
||||
description: Filter translations by a locale code in BCP 47 format.
|
||||
example: fr-FR
|
||||
- type: array
|
||||
description: Filter translations by multiple locale codes in BCP 47 format.
|
||||
items:
|
||||
type: string
|
||||
title: locale_code
|
||||
description: A locale code in BCP 47 format.
|
||||
example: fr-FR
|
||||
- name: limit
|
||||
in: query
|
||||
description: Limit the number of items returned in the list.
|
||||
required: false
|
||||
schema:
|
||||
type: number
|
||||
title: limit
|
||||
description: Limit the number of items returned in the list.
|
||||
externalDocs:
|
||||
url: '#pagination'
|
||||
- name: offset
|
||||
in: query
|
||||
description: The number of items to skip when retrieving a list.
|
||||
required: false
|
||||
schema:
|
||||
type: number
|
||||
title: offset
|
||||
description: The number of items to skip when retrieving a list.
|
||||
externalDocs:
|
||||
url: '#pagination'
|
||||
- name: order
|
||||
in: query
|
||||
description: >-
|
||||
The field to sort the data by. By default, the sort order is ascending.
|
||||
To change the order to descending, prefix the field name with `-`.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: order
|
||||
description: >-
|
||||
The field to sort the data by. By default, the sort order is
|
||||
ascending. To change the order to descending, prefix the field name
|
||||
with `-`.
|
||||
externalDocs:
|
||||
url: '#pagination'
|
||||
- name: with_deleted
|
||||
in: query
|
||||
description: The translation's with deleted.
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
title: with_deleted
|
||||
description: The translation's with deleted.
|
||||
- name: fields
|
||||
in: query
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data. If
|
||||
a field is prefixed with `+` it will be added to the default fields,
|
||||
using `-` will remove it from the default fields. Without prefix it will
|
||||
replace the entire default fields.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: fields
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
If a field is prefixed with `+` it will be added to the default
|
||||
fields, using `-` will remove it from the default fields. Without
|
||||
prefix it will replace the entire default fields.
|
||||
externalDocs:
|
||||
url: '#select-fields-and-relations'
|
||||
- name: $and
|
||||
in: query
|
||||
description: >-
|
||||
Join query parameters with an AND condition. Each object's content is
|
||||
the same type as the expected query parameters.
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an AND condition. Each object's content is
|
||||
the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $and
|
||||
- name: $or
|
||||
in: query
|
||||
description: >-
|
||||
Join query parameters with an OR condition. Each object's content is the
|
||||
same type as the expected query parameters.
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an OR condition. Each object's content is
|
||||
the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $or
|
||||
security:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS SDK
|
||||
source:
|
||||
$ref: ../code_samples/JavaScript/admin_translations/get.js
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/admin_translations/get.sh
|
||||
tags:
|
||||
- Translations
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- type: object
|
||||
description: The list of translations with pagination.
|
||||
required:
|
||||
- limit
|
||||
- offset
|
||||
- count
|
||||
properties:
|
||||
limit:
|
||||
type: number
|
||||
title: limit
|
||||
description: The maximum number of translations returned.
|
||||
offset:
|
||||
type: number
|
||||
title: offset
|
||||
description: >-
|
||||
The number of translations skipped before retrieving the
|
||||
returned translations.
|
||||
count:
|
||||
type: number
|
||||
title: count
|
||||
description: The total number of translations matching the query.
|
||||
estimate_count:
|
||||
type: number
|
||||
title: estimate_count
|
||||
description: >-
|
||||
The estimated count retrieved from the PostgreSQL query
|
||||
planner, which may be inaccurate.
|
||||
x-featureFlag: index_engine
|
||||
- type: object
|
||||
description: SUMMARY
|
||||
required:
|
||||
- translations
|
||||
properties:
|
||||
translations:
|
||||
type: array
|
||||
description: The list of translations.
|
||||
items:
|
||||
$ref: ../components/schemas/AdminTranslation.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
x-since: 2.12.3
|
||||
x-featureFlag: translation
|
||||
@@ -0,0 +1,165 @@
|
||||
post:
|
||||
operationId: PostTranslationsBatch
|
||||
summary: Manage Translations
|
||||
description: >-
|
||||
Manage translations in bulk by creating, updating, or deleting multiple
|
||||
translations in a single request. You can manage translations for various
|
||||
resources such as products, product variants, categories, and more.
|
||||
x-authenticated: true
|
||||
security:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
description: The translations to be created, updated, or deleted in bulk.
|
||||
properties:
|
||||
create:
|
||||
type: array
|
||||
description: The translations to create.
|
||||
items:
|
||||
type: object
|
||||
description: The translation's details.
|
||||
required:
|
||||
- reference
|
||||
- reference_id
|
||||
- locale_code
|
||||
- translations
|
||||
properties:
|
||||
reference:
|
||||
type: string
|
||||
title: reference
|
||||
description: The resource that the translation belongs to.
|
||||
example: product
|
||||
reference_id:
|
||||
type: string
|
||||
title: reference_id
|
||||
description: >-
|
||||
The ID of the resource that the translation belongs to.
|
||||
For example, the ID of a product.
|
||||
example: prod_123
|
||||
locale_code:
|
||||
type: string
|
||||
title: locale_code
|
||||
description: The translation's locale code in BCP 47 format.
|
||||
example: fr-FR
|
||||
translations:
|
||||
type: object
|
||||
description: >-
|
||||
The translation key-value pairs. Each key is a field in
|
||||
the resource, and the value is the translated text.
|
||||
example:
|
||||
title: Chaussures
|
||||
description: Des chaussures élégantes.
|
||||
update:
|
||||
type: array
|
||||
description: The translations to update.
|
||||
items:
|
||||
type: object
|
||||
description: The data for updating a translation.
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
title: id
|
||||
description: The ID of the translation to update.
|
||||
reference:
|
||||
type: string
|
||||
title: reference
|
||||
description: The resource that the translation belongs to.
|
||||
example: product
|
||||
reference_id:
|
||||
type: string
|
||||
title: reference_id
|
||||
description: >-
|
||||
The ID of the resource that the translation belongs to.
|
||||
For example, the ID of a product.
|
||||
example: prod_123
|
||||
locale_code:
|
||||
type: string
|
||||
title: locale_code
|
||||
description: The translation's locale code in BCP 47 format.
|
||||
example: fr-FR
|
||||
translations:
|
||||
type: object
|
||||
description: >-
|
||||
The translation key-value pairs. Each key is a field in
|
||||
the resource, and the value is the translated text.
|
||||
example:
|
||||
title: Chaussures Modifiées
|
||||
description: Des chaussures élégantes et modifiées.
|
||||
delete:
|
||||
type: array
|
||||
description: The translations to delete.
|
||||
items:
|
||||
type: string
|
||||
title: delete
|
||||
description: The ID of a translation to delete.
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS SDK
|
||||
source:
|
||||
$ref: ../code_samples/JavaScript/admin_translations_batch/post.js
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/admin_translations_batch/post.sh
|
||||
tags:
|
||||
- Translations
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AdminTranslationsBatchResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
x-workflow: batchTranslationsWorkflow
|
||||
x-events:
|
||||
- name: translation.created
|
||||
payload: |-
|
||||
```ts
|
||||
{
|
||||
id, // The ID of the translation
|
||||
}
|
||||
```
|
||||
description: Emitted when translations are created.
|
||||
deprecated: false
|
||||
since: 2.12.3
|
||||
- name: translation.updated
|
||||
payload: |-
|
||||
```ts
|
||||
{
|
||||
id, // The ID of the translation
|
||||
}
|
||||
```
|
||||
description: Emitted when translations are updated.
|
||||
deprecated: false
|
||||
since: 2.12.3
|
||||
- name: translation.deleted
|
||||
payload: |-
|
||||
```ts
|
||||
{
|
||||
id, // The ID of the translation
|
||||
}
|
||||
```
|
||||
description: Emitted when translations are deleted.
|
||||
deprecated: false
|
||||
since: 2.12.3
|
||||
x-since: 2.12.3
|
||||
x-featureFlag: translation
|
||||
@@ -0,0 +1,54 @@
|
||||
get:
|
||||
operationId: GetTranslationsSettings
|
||||
summary: List Translation Settings
|
||||
x-sidebar-summary: List Settings
|
||||
description: >-
|
||||
Retrieve the list of translatable fields for all entities, such as products
|
||||
and collections.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- name: entity_type
|
||||
in: query
|
||||
description: The entity to retrieve translation settings for.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: entity_type
|
||||
description: The entity to retrieve translation settings for.
|
||||
example: product
|
||||
security:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS SDK
|
||||
source:
|
||||
$ref: ../code_samples/JavaScript/admin_translations_settings/get.js
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/admin_translations_settings/get.sh
|
||||
tags:
|
||||
- Translations
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AdminTranslationSettingsResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
x-since: 2.12.3
|
||||
x-featureFlag: translation
|
||||
@@ -0,0 +1,77 @@
|
||||
get:
|
||||
operationId: GetTranslationsStatistics
|
||||
summary: Retrieve Translation Statistics
|
||||
x-sidebar-summary: Get Statistics
|
||||
description: >-
|
||||
Get statistics on translations for specified locales and entity types. This
|
||||
includes overall translation progress for each entity type, and statistics
|
||||
for each locale within those entity types.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- name: locales
|
||||
in: query
|
||||
description: >-
|
||||
The locale codes to retrieve translation statistics for. Locale codes
|
||||
are in [BCP
|
||||
47](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1)
|
||||
format.
|
||||
required: true
|
||||
schema:
|
||||
type: array
|
||||
description: The locale codes to retrieve translation statistics for.
|
||||
items:
|
||||
type: string
|
||||
title: locales
|
||||
description: >-
|
||||
A locale code in [BCP
|
||||
47](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1)
|
||||
format.
|
||||
example: fr-FR
|
||||
- name: entity_types
|
||||
in: query
|
||||
description: The table names of entities to retrieve translation statistics for.
|
||||
required: true
|
||||
schema:
|
||||
type: array
|
||||
description: The table names of entities to retrieve translation statistics for.
|
||||
items:
|
||||
type: string
|
||||
title: entity_types
|
||||
description: The table name of an entity.
|
||||
example: products
|
||||
security:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS SDK
|
||||
source:
|
||||
$ref: ../code_samples/JavaScript/admin_translations_statistics/get.js
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/admin_translations_statistics/get.sh
|
||||
tags:
|
||||
- Translations
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AdminTranslationStatisticsResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
x-since: 2.12.3
|
||||
x-featureFlag: translation
|
||||
Reference in New Issue
Block a user