Skip to main content
Skip to main content

AdminCollectionsResource

admin/collections.AdminCollectionsResource

Methods

addProducts

addProducts(id, payload, customHeaders?): ResponsePromise<AdminCollectionsRes>

Parameters

idstringRequired
the id of the Collection
an object which contains an array of Product IDs to add to the Product Collection
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminCollectionsRes>

ResponsePromiseResponsePromise<AdminCollectionsRes>Required

Description

Updates products associated with a Product Collection


create

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

Parameters

customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminCollectionsRes>

ResponsePromiseResponsePromise<AdminCollectionsRes>Required
Created collection.

Description

Creates a collection.


delete

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

Parameters

idstringRequired
id of collection to delete.
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<DeleteResponse>

ResponsePromiseResponsePromise<DeleteResponse>Required
Deleted response

Description

deletes a collection


list

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

Parameters

Query for searching collections
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminCollectionsListRes>

a list of collections matching the query.

Description

Lists collections matching a query


removeProducts

removeProducts(id, payload, customHeaders?): ResponsePromise<AdminDeleteProductsFromCollectionRes>

Parameters

idstringRequired
the id of the Collection
an object which contains an array of Product IDs to add to the Product Collection
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminDeleteProductsFromCollectionRes>

Description

Removes products associated with a Product Collection


retrieve

retrieve(id, customHeaders?): ResponsePromise<AdminCollectionsRes>

Parameters

idstringRequired
id of the collection to retrieve.
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminCollectionsRes>

ResponsePromiseResponsePromise<AdminCollectionsRes>Required
the collection with the given id

Description

get a collection


update

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

Parameters

idstringRequired
id of the collection to update.
update to apply to collection.
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminCollectionsRes>

ResponsePromiseResponsePromise<AdminCollectionsRes>Required
the updated collection.

Description

Updates a collection

Was this section helpful?