Pricing API
This documentation describes the snabble API endpoints related to the
management of product pricing configuration. These endpoints are
available on the api
subdomain. See General API
access for general information about api access.
Operations
Single pricing category operations
- Get pricing category:
GET /{project}/pricing/categories/id/{id}
- Create pricing category:
POST /{project}/pricing/categories
- Update pricing category:
PUT /{project}/pricing/categories/id/{id}
Multiple pricing categories operations
- Request pricing categories:
GET /{project}/pricing/categories
Single pricing operations
- Get pricing:
GET /{project}/pricing/products/sku/{sku}
- Delete pricing:
DELETE /{project}/pricing/products/sku/{sku}
- Update pricing:
PUT /{project}/pricing/products/sku/{sku}
Multiple pricing operations
- Batch update pricing:
POST /{project}/pricing/products/_batch
- Delete all pricings:
DELETE /{project}/pricing/products
Price operations
- Delete price:
DELETE /{project}/pricing/products/sku/category/{categoryID)
- Batch update prices:
POST /{project}/pricing/_batch
Data Model
PricingCategory
Object
Represents a named collection of shops which share the same pricing configuration (i.e. prices).
Example:
{
"id": "cheap-prices",
"project": "project",
"name": "cheap prices",
"priority": 2,
"shops": [
{"id": "shop-id-1"},
{"id": "shop-id-2"}
],
"links": {
"self": {
"href": "/project/pricing/categories/id/cheap-prices"
}
}
}
PricingCategory
attributes:
Parameter | Type | Default | Description |
---|---|---|---|
id | string | Unique id of the PricingCategory | |
project | string | project id | |
name | string | null | Display name |
priority | int | When resolving prices the categories are considered in descending order of priority | |
shops | array | array of Shop which use this category | |
links | object | null | The links |