Dokumentation Entwickler API

Property Ressource

Aktualisiert am 16.03.2017

Property Ressource

Get Product Properties

GET /api/products/1/properties.json

  • GET /api/products/1/properties.json will return the first 150 (default limit) product properties. You can increase the limit to a maximum of 250 product properties.

Example

Property Ressource

Status: 200 OK

[
{
"property": {
"adjustable_id": 1,
"adjustable_type": "Product",
"handle": "color",
"id": 100,
"is_visible": true,
"key": "Color",
"position": 0,
value": "black
}
},
{
"property": {
"adjustable_id": 1,
"adjustable_type": "Product",
"handle": "length",
"id": 101,
"is_visible": true,
"key": "Length",
"position": 1,
value": "686 mm
}
},
{
"property": {
"adjustable_id": 1,
"adjustable_type": "Product",
"handle": "height",
"id": 102,
"is_visible": true,
"key": "Height",
"position": 2,
value": "128 mm
}
},
{
"property": {
"adjustable_id": 1,
"adjustable_type": "Product",
"handle": "css-class",
"id": 103,
"is_visible": false,
"key": "css-class",
"position": null,
value": "awesome
}
}
]

Property Ressource

Get Product Property

GET /api/products/1/properties/100.json

  • GET /api/products/1/properties/100.json will return the specified product property.

Property Ressource

{
"property": {
"adjustable_id": 1,
"adjustable_type": "Product",
"handle": "color",
"id": 100,
"is_visible": true,
"key": "Color",
"position": 0,
value": "black
}
}

Property Ressource

Create Product Property

POST /api/products/1/properties.json

  • POST /api/products/1/properties.json will create a new product property from the parameters passed.

Property Ressource

{
"property": {
"key": "Color",
value": "black
}
}

Property Ressource

See the Get Product Property endpoint for more info about the output.

Update Product Property

PUT /api/products/1/properties/100.json

  • PUT /api/products/1/properties/100.json will update the product property from the parameters passed.

Example

Property Ressource

{
"property": {
"key": "Color",
value": "white
}
}

Property Ressource

Bulk Create Or Update Product Properties

PUT /api/products/1.json

  • PUT /api/products/1.json will add or update the product properties from the parameters passed.

Example

Property Ressource

Status: 200 OK

{
"product": {
"properties": [
{
"key": "Color",
value": "black
},
{
"key": "Length",
value": "686 mm
},
{
"key": "Height",
value": "128 mm
},
{
"key": "css-class",
"value": "awesome",
"is_visible": false
}
]
}
}

Property Ressource

See the Get Product endpoint for more info about the output.

Delete Product Properties

DELETE /api/products/1/properties/100.json

  • DELETE /api/products/1/properties/100.json will delete the property specified and return 200 OK if that was successful.