API — Attributes
Documentacao tecnica gerada automaticamente a partir da especificacao OpenAPI.
GET /api/attributes
List Attributes
Exemplo resposta (200):
[{
"id": 0,
"name": "string",
"slug": "string",
"type": "string",
"values": [
"..."
]
}]
POST /api/attributes
Create Attribute
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| name | string | Sim | Name |
| slug | object | Nao | Slug |
| type | string | Nao | Type |
| values | array | Nao | Values |
Exemplo pedido:
{
"name": "string",
"slug": null,
"type": "string",
"values": [
"..."
]
}
Exemplo resposta (201):
{
"id": 0,
"name": "string",
"slug": "string",
"type": "string",
"values": [
"..."
]
}
Erros possiveis: 422 Validation Error
POST /api/attributes/{attribute_id}/values
Add Attribute Value
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| attribute_id | integer | Sim | — |
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| value | string | Sim | Value |
| display_order | integer | Nao | Display Order |
Exemplo pedido:
{
"value": "string",
"display_order": 0
}
Exemplo resposta (201):
{
"id": 0,
"value": "string",
"display_order": 0
}
Erros possiveis: 422 Validation Error
DELETE /api/attributes/{attribute_id}
Delete Attribute
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| attribute_id | integer | Sim | — |
Resposta (204): Successful Response
Erros possiveis: 422 Validation Error
Documentacao gerada automaticamente.