raims customers
Manage customers
From command to result
Registration by tax ID can create a customer or update an existing record. Check the result before using its ID in charges.
Configure the profile and credential before running real reads. With an API
key, the key determines the company and environment. --environment selects
an environment only for OAuth.
Prepare a record
Shellraims customers create --tax-id 12345678909 --full-name "Cliente de teste" --external-reference cliente_123 --dry-runThe tax ID, name, and reference are examples. Replace them with your integration's authorized data and review the preview body.
Send the reviewed record
Shellraims --profile sandbox --output json customers create --tax-id 12345678909 --full-name "Cliente de teste" --external-reference cliente_123Send the same data you reviewed in the preview with a Sandbox credential. Keep
data.id: the response identifies the customer created or updated by tax ID.Find the record by reference
Shellraims --profile sandbox --output json customers list --external-reference cliente_123 --page-size 20Use the same reference sent in the record and keep the profile. Read
data.listanddata.page; the reference is not unique, so check the ID returned in the previous step.Check the matching record
Shellraims --profile sandbox --output json customers get CUSTOMER_IDReplace
CUSTOMER_IDwith the response ID. To edit, useupdate: omitting a field and sendingnullhave different effects. Batch deletion reports results per item; do not treat its response as complete deletion.
Choose a command
| Command | Purpose |
|---|---|
raims customers create | Create or update a customer by tax ID |
raims customers delete | Delete a customer |
raims customers delete-batch | Delete the customers listed in the request body |
raims customers get | Get a customer |
raims customers list | List customers |
raims customers update | Update a customer |
The previews below use --dry-run and do not send the request. Replace placeholders and review the result before sending a write.
Body fields, filters, and headers are sent only when supplied. Execution option defaults do not fill API fields.
raims customers
Manage customers
raims customers [flags]Execution options
--help,-hbooldefault: false- help for customers
See global options.
Subcommands: raims customers create, raims customers delete, raims customers delete-batch, raims customers get, raims customers list, raims customers update.
raims customers create
Create or update a customer by tax ID
raims customers create [flags]OAuth environments: Sandbox, Production. Success responses: 200, 201.
Example 1
raims --profile PROFILE --output json customers create --data-file request.json --dry-runExample 2
raims customers create --tax-id="12345678909" --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Create a customer
{
"id": "cus_1Q2W3E4R5T6Y7U8I9O0P",
"object": "customer",
"tax_id": "12345678909",
"tax_id_type": "cpf",
"created_at": 1791849600,
"external_reference": null
}Body fields
--citystringaccepts null sent only when supplied- Address city.
--complementstringaccepts null sent only when supplied- Address complement.
--dial-codestringaccepts null sent only when supplied- International dialing code. Can be provided without phone_local.
--emailstringaccepts null sent only when supplied- Payer's email. Registering the email does not send a message.
--external-referencestringaccepts null sent only when supplied- Customer identifier in your system. For an existing customer, omit it to keep the reference or send null or empty text to remove it. Use external_reference in the customer list to search for this value.
--full-namestringaccepts null sent only when supplied- Payer's full name.
--metadatastringArraysent only when supplied- Set a metadata text value as KEY=VALUE (repeat for each key; dots in keys are literal)
--metadata-emptyboolsent only when supplied- Send an empty metadata object; an update preserves existing keys
--metadata-nullstringArraysent only when supplied- Send null for a metadata key (repeat for each key; removes it when updating)
--neighstringaccepts null sent only when supplied- Address neighborhood.
--phone-localstringaccepts null sent only when supplied- Phone number without the dialing code, with or without punctuation. Can be provided without dial_code.
--streetstringaccepts null sent only when supplied- Address street.
--street-numberstringaccepts null sent only when supplied- Address number.
--tax-idstringrequired in the body sent only when supplied- Valid CPF or CNPJ, with or without periods, slash, hyphen and spaces.
--ufstringaccepts null sent only when supplied- State abbreviation, such as SP.
--zip-codestringaccepts null sent only when supplied- Address postal code, with or without a hyphen. If street, neigh, city, uf, street_number and complement are empty, the postal code can fill in the street, neighborhood, city and state. Completion does not include number or address complement.
Request headers
--idempotency-keystringsent only when supplied- Reuse this optional idempotency key when retrying the same request
Execution options
--body-nullstringArraydefault: []- Set a nullable JSON body field to null by its JSON name (repeat for each field; cannot be combined with --data-file)
--data-filestringdefault: empty- Read the JSON request body from a UTF-8 file, or '-' for stdin
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for create
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
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
Delete a customer
raims customers delete ID [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example
raims --profile PROFILE --output json customers delete ID --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Delete a customer
{
"id": "cus_3AbHiWSrsZBoaTg47OcMzC",
"deleted": true
}Execution options
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for delete
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
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
Delete the customers listed in the request body
raims customers delete-batch [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example 1
raims --profile PROFILE --output json customers delete-batch --data-file request.json --dry-runExample 2
raims customers delete-batch --identifiers="cus_3AbHiWSrsZBoaTg47OcMzC" --identifiers="cus_1szWVIyZES2MJoAMUmjwW" --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Delete customers in bulk
{
"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."
}
]
}Body fields
--identifiersstringArrayrequired in the body sent only when supplied- IDs of the customers you want to delete. Repeated IDs do not cause more than one deletion. Invalid IDs or IDs of customers the key cannot access appear in invalid. Repeat the option for each item.
Request headers
--idempotency-keystringsent only when supplied- Reuse this optional idempotency key when retrying the same request
Execution options
--data-filestringdefault: empty- Read the JSON request body from a UTF-8 file, or '-' for stdin
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for delete-batch
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
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
Get a customer
raims customers get ID [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example
raims --profile PROFILE --output json customers get ID --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Retrieve a single customer
{
"id": "cus_3AbHiWSrsZBoaTg47OcMzC",
"state": "SP",
"name": "Cliente de teste",
"first_name": "Cliente",
"last_name": "de teste",
"email": "cliente@example.invalid"
}Execution options
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for get
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
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
List customers
raims customers list [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example
raims --profile PROFILE --output json customers list --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Customers found
{
"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
}
}Query filters
--afterstringsent only when supplied- Read after this opaque cursor (cannot be combined with --before)
--beforestringsent only when supplied- Read before this opaque cursor (cannot be combined with --after)
--documentstringsent only when supplied- Filter by customer tax ID
--emailstringsent only when supplied- Filter by email address
--external-referencestringsent only when supplied- Filter by external reference
--identifierstringsent only when supplied- Filter by public resource identifier
--namestringsent only when supplied- Filter by customer name
--page-sizeint64sent only when supplied- Results per page (the API normalizes the requested size)
Execution options
--allbooldefault: false- Read all pages as separate results (JSON Lines with --output json)
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for list
--max-pagesintdefault: 100- Maximum pages to read with --all (1-10000)
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
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
Update a customer
raims customers update ID [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example 1
raims --profile PROFILE --output json customers update ID --data-file request.json --dry-runExample 2
raims customers update ID --email="atualizado@example.invalid" --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Update an existing customer
{
"id": "cus_3AbHiWSrsZBoaTg47OcMzC",
"state": "SP",
"name": "Cliente atualizado",
"first_name": "Cliente",
"last_name": "atualizado",
"email": "atualizado@example.invalid"
}Body fields
--citystringaccepts null sent only when supplied- Address city. Omit it to keep the current value; send null or empty text to remove it.
--complementstringaccepts null sent only when supplied- Address complement. Omit it to keep the current value; send null or empty text to remove it.
--dial-codestringaccepts null sent only when supplied- International dialing code. Can be provided without phone_local. Omit it to keep the current value; send null or empty text to remove it.
--emailstringaccepts null sent only when supplied- Payer's email. Updating the email does not send a message. Omit it to keep the current value; send null or empty text to remove it.
--external-referencestringaccepts null sent only when supplied- Customer identifier in your system. Omit it to keep the current reference; send null or empty text to remove it. Use external_reference in the customer list to search for this value.
--full-namestringaccepts null sent only when supplied- Payer's full name. Omit it to keep the current value; send null or empty text to remove it.
--metadatastringArraysent only when supplied- Set a metadata text value as KEY=VALUE (repeat for each key; dots in keys are literal)
--metadata-emptyboolsent only when supplied- Send an empty metadata object; an update preserves existing keys
--metadata-nullstringArraysent only when supplied- Send null for a metadata key (repeat for each key; removes it when updating)
--neighstringaccepts null sent only when supplied- Address neighborhood. Omit it to keep the current value; send null or empty text to remove it.
--phone-localstringaccepts null sent only when supplied- Phone number without the dialing code, with or without punctuation. Can be provided without dial_code. Omit it to keep the current value; send null or empty text to remove it.
--streetstringaccepts null sent only when supplied- Address street. Omit it to keep the current value; send null or empty text to remove it.
--street-numberstringaccepts null sent only when supplied- Address number. Omit it to keep the current value; send null or empty text to remove it.
--ufstringaccepts null sent only when supplied- State abbreviation, such as SP. Omit it to keep the current value; send null or empty text to remove it.
--zip-codestringaccepts null sent only when supplied- Address postal code, with or without a hyphen. Updating the postal code does not fill in other address fields. Omit it to keep the current value; send null or empty text to remove it.
Request headers
--idempotency-keystringsent only when supplied- Reuse this optional idempotency key when retrying the same request
Execution options
--body-nullstringArraydefault: []- Set a nullable JSON body field to null by its JSON name (repeat for each field; cannot be combined with --data-file)
--data-filestringdefault: empty- Read the JSON request body from a UTF-8 file, or '-' for stdin
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for update
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
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.