Create a price for SupplierProduct
POST/api/v1/supplier_products/:id/custom_prices
Create a price for SupplierProduct
Request
Path Parameters
id stringrequired
id of the product of which price you want to retrieve
- application/vnd.api+json
Body
required
data
object
type stringrequired
Possible values: [custom_prices
]
attributes
object
in_cents integerrequired
Product Price in cents.
default booleanrequired
Use 'true' if this should be the default Price used by Businesses that don't have a custom price. Otherwise use 'false'.
business_ids string[]
Collection of ids of businesses that should be using this Price.
custom_ref string
Can be used to assign Supplier's own ID to a Price
Responses
- 201
Create a price for SupplierProduct
- application/vnd.api+json
- Schema
- Example (from schema)
- Example
Schema
data
object
required
id string
type string
attributes
object
in-cents integer
default boolean
supplier-product-id string
businesses array
custom-ref string
{
"data": {
"id": "string",
"type": "string",
"attributes": {
"in-cents": 0,
"default": true,
"supplier-product-id": "string",
"businesses": [
null
],
"custom-ref": "string"
}
}
}
{
"data": {
"id": "c4b81084-9903-411c-a63d-7a19061df864",
"type": "prices",
"attributes": {
"in-cents": 10000,
"default": false,
"supplier-product-id": "20ae7da2-fd68-4619-8a84-ce567d658e64",
"businesses": [
"214e7ec1-d740-45d9-a598-0f5367bc6bcb"
],
"custom-ref": "7f647421-81c4-4444-b708-cda3c93696b2"
}
}
}
Loading...