---
agentTools:
  projectIndex: https://partnerhubapi.stone.com.br/llms.txt
---

# Obter detalhes Lojistas

Obter detalhamento de um lojista

> 🚧 Estrutura do Request
>
> Para realizar a consulta é necessário que o StoneCode ou o Documento sejam passados nos paramêtros da query, também é possível passar os dois. Caso não passe nenhum campo a API vai retornar erro.

## Estrutura Principal do Response

| Campo      | Tipo      | Descrição                                                     |
| :--------- | :-------- | :------------------------------------------------------------ |
| `success`  | `boolean` | Indica se a requisição foi bem-sucedida.                      |
| `data`     | `array`   | Uma lista contendo os objetos de dados detalhados do cliente. |
| `metadata` | `object`  | Objeto com as informações de paginação.                       |

***

## Estrutura do Objeto de Cliente (em `data`)

Esta tabela descreve os campos principais do objeto de cliente. Os objetos aninhados são detalhados nas seções seguintes.

| Campo                   | Tipo     | Descrição                                                |
| :---------------------- | :------- | :------------------------------------------------------- |
| `mode`                  | `string` | Modelo comercial (ex: "aluguel").                        |
| `stonecode`             | `string` | Código de identificação único do cliente.                |
| `document`              | `string` | Documento (CNPJ) do cliente.                             |
| `trade_name`            | `string` | Nome Fantasia.                                           |
| `status`                | `string` | Status atual do credenciamento (ex: "Análise de Risco"). |
| `credentiation_date`    | `string` | Data de credenciamento (formato `DD/MM/AAAA`).           |
| `volume_exemption`      | `object` | Detalhes sobre a isenção por volume.                     |
| `pix`                   | `object` | Detalhes sobre a configuração do Pix.                    |
| `sales_member`          | `object` | Dados do vendedor/parceiro responsável.                  |
| `contact_data`          | `object` | Dados de contato do cliente.                             |
| `address_data`          | `object` | Dados de endereço do cliente.                            |
| `bank_data`             | `object` | Dados bancários do cliente.                              |
| `commercial_conditions` | `object` | Contém as taxas e condições comerciais.                  |

***

## Detalhes dos Objetos Aninhados

| Campo                        | Tipo               | Descrição                                       |
| :--------------------------- | :----------------- | :---------------------------------------------- |
| **`volume_exemption`**       |                    |                                                 |
| `volume_exemption.status`    | `boolean`          | Indica se a isenção por volume está ativa.      |
| **`pix`**                    |                    |                                                 |
| `pix.status`                 | `boolean`          | Indica se o Pix está habilitado para o cliente. |
| `pix.fee`                    | `number`           | Taxa percentual cobrada nas transações Pix.     |
| **`sales_member`**           |                    |                                                 |
| `sales_member.id`            | `number` ou `null` | ID do vendedor.                                 |
| `sales_member.name`          | `string`           | Nome do vendedor.                               |
| `sales_member.email`         | `string` ou `null` | E-mail do vendedor.                             |
| `sales_member.partner_id`    | `string` ou `null` | ID do parceiro associado.                       |
| **`contact_data`**           |                    |                                                 |
| `contact_data.type`          | `number`           | Tipo de contato (ex: 1 para principal).         |
| `contact_data.name`          | `string`           | Nome do contato.                                |
| `contact_data.email`         | `string`           | E-mail do contato.                              |
| `contact_data.mobile_phone`  | `string`           | Telefone celular do contato.                    |
| **`address_data`**           |                    |                                                 |
| `address_data.zip`           | `string`           | CEP do endereço.                                |
| `address_data.state`         | `string`           | Sigla do estado (UF).                           |
| `address_data.city`          | `string`           | Cidade.                                         |
| `address_data.street`        | `string`           | Logradouro.                                     |
| `address_data.street_number` | `string` ou `null` | Número do logradouro.                           |
| `address_data.complement`    | `string` ou `null` | Complemento do endereço.                        |
| **`bank_data`**              |                    |                                                 |
| `bank_data.bank_code`        | `number`           | Código do banco (Febraban).                     |
| `bank_data.bank_name`        | `string`           | Nome do banco.                                  |
| `bank_data.bank_branch`      | `string`           | Agência bancária.                               |
| `bank_data.bank_digit`       | `string`           | Dígito da agência.                              |
| `bank_data.account_number`   | `string`           | Número da conta.                                |
| `bank_data.account_digit`    | `string`           | Dígito da conta.                                |
| `bank_data.account_type_id`  | `string`           | ID do tipo da conta (Corrente/Poupança).        |

***

## Estrutura de `commercial_conditions`

| Campo | Tipo     | Descrição                                                    |
| :---- | :------- | :----------------------------------------------------------- |
| `mcc` | `number` | Merchant Category Code (Código da Categoria do Comerciante). |
| `rav` | `number` | Taxa de antecipação de recebíveis (RAV).                     |
| `mdr` | `array`  | Uma lista com as taxas MDR por tipo de transação e bandeira. |

### Estrutura do Objeto `mdr`

| Campo              | Tipo     | Descrição                                               |
| :----------------- | :------- | :------------------------------------------------------ |
| `transaction_type` | `string` | Descrição do tipo de transação (ex: "Credito a vista"). |
| `rate`             | `number` | A taxa percentual (MDR) aplicada.                       |
| `card_brand`       | `string` | A bandeira do cartão (ex: "Visa", "MasterCard").        |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Partner Hub API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://partnerhub-sdx-external-api.stone.com.br"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/affiliates/details": {
      "get": {
        "summary": "Obter detalhes Lojistas",
        "description": "Obter detalhamento de um lojista",
        "operationId": "get-affiliate-details",
        "parameters": [
          {
            "name": "document",
            "in": "query",
            "description": "Documento CNPJ ou CPF do cliente credenciado.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "98765432100001"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Token JWT decriptado",
            "schema": {
              "type": "string",
              "default": "Bearer Token_aqui"
            }
          },
          {
            "name": "stonecode",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "154698745"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Retorna Registros": {
                    "value": "{\n  \"success\": true,\n  \"data\": {\n    \"mode\": \"aluguel\",\n    \"status\": \"string\",\n    \"stonecode\": \"string\",\n    \"document\": \"string\",\n    \"trade_name\": \"string\",\n    \"credentiation_date\": \"string\",\n    \"sales_member\": {\n      \"id\": 0,\n      \"name\": \"string\",\n      \"email\": \"string\",\n      \"partner_id\": 0\n    },\n    \"contact_data\": {\n      \"type\": 0,\n      \"name\": \"string\",\n      \"email\": \"string\",\n      \"mobile_phone\": \"string\"\n    },\n    \"address_data\": {\n      \"zip\": \"string\",\n      \"state\": \"string\",\n      \"city\": \"string\",\n      \"street\": \"string\",\n      \"street_number\": \"string\",\n      \"complement\": \"string\"\n    },\n    \"bank_data\": {\n      \"bank_code\": 0,\n      \"bank_name\": \"string\",\n      \"bank_branch\": \"string\",\n      \"bank_digit\": \"string\",\n      \"account_number\": \"string\",\n      \"account_digit\": \"string\",\n      \"account_type_id\": 0\n    },\n    \"commercial_conditions\": {\n      \"monthly_priced_tpv\": 0,\n      \"mcc\": 0,\n      \"rav\": 0,\n      \"mdr\": [\n        {\n          \"rate\": 0,\n          \"transaction_type\": \"string\",\n          \"card_brand\": \"string\"\n        }\n      ]\n    },\n    \"pix\": {\n      \"status\": true,\n      \"fee\": 0\n    },\n    \"volume_exemption\": {\n      \"status\": true\n    }\n  }\n}"
                  },
                  "Sem Registros": {
                    "value": "{\n    \"success\": true,\n    \"data\": [],\n    \"metadata\": {\n        \"total_items\": 0,\n        \"total_pages\": 0,\n        \"page\": 1,\n        \"size\": 10\n    }\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Retorna Registros",
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "example": "aluguel"
                            },
                            "status": {
                              "type": "string",
                              "example": "string"
                            },
                            "stonecode": {
                              "type": "string",
                              "example": "string"
                            },
                            "document": {
                              "type": "string",
                              "example": "string"
                            },
                            "trade_name": {
                              "type": "string",
                              "example": "string"
                            },
                            "credentiation_date": {
                              "type": "string",
                              "example": "string"
                            },
                            "sales_member": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 0,
                                  "default": 0
                                },
                                "name": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "email": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "partner_id": {
                                  "type": "integer",
                                  "example": 0,
                                  "default": 0
                                }
                              }
                            },
                            "contact_data": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "integer",
                                  "example": 0,
                                  "default": 0
                                },
                                "name": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "email": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "mobile_phone": {
                                  "type": "string",
                                  "example": "string"
                                }
                              }
                            },
                            "address_data": {
                              "type": "object",
                              "properties": {
                                "zip": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "state": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "city": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "street": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "street_number": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "complement": {
                                  "type": "string",
                                  "example": "string"
                                }
                              }
                            },
                            "bank_data": {
                              "type": "object",
                              "properties": {
                                "bank_code": {
                                  "type": "integer",
                                  "example": 0,
                                  "default": 0
                                },
                                "bank_name": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "bank_branch": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "bank_digit": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "account_number": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "account_digit": {
                                  "type": "string",
                                  "example": "string"
                                },
                                "account_type_id": {
                                  "type": "integer",
                                  "example": 0,
                                  "default": 0
                                }
                              }
                            },
                            "commercial_conditions": {
                              "type": "object",
                              "properties": {
                                "monthly_priced_tpv": {
                                  "type": "integer",
                                  "example": 0,
                                  "default": 0
                                },
                                "mcc": {
                                  "type": "integer",
                                  "example": 0,
                                  "default": 0
                                },
                                "rav": {
                                  "type": "integer",
                                  "example": 0,
                                  "default": 0
                                },
                                "mdr": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "rate": {
                                        "type": "integer",
                                        "example": 0,
                                        "default": 0
                                      },
                                      "transaction_type": {
                                        "type": "string",
                                        "example": "string"
                                      },
                                      "card_brand": {
                                        "type": "string",
                                        "example": "string"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "pix": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "fee": {
                                  "type": "integer",
                                  "example": 0,
                                  "default": 0
                                }
                              }
                            },
                            "volume_exemption": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Sem Registros",
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {}
                          }
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {
                            "total_items": {
                              "type": "integer",
                              "example": 0,
                              "default": 0
                            },
                            "total_pages": {
                              "type": "integer",
                              "example": 0,
                              "default": 0
                            },
                            "page": {
                              "type": "integer",
                              "example": 1,
                              "default": 0
                            },
                            "size": {
                              "type": "integer",
                              "example": 10,
                              "default": 0
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": false,\n  \"error\": \"Unauthorized\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "error": {
                      "type": "string",
                      "example": "Unauthorized"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": false,\n  \"error\": \"INTERNAL_SERVER_ERROR\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "error": {
                      "type": "string",
                      "example": "INTERNAL_SERVER_ERROR"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "66fdc0f9b9c59e006159f051:6708387b7573a4003c548177"
}
```