/Store/Sales
Esse recurso gerencia a exposição dos grupos de produtos do estabelecimento no marketplace. Existem vários cenários de composição de produtos simples (pratos à la carte, bebidas, etc...) e produtos complexos (pizza vários sabores/tamanhos, macarrão e molhos, etc...), ou seja, o consumidor só irá visualizar/comprar produtos que forem expostos através do anúncio.
/Categorys
Esse recurso gerencia a categorização de anúncios de produtos.
Listagem de categorias
GET
/v1/merchant/store/sales/categorys
Método retorna a listagem de categorias do estabelecimento.
Query Parameters
page[]
string
Pagination http://jsonapi.org/
filter[]
string
Filter http://jsonapi.org/
sort[]
string
Sort http://jsonapi.org/
{
"items": [
{
"id": "98",
"uid": "6e1df93a77d3b2a65c15918658bc6abc",
"externalId": null,
"merchantId": "534",
"title": "Pizza Média (2 Sabores)",
"titleInternalOrder": "",
"image": "",
"priority": "90",
"active": true,
"object": "SalesCategory"
},
{
"id": "99",
"uid": "6d5d9914ee0839528d10a8caf2e90ABC",
"externalId": "13456",
"merchantId": "534",
"title": "Pizza Grande (2 ou 3 Sabores)",
"titleInternalOrder": "",
"image": "",
"priority": "92",
"active": true,
"object": "SalesCategory"
}
],
"meta": {
"page": {
"total": 11,
"currentPage": 0,
"lastPage": 4,
"perPage": 2
}
},
"links": {
"last": "/merchant/store/sales/categorys?page%5Bsize%5D=2&page%5Bnumber%5D=4",
"next": "/merchant/store/sales/categorys?page%5Bsize%5D=2&page%5Bnumber%5D=1"
}
}
Exemplo:
GET /api/merchant/store/sales/categorys?filter[title]=pizza&sort[priority]=ASC&page[size]=2 HTTP/1.1
Authorization: Basic XXXX
Content-Type: application/json
{
"items": [
{
"id": "98",
"uid": "6e1df93a77d3b2a65c15918658bc6abc",
"externalId": null,
"merchantId": "534",
"title": "Pizza Média (2 Sabores)",
"titleInternalOrder": "",
"image": "",
"priority": "90",
"active": true,
"object": "SalesCategory"
},
{
"id": "980",
"uid": "6d5d9914ee0839528d10a8caf2e90ABC",
"externalId": "13456",
"merchantId": "534",
"title": "Dia da Pizza",
"titleInternalOrder": "Dia da Pizza",
"image": "",
"priority": "91",
"active": false,
"object": "SalesCategory"
}
],
"meta": {
"page": {
"total": 8,
"currentPage": 0,
"lastPage": 3,
"perPage": 2
}
},
"links": {
"last": "/merchant/store/sales/categorys?filter%5Btitle%5D=pizza&sort%5Bpriority%5D=ASC&page%5Bsize%5D=2&page%5Bnumber%5D=3",
"next": "/merchant/store/sales/categorys?filter%5Btitle%5D=pizza&sort%5Bpriority%5D=ASC&page%5Bsize%5D=2&page%5Bnumber%5D=1"
}
}
/Products
Esse recurso gerencia a composição de um ou mais produtos para exposição e venda no marketplace.
Listagem de anúncios/produtos
GET
/v1/merchant/store/sales/products
Método retorna a listagem de anúncios/produtos.
Query Parameters
page[]
string
filter[]
string
sort[]
string
{
"items": [
{
"id": "5689",
"uid": "4b1fa7d93141dd9b69d5aae06e11aABC",
"externalId": "ABC123",
"merchantId": "534",
"salesCategoryId": "980",
"salesOricingId": "1",
"title": "Pizza Big + Pizza M (Grátis)",
"titleInternalOrder": "",
"description": "Na compra da pizza Big ganhe uma M (doce) + frete grátis",
"image": "https://tonolucro.delivery/images/anuncio/5963d8e927881.jpg",
"imageThumbnail": "",
"amount": "84.00",
"amountDiscount": "0.00",
"amountSale": "84.00",
"featured": {
"weekdays": {
"monday": true,
"tuesday": false,
"wednesday": false,
"thursday": false,
"friday": false,
"saturday": false,
"sunday": false,
"object": "Weekdays"
},
"object": "Featured"
},
"priority": "5442",
"active": false,
"productSingle": {
"id": "13658",
"uid": "ABCa38f26b009463e02d20fc1fb66c67",
"externalId": null,
"merchantId": "534",
"productGroupId": "2999",
"title": "Pizza Big + Pizza M (Grátis)",
"titleInternalOrder": "Pizza Big + Pizza M (Grátis)",
"image": "",
"amount": "0.00",
"amountDiscount": "0.00",
"amountSale": "0.00",
"priority": "10666",
"active": true,
"object": "Product"
},
"salesOroductGroup": [
{
"id": "289",
"salesProductId": "434",
"productGroupId": "278",
"productGroupUid": "9b552fe58532db4618fb6555e000bad6",
"productGroupExternalId": "ABC123",
"required": true,
"limit": "1",
"priority": "0",
"object": "SalesProductGroup"
},
{
"id": "372",
"salesProductId": "434",
"productGroupId": "269",
"productGroupUid": "29e8e49667de4e549b259cbe27fba11b",
"productGroupExternalId": null,
"required": true,
"limit": "1",
"priority": "0",
"object": "SalesProductGroup"
},
{
"id": "373",
"salesProductId": "434",
"productGroupId": "268",
"productGroupUid": "ddd11eb731be2d0TY9e73492f45efd4e",
"productGroupExternalId": null,
"required": true,
"limit": "1",
"priority": "0",
"object": "SalesProductGroup"
}
],
"object": "SalesProduct"
}
],
"meta": {
"page": {
"total": 3,
"currentPage": 0,
"lastPage": 2,
"perPage": 1
}
},
"links": {
"last": "/merchant/store/sales/products?filter%5Bsales_category_id%5D=98&sort%5Btitle%5D=ASC&page%5Bsize%5D=1&page%5Bnumber%5D=2",
"next": "/merchant/store/sales/products?filter%5Bsales_category_id%5D=98&sort%5Btitle%5D=ASC&page%5Bsize%5D=1&page%5Bnumber%5D=1"
}
}
Exemplo:
GET /api/merchant/store/sales/products?filter[sales_category_id]=98&sort[title]=ASC&page[size]=1 HTTP/1.1
Authorization: Basic XXXX
Content-Type: application/json
{
"items": [
{
"id": "5689",
"uid": "4b1fa7d93141dd9b69d5aae06e11aABC",
"externalId": "ABC123",
"merchantId": "534",
"salesCategoryId": "980",
"salesPricingId": "1",
"title": "Pizza Big + Pizza M (Grátis)",
"titleInternalOrder": "",
"description": "Na compra da pizza Big ganhe uma M (doce) + frete grátis",
"image": "https://tonolucro.delivery/images/anuncio/5963d8e927881.jpg",
"imageThumbnail": "",
"amount": "84.00",
"amountDiscount": "0.00",
"amountSale": "84.00",
"featured": {
"weekdays": {
"monday": true,
"tuesday": false,
"wednesday": false,
"thursday": false,
"friday": false,
"saturday": false,
"sunday": false,
"object": "Weekdays"
},
"object": "Featured"
},
"priority": "5442",
"active": false,
"productSingle": {
"id": "13658",
"uid": "ABCa38f26b009463e02d20fc1fb66c67",
"externalId": null,
"merchantId": "534",
"productGroupId": "2999",
"title": "Pizza Big + Pizza M (Grátis)",
"title_internal_order": "Pizza Big + Pizza M (Grátis)",
"image": "",
"amount": "0.00",
"amountDiscount": "0.00",
"amountSale": "0.00",
"priority": "10666",
"active": true,
"object": "Product"
},
"salesProductProup": [
{
"id": "289",
"salesProductId": "434",
"productGroupId": "278",
"productGroupUid": "9b552fe58532db4618fb6555e000bad6",
"productGroupExternalId": "ABC123",
"required": true,
"limit": "1",
"priority": "0",
"object": "SalesProductGroup"
},
{
"id": "372",
"salesProductId": "434",
"productGroupId": "269",
"productGroupUid": "29e8e49667de4e549b259cbe27fba11b",
"productGroupExternalId": null,
"required": true,
"limit": "1",
"priority": "0",
"object": "SalesProductGroup"
},
{
"id": "373",
"salesProductId": "434",
"productGroupId": "268",
"productGroupUid": "ddd11eb731be2d0TY9e73492f45efd4e",
"productGroupExternalId": null,
"required": true,
"limit": "1",
"priority": "0",
"object": "SalesProductGroup"
}
],
"object": "SalesProduct"
}
],
"meta": {
"page": {
"total": 3,
"currentPage": 0,
"lastPage": 2,
"perPage": 1
}
},
"links": {
"last": "/merchant/store/sales/products?filter%5Bsales_category_id%5D=98&sort%5Btitle%5D=ASC&page%5Bsize%5D=1&page%5Bnumber%5D=2",
"next": "/merchant/store/sales/products?filter%5Bsales_category_id%5D=98&sort%5Btitle%5D=ASC&page%5Bsize%5D=1&page%5Bnumber%5D=1"
}
}
Ativar/inativar anúncio
PUT
/v1/merchant/store/sales/products/{sales_product_id}
Método atualiza o status do anúncio, permitindo o controle de disponibilidade do item no marketplace.
Path Parameters
sales_product_id
number
Identificador numérico do anúncio
Request Body
active
boolean
True/False para ativar ou inativar o anúncio
{
"success": true
}
PUT /api/merchant/store/sales/products/426 HTTP/1.1
Authorization: Basic XXX
Content-Type: application/json
{
"active": true
}
{
"success": true
}
/Pricings
Esse recurso gerencia as regras de precificação dos produtos/anúncios.
Listagem de regras
GET
/v1/merchant/store/sales/pricings
Listagem de regras de precificação disponíveis.
Query Parameters
page[]
string
filter[]
string
sort[]
string
{
"items": [
{
"id": "1",
"uid": "c21f969b5f03d33dabe04f8f136e7682",
"externalId": null,
"title": "Normal",
"code": "default",
"alert": "",
"object": "SalesPricing"
},
{
"id": "2",
"uid": "6a204bd8cdec8348afd5c77c717a097a",
"externalId": null,
"title": "Cálculo do Maior Valor",
"code": "categoria_maior_valor",
"alert": "Nas pizzas com mais de um sabor será cobrado o maior valor. Regra exclusiva deste estabelecimento.",
"object": "SalesPricing"
}
],
"meta": {
"page": {
"total": 2,
"currentPage": 0,
"lastPage": 0,
"perPage": 10
}
},
"links": []
}
Exemplo:
GET /api/merchant/store/sales/pricings HTTP/1.1
Authorization: Basic XXX
Content-Type: application/json
{
"items": [
{
"id": "1",
"uid": "c21f969b5f03d33dabe04f8f136e7682",
"externalId": null,
"title": "Normal",
"code": "default",
"alert": "",
"object": "SalesPricing"
},
{
"id": "2",
"uid": "6a204bd8cdec8348afd5c77c717a097a",
"externalId": null,
"title": "Cálculo do Maior Valor",
"code": "categoria_maior_valor",
"alert": "Nas pizzas com mais de um sabor será cobrado o maior valor. Regra exclusiva deste estabelecimento.",
"object": "SalesPricing"
}
],
"meta": {
"page": {
"total": 2,
"currentPage": 0,
"lastPage": 0,
"perPage": 10
}
},
"links": []
}
Last updated