{
"total": 1,
"merchants": [
{
"id": "Jj9gZoBbxY",
"name": "Restaurant",
"description": null,
"imageUrl": "",
"status": "AVAILABLE",
"distance": 0
}
]
}
Os pedidos podem ser aceitos manualmente ou automáticamente pela Hub Delivery.
Por padrão o aceite do merchant é o MANUAL.
{
"orderAcceptType": "MANUAL|AUTOMATIC"
}
curl --location --request PATCH 'https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}/orderAcceptType' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBY2NvdW5...' \
--header 'Content-Type: application/json' \
--data-raw '{
"orderAcceptType": "MANUAL|AUTOMATIC"
}'
{
"merchant": {
"lastUpdate": "2022-05-25T14:32:41.869Z",
"ttl": 0,
"id": "string",
"status": "string",
"basicInfo": {
"name": "string",
"document": "string",
"corporateName": "string",
"description": "string",
"averageTicket": 0,
"averagePreparationTime": 0,
"minOrderValue": {
"value": 0,
"currency": "string"
},
"merchantType": "string",
"merchantCategories": [
"string"
],
"address": {
"country": "string",
"state": "string",
"city": "string",
"district": "string",
"street": "string",
"number": "string",
"postalCode": "string",
"complement": "string",
"latitude": 0,
"longitude": 0,
"reference": "string"
},
"contactEmails": [
"string"
],
"contactPhones": {
"commercialNumber": "string",
"whatsappNumber": "string"
},
"logoImage": {
"url": "string",
"crC32": "string"
},
"bannerImage": {
"url": "string",
"crC32": "string"
},
"createdAt": "2022-05-25T14:32:41.869Z"
},
"services": [
{
"id": "string",
"status": "string",
"serviceType": "string",
"menuId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"serviceArea": {
"id": "string",
"polygon": [
{
"geoCoordinates": [
{
"latitude": 0,
"longitude": 0
}
],
"price": {
"value": 0,
"currency": "string"
},
"estimateDeliveryTime": 0
}
],
"geoRadius": {
"geoMidpointLatitude": 0,
"geoMidpointLongitude": 0,
"radius": [
{
"size": 0,
"price": {
"value": 0,
"currency": "string"
},
"estimateDeliveryTime": 0
}
]
}
},
"serviceHours": {
"id": "string",
"weekHours": [
{
"dayOfWeek": [
"string"
],
"timePeriods": {
"startTime": "string",
"endTime": "string"
}
}
],
"holidayHours": [
{
"date": "string",
"timePeriods": {
"startTime": "string",
"endTime": "string"
}
}
]
}
}
],
"items": [
{
"id": "string",
"name": "string",
"description": "string",
"externalCode": "string",
"ean": "string",
"image": {
"url": "string",
"crC32": "string"
},
"serving": 0,
"unit": "string",
"nutritionalInfo": {
"description": "string",
"calories": "string",
"allergen": [
"string"
],
"suitableDiet": [
"string"
],
"additives": [
"string"
],
"isAlcoholic": true
}
}
],
"menus": [
{
"id": "string",
"name": "string",
"description": "string",
"externalCode": "string",
"disclaimer": "string",
"disclaimerURL": "string",
"categoryId": [
"string"
]
}
],
"categories": [
{
"id": "string",
"index": 0,
"name": "string",
"description": "string",
"image": {
"url": "string",
"crC32": "string"
},
"externalCode": "string",
"status": "string",
"availabilityId": [
"string"
],
"itemOfferId": [
"string"
]
}
],
"itemOffers": [
{
"id": "string",
"itemId": "string",
"index": 0,
"price": {
"value": 0,
"originalValue": 0,
"currency": "string"
},
"availabilityId": [
"string"
],
"optionGroupsId": [
"string"
]
}
],
"optionGroups": [
{
"id": "string",
"index": 0,
"name": "string",
"description": "string",
"externalCode": "string",
"status": "string",
"minPermitted": 0,
"maxPermitted": 0,
"options": [
{
"id": "string",
"itemId": "string",
"index": 0,
"price": {
"value": 0,
"originalValue": 0,
"currency": "string"
},
"maxPermitted": 0
}
]
}
],
"availabilities": [
{
"id": "string",
"startDate": "2022-05-25T14:32:41.869Z",
"endDate": "2022-05-25T14:32:41.869Z",
"hours": [
{
"dayOfWeek": [
"string"
],
"timePeriods": {
"startTime": "string",
"endTime": "string"
}
}
]
}
]
},
"updates": {
"merchantStatus": "string",
"entityType": "string",
"updatedObjects": [
null
]
}
}
{
"merchantStatus": "AVAILABLE|UNAVAILABLE",
"entityType": "MENU",
"updatedObjects": [
]
J}
Caso o valor enviado seja UNAVAILABLE, os pedidos serão cancelados automaticamente.
{
"status": "AVAILABLE|UNAVAILABLE"
}