Skip to content

Commit b5969a7

Browse files
committed
CPM-724: Fix doc
1 parent 7940b1f commit b5969a7

File tree

6 files changed

+36
-14
lines changed

6 files changed

+36
-14
lines changed

content/files/Akeneo PIM API.postman_collection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3997,7 +3997,7 @@
39973997
{
39983998
"key": "with_attribute_options",
39993999
"value": "true",
4000-
"description": "(boolean ) • Return labels of attribute options in the response. (Only available since the 5.0 version).",
4000+
"description": "(boolean ) • Return labels of attribute options in the response.",
40014001
"disabled": true
40024002
},
40034003
{

content/swagger/akeneo-web-api.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

content/swagger/definitions.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,21 @@ ErrorByLine:
278278
message:
279279
type: string
280280
description: Message explaining the error
281+
ErrorByLineProductUuid:
282+
type: object
283+
properties:
284+
line:
285+
type: integer
286+
description: Line number
287+
uuid:
288+
type: string
289+
description: Product uuid
290+
status_code:
291+
type: integer
292+
description: HTTP status code, see <a href="/documentation/responses.html#client-errors">Client errors</a> to understand the meaning of each code
293+
message:
294+
type: string
295+
description: Message explaining the error
281296
ErrorByObject:
282297
type: array
283298
items:

content/swagger/resources/products_uuid/definitions/product_uuid.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,23 @@ example: {
159159
"groups": [],
160160
"parent": null,
161161
"values": {
162+
"sku": [
163+
{
164+
"data": "top",
165+
"locale": null,
166+
"scope": null
167+
}
168+
],
162169
"name": [
163170
{
164171
"data": "Top",
165172
"locale": "en_US",
166-
"scope": null,
173+
"scope": null
167174
},
168175
{
169176
"data": "Débardeur",
170177
"locale": "fr_FR",
171-
"scope": null,
178+
"scope": null
172179
}
173180
],
174181
"description": [

content/swagger/resources/products_uuid/routes/products_uuid.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ get:
55
- Product [uuid]
66
x-versions:
77
- "SaaS"
8-
description: This endpoint allows you to get a list of products. Products are paginated and they can be filtered. In the Enterprise Edition, since the 2.0, permissions based on your user groups are applied to the set of products you request.
8+
description: This endpoint allows you to get a list of products. Products are paginated and they can be filtered. In the Enterprise Edition, permissions based on your user groups are applied to the set of products you request.
99
parameters:
1010
- name: search
1111
in: query
@@ -70,7 +70,7 @@ post:
7070
- Product [uuid]
7171
x-versions:
7272
- "SaaS"
73-
description: This endpoint allows you to create a new product. In the Enterprise Edition, since the v2.0, permissions based on your user groups are applied to the product you try to create.
73+
description: This endpoint allows you to create a new product. In the Enterprise Edition, permissions based on your user groups are applied to the product you try to create. If no uuid is provided, the PIM will generate one for you.
7474
parameters:
7575
- name: body
7676
in: body
@@ -96,7 +96,7 @@ patch:
9696
- Product [uuid]
9797
x-versions:
9898
- "SaaS"
99-
description: This endpoint allows you to update and/or create several products at once. Learn more about <a href="/documentation/update.html#update-behavior">Update behavior</a>. Note that if no product exists for the given uuid, it creates it. In the Enterprise Edition, since the v2.0, permissions based on your user groups are applied to the products you try to update. It may result in the creation of drafts if you only have edit rights through the product's categories.
99+
description: This endpoint allows you to update and/or create several products at once. Learn more about <a href="/documentation/update.html#update-behavior">Update behavior</a>. Note that if no product exists for the given uuid, it creates it. In the Enterprise Edition, permissions based on your user groups are applied to the products you try to update. It may result in the creation of drafts if you only have edit rights through the product's categories.
100100
x-body-by-line: Contains several lines, each line is a product in JSON standard format
101101
parameters:
102102
- name: body
@@ -105,18 +105,18 @@ patch:
105105
$ref: "#/definitions/ProductUuid"
106106
x-examples:
107107
x-example-1:
108-
'{"uuid":"fc24e6c3-933c-4a93-8a81-e5c703d134d5","values":{"sku":[{"data":"cap","locale":null,"scope":null}],"description":[{"scope":"ecommerce","locale":"en_US","data":"My amazing cap"}]}}'
108+
'{"uuid":"fc24e6c3-933c-4a93-8a81-e5c703d134d5","values":{"description":[{"scope":"ecommerce","locale":"en_US","data":"My amazing cap"}]}}'
109109
x-example-2:
110-
'{"uuid":"573dd613-0c7f-4143-83d5-63cc5e535966","values":{"sku":[{"data":"mug","locale":null,"scope":null}]}, "group":["promotion"]}'
110+
'{"uuid":"573dd613-0c7f-4143-83d5-63cc5e535966","values":{"sku":[{"data":"updated_sku","locale":null,"scope":null}]}, "group":["promotion"]}'
111111
x-example-3:
112-
'{"uuid":"2d9e205c-78c9-495a-831c-e1a10531eeb1","values":{"sku":[{"data":"tshirt","locale":null,"scope":null}]},"family":"clothes"}'
112+
'{"values":{"sku":[{"data":"new_product","locale":null,"scope":null}]},"family":"clothes"}'
113113
responses:
114114
200:
115115
description: OK
116116
x-details: Returns a plain text response whose lines are JSON containing the status of each update or creation
117117
x-no-entity: true
118118
schema:
119-
$ref: "#/definitions/ErrorByLine"
119+
$ref: "#/definitions/ErrorByLineProductUuid"
120120
examples:
121121
x-example-1:
122122
'{"line":1,"uuid":"fc24e6c3-933c-4a93-8a81-e5c703d134d5","status_code":204}'

content/swagger/resources/products_uuid/routes/products_uuid_uuid.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ get:
55
- Product [uuid]
66
x-versions:
77
- "SaaS"
8-
description: This endpoint allows you to get the information about a given product. In the Entreprise Edition, since the v2.0, permissions based on your user groups are applied to the product you request.
8+
description: This endpoint allows you to get the information about a given product. In the Entreprise Edition, permissions based on your user groups are applied to the product you request.
99
parameters:
1010
- $ref: '#/parameters/uuid'
1111
- $ref: '#/parameters/with_attribute_options'
@@ -32,7 +32,7 @@ patch:
3232
- Product [uuid]
3333
x-versions:
3434
- "SaaS"
35-
description: This endpoint allows you to update a given product. Learn more about <a href="/documentation/update.html#update-behavior">Update behavior</a>. Note that if no product exists for the given uuid, it creates it. In the Entreprise Edition, since the v2.0, permissions based on your user groups are applied to the product you try to update. It may result in the creation of a draft if you only have edit rights through the product's categories.
35+
description: This endpoint allows you to update a given product. Learn more about <a href="/documentation/update.html#update-behavior">Update behavior</a>. Note that if no product exists for the given uuid, it creates it. In the Entreprise Edition, permissions based on your user groups are applied to the product you try to update. It may result in the creation of a draft if you only have edit rights through the product's categories.
3636
parameters:
3737
- $ref: '#/parameters/uuid'
3838
- name: body
@@ -60,7 +60,7 @@ delete:
6060
- Product [uuid]
6161
x-versions:
6262
- "SaaS"
63-
description: This endpoint allows you to delete a given product. In the Enterprise Edition, since the 2.0, permissions based on your user groups are applied to the product you try to delete.
63+
description: This endpoint allows you to delete a given product. In the Enterprise Edition, permissions based on your user groups are applied to the product you try to delete.
6464
parameters:
6565
- $ref: '#/parameters/uuid'
6666
responses:

0 commit comments

Comments
 (0)