Queries and mutations for managing Custom Objects in the platform.
Queries
Query Custom Objects
QUERYcustomObjects
| Arguments | |
|---|---|
whereString | |
sortArray of String | |
limitInt | |
offsetInt | |
containerString | |
Output:CustomObjectQueryResult
Get Custom Object
QUERYcustomObject
| Arguments | |
|---|---|
idString | Queries with specified ID |
keyString | Queries with specified key |
containerString | |
Output:CustomObject
Mutations
Create or Update Custom Object
Delete Custom Object
MUTATIONdeleteCustomObject
| Arguments | |
|---|---|
versionLong | |
idString | Queries with specified ID |
keyString | Queries with specified key |
containerString | |
personalDataErasureBoolean | Default: false |
Output:CustomObject
Output types
CustomObject
containerString | Namespace to group CustomObjects. |
keyString | User-defined unique identifier of the CustomObject within the defined container. |
valueJson | Can be any JSON standard type, such as number, string, boolean, array, object, or a common API data type.
|
referencedResourcesArray of ReferencedResource | BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta |
idString | Unique identifier of the CustomObject. |
versionLong | Current version of the CustomObject. |
createdAt | Date and time (UTC) the CustomObject was initially created. |
lastModifiedAt | Date and time (UTC) the CustomObject was last updated. |
createdBy | IDs and references that created the CustomObject. |
lastModifiedBy | IDs and references that last modified the CustomObject. |
CustomObjectQueryResult
offsetInt | |
countInt | |
totalLong | |
existsBoolean | |
resultsArray of CustomObject |
ReferencedResource
BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta
pathString | |
objsArray of ReferenceExpandable |
Input types
CustomObjectDraft
An input object used to create a new, or update an existing Custom Object.
The value should be passed in a form of escaped JSON.
Example for
value field:"{ \"stringField\": \"myVal\", \"numberField\": 123, \"boolField\": false, \"nestedObject\": { \"nestedObjectKey\": \"anotherValue\" }, \"dateField\": \"2018-10-12T14:00:00.000Z\" }"
keyString | User-defined unique identifier of the CustomObject within the defined container. |
containerString | Namespace to group CustomObjects. |
valueString | The value should be passed in a form of escaped JSON. Example for
value field: |
versionLong | Current version of the CustomObject. |