# Criar Marca
POST https://api.dooca.store/brands
Body
{
"name": "Marca",
"external_id": null,
"active": "1",
"description": "<p>A Marca que transforma o plástico em extraordinário.</p>",
"image": {
"src": "https://cdn.dooca.com.br/loja/brand/15554457572790.png"
},
"meta_title": null,
"meta_keywords": null,
"meta_description": null,
"short_description": null,
"position": null,
"banner": {
"src": "https://cdn.dooca.com.br/loja/brand/15550979046010.png"
},
"created_at": "2019-04-12 16:38:24",
"updated_at": "2019-04-16 17:15:57"
}
Status: 201
# Editar Marca
PUT https://api.dooca.store/brands/:id
Parâmetro: O ID da marca.
A edição do registro pode ser parcial ou total.
{
"name": "Teste",
"active": true,
"description": null,
"image": {
"src": "uploads://2FY5M1ThI8IqaTlQWm0G2fuFWyG6SrUj1556659673.jpg",
"alt": null
},
"banner": {
"src": "uploads://kcJOX5fF4M05LzHFtoliPCZ1ZnUAV1YF1556661077.jpg"
},
"meta_title": null,
"meta_description": null,
"external_id": null,
"short_description": null,
"meta_keywords": null,
"position": 17,
"created_at": "2019-04-30 21:41:12",
"updated_at": "2019-04-30 21:51:04",
}
Status: 200
# Deletar Marca
DELETE https://api.dooca.store/brands/:id
Parâmetro: O ID da marca.
Response: 204
# Consultar Marca
GET https://api.dooca.store/brands/:id
Parâmetro: O ID da marca.
HTTP STATUS: 200 OK
{
"id": 1,
"external_id": null,
"hotsite_id": null,
"name": "Nike",
"slug": "nike",
"description": null,
"short_description": null,
"image": null,
"banner": null,
"meta_title": null,
"meta_keywords": null,
"meta_description": null,
"position": 1,
"url": "http://loja.dooca.local/nike",
"active": true,
"created_at": "2020-01-29 11:54:06",
"updated_at": "2020-01-29 11:54:06"
}
# Listar Marcas
GET https://api.dooca.store/brands
HTTP STATUS: 200 OK
{
"data": [
{
"id": 2468,
"external_id": null,
"name": "Marca",
"slug": "marca",
"description": "<p>A marca transforma o plástico em extraordinário.</p>",
"short_description": null,
"image": {
"src": "https://api/files/162/brands/3pn3o0pylh3wbxmpauly45uhqyg3mmzjnvbspng.png?v=1578506554",
"mime": null,
"alt": null,
"size": null
},
"banner": {
"src": "https://api/files/162/brands/c7qxcdriw9l960n53460moyfl7fzyvhxiy3ppng.png?v=1578506554",
"mime": null,
"alt": null,
"size": null
},
"meta_title": null,
"meta_keywords": null,
"meta_description": null,
"position": null,
"url": "https://dooca.store/marca",
"active": true,
"created_at": "2020-01-08 15:02:34",
"updated_at": "2020-01-08 15:55:15"
}
],
"links": {
"first": "https://api/brands?page=1",
"last": "https://api/brands?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://api.homolog.dooca.store/brands",
"per_page": 25,
"to": 1,
"total": 1
}
}
# Reordenar Marcas
PUT https://api.dooca.store/brands/reorder
[4,3,2]
Status: 200
Comentários
0 comentário
Por favor, entre para comentar.