# Set a customer's credit limit, terms, hold and dunning

`PATCH /accounting/customers/{key}` · Rivier · accounting

Set a customer's credit limit, terms, hold and dunning.

- Scope: accounting:write
- Sdk: accounting.customer.update
- Cli: accounting customer update

## Parameters

- `key` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "creditLimitMinor": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 99999999999
        },
        {
          "type": "null"
        }
      ]
    },
    "paymentDays": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 365
        },
        {
          "type": "null"
        }
      ]
    },
    "dunningPaused": {
      "type": "boolean"
    },
    "onHold": {
      "type": "boolean"
    },
    "notes": {
      "type": "string",
      "maxLength": 1000
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X PATCH 'https://api.rivier.ai/accounting/customers/{key}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "creditLimitMinor": 0,
  "paymentDays": 0,
  "dunningPaused": false,
  "onHold": false,
  "notes": "string"
}'
```
