TF Fiscal

RPA Receipts

POST/api/rpa/prestador/save

Create/update provider

Creates or updates the individual provider record. The CPF identifies the provider within the company: two records with the same CPF are not allowed. The individual is not an issuer — no account and no certificate required. An update overwrites the whole record with the request body: omitted fields are cleared and ativo becomes true when omitted; dataNascimento is the exception and keeps its previous value when omitted or malformed.

Required headers

tokenstringstringIssuing company token
signstringstringMD5 signature: MD5(token + path + body + timestamp)
timestampstringstringUnix timestamp in seconds

Body

Identification
idstringstringRecord ID.
cpf*stringstringProvider CPF (11 digits); non-digit characters are removed
name*stringstringProvider name
nitstringstringNIT/PIS/PASEP; only digits are kept.
dataNascimentostringstringDate of birth (YYYY-MM-DD).
Address and contact
enderecostringstringStreet
numerostringstringNumber
complementostringstringAddress complement
bairrostringstringNeighborhood
citystringstringCity
ufstringstringState abbreviation (2 letters), stored in upper case
cepstringstringPostal code; only digits are kept
telefonestringstringPhone
emailstringstringEmail
Tax
inscricaoMunicipalstringstringMunicipal registration
qtdDependentesintintDependents for IRRF deduction (monthly deduction, not per receipt).
Payment details
bancostringstringBank
agenciastringstringBranch
contastringstringAccount number
tipoContastringstringAccount type
pixstringstringPIX key
Status
ativoboolboolProvider active; default true.

 * Required field.

Common errors

MessageCause
cpf deve ter 11 dígitos / cpf必须为11位数字Not 11 digits after removing non-digit characters
name é obrigatório / name为必填项name not provided
id inválido / id无效id is not a valid ObjectId
Prestador não encontrado / 未找到该服务提供方The record of the id does not exist or does not belong to the company
Já existe prestador com este CPF / 该CPF已存在服务提供方Another record of the company already uses this CPF

Examples

# sign = md5(token + path + body + timestamp)
# Template generated from the endpoint path; replace the placeholders
curl -X POST "https://api.tffiscal.com/api/rpa/prestador/save" \
  -H "Content-Type: application/json" \
  -H "token: $TOKEN" \
  -H "timestamp: $TIMESTAMP" \
  -H "sign: $SIGN" \
  -d @body.json