raims customers
Gerencie os clientes.
Do comando ao resultado
O cadastro por documento pode criar um cliente ou atualizar o cadastro existente. Confira o resultado antes de usar seu ID em cobranças.
O perfil e a credencial precisam estar configurados para as consultas reais.
Com chave de API, a chave determina empresa e ambiente. --environment
seleciona o ambiente somente no OAuth.
Prepare um cadastro
Shellraims customers create --tax-id 12345678909 --full-name "Cliente de teste" --external-reference cliente_123 --dry-runDocumento, nome e referência são exemplos. Substitua-os pelos dados autorizados da sua integração e confira o corpo da prévia.
Envie o cadastro revisado
Shellraims --profile sandbox --output json customers create --tax-id 12345678909 --full-name "Cliente de teste" --external-reference cliente_123Envie os mesmos dados que conferiu na prévia, com uma credencial Sandbox. Guarde
data.id: a resposta informa o cliente criado ou atualizado pelo documento.Localize o cadastro pela referência
Shellraims --profile sandbox --output json customers list --external-reference cliente_123 --page-size 20Use a mesma referência enviada no cadastro e mantenha o perfil. Leia
data.listedata.page; a referência não é única, então confira o ID retornado na etapa anterior.Confira o cadastro encontrado
Shellraims --profile sandbox --output json customers get CUSTOMER_IDSubstitua
CUSTOMER_IDpelo ID da resposta. Para editar, useupdate: omitir um campo e enviarnulltêm efeitos distintos. A exclusão em lote informa resultados por item; não trate a resposta como exclusão integral.
Escolha o comando
| Comando | Finalidade |
|---|---|
raims customers create | Cadastre ou atualize um cliente pelo CPF ou CNPJ. |
raims customers delete | Exclua um cliente. |
raims customers delete-batch | Exclua os clientes informados no corpo da requisição. |
raims customers get | Consulte um cliente. |
raims customers list | Liste os clientes. |
raims customers update | Atualize um cliente. |
As prévias abaixo usam --dry-run e não enviam a requisição. Substitua os placeholders e confira o resultado antes de enviar uma escrita.
Campos de corpo, filtros e headers só são enviados quando informados. Os padrões das opções de execução não preenchem campos da API.
raims customers
Gerencie os clientes.
raims customers [flags]Opções de execução
--help,-hboolpadrão: false- Exibe a ajuda de customers.
Consulte as opções globais.
Subcomandos: raims customers create, raims customers delete, raims customers delete-batch, raims customers get, raims customers list, raims customers update.
raims customers create
Cadastre ou atualize um cliente pelo CPF ou CNPJ.
raims customers create [flags]Ambientes OAuth: Sandbox, Production. Respostas de sucesso: 200, 201.
Exemplo 1
raims --profile PROFILE --output json customers create --data-file request.json --dry-runExemplo 2
raims customers create --tax-id="12345678909" --dry-runO trecho abaixo mostra o conteúdo de data no CLI. O envelope também informa status_code e o request_id recebido.
Criar cliente
{
"id": "cus_1Q2W3E4R5T6Y7U8I9O0P",
"object": "customer",
"tax_id": "12345678909",
"tax_id_type": "cpf",
"created_at": 1791849600,
"external_reference": null
}Campos do corpo
--citystringaceita null enviado somente se informado- Cidade do endereço.
--complementstringaceita null enviado somente se informado- Complemento do endereço.
--dial-codestringaceita null enviado somente se informado- Código de discagem internacional. Pode ser informado sem phone_local.
--emailstringaceita null enviado somente se informado- E-mail do pagador. Cadastrar o e-mail não envia uma mensagem.
--external-referencestringaceita null enviado somente se informado- Identificador do cliente no seu sistema. Para um cliente já cadastrado, omita para manter a referência ou envie null ou texto vazio para removê-la. Use external_reference na listagem de clientes para buscar esse valor.
--full-namestringaceita null enviado somente se informado- Nome completo do pagador.
--metadatastringArrayenviado somente se informado- Defina um texto de metadata como CHAVE=VALOR; repita para outras chaves. Pontos nas chaves são literais.
--metadata-emptyboolenviado somente se informado- Envie metadata vazio; na atualização, as chaves existentes são preservadas.
--metadata-nullstringArrayenviado somente se informado- Envie null para uma chave de metadata; repita para outras chaves. Na atualização, a chave é removida.
--neighstringaceita null enviado somente se informado- Bairro do endereço.
--phone-localstringaceita null enviado somente se informado- Número de telefone sem o código de discagem, com ou sem pontuação. Pode ser informado sem dial_code.
--streetstringaceita null enviado somente se informado- Logradouro do endereço.
--street-numberstringaceita null enviado somente se informado- Número do endereço.
--tax-idstringobrigatório no corpo enviado somente se informado- CPF ou CNPJ válido, com ou sem pontos, barra, hífen e espaços.
--ufstringaceita null enviado somente se informado- Sigla do estado, como SP.
--zip-codestringaceita null enviado somente se informado- CEP do endereço, com ou sem hífen. Se street, neigh, city, uf, street_number e complement estiverem vazios, o CEP pode preencher rua, bairro, cidade e estado. O preenchimento não inclui número nem complemento.
Headers da requisição
--idempotency-keystringenviado somente se informado- Reutilize esta chave de idempotência opcional ao repetir a mesma requisição.
Opções de execução
--body-nullstringArraypadrão: []- Envie null em um campo do corpo que aceite esse valor, usando o nome JSON; repita para outros campos e não combine com --data-file.
--data-filestringpadrão: vazio- Leia o corpo JSON de um arquivo UTF-8 ou use '-' para stdin.
--dry-runboolpadrão: false- Valide e apresente a requisição sem credenciais ou acesso à rede.
--help,-hboolpadrão: false- Exibe a ajuda de create.
--show-headersboolpadrão: false- Mostre os headers públicos da resposta, sem credenciais ou cookies.
--timeoutdurationpadrão: 1m0s- Prazo total da requisição, incluindo novas tentativas. Exemplos: 30s ou 2m.
Consulte as opções globais.
Create or update a customer by tax ID.
POST /v1/customers
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.
Read the JSON request body with --data-file PATH, or --data-file - for standard input. You can also provide the body options listed below. Repeat array options for each item. Do not combine file input with body options. Only supplied fields are sent. When listed, --body-null FIELD sends an explicit null for a nullable field. Array size and uniqueness follow the endpoint contract. Objects without dedicated body options and arrays of objects use file input.
JSON body fields:
city string optional, nullable
complement string optional, nullable
dial_code string optional, nullable
email string optional, nullable
external_reference string optional, nullable
full_name string optional, nullable
metadata object optional, nullable
neigh string optional, nullable
phone_local string optional, nullable
street string optional, nullable
street_number string optional, nullable
tax_id string required
uf string optional, nullable
zip_code string optional, nullable
Nested requirements apply when the parent object is present, or for each supplied array item. Omit an optional field to leave it unspecified; null is accepted only for nullable fields.
JSON body example (save as request.json):
{
"full_name": "Cliente de teste",
"tax_id": "12345678909",
"email": "cliente@example.invalid",
"dial_code": "55",
"phone_local": "11987654321",
"zip_code": "01310000",
"street": "Avenida de exemplo",
"street_number": "100",
"complement": "Sala 1",
"neigh": "Centro",
"city": "São Paulo",
"uf": "SP"
}
Example values are illustrative. Replace resource IDs and review the request before sending it.
Metadata options send a text map: repeat --metadata KEY=VALUE for values, use --metadata-null KEY for a null value, or --metadata-empty for an empty object. Empty text, numeric-looking values and the text null remain strings. Omitted metadata and an empty object preserve existing keys when updating; null values remove individual keys, and --body-null metadata clears the entire map. Do not combine these options with --data-file, or use multiple values for the same key.raims customers delete
Exclua um cliente.
raims customers delete ID [flags]Ambientes OAuth: Sandbox, Production. Respostas de sucesso: 200.
Exemplo
raims --profile PROFILE --output json customers delete ID --dry-runO trecho abaixo mostra o conteúdo de data no CLI. O envelope também informa status_code e o request_id recebido.
Remover cliente
{
"id": "cus_3AbHiWSrsZBoaTg47OcMzC",
"deleted": true
}Opções de execução
--dry-runboolpadrão: false- Valide e apresente a requisição sem credenciais ou acesso à rede.
--help,-hboolpadrão: false- Exibe a ajuda de delete.
--show-headersboolpadrão: false- Mostre os headers públicos da resposta, sem credenciais ou cookies.
--timeoutdurationpadrão: 1m0s- Prazo total da requisição, incluindo novas tentativas. Exemplos: 30s ou 2m.
Consulte as opções globais.
Delete a customer.
DELETE /v1/customers/{id}
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.raims customers delete-batch
Exclua os clientes informados no corpo da requisição.
raims customers delete-batch [flags]Ambientes OAuth: Sandbox, Production. Respostas de sucesso: 200.
Exemplo 1
raims --profile PROFILE --output json customers delete-batch --data-file request.json --dry-runExemplo 2
raims customers delete-batch --identifiers="cus_3AbHiWSrsZBoaTg47OcMzC" --identifiers="cus_1szWVIyZES2MJoAMUmjwW" --dry-runO trecho abaixo mostra o conteúdo de data no CLI. O envelope também informa status_code e o request_id recebido.
Remover clientes em lote
{
"removed": [
"cus_3AbHiWSrsZBoaTg47OcMzC"
],
"blocked": [
"cus_1szWVIyZES2MJoAMUmjwW"
],
"invalid": [],
"errors": [
{
"field": "identifiers[1]",
"code": "CUSTOMER_HAS_CHARGES",
"message": "The customer cannot be deleted while it has charges that have not been removed, including paid or cancelled charges. List the customer's charges with GET /v1/charges using the customer_id filter."
}
]
}Campos do corpo
--identifiersstringArrayobrigatório no corpo enviado somente se informado- IDs dos clientes que deseja remover. IDs repetidos não geram mais de uma remoção. IDs inválidos ou de clientes que a chave não pode acessar aparecem em invalid. Repita a opção para cada item.
Headers da requisição
--idempotency-keystringenviado somente se informado- Reutilize esta chave de idempotência opcional ao repetir a mesma requisição.
Opções de execução
--data-filestringpadrão: vazio- Leia o corpo JSON de um arquivo UTF-8 ou use '-' para stdin.
--dry-runboolpadrão: false- Valide e apresente a requisição sem credenciais ou acesso à rede.
--help,-hboolpadrão: false- Exibe a ajuda de delete-batch.
--show-headersboolpadrão: false- Mostre os headers públicos da resposta, sem credenciais ou cookies.
--timeoutdurationpadrão: 1m0s- Prazo total da requisição, incluindo novas tentativas. Exemplos: 30s ou 2m.
Consulte as opções globais.
Delete the customers listed in the request body.
DELETE /v1/customers
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.
Read the JSON request body with --data-file PATH, or --data-file - for standard input. You can also provide the body options listed below. Repeat array options for each item. Do not combine file input with body options. Only supplied fields are sent. When listed, --body-null FIELD sends an explicit null for a nullable field. Array size and uniqueness follow the endpoint contract. Objects without dedicated body options and arrays of objects use file input.
JSON body fields:
identifiers array<string | null> required
Nested requirements apply when the parent object is present, or for each supplied array item. Omit an optional field to leave it unspecified; null is accepted only for nullable fields.
JSON body example (save as request.json):
{
"identifiers": [
"cus_3AbHiWSrsZBoaTg47OcMzC",
"cus_1szWVIyZES2MJoAMUmjwW"
]
}
Example values are illustrative. Replace resource IDs and review the request before sending it.raims customers get
Consulte um cliente.
raims customers get ID [flags]Ambientes OAuth: Sandbox, Production. Respostas de sucesso: 200.
Exemplo
raims --profile PROFILE --output json customers get ID --dry-runO trecho abaixo mostra o conteúdo de data no CLI. O envelope também informa status_code e o request_id recebido.
Recuperar um único cliente
{
"id": "cus_3AbHiWSrsZBoaTg47OcMzC",
"state": "SP",
"name": "Cliente de teste",
"first_name": "Cliente",
"last_name": "de teste",
"email": "cliente@example.invalid"
}Opções de execução
--dry-runboolpadrão: false- Valide e apresente a requisição sem credenciais ou acesso à rede.
--help,-hboolpadrão: false- Exibe a ajuda de get.
--show-headersboolpadrão: false- Mostre os headers públicos da resposta, sem credenciais ou cookies.
--timeoutdurationpadrão: 1m0s- Prazo total da requisição, incluindo novas tentativas. Exemplos: 30s ou 2m.
Consulte as opções globais.
Get a customer.
GET /v1/customers/{id}
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.raims customers list
Liste os clientes.
raims customers list [flags]Ambientes OAuth: Sandbox, Production. Respostas de sucesso: 200.
Exemplo
raims --profile PROFILE --output json customers list --dry-runO trecho abaixo mostra o conteúdo de data no CLI. O envelope também informa status_code e o request_id recebido.
Clientes encontrados
{
"list": [
{
"id": "cus_1Q2W3E4R5T6Y7U8I9O0P",
"name": "Cliente de teste",
"first_name": "Cliente",
"last_name": "de teste",
"email": "cliente@example.invalid",
"tax_id": "12345678909",
"tax_id_type": "cpf",
"dial_code": "55",
"phone_local": "11987654321",
"zip_code": "01310000",
"street": "Avenida de exemplo",
"street_number": "100",
"complement": null,
"neigh": "Centro",
"city": "São Paulo",
"state": "SP",
"created_at": 1791849600,
"updated_at": 1791849600,
"external_reference": null,
"metadata": {}
}
],
"page": {
"page_size": 10,
"has_next": false,
"has_previous": false,
"next_after": null,
"previous_before": null
}
}Filtros de consulta
--afterstringenviado somente se informado- Consulte após este cursor opaco. Não combine com --before.
--beforestringenviado somente se informado- Consulte antes deste cursor opaco. Não combine com --after.
--documentstringenviado somente se informado- Filtre pelo CPF ou CNPJ do cliente.
--emailstringenviado somente se informado- Filtre pelo endereço de e-mail.
--external-referencestringenviado somente se informado- Filtre pela referência externa.
--identifierstringenviado somente se informado- Filtre pelo identificador público do recurso.
--namestringenviado somente se informado- Filtre pelo nome do cliente.
--page-sizeint64enviado somente se informado- Quantidade de resultados por página. A API ajusta o tamanho solicitado.
Opções de execução
--allboolpadrão: false- Leia todas as páginas como resultados separados. Com --output json, a saída usa JSON Lines.
--dry-runboolpadrão: false- Valide e apresente a requisição sem credenciais ou acesso à rede.
--help,-hboolpadrão: false- Exibe a ajuda de list.
--max-pagesintpadrão: 100- Limite de páginas com --all, entre 1 e 10000.
--show-headersboolpadrão: false- Mostre os headers públicos da resposta, sem credenciais ou cookies.
--timeoutdurationpadrão: 1m0s- Prazo total da requisição, incluindo novas tentativas. Exemplos: 30s ou 2m.
Consulte as opções globais.
List customers.
GET /v1/customers
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.raims customers update
Atualize um cliente.
raims customers update ID [flags]Ambientes OAuth: Sandbox, Production. Respostas de sucesso: 200.
Exemplo 1
raims --profile PROFILE --output json customers update ID --data-file request.json --dry-runExemplo 2
raims customers update ID --email="atualizado@example.invalid" --dry-runO trecho abaixo mostra o conteúdo de data no CLI. O envelope também informa status_code e o request_id recebido.
Atualizar cliente existente
{
"id": "cus_3AbHiWSrsZBoaTg47OcMzC",
"state": "SP",
"name": "Cliente atualizado",
"first_name": "Cliente",
"last_name": "atualizado",
"email": "atualizado@example.invalid"
}Campos do corpo
--citystringaceita null enviado somente se informado- Cidade do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
--complementstringaceita null enviado somente se informado- Complemento do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
--dial-codestringaceita null enviado somente se informado- Código de discagem internacional. Pode ser informado sem phone_local. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
--emailstringaceita null enviado somente se informado- E-mail do pagador. Atualizar o e-mail não envia uma mensagem. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
--external-referencestringaceita null enviado somente se informado- Identificador do cliente no seu sistema. Omita para manter a referência atual; envie null ou texto vazio para removê-la. Use external_reference na listagem de clientes para buscar esse valor.
--full-namestringaceita null enviado somente se informado- Nome completo do pagador. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
--metadatastringArrayenviado somente se informado- Defina um texto de metadata como CHAVE=VALOR; repita para outras chaves. Pontos nas chaves são literais.
--metadata-emptyboolenviado somente se informado- Envie metadata vazio; na atualização, as chaves existentes são preservadas.
--metadata-nullstringArrayenviado somente se informado- Envie null para uma chave de metadata; repita para outras chaves. Na atualização, a chave é removida.
--neighstringaceita null enviado somente se informado- Bairro do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
--phone-localstringaceita null enviado somente se informado- Número de telefone sem o código de discagem, com ou sem pontuação. Pode ser informado sem dial_code. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
--streetstringaceita null enviado somente se informado- Logradouro do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
--street-numberstringaceita null enviado somente se informado- Número do endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
--ufstringaceita null enviado somente se informado- Sigla do estado, como SP. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
--zip-codestringaceita null enviado somente se informado- CEP do endereço, com ou sem hífen. Atualizar o CEP não preenche os outros campos de endereço. Omita para manter o valor atual; envie null ou texto vazio para removê-lo.
Headers da requisição
--idempotency-keystringenviado somente se informado- Reutilize esta chave de idempotência opcional ao repetir a mesma requisição.
Opções de execução
--body-nullstringArraypadrão: []- Envie null em um campo do corpo que aceite esse valor, usando o nome JSON; repita para outros campos e não combine com --data-file.
--data-filestringpadrão: vazio- Leia o corpo JSON de um arquivo UTF-8 ou use '-' para stdin.
--dry-runboolpadrão: false- Valide e apresente a requisição sem credenciais ou acesso à rede.
--help,-hboolpadrão: false- Exibe a ajuda de update.
--show-headersboolpadrão: false- Mostre os headers públicos da resposta, sem credenciais ou cookies.
--timeoutdurationpadrão: 1m0s- Prazo total da requisição, incluindo novas tentativas. Exemplos: 30s ou 2m.
Consulte as opções globais.
Update a customer.
PATCH /v1/customers/{id}
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.
Read the JSON request body with --data-file PATH, or --data-file - for standard input. You can also provide the body options listed below. Repeat array options for each item. Do not combine file input with body options. Only supplied fields are sent. When listed, --body-null FIELD sends an explicit null for a nullable field. Array size and uniqueness follow the endpoint contract. Objects without dedicated body options and arrays of objects use file input.
JSON body fields:
city string optional, nullable
complement string optional, nullable
dial_code string optional, nullable
email string optional, nullable
external_reference string optional, nullable
full_name string optional, nullable
metadata object optional, nullable
neigh string optional, nullable
phone_local string optional, nullable
street string optional, nullable
street_number string optional, nullable
uf string optional, nullable
zip_code string optional, nullable
Nested requirements apply when the parent object is present, or for each supplied array item. Omit an optional field to leave it unspecified; null is accepted only for nullable fields.
JSON body example (save as request.json):
{
"full_name": "Cliente atualizado",
"email": "atualizado@example.invalid"
}
Example values are illustrative. Replace resource IDs and review the request before sending it.
Metadata options send a text map: repeat --metadata KEY=VALUE for values, use --metadata-null KEY for a null value, or --metadata-empty for an empty object. Empty text, numeric-looking values and the text null remain strings. Omitted metadata and an empty object preserve existing keys when updating; null values remove individual keys, and --body-null metadata clears the entire map. Do not combine these options with --data-file, or use multiple values for the same key.