commercetools.customizedata
Module commercetools.customizedata
API
Definitions
ballerinax/commercetools.customizedata Ballerina library
Overview
commercetools is a composable commerce platform that provides API-first building blocks for online storefronts, carts, orders, customers and catalogs. Its customization features let merchants model their own data: product types describe the attributes of products, types add custom fields to resources, and custom objects store arbitrary JSON values.
The commercetools Customize Data connector lets Ballerina applications manage product types, types and custom objects in a commercetools Project. It supports version 1 of the commercetools HTTP API.
Key features
- Create, query, update and delete product types, by ID or by key
- Create, query, update and delete types that add custom fields to commercetools resources
- Store, query and delete custom objects, grouped by container and key
- Versioned update actions that protect against concurrent modification
- Authenticate with the OAuth 2.0 client credentials grant using a commercetools API client
Setup guide
To use the commercetools Customize Data connector, you need a commercetools Project and an API client that can access its product types, types and custom objects. If you do not have a commercetools account, you can sign up for a trial here.
Step 1: Create an API client
-
Open the Merchant Center and select your Project.
-
Go to Settings → Developer settings and select Create new API client.
-
Give the client a name and select the scopes for the resources you use:
view_product_typesandmanage_product_types,view_typesandmanage_types, andview_key_value_documentsandmanage_key_value_documents.
Step 2: Note down the credentials
After the client is created, copy the following values. The client secret is shown only once.
- Project key
- Client ID
- Client secret
- Auth URL, for example
https://auth.europe-west1.gcp.commercetools.com - API URL, for example
https://api.europe-west1.gcp.commercetools.com
The token URL is the auth URL followed by /oauth/token.
Quickstart
To use the commercetools Customize Data connector in your Ballerina application, update the .bal file as follows:
Step 1: Import the module
Import the commercetools.customizedata module.
import ballerinax/commercetools.customizedata;
Step 2: Instantiate a new connector
- Create a
Config.tomlfile and configure the credentials obtained in the steps above:
clientId = "<Client ID>" clientSecret = "<Client Secret>" tokenUrl = "<Auth URL>/oauth/token" apiUrl = "<API URL>" projectKey = "<Project key>"
- Create a
customizedata:ConnectionConfigwith the OAuth 2.0 client credentials and initialize the connector with it.
configurable string clientId = ?; configurable string clientSecret = ?; configurable string tokenUrl = ?; configurable string apiUrl = ?; configurable string projectKey = ?; final customizedata:Client commercetools = check new ({ auth: { tokenUrl, clientId, clientSecret } }, apiUrl);
Step 3: Invoke the connector operation
Now, utilize the available connector operations.
List the product types
public function main() returns error? { customizedata:ProductTypePagedQueryResponse _ = check commercetools->listProductTypes(projectKey); }
Step 4: Run the Ballerina application
bal run
Examples
The commercetools Customize Data connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:
-
Product type setup - Create a product type with a text attribute, add a numeric attribute with a versioned update action, verify both attributes by key and optionally delete the product type.
-
Custom object settings - Store a custom object in a container, read it back, list the objects of the container page by page and optionally delete the object.
Clients
commercetools.customizedata: Client
Constructor
Gets invoked to initialize the connector.
init (ConnectionConfig config, string serviceUrl)- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.us-central1.gcp.commercetools.com" - URL of the target service
listCustomObjects
function listCustomObjects(string projectKey, map<string|string[]> headers, *ListCustomObjectsQueries queries) returns CustomObjectPagedQueryResponse|errorQuery custom objects
Parameters
- projectKey string - The
keyof the Project
- queries *ListCustomObjectsQueries - Queries to be sent with the request
Return Type
- CustomObjectPagedQueryResponse|error - A paged list of custom objects
createOrUpdateCustomObject
function createOrUpdateCustomObject(string projectKey, CustomObjectDraft payload, map<string|string[]> headers, *CreateOrUpdateCustomObjectQueries queries) returns CustomObject|errorCreate or update a custom object
Parameters
- projectKey string - The
keyof the Project
- payload CustomObjectDraft - Custom object draft with container, key, value and optional version
- queries *CreateOrUpdateCustomObjectQueries - Queries to be sent with the request
Return Type
- CustomObject|error - The updated custom object
listCustomObjectsByContainer
function listCustomObjectsByContainer(string projectKey, string container, map<string|string[]> headers, *ListCustomObjectsByContainerQueries queries) returns CustomObjectPagedQueryResponse|errorQuery custom objects in a container
Parameters
- projectKey string - The
keyof the Project
- container string - The container of the Custom Objects
- queries *ListCustomObjectsByContainerQueries - Queries to be sent with the request
Return Type
- CustomObjectPagedQueryResponse|error - A paged list of custom objects in the container
getCustomObjectByContainerAndKey
function getCustomObjectByContainerAndKey(string projectKey, string container, string 'key, map<string|string[]> headers, *GetCustomObjectByContainerAndKeyQueries queries) returns CustomObject|errorGet a custom object by container and key
Parameters
- projectKey string - The
keyof the Project
- container string - The container of the Custom Objects
- 'key string - User-defined unique identifier of the resource (or of the Custom Object within its container)
- queries *GetCustomObjectByContainerAndKeyQueries - Queries to be sent with the request
Return Type
- CustomObject|error - The requested custom object
deleteCustomObjectByContainerAndKey
function deleteCustomObjectByContainerAndKey(string projectKey, string container, string 'key, map<string|string[]> headers, *DeleteCustomObjectByContainerAndKeyQueries queries) returns CustomObject|errorDelete a custom object by container and key
Parameters
- projectKey string - The
keyof the Project
- container string - The container of the Custom Objects
- 'key string - User-defined unique identifier of the resource (or of the Custom Object within its container)
- queries *DeleteCustomObjectByContainerAndKeyQueries - Queries to be sent with the request
Return Type
- CustomObject|error - The deleted custom object
listProductTypes
function listProductTypes(string projectKey, map<string|string[]> headers, *ListProductTypesQueries queries) returns ProductTypePagedQueryResponse|errorQuery product types
Parameters
- projectKey string - The
keyof the Project
- queries *ListProductTypesQueries - Queries to be sent with the request
Return Type
- ProductTypePagedQueryResponse|error - A paged list of product types
createProductType
function createProductType(string projectKey, ProductTypeDraft payload, map<string|string[]> headers, *CreateProductTypeQueries queries) returns ProductType|errorCreate a product type
Parameters
- projectKey string - The
keyof the Project
- payload ProductTypeDraft - Product type draft with key, name, description and attribute definitions
- queries *CreateProductTypeQueries - Queries to be sent with the request
Return Type
- ProductType|error - The created product type
getProductTypeByKey
function getProductTypeByKey(string projectKey, string 'key, map<string|string[]> headers, *GetProductTypeByKeyQueries queries) returns ProductType|errorGet a product type by key
Parameters
- projectKey string - The
keyof the Project
- 'key string - User-defined unique identifier of the resource (or of the Custom Object within its container)
- queries *GetProductTypeByKeyQueries - Queries to be sent with the request
Return Type
- ProductType|error - The requested product type
updateProductTypeByKey
function updateProductTypeByKey(string projectKey, string 'key, ProductTypeUpdate payload, map<string|string[]> headers, *UpdateProductTypeByKeyQueries queries) returns ProductType|errorUpdate a product type by key
Parameters
- projectKey string - The
keyof the Project
- 'key string - User-defined unique identifier of the resource (or of the Custom Object within its container)
- payload ProductTypeUpdate - Version and update actions to apply to the product type identified by key
- queries *UpdateProductTypeByKeyQueries - Queries to be sent with the request
Return Type
- ProductType|error - The updated product type
deleteProductTypeByKey
function deleteProductTypeByKey(string projectKey, string 'key, map<string|string[]> headers, *DeleteProductTypeByKeyQueries queries) returns ProductType|errorDelete a product type by key
Parameters
- projectKey string - The
keyof the Project
- 'key string - User-defined unique identifier of the resource (or of the Custom Object within its container)
- queries *DeleteProductTypeByKeyQueries - Queries to be sent with the request
Return Type
- ProductType|error - The deleted product type
getProductTypeById
function getProductTypeById(string projectKey, string id, map<string|string[]> headers, *GetProductTypeByIdQueries queries) returns ProductType|errorGet a product type by ID
Parameters
- projectKey string - The
keyof the Project
- id string - System-generated unique identifier of the resource
- queries *GetProductTypeByIdQueries - Queries to be sent with the request
Return Type
- ProductType|error - The requested product type
updateProductTypeById
function updateProductTypeById(string projectKey, string id, ProductTypeUpdate payload, map<string|string[]> headers, *UpdateProductTypeByIdQueries queries) returns ProductType|errorUpdate a product type by ID
Parameters
- projectKey string - The
keyof the Project
- id string - System-generated unique identifier of the resource
- payload ProductTypeUpdate - Version and update actions to apply to the product type identified by ID
- queries *UpdateProductTypeByIdQueries - Queries to be sent with the request
Return Type
- ProductType|error - The updated product type
deleteProductTypeById
function deleteProductTypeById(string projectKey, string id, map<string|string[]> headers, *DeleteProductTypeByIdQueries queries) returns ProductType|errorDelete a product type by ID
Parameters
- projectKey string - The
keyof the Project
- id string - System-generated unique identifier of the resource
- queries *DeleteProductTypeByIdQueries - Queries to be sent with the request
Return Type
- ProductType|error - The deleted product type
listTypes
function listTypes(string projectKey, map<string|string[]> headers, *ListTypesQueries queries) returns TypePagedQueryResponse|errorQuery types
Parameters
- projectKey string - The
keyof the Project
- queries *ListTypesQueries - Queries to be sent with the request
Return Type
- TypePagedQueryResponse|error - A paged list of types
createType
function createType(string projectKey, TypeDraft payload, map<string|string[]> headers, *CreateTypeQueries queries) returns Type|errorCreate a type
Parameters
- projectKey string - The
keyof the Project
- payload TypeDraft - Type draft with key, name, resource type IDs and field definitions
- queries *CreateTypeQueries - Queries to be sent with the request
getTypeByKey
function getTypeByKey(string projectKey, string 'key, map<string|string[]> headers, *GetTypeByKeyQueries queries) returns Type|errorGet a type by key
Parameters
- projectKey string - The
keyof the Project
- 'key string - User-defined unique identifier of the resource (or of the Custom Object within its container)
- queries *GetTypeByKeyQueries - Queries to be sent with the request
updateTypeByKey
function updateTypeByKey(string projectKey, string 'key, TypeUpdate payload, map<string|string[]> headers, *UpdateTypeByKeyQueries queries) returns Type|errorUpdate a type by key
Parameters
- projectKey string - The
keyof the Project
- 'key string - User-defined unique identifier of the resource (or of the Custom Object within its container)
- payload TypeUpdate - Version and update actions to apply to the type identified by key
- queries *UpdateTypeByKeyQueries - Queries to be sent with the request
deleteTypeByKey
function deleteTypeByKey(string projectKey, string 'key, map<string|string[]> headers, *DeleteTypeByKeyQueries queries) returns Type|errorDelete a type by key
Parameters
- projectKey string - The
keyof the Project
- 'key string - User-defined unique identifier of the resource (or of the Custom Object within its container)
- queries *DeleteTypeByKeyQueries - Queries to be sent with the request
getTypeById
function getTypeById(string projectKey, string id, map<string|string[]> headers, *GetTypeByIdQueries queries) returns Type|errorGet a type by ID
Parameters
- projectKey string - The
keyof the Project
- id string - System-generated unique identifier of the resource
- queries *GetTypeByIdQueries - Queries to be sent with the request
updateTypeById
function updateTypeById(string projectKey, string id, TypeUpdate payload, map<string|string[]> headers, *UpdateTypeByIdQueries queries) returns Type|errorUpdate a type by ID
Parameters
- projectKey string - The
keyof the Project
- id string - System-generated unique identifier of the resource
- payload TypeUpdate - Version and update actions to apply to the type identified by ID
- queries *UpdateTypeByIdQueries - Queries to be sent with the request
deleteTypeById
function deleteTypeById(string projectKey, string id, map<string|string[]> headers, *DeleteTypeByIdQueries queries) returns Type|errorDelete a type by ID
Parameters
- projectKey string - The
keyof the Project
- id string - System-generated unique identifier of the resource
- queries *DeleteTypeByIdQueries - Queries to be sent with the request
Records
commercetools.customizedata: Address
Fields
- Fields Included from *BaseAddress
- country CountryCode
- lastName string
- city string
- postalCode string
- title string
- building string
- streetName string
- company string
- id string
- state string
- department string
- fax string
- key string
- email string
- pOBox string
- streetNumber string
- mobile string
- externalId string
- additionalAddressInfo string
- firstName string
- phone string
- additionalStreetInfo string
- salutation string
- region string
- apartment string
- anydata...
- country? CountryCode -
- lastName? string -
- city? string -
- postalCode? string -
- title? string -
- building? string -
- streetName? string -
- company? string -
- id? string -
- state? string -
- department? string -
- fax? string -
- 'key? string -
- email? string -
- pOBox? string -
- streetNumber? string -
- custom? CustomFields -
- mobile? string -
- externalId? string -
- additionalAddressInfo? string -
- firstName? string -
- phone? string -
- additionalStreetInfo? string -
- salutation? string -
- region? string -
- apartment? string -
commercetools.customizedata: AttributeDefinition
Fields
- isRequired boolean -
- level AttributeLevelEnum -
- name string -
- attributeConstraint AttributeConstraintEnum -
- inputHint TextInputHint -
- label LocalizedString -
- isSearchable boolean -
- 'type AttributeType -
- inputTip? LocalizedString -
commercetools.customizedata: AttributeDefinitionDraft
Fields
- isRequired boolean -
- level? AttributeLevelEnum -
- name string -
- attributeConstraint? AttributeConstraintEnum -
- inputHint? TextInputHint -
- label LocalizedString -
- isSearchable? boolean -
- 'type AttributeType -
- inputTip? LocalizedString -
commercetools.customizedata: AttributeType
Fields
- name string -
commercetools.customizedata: Attribution
Fields
- clientId? string -
- 'source AttributionSource -
commercetools.customizedata: BaseAddress
Fields
- country CountryCode -
- lastName? string -
- city? string -
- postalCode? string -
- title? string -
- building? string -
- streetName? string -
- company? string -
- id? string -
- state? string -
- department? string -
- fax? string -
- 'key? string -
- email? string -
- pOBox? string -
- streetNumber? string -
- mobile? string -
- externalId? string -
- additionalAddressInfo? string -
- firstName? string -
- phone? string -
- additionalStreetInfo? string -
- salutation? string -
- region? string -
- apartment? string -
commercetools.customizedata: BaseResource
Fields
- createdAt string -
- lastModifiedAt string -
- id string -
- version int -
commercetools.customizedata: ClientLogging
Fields
- anonymousId? string -
- clientId? string -
- externalUserId? string -
- associate? CustomerReference -
- customer? CustomerReference -
commercetools.customizedata: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth OAuth2ClientCredentialsGrantConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - Configurations related to HTTP/2 protocol
- timeout decimal(default 30) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded/x-forwardedheader
- followRedirects? FollowRedirects - Configurations associated with Redirection
- poolConfig? PoolConfiguration - Configurations associated with request pooling
- cache CacheConfig(default {}) - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding) header
- circuitBreaker? CircuitBreakerConfig - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig? RetryConfig - Configurations associated with retrying
- cookieConfig? CookieConfig - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket? ClientSecureSocket - SSL/TLS-related options
- proxy? ProxyConfig - Proxy server related options
- socketConfig ClientSocketConfig(default {}) - Provides settings related to client socket configuration
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
- laxDataBinding boolean(default true) - Enables relaxed data binding on the client side. When enabled,
nilvalues are treated as optional, and absent fields are handled asnilabletypes. Enabled by default.
commercetools.customizedata: CreatedBy
Fields
- Fields Included from *ClientLogging
- anonymousId string
- clientId string
- externalUserId string
- associate CustomerReference
- customer CustomerReference
- anydata...
- anonymousId? string -
- clientId? string -
- externalUserId? string -
- attributedTo? Attribution -
- associate? CustomerReference -
- customer? CustomerReference -
commercetools.customizedata: CreateOrUpdateCustomObjectQueries
Represents the Queries record for the operation: createOrUpdateCustomObject
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
commercetools.customizedata: CreateProductTypeQueries
Represents the Queries record for the operation: createProductType
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
commercetools.customizedata: CreateTypeQueries
Represents the Queries record for the operation: createType
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
commercetools.customizedata: Customer
Fields
- Fields Included from *BaseResource
- lastName? string -
- addresses Address[] -
- lastModifiedAt string -
- companyName? string -
- vatId? string -
- title? string -
- locale? Locale -
- shippingAddressIds string[] -
- isEmailVerified boolean -
- createdAt string -
- password? string -
- id string -
- authenticationMode AuthenticationMode -
- 'key? string -
- email string -
- customerGroup? CustomerGroupReference -
- stores StoreKeyReference[] -
- lastModifiedBy? LastModifiedBy -
- custom? CustomFields -
- externalId? string -
- dateOfBirth? string -
- customerGroupAssignments CustomerGroupAssignment[] -
- customerNumber? string -
- defaultShippingAddressId? string -
- billingAddressIds string[] -
- version int -
- defaultBillingAddressId? string -
- firstName? string -
- createdBy? CreatedBy -
- middleName? string -
- salutation? string -
commercetools.customizedata: CustomerGroup
Fields
- Fields Included from *BaseResource
- createdAt string -
- lastModifiedAt string -
- createdBy? CreatedBy -
- lastModifiedBy? LastModifiedBy -
- custom? CustomFields -
- name string -
- id string -
- version int -
- 'key? string -
commercetools.customizedata: CustomerGroupAssignment
Fields
- customerGroup CustomerGroupReference -
commercetools.customizedata: CustomerGroupReference
Fields
- Fields Included from *Reference
- typeId ReferenceTypeId
- id string
- anydata...
- obj? CustomerGroup -
- typeId ReferenceTypeId -
- id string -
commercetools.customizedata: CustomerReference
Fields
- Fields Included from *Reference
- typeId ReferenceTypeId
- id string
- anydata...
- obj? Customer -
- typeId ReferenceTypeId -
- id string -
commercetools.customizedata: CustomFields
Fields
- 'type TypeReference -
- fields FieldContainer -
commercetools.customizedata: CustomObject
Fields
- Fields Included from *BaseResource
- container string -
- createdAt string -
- lastModifiedAt string -
- createdBy? CreatedBy -
- lastModifiedBy? LastModifiedBy -
- id string -
- version int -
- value anydata -
- 'key string -
commercetools.customizedata: CustomObjectDraft
Fields
- container string -
- value anydata -
- version? int -
- 'key string -
commercetools.customizedata: CustomObjectPagedQueryResponse
Fields
- total? int -
- offset int -
- 'limit int -
- count int -
- results CustomObject[] -
commercetools.customizedata: DeleteCustomObjectByContainerAndKeyQueries
Represents the Queries record for the operation: deleteCustomObjectByContainerAndKey
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
- version? int - Expected current version of the resource; the request fails with a concurrency error if it does not match
- dataErasure? boolean - If true, personal data related to the resource is erased from all related resources and logs (GDPR). Defaults to false
commercetools.customizedata: DeleteProductTypeByIdQueries
Represents the Queries record for the operation: deleteProductTypeById
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
- version int - Expected current version of the resource; the request fails with a concurrency error if it does not match
commercetools.customizedata: DeleteProductTypeByKeyQueries
Represents the Queries record for the operation: deleteProductTypeByKey
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
- version int - Expected current version of the resource; the request fails with a concurrency error if it does not match
commercetools.customizedata: DeleteTypeByIdQueries
Represents the Queries record for the operation: deleteTypeById
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
- version int - Expected current version of the resource; the request fails with a concurrency error if it does not match
commercetools.customizedata: DeleteTypeByKeyQueries
Represents the Queries record for the operation: deleteTypeByKey
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
- version int - Expected current version of the resource; the request fails with a concurrency error if it does not match
commercetools.customizedata: FieldContainer
Fields
- string... - Rest field
commercetools.customizedata: FieldDefinition
Fields
- name string -
- inputHint? TypeTextInputHint -
- label LocalizedString -
- 'type FieldType -
- required boolean -
commercetools.customizedata: FieldType
Fields
- name string -
commercetools.customizedata: GetCustomObjectByContainerAndKeyQueries
Represents the Queries record for the operation: getCustomObjectByContainerAndKey
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
commercetools.customizedata: GetProductTypeByIdQueries
Represents the Queries record for the operation: getProductTypeById
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
commercetools.customizedata: GetProductTypeByKeyQueries
Represents the Queries record for the operation: getProductTypeByKey
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
commercetools.customizedata: GetTypeByIdQueries
Represents the Queries record for the operation: getTypeById
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
commercetools.customizedata: GetTypeByKeyQueries
Represents the Queries record for the operation: getTypeByKey
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
commercetools.customizedata: KeyReference
Fields
- typeId ReferenceTypeId -
- 'key string -
commercetools.customizedata: LastModifiedBy
Fields
- Fields Included from *ClientLogging
- anonymousId string
- clientId string
- externalUserId string
- associate CustomerReference
- customer CustomerReference
- anydata...
- anonymousId? string -
- clientId? string -
- externalUserId? string -
- attributedTo? Attribution -
- associate? CustomerReference -
- customer? CustomerReference -
commercetools.customizedata: ListCustomObjectsByContainerQueries
Represents the Queries record for the operation: listCustomObjectsByContainer
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
- offset? int - Number of results to skip, used for pagination. Defaults to 0, maximum 10000
- withTotal? boolean - If false, the total count is not calculated, which improves performance of paged queries. Defaults to true
- 'limit? int - Number of results to return per page. Defaults to 20, maximum 500
- 'where? string[] - Query predicate to filter the results
- sort? string[] - Sort expression; can be repeated to sort by several fields, for example
createdAt desc
commercetools.customizedata: ListCustomObjectsQueries
Represents the Queries record for the operation: listCustomObjects
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
- offset? int - Number of results to skip, used for pagination. Defaults to 0, maximum 10000
- withTotal? boolean - If false, the total count is not calculated, which improves performance of paged queries. Defaults to true
- 'limit? int - Number of results to return per page. Defaults to 20, maximum 500
- 'where? string[] - Query predicate to filter the results
- sort? string[] - Sort expression; can be repeated to sort by several fields, for example
createdAt desc
commercetools.customizedata: ListProductTypesQueries
Represents the Queries record for the operation: listProductTypes
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
- offset? int - Number of results to skip, used for pagination. Defaults to 0, maximum 10000
- withTotal? boolean - If false, the total count is not calculated, which improves performance of paged queries. Defaults to true
- 'limit? int - Number of results to return per page. Defaults to 20, maximum 500
- 'where? string[] - Query predicate to filter the results
- sort? string[] - Sort expression; can be repeated to sort by several fields, for example
createdAt desc
commercetools.customizedata: ListTypesQueries
Represents the Queries record for the operation: listTypes
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
- offset? int - Number of results to skip, used for pagination. Defaults to 0, maximum 10000
- withTotal? boolean - If false, the total count is not calculated, which improves performance of paged queries. Defaults to true
- 'limit? int - Number of results to return per page. Defaults to 20, maximum 500
- 'where? string[] - Query predicate to filter the results
- sort? string[] - Sort expression; can be repeated to sort by several fields, for example
createdAt desc
commercetools.customizedata: LocalizedString
Fields
- string... - Rest field
commercetools.customizedata: OAuth2ClientCredentialsGrantConfig
OAuth2 Client Credentials Grant Configs
Fields
- Fields Included from *OAuth2ClientCredentialsGrantConfig
- tokenUrl string(default "https://auth.us-central1.gcp.commercetools.com/oauth/token") - Token URL
commercetools.customizedata: ProductType
Fields
- Fields Included from *BaseResource
- createdAt string -
- lastModifiedAt string -
- createdBy? CreatedBy -
- lastModifiedBy? LastModifiedBy -
- name string -
- description string -
- attributes? AttributeDefinition[] -
- id string -
- version int -
- 'key? string -
commercetools.customizedata: ProductTypeDraft
Fields
- name string -
- description string -
- attributes? AttributeDefinitionDraft[] -
- 'key? string -
commercetools.customizedata: ProductTypePagedQueryResponse
Fields
- total? int -
- offset int -
- 'limit int -
- count int -
- results ProductType[] -
commercetools.customizedata: ProductTypeUpdate
Fields
- version int -
- actions ProductTypeUpdateAction[] -
commercetools.customizedata: ProductTypeUpdateAction
Fields
- action string -
commercetools.customizedata: Reference
Fields
- typeId ReferenceTypeId -
- id string -
commercetools.customizedata: StoreKeyReference
Fields
- Fields Included from *KeyReference
- typeId ReferenceTypeId
- key string
- anydata...
- typeId ReferenceTypeId -
- 'key string -
commercetools.customizedata: Type
Fields
- Fields Included from *BaseResource
- createdAt string -
- lastModifiedAt string -
- createdBy? CreatedBy -
- lastModifiedBy? LastModifiedBy -
- name LocalizedString -
- description? LocalizedString -
- fieldDefinitions FieldDefinition[] -
- id string -
- version int -
- 'key string -
- resourceTypeIds ResourceTypeId[] -
commercetools.customizedata: TypeDraft
Fields
- name LocalizedString -
- description? LocalizedString -
- fieldDefinitions? FieldDefinition[] -
- 'key string -
- resourceTypeIds ResourceTypeId[] -
commercetools.customizedata: TypePagedQueryResponse
Fields
- total? int -
- offset int -
- 'limit int -
- count int -
- results Type[] -
commercetools.customizedata: TypeReference
Fields
- Fields Included from *Reference
- typeId ReferenceTypeId
- id string
- anydata...
- obj? Type -
- typeId ReferenceTypeId -
- id string -
commercetools.customizedata: TypeUpdate
Fields
- version int -
- actions TypeUpdateAction[] -
commercetools.customizedata: TypeUpdateAction
Fields
- action string -
commercetools.customizedata: UpdateProductTypeByIdQueries
Represents the Queries record for the operation: updateProductTypeById
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
commercetools.customizedata: UpdateProductTypeByKeyQueries
Represents the Queries record for the operation: updateProductTypeByKey
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
commercetools.customizedata: UpdateTypeByIdQueries
Represents the Queries record for the operation: updateTypeById
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
commercetools.customizedata: UpdateTypeByKeyQueries
Represents the Queries record for the operation: updateTypeByKey
Fields
- expand? string[] - A field to expand. Reference fields can be expanded to include the referenced resource inline
Union types
commercetools.customizedata: ResourceTypeId
ResourceTypeId
commercetools.customizedata: TextInputHint
TextInputHint
commercetools.customizedata: AttributeConstraintEnum
AttributeConstraintEnum
commercetools.customizedata: AuthenticationMode
AuthenticationMode
commercetools.customizedata: AttributionSource
AttributionSource
commercetools.customizedata: TypeTextInputHint
TypeTextInputHint
commercetools.customizedata: AttributeLevelEnum
AttributeLevelEnum
commercetools.customizedata: ReferenceTypeId
ReferenceTypeId
String types
Import
import ballerinax/commercetools.customizedata;Metadata
Released date: 1 day ago
Version: 2.0.0
License: Apache-2.0
Security
Direct vulnerabilities: No known direct vulnerabilities
Indirect vulnerabilities:
Checked on 2026-11-21 via OSV.dev
Compatibility
Platform: any
Ballerina version: 2201.12.0
GraalVM compatible: Yes
Pull count
Total: 51
Current verison: 1
Weekly downloads
Keywords
Vendor/Commercetools
Area/E-Commerce
Type/Connector
Contributors