{ "$schema": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/Branch_2_001.json#", "info": { "description": "Contrato de Mensagem Padronizada para a entidade filial (Branch) para produtos TOTVS", "version": "2.001", "title": "Branch", "contact": { "name": "T-Talk", "url": "API.Totvs.com.br", "email": "comiteintegracao@totvs.com.br" }, "x-totvs": { "transactionDefinition": { "subType": "event", "businessContentType": { "type": "object", "$ref": "#/definitions/BranchType" }, "returnContentType": { "type": "object", "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/schemas/types/ListOfInternalId_1_000.json#/definitions/ReturnContentWithModelType" } }, "messageDocumentation": { "name": "Branch", "description": "Filial", "segment": "Foundation" }, "productInformation": [ { "product": "protheus", "contact": "Protheus_FW@totvs.com.br", "description": "Cadastro de Filial", "adapter": "apcfg230i.prw", "helpUrl": "link aqui" }, { "product": "RMS", "contact": "lsousa@totvs.com.br", "description": "Cadastro de Filial" } ] } }, "definitions": { "PagedBranches": { "type": "object", "allOf": [ { "$ref": "https://raw.githubusercontent.com/totvs/ttalk-standard-message/master/jsonschema/apis/types/totvsApiTypesBase.json#/definitions/Paging" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/BranchType" } } } } ] }, "BranchType": { "type": "object", "properties": { "BranchInternalId": { "description": "Internal ID. CompanyID|BranchID", "type": "string", "maxLength": 5 }, "CompanyCode": { "type": "string", "example": "D", "description": "Código da Empresa", "x-totvs": [ { "product": "protheus", "Field": "XX8.XX8_CODIGO", "Required": false, "Type": "Char", "length": "12", "available": true, "canUpdate": false }, { "product": "RMS", "Field": "TIP_EMPRESA", "Required": false, "Type": "Integer", "length": "3", "available": true, "canUpdate": false } ] }, "UnitOfBusiness": { "type": "string", "example": "SP", "description": "Unidade de Negócio", "x-totvs": [ { "product": "protheus", "field": "XX8.XX8_UNID", "required": false, "type": "Char", "length": "12", "available": true, "canUpdate": false } ] }, "ParentCode": { "type": "string", "example": "01", "description": "Coligada/Codigo Unidade Pai", "x-totvs": [ { "product": "RMS", "field": "TIP_CLI_EMP_PRINC", "required": false, "type": "Integer", "length": "8", "available": true, "canUpdate": false } ] }, "Description": { "type": "string", "example": "Filial São Paulo 1", "description": "Descrição", "x-totvs": [ { "product": "RMS", "field": "TIP_RAZAO_SOCIAL", "required": false, "type": "string", "length": "30", "available": true, "canUpdate": false } ] }, "EnterpriseGroup": { "type": "string", "example": "18", "description": "Grupo de Empresa", "x-totvs": [ { "product": "protheus", "field": "XX8.XX8_GRPEMP", "required": false, "type": "Char", "length": "12", "available": true, "canUpdate": false } ] }, "Code": { "type": "string", "example": "D SP 01", "description": "Filial/Codigo Unidade", "x-totvs": [ { "product": "RMS", "field": "TIP_CODIGO", "required": false, "type": "Integer", "length": "8", "available": true, "canUpdate": false } ] }, "Title": { "type": "string", "example": "Filial SP", "description": "Título", "x-totvs": [ { "product": "RMS", "field": "TIP_NOME_FANTASIA", "required": false, "type": "string", "length": "30", "available": true, "canUpdate": false } ] }, "CGC": { "type": "string", "format": "CNPJ", "example": "35.002.568/0001-26", "description": "CGC", "x-totvs": [ { "product": "RMS", "field": "TIP_CGC_CPF", "required": false, "type": "Integer", "length": "15", "available": true, "canUpdate": false } ] }, "StateRegistration": { "type": "string", "example": "Pesquisar", "description": "Inscrição Estadual", "x-totvs": [ { "product": "RMS", "field": "TIP_INSC_EST_IDENT", "required": false, "type": "string", "length": "15", "available": true, "canUpdate": false } ] }, "Phone": { "type": "string", "example": "3333-5555", "description": "Telefone" }, "Street": { "type": "string", "example": "Avenida Braz Leme, 1000", "description": "Rua", "x-totvs": [ { "product": "RMS", "field": "TIP_ENDERECO", "required": false, "type": "string", "length": "35", "available": true, "canUpdate": false } ] }, "Complement": { "type": "string", "example": "bloco A", "description": "Complemento" }, "Neighborhood": { "type": "string", "example": "Santana", "description": "Bairro", "x-totvs": [ { "product": "RMS", "field": "TIP_BAIRRO", "required": false, "type": "string", "length": "20", "available": true, "canUpdate": false } ] }, "State": { "type": "string", "example": "SP", "description": "Estado", "x-totvs": [ { "product": "RMS", "field": "TIP_ESTADO", "required": false, "type": "string", "length": "2", "available": true, "canUpdate": false } ] }, "City": { "type": "string", "example": "São Paulo", "description": "City" }, "ZipCode": { "type": "string", "example": "02511-900", "description": "CEP", "x-totvs": [ { "product": "RMS", "field": "TIP_CEP", "required": false, "type": "Integer", "length": "9", "available": true, "canUpdate": false } ] }, "CityCode": { "type": "string", "example": "Pesquisar", "description": "Código do Municipio", "x-totvs": [ { "product": "protheus", "field": "SM0.M0_CODMUN", "required": false, "type": "Char", "length": "7", "note": "Campo obrigatório para o processo fiscal/TAF.", "available": true, "canUpdate": true } ] }, "CNAECode": { "type": "string", "example": "Pesquisar", "description": "Código da Classificacao Nacional de Ativades Economicas", "x-totvs": [ { "product": "protheus", "field": "SM0.M0_CNAE", "required": false, "type": "Char", "length": "7", "note": "Campo obrigatório para o processo fiscal/TAF.", "available": true, "canUpdate": false }, { "product": "RMS", "field": "LOJ_CAE", "required": false, "type": "Integer", "length": "6", "available": true, "canUpdate": false } ] }, "NatureCode": { "type": "string", "example": "pesquisar", "description": "Unidade de Negócio", "x-totvs": [ { "product": "protheus", "field": "SM0.M0_NATJUR", "required": false, "type": "Char", "length": "4", "note": "Campo obrigatório para o processo fiscal/TAF.", "available": true, "canUpdate": false }, { "product": "RMS", "field": "LOJ_JUN_COM", "required": false, "type": "string", "length": "20", "available": true, "canUpdate": false } ] }, "BillingAddress": { "type": "string", "example": "Avenida Braz Leme, 1000", "description": "Unidade de Negócio", "x-totvs": [ { "product": "protheus", "field": "SM0.M0_ENDCOB", "required": false, "type": "Char", "length": "60", "note": "Campo obrigatório para o processo fiscal/TAF.", "available": true, "canUpdate": true } ] }, "BillingZipCode": { "type": "string", "example": "02511-900", "description": "Unidade de Negócio", "x-totvs": [ { "product": "protheus", "field": "SM0.M0_CEPCOB", "required": false, "type": "Char", "length": "8", "note": "Campo obrigatório para o processo fiscal/TAF.", "available": true, "canUpdate": true } ] }, "BillingComplement": { "type": "string", "example": "Bloca A", "description": "Unidade de Negócio", "x-totvs": [ { "product": "protheus", "field": "SM0.M0_COMPCOB", "required": false, "type": "Char", "length": "25", "note": "Campo obrigatório para o processo fiscal/TAF.", "available": true, "canUpdate": true } ] }, "BillingNeighborhood": { "type": "string", "example": "Santana", "description": "Unidade de Negócio", "x-totvs": [ { "product": "protheus", "field": "SM0.M0_BAIRCOB", "required": false, "type": "Char", "length": "35", "note": "Campo obrigatório para o processo fiscal/TAF.", "available": true, "canUpdate": true } ] }, "BillingCity": { "type": "string", "example": "São Paulo", "description": "Unidade de Negócio", "x-totvs": [ { "product": "protheus", "field": "SM0.M0_CIDCOB", "required": false, "type": "Char", "length": "60", "note": "Campo obrigatório para o processo fiscal/TAF.", "available": true, "canUpdate": true } ] }, "BillingState": { "type": "string", "example": "SP", "description": "Unidade de Negócio", "x-totvs": [ { "product": "protheus", "field": "SM0.M0_ESTCOB", "required": false, "type": "Char", "length": "2", "note": "Campo obrigatório para o processo fiscal/TAF.", "available": true, "canUpdate": true } ] }, "NIRE": { "type": "string", "example": "pesquisar", "description": "Unidade de Negócio", "x-totvs": [ { "product": "protheus", "field": "SM0.M0_NIRE", "required": false, "type": "Char", "length": "25", "note": "Campo obrigatório para o processo fiscal/TAF.", "available": true, "canUpdate": false } ] }, "DTRE": { "type": "string", "example": "pesquisar", "description": "Unidade de Negócio", "x-totvs": [ { "product": "protheus", "field": "SM0.M0_DTRE", "required": false, "type": "Char", "length": "10", "note": "Campo obrigatório para o processo fiscal/TAF.", "available": true, "canUpdate": false } ] }, "Suframa": { "type": "string", "example": "pesquisar", "description": "Unidade de Negócio", "x-totvs": [ { "product": "protheus", "field": "SM0.M0_INS_SUF", "required": false, "type": "Char", "length": "12", "note": "Campo obrigatório para o processo fiscal/TAF.", "available": true, "canUpdate": false } ] }, "SubscriptionType": { "type": "string", "example": "pesquisar", "description": "Unidade de Negócio", "enum": [ "1", "2", "3", "4" ], "x-totvs": [ { "product": "protheus", "field": "SM0.M0_TPINSC", "required": false, "type": "Char", "length": "1", "available": true, "canUpdate": false, "note": "1=CEI;2=CNPJ;3=CPF;4=INCRA" } ] } } } } }