# Criar Vendedor

Para iniciar o processo de integração, siga os passos abaixo para cadastrar um novo vendedor com sucesso.

{% hint style="warning" %}
Importante

Após criar um novo vendedor, salve o **X-Token-Api** retornado na resposta: ele é a credencial que autentica e autoriza todas as transações dessa conta.
{% endhint %}

## Criar seller

> Cria um novo seller no sistema com novos campos obrigatórios

```json
{"openapi":"3.0.0","info":{"title":"API de Sellers v2 - Atualizada","version":"2.1.0"},"servers":[{"url":"https://api.barte.com","description":"Servidor de produção"},{"url":"https://sandbox-api.barte.com","description":"Servidor de sandbox"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Token-Api"}},"schemas":{"SellerCreateRequest":{"type":"object","required":["document","companyName","fantasyName","sellerUrl","webhook","email","password","owner","address","contact","account"],"properties":{"document":{"type":"string","description":"CPF ou CNPJ do seller"},"companyName":{"type":"string","description":"Nome da empresa"},"fantasyName":{"type":"string","description":"Nome fantasia da empresa"},"sellerUrl":{"type":"string","format":"uri","description":"URL do site do seller"},"ip":{"type":"string","format":"ipv4","description":"Endereço IP do vendedor"},"webhook":{"type":"string","format":"uri","description":"URL do webhook para notificações"},"email":{"type":"string","format":"email","description":"Email de contato"},"password":{"type":"string","description":"Senha para acesso"},"mccCpf":{"type":"string","enum":["VETERINARY_SERVICES","SPECIAL_TRADE_CONTRACTORS","TAXI_CABS_AND_LIMOUSINES","MISCELLANEOUS_GENERAL_MERCHANDISE","MISCELLANEOUS_FOOD_SHOPS","TAILORS_SEAMSTRESSES_MENDING","MISCELLANEOUS_APPAREL_SHOPS","DOOR_TO_DOOR_SALES","ARTIST_SUPPLY_CRAFT_SHOPS","BEAUTY_AND_BARBER_SHOPS","MISCELLANEOUS_PERSONAL_SERVICES","TOWING_SERVICES","COMPUTER_MAINTENANCE_REPAIR","BUSINESS_SERVICES","AUTOMOTIVE_SERVICE_SHOPS","DOCTORS_AND_PHYSICIANS","DENTISTS_AND_ORTHODONTISTS","MEDICAL_SERVICES_HEALTH_PRACTITIONERS","LEGAL_SERVICES_ATTORNEYS","PROFESSIONAL_SERVICES"],"description":"Código MCC obrigatório quando document for CPF"},"owner":{"$ref":"#/components/schemas/OwnerRequest"},"address":{"$ref":"#/components/schemas/AddressRequest"},"contact":{"$ref":"#/components/schemas/ContactRequest"},"account":{"$ref":"#/components/schemas/AccountRequest"}}},"OwnerRequest":{"type":"object","required":["name","document","birthdate"],"properties":{"name":{"type":"string","maxLength":100,"description":"Nome completo do proprietário"},"document":{"type":"string","pattern":"^[0-9]{11}$","description":"CPF do proprietário (11 dígitos)"},"birthdate":{"type":"string","format":"date","description":"Data de nascimento no formato YYYY-MM-DD"}}},"AddressRequest":{"type":"object","required":["country","state","city","district","street","zipCode","number"],"properties":{"country":{"type":"string","description":"Sigla do país"},"state":{"type":"string","description":"Sigla do estado"},"city":{"type":"string","description":"Nome da cidade"},"district":{"type":"string","description":"Bairro"},"street":{"type":"string","description":"Rua"},"zipCode":{"type":"string","description":"CEP (apenas números)"},"number":{"type":"string","description":"Número"},"complement":{"type":"string","description":"Complemento"}}},"ContactRequest":{"type":"object","required":["name","email","countryCode","phone"],"properties":{"name":{"type":"string","description":"Nome do responsável"},"email":{"type":"string","format":"email","description":"Email do responsável"},"countryCode":{"type":"string","description":"Código do país"},"phone":{"type":"string","description":"Telefone com DDD"}}},"AccountRequest":{"type":"object","required":["account","transferType","pix"],"properties":{"account":{"type":"object","required":["bank","issuer","issuerDigit","number","bankDigit","accountType"],"properties":{"bank":{"type":"string","description":"Código do banco"},"issuer":{"type":"string","description":"Agência bancária"},"issuerDigit":{"type":"string","description":"Dígito da agência"},"number":{"type":"string","description":"Número da conta"},"bankDigit":{"type":"string","description":"Dígito da conta"},"accountType":{"type":"string","enum":["CHECKING_ACCOUNT","SAVINGS_ACCOUNT"],"description":"Tipo da conta"}}},"transferType":{"type":"string","enum":["PIX","BANK_ACCOUNT"],"description":"Tipo de transferência (NOVO CAMPO OBRIGATÓRIO)"},"pix":{"type":"object","required":["keyType","key"],"properties":{"keyType":{"type":"string","enum":["CPF","CNPJ","EMAIL","PHONE","DOCUMENT","ALLEATORY_KEY"],"description":"Tipo da chave PIX"},"key":{"type":"string","description":"Chave PIX"}}}}},"SellerCreateCompleteResponse":{"type":"object","properties":{"document":{"type":"string"},"idSeller":{"type":"integer"},"companyName":{"type":"string"},"email":{"type":"string","format":"email"},"webhook":{"type":"string","format":"uri","description":"URL do webhook (DEPRECIADO - use webhooks array)"},"webhooks":{"type":"array","description":"Array de webhooks do seller","items":{"$ref":"#/components/schemas/Webhook"}}}},"Webhook":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"Identificador único do webhook"},"title":{"type":"string","description":"Nome do webhook"},"domains":{"type":"array","description":"Eventos vinculados (ORDER, SUBSCRIPTION)","items":{"type":"string","enum":["ORDER","SUBSCRIPTION"]}},"active":{"type":"boolean","description":"Indica se o webhook está ativo"},"url":{"type":"string","format":"uri","description":"URL configurada para recebimento"}}},"SellerCreatePartialResponse":{"type":"object","properties":{"document":{"type":"string"},"idSeller":{"type":"integer"},"companyName":{"type":"string"},"email":{"type":"string","format":"email"},"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"}}}}}},"ValidationError":{"type":"object","properties":{"errors":{"type":"object","properties":{"code":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"}}}}},"AuthenticationError":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"}}}}}},"ForbiddenError":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"}}}}}},"InternalError":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"}}}}}}}},"paths":{"/v2/seller":{"post":{"summary":"Criar seller","description":"Cria um novo seller no sistema com novos campos obrigatórios","tags":["Sellers"],"parameters":[{"name":"X-Token-Api","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Token de autenticação UUID v4"},{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string","enum":["application/json"]},"description":"Tipo de conteúdo da requisição"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerCreateRequest"}}}},"responses":{"200":{"description":"Seller criado com sucesso","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SellerCreateCompleteResponse"},{"$ref":"#/components/schemas/SellerCreatePartialResponse"}]}}}},"400":{"description":"Erro de validação","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Token inativo ou inexistente","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticationError"}}}},"403":{"description":"Acesso negado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"500":{"description":"Erro interno do servidor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.barte.com/api-reference/intermediador-de-pagamentos/gerencie-seus-vendedores/criar-vendedor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
