Core Resources
Collections
Collections allow to create and manage a logical list of Products called a Collection. A Collection contains an ordered list of Products and can be used for selective display of Products on chosen interfaces or for business logic automation (e.g. Discounts definition...).15 additions in V2, marked New
Everything marked New also works when you send X-Recharge-Version: 2021-11.
#The collection object
Attributes
- idintegerUnique numeric identifier for the
Collection. - The manual order of the
Productsin theCollection, as an array ofexternal_product_idvalues. - created_atdatetimeThe date and time when the
Collectionwas created. - descriptionstringThe
Collectiondescription. Used to store a detailed explanation of theCollectioncontent and its purpose. - sort_orderstringThe order in which the
Productsin the collection should appear.Possible valuesid-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-desctitle-asctitle-descmanual - titlestringThe title of the
Collection. A short descriptive definition of theCollection. - typestringThe type of the
Collection.Possible valuesautomaticmanualmanualstands forCollectionswhich were manually created ie. when the products where explicitly selected to be part of theCollection. - updated_atdatetimeThe date and time when the
Collectionwas last updated.
{
"id": 4021,
"created_at": "2021-08-30T17:25:57+00:00",
"description": "August 2021 cat products new release.",
"manual_sort_order": [],
"sort_order": "id-desc",
"title": "Cats Summer Collection",
"type": "manual",
"updated_at": "2021-08-30T17:25:57+00:00"
}#Create a collection
POST/collections
Create a
Collection in Recharge.Scope
write_productsReturns
201 Created.Body parameters
- The
Collectiondescription. Used to store a detailed explanation of theCollectioncontent and its purpose. - sort_orderstringThe order in which the
Productsin the collection should appear.Possible valuesid-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-desctitle-asctitle-descmanual - The title of the
Collection. A short descriptive definition of theCollection. - The type of the
Collection. Defaults tomanual. It cannot be changed after the collection is created.Possible valuesautomaticmanual
curl -X POST 'https://api.rechargeapps.com/collections' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"description": "cat products new release",
"title": "Cats Spring 2022"
}'{
"collection": {
"id": 134157,
"created_at": "2022-03-29T04:57:36+00:00",
"description": "cat products new release",
"manual_sort_order": [],
"sort_order": "id-desc",
"title": "Cats Spring 2022",
"type": "manual",
"updated_at": "2020-12-17T18:50:39+00:00"
}
}#Retrieve a collection
GET/collections/{id}
Retrieve one
Collection using collection_id.Scope
read_productsResponse attributes
curl 'https://api.rechargeapps.com/collections/134157' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"collection": {
"id": 134157,
"created_at": "2022-03-29T04:57:36+00:00",
"description": "cat products new release",
"manual_sort_order": [],
"sort_order": "id-desc",
"title": "Cats Spring 2022",
"type": "manual",
"updated_at": "2022-03-29T04:57:36+00:00"
}
}#Update a collection
PUT/collections/{id}
Modify an existing
Collection to match the specified parameters.Scope
write_productstype cannot be updated; sending it returns a 422 error.Body parameters
- descriptionstringThe
Collectiondescription. Used to store a detailed explanation of theCollectioncontent and its purpose. - sort_orderstringThe order in which the
Productsin the collection should appear.Possible valuesid-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-desctitle-asctitle-descmanual - titlestringThe title of the
Collection. A short descriptive definition of theCollection. - An array of
external_product_idvalues to move to the top of the manual order of theCollection, in the order given. Products that are not in the collection are ignored and products left out keep their relative order.
Response attributes
curl -X PUT 'https://api.rechargeapps.com/collections/134157' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"sort_order": "title-asc"
}'{
"collection": {
"id": 134157,
"created_at": "2022-03-29T04:57:36+00:00",
"description": "cats products new release",
"manual_sort_order": [],
"sort_order": "title-asc",
"title": "Cats Spring 2022",
"type": "manual",
"updated_at": "2022-03-29T05:27:39+00:00"
}
}#Delete a collection
DELETE/collections/{id}
Delete a
CollectionScope
write_productsFor safety and good UX, you can only delete a
Collection if it is not in use in the Customer PortalResponse attributes
curl -X DELETE 'https://api.rechargeapps.com/collections/134129' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{}#List collections
GET/collections
Return a list of
Collections in your store.HTTP request examples
GET /collections GET /collections?title=CatsScope
read_productsThe
title filter matches collections whose title contains the given text.Query parameters
- titlestringThe title of the
Collection. A short descriptive definition of theCollection. - Filter collections by id. If passing multiple values, must be comma separated.
- Return the collections of a specific type.Possible values
automaticmanual - The order in which the collections are returned. Defaults to
id-desc.Possible valuesid-ascid-desccreated_at-asccreated_at-descupdated_at-ascupdated_at-desctitle-asctitle-desc - The number of results to return. Defaults to 50; the maximum is 250.
- The cursor of the page to return, taken from
next_cursororprevious_cursorin a previous response. Onlylimitcan be sent together withcursor. - The page of results to show. Page-based pagination is deprecated in favor of
cursor.Only for API tokens that are still allowed to use page-based pagination; other tokens must usecursor.
curl 'https://api.rechargeapps.com/collections?limit=3' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"next_cursor": null,
"previous_cursor": null,
"collections": [
{
"id": 134136,
"created_at": "2022-03-28T15:38:27+00:00",
"description": "cat products august 2022",
"manual_sort_order": [],
"sort_order": "title-asc",
"title": "Cats",
"type": "manual",
"updated_at": "2022-03-28T15:38:27+00:00"
},
{
"id": 134129,
"created_at": "2022-03-28T12:27:03+00:00",
"description": "kitten accessories soft.",
"manual_sort_order": [],
"sort_order": "id-asc",
"title": "Soft Kitty",
"type": "manual",
"updated_at": "2022-02-23T11:27:34+00:00"
}
]
}#List collections products
GET/collection_products
Return a list of the product ids included in
Collections in your store.HTTP request examples
GET /collection_products GET /collection_products?collection_id=134157Scope
read_productsEach item of
collection_products contains collection_id, external_product_id, created_at and updated_at. collection_id is optional.Query parameters
- collection_idintegerThe id of the
Collectionfor which you want to see the products. - Return only the collection products with the given
external_product_id, which shows the collections a product belongs to. - The order in which the results are returned. Defaults to
id-desc.Possible valuesid-ascid-desc - The number of results to return. Defaults to 50; the maximum is 250.
- The cursor of the page to return, taken from
next_cursororprevious_cursorin a previous response. Onlylimitcan be sent together withcursor. - The page of results to show. Page-based pagination is deprecated in favor of
cursor.Only for API tokens that are still allowed to use page-based pagination; other tokens must usecursor.
Response attributes
- collection_idintegerUnique numeric identifier for a
Collection. - created_atdatetimeThe date and time when the
Productwas added to the collection. - external_product_idstringThe
external_product_id.ecommerceof theProduct. - updated_atdatetimeThe date and time when the
Productentry for thisCollectionwas last updated.
curl 'https://api.rechargeapps.com/collection_products?limit=3' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"next_cursor": null,
"previous_cursor": null,
"collection_products": [
{
"collection_id": 111733,
"created_at": "2022-03-30T18:12:09+00:00",
"external_product_id": "5",
"updated_at": "2022-03-30T18:12:09+00:00"
},
{
"collection_id": 111733,
"created_at": "2022-02-12T12:53:33+00:00",
"external_product_id": "2",
"updated_at": "2022-02-12T12:53:33+00:00"
},
{
"collection_id": 111735,
"created_at": "2022-02-12T06:46:49+00:00",
"external_product_id": "3",
"updated_at": "2022-02-12T06:46:49+00:00"
}
]
}#Add collection products
POST/collections/{id}/collection_products-bulk
Add products to a
Collection in Recharge.Scope
write_productsA request can add at most 250 distinct products, and a collection can hold at most 10,000 products. Adding a product that is already in the collection returns a
422 error.Body parameters
- An array of products and their collection definition to be added to the
Collection.Important: there is a set limit of 250 products that can be added per request.Show child attributesHide child attributes1
- The
external_product_id.ecommerceof theProduct.
Response attributes
- collection_idintegerUnique numeric identifier for a
Collection. - created_atdatetimeThe date and time when the
Productwas added to the collection. - external_product_idstringThe
external_product_id.ecommerceof theProduct. - updated_atdatetimeThe date and time when the
Productentry for thisCollectionwas last updated.
curl -X POST 'https://api.rechargeapps.com/collections/134129/collection_products-bulk' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"collection_products": [
{
"external_product_id": "7"
}
]
}'{
"collection_products": [
{
"collection_id": 111733,
"created_at": "2022-03-29T04:57:36+00:00",
"external_product_id": "7",
"updated_at": "2022-03-30T18:32:35+00:00"
}
]
}#Delete collection products
DELETE/collections/{id}/collection_products-bulk
Removes products from a
Collection in Recharge.Scope
write_productsBody parameters
- The array of products to be removed from the
Collectionidentified by theirexternal_product_id.Important: there is a set limit of 250 products that can be added per request.Show child attributesHide child attributes1
- The
external_product_id.ecommerceof theProduct.
Response attributes
curl '-X DELETE https://api.rechargeapps.com/collections/134129/collection_products-bulk' \
-H 'X-Recharge-Version: v2' \
-H 'Content-Type: application/json' \
-H 'X-Recharge-Access-Token: your_api_token' \
-d '{
"collection_products": [
{
"external_product_id": "7"
}
]
}'{}#Reorder collection productsNew
POST/collections/{id}/modify_sort
Changes the manual order of the
Products in a Collection and returns the updated collection. Send exactly one of move_to_top, move_to_bottom or move_to_position. The moved products keep their order relative to each other, and products that are not in the collection are ignored.Scope
write_productsBody parameters
- move_to_toparrayAn array of
external_product_idvalues to move to the top of the collection. - move_to_bottomarrayAn array of
external_product_idvalues to move to the bottom of the collection. - move_to_positionobjectAn object describing products to move to a specific position in the collection.
Show child attributesHide child attributes2
- external_product_idsarrayAn array of
external_product_idvalues to move. Required, with at least one value. - new_positionintegerThe position, starting at 1, to which the first of the products is moved. Required.
curl -X POST 'https://api.rechargeapps.com/collections/129593/modify_sort' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"collection": {
"id": 134129,
"created_at": "2026-03-02T15:04:31",
"description": "Our seasonal coffee selection",
"manual_sort_order": [
"7654321099",
"7654321098"
],
"sort_order": "manual",
"title": "Seasonal coffees",
"type": "manual",
"updated_at": "2026-03-04T09:12:00"
}
}