Zoey REST API reference ยท Interactive version: apidocs.zoey.com

Attributes

Attributes: Options

Get

GET https://container-url.zoeysite.com/api/rest/attribute_options/:attribute_id/:option_id/:store_id

Get All

GET https://container-url.zoeysite.com/api/rest/attribute_options/:attribute_id/

Update

PUT https://container-url.zoeysite.com/api/rest/attribute_options/:attribute_id/:option_id/:store_id

Example request body:

{
    "value": "Yellow"
}

Create

POST https://container-url.zoeysite.com/api/rest/attribute_options/:attribute_id/

Creates one or more attribute options for the specified attribute.

Use the attribute_id path variable to target the attribute you want to add options to.

Single create example:

{"value":"Yellow"}

Bulk create is also supported by sending an array of option objects:

[
    {"value":"Yellow"},
    {"value":"Blue"}
]

Example request body:

{
    "value": "Yellow"
}

Example response (Create):

"161"

Example response (Multi-Create):

{
    "result": {
        "status": {
            "success": 1,
            "details": []
        },
        "data": {
            "counts": {
                "created": 2,
                "duplicate": 3
            },
            "created_options": [
                {
                    "option_id": "207908",
                    "sort_order": "3",
                    "value": "Attribute Value 4"
                },
                {
                    "option_id": "207909",
                    "sort_order": "4",
                    "value": "Attribute Value 5"
                }
            ],

            // Options returned in the duplicate_options were identified as already existing and were not created an additional time.
            "duplicate_options": [
                {
                    "value": "Attribute Value 1",
                    "option_id": "207903"
                },
                {
                    "value": "Attribute Value 2",
                    "option_id": "207904"
                },
                {
                    "value": "Attribute Value 3",
                    "option_id": "207905"
                }
            ]
        }
    }
}

Delete

DELETE https://container-url.zoeysite.com/api/rest/attribute_options/:attribute_id/:option_id

Example request body:

{
    "value": "Yeller"
}