# Listar lojas autorizadas

Host: **Keeta**. Retorna, paginadas, as lojas incluídas em uma autorização. Uso típico: tela de vínculo (mapeamento) de lojas no seu sistema.
| Parâmetro | Onde | Descrição |
|  --- | --- | --- |
| `authId` | path (obrig.) | Recebido no redirect da autorização ou no webhook de autorização |
| `pageNum` | query | Página, começando em 1 |
| `pageSize` | query | Itens por página |

**Resposta 200:**
| Campo | Tipo | Descrição |
|  --- | --- | --- |
| `userId` | integer | ID da conta de marca (brand) na Keeta |
| `brandId` | integer | ID da marca |
| `brandName` | string | Nome da marca |
| `authorizedShops[]` | array | Lojas autorizadas: `id` (integer), `name`, `address` (string), `latitude`, `longitude` (number), `timeZone` (ex.: `America/Sao_Paulo`) |
| `page` | object | `pageNum`, `pageSize`, `totalPage`, `totalCount` |


```json
{
  "userId": 12345678,
  "brandId": 1001,
  "brandName": "Rede Sabor Paulista",
  "authorizedShops": [
    { "id": 159416882, "name": "Sabor Paulista - Moema", "address": "Av. Ibirapuera, 2000, Moema, São Paulo - SP, 04029-200",
      "latitude": -23.6025, "longitude": -46.6658, "timeZone": "America/Sao_Paulo" }
  ],
  "page": { "pageNum": 1, "pageSize": 10, "totalPage": 1, "totalCount": 1 }
}
```
Erros: `401`, `404`, `503`.

Endpoint: GET /oauth/authorized/{authId}/merchantInfo
Version: v.1.0.7
Security: OAuth2, Sig

## Security:

  - `OAuth2` (unknown)
    oauth2 scopes: od.all

  - `Sig` (unknown)
    apiKey in header X-App-Signature

## Path parameters:

  - `authId` (string, required)
    Authorization ID that uniquely identifies a specific authorization session.  Each authorization generates a unique authId. There are two ways to obtain the authId:  1. Merchant authorization redirect - the authId is included in the redirect URL         2. Keeta Authorization Webhook - the authId is provided in the webhook payload  Please refer to the following for the specific workflow:[Merchant Self-serve Authorization](/apis/opendelivery/merchant-self-serve-authorization)

## Query parameters:

  - `pageNum` (integer)
    Page number starting from 1

  - `pageSize` (integer)
    Number of items per page

## Response 200:

  - `200` (unknown)
    Successfully retrieved merchant store information

## Response 200 fields (application/json):

  - `userId` (integer, required)
    ID da conta da marca na Keeta
    Example: 12345678

  - `brandId` (integer, required)
    ID da marca na Keeta
    Example: 1001

  - `brandName` (string, required)
    Nome da marca na Keeta
    Example: Sample Brand

  - `authorizedShops` (array, required)
    Lista de lojas autorizadas

  - `authorizedShops.id` (integer, required)
    Identificador único da loja
    Example: 159416882

  - `authorizedShops.name` (string, required)
    Nome da loja
    Example: stbaxi3 - API Test store

  - `authorizedShops.address` (string, required)
    Endereço da loja
    Example: Rua Augusta, 500, São Paulo, SP, Brasil

  - `authorizedShops.longitude` (number, required)
    Coordenada de longitude
    Example: 46.049568

  - `authorizedShops.latitude` (number, required)
    Coordenada de latitude
    Example: -18.770281

  - `authorizedShops.timeZone` (string, required)
    Informações do fuso horário
    Example: America/Sao_Paulo

  - `page` (object, required)

  - `page.pageNum` (integer, required)
    Número da página atual, começando em 1
    Example: 1

  - `page.pageSize` (integer, required)
    Número de itens por página
    Example: 10

  - `page.totalPage` (integer, required)
    Número total de páginas
    Example: 1

  - `page.totalCount` (integer, required)
    Número total de registros
    Example: 3

## Response 401:

  - `401` (unknown)
    A solicitação não contém credenciais de autenticação válidas para o recurso solicitado.

## Response 401 fields (application/problem+json):

  - `title` (string, required)
    Descrição resumida do problema.
    Example: Unexpected error

  - `status` (integer, required)
    Código HTTP do status retornado.
    Example: 500

## Response 404:

  - `404` (unknown)
    O recurso solicitado não foi encontrado.

## Response 404 fields (application/problem+json):

  - `title` (string, required)
    Descrição resumida do problema.
    Example: Unexpected error

  - `status` (integer, required)
    Código HTTP do status retornado.
    Example: 500

## Response 503:

  - `503` (unknown)
    O serviço não está disponível no momento. Ele pode estar em manutenção ou fora do horário de funcionamento.

## Response 503 fields (application/problem+json):

  - `title` (string, required)
    Descrição resumida do problema.
    Example: Unexpected error

  - `status` (integer, required)
    Código HTTP do status retornado.
    Example: 500

## Response 200 examples:

  - `Successful response example` (unknown)

