Price Lists API Routes
A price list is a group of prices applied if the specified conditions and rules are satisfied.
Price lists are useful for sales or special prices for special conditions, such as applying prices for a set of customers.
These API routes allow admin users to manage price lists.
GET /admin/price-lists#
List Price Lists
Retrieve a list of price lists. The price lists can be filtered by fields such as id. The price lists can also be sorted or paginated.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.offsetnumberOptionallimitnumberOptionalorderstringOptional-.qstringOptionalidstring | string[]Optionalstarts_atobjectOptionalends_atobjectOptionalstatus("active")[] | ("draft")[]Optionalrules_countnumber[]Optional$andobject[]Optional$orobject[]Optionalwith_deletedbooleanOptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumberprice_listsobject[]The list of price lists.
price_listsobject[]estimate_countnumberOptional400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/price-lists#
Create Price List
Create a price list.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.qstringOptionalidstring | string[]Optionalstarts_atobjectOptionalends_atobjectOptionalstatus("draft")[] | ("active")[]Optionalrules_countnumber[]OptionallimitnumberOptionaloffsetnumberOptionalorderstringOptional-.with_deletedbooleanOptional$andobject[]Optional$orobject[]OptionalRequest body (application/json)
titlestringdescriptionstringstarts_atstringOptionalends_atstringOptionalstatus"active" | "draft"Optionaltype"sale" | "override"OptionalrulesobjectOptionalpricesobject[]OptionalThe price list's prices.
pricesobject[]OptionalmetadataobjectOptionalRequest examples
Responses
200 OK
price_listobjectThe price list's details.
price_listobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
price-list.created: Emitted when price lists are created.
GET /admin/price-lists/{id}#
Get a Price List
Retrieve a price list by its ID. You can expand the price list's relations or select the fields that should be returned.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request examples
Responses
200 OK
price_listobjectThe price list's details.
price_listobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/price-lists/{id}#
Update a Price List
Update a price list's details.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
titlestringOptionaldescriptionstringOptionalstarts_atstringOptionalends_atstringOptionalstatus"active" | "draft"Optionaltype"sale" | "override"OptionalrulesobjectOptionalmetadataobjectOptionalRequest examples
Responses
200 OK
price_listobjectThe price list's details.
price_listobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
price-list.updated: Emitted when price lists are updated.
DELETE /admin/price-lists/{id}#
Delete a Price List
Delete a price list.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest examples
Responses
200 OK
idstringobjectstringDefault: "price_list"
deletedboolean400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
price-list.deleted: Emitted when price lists are deleted.
GET /admin/price-lists/{id}/prices#
List Prices for a Price List
Retrieve a list of prices in a price list. The prices can be filtered by fields like FILTER FIELDS. The prices can also be paginated.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. Without prefix it will replace the entire default fields.Request examples
Responses
200 OK
limitnumberoffsetnumbercountnumberestimate_countnumberOptionalpricesobject[]The list of prices associated with the price list.
pricesobject[]400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/price-lists/{id}/prices/batch#
Manage Prices in Price List
Manage the prices of a price list to create, update, or delete them.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. Without prefix it will replace the entire default fields.Request body (application/json)
createobject[]OptionalThe prices to create.
createobject[]Optionalupdateobject[]OptionalThe prices to update.
updateobject[]Optionaldeletestring[]OptionalRequest examples
Responses
200 OK
createdobject[]The created prices.
createdobject[]updatedobject[]The updated prices.
updatedobject[]deletedobjectThe details of the deleted prices.
deletedobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
price-list.prices_added: Emitted when prices are added to a price list.price-list.prices_updated: Emitted when prices in a price list are updated.price-list.prices_removed: Emitted when prices are removed from a price list.
POST /admin/price-lists/{id}/products#
Remove Products from Price List
Remove products from a price list.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
removestring[]OptionalRequest examples
Responses
200 OK
price_listobjectThe price list's details.
price_listobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
price-list.prices_added: Emitted when prices are added to a price list.price-list.prices_updated: Emitted when prices in a price list are updated.price-list.prices_removed: Emitted when prices are removed from a price list.