/
Notificar atualização
Host: Keeta. merchantId = ID no seu sistema. Três formas de uso:
| Corpo enviado | Efeito |
|---|---|
| Vazio | A Keeta chama seu GET /v1/merchant e recarrega tudo |
Só merchantStatus (AVAILABLE/UNAVAILABLE) | Abre ou fecha a loja na Keeta, sem recarregar cardápio |
entityType + updatedObjects | Atualiza as entidades enviadas |
Comportamento por entityType:
entityType | O que a Keeta faz |
|---|---|
ITEM_OFFER, OPTION | Atualiza só o campo status dos objetos enviados, sem buscar o cardápio (desde a v1.0.8) |
MENU, CATEGORY, ITEM, OPTION_GROUP, AVAILABILITY | Ainda sem atualização modular: a Keeta chama GET /merchant e recarrega o cardápio inteiro |
Regras:
- Não envie
merchantStatusjunto comentityType/updatedObjects— se houvermerchantStatus, o resto é ignorado. - Com
entityTypepreenchido,updatedObjectsnão pode estar vazio. - Prefira enviar a entidade específica a um corpo vazio.
- Item precisa ter preço de delivery ou retirada.
- O status de funcionamento da loja depende de vários fatores (horário, itens disponíveis,
merchantStatusetc.). - Respeite o
minPermitteddos grupos de opções.
Pausar a coxinha (esgotou):
{ "entityType": "ITEM_OFFER", "updatedObjects": [{ "id": "of-coxinha", "itemId": "it-coxinha", "index": 0, "status": "UNAVAILABLE", "price": { "originalValue": 8.5 } }] }Fechar a loja temporariamente:
{ "merchantStatus": "UNAVAILABLE" }Respostas: 204, 400, 401, 503.
Segurança
OAuth2(Escopos obrigatórios: od.all) and Sig
Indica se o merchant está disponível ou indisponível. Use para fechar o merchant devido a um evento inesperado, quando não houver previsão de restabelecimento do serviço. Não use para feriados.
Enum:"AVAILABLE""UNAVAILABLE"
Exemplo:"AVAILABLE"
- https://open.mykeeta.com/api/open/opendeliveryhttps://open.mykeeta.com/api/open/opendelivery/v1/merchantUpdate/{merchantId}
curl -i -X POST \
'https://open.mykeeta.com/api/open/opendelivery/v1/merchantUpdate/{merchantId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-App-Signature: YOUR_API_KEY_HERE' \
-d '{
"merchantStatus": "AVAILABLE",
"entityType": "MERCHANT",
"updatedObjects": [
{
"id": "stringstringstringstringstringstring",
"status": "AVAILABLE",
"basicInfo": {
"name": "Pizza Plaza",
"document": "22815773000169",
"corporateName": "Food Company",
"description": "Food company specializing in pizzas.",
"averageTicket": 90,
"averagePreparationTime": 20,
"minOrderValue": {
"value": 40,
"currency": "BRL"
},
"merchantType": "RESTAURANT",
"merchantCategories": [
"PIZZA",
"FAMILY_MEALS",
"PREMIUM"
],
"address": {
"country": "BR",
"state": "BR-SP",
"city": "São Paulo",
"district": "Moema",
"street": "Plaza Avenue",
"number": "100",
"postalCode": "20111-000",
"complement": "BL 02 AP 31",
"reference": "Yellow House",
"latitude": -23.54809,
"longitude": -46.63638
},
"contactEmails": [
"food@company.com"
],
"contactPhones": {
"commercialNumber": "55-11999999999",
"whatsappNumber": "11998888888"
},
"logoImage": {
"URL": "https://food-company.com/image.jpg",
"CRC-32": "96b41025"
},
"bannerImage": {
"URL": "https://food-company.com/image.jpg",
"CRC-32": "96b41025"
},
"createdAt": "2019-08-24T14:15:22Z",
"acceptedCards": [
"VISA"
]
},
"services": [
{
"id": "f078e8e2-3044-4eec-b4a8-8359810de123",
"status": "AVAILABLE",
"serviceType": "DELIVERY",
"serviceTiming": {
"timing": [
"INSTANT",
"SCHEDULED"
],
"schedule": {
"scheduleTimeWindow": "15_MINUTES",
"scheduleStartWindow": "15_MINUTES",
"scheduleEndWindow": "15_MINUTES"
}
},
"servicePriority": [
"PRIORITY1",
"PRIORITY2"
],
"menuId": "f627ccdc-6789-456f-a782-148538d5035b",
"targetAppId": "string",
"serviceArea": {
"id": "01339e6d-520b-429e-bc7c-dcfd2df42278",
"polygon": [
{
"geoCoordinates": [],
"price": {}
}
],
"geoRadius": {
"geoMidpointLatitude": -23.54809,
"geoMidpointLongitude": -46.63638,
"radius": [
{}
]
},
"exclusionAreaPolygon": [
{
"geoCoordinates": []
}
]
},
"serviceHours": {
"id": "fb093d8c-2ca5-40fb-afcf-472fbdae81cc",
"weekHours": [
{
"dayOfWeek": [],
"timePeriods": {}
}
],
"holidayHours": [
{
"timePeriods": {}
}
]
}
}
],
"menus": [
{
"id": "f627ccdc-6789-456f-a782-148538d5035b",
"name": "Pizzas",
"description": "Pizza menu",
"externalCode": "123",
"disclaimer": "Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
"disclaimerURL": "http://example.com",
"categoryId": [
"92fad022-2c28-4239-a026-989f5b555cb7",
"6bb71850-1d40-49f9-8046-b13e068c0cca"
]
}
],
"categories": [
{
"id": "92fad022-2c28-4239-a026-989f5b555cb7",
"index": 0,
"name": "Salted Pizza",
"description": "Salted pizza flavors.",
"image": {
"URL": "https://food-company.com/image.jpg",
"CRC-32": "96b41025"
},
"externalCode": "13",
"status": "AVAILABLE",
"availabilityId": [
"11d063c4-73a7-4f87-a0eb-71636cc02029"
],
"itemOfferId": [
"f080cfb3-5c4a-4eb7-907d-2de3bbb5dfb9"
]
}
],
"itemOffers": [
{
"id": "f080cfb3-5c4a-4eb7-907d-2de3bbb5dfb9",
"itemId": "732bd31e-77fc-47ee-88ee-a0437f97b198",
"index": 0,
"status": "AVAILABLE",
"price": {
"value": 43,
"originalValue": 43,
"currency": "BRL"
},
"availabilityId": [
"11d063c4-73a7-4f87-a0eb-71636cc02029"
],
"optionGroupsId": [
"fe67e551-f42f-499a-8afb-0ed893c71fa3"
]
}
],
"items": [
{
"id": "732bd31e-77fc-47ee-88ee-a0437f97b198",
"name": "1/2 Pepperoni",
"description": "Pepperoni flavored pizza with LOTS of pepperoni.",
"externalCode": "233467",
"status": "AVAILABLE",
"image": {
"URL": "https://food-company.com/image.jpg",
"CRC-32": "96b41025"
},
"images": [
{
"URL": "https://food-company.com/image.jpg",
"CRC-32": "96b41025",
"type": "main"
}
],
"nutritionalInfo": {
"description": "Contains preservatives",
"calories": "2000 Cal",
"allergen": [
"GLUTEN"
],
"additives": [
"string"
],
"suitableDiet": [
"DIABETIC"
],
"isAlcoholic": false
},
"serving": 2,
"unit": "KG",
"ean": "7896005202074"
}
],
"optionGroups": [
{
"id": "fe67e551-f42f-499a-8afb-0ed893c71fa3",
"index": 0,
"name": "Choose your salted pizza flavor",
"description": "Choose your salted pizza flavor.",
"externalCode": "12",
"status": "AVAILABLE",
"minPermitted": 2,
"maxPermitted": 2,
"priceMethod": "SUM",
"options": [
{
"id": "e5232f14-430c-4a94-8ff6-289d5a16a87a",
"itemId": "502ecf11-0509-48ed-b63c-6211c48fd9b9",
"index": 0,
"status": "AVAILABLE",
"price": {},
"maxPermitted": 2
}
]
}
],
"availabilities": [
{
"id": "11d063c4-73a7-4f87-a0eb-71636cc02029",
"startDate": "2021-05-01",
"endDate": "2021-05-30",
"hours": [
{
"dayOfWeek": [
"MONDAY",
"TUESDAY",
"WEDNESDAY",
"THURSDAY",
"FRIDAY",
"SATURDAY",
"SUNDAY"
],
"timePeriods": {}
}
]
}
]
}
]
}'