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 Oct 16, 2024
1 parent dc29d10 commit 9b810b3
Show file tree
Hide file tree
Showing 178 changed files with 2,400 additions and 559 deletions.
5 changes: 3 additions & 2 deletions api-specs/api/api.raml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ baseUriParameters:
- europe-west1.gcp
- eu-central-1.aws
- australia-southeast1.gcp
- api.cn-northwest-1.aws.commercetools.cn
- eastus.azure
- germanywestcentral.azure
description: |
[Region](/../api/general-concepts#hosts) in which the Project is hosted.
version: v1
Expand Down Expand Up @@ -222,10 +222,11 @@ resourceTypes:
body:
application/json:
type: ProjectUpdate
example: !include /examples/project-update.example.json
responses:
200:
body:
example: !include examples/project.example.json
example: !include examples/project-update-response.example.json
type: Project
/as-associate: !include resources/as-associate.raml
/associate-roles: !include resources/associate-roles.raml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"currencyCode": "EUR",
"centAmount": 40099
}
]
],
"applicationMode": "IndividualApplication"
}
}
}
4 changes: 4 additions & 0 deletions api-specs/api/examples/Customer/MyCustomerSignIn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"email": "[email protected]",
"password": "secret123"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"action": "setAttribute",
"variantId": 1,
"name": "ExampleStringTypeAttribute",
"value": "TextString"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"action": "setAttributeInAllVariants",
"name": "ExampleStringTypeAttribute",
"value": "TextString"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"code": "ImageProcessingOngoing",
"message": "The image processing is still ongoing."
}
21 changes: 21 additions & 0 deletions api-specs/api/examples/extension-update-response.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"id": "8062243c-46fc-40b5-88a4-75e2216aef75",
"version": 2,
"createdAt": "2017-01-25T14:14:22.417Z",
"lastModifiedAt": "2024-08-06T13:49:48.511Z",
"destination": {
"type": "HTTP",
"url": "https://example.azurewebsites.net/api/extension",
"authentication": {
"type": "AzureFunctions",
"key": "****code"
}
},
"triggers": [
{
"resourceTypeId": "cart",
"actions": ["Create", "Update"]
}
],
"key": "my-new-extension-key"
}
10 changes: 6 additions & 4 deletions api-specs/api/examples/extension-update.example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"version": 1,
"actions": [{
"action": "setKey",
"key": "my-new-extension-key"
}]
"actions": [
{
"action": "setKey",
"key": "my-new-extension-key"
}
]
}
12 changes: 7 additions & 5 deletions api-specs/api/examples/extension.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
"url": "https://example.azurewebsites.net/api/extension",
"authentication": {
"type": "AzureFunctions",
"key": "some-azure-function-code"
"key": "****code"
}
},
"triggers": [{
"resourceTypeId": "cart",
"actions": ["Create", "Update"]
}],
"triggers": [
{
"resourceTypeId": "cart",
"actions": ["Create", "Update"]
}
],
"key": "my-extension"
}
4 changes: 2 additions & 2 deletions api-specs/api/examples/inventory-create.example.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"key": "ie-key-1",
"sku": "sku_GIRLS_CREW_variant1_1421832124541",
"quantityOnStock": 4,
"availableQuantity": 4
"quantityOnStock": 4
}
74 changes: 74 additions & 0 deletions api-specs/api/examples/order-import-create.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"type": "Order",
"id": "35f816ea-7770-4623-895b-7a6454e22e8a",
"version": 1,
"createdAt": "2024-10-09T23:12:14.264Z",
"lastModifiedAt": "2024-10-09T23:12:14.264Z",
"lastModifiedBy": {
"clientId": "qnfzsm5-qNfCGwHiRgI03Emc",
"isPlatformClient": false
},
"createdBy": {
"clientId": "qnfzsm5-qNfCGwHiRgI03Emc",
"isPlatformClient": false
},
"orderNumber": "100000001",
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 4200,
"fractionDigits": 2
},
"orderState": "Open",
"syncInfo": [],
"returnInfo": [],
"taxMode": "External",
"inventoryMode": "None",
"taxRoundingMode": "HalfEven",
"taxCalculationMode": "LineItemLevel",
"origin": "Customer",
"shippingMode": "Single",
"shipping": [],
"lineItems": [],
"customLineItems": [
{
"id": "fc864da7-0cc9-438f-9626-4d5907ea51c9",
"name": {
"en": "Name EN",
"de": "Name DE"
},
"money": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 4200,
"fractionDigits": 2
},
"slug": "mySlug",
"quantity": 1,
"discountedPricePerQuantity": [],
"state": [
{
"quantity": 1,
"state": {
"typeId": "state",
"id": "7e3b7f8b-74c1-4d01-8335-0197ba1de6e9"
}
}
],
"totalPrice": {
"type": "centPrecision",
"currencyCode": "EUR",
"centAmount": 4200,
"fractionDigits": 2
},
"taxedPricePortions": [],
"perMethodTaxRate": [],
"priceMode": "Standard"
}
],
"transactionFee": false,
"discountCodes": [],
"directDiscounts": [],
"itemShippingAddresses": [],
"refusedGifts": []
}
19 changes: 17 additions & 2 deletions api-specs/api/examples/order-import.example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
{
"orderNumber": "100000001",
"totalPrice": {
"centAmount": 1000,
"centAmount": 4200,
"currencyCode": "EUR"
}
},
"lineItems": [],
"customLineItems": [
{
"name": {
"en": "Name EN",
"de": "Name DE"
},
"quantity": 1,
"money": {
"currencyCode": "EUR",
"centAmount": 4200
},
"slug": "mySlug"
}
]
}
6 changes: 4 additions & 2 deletions api-specs/api/examples/product-tailoring-create.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"h": 300
}
}
]
],
"attributes": [{ "name": "my-attribute", "value": "attribute-1" }]
},
{
"sku": "sku-1",
Expand All @@ -33,7 +34,8 @@
"h": 300
}
}
]
],
"attributes": [{ "name": "my-attribute", "value": "attribute-2" }]
}
],
"publish": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,21 @@
"h": 300
}
}
]
],
"attributes": [{ "name": "my-attribute", "value": "attribute-1" }]
},
{
"sku": "sku-1",
"images": [
{
"url": "//myimage-2.png",
"dimensions": {
"w": 400,
"h": 300
}
}
],
"attributes": [{ "name": "my-attribute", "value": "attribute-2" }]
}
],
"publish": false
Expand Down
8 changes: 4 additions & 4 deletions api-specs/api/examples/product-tailoring-list.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
{
"id": "207ee692-6002-4570-a78c-d15e7adbebbb",
"version": 2,
"versionModifiedAt": "2023-09-01T13:41:50.662Z",
"createdAt": "2023-09-01T13:26:10.475Z",
"lastModifiedAt": "2023-09-01T13:26:10.475Z",
"lastModifiedBy": {
Expand Down Expand Up @@ -59,7 +58,8 @@
}
}
],
"assets": []
"assets": [],
"attributes": []
},
{
"id": 2,
Expand All @@ -72,7 +72,8 @@
}
}
],
"assets": []
"assets": [],
"attributes": []
}
]
},
Expand All @@ -83,7 +84,6 @@
{
"id": "207ee692-6002-4570-a78c-d15e7adbecc",
"version": 2,
"versionModifiedAt": "2023-09-01T13:42:50.662Z",
"createdAt": "2023-09-01T13:27:10.475Z",
"lastModifiedAt": "2023-09-01T14:26:10.475Z",
"lastModifiedBy": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"id": "207ee692-6002-4570-a78c-d15e7adbebbb",
"version": 2,
"versionModifiedAt": "2023-09-01T13:41:50.662Z",
"createdAt": "2023-09-01T13:26:10.475Z",
"lastModifiedAt": "2023-09-01T13:26:10.475Z",
"lastModifiedBy": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"id": "207ee692-6002-4570-a78c-d15e7adbebbb",
"version": 2,
"createdAt": "2023-09-01T13:26:10.475Z",
"lastModifiedAt": "2023-09-01T13:26:10.475Z",
"lastModifiedBy": {
"clientId": "ywjliB_u26xzmcJNKznjbJp4",
"isPlatformClient": false
},
"createdBy": {
"clientId": "ywjliB_u26xzmcJNKznjbJp4",
"isPlatformClient": false
},
"product": {
"typeId": "product",
"id": "daf720e5-9e8e-4300-98db-3a3219327db9"
},
"store": {
"typeId": "store",
"key": "store-key"
},
"current": {
"variants": []
},
"staged": {
"name": {
"en": "tailored name"
},
"description": {
"en": "tailored description"
},
"metaTitle": {
"en": "tailored meta title"
},
"metaDescription": {
"en": "tailored meta description"
},
"metaKeywords": {
"en": "tailored meta keywords"
},
"slug": {
"en": "tailored-slug"
},
"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,
"warnings": [
{
"code": "ImageProcessingOngoing",
"message": "The image processing is still ongoing."
}
]
}
Loading

0 comments on commit 9b810b3

Please sign in to comment.