Skip to content

Commit 8483987

Browse files
committed
Updated API from documentation release
1 parent 169d29c commit 8483987

26 files changed

+1237
-490
lines changed

api-specs/api/types/common/Asset.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ properties:
66
id:
77
type: string
88
description: |
9-
Unique identifier of the Asset.
9+
Unique identifier of the Asset. Not required when importing Assets using the [Import API](/import-export/import-resources).
1010
sources:
1111
type: AssetSource[]
1212
minItems: 1

api-specs/import/api.raml

Lines changed: 88 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ uses:
6363
custom-field: types/custom-field.raml
6464
common: types/common.raml
6565
discount-code-import: types/discount-code-import.raml
66+
product-selection-import: types/product-selection-import.raml
6667

6768
resourceTypes:
6869
base:
@@ -156,18 +157,25 @@ traits:
156157
scopes:
157158
- manage_discount_codes:{projectKey}
158159
- view_discount_codes:{projectKey}
160+
secured_by_manage_product_selections:
161+
securedBy:
162+
- oauth_2_0:
163+
scopes:
164+
- manage_product_selections:{projectKey}
165+
- view_product_selections:{projectKey}
159166

160167
/{projectKey}:
161168
displayName: Project
162169
uriParameters:
163170
projectKey:
164-
description: The Project key.
171+
description: |
172+
`key` of the [Project](ctp:api:type:Project).
165173
type: string
166174
/import-containers:
167175
post:
168-
displayName: Create a new Import Container.
176+
displayName: Creates an Import Container in the Project.
169177
description: |
170-
Creates a new Import Container.
178+
Creates an Import Container in the Project.
171179
172180
Generates the [ImportContainerCreated](/projects/events#import-container-created-event) Event.
173181
is:
@@ -205,7 +213,7 @@ traits:
205213
description: |
206214
See [Sorting](/../api/general-concepts#sorting).
207215
type: string[]
208-
description: Retrieves all Import Containers of a given project key.
216+
description: Retrieves all ImportContainers in the Project.
209217
is:
210218
- secured_by_view_import_containers
211219
responses:
@@ -218,18 +226,19 @@ traits:
218226
uriParameters:
219227
importContainerKey:
220228
(postman.paramName): import-container-key
221-
description: The key of the Import Container.
229+
description: |
230+
`key` of the [ImportContainer](ctp:import:type:ImportContainer).
222231
type: string
223232
put:
224-
description: Updates the Import Container given by the key.
233+
description: Updates an [ImportContainer](ctp:import:type:ImportContainer) in the Project.
225234
is:
226235
- secured_by_manage_import_containers
227236
body:
228237
type: import-container.ImportContainerUpdateDraft
229238
example: !include examples/import-container-update-draft-minimal.json
230239
responses:
231240
200:
232-
description: The Import Container was successfully updated.
241+
description: The [ImportContainer](ctp:import:type:ImportContainer) was successfully updated.
233242
body:
234243
type: import-container.ImportContainer
235244
example: !include examples/import-container-updated.json
@@ -241,7 +250,7 @@ traits:
241250
type: error.ErrorResponse
242251
example: !include examples/error-response-concurrent-modification.json
243252
get:
244-
description: Retrieves the Import Container given by the key.
253+
description: Retrieves an [ImportContainer](ctp:import:type:ImportContainer) with the provided `importContainerKey`.
245254
is:
246255
- secured_by_view_import_containers
247256
responses:
@@ -258,7 +267,7 @@ traits:
258267
delete:
259268
displayName: Delete an Import Container.
260269
description: |
261-
Deletes the Import Container specified by the `importContainerKey`.
270+
Deletes an Import Container in the Project.
262271
263272
Generates the [ImportContainerDeleted](/projects/events#import-container-deleted-event) Event.
264273
is:
@@ -279,7 +288,7 @@ traits:
279288
is:
280289
- secured_by_view_import_containers
281290
description: |
282-
Retrieves an [ImportSummary](ctp:import:type:ImportSummary) for the given Import Container. An [ImportSummary](ctp:import:type:ImportSummary) is calculated on demand.
291+
Retrieves an [ImportSummary](ctp:import:type:ImportSummary) for the [ImportContainer](ctp:import:type:ImportContainer) with the provided `importContainerKey`.
283292
responses:
284293
200:
285294
body:
@@ -289,7 +298,7 @@ traits:
289298
type: base
290299
get:
291300
description: |
292-
Retrieves all [ImportOperations](ctp:import:type:ImportOperation) of a given ImportContainer key.
301+
Retrieves all ImportOperations within an [ImportContainer](ctp:import:type:ImportContainer).
293302
is:
294303
- secured_by_view_import_containers
295304
queryParameters:
@@ -314,11 +323,11 @@ traits:
314323
type: string[]
315324
resourceKey?:
316325
description: |
317-
The key of the ImportOperation to retrieve.
326+
`key` of the ImportOperation to retrieve.
318327
type: string
319328
state?:
320329
description: |
321-
The state of the ImportOperations to retrieve.
330+
`state` of the ImportOperations to retrieve.
322331
type: common.ProcessingState
323332
debug?:
324333
description: |
@@ -336,11 +345,11 @@ traits:
336345
uriParameters:
337346
id:
338347
description: |
339-
The operation identifier
348+
`id` of the [ImportOperation](ctp:import:type:ImportOperation).
340349
type: string
341350
get:
342351
description: |
343-
Retrieves the [ImportOperation](ctp:import:type:ImportOperation) of a given ID.
352+
Retrieves an ImportOperation with the provided `id`.
344353
is:
345354
- secured_by_view_import_containers
346355
responses:
@@ -361,11 +370,11 @@ traits:
361370
uriParameters:
362371
importContainerKey:
363372
(postman.paramName): import-container-key
364-
description: The ImportContainer used to create the new resource
373+
description: |
374+
`key` of the [ImportContainer](ctp:import:type:ImportContainer) to send this ImportRequest.
365375
type: string
366376
post:
367-
description: Creates a request for creating new Categories or updating
368-
existing ones.
377+
description: Creates an Import Request for Categories.
369378
is:
370379
- secured_by_manage_products
371380
body:
@@ -387,12 +396,11 @@ traits:
387396
uriParameters:
388397
importContainerKey:
389398
(postman.paramName): import-container-key
390-
description: The ImportContainer used to create the new resource
399+
description: |
400+
`key` of the [ImportContainer](ctp:import:type:ImportContainer) to send this ImportRequest.
391401
type: string
392402
post:
393-
description:
394-
Creates a request for creating new Prices or updating existing
395-
ones.
403+
description: Creates an Import Request for Prices.
396404
is:
397405
- secured_by_manage_products
398406
body:
@@ -414,12 +422,11 @@ traits:
414422
uriParameters:
415423
importContainerKey:
416424
(postman.paramName): import-container-key
417-
description: The ImportContainer used to create the new resource
425+
description: |
426+
`key` of the [ImportContainer](ctp:import:type:ImportContainer) to send this ImportRequest.
418427
type: string
419428
post:
420-
description:
421-
Creates a request for creating new Standalone Prices or updating existing
422-
ones.
429+
description: Creates an Import Request for Standalone Prices.
423430
is:
424431
- secured_by_manage_standalone_prices
425432
body:
@@ -441,12 +448,11 @@ traits:
441448
uriParameters:
442449
importContainerKey:
443450
(postman.paramName): import-container-key
444-
description: The ImportContainer used to create the new resource
451+
description: |
452+
`key` of the [ImportContainer](ctp:import:type:ImportContainer) to send this ImportRequest.
445453
type: string
446454
post:
447-
description:
448-
Creates a request for creating new Products or updating existing
449-
ones.
455+
description: Creates an Import Request for Products.
450456
is:
451457
- secured_by_manage_products
452458
body:
@@ -473,7 +479,7 @@ traits:
473479
type: string
474480
post:
475481
description: |
476-
Creates a request for creating new ProductDrafts or updating existing ones.
482+
Creates an Import Request for Products.
477483
is:
478484
- secured_by_manage_products
479485
body:
@@ -495,12 +501,11 @@ traits:
495501
uriParameters:
496502
importContainerKey:
497503
(postman.paramName): import-container-key
498-
description: The ImportContainer used to create the new resource
504+
description: |
505+
`key` of the [ImportContainer](ctp:import:type:ImportContainer) to send this ImportRequest.
499506
type: string
500507
post:
501-
description:
502-
Creates a request for creating new ProductTypes or updating
503-
existing ones.
508+
description: Creates an Import Request for ProductTypes.
504509
is:
505510
- secured_by_manage_products
506511
body:
@@ -522,12 +527,11 @@ traits:
522527
uriParameters:
523528
importContainerKey:
524529
(postman.paramName): import-container-key
525-
description: The ImportContainer used to create the new resource
530+
description: |
531+
`key` of the [ImportContainer](ctp:import:type:ImportContainer) to send this ImportRequest.
526532
type: string
527533
post:
528-
description:
529-
Creates a request for creating new ProductVariants or updating
530-
existing ones.
534+
description: Creates an Import Request for ProductVariants.
531535
is:
532536
- secured_by_manage_products
533537
body:
@@ -549,11 +553,12 @@ traits:
549553
uriParameters:
550554
importContainerKey:
551555
(postman.paramName): import-container-key
552-
description: The ImportContainer used to create the new resource
556+
description: |
557+
`key` of the [ImportContainer](ctp:import:type:ImportContainer) to send this ImportRequest.
553558
type: string
554559
post:
555560
description: |
556-
Creates a new import request for Product Variant Patches.
561+
Creates an Import Request for updating Product Variants.
557562
Returns an [InvalidField](ctp:import:type:InvalidFieldError) error if the [ProductVariantPatchRequest](ctp:import:type:ProductVariantPatchRequest) contains patches with and without the `product` field set.
558563
is:
559564
- secured_by_manage_products
@@ -576,10 +581,11 @@ traits:
576581
uriParameters:
577582
importContainerKey:
578583
(postman.paramName): import-container-key
579-
description: The ImportContainer used to create the new resource
584+
description: |
585+
`key` of the [ImportContainer](ctp:import:type:ImportContainer) to send this ImportRequest.
580586
type: string
581587
post:
582-
description: Creates a request for creating new Orders.
588+
description: Creates an Import Request for creating Orders.
583589
is:
584590
- secured_by_manage_orders
585591
body:
@@ -604,7 +610,7 @@ traits:
604610
description: The ImportContainer used to create the resource
605611
type: string
606612
post:
607-
description: Creates a new import request for order patches
613+
description: Creates an Import Request for updating Orders.
608614
is:
609615
- secured_by_manage_orders
610616
body:
@@ -626,12 +632,11 @@ traits:
626632
uriParameters:
627633
importContainerKey:
628634
(postman.paramName): import-container-key
629-
description: The ImportContainer used to create the new resource
635+
description: |
636+
`key` of the [ImportContainer](ctp:import:type:ImportContainer) to send this ImportRequest.
630637
type: string
631638
post:
632-
description:
633-
Creates a request for creating new Customers or updating existing
634-
ones.
639+
description: Creates an Import Request for Customers.
635640
is:
636641
- secured_by_manage_customers
637642
body:
@@ -653,12 +658,11 @@ traits:
653658
uriParameters:
654659
importContainerKey:
655660
(postman.paramName): import-container-key
656-
description: The ImportContainer used to create the new resource
661+
description: |
662+
`key` of the [ImportContainer](ctp:import:type:ImportContainer) to send this ImportRequest.
657663
type: string
658664
post:
659-
description:
660-
Creates a request for creating new Inventories or updating
661-
existing ones.
665+
description: Creates an Import Request for InventoryEntries.
662666
is:
663667
- secured_by_manage_products
664668
body:
@@ -680,11 +684,11 @@ traits:
680684
uriParameters:
681685
importContainerKey:
682686
(postman.paramName): import-container-key
683-
description: The ImportContainer used to create the new resource
687+
description: |
688+
`key` of the [ImportContainer](ctp:import:type:ImportContainer) to send this ImportRequest.
684689
type: string
685690
post:
686-
description: Creates a request for creating new Type or updating
687-
existing ones.
691+
description: Creates an Import Request for Types.
688692
is:
689693
- secured_by_manage_types
690694
body:
@@ -706,12 +710,11 @@ traits:
706710
uriParameters:
707711
importContainerKey:
708712
(postman.paramName): import-container-key
709-
description: The ImportContainer used to create the new resource
713+
description: |
714+
`key` of the [ImportContainer](ctp:import:type:ImportContainer) to send this ImportRequest.
710715
type: string
711716
post:
712-
description:
713-
Creates a request for creating new Discount Codes or updating existing
714-
ones.
717+
description: Creates an Import Request for Discount Codes.
715718
is:
716719
- secured_by_manage_discount_codes
717720
body:
@@ -726,3 +729,29 @@ traits:
726729
description: The request was invalid.
727730
body:
728731
type: error.ErrorResponse
732+
/product-selections:
733+
/import-containers:
734+
/{importContainerKey}:
735+
type: base
736+
uriParameters:
737+
importContainerKey:
738+
(postman.paramName): import-container-key
739+
description: |
740+
`key` of the [ImportContainer](ctp:import:type:ImportContainer) to send this ImportRequest.
741+
type: string
742+
post:
743+
description: Creates an Import Request for Product Selections.
744+
is:
745+
- secured_by_manage_product_selections
746+
body:
747+
type: import-request.ProductSelectionImportRequest
748+
example: !include examples/product-selection-import-request.json
749+
responses:
750+
201:
751+
body:
752+
type: import-request.ImportResponse
753+
example: !include examples/import-response.json
754+
400:
755+
description: The request was invalid.
756+
body:
757+
type: error.ErrorResponse

0 commit comments

Comments
 (0)