Docs
Checking Raims account
Raims CLIAPI commands

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.

  1. Prepare a record

    Shell
    raims customers create --tax-id 12345678909 --full-name "Cliente de teste" --external-reference cliente_123 --dry-run

    The tax ID, name, and reference are examples. Replace them with your integration's authorized data and review the preview body.

  2. Send the reviewed record

    Shell
    raims --profile sandbox --output json customers create --tax-id 12345678909 --full-name "Cliente de teste" --external-reference cliente_123

    Send 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.

  3. Find the record by reference

    Shell
    raims --profile sandbox --output json customers list --external-reference cliente_123 --page-size 20

    Use the same reference sent in the record and keep the profile. Read data.list and data.page; the reference is not unique, so check the ID returned in the previous step.

  4. Check the matching record

    Shell
    raims --profile sandbox --output json customers get CUSTOMER_ID

    Replace CUSTOMER_ID with the response ID. To edit, use update: omitting a field and sending null have different effects. Batch deletion reports results per item; do not treat its response as complete deletion.

Choose a command

CommandPurpose
raims customers createCreate or update a customer by tax ID
raims customers deleteDelete a customer
raims customers delete-batchDelete the customers listed in the request body
raims customers getGet a customer
raims customers listList customers
raims customers updateUpdate 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

Shell
raims customers [flags]

Execution options

  • --help, -h bool default: 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

Shell
raims customers create [flags]

OAuth environments: Sandbox, Production. Success responses: 200, 201.

Example 1

Shell
raims --profile PROFILE --output json customers create --data-file request.json --dry-run

Example 2

Shell
raims customers create --tax-id="12345678909" --dry-run

Body fields

  • --city string accepts null sent only when supplied
    • Address city.
  • --complement string accepts null sent only when supplied
    • Address complement.
  • --dial-code string accepts null sent only when supplied
    • International dialing code. Can be provided without phone_local.
  • --email string accepts null sent only when supplied
    • Payer's email. Registering the email does not send a message.
  • --external-reference string accepts 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-name string accepts null sent only when supplied
    • Payer's full name.
  • --metadata stringArray sent only when supplied
    • Set a metadata text value as KEY=VALUE (repeat for each key; dots in keys are literal)
  • --metadata-empty bool sent only when supplied
    • Send an empty metadata object; an update preserves existing keys
  • --metadata-null stringArray sent only when supplied
    • Send null for a metadata key (repeat for each key; removes it when updating)
  • --neigh string accepts null sent only when supplied
    • Address neighborhood.
  • --phone-local string accepts null sent only when supplied
    • Phone number without the dialing code, with or without punctuation. Can be provided without dial_code.
  • --street string accepts null sent only when supplied
    • Address street.
  • --street-number string accepts null sent only when supplied
    • Address number.
  • --tax-id string required in the body sent only when supplied
    • Valid CPF or CNPJ, with or without periods, slash, hyphen and spaces.
  • --uf string accepts null sent only when supplied
    • State abbreviation, such as SP.
  • --zip-code string accepts 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-key string sent only when supplied
    • Reuse this optional idempotency key when retrying the same request

Execution options

  • --body-null stringArray default: []
    • Set a nullable JSON body field to null by its JSON name (repeat for each field; cannot be combined with --data-file)
  • --data-file string default: empty
    • Read the JSON request body from a UTF-8 file, or '-' for stdin
  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for create
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims customers delete

Delete a customer

Shell
raims customers delete ID [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example

Shell
raims --profile PROFILE --output json customers delete ID --dry-run

Execution options

  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for delete
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims customers delete-batch

Delete the customers listed in the request body

Shell
raims customers delete-batch [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example 1

Shell
raims --profile PROFILE --output json customers delete-batch --data-file request.json --dry-run

Example 2

Shell
raims customers delete-batch --identifiers="cus_3AbHiWSrsZBoaTg47OcMzC" --identifiers="cus_1szWVIyZES2MJoAMUmjwW" --dry-run

Body fields

  • --identifiers stringArray required 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-key string sent only when supplied
    • Reuse this optional idempotency key when retrying the same request

Execution options

  • --data-file string default: empty
    • Read the JSON request body from a UTF-8 file, or '-' for stdin
  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for delete-batch
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims customers get

Get a customer

Shell
raims customers get ID [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example

Shell
raims --profile PROFILE --output json customers get ID --dry-run

Execution options

  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for get
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims customers list

List customers

Shell
raims customers list [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example

Shell
raims --profile PROFILE --output json customers list --dry-run

Query filters

  • --after string sent only when supplied
    • Read after this opaque cursor (cannot be combined with --before)
  • --before string sent only when supplied
    • Read before this opaque cursor (cannot be combined with --after)
  • --document string sent only when supplied
    • Filter by customer tax ID
  • --email string sent only when supplied
    • Filter by email address
  • --external-reference string sent only when supplied
    • Filter by external reference
  • --identifier string sent only when supplied
    • Filter by public resource identifier
  • --name string sent only when supplied
    • Filter by customer name
  • --page-size int64 sent only when supplied
    • Results per page (the API normalizes the requested size)

Execution options

  • --all bool default: false
    • Read all pages as separate results (JSON Lines with --output json)
  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for list
  • --max-pages int default: 100
    • Maximum pages to read with --all (1-10000)
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims customers update

Update a customer

Shell
raims customers update ID [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example 1

Shell
raims --profile PROFILE --output json customers update ID --data-file request.json --dry-run

Example 2

Shell
raims customers update ID --email="atualizado@example.invalid" --dry-run

Body fields

  • --city string accepts null sent only when supplied
    • Address city. Omit it to keep the current value; send null or empty text to remove it.
  • --complement string accepts null sent only when supplied
    • Address complement. Omit it to keep the current value; send null or empty text to remove it.
  • --dial-code string accepts 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.
  • --email string accepts 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-reference string accepts 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-name string accepts null sent only when supplied
    • Payer's full name. Omit it to keep the current value; send null or empty text to remove it.
  • --metadata stringArray sent only when supplied
    • Set a metadata text value as KEY=VALUE (repeat for each key; dots in keys are literal)
  • --metadata-empty bool sent only when supplied
    • Send an empty metadata object; an update preserves existing keys
  • --metadata-null stringArray sent only when supplied
    • Send null for a metadata key (repeat for each key; removes it when updating)
  • --neigh string accepts null sent only when supplied
    • Address neighborhood. Omit it to keep the current value; send null or empty text to remove it.
  • --phone-local string accepts 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.
  • --street string accepts null sent only when supplied
    • Address street. Omit it to keep the current value; send null or empty text to remove it.
  • --street-number string accepts null sent only when supplied
    • Address number. Omit it to keep the current value; send null or empty text to remove it.
  • --uf string accepts 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-code string accepts 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-key string sent only when supplied
    • Reuse this optional idempotency key when retrying the same request

Execution options

  • --body-null stringArray default: []
    • Set a nullable JSON body field to null by its JSON name (repeat for each field; cannot be combined with --data-file)
  • --data-file string default: empty
    • Read the JSON request body from a UTF-8 file, or '-' for stdin
  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for update
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.