Skip to content

Commit

Permalink
Updated api-reference from documentation release
Browse files Browse the repository at this point in the history
  • Loading branch information
Auto Mation committed Jul 4, 2024
1 parent 72f5c2b commit 82e95dd
Show file tree
Hide file tree
Showing 291 changed files with 3,069 additions and 303 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"action": "changeApprovalRuleMode",
"approvalRuleMode": "Explicit"
}
22 changes: 22 additions & 0 deletions api-specs/api/examples/Cart/MyCartAddLineItemAction.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"action": "addLineItem",
"productId": "{{product-id}}",
"variantId": 2,
"quantity": 1,
"supplyChannel": {
"typeId": "channel",
"id": "{{channel-id}}"
},
"distributionChannel": {
"typeId": "channel",
"id": "{{channel-id}}"
},
"shippingDetails": {
"targets": [
{
"addressKey": "AddressKeyStringFromAddress",
"quantity": 2
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"results": [
{
"id": "e41337a0-ea96-4ddc-a9a4-d267976f21e0",
"relevance": 0.9264881
},
{
"id": "05cd5998-015c-4232-8943-ff8a1880bcbc",
"relevance": 0.6989829
},
{
"id": "09c3c5a2-6569-49dd-b021-af5de4cf4b02",
"relevance": 0.6989829
}
],
"limit": 100,
"offset": 0,
"total": 3
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"status": "Indexing",
"states": {
"indexed": 43242,
"failed": 0,
"estimatedTotal": 100000
},
"startedAt": "2023-08-15T12:56:07.89Z",
"retryCount": 2,
"lastModifiedAt": "2023-08-15T12:56:07.89Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"query": {
"fullText": {
"field": "all",
"value": "john"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"action": "addAsset",
"variantId": 1,
"asset": {
"sources": [
{
"uri": "//asset.mp4"
}
],
"name": {
"de": "FirstAssetDE",
"en": "FirstassetEN"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"action": "addExternalImage",
"variantId": 1,
"image": {
"url": "//myimage.jpg",
"dimensions": {
"w": 1400,
"h": 1400
},
"label": "myImage"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"action": "addVariant",
"id": 2,
"sku": "VariantSKU"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"action": "changeAssetName",
"variantId": 1,
"assetId": "{{assetId}}",
"name": {
"de": "Mein Asset",
"en": "My asset"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"action": "changeAssetOrder",
"variantId": 1,
"assetOrder": ["{{assetId1}}", "{{assetId2}}"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"action": "moveImageToPosition",
"variantId": 1,
"imageUrl": "//myimage2.jpg",
"position": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"action": "removeAsset",
"variantId": 1,
"assetId": "{{assetId}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"action": "removeImage",
"variantId": 1,
"imageUrl": "//myimage2.jpg"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"action": "removeVariant",
"id": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"action": "setAssetCustomField",
"assetId": "{{assetId}}",
"variantId": 1,
"name": "ExampleStringTypeField",
"value": "TextString"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"action": "setAssetCustomType",
"variantId": 1,
"assetId": "{{assetId}}",
"type": {
"id": "{{type-id}}",
"typeId": "type"
},
"fields": {
"exampleStringTypeField": "TextString"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"action": "setAssetDescription",
"assetId": "{{assetId}}",
"variantId": 1,
"description": {
"de": "Dies ist eine Asset-Beschreibung",
"en": "This is an asset description"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"action": "setAssetKey",
"variantId": 1,
"assetId": "{{assetId}}",
"assetKey": "assetKeyString"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"action": "setAssetSources",
"variantId": 1,
"assetId": "{{assetId}}",
"sources": [
{
"uri": "https://www.commercetools.de/ct-logo.svg",
"key": "vector"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"action": "setAssetTags",
"variantId": 1,
"assetId": "{{assetId}}",
"tags": ["commercetools", "awesome"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"action": "setImages",
"variantId": 1,
"images": [
{
"url": "//myimage.jpg",
"dimensions": {
"w": 100,
"h": 100
}
},
{
"url": "//myimage2.jpg",
"dimensions": {
"w": 100,
"h": 100
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"action": "setImageLabel",
"variantId": 2,
"imageUrl": "//image.png",
"label": "labelString",
"staged": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"action": "changeCustomerSearchStatus",
"status": "Activated"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"action": "changeName",
"name": "name"
}
"name": "New Name"
}
3 changes: 2 additions & 1 deletion api-specs/api/examples/business-unit.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"addresses": [],
"associates": [],
"associateMode": "Explicit",
"inheritedAssociates": []
"inheritedAssociates": [],
"approvalRuleMode": "Explicit"
}
1 change: 1 addition & 0 deletions api-specs/api/examples/business-units.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"associates": [],
"associateMode": "Explicit",
"inheritedAssociates": [],
"approvalRuleMode": "Explicit",
"storeMode": "Explicit",
"stores": []
}
Expand Down
3 changes: 2 additions & 1 deletion api-specs/api/examples/my-business-unit.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"addresses": [],
"associates": [],
"associateMode": "Explicit",
"inheritedAssociates": []
"inheritedAssociates": [],
"approvalRuleMode": "Explicit"
}
3 changes: 2 additions & 1 deletion api-specs/api/examples/my-business-units.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"addresses": [],
"associates": [],
"associateMode": "Explicit",
"inheritedAssociates": []
"inheritedAssociates": [],
"approvalRuleMode": "Explicit"
}
]
}
26 changes: 26 additions & 0 deletions api-specs/api/examples/product-tailoring-create.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,31 @@
"metaKeywords": { "en": "tailored meta keywords" },
"slug": { "en": "tailored-slug" },
"description": { "en": "tailored description" },
"variants": [
{
"id": 1,
"images": [
{
"url": "//myimage.jpg",
"dimensions": {
"w": 400,
"h": 300
}
}
]
},
{
"sku": "sku-1",
"images": [
{
"url": "//myimage-2.png",
"dimensions": {
"w": 400,
"h": 300
}
}
]
}
],
"publish": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,19 @@
"metaKeywords": { "en": "tailored meta keywords" },
"slug": { "en": "tailored-slug" },
"description": { "en": "tailored description" },
"variants": [
{
"id": 1,
"images": [
{
"url": "//myimage.jpg",
"dimensions": {
"w": 400,
"h": 300
}
}
]
}
],
"publish": false
}
29 changes: 28 additions & 1 deletion api-specs/api/examples/product-tailoring-list.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,34 @@
"slug": {
"en": "tailored-slug"
},
"variants": []
"variants": [
{
"id": 1,
"images": [
{
"url": "//myimage.jpg",
"dimensions": {
"w": 400,
"h": 300
}
}
],
"assets": []
},
{
"id": 2,
"images": [
{
"url": "//myimage-2.png",
"dimensions": {
"w": 400,
"h": 300
}
}
],
"assets": []
}
]
},
"published": false,
"hasStagedChanges": true
Expand Down
Loading

0 comments on commit 82e95dd

Please sign in to comment.