This is a global notification. You can write markdown here! Link to official website

API Endpoint Large Desktop Layout

Similar to large desktop responsiveness of API Type but applied to endpoints.

Content

Test Subsection Title

Lorem ipsum dolor sit amet, everti feugiat gloriatur sed et, an omnes saepe intellegat vix. Ei aperiam postulant mea, primis omnesque voluptatibus ad nec. Vim ea nobis tation, pro putent discere pertinacia eu, ex quo gubergren referrentur. Nam in graeco periculis, qui at conceptam intellegat. Ea purto natum accusam sed. Has ne partem adversarium theophrastus, sed tale eirmod ad, eum in malis ignota nusquam.

Id quo virtute epicurei phaedrum. No volumus atomorum sit, sonet sensibus ne quo. Tale porro cu qui, ridens option praesent ius ei, nam brute iracundia cu. Aeque soluta necessitatibus te quo, cu vel aperiri euismod delectus. Eu quod invenire mnesarchum sed, his ne decore mollis audire, sit ea aeque zril doctus.

API Endpoint Representations

An ApiEndpoint with Simple Request Example

GET
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource/searchApiPattern

Search all resources by specific parameters.

OAuth 2.0 Scopes:
manage_test:{projectKey}view_test:{projectKey}
Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

Query parameters:
fuzzy
Boolean

Whether to apply fuzzy search on the text to analyze.

fuzzyLevel
Float

Provide explicitly the fuzzy level desired if fuzzy is enabled. This value can not be higher than the one chosen by the platform by default.

staged
Boolean

Whether to query for the current or staged projections.

filter
String
filter.facets
String
filter.query
String
facet
String
/text.[a-z]{2}(-[A-Z]{2})?/
Any string parameter matching this regular expression
Request Example:cURL
curl --get https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource/searchApiPattern -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'

An ApiEndpoint with Object Request Example

POST
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource/{id}

Update a resource by ID

Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

id
String
Request Body:
application/json
version
Float

The expected version of the ExampleResource on which the changes should be applied. If the expected version does not match the actual version, a 409 Conflict will be returned.

actions
Array of ExampleResourceUpdateAction

The list of update actions to be performed on the ExampleResource. Actions are applied in the given order.

Request Example:cURL
curl https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource/{id} -i \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"version" : 1,
"actions" : [ {
"action" : "doSomeThing"
}, {
"action" : "changeSomeProperty",
"someProperty" : "any string"
} ]
}
DATA

An ApiEndpoint with Simple Request & Response Examples

GET
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource

Query/retrieve (GET) a specific resource or resource(s). This should return a paged query result of blah.

OAuth 2.0 Scopes:
manage_test:{projectKey}view_test:{projectKey}
Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

Query parameters:
stringParameter
String
floatParameter
Float
integerParameter
Int
withMarkdownDescription
Float

This markdown should be parsed correctly.

objectParameter
arrayOfString
String
The parameter can be passed multiple times.
arrayOfStringWithDescription
String

This should render above the text "The parameter can be passed multiple times."

The parameter can be passed multiple times.
unionParameter
Can be Float, DateTime, or ObjectTestType
Response:
200ArrayTestTypeasapplication/json
Request Example:cURL
curl --get https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: ArrayTestTypejson
{
"arrayOfIntExample": [2, 4, 2, 6, 4, 6, 2],
"arrayOfUniqueIntExample": [2, 6, 10, 14],
"arrayOfTwonumbersExample": [6, 10],
"arrayOfFloatExample": [1.64],
"arrayOfNumberNoDefaultsExample": [20, 18, 16, 14, 12],
"arrayOfStringExample": ["dogdog", "catcat", "birdbird"],
"arrayOfObjectType": [
{
"integerExample": 1554,
"integerExampleInt32": 2
},
{
"integerExample": 60000,
"integerExampleInt32": 22
}
]
}

An ApiEndpoint with Object Request & Response Examples

POST
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource

Create or Update (POST) operation to a resource.

OAuth 2.0 Scopes:
manage_test:{projectKey}customer_id_test:{id}manage_my_profile_test:{projectKey}customer_id_test:{id}manage_my_profile_test:{projectKey}manage_test:{projectKey}manage_my_profile_test:{projectKey}customer_id_test:{id}manage_test:{projectKey}manage_my_profile_test:{projectKey}customer_id_test:{id}manage_my_profile_test:{projectKey}
Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

Request Body:ObjectTestTypeDraftasapplication/json
Response:
201ObjectTestTypeasapplication/json
Request Example:cURL
curl https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}' \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"objectTypeProperty" : {
"arrayOfIntExample" : [ 1, 2, 1, 3, 2, 3, 1 ],
"arrayOfUniqueIntExample" : [ 1, 3, 5, 7 ],
"arrayOfTwonumbersExample" : [ 3, 5 ],
"arrayOfFloatExample" : [ 0.82 ],
"arrayOfNumberNoDefaultsExample" : [ 10, 9, 8, 7, 6 ],
"arrayOfStringExample" : [ "dog", "cat", "bird" ],
"arrayOfObjectType" : [ {
"integerExample" : 777,
"integerExampleInt32" : 1
}, {
"integerExample" : 30000,
"integerExampleInt32" : 22
} ]
}
}
DATA
201 Response Example: ObjectTestTypejson
{
"version": 1,
"objectTypeProperty": {
"arrayOfIntExample": [2, 4, 2, 6, 4, 6, 2],
"arrayOfUniqueIntExample": [2, 6, 10, 14],
"arrayOfTwonumbersExample": [6, 10],
"arrayOfFloatExample": [1.64],
"arrayOfNumberNoDefaultsExample": [20, 18, 16, 14, 12],
"arrayOfStringExample": ["dogdog", "catcat", "birdbird"],
"arrayOfObjectType": [
{
"integerExample": 1554,
"integerExampleInt32": 2
},
{
"integerExample": 60000,
"integerExampleInt32": 22
}
]
}
}

An ApiEndpoint with Object Request & Multiple Response Examples

POST
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource/artificially-complex/path/uri-parameter-one={uriParameterOne}/{uriParameterTwo}

Updates the resource. OutOfOrderPropertiesTestType is used because it is big and long.

Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

uriParameterOne
String

A Path parameter in the equal-sign-pseudo-query notation

uriParameterTwo
String

A Path parameter as a plain variable path element

Query parameters:
queryParameterOne
Float

some parameter to construct a combination of URI and query params

queryParameterTwo
String
Request Body:OutOfOrderPropertiesTestTypeasapplication/json
Response:
200ArrayTestTypeasapplication/json201ArrayTestTypeasapplication/json203ArrayTestTypeasapplication/x-www-form-urlencoded
Request Example:cURL
curl https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource/artificially-complex/path/uri-parameter-one={uriParameterOne}/{uriParameterTwo} -i \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"eigthProperty" : "Should display 8th (1st in RAML)",
"createdBy" : {
"firstName" : "John",
"lastName" : "Doe"
},
"ninthProperty" : "Should display 9th (3rd in RAML)",
"key" : "Should display 3rd (4th in RAML)",
"tenthProperty" : "Should display 10th (5th in RAML)",
"custom" : "Should display 16th (6th in RAML)",
"eleventhPropery" : "Should display 11th (7th in RAML)",
"id" : "Should display 1st (8th in RAML)",
"twelthProperty" : "Should display 12th (9th in RAML)",
"lastModifiedBy" : {
"firstName" : "Jane",
"lastName" : "Doe"
},
"thirteenthProperty" : "Should display 13th (11th in RAML)",
"lastModifiedAt" : "2016-02-28T16:41:41.090Z",
"fourteenthProperty" : "Should display 14th (13th in RAML)",
"fifteenthProperty" : "Should display 15th (14th in definition)",
"createdAt" : "2015-02-28T16:41:41.090Z",
"version" : "Should display 2nd (16th in RAML)"
}
DATA
200 Response Example: ArrayTestTypejson
{
"arrayOfIntExample": [1, 2, 3],
"arrayOfUniqueIntExample": [4, 6],
"arrayOfTwonumbersExample": [6, 10],
"arrayOfFloatExample": [0.65],
"arrayOfNumberNoDefaultsExample": [30],
"arrayOfStringExample": ["custom", "example", "file", "1"],
"arrayOfObjectType": [
{
"integerExample": 1,
"integerExampleInt32": 3
},
{
"integerExample": 4,
"integerExampleInt32": 44
}
]
}
201 Response Example: ArrayTestTypejson
{
"arrayOfIntExample": [2, 4, 2, 6, 4, 6, 2],
"arrayOfUniqueIntExample": [2, 6, 10, 14],
"arrayOfTwonumbersExample": [6, 10],
"arrayOfFloatExample": [1.64],
"arrayOfNumberNoDefaultsExample": [20, 18, 16, 14, 12],
"arrayOfStringExample": ["dogdog", "catcat", "birdbird"],
"arrayOfObjectType": [
{
"integerExample": 1554,
"integerExampleInt32": 2
},
{
"integerExample": 60000,
"integerExampleInt32": 22
}
]
}
203 Response Example: ArrayTestType (custom1)json
{
"arrayOfIntExample": [1, 2, 3],
"arrayOfUniqueIntExample": [4, 6],
"arrayOfTwonumbersExample": [6, 10],
"arrayOfFloatExample": [0.65],
"arrayOfNumberNoDefaultsExample": [30],
"arrayOfStringExample": ["custom", "example", "file", "1"],
"arrayOfObjectType": [
{
"integerExample": 1,
"integerExampleInt32": 3
},
{
"integerExample": 4,
"integerExampleInt32": 44
}
]
}
203 Response Example: ArrayTestType (custom2)json
{
"arrayOfIntExample": [4, 5, 6],
"arrayOfUniqueIntExample": [8, 26],
"arrayOfTwonumbersExample": [12, 20],
"arrayOfFloatExample": [1.3],
"arrayOfNumberNoDefaultsExample": [60],
"arrayOfStringExample": ["custom", "example", "file", "2"],
"arrayOfObjectType": [
{
"integerExample": 2,
"integerExampleInt32": 6
},
{
"integerExample": 8,
"integerExampleInt32": 88
}
]
}

An ApiEndpointsForResource

post
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource

Create or Update (POST) operation to a resource.

OAuth 2.0 Scopes:
manage_test:{projectKey}customer_id_test:{id}manage_my_profile_test:{projectKey}customer_id_test:{id}manage_my_profile_test:{projectKey}manage_test:{projectKey}manage_my_profile_test:{projectKey}customer_id_test:{id}manage_test:{projectKey}manage_my_profile_test:{projectKey}customer_id_test:{id}manage_my_profile_test:{projectKey}
Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

Request Body:ObjectTestTypeDraftasapplication/json
Response:
201ObjectTestTypeasapplication/json
Request Example:cURL
curl https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}' \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"objectTypeProperty" : {
"arrayOfIntExample" : [ 1, 2, 1, 3, 2, 3, 1 ],
"arrayOfUniqueIntExample" : [ 1, 3, 5, 7 ],
"arrayOfTwonumbersExample" : [ 3, 5 ],
"arrayOfFloatExample" : [ 0.82 ],
"arrayOfNumberNoDefaultsExample" : [ 10, 9, 8, 7, 6 ],
"arrayOfStringExample" : [ "dog", "cat", "bird" ],
"arrayOfObjectType" : [ {
"integerExample" : 777,
"integerExampleInt32" : 1
}, {
"integerExample" : 30000,
"integerExampleInt32" : 22
} ]
}
}
DATA
201 Response Example: ObjectTestTypejson
{
"version": 1,
"objectTypeProperty": {
"arrayOfIntExample": [2, 4, 2, 6, 4, 6, 2],
"arrayOfUniqueIntExample": [2, 6, 10, 14],
"arrayOfTwonumbersExample": [6, 10],
"arrayOfFloatExample": [1.64],
"arrayOfNumberNoDefaultsExample": [20, 18, 16, 14, 12],
"arrayOfStringExample": ["dogdog", "catcat", "birdbird"],
"arrayOfObjectType": [
{
"integerExample": 1554,
"integerExampleInt32": 2
},
{
"integerExample": 60000,
"integerExampleInt32": 22
}
]
}
}
put
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource

Create or Overwrite (PUT) operation to a resource.

OAuth 2.0 Scopes:
manage_test:{projectKey}
Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

Request Body:ObjectTestTypeDraftasapplication/json
Response:
201ObjectTestTypeasapplication/json
201 Response Example: ObjectTestTypejson
{
"version": 1,
"objectTypeProperty": {
"arrayOfIntExample": [2, 4, 2, 6, 4, 6, 2],
"arrayOfUniqueIntExample": [2, 6, 10, 14],
"arrayOfTwonumbersExample": [6, 10],
"arrayOfFloatExample": [1.64],
"arrayOfNumberNoDefaultsExample": [20, 18, 16, 14, 12],
"arrayOfStringExample": ["dogdog", "catcat", "birdbird"],
"arrayOfObjectType": [
{
"integerExample": 1554,
"integerExampleInt32": 2
},
{
"integerExample": 60000,
"integerExampleInt32": 22
}
]
}
}
get
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource

Query/retrieve (GET) a specific resource or resource(s). This should return a paged query result of blah.

OAuth 2.0 Scopes:
manage_test:{projectKey}view_test:{projectKey}
Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

Query parameters:
stringParameter
String
floatParameter
Float
integerParameter
Int
withMarkdownDescription
Float

This markdown should be parsed correctly.

objectParameter
arrayOfString
String
The parameter can be passed multiple times.
arrayOfStringWithDescription
String

This should render above the text "The parameter can be passed multiple times."

The parameter can be passed multiple times.
unionParameter
Can be Float, DateTime, or ObjectTestType
Response:
200ArrayTestTypeasapplication/json
Request Example:cURL
curl --get https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: ArrayTestTypejson
{
"arrayOfIntExample": [2, 4, 2, 6, 4, 6, 2],
"arrayOfUniqueIntExample": [2, 6, 10, 14],
"arrayOfTwonumbersExample": [6, 10],
"arrayOfFloatExample": [1.64],
"arrayOfNumberNoDefaultsExample": [20, 18, 16, 14, 12],
"arrayOfStringExample": ["dogdog", "catcat", "birdbird"],
"arrayOfObjectType": [
{
"integerExample": 1554,
"integerExampleInt32": 2
},
{
"integerExample": 60000,
"integerExampleInt32": 22
}
]
}

Manual Side By Side Content BETA

The <SideBySide> component allows wrapping two arbitrary pieces of markdown or MDX block-level contents to allow the wide layout to put the next to each other if the space allows. It's for "Pairs" of content that directly belong to each other. If multiple blocks are intended for this "left" part it needs to be wrapped in a <div> which is not nice but at least works.

<SideBySide>
Block one - don't forget the blank lines!
Blick two - don't forget the blank lines!
</SideBySide>

An Endpoint with Simple Request Example again to test the layout

GET
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource/searchApiPattern

Search all resources by specific parameters.

OAuth 2.0 Scopes:
manage_test:{projectKey}view_test:{projectKey}
Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

Query parameters:
fuzzy
Boolean

Whether to apply fuzzy search on the text to analyze.

fuzzyLevel
Float

Provide explicitly the fuzzy level desired if fuzzy is enabled. This value can not be higher than the one chosen by the platform by default.

staged
Boolean

Whether to query for the current or staged projections.

filter
String
filter.facets
String
filter.query
String
facet
String
/text.[a-z]{2}(-[A-Z]{2})?/
Any string parameter matching this regular expression
Request Example:cURL
curl --get https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource/searchApiPattern -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'

An Endpoint grouped in MultiPathBlock

by ID

by Key

GET
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource/searchApiPattern

Search all resources by specific parameters.

OAuth 2.0 Scopes:
manage_test:{projectKey}view_test:{projectKey}
Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

Query parameters:
fuzzy
Boolean

Whether to apply fuzzy search on the text to analyze.

fuzzyLevel
Float

Provide explicitly the fuzzy level desired if fuzzy is enabled. This value can not be higher than the one chosen by the platform by default.

staged
Boolean

Whether to query for the current or staged projections.

filter
String
filter.facets
String
filter.query
String
facet
String
/text.[a-z]{2}(-[A-Z]{2})?/
Any string parameter matching this regular expression
Request Example:cURL
curl --get https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource/searchApiPattern -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
GET
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource/key={key}

Query by key. Has three responses to see the difference between modeling patterns in RAML

OAuth 2.0 Scopes:
manage_test:{projectKey}view_test:{projectKey}
Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

key
String
Response:
200ObjectTestTypeasapplication/json
Request Example:cURL
curl --get https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource/key={key} -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: ObjectTestTypejson
{
"version": 1,
"objectTypeProperty": {
"arrayOfIntExample": [2, 4, 2, 6, 4, 6, 2],
"arrayOfUniqueIntExample": [2, 6, 10, 14],
"arrayOfTwonumbersExample": [6, 10],
"arrayOfFloatExample": [1.64],
"arrayOfNumberNoDefaultsExample": [20, 18, 16, 14, 12],
"arrayOfStringExample": ["dogdog", "catcat", "birdbird"],
"arrayOfObjectType": [
{
"integerExample": 1554,
"integerExampleInt32": 2
},
{
"integerExample": 60000,
"integerExampleInt32": 22
}
]
}
}