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 May 15, 2024
1 parent d55b7e3 commit 0af1b22
Show file tree
Hide file tree
Showing 1,732 changed files with 3,204 additions and 1,751 deletions.
46 changes: 46 additions & 0 deletions api-specs/api/api.raml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,51 @@ resourceTypes:
description: |
## Not Found
A 404 indicates that the <<resourceType>> was not found / does not exist.
baseSubResource:
type: base
get:
is:
- expandable
displayName: Get <<resourceType>>.
responses:
200:
body:
application/json:
type: <<resourceType>>
post?:
is:
- conflicting
- expandable
- deprecatable200
displayName: Update <<resourceType>>.
body:
application/json:
type: <<resourceUpdateType>>
responses:
200:
body:
application/json:
type: <<resourceType>>
delete?:
is:
- versioned
- conflicting
- expandable
displayName: Delete <<resourceType>>.
responses:
200:
body:
application/json:
type: <<resourceType>>
head?:
displayName: Check whether <<resourceType>> exists.
responses:
200:
404:
description: |
## Not Found
A 404 indicates that the <<resourceType>> was not found / does not exist.
base:
get?:
Expand Down Expand Up @@ -202,6 +247,7 @@ resourceTypes:
/product-discounts: !include resources/product-discounts.raml
/product-projections: !include resources/product-projections.raml
/product-selections: !include resources/product-selections.raml
/product-tailoring: !include resources/product-tailoring.raml
/product-types: !include resources/product-types.raml
/quotes: !include resources/quotes.raml
/quote-requests: !include resources/quote-requests.raml
Expand Down
14 changes: 14 additions & 0 deletions api-specs/api/examples/Common/AddressDraft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"key": "address1",
"title": "Mrs.",
"firstName": "Jane",
"lastName": "Doe",
"streetName": "First Street",
"streetNumber": "12",
"postalCode": "12345",
"city": "Example City",
"country": "NL",
"phone": "+312345678",
"mobile": "+312345679",
"email": "jane.doe@example.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"action": "setKey",
"key": "new-key"
}
Original file line number Diff line number Diff line change
@@ -1,8 +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
@@ -1,4 +1,5 @@
{
"action": "changeAssetOrder",
"assetOrder": ["{{assetId1}}","{{assetId2}}"]
}
"variantId": 1,
"assetOrder": ["{{assetId1}}", "{{assetId2}}"]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"action": "setAssetCustomField",
"variantId": 1,
"assetId": "{{assetId}}",
"name": "ExampleStringTypeField",
"value": "TextString"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"action": "setAssetCustomType",
"variantId": 1,
"assetId": "{{assetId}}",
"type": {
"id": "{{type-id}}",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"action": "setAssetDescription",
"variantId": 1,
"assetId": "{{assetId}}",
"description": {
"de": "Dies ist eine Asset-Beschreibung",
"en": "This is an asset description"
}
}
}
3 changes: 2 additions & 1 deletion api-specs/api/examples/Product/ProductSetAssetKeyAction.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"action": "setAssetKey",
"variantId": 1,
"assetId": "{{assetId}}",
"assetKey": "assetKeyString"
}
}
13 changes: 8 additions & 5 deletions api-specs/api/examples/Product/ProductSetAssetSourcesAction.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"action": "setAssetSources",
"variantId": 1,
"assetId": "{{assetId}}",
"sources": [{
"uri": "https://www.commercetools.de/ct-logo.svg",
"key": "vector"
}]
}
"sources": [
{
"uri": "https://www.commercetools.de/ct-logo.svg",
"key": "vector"
}
]
}
5 changes: 3 additions & 2 deletions api-specs/api/examples/Product/ProductSetAssetTagsAction.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"action": "setAssetTags",
"variantId": 1,
"assetId": "{{assetId}}",
"tags": ["commercetools","awesome"]
}
"tags": ["commercetools", "awesome"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"query": {
"and": [
{
"fullText": {
"field": "name",
"language": "en",
"value": "banana"
}
},
{
"filter": [
{
"exact": {
"field": "variants.attributes.farming",
"fieldType": "text",
"value": "organic"
}
}
]
}
]
},
"sort": [
{
"field": "name",
"language": "en",
"order": "desc"
}
],
"limit": 10,
"offset": 0
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"total": 148,
"offset": 0,
"limit": 10,
"facets": [
{
"name": "countProducts",
"buckets": [
{
"key": "white",
"count": 37
}
]
},
{
"name": "countVariants",
"buckets": [
{
"key": "white",
"count": 301
}
]
}
],
"results": [
{
"id": "8fde2af0-6a2f-4633-9ba4-83566f769a7f",
"matchingVariants": {
"allMatched": false,
"matchedVariants": [
{
"id": 1,
"sku": null
}
]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "action": "publish" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"action": "setDescription",
"description": { "en": "A description" },
"staged": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"action": "setMetaAttributes",
"metaTitle": { "en": "A Meta Title" },
"metaDescription": { "en": "A Meta Description" },
"metaKeywords": { "en": "Meta Keywords" },
"staged": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"action": "setMetaDescription",
"metaDescription": { "en": "A Meta Description" },
"staged": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"action": "setMetaKeywords",
"metaKeywords": { "en": "Meta Keywords" },
"staged": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"action": "setMetaTitle",
"metaTitle": { "en": "A Meta Title" },
"staged": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"action": "setName",
"name": { "en": "A name" },
"staged": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"action": "setSlug",
"slug": { "en": "a-slug" },
"staged": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "action": "unpublish" }
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"action": "changeProductSearchIndexingEnabled",
"enabled": true
"enabled": true,
"mode": "ProductsSearch"
}
3 changes: 2 additions & 1 deletion api-specs/api/examples/customer-sign-in-result.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"version": 1,
"createdAt": "2015-07-06T13:22:33.339Z",
"lastModifiedAt": "2015-07-06T13:22:33.339Z",
"authenticationMode": "Password"
"authenticationMode": "Password",
"stores": []
}
}
3 changes: 2 additions & 1 deletion api-specs/api/examples/customer-update-response.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"version": 4,
"createdAt": "2015-05-06T12:10:12.421Z",
"lastModifiedAt": "2015-07-06T13:22:33.339Z",
"authenticationMode": "Password"
"authenticationMode": "Password",
"stores": []
}
28 changes: 26 additions & 2 deletions api-specs/api/examples/order-edits.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,19 @@
"currencyCode": "EUR",
"centAmount": 570,
"fractionDigits": 2
}
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"shippingMethodState": "MatchesCart"
},
Expand Down Expand Up @@ -203,7 +215,19 @@
"currencyCode": "EUR",
"centAmount": 3400,
"fractionDigits": 2
}
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"lineItemMode": "Standard",
"perMethodTaxRate": [],
Expand Down
14 changes: 13 additions & 1 deletion api-specs/api/examples/order.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,19 @@
"fractionDigits": 2,
"currencyCode": "EUR",
"centAmount": 1100
}
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"perMethodTaxRate": [],
"taxedPricePortions": []
Expand Down
14 changes: 13 additions & 1 deletion api-specs/api/examples/orders.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,19 @@
"fractionDigits": 2,
"currencyCode": "EUR",
"centAmount": 1100
}
},
"taxPortions": [
{
"rate": 0.1,
"amount": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 634,
"fractionDigits": 2
},
"name": "Bla"
}
]
},
"perMethodTaxRate": [],
"taxedPricePortions": []
Expand Down

0 comments on commit 0af1b22

Please sign in to comment.