Product Extras
This is used to view, create, update and delete product extras.
Product Extra Properties
| id |
{ "id" : 255 }
The unique ID of the product extra |
| name |
{ "name" : "Car charger" }
The name of the product extra |
| price |
{ "price" : 11.95 }
The price for the product extra |
| sku |
{ "sku" : "ABC123" }
Used to link a product extra to another product (SKUs are case sensitive) |
What you can do with product extras
GET /v1/products/ID/extras
Receive a list of all extras
POST /v1/products/ID/extras
Create a new product extra
PUT /v1/products/ID/extras/ID
Update a product extra
DELETE /v1/products/ID/extras/ID
Delete a product extra
GET /v1/products/ID/extras
Returns a list of product extras assigned to a product.
GET /v1/products/1/extras
HTTP/1.1 200 OK
[
{
"id": 1,
"name": "Car charger",
"price": 11.95
}
]
POST /v1/products/ID/extras
Creates a new product extra.
POST /v1/products/1/extras
POST /v1/products/1/extras
{
"name": "Car charger",
"price": 11.95,
"sku": "ABC123"
}
POST /v1/products/1/extras
HTTP/1.1 201 Created
{
"id": 1,
"name": "Car charger",
"price": 11.95,
"sku": "ABC123"
}
PUT /v1/products/ID/extras/ID
Update a product extra.
PUT /v1/products/1/extras/1
PUT /v1/products/1/extras/1
{
"name": "Car charger for iPhone"
}
PUT /v1/products/1/extras/1
HTTP/1.1 200 OK
{
"id": 1,
"name": "Car charger for iPhone",
"price": 11.95
}
DELETE /v1/products/ID/extras/ID
Deletes an existing product extra.
Returns 204 No Content on success.