Merchants

pageSale ChannelspageLogistic Operators

Pesquisar merchants

Pesquisa de merchants

GET https://{account}.myhubdelivery.io/merchants/api/v1/search

Query Parameters

NameTypeDescription

name

String

status

String

AVAILABLE|UNAVAILABLE

latitude

double

longitude

double

offset

integer

Min 0

limit

integer

Min 1

{
    "total": 1,
    "merchants": [
        {
            "id": "Jj9gZoBbxY",
            "name": "Restaurant",
            "description": null,
            "imageUrl": "",
            "status": "AVAILABLE",
            "distance": 0
        }
    ]
}

Alterar aceite de pedidos

Alterar o tipo de aceite de pedidos

PATCH https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}/orderAcceptType

Os pedidos podem ser aceitos manualmente ou automáticamente pela Hub Delivery. Por padrão o aceite do merchant é o MANUAL.

Path Parameters

NameTypeDescription

merchantId*

String

Identificador do merchant

Request Body

NameTypeDescription

orderAcceptType*

String

MANUAL|AUTOMATIC

{
    // Response
}

Exemplo da requisição (Body)

{
   "orderAcceptType": "MANUAL|AUTOMATIC"
}

CURL

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"
}'

Atualização de Merchant - Upload

Atualizar o merchant via Upload

POST https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}/merchantUpdate/upload

{
    // Response
}

Exemplo do conteúdo da requisição

{
  "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
    ]
  }
}

Atualização de Merchant

GET https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}/merchantUpdate

Exemplo do conteúdo da requisição

{
    "merchantStatus": "AVAILABLE|UNAVAILABLE",
    "entityType": "MENU",
    "updatedObjects": [     
    ]
J}

Remove um Merchant

DELETE https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}

Consulta do status de um Merchant

GET https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}/status

{
    "status": "AVAILABLE|UNAVAILABLE"
}

Atualiza o status de um Merchant

PATCH https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}/status

Caso o valor enviado seja UNAVAILABLE, os pedidos serão cancelados automaticamente.

Request Body

NameTypeDescription

status*

String

AVAILABLE | UNAVAILABLE

Exemplo do conteúdo da requisição

{
    "status": "AVAILABLE|UNAVAILABLE"
}

Lista de todas as categorias de merchant

GET https://{account}.myhubdelivery.io/merchants/api/v1/categories

[
  {
    "id": "Yj1343d9M8",
    "name": "BURGERS",
    "type": "RESTAURANT"
  }
]

Last updated