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 Sep 24, 2024
1 parent 575820a commit 81ab2c9
Show file tree
Hide file tree
Showing 124 changed files with 2,020 additions and 490 deletions.
1 change: 0 additions & 1 deletion api-specs/api/api.raml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ baseUriParameters:
- europe-west1.gcp
- eu-central-1.aws
- australia-southeast1.gcp
- api.cn-northwest-1.aws.commercetools.cn
- eastus.azure
description: |
[Region](/../api/general-concepts#hosts) in which the Project is hosted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"currencyCode": "EUR",
"centAmount": 40099
}
]
],
"applicationMode": "IndividualApplication"
}
}
}
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"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"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": {
"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."
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"id": "e7ba4c75-b1bb-483d-94d8-2c4a10f78472",
"version": 2,
"masterData": {
"current": {
"categories": [
{
"id": "cf6d790a-f027-4f46-9a2b-4bc9a31066fb",
"typeId": "category"
}
],
"description": {
"en": "Sample description"
},
"masterVariant": {
"attributes": [],
"id": 1,
"images": [
{
"dimensions": {
"h": 1400,
"w": 1400
},
"url": "https://commercetools.com/cli/data/253245821_1.jpg"
}
],
"prices": [
{
"value": {
"type": "centPrecision",
"fractionDigits": 2,
"centAmount": 10000,
"currencyCode": "EUR"
},
"id": "753472a3-ddff-4e0f-a93b-2eb29c90ba54"
}
],
"sku": "sku_MB_PREMIUM_TECH_T_variant1_1369226795424"
},
"name": {
"en": "MB PREMIUM TECH T"
},
"slug": {
"en": "mb-premium-tech-t1369226795424"
},
"variants": [],
"searchKeywords": {}
},
"hasStagedChanges": false,
"published": true,
"staged": {
"categories": [
{
"id": "cf6d790a-f027-4f46-9a2b-4bc9a31066fb",
"typeId": "category"
}
],
"description": {
"en": "Sample description"
},
"masterVariant": {
"attributes": [],
"id": 1,
"images": [
{
"dimensions": {
"h": 1400,
"w": 1400
},
"url": "https://commercetools.com/cli/data/253245821_1.jpg"
}
],
"prices": [
{
"value": {
"type": "centPrecision",
"fractionDigits": 2,
"centAmount": 10000,
"currencyCode": "EUR"
},
"id": "753472a3-ddff-4e0f-a93b-2eb29c90ba54"
}
],
"sku": "sku_MB_PREMIUM_TECH_T_variant1_1369226795424"
},
"name": {
"en": "MB PREMIUM TECH T"
},
"slug": {
"en": "mb-premium-tech-t1369226795424"
},
"variants": [],
"searchKeywords": {}
}
},
"productType": {
"id": "24f510c3-f334-4099-94e2-d6224a8eb919",
"typeId": "product-type"
},
"taxCategory": {
"id": "f1e10e3a-45eb-49d8-ad0b-fdf984202f59",
"typeId": "tax-category"
},
"createdAt": "1970-01-01T00:00:00.001Z",
"lastModifiedAt": "1970-01-01T00:00:00.001Z",
"warnings": [
{
"code": "ImageProcessingOngoing",
"message": "The image processing is still ongoing."
}
]
}
10 changes: 8 additions & 2 deletions api-specs/api/examples/state-create.example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"key": "test-state",
"type": "ProductState",
"key": "Initial",
"type": "LineItemState",
"roles": [],
"name": {
"en": "Initial"
},
"description": {
"en": "Initial is the first State that a (custom) Line Item gets after its creation."
},
"initial": true
}
17 changes: 17 additions & 0 deletions api-specs/api/examples/state-update-response.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"id": "7c2e2694-aefe-43d7-888e-6a99514caaca",
"version": 2,
"key": "Initial",
"type": "LineItemState",
"roles": [],
"name": {
"en": "New Name"
},
"description": {
"en": "Initial is the first State that a (custom) Line Item gets after its creation."
},
"builtIn": true,
"initial": true,
"createdAt": "2015-01-21T09:22:03.906Z",
"lastModifiedAt": "2024-08-06T13:49:48.511Z"
}
12 changes: 7 additions & 5 deletions api-specs/api/examples/state-update.example.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"version": 1,
"actions": [{
"action": "setName",
"name": {
"en": "New Name"
"actions": [
{
"action": "setName",
"name": {
"en": "New Name"
}
}
}]
]
}
2 changes: 1 addition & 1 deletion api-specs/api/examples/state.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"en": "Initial"
},
"description": {
"en": "Initial is the first that (custom) line item gets after its creation"
"en": "Initial is the first State that a (custom) Line Item gets after its creation."
},
"builtIn": true,
"initial": true,
Expand Down
2 changes: 1 addition & 1 deletion api-specs/api/examples/states.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"en": "Initial"
},
"description": {
"en": "Initial is the first that (custom) line item gets after it's creation"
"en": "Initial is the first State that a (custom) Line Item gets after its creation."
},
"builtIn": true,
"initial": true,
Expand Down
4 changes: 2 additions & 2 deletions api-specs/api/examples/subscription-create.example.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"destination": {
"type": "SQS",
"queueUrl": "<url-to-my-queue>",
"queueUrl": "https://sqs.my-region.amazonaws.com/my-aws-account-number/my-queue",
"authenticationMode": "IAM",
"region": "<my-region>"
"region": "my-region"
},
"messages": [
{
Expand Down
24 changes: 24 additions & 0 deletions api-specs/api/examples/subscription-update-response.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"id": "bf79c5d2-2813-4229-9a88-e7c76be50986",
"version": 2,
"destination": {
"type": "SQS",
"queueUrl": "https://sqs.my-region.amazonaws.com/my-aws-account-number/my-queue",
"authenticationMode": "IAM",
"region": "my-region"
},
"messages": [
{
"resourceTypeId": "product",
"types": []
}
],
"changes": [],
"createdAt": "2017-01-25T14:14:22.417Z",
"key": "new-key",
"format": {
"type": "Platform"
},
"lastModifiedAt": "2024-08-06T13:49:48.511Z",
"status": "Healthy"
}
10 changes: 6 additions & 4 deletions api-specs/api/examples/subscription-update.example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"version": 1,
"actions": [{
"action": "setKey",
"key": "queue-key"
}]
"actions": [
{
"action": "setKey",
"key": "new-key"
}
]
}
Loading

0 comments on commit 81ab2c9

Please sign in to comment.