# Update a Destination Account

**PATCH** `/destination-accounts/{accountId}`

Base URL: `https://api.uat.triple-a.io/api/fiat-payout/v1`

The payment destination details can be updated **as long as no successful transactions** have been made for it.  If you send `"delete": true` in the request body, the individual will be archived and will not be returned by the API.

## Authorization

- oauth2 (http, bearer)

## Path parameters

- `accountId` (string, required)

## Body

Content type: `application/json`

- `owner_id` (string<uuid>)
  Local currency for this account.
- `receiving_institution_id` (string<uuid>)
  Identifier of a receiving institution which refers to a bank or a digital wallet operator.
- `currency` (string<iso-4217>)
  Local currency for this account.
- `country_code` (string<iso-3166-1-alpha3>)
  The country associated with the payment destination.
- `alias` (string)
  Name or label for this payment destination.
- `archived` (boolean)
  No past payment destinations can be deleted, however they can be disabled so they can be avoided for use.
- `account` (object)
  - `cashpoint` (string)
    Receiving Institution Reference Code
  - `recipient_name` (string)
    Recipient Full Name
  - `recipient_identification_type` ("RESIDENT_CARD" | "NATIONAL_ID" | "PASSPORT" | "TAX_ID" | "DRIVING_LICENSE" | "SOCIAL_SECURITY" | "OTHER")
    Identification type (For ARG, CUIT/CUIL = TAX_ID. For COL, Cedula de Ciudadania = NATIONAL_ID, NIT = TAX_ID, passport = PASSPORT)
  - `recipient_identification_number` (string)
    Identification number
  - `recipient_nationality` (string<iso-3166-1-alpha3>)
    Nationality
  - `recipient_address` (string)
    Residence address
  - `recipient_province_state` (string)
    Residence State/Province
  - `recipient_city` (string)
    Residence city
  - `recipient_email` (string)
    Email address
  - `recipient_date_of_birth` (string<date>)
    Date of birth
  - `recipient_identification_issuer` (string)
    Identification issuer
  - `recipient_identification_issue_date` (string<date>)
    Identification issue date
  - `recipient_identification_expiry_date` (string<date>)
    Identification expiry date
  - `recipient_gender` ("female" | "male")
    Gender
  - `recipient_zip_code` (string)
    Residence address zip code or postal code
  - `mobile_number` (string)
  - `account_name` (string)
    Bank account holder's full name.
  - `account_number` (string)
    Bank account number.
  - `account_type` ("IBAN" | "CLABE" | "CBU" | "CBU ALIAS" | "FPS ID" | "ACCOUNT NUMBER" | "PHONE_NUMBER" | "EMAIL")
    The bank account number's format.
  - `bank_account_type` ("SAVINGS" | "CHECKING")
    The bank account type.
  - `routing_type` ("SWIFT-BIC" | "BIK" | "IFSC" | "Sort code" | "ABA" | "BSB" | "BEFTN" | "Routing Number" | "Clearing code" | "Branch Code" | "Zengin Code")
  - `routing_code` (string)
  - `additional_routing_type` ("SWIFT-BIC" | "BIK" | "IFSC" | "Sort code" | "ABA" | "BSB" | "BEFTN" | "Routing Number" | "Clearing code" | "Branch Code" | "Zengin Code")
  - `additional_routing_code` (string)
  - `branch_code` (string)
  - `bank_name` (string)
  - `network` ("network:local" | "network:ACH" | "network:SEPA" | "network:swift" | "network:RTP" | "network:sameday_ACH")
    The network that can be used for transferring funds to this account
- `intermediary_bank_details` (object)
  - `routing_code_type` ("SWIFT-BIC")
    Routing code type for intermedary bank details
  - `routing_code_value` (string)
    Routing code value for intermedary bank details
  - `bank_name` (string)
    Intermedary bank name
  - `address` (object)
    Intermediay bank address defines intermediary bank address used for intermediary bank
    - `address_line_1` (string)
      Address line 1 of bank address
    - `address_line_2` (string)
      Address line 2 of bank address
    - `city` (string)
      City of the intermediary bank address
    - `state` (string)
      State of the intermediary bank address
    - `zip_code` (string)
      Zip code of intermediary bank address
    - `country_code` (string)
      Country code of intermediary bank address

Example:

```json
{
  "owner_id": "00000000-0000-0000-0000-000000000000",
  "receiving_institution_id": "00000000-0000-0000-0000-000000000000",
  "currency": "USD",
  "country_code": "USA",
  "alias": "Account 1",
  "archived": false,
  "account": {
    "cashpoint": "string",
    "recipient_name": "string",
    "recipient_identification_type": "NATIONAL_ID",
    "recipient_identification_number": "S98765433X",
    "recipient_nationality": "SGP",
    "recipient_address": "1 Falcon Ave, California",
    "recipient_province_state": "New York",
    "recipient_city": "New York City",
    "recipient_email": "jamse.zhang@example.com",
    "recipient_date_of_birth": "2019-08-24",
    "recipient_identification_issuer": "City hall",
    "recipient_identification_issue_date": "2019-08-24",
    "recipient_identification_expiry_date": "2025-08-24",
    "recipient_gender": "female",
    "recipient_zip_code": "12345",
    "mobile_number": "string",
    "account_name": "John Zuckerberg",
    "account_number": "9876543201",
    "account_type": "IBAN",
    "bank_account_type": "SAVINGS",
    "routing_type": "SWIFT-BIC",
    "routing_code": "string",
    "additional_routing_type": "SWIFT-BIC",
    "additional_routing_code": "string",
    "branch_code": "string",
    "bank_name": "string",
    "network": "network:local"
  },
  "intermediary_bank_details": {
    "routing_code_type": "SWIFT-BIC",
    "routing_code_value": "BKENGB2LXXX",
    "bank_name": "Bank of England",
    "address": {
      "address_line_1": "1600 Amphitheatre Parkway",
      "address_line_2": "Building 43",
      "city": "Mountain View",
      "state": "California",
      "zip_code": "94043",
      "country_code": "USA"
    }
  }
}
```

## Responses

### 200

OK

### 400

Error defines errors may be returned from the system.

- `message` (string)
- `errors` (object[])
  - `errorCode` (string)
  - `message` (string)

Example:

```json
{
  "message": "string",
  "errors": [
    {
      "errorCode": "string",
      "message": "string"
    }
  ]
}
```

### 404

Error defines errors may be returned from the system.

- `message` (string)
- `errors` (object[])
  - `errorCode` (string)
  - `message` (string)

Example:

```json
{
  "message": "string",
  "errors": [
    {
      "errorCode": "string",
      "message": "string"
    }
  ]
}
```

### 500

Error defines errors may be returned from the system.

- `message` (string)
- `errors` (object[])
  - `errorCode` (string)
  - `message` (string)

Example:

```json
{
  "message": "string",
  "errors": [
    {
      "errorCode": "string",
      "message": "string"
    }
  ]
}
```