Developers | Hub Delivery
  • Visão geral
    • Primeiros passos
    • Fluxos
    • Canais de venda
      • Ifood
      • Rappi
      • Pede Pronto
      • Delivery Vip
      • Pekus
      • Zé Delivery
      • AiQFome
      • Delivery Much
      • Accon
      • Jota Já
      • Alloy
      • Goomer
      • Wabiz
      • Delivery Direto
      • Super Menu
      • VTEX
      • Oi Menu
      • TwData
      • Neemo
      • PedZap
      • Americanas Delivery
      • On Pedidos
    • Operadores logísticos
      • Loggi
      • Foody Delivery
      • Bdoo
    • Programas de fidelidade
      • Padrão
      • Cliente Fiel
    • Glossário
    • Boas práticas
  • API Reference
    • Licenses
      • Authentication
      • Sign Up
    • Merchants
      • Sale Channels
      • Logistic Operators
    • Orders
      • Events
      • Order
      • Cancellations
    • Loyalty
      • Programs
      • Affiliations
      • Credits
      • Redeem
      • Balance
      • Extract
    • Catalog
      • Catalogs
      • Menus
      • Categories
      • Item Offers
      • Items
      • Option Groups
      • Options
    • Hooks
  • Changelogs
    • 04/2023
    • 11/2022
    • 10/2022
    • 09/2022
    • 08/2022
    • 07/2022
    • 06/2022
    • 05/2022
  • Suporte
Powered by GitBook
On this page
  • Pesquisa de merchants
  • Alterar o tipo de aceite de pedidos
  • Atualizar o merchant via Upload
  • Atualização de Merchant
  • Remove um Merchant
  • Consulta do status de um Merchant
  • Atualiza o status de um Merchant
  • Lista de todas as categorias de merchant
  1. API Reference

Merchants

PreviousSign UpNextSale Channels

Last updated 6 months ago

Pesquisar merchants

Pesquisa de merchants

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

Query Parameters

Name
Type
Description

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
        }
    ]
}
{
    // Response
}
{
    // Response
}

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

Name
Type
Description

merchantId*

String

Identificador do merchant

Request Body

Name
Type
Description

orderAcceptType*

String

MANUAL|AUTOMATIC

{
    // Response
}
{
    // Response
}
{
    // 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
}
{
    // Response
}
{
    // 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

POST 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

Name
Type
Description

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"
  }
]
Sale Channels
Logistic Operators