Skip to main content
GET
/
products
/
attributes
/
{id}
Get a product attribute
curl --request GET \
  --url {protocol}://{host}/wp-json/cocart/v1/products/attributes/{id}
{
  "id": 123,
  "name": "<string>",
  "slug": "<string>",
  "type": "<string>",
  "order_by": "<string>",
  "has_archives": true,
  "links": {
    "self": [
      {
        "href": "<string>"
      }
    ],
    "collection": [
      {
        "href": "<string>"
      }
    ]
  }
}

Path Parameters

id
integer
required

Unique identifier for the product attribute.

Query Parameters

context
enum<string>
default:view

Scope under which the request is made; determines fields present in response.

Available options:
view,
embed

Response

Product attribute data.

id
integer

Unique identifier for the attribute.

name
string

Attribute name.

slug
string

Attribute slug.

type
string

Attribute type.

order_by
string

Attribute order by.

has_archives
boolean

Whether the attribute has archives.

I