TratowAPI
API aberta · Estabelecimentos

Alterar detalhes do estabelecimento

put/api/open/v1/establishments/current/details

Em resumo

  • PUT /api/open/v1/establishments/current/details
  • Precisa de chave read_write.
  • Obrigatórios: slug, name, legalName, cnpj, stateRegistration, stateRegistrationExempt, municipalRegistration, municipalRegistrationExempt, contactEmail, phones, type, businessSize, timezone, postalCode, street, number, complement, district, city, state, showFullAddress, about, specialInstructions, cancellationPolicy, parking, hasSnackBar, hasTv, hasWifi, accessible, childrenPolicy, languages, otherLanguage, website, ecommerceUrl, facebook, instagram.
  • Sucesso: 200.
  • Authorizationstringheaderobrigatório

    Chave de API no formato Bearer ttw_live_<prefixo>_<segredo>, criada em Integrações → Chaves de API. Este endpoint precisa de chave read_write.

Corpo

application/json
  • slugstringobrigatório

    Endereço curto usado na URL do site (letras minúsculas, números e hífen).

    3 a 48 caracteres

  • namestringobrigatório

    Nome.

    1 a 55 caracteres

  • legalNamestringpode ser nuloobrigatório

    Nome de legal (só leitura).

    até 150 caracteres

  • cnpjstringpode ser nuloobrigatório

    CNPJ (14 dígitos, sem pontuação).

  • stateRegistrationstringpode ser nuloobrigatório

    até 30 caracteres

  • stateRegistrationExemptbooleanobrigatório
  • municipalRegistrationstringpode ser nuloobrigatório

    até 30 caracteres

  • municipalRegistrationExemptbooleanobrigatório
  • contactEmailstringpode ser nuloobrigatório
  • phonesobject[]obrigatório

    Telefones de contato.

    até 10 itens

    Mostrar 2 atributos
    • typeenum<string>obrigatório

      Tipo. Os valores aceitos estão no tipo.

      Valores aceitos:mobilelandlinewhatsapphomemessageother

    • numberstringobrigatório

      Número.

  • typeenum<string>obrigatório

    Tipo. Os valores aceitos estão no tipo.

    Valores aceitos:salonbarbershopnail_salonaesthetic_clinicspapodiatryother

  • businessSizeenum<string>pode ser nuloobrigatório

    Valores aceitos:singlebranchfranchiseother

  • timezonestringobrigatório

    Fuso horário IANA do estabelecimento (ex.: America/Sao_Paulo).

  • postalCodestringpode ser nuloobrigatório

    CEP (8 dígitos).

  • streetstringpode ser nuloobrigatório

    Logradouro.

    até 200 caracteres

  • numberstringpode ser nuloobrigatório

    Número.

    até 20 caracteres

  • complementstringpode ser nuloobrigatório

    Complemento.

    até 100 caracteres

  • districtstringpode ser nuloobrigatório

    Bairro.

    até 120 caracteres

  • citystringpode ser nuloobrigatório

    Cidade.

    até 120 caracteres

  • statestringpode ser nuloobrigatório

    UF (2 letras).

  • showFullAddressbooleanobrigatório

    Mostra full address.

  • aboutstringpode ser nuloobrigatório

    até 1000 caracteres

  • specialInstructionsstringpode ser nuloobrigatório

    até 1000 caracteres

  • cancellationPolicystringpode ser nuloobrigatório

    até 1000 caracteres

  • parkingenum<string>pode ser nuloobrigatório

    Valores aceitos:freepaidnone

  • hasSnackBarbooleanobrigatório

    Indica se snack bar.

  • hasTvbooleanobrigatório

    Indica se tv.

  • hasWifibooleanobrigatório

    Indica se wifi.

  • accessiblebooleanobrigatório
  • childrenPolicyenum<string>pode ser nuloobrigatório

    Valores aceitos:adults_and_childrenchildren_onlyno_children

  • languagesenum<string>[]obrigatório

    até 3 itens

    Valores aceitos:ptenes

  • otherLanguagestringpode ser nuloobrigatório

    até 60 caracteres

  • websitestringpode ser nuloobrigatório

    Site.

    até 300 caracteres

  • ecommerceUrlstringpode ser nuloobrigatório

    Endereço de ecommerce (URL).

    até 300 caracteres

  • facebookstringpode ser nuloobrigatório

    URL do Facebook.

    até 120 caracteres

  • instagramstringpode ser nuloobrigatório

    Usuário ou URL do Instagram.

    até 60 caracteres

Mostrar mais 1 campo opcional
  • currencyenum<string>padrão: "BRL"

    Valores aceitos:BRLUSDEUR

Resposta 200

application/json
  • slugstringobrigatório

    Endereço curto usado na URL do site (letras minúsculas, números e hífen).

  • namestringobrigatório

    Nome.

  • legalNamestringpode ser nuloobrigatório

    Nome de legal (só leitura).

  • cnpjstringpode ser nuloobrigatório

    CNPJ (14 dígitos, sem pontuação).

  • stateRegistrationstringpode ser nuloobrigatório
  • stateRegistrationExemptbooleanobrigatório
  • municipalRegistrationstringpode ser nuloobrigatório
  • municipalRegistrationExemptbooleanobrigatório
  • contactEmailstringpode ser nuloobrigatório
  • phonesobject[]obrigatório

    Telefones de contato.

    Mostrar 2 atributos
    • typeenum<string>obrigatório

      Tipo. Os valores aceitos estão no tipo.

      Valores aceitos:mobilelandlinewhatsapphomemessageother

    • numberstringobrigatório

      Número.

  • typeenum<string>obrigatório

    Tipo. Os valores aceitos estão no tipo.

    Valores aceitos:salonbarbershopnail_salonaesthetic_clinicspapodiatryother

  • businessSizeenum<string>pode ser nuloobrigatório

    Valores aceitos:singlebranchfranchiseother

  • timezonestringobrigatório

    Fuso horário IANA do estabelecimento (ex.: America/Sao_Paulo).

  • currencyenum<string>obrigatóriopadrão: "BRL"

    Valores aceitos:BRLUSDEUR

  • postalCodestringpode ser nuloobrigatório

    CEP (8 dígitos).

  • streetstringpode ser nuloobrigatório

    Logradouro.

  • numberstringpode ser nuloobrigatório

    Número.

  • complementstringpode ser nuloobrigatório

    Complemento.

  • districtstringpode ser nuloobrigatório

    Bairro.

  • citystringpode ser nuloobrigatório

    Cidade.

  • statestringpode ser nuloobrigatório

    UF (2 letras).

  • showFullAddressbooleanobrigatório

    Mostra full address.

  • aboutstringpode ser nuloobrigatório
  • specialInstructionsstringpode ser nuloobrigatório
  • cancellationPolicystringpode ser nuloobrigatório
  • parkingenum<string>pode ser nuloobrigatório

    Valores aceitos:freepaidnone

  • hasSnackBarbooleanobrigatório

    Indica se snack bar.

  • hasTvbooleanobrigatório

    Indica se tv.

  • hasWifibooleanobrigatório

    Indica se wifi.

  • accessiblebooleanobrigatório
  • childrenPolicyenum<string>pode ser nuloobrigatório

    Valores aceitos:adults_and_childrenchildren_onlyno_children

  • languagesenum<string>[]obrigatório

    Valores aceitos:ptenes

  • otherLanguagestringpode ser nuloobrigatório
  • websitestringpode ser nuloobrigatório

    Site.

  • ecommerceUrlstringpode ser nuloobrigatório

    Endereço de ecommerce (URL).

  • facebookstringpode ser nuloobrigatório

    URL do Facebook.

  • instagramstringpode ser nuloobrigatório

    Usuário ou URL do Instagram.

curl --request PUT \  --url 'https://qa-tratow.ips.app.br/api/open/v1/establishments/current/details' \  --header 'Authorization: Bearer <chave>' \  --header 'Content-Type: application/json' \  --data '{    "slug": "studio-exemplo",    "name": "Maria Lima",    "legalName": "texto",    "cnpj": "texto",    "stateRegistration": "texto",    "stateRegistrationExempt": true,    "municipalRegistration": "texto",    "municipalRegistrationExempt": true,    "contactEmail": "texto",    "phones": [      {        "type": "mobile",        "number": "texto"      }    ],    "type": "salon",    "businessSize": "single",    "timezone": "America/Sao_Paulo",    "currency": "BRL",    "postalCode": "01310100",    "street": "texto",    "number": "texto",    "complement": "texto",    "district": "texto",    "city": "São Paulo",    "state": "SP",    "showFullAddress": true,    "about": "texto",    "specialInstructions": "texto",    "cancellationPolicy": "texto",    "parking": "free",    "hasSnackBar": true,    "hasTv": true,    "hasWifi": true,    "accessible": true,    "childrenPolicy": "adults_and_children",    "languages": [      "pt"    ],    "otherLanguage": "texto",    "website": "texto",    "ecommerceUrl": "texto",    "facebook": "texto",    "instagram": "texto"  }'
Resposta
{  "slug": "studio-exemplo",  "name": "Maria Lima",  "legalName": "texto",  "cnpj": "texto",  "stateRegistration": "texto",  "stateRegistrationExempt": true,  "municipalRegistration": "texto",  "municipalRegistrationExempt": true,  "contactEmail": "texto",  "phones": [    {      "type": "mobile",      "number": "texto"    }  ],  "type": "salon",  "businessSize": "single",  "timezone": "America/Sao_Paulo",  "currency": "BRL",  "postalCode": "01310100",  "street": "texto",  "number": "texto",  "complement": "texto",  "district": "texto",  "city": "São Paulo",  "state": "SP",  "showFullAddress": true,  "about": "texto",  "specialInstructions": "texto",  "cancellationPolicy": "texto",  "parking": "free",  "hasSnackBar": true,  "hasTv": true,  "hasWifi": true,  "accessible": true,  "childrenPolicy": "adults_and_children",  "languages": [    "pt"  ],  "otherLanguage": "texto",  "website": "texto",  "ecommerceUrl": "texto",  "facebook": "texto",  "instagram": "texto"}

Os valores são ilustrativos.