Skip to main content
Skip to main content

AdminCustomerGroupsResource

admin/customer-groups.AdminCustomerGroupsResource

Methods

addCustomers

addCustomers(id, payload, customHeaders?): ResponsePromise<AdminCustomerGroupsRes>

Add multiple customers to a customer group.

Parameters

idstringRequired
customer group id
an object which contains an array of customer ids which will be added to the group
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminCustomerGroupsRes>

ResponsePromiseResponsePromise<AdminCustomerGroupsRes>Required

create

create(payload, customHeaders?): ResponsePromise<AdminCustomerGroupsRes>

Create a customer group.

Parameters

customer group info
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminCustomerGroupsRes>

ResponsePromiseResponsePromise<AdminCustomerGroupsRes>Required

delete

delete(id, customHeaders?): ResponsePromise<DeleteResponse>

Deletes a customer group.

Parameters

idstringRequired
id of the customer group
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<DeleteResponse>

ResponsePromiseResponsePromise<DeleteResponse>Required

list

list(query?, customHeaders?): ResponsePromise<AdminCustomerGroupsListRes>

Lists customer groups.

Parameters

optional
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminCustomerGroupsListRes>


listCustomers

listCustomers(id, query?, customHeaders?): ResponsePromise<AdminCustomersListRes>

List and count customers that belong to provided customer groups.

Parameters

idstringRequired
customer group id
params for filtering customers
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminCustomersListRes>

ResponsePromiseResponsePromise<AdminCustomersListRes>Required

removeCustomers

removeCustomers(id, payload, customHeaders?): ResponsePromise<AdminCustomerGroupsRes>

Remove multiple customers from a customer group.

Parameters

idstringRequired
customer group id
an object which contains an array of customers ids which will be removed from the group
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminCustomerGroupsRes>

ResponsePromiseResponsePromise<AdminCustomerGroupsRes>Required

retrieve

retrieve(id, query?, customHeaders?): ResponsePromise<AdminCustomerGroupsRes>

Retrieves a customer group.

Parameters

idstringRequired
customer group id
pass query options such as "expand", "fields" etc.
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminCustomerGroupsRes>

ResponsePromiseResponsePromise<AdminCustomerGroupsRes>Required

update

update(id, payload, customHeaders?): ResponsePromise<AdminCustomerGroupsRes>

Updates a customer group

Parameters

idstringRequired
customer group id
data to update customer group with
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminCustomerGroupsRes>

ResponsePromiseResponsePromise<AdminCustomerGroupsRes>Required
Was this section helpful?