# Criar Valor de Atributo
POST https://api.dooca.store/attributes/values
Body
{
"attribute_id": 1,
"name": "Generic Value",
"description": "Generic Description"
}
Status: 201
# Editar Valor de Atributo
PUT https://api.dooca.store/attributes/values/:id
Parâmetro: O ID do grupo de atributo.
A edição do registro pode ser parcial ou total.
{
"name": "Generic Value",
"description": "Generic Description"
}
Status: 200
# Deletar Grupo de Atributo
DELETE https://api.dooca.store/attributes/values/:id
Parâmetro: O ID do grupo de atributo.
Response: 204
# Consultar Valor de Atributo
GET https://api.dooca.store/attributes/values/:id
Parâmetro: O ID do grupo de atributo.
HTTP STATUS: 200 OK
{
"id": 25,
"attribute_id": 4,
"external_id": "25",
"name": "25",
"slug": "25",
"position": 22,
"active": true,
"created_at": "2020-03-26 10:10:03",
"updated_at": "2020-03-26 10:10:03"
}
# Listar Valor de Atributos
GET https://api.dooca.store/attributes/values
HTTP STATUS: 200 OK
[
{
"id": 1,
"attribute_id": 2,
"external_id": null,
"name": "2kg",
"slug": "2kg",
"position": 1,
"active": true,
"created_at": "2020-03-12 16:52:32",
"updated_at": "2020-03-12 16:52:32"
},
{
"id": 2,
"attribute_id": 2,
"external_id": null,
"name": "4kg",
"slug": "4kg",
"position": 2,
"active": true,
"created_at": "2020-03-12 16:53:52",
"updated_at": "2020-03-12 16:53:52"
},
{
"id": 3,
"attribute_id": 3,
"external_id": null,
"name": "4k",
"slug": "4k",
"position": 1,
"active": true,
"created_at": "2020-03-12 16:57:53",
"updated_at": "2020-03-12 16:57:53"
},
{
"id": 4,
"attribute_id": 4,
"external_id": "33",
"name": "33",
"slug": "33",
"position": 1,
"active": true,
"created_at": "2020-03-26 10:09:55",
"updated_at": "2020-03-26 10:09:55"
},
{
"id": 5,
"attribute_id": 4,
"external_id": "34",
"name": "34",
"slug": "34",
"position": 2,
"active": true,
"created_at": "2020-03-26 10:09:55",
"updated_at": "2020-03-26 10:09:55"
},
{
"id": 6,
"attribute_id": 4,
"external_id": "35",
"name": "35",
"slug": "35",
"position": 3,
"active": true,
"created_at": "2020-03-26 10:09:55",
"updated_at": "2020-03-26 10:09:55"
},
{
"id": 7,
"attribute_id": 4,
"external_id": "36",
"name": "36",
"slug": "36",
"position": 4,
"active": true,
"created_at": "2020-03-26 10:09:55",
"updated_at": "2020-03-26 10:09:55"
},
{
"id": 8,
"attribute_id": 4,
"external_id": "37",
"name": "37",
"slug": "37",
"position": 5,
"active": true,
"created_at": "2020-03-26 10:09:56",
"updated_at": "2020-03-26 10:09:56"
},
{
"id": 9,
"attribute_id": 4,
"external_id": "38",
"name": "38",
"slug": "38",
"position": 6,
"active": true,
"created_at": "2020-03-26 10:09:56",
"updated_at": "2020-03-26 10:09:56"
},
{
"id": 10,
"attribute_id": 4,
"external_id": "39",
"name": "39",
"slug": "39",
"position": 7,
"active": true,
"created_at": "2020-03-26 10:09:56",
"updated_at": "2020-03-26 10:09:56"
},
{
"id": 11,
"attribute_id": 4,
"external_id": "40",
"name": "40",
"slug": "40",
"position": 8,
"active": true,
"created_at": "2020-03-26 10:09:56",
"updated_at": "2020-03-26 10:09:56"
},
{
"id": 12,
"attribute_id": 4,
"external_id": "41",
"name": "41",
"slug": "41",
"position": 9,
"active": true,
"created_at": "2020-03-26 10:09:57",
"updated_at": "2020-03-26 10:09:57"
},
{
"id": 13,
"attribute_id": 4,
"external_id": "42",
"name": "42",
"slug": "42",
"position": 10,
"active": true,
"created_at": "2020-03-26 10:09:57",
"updated_at": "2020-03-26 10:09:57"
},
{
"id": 14,
"attribute_id": 4,
"external_id": "43",
"name": "43",
"slug": "43",
"position": 11,
"active": true,
"created_at": "2020-03-26 10:09:57",
"updated_at": "2020-03-26 10:09:57"
},
{
"id": 15,
"attribute_id": 4,
"external_id": "44",
"name": "44",
"slug": "44",
"position": 12,
"active": true,
"created_at": "2020-03-26 10:09:57",
"updated_at": "2020-03-26 10:09:57"
},
{
"id": 16,
"attribute_id": 4,
"external_id": "45",
"name": "45",
"slug": "45",
"position": 13,
"active": true,
"created_at": "2020-03-26 10:09:57",
"updated_at": "2020-03-26 10:09:57"
},
{
"id": 17,
"attribute_id": 4,
"external_id": "151",
"name": "17/18",
"slug": "1718",
"position": 14,
"active": true,
"created_at": "2020-03-26 10:10:02",
"updated_at": "2020-03-26 10:10:02"
},
{
"id": 18,
"attribute_id": 4,
"external_id": "137",
"name": "20/21",
"slug": "2021",
"position": 15,
"active": true,
"created_at": "2020-03-26 10:10:02",
"updated_at": "2020-03-26 10:10:02"
},
{
"id": 19,
"attribute_id": 4,
"external_id": "133",
"name": "23/24",
"slug": "2324",
"position": 16,
"active": true,
"created_at": "2020-03-26 10:10:02",
"updated_at": "2020-03-26 10:10:02"
},
{
"id": 20,
"attribute_id": 4,
"external_id": "134",
"name": "26/27",
"slug": "2627",
"position": 17,
"active": true,
"created_at": "2020-03-26 10:10:02",
"updated_at": "2020-03-26 10:10:02"
},
{
"id": 21,
"attribute_id": 4,
"external_id": "135",
"name": "32/33",
"slug": "3233",
"position": 18,
"active": true,
"created_at": "2020-03-26 10:10:02",
"updated_at": "2020-03-26 10:10:02"
},
{
"id": 22,
"attribute_id": 4,
"external_id": "152",
"name": "35/36",
"slug": "3536",
"position": 19,
"active": true,
"created_at": "2020-03-26 10:10:02",
"updated_at": "2020-03-26 10:10:02"
},
{
"id": 23,
"attribute_id": 4,
"external_id": "19",
"name": "19",
"slug": "19",
"position": 20,
"active": true,
"created_at": "2020-03-26 10:10:03",
"updated_at": "2020-03-26 10:10:03"
},
{
"id": 24,
"attribute_id": 4,
"external_id": "22",
"name": "22",
"slug": "22",
"position": 21,
"active": true,
"created_at": "2020-03-26 10:10:03",
"updated_at": "2020-03-26 10:10:03"
},
{
"id": 25,
"attribute_id": 4,
"external_id": "25",
"name": "25",
"slug": "25",
"position": 22,
"active": true,
"created_at": "2020-03-26 10:10:03",
"updated_at": "2020-03-26 10:10:03"
}
],
"links": {
"first": "http://api.dooca.local/attributes/values?page=1",
"last": "http://api.dooca.local/attributes/values?page=3",
"prev": null,
"next": "http://api.dooca.local/attributes/values?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 3,
"path": "http://api.dooca.local/attributes/values",
"per_page": 25,
"to": 25,
"total": 51
}
# Criar Atributo
POST https://api.dooca.store/attributes
Body
{
"name": "Generic Name",
"description": "Generic Description",
"values": [{
"name": "Generic Value 01"
},{
"name": "Generic Value 02"
}]
}
Status: 201
# Editar Atributo
PUT https://api.dooca.store/attributes/:id
Parâmetro: O ID do atributo.
A edição do registro pode ser parcial ou total.
{
"name": "Novo nome do Atributo"
}
Status: 200
# Deletar Atributo
DELETE https://api.dooca.store/attribute/:id
Parâmetro: O ID do atributo.
Response: 204
# Consultar Atributo
GET https://api.dooca.store/attribute/:id
Parâmetro: O ID do atributo.
HTTP STATUS: 200 OK
{
"id": 1,
"external_id": null,
"name": "m",
"slug": "m",
"active": true,
"values": [],
"created_at": "2020-03-12 15:18:34",
"updated_at": "2020-03-12 15:18:34"
}
# Listar Atributo
GET https://api.dooca.store/attribute
HTTP STATUS: 200 OK
[
{
"id": 1,
"external_id": null,
"name": "m",
"slug": "m",
"active": true,
"values": [],
"created_at": "2020-03-12 15:18:34",
"updated_at": "2020-03-12 15:18:34"
},
{
"id": 2,
"external_id": null,
"name": "peso",
"slug": "peso",
"active": true,
"values": [
{
"id": 1,
"attribute_id": 2,
"external_id": null,
"name": "2kg",
"slug": "2kg",
"position": 1,
"active": true,
"created_at": "2020-03-12 16:52:32",
"updated_at": "2020-03-12 16:52:32"
},
{
"id": 2,
"attribute_id": 2,
"external_id": null,
"name": "4kg",
"slug": "4kg",
"position": 2,
"active": true,
"created_at": "2020-03-12 16:53:52",
"updated_at": "2020-03-12 16:53:52"
}
],
"created_at": "2020-03-12 16:51:40",
"updated_at": "2020-03-12 16:53:52"
},
{
"id": 3,
"external_id": null,
"name": "peso",
"slug": "peso",
"active": true,
"values": [
{
"id": 3,
"attribute_id": 3,
"external_id": null,
"name": "4k",
"slug": "4k",
"position": 1,
"active": true,
"created_at": "2020-03-12 16:57:53",
"updated_at": "2020-03-12 16:57:53"
}
],
"created_at": "2020-03-12 16:57:53",
"updated_at": "2020-03-12 16:57:53"
},
{
"id": 51,
"attribute_id": 4,
"external_id": "32",
"name": "32",
"slug": "32",
"position": 48,
"active": true,
"created_at": "2020-03-26 10:12:06",
"updated_at": "2020-03-26 10:12:06"
}
],
"created_at": "2020-03-26 10:09:55",
"updated_at": "2020-03-26 10:09:55"
}
],
"links": {
"first": "http://api.dooca.local/attributes?page=1",
"last": "http://api.dooca.local/attributes?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http://api.dooca.local/attributes",
"per_page": 25,
"to": 4,
"total": 4
}
Comentários
0 comentário
Por favor, entre para comentar.