Skip to main content

Class: AdminCustomerGroupsResource

Hierarchy

  • default

    AdminCustomerGroupsResource

Methods

addCustomers

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

Add multiple customers to a customer group.

Parameters

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

Returns

ResponsePromise<AdminCustomerGroupsRes>

Defined in

medusa-js/src/resources/admin/customer-groups.ts:112


create

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

Create a customer group.

Parameters

NameTypeDescription
payloadAdminPostCustomerGroupsReqcustomer group info
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminCustomerGroupsRes>

Defined in

medusa-js/src/resources/admin/customer-groups.ts:26


delete

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

Deletes a customer group.

Parameters

NameTypeDescription
idstringid of the customer group
customHeadersRecord<string, any>

Returns

ResponsePromise<DeleteResponse>

Defined in

medusa-js/src/resources/admin/customer-groups.ts:77


list

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

Lists customer groups.

Parameters

NameTypeDescription
query?AdminGetCustomerGroupsParamsoptional
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminCustomerGroupsListRes>

Defined in

medusa-js/src/resources/admin/customer-groups.ts:91


listCustomers

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

List and count customers that belong to provided customer groups.

Parameters

NameTypeDescription
idstringcustomer group id
query?AdminGetCustomersParamsparams for filtering customers
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminCustomersListRes>

Defined in

medusa-js/src/resources/admin/customer-groups.ts:144


removeCustomers

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

Remove multiple customers from a customer group.

Parameters

NameTypeDescription
idstringcustomer group id
payloadAdminDeleteCustomerGroupsGroupCustomerBatchReqan object which contains an array of customers ids which will be removed from the group
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminCustomerGroupsRes>

Defined in

medusa-js/src/resources/admin/customer-groups.ts:128


retrieve

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

Retrieves a customer group.

Parameters

NameTypeDescription
idstringcustomer group id
query?AdminGetCustomerGroupsGroupParamspass query options such as "expand", "fields" etc.
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminCustomerGroupsRes>

Defined in

medusa-js/src/resources/admin/customer-groups.ts:41


update

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

Updates a customer group

Parameters

NameTypeDescription
idstringcustomer group id
payloadAdminPostCustomerGroupsGroupReqdata to update customer group with
customHeadersRecord<string, any>

Returns

ResponsePromise<AdminCustomerGroupsRes>

Defined in

medusa-js/src/resources/admin/customer-groups.ts:62