Skip to content

Commit b0ece35

Browse files
committed
CPM-724: Update route in doc and add postman
1 parent eb0db85 commit b0ece35

File tree

9 files changed

+535
-48
lines changed

9 files changed

+535
-48
lines changed

content/files/Akeneo PIM API.postman_collection.json

Lines changed: 487 additions & 0 deletions
Large diffs are not rendered by default.

content/getting-started/synchronize-pim-products-6x/step-4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Have a look at our [product filters](https://api.akeneo.com/documentation/filter
2626

2727
So, what does our API call on products look like?
2828

29-
`GET /api/rest/v1/products?locales=locales&scope=your_channel_code&with_attribute_options=true&search={"family":[{"operator":"IN","value":family_code_list}],"enabled"[{"operator":"=","value":true}]}`
29+
`GET /api/rest/v1/products-uuid?locales=locales&scope=your_channel_code&with_attribute_options=true&search={"family":[{"operator":"IN","value":family_code_list}],"enabled"[{"operator":"=","value":true}]}`
3030

3131
Details of this call are [here](https://api.akeneo.com/api-reference.html#get_products).
3232

content/rest-api/filter.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ When requesting a list of resources via the REST API, you can apply filters to g
77
To filter products by one of its properties, you can use the `search` query parameter. The value given to this query parameter should be a valid JSON as shown below.
88

99
```
10-
/api/rest/v1/products?search={PRODUCT_PROPERTY:[{"operator":OPERATOR,"value":VALUE}]}
10+
/api/rest/v1/products-uuid?search={PRODUCT_PROPERTY:[{"operator":OPERATOR,"value":VALUE}]}
1111
```
1212

1313
In the above url :
@@ -21,19 +21,19 @@ In the above url :
2121
To only retrieve enabled products, you can use the following URL.
2222

2323
```
24-
/api/rest/v1/products?search={"enabled":[{"operator":"=","value":true}]}
24+
/api/rest/v1/products-uuid?search={"enabled":[{"operator":"=","value":true}]}
2525
```
2626

2727
Of course, you can combine as many filters as you want. The example below will get you the enabled products being 70% complete.
2828

2929
```
30-
/api/rest/v1/products?search={"enabled":[{"operator":"=","value":true}],"completeness":[{"operator":">","value":70,"scope":"ecommerce"}]}
30+
/api/rest/v1/products-uuid?search={"enabled":[{"operator":"=","value":true}],"completeness":[{"operator":">","value":70,"scope":"ecommerce"}]}
3131
```
3232

3333
You can even combine several filters on the same product properties. The example below will get you the products categorized on the Winter Collection category and that are not categorized on the Accessories category.
3434

3535
```
36-
/api/rest/v1/products?search={"categories":[{"operator":"IN","value":["winter_collection"]},{"operator":"NOT IN","value":["accessories"]}]}
36+
/api/rest/v1/products-uuid?search={"categories":[{"operator":"IN","value":["winter_collection"]},{"operator":"NOT IN","value":["accessories"]}]}
3737
```
3838

3939
### On their categories
@@ -57,7 +57,7 @@ Here are the allowed operators you can use to filter on the category code as wel
5757
To get the products of the `winter_collection` category, you can use the following URL.
5858

5959
```
60-
/api/rest/v1/products?search={"categories":[{"operator":"IN","value":["winter_collection"]}]}
60+
/api/rest/v1/products-uuid?search={"categories":[{"operator":"IN","value":["winter_collection"]}]}
6161
```
6262

6363
### On their status
@@ -77,7 +77,7 @@ Here are the allowed operators you can use to filter on the status as well as th
7777
To get the disabled products, you can use the following URL.
7878

7979
```
80-
/api/rest/v1/products?search={"enabled":[{"operator":"=","value":false}]}
80+
/api/rest/v1/products-uuid?search={"enabled":[{"operator":"=","value":false}]}
8181
```
8282

8383
### On their completeness
@@ -101,13 +101,13 @@ Here are the allowed operators you can use to filter by completeness as well as
101101
To get the products that are 100% complete for the `ecommerce` channel, you can use the following URL.
102102

103103
```
104-
/api/rest/v1/products?search={"completeness":[{"operator":"=","value":100,"scope":"ecommerce"}]}
104+
/api/rest/v1/products-uuid?search={"completeness":[{"operator":"=","value":100,"scope":"ecommerce"}]}
105105
```
106106

107107
To get the products that are 100% complete on both the `en_US` and `fr_FR` locales for the `ecommerce` channel, you can use the following URL.
108108

109109
```
110-
/api/rest/v1/products?search={"completeness":[{"operator":"GREATER OR EQUALS THAN ON ALL LOCALES","value":100,"locales":["en_US","fr_FR"],"scope":"ecommerce"}]}
110+
/api/rest/v1/products-uuid?search={"completeness":[{"operator":"GREATER OR EQUALS THAN ON ALL LOCALES","value":100,"locales":["en_US","fr_FR"],"scope":"ecommerce"}]}
111111
```
112112

113113
### On their group or family
@@ -129,13 +129,13 @@ Here are the allowed operators you can use to filter on these properties as well
129129
To get the products that are in the `promotion` group, you can use the following URL.
130130

131131
```
132-
/api/rest/v1/products?search={"groups":[{"operator":"IN","value":["promotion"]}]}
132+
/api/rest/v1/products-uuid?search={"groups":[{"operator":"IN","value":["promotion"]}]}
133133
```
134134

135135
To get the products that are not in the `camcorders` and `digital_cameras` family, you can use the following URL.
136136

137137
```
138-
/api/rest/v1/products?search={"family":[{"operator":"NOT IN","value":["camcorders","digital_cameras"]}]}
138+
/api/rest/v1/products-uuid?search={"family":[{"operator":"NOT IN","value":["camcorders","digital_cameras"]}]}
139139
```
140140

141141
### On their creation or update date
@@ -167,13 +167,13 @@ Please also note that product variants, with an older updated date than the filt
167167
To get the products that were created on the 4th of July 2016 at 10am, you can use the following URL.
168168

169169
```
170-
/api/rest/v1/products?search={"created":[{"operator":"=","value":"2016-07-04 10:00:00"}]}
170+
/api/rest/v1/products-uuid?search={"created":[{"operator":"=","value":"2016-07-04 10:00:00"}]}
171171
```
172172

173173
To get the products that were updated during the last 4 days, you can use the following URL.
174174

175175
```
176-
/api/rest/v1/products?search={"updated":[{"operator":"SINCE LAST N DAYS","value":4}]}
176+
/api/rest/v1/products-uuid?search={"updated":[{"operator":"SINCE LAST N DAYS","value":4}]}
177177
```
178178

179179
### On their parent
@@ -199,25 +199,25 @@ The `IN`, `EMPTY` and `NOT EMPTY` operators are only available for SaaS customer
199199
To get all the variant products of the `apollon` root product model without having to filter on all its sub-product models, you can use the following URL.
200200

201201
```
202-
/api/rest/v1/products?search={"parent":[{"operator":"=","value":"apollon"}]}
202+
/api/rest/v1/products-uuid?search={"parent":[{"operator":"=","value":"apollon"}]}
203203
```
204204

205205
To get all the variant products of the sub product models with the codes `tshirt_armor_blue` and `tshirt_armor_red`, you can use the following URL.
206206

207207
```
208-
/api/rest/v1/products?search={"parent":[{"operator":"IN","value":["tshirt_armor_blue","tshirt_armor_red"]}]}
208+
/api/rest/v1/products-uuid?search={"parent":[{"operator":"IN","value":["tshirt_armor_blue","tshirt_armor_red"]}]}
209209
```
210210

211211
To get all the variant products, you can use the following URL.
212212

213213
```
214-
/api/rest/v1/products?search={"parent":[{"operator":"NOT EMPTY"}]}
214+
/api/rest/v1/products-uuid?search={"parent":[{"operator":"NOT EMPTY"}]}
215215
```
216216

217217
To get all the simple products, you can use the following URL.
218218

219219
```
220-
/api/rest/v1/products?search={"parent":[{"operator":"EMPTY"}]}
220+
/api/rest/v1/products-uuid?search={"parent":[{"operator":"EMPTY"}]}
221221
```
222222

223223
### On their quality score
@@ -232,13 +232,13 @@ This filter accepts one operator: IN. It expects one or several scores, given as
232232
To get the products with a "D" for the `ecommerce` channel and `en_US` locale, you can use the following URL.
233233

234234
```
235-
/api/rest/v1/products?search={"quality_score":[{"operator":"IN","value":["D"],"scope":"ecommerce","locale":"en_US"}]}
235+
/api/rest/v1/products-uuid?search={"quality_score":[{"operator":"IN","value":["D"],"scope":"ecommerce","locale":"en_US"}]}
236236
```
237237

238238
To get the products with an "A" or "B" for the `mobile` channel and `en_GB` locale, you can use the following URL.
239239

240240
```
241-
/api/rest/v1/products?search={"quality_score":[{"operator":"IN","value":["A","B"],"scope":"mobile","locale":"en_GB"}]}
241+
/api/rest/v1/products-uuid?search={"quality_score":[{"operator":"IN","value":["A","B"],"scope":"mobile","locale":"en_GB"}]}
242242
```
243243

244244
## Filter on product model properties
@@ -432,7 +432,7 @@ To get all the sub-product models, you can use the following URL.
432432
To filter products, and product models **since the v2.3**, on its [product values](/concepts/products.html#focus-on-the-product-values), you can use the `search` query parameter when requesting products. The value given to this query parameter should be a valid JSON as shown below.
433433

434434
```
435-
/api/rest/v1/products?search={ATTRIBUTE_CODE:[{"operator":OPERATOR,"value":VALUE,"locale":LOCALE_CODE,"scope":CHANNEL_CODE}]}
435+
/api/rest/v1/products-uuid?search={ATTRIBUTE_CODE:[{"operator":OPERATOR,"value":VALUE,"locale":LOCALE_CODE,"scope":CHANNEL_CODE}]}
436436
```
437437

438438
In the above url :
@@ -448,37 +448,37 @@ In the above url :
448448
To get products that are purple, purple being an option of the simple select `main_color` attribute and this attribute being neither localizable nor scopable, you can use the following URL.
449449

450450
```
451-
/api/rest/v1/products?search={"main_color":[{"operator":"IN","value":["purple"]}]}
451+
/api/rest/v1/products-uuid?search={"main_color":[{"operator":"IN","value":["purple"]}]}
452452
```
453453

454454
To get products having a description begining with `Amazing` on the `en_US` locale, the `short_description` attribute being localizable but not scopable, you can use the following URL.
455455

456456
```
457-
/api/rest/v1/products?search={"short_description":[{"operator":"STARTS WITH","value":"Amazing","locale":"en_US"}]}
457+
/api/rest/v1/products-uuid?search={"short_description":[{"operator":"STARTS WITH","value":"Amazing","locale":"en_US"}]}
458458
```
459459

460460
To get products that have a release date due after the 4th of July 2016 for the `ecommerce` channel, the `release_date` attribute being scopable but not localizable, you can use the following URL.
461461

462462
```
463-
/api/rest/v1/products?search={"release_date":[{"operator":">","value":"2016-07-04","scope":"ecommerce"}]}
463+
/api/rest/v1/products-uuid?search={"release_date":[{"operator":">","value":"2016-07-04","scope":"ecommerce"}]}
464464
```
465465

466466
To get products that have a name that contains with `shirt` on the `en_US` locale for the `mobile` channel, the `name` attribute being both localizable and scopable, you can use the following URL.
467467

468468
```
469-
/api/rest/v1/products?search={"name":[{"operator":"CONTAINS","value":"shirt","locale":"en_US","scope":"mobile"}]}
469+
/api/rest/v1/products-uuid?search={"name":[{"operator":"CONTAINS","value":"shirt","locale":"en_US","scope":"mobile"}]}
470470
```
471471

472472
Of course, you can combine as many filters as you want. The example below will get you the products with description starting with `Amazing` on the `en_US` locale for the `ecommerce` channel, and of purple color.
473473

474474
```
475-
/api/rest/v1/products?search={"description":[{"operator":"STARTS WITH","value":"Amazing","locale":"en_US","scope":"ecommerce"}],"main_color":[{"operator":"IN","value":["purple"]}]}
475+
/api/rest/v1/products-uuid?search={"description":[{"operator":"STARTS WITH","value":"Amazing","locale":"en_US","scope":"ecommerce"}],"main_color":[{"operator":"IN","value":["purple"]}]}
476476
```
477477

478478
You can even combine several filters on the same attribute. The example below will get you the products with not empty description on the `en_US` locale and empty description on the `fr_FR` locale for the `ecommerce` channel.
479479

480480
```
481-
/api/rest/v1/products?search={"description":[{"operator":"NOT EMPTY","locale":"en_US","scope":"ecommerce"},{"operator":"EMPTY","locale":"fr_FR","scope":"ecommerce"}]}
481+
/api/rest/v1/products-uuid?search={"description":[{"operator":"NOT EMPTY","locale":"en_US","scope":"ecommerce"},{"operator":"EMPTY","locale":"fr_FR","scope":"ecommerce"}]}
482482
```
483483

484484
:::info
@@ -493,11 +493,11 @@ If you need to filter on several attributes on the same locale, you can use the
493493
#### Example
494494

495495
```
496-
/api/rest/v1/products?search={"description":[{"operator":"STARTS WITH","value":"Amazing","locale":"en_US","scope":"ecommerce"}],"short_description":[{"operator":"CONTAINS","value":"shoes","locale":"en_US","scope":"ecommerce"}]}
496+
/api/rest/v1/products-uuid?search={"description":[{"operator":"STARTS WITH","value":"Amazing","locale":"en_US","scope":"ecommerce"}],"short_description":[{"operator":"CONTAINS","value":"shoes","locale":"en_US","scope":"ecommerce"}]}
497497
498498
is equivalent to
499499
500-
/api/rest/v1/products?search={"description":[{"operator":"STARTS WITH","value":"Amazing","scope":"ecommerce"}],"short_description":[{"operator":"CONTAINS","value":"shoes","scope":"ecommerce"}]}&search_locale=en_US
500+
/api/rest/v1/products-uuid?search={"description":[{"operator":"STARTS WITH","value":"Amazing","scope":"ecommerce"}],"short_description":[{"operator":"CONTAINS","value":"shoes","scope":"ecommerce"}]}&search_locale=en_US
501501
```
502502

503503
:::info
@@ -512,11 +512,11 @@ If you need to filter on several attributes on the same channel, you can use the
512512
#### Example
513513

514514
```
515-
/api/rest/v1/products?search={"release_date":[{"operator":">","value":"2016-07-04","scope":"ecommerce"}],"short_description":[{"operator":"CONTAINS","value":"shoes","locale":"en_US","scope":"ecommerce"}]}
515+
/api/rest/v1/products-uuid?search={"release_date":[{"operator":">","value":"2016-07-04","scope":"ecommerce"}],"short_description":[{"operator":"CONTAINS","value":"shoes","locale":"en_US","scope":"ecommerce"}]}
516516
517517
is equivalent to
518518
519-
/api/rest/v1/products?search={"release_date":[{"operator":">","value":"2016-07-04"}],"short_description":[{"operator":"CONTAINS","value":"shoes","locale":"en_US"}]}&search_scope=ecommerce
519+
/api/rest/v1/products-uuid?search={"release_date":[{"operator":">","value":"2016-07-04"}],"short_description":[{"operator":"CONTAINS","value":"shoes","locale":"en_US"}]}&search_scope=ecommerce
520520
```
521521

522522
:::info
@@ -615,13 +615,13 @@ If you want to receive for each product only product values about specific attri
615615
To get products with only product values regarding the `description` attribute, you can use the following URL.
616616

617617
```
618-
/api/rest/v1/products?attributes=description
618+
/api/rest/v1/products-uuid?attributes=description
619619
```
620620

621621
You can filter product values on several attributes at the same time.
622622

623623
```
624-
/api/rest/v1/products?attributes=name,description
624+
/api/rest/v1/products-uuid?attributes=name,description
625625
```
626626

627627
### Via locale
@@ -683,7 +683,7 @@ Imagine that without this filter you get these product values:
683683
To get only product values regarding the `en_US` locale (+ the product values of the non localizable attributes), you can use the following URL.
684684

685685
```
686-
/api/rest/v1/products?locales=en_US
686+
/api/rest/v1/products-uuid?locales=en_US
687687
```
688688

689689
As a result you will receive the following answer:
@@ -729,7 +729,7 @@ If you want to get the localized label of this attribute option, you will have t
729729
You can also filter product values on several locales at the same time.
730730

731731
```
732-
/api/rest/v1/products?locales=en_US,fr_FR
732+
/api/rest/v1/products-uuid?locales=en_US,fr_FR
733733
```
734734

735735
### Via channel
@@ -746,7 +746,7 @@ There is also a `scope` query parameter that will allow you to:
746746
To get products from the tree linked to the `ecommerce` channel with only product values regarding the `ecommerce` channel (+ the product values of the non scopable attributes), you can use the following URL.
747747

748748
```
749-
/api/rest/v1/products?scope=ecommerce
749+
/api/rest/v1/products-uuid?scope=ecommerce
750750
```
751751

752752
:::warning

content/rest-api/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ HTTP/1.1 200 OK
137137
"methods": ["PATCH"]
138138
},
139139
"pim_api_product_delete": {
140-
"route": "/api/rest/v1/products/{code}",
140+
"route": "/api/rest/v1/products-uuid/{uuid}",
141141
"methods": ["DELETE"]
142142
}
143143
}

content/rest-api/pagination.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ For the reference entities and their records, and reference entity attribute opt
6565
### Example
6666
#### Request
6767
``` bash
68-
curl -X GET /api/rest/v1/products?pagination_type=search_after&search_after=qaXbcde&limit=20
68+
curl -X GET /api/rest/v1/products-uuid?pagination_type=search_after&search_after=qaXbcde&limit=20
6969
```
7070

7171
This request returns the 20 products situated after the `qaXbcde` cursor.
@@ -79,13 +79,13 @@ HTTP/1.1 200 OK
7979
{
8080
"_links": {
8181
"self": {
82-
"href": "https://demo.akeneo.com/api/rest/v1/products?pagination_type=search_after&search_after=qaXbcde&limit=20"
82+
"href": "https://demo.akeneo.com/api/rest/v1/products-uuid?pagination_type=search_after&search_after=qaXbcde&limit=20"
8383
},
8484
"first": {
85-
"href": "https://demo.akeneo.com/api/rest/v1/products?pagination_type=search_after&limit=20"
85+
"href": "https://demo.akeneo.com/api/rest/v1/products-uuid?pagination_type=search_after&limit=20"
8686
},
8787
"next": {
88-
"href": "https://demo.akeneo.com/api/rest/v1/products?pagination_type=search_after&search_after=qaXbcdedsfeF&limit=20"
88+
"href": "https://demo.akeneo.com/api/rest/v1/products-uuid?pagination_type=search_after&search_after=qaXbcdedsfeF&limit=20"
8989
}
9090
},
9191
"_embedded": {
@@ -156,10 +156,10 @@ HTTP/1.1 200 OK
156156
This is the default method used for pagination on the products. So, in fact, you do not need to specify the `pagination_type` query parameter when requesting on products.
157157
``` bash
158158
// This request
159-
curl -X GET /api/rest/v1/products?pagination_type=page
159+
curl -X GET /api/rest/v1/products-uuid?pagination_type=page
160160

161161
// is equal to this request
162-
curl -X GET /api/rest/v1/products
162+
curl -X GET /api/rest/v1/products-uuid
163163
```
164164
:::
165165

content/rest-api/responses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ HTTP/1.1 405 Method Not Allowed
116116
117117
{
118118
"code": 405,
119-
"message": "No route found for 'POST /api/rest/v1/products/myproduct': Method Not Allowed (Allow: GET, PATCH, DELETE)"
119+
"message": "No route found for 'POST /api/rest/v1/products-uuid/f62190e8-8314-4360-8ff8-7dbdb4af6312': Method Not Allowed (Allow: GET, PATCH, DELETE)"
120120
}
121121
```
122122

content/swagger/paths.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
$ref: ./resources/products_uuid/routes/products_uuid.yaml
1212
/api/rest/v1/products-uuid/{uuid}:
1313
$ref: ./resources/products_uuid/routes/products_uuid_uuid.yaml
14-
/api/rest/v1/products-uuid/{code}/proposal:
14+
/api/rest/v1/products-uuid/{uuid}/proposal:
1515
$ref: ./resources/products_uuid/routes/products_uuid_uuid_proposal.yaml
16-
/api/rest/v1/products-uuid/{code}/draft:
16+
/api/rest/v1/products-uuid/{uuid}/draft:
1717
$ref: ./resources/products_uuid/routes/products_uuid_uuid_draft.yaml
1818

1919
/api/rest/v1/product-models:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ get:
88
x-ee: true
99
description: This endpoint allows you to get the information about a given draft.
1010
parameters:
11-
- $ref: '#/parameters/code'
11+
- $ref: '#/parameters/uuid'
1212
responses:
1313
200:
1414
description: OK
1515
x-details: Returns the content of the draft in JSON standard format
1616
schema:
17-
$ref: '#/definitions/Product'
17+
$ref: '#/definitions/ProductUuid'
1818
401:
1919
$ref: "#/responses/401Error"
2020
403:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ post:
88
x-ee: true
99
description: This endpoint allows you to submit a draft for approval.
1010
parameters:
11-
- $ref: '#/parameters/code'
11+
- $ref: '#/parameters/uuid'
1212
responses:
1313
201:
1414
$ref: "#/responses/Submitted"

0 commit comments

Comments
 (0)