Customer Groups

A Customer can be a member of a customer group (e.g. reseller, gold member). Special prices can be assigned to specific products based on a customer group.

Representations

CustomerGroup

  • id - String
    The unique ID of the customer group.
  • key - String - Optional
    User-specific unique identifier for the customer group.
  • version - Number
    The current version of the customer group.
  • createdAt - DateTime
  • lastModifiedAt - DateTime
  • name - String
  • custom - CustomFields - Optional

CustomerGroup fields that can be used in query predicates: name.

CustomerGroupDraft

  • key - String - Optional
    User-specific unique identifier for the customer group.
  • groupName - String - Required
  • custom - CustomFieldsDraft - Optional

Get CustomerGroup

Get CustomerGroup by ID

Endpoint: /{projectKey}/customer-groups/{id}
Method: GET
OAuth2 Scopes: view_customers:{projectKey}
Response Representation: CustomerGroup

Get CustomerGroup by Key

Gets a customer group by Key.

Endpoint: /{projectKey}/customer-groups/key={key}
Method: GET
OAuth2 Scopes: view_customers:{projectKey}
Response Representation: CustomerGroup

Query CustomerGroups

Endpoint: /{projectKey}/customer-groups
Method: GET
OAuth2 Scopes: view_customers:{projectKey}
Response Representation: PagedQueryResult with the results array of CustomerGroup
Query Parameters:

Create a CustomerGroup

Endpoint: /{projectKey}/customer-groups
Method: POST
OAuth2 Scopes: manage_customers:{projectKey}
Request Representation: CustomerGroupDraft
Response Representation: CustomerGroup

Update CustomerGroup

Update CustomerGroup by ID

Endpoint: /{projectKey}/customer-groups/{id}
Method: POST
OAuth2 Scopes: manage_customers:{projectKey}
Response Representation: CustomerGroup
Fields:

  • version - Number - Required
    The expected version of the customer group 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 UpdateAction - Required
    The list of update actions to be performed on the customer group.

Update CustomerGroup by Key

Updates a customer group by Key.

Endpoint: /{projectKey}/customer-groups/key={key}
Method: POST
OAuth2 Scopes: manage_customers:{projectKey}
Response Representation: CustomerGroup
Fields:

  • version - Number - Required
    The expected version of the customer group 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 UpdateAction - Required
    The list of update actions to be performed on the customer group.

Update Actions

Change Name

  • action - String - "changeName"
  • name - String - Required

Set Key

  • action - String - "setKey"
  • key - String - Optional
    User-specific unique identifier for the customer group.

Set Custom Type

This action sets or removes the custom type for an existing customer group.

This action overwrites any existing custom type and fields.

Set Custom Field

Delete CustomerGroup

Delete CustomerGroup by ID

Endpoint: /{projectKey}/customer-groups/{id}
Method: DELETE
OAuth2 Scopes: manage_customers:{projectKey}
Query Parameters:

  • version - Number - Required

Delete CustomerGroup by Key

Deletes a customer group by Key.

Endpoint: /{projectKey}/customer-groups/key={key}
Method: DELETE
OAuth2 Scopes: manage_customers:{projectKey}
Query Parameters:

  • version - Number - Required