> This page is for Enterprise.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://citi-demo.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://citi-demo.ferndocs.com/_mcp/server.

# Update Virtual Accounts

PATCH https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts
Content-Type: application/json

The virtual account update (using the update service endpoint) allows you to modify virtual account information.   Use the PATCH verb for Update action  - The API support XML and JSON formats.  - The update functionality is identified based on the request payload (action).  - You specify values for input parameters in the body of your XML/JSON document.  - You encrypt the payload, place it in your request, and send it with your application.  The virtual account update endpoint allows you to modify the virtual account details and status.  Below are the sub-object combinations allowed under the virtual\_account object for updates:   - VALID combination 1: For `virtual_account.entity.type = C` (Company), update the entity details under a virtual\_account using the `virtual_account.entity` as well as `virtual_account.beneficial_owner` - VALID combination 2: For `virtual_account.entity.type = S` (Sole Trader), update the entity details under a virtual\_account using the `virtual_account.entity` - VALID combination 3: Apply the posting restrictions on virtual\_account use only the `virtual_account.credit_debit_preferences` object  Below are the INVALID object combinations for the PATCH endpoint:  - INVALID combination 1: Only with `virtual_account.entity` for `virtual_account.entity.type = C` (Company)  - INVALID combination 2: Only with `virtual_account.beneficial_owner` - INVALID combination 3: With all 3 objects, `virtual_account.entity`, `beneficial_owner`, `credit_debit_preferences` - INVALID combination 4: With 2 objects, `virtual_account.entity`, `credit_debit_preferences` - INVALID combination 5: With 2 objects, `virtual_account.beneficial_owner`, `credit_debit_preferences` \<font size='2'>Content-Type: Supports application/xml and application/json.  Authorization: The OAuth Token prefixed with Bearer and space in between. Allowed characters: A-Z, a-z, 0-9, Space Allowed punctuation marks: ' ( ) \* - , . / : ; \_ &  \$ # @ \[ ]

Reference: https://citi-demo.ferndocs.com/enterprises/api-reference/account-services/receivable-services/virtual-accounts-wallet/virtual-account-update

## Authentication

- `Authorization` header (bearer token, required) — All CitiConnect APIs use the oAuth2 authentication scheme, which requires a bearer token to authenticate your API call. The Token URL includes the version of authentication used by this API. See the Citi Authentication API reference for information on requesting a token.

## Servers

- `https://tts.sandbox.apib2b.citi.com/citiconnect/sb` (sandbox URL , default)
- `https://b2b.tts.icgservices.citi.com/citiconnect/prod` (production gateway URL)

## Request

### Query parameters

- `client_id` (string, required) — Unique reference shared during CitiConnect API onboarding (`client_id` used during OAuth token generation).

### Body (application/json)

This endpoint expects a Virtual-Account-Update-Request.

- `action` (enum, required) — Action is a request type. - Choose the action value as 'UPDATE', if you want to update the virtual account details that were stored earlier.
  - Allowed values: `UPDATE`
- `header_account` (Header-Account, optional)
- `virtual_account` (Virtual-Account-Update, optional)

## Response

### 202

Accepted

- `request_id` (string, optional) — Auto-generated unique identification assigned for the request.
- `status` (string, optional) — Status of the request. Possible statuses are SUCCESS REJECTED PENDING
- `message` (string, optional) — Detailed response for the particular request.
- `action` (string, optional) — Action of the given request. - ''RESERVATION'' - ''ACTIVATION''.
- `branch_code` (string, optional) — Citi's bank code associated with given a header account number.
- `error_details` (list of Error-Detail, optional)
- `account` (list of Accounts, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `ref_id` (string, optional) — Uniqiue reference ID for a particular request.
- `error_details` (list of Error-Detail, optional)
- `httpCode` (string, optional)
- `httpMessage` (string, optional)
- `moreInformation` (string, optional)
- `status` (string, optional)
- `message` (string, optional)

### 401 Unauthorized Error

Unauthorized

- `ref_id` (string, optional) — Uniqiue reference ID for a particular request.
- `error_details` (list of Error-Detail, optional)
- `httpCode` (string, optional)
- `httpMessage` (string, optional)
- `moreInformation` (string, optional)
- `status` (string, optional)
- `message` (string, optional)

### 403 Forbidden Error

Forbidden

- `ref_id` (string, optional) — Uniqiue reference ID for a particular request.
- `error_details` (list of Error-Detail, optional)
- `httpCode` (string, optional)
- `httpMessage` (string, optional)
- `moreInformation` (string, optional)
- `status` (string, optional)
- `message` (string, optional)

### 404 Not Found Error

Not Found

- `httpCode` (string, optional) — HTTP status code of this API.
- `httpMessage` (string, optional) — Short message about the issue.
- `moreInformation` (string, optional) — More information about the issue.

### 405 Method Not Allowed Error

Method Not Allowed

- `ref_id` (string, optional) — Uniqiue reference ID for a particular request.
- `error_details` (list of Error-Detail, optional)
- `httpCode` (string, optional)
- `httpMessage` (string, optional)
- `moreInformation` (string, optional)
- `status` (string, optional)
- `message` (string, optional)

### 409 Conflict Error

Conflict

- `ref_id` (string, optional) — Uniqiue reference ID for a particular request.
- `error_details` (list of Error-Detail, optional)
- `httpCode` (string, optional)
- `httpMessage` (string, optional)
- `moreInformation` (string, optional)
- `status` (string, optional)
- `message` (string, optional)

### 415 Unsupported Media Type Error

Unsupported Media Type

- `ref_id` (string, optional) — Uniqiue reference ID for a particular request.
- `error_details` (list of Error-Detail, optional)
- `httpCode` (string, optional)
- `httpMessage` (string, optional)
- `moreInformation` (string, optional)
- `status` (string, optional)
- `message` (string, optional)

### 429 Too Many Requests Error

Too Many Request

- `status` (string, optional) — HTTP status code of this API response.
- `message` (string, optional) — Short message about the issue.

### 500 Internal Server Error

Internal Server Error

- `ref_id` (string, optional) — Uniqiue reference ID for a particular request.
- `error_details` (list of Error-Detail, optional)
- `httpCode` (string, optional)
- `httpMessage` (string, optional)
- `moreInformation` (string, optional)
- `status` (string, optional)
- `message` (string, optional)

## Types

### Header-Account

- `account` (string, optional) — Required parameter if the value of the `action` parameter is 'RESERVATION' (or) 'ACTIVATION' (or) 'UPDATE'. Specifies the header account number assigned during the account opening.
- `branch_code` (string, optional) — Citi's bank code associated with given a header account number.

### Virtual-Account-Update

- `account` (string, optional) — Required parameter if the value of the `action` parameter is 'UPDATE'.This parameter specifies the virtual account details to be modified.
- `entity` (Entity-Update, optional) — Required parameter only if the value of 'action' parameter is set to 'ACTIVATION'.
- `beneficial_owner` (list of Beneficial-Owner-Update, optional) — &#x20;Note: Provides the complete beneficial owner's list which is updated into the system. This action replaces the existing beneficial owner's details Required object if the `entity` object is used. - Not applicable for sole trader (`entity.type`='S')
- `credit_debit_preferences` (Credit-Debit-Preferences-Update-Request, optional) — Option to revoke the debit or credit privileges into the virtual account.

### Error-Detail

- `code` (string, optional) — Unique ID for the error code. Under GET method and callbacks, this parameter is a non-retrievable internal error code:CC00013.
- `issue` (string, optional) — More details about the issue.
- `action` (string, optional) — Corrective action to be taken to resolve above issue.

### Accounts

- `virtual_account` (string, optional) — Required parameter only if the value of the `action` parameter is set to 'ACTIVATION'.This parameter specifies the virtual account to be activated.
- `entity_id` (string, optional) — ID that was assigned specific to the entity being activated under this virtual account.

### Entity-Update

Required parameter only if the value of 'action' parameter is set to 'ACTIVATION'.

- `country_of_operation` (string, required) — Enter the 'Country code' in which the entity is operated. Required parameter for both `entity.id` (or) the entity details combination.
- `first_name` (string, optional) — First name of entity linked to a virtual account. Required parameter if the `entity` object is used. - Required parameter when sole trader (`entity.type`='S') is present - Not applicable for company (`entity.type`='C'). * For 'US' `virtual_account.entity.first_name` and `virtual_account.entity.last_name` parameters combined total length including spaces cannot exceed 34 characters.
- `last_name` (string, optional) — Last name of the entity linked to a virtual account. Required parameter if the `entity` object is used. - For sole trader (`entity.type`='S') - include the last name - For company (`entity.type`='C') - include the legal entity name. * For 'US' `virtual_account.entity.first_name` and `virtual_account.entity.last_name` parameters combined total length including spaces cannot exceed 34 characters.
- `id` (string, optional) — For update `entity id` is mandatory and populate the ID that was associated with this virtual account.
- `website` (string, optional) — Enter the website of the entity being activated under this virtual account.
- `store_name` (string, optional) — Enter the store name of the entity being activated under this virtual account. Optional parameter, should not be considered as the entity name.
- `business_purpose` (string, optional) — Enter the business purpose applicable for the entity being activated under this virtual account.
- `acronym` (string, optional) — Enter the acronym for the entity being activated under this virtual account.
- `type` (enum, optional) — Enter the acronym for the entity being activated under this virtual account. C = COMPANY S = SOLE TRADER - enterprise owned and run by one person and in which there is no legal distinction between the owner and the business entity.
  - Allowed values: `C`, `S`
- `date_of_birth` (string, optional) — Required parameter if the `id` parameter is not used for the the `entity` object. Populates the date of birth or incorporation date pertaining to the entity that is being activated under this virtual account. It is in fixed 10-digit format (YYYY-MM-DD) as per ISO standard.
- `org_prvt_identification` (Organisation-Private-Identification-Update-Request, optional)
- `address` (Address, optional) — \<b> Address object is required if the `entity` object is used. \<b> * For 'US', the combined total length for the entity address, including spaces, cannot exceed 100 characters. This restriction is not applicable for beneficial owner.

### Beneficial-Owner-Update

- `date_of_birth` (string, required) — Required parameter in the `Beneficial Owner` object if the object is used. Populates the date of birth date pertaining to the Beneficial owner of the entity. It is in a fixed 10-digit format (YYYY-MM-DD) as per the ISO standard.
- `first_name` (string, optional) — First name of the entity's beneficial owner. Required parameter if the `virtual_account.beneficial_owner` object is not used.
- `last_name` (string, optional) — Last name of the entity's beneficial owner. Required parameter if the `virtual_account.beneficial_owner` object is not used.
- `address` (Address, optional) — \<b> Address object is required if the `entity` object is used. \<b> * For 'US', the combined total length for the entity address, including spaces, cannot exceed 100 characters. This restriction is not applicable for beneficial owner.

### Credit-Debit-Preferences-Update-Request

Option to revoke the debit or credit privileges into the virtual account.

- `disallow_credit` (enum, optional) — Preference chosen to disallow credit on a virtual account.
  - Allowed values: `Y`, `N`
- `disallow_debit` (enum, optional) — Preference chosen to disallow debit on a virtual account.
  - Allowed values: `Y`, `N`

### Organisation-Private-Identification-Update-Request

- `type` (enum, required) — Type of the identification that is populated in this object. - 'TAX_ID' Tax Identification
  - Allowed values: `TAX_ID`
- `id` (string, required) — Identification pertaining to the entity which is used for the virtual account activation.
- `country_of_issuance` (string, required) — Country code where the provided identification has been issued.

### Address

\<b> Address object is required if the `entity` object is used. \<b> * For 'US', the combined total length for the entity address, including spaces, cannot exceed 100 characters. This restriction is not applicable for beneficial owner.

- `street_name` (string, required) — Address details of the entity (or) the beneficial owner of the virtual account. Required parameter in the `Address` object.
- `building_number` (string, required) — Address details of the entity (or) the beneficial owner of the virtual account. - If building number is not present then provide the `virtual_account.entity.building_number` as N/A.
- `postal_code` (string, required) — Address details of the entity (or) the beneficial owner of virtual account. Required parameter in the `Address` object.
- `town_name` (string, required) — Address details of the entity (or) the beneficial owner of the virtual account. Required parameter in the `Address` object.
- `country_sub_division` (string, required) — Address details of the entity (or) the beneficial owner of the virtual account. Required parameter in the `Address` object.
- `country` (string, required) — Address details of the entity (or) the beneficial owner of the virtual account. Required parameter in the `Address` object.

## Examples

### VAUpdateEntityDetailsExample (application/json)

**Request**

```json
{
  "action": "UPDATE",
  "header_account": {
    "account": "01010202030",
    "branch_code": "930"
  },
  "virtual_account": {
    "account": "0123456789",
    "entity": {
      "country_of_operation": "CA",
      "last_name": "INC",
      "id": "EN_45678901234567890",
      "website": "www.ddee.com",
      "store_name": "ABC",
      "business_purpose": "Trade",
      "acronym": "Buss",
      "type": "C",
      "org_prvt_identification": {
        "type": "TAX_ID",
        "id": "1234567890",
        "country_of_issuance": "US"
      },
      "address": {
        "street_name": "3210 Abcd st",
        "building_number": "123",
        "postal_code": "L5B 111",
        "town_name": "North York",
        "country_sub_division": "Ontario",
        "country": "CA"
      }
    },
    "beneficial_owner": [
      {
        "date_of_birth": "2001-05-01",
        "first_name": "White",
        "last_name": "James",
        "address": {
          "street_name": "3210 Abcd st",
          "building_number": "123",
          "postal_code": "L5B 111",
          "town_name": "North York",
          "country_sub_division": "Ontario",
          "country": "CA"
        }
      },
      {
        "date_of_birth": "2000-05-01",
        "first_name": "White",
        "last_name": "Mark",
        "address": {
          "street_name": "3210 Abcd st",
          "building_number": "123",
          "postal_code": "L5B 111",
          "town_name": "North York",
          "country_sub_division": "Ontario",
          "country": "CA"
        }
      }
    ]
  }
}
```

**Response**

```json
{
  "request_id": "29b9c9d7-d4d9-48ce-8823-f9b3ee276b8f",
  "status": "ACCEPTED",
  "message": "Request accepted Successfully"
}
```

**SDK Code**

```python VAUpdateEntityDetailsExample (application/json)
import requests

url = "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts"

payload = {
    "action": "UPDATE",
    "header_account": {
        "account": "01010202030",
        "branch_code": "930"
    },
    "virtual_account": {
        "account": "0123456789",
        "entity": {
            "country_of_operation": "CA",
            "last_name": "INC",
            "id": "EN_45678901234567890",
            "website": "www.ddee.com",
            "store_name": "ABC",
            "business_purpose": "Trade",
            "acronym": "Buss",
            "type": "C",
            "org_prvt_identification": {
                "type": "TAX_ID",
                "id": "1234567890",
                "country_of_issuance": "US"
            },
            "address": {
                "street_name": "3210 Abcd st",
                "building_number": "123",
                "postal_code": "L5B 111",
                "town_name": "North York",
                "country_sub_division": "Ontario",
                "country": "CA"
            }
        },
        "beneficial_owner": [
            {
                "date_of_birth": "2001-05-01",
                "first_name": "White",
                "last_name": "James",
                "address": {
                    "street_name": "3210 Abcd st",
                    "building_number": "123",
                    "postal_code": "L5B 111",
                    "town_name": "North York",
                    "country_sub_division": "Ontario",
                    "country": "CA"
                }
            },
            {
                "date_of_birth": "2000-05-01",
                "first_name": "White",
                "last_name": "Mark",
                "address": {
                    "street_name": "3210 Abcd st",
                    "building_number": "123",
                    "postal_code": "L5B 111",
                    "town_name": "North York",
                    "country_sub_division": "Ontario",
                    "country": "CA"
                }
            }
        ]
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript VAUpdateEntityDetailsExample (application/json)
const url = 'https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"action":"UPDATE","header_account":{"account":"01010202030","branch_code":"930"},"virtual_account":{"account":"0123456789","entity":{"country_of_operation":"CA","last_name":"INC","id":"EN_45678901234567890","website":"www.ddee.com","store_name":"ABC","business_purpose":"Trade","acronym":"Buss","type":"C","org_prvt_identification":{"type":"TAX_ID","id":"1234567890","country_of_issuance":"US"},"address":{"street_name":"3210 Abcd st","building_number":"123","postal_code":"L5B 111","town_name":"North York","country_sub_division":"Ontario","country":"CA"}},"beneficial_owner":[{"date_of_birth":"2001-05-01","first_name":"White","last_name":"James","address":{"street_name":"3210 Abcd st","building_number":"123","postal_code":"L5B 111","town_name":"North York","country_sub_division":"Ontario","country":"CA"}},{"date_of_birth":"2000-05-01","first_name":"White","last_name":"Mark","address":{"street_name":"3210 Abcd st","building_number":"123","postal_code":"L5B 111","town_name":"North York","country_sub_division":"Ontario","country":"CA"}}]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go VAUpdateEntityDetailsExample (application/json)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts"

	payload := strings.NewReader("{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"entity\": {\n      \"country_of_operation\": \"CA\",\n      \"last_name\": \"INC\",\n      \"id\": \"EN_45678901234567890\",\n      \"website\": \"www.ddee.com\",\n      \"store_name\": \"ABC\",\n      \"business_purpose\": \"Trade\",\n      \"acronym\": \"Buss\",\n      \"type\": \"C\",\n      \"org_prvt_identification\": {\n        \"type\": \"TAX_ID\",\n        \"id\": \"1234567890\",\n        \"country_of_issuance\": \"US\"\n      },\n      \"address\": {\n        \"street_name\": \"3210 Abcd st\",\n        \"building_number\": \"123\",\n        \"postal_code\": \"L5B 111\",\n        \"town_name\": \"North York\",\n        \"country_sub_division\": \"Ontario\",\n        \"country\": \"CA\"\n      }\n    },\n    \"beneficial_owner\": [\n      {\n        \"date_of_birth\": \"2001-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"James\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      },\n      {\n        \"date_of_birth\": \"2000-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"Mark\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby VAUpdateEntityDetailsExample (application/json)
require 'uri'
require 'net/http'

url = URI("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"entity\": {\n      \"country_of_operation\": \"CA\",\n      \"last_name\": \"INC\",\n      \"id\": \"EN_45678901234567890\",\n      \"website\": \"www.ddee.com\",\n      \"store_name\": \"ABC\",\n      \"business_purpose\": \"Trade\",\n      \"acronym\": \"Buss\",\n      \"type\": \"C\",\n      \"org_prvt_identification\": {\n        \"type\": \"TAX_ID\",\n        \"id\": \"1234567890\",\n        \"country_of_issuance\": \"US\"\n      },\n      \"address\": {\n        \"street_name\": \"3210 Abcd st\",\n        \"building_number\": \"123\",\n        \"postal_code\": \"L5B 111\",\n        \"town_name\": \"North York\",\n        \"country_sub_division\": \"Ontario\",\n        \"country\": \"CA\"\n      }\n    },\n    \"beneficial_owner\": [\n      {\n        \"date_of_birth\": \"2001-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"James\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      },\n      {\n        \"date_of_birth\": \"2000-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"Mark\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java VAUpdateEntityDetailsExample (application/json)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"entity\": {\n      \"country_of_operation\": \"CA\",\n      \"last_name\": \"INC\",\n      \"id\": \"EN_45678901234567890\",\n      \"website\": \"www.ddee.com\",\n      \"store_name\": \"ABC\",\n      \"business_purpose\": \"Trade\",\n      \"acronym\": \"Buss\",\n      \"type\": \"C\",\n      \"org_prvt_identification\": {\n        \"type\": \"TAX_ID\",\n        \"id\": \"1234567890\",\n        \"country_of_issuance\": \"US\"\n      },\n      \"address\": {\n        \"street_name\": \"3210 Abcd st\",\n        \"building_number\": \"123\",\n        \"postal_code\": \"L5B 111\",\n        \"town_name\": \"North York\",\n        \"country_sub_division\": \"Ontario\",\n        \"country\": \"CA\"\n      }\n    },\n    \"beneficial_owner\": [\n      {\n        \"date_of_birth\": \"2001-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"James\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      },\n      {\n        \"date_of_birth\": \"2000-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"Mark\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      }\n    ]\n  }\n}")
  .asString();
```

```php VAUpdateEntityDetailsExample (application/json)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts', [
  'body' => '{
  "action": "UPDATE",
  "header_account": {
    "account": "01010202030",
    "branch_code": "930"
  },
  "virtual_account": {
    "account": "0123456789",
    "entity": {
      "country_of_operation": "CA",
      "last_name": "INC",
      "id": "EN_45678901234567890",
      "website": "www.ddee.com",
      "store_name": "ABC",
      "business_purpose": "Trade",
      "acronym": "Buss",
      "type": "C",
      "org_prvt_identification": {
        "type": "TAX_ID",
        "id": "1234567890",
        "country_of_issuance": "US"
      },
      "address": {
        "street_name": "3210 Abcd st",
        "building_number": "123",
        "postal_code": "L5B 111",
        "town_name": "North York",
        "country_sub_division": "Ontario",
        "country": "CA"
      }
    },
    "beneficial_owner": [
      {
        "date_of_birth": "2001-05-01",
        "first_name": "White",
        "last_name": "James",
        "address": {
          "street_name": "3210 Abcd st",
          "building_number": "123",
          "postal_code": "L5B 111",
          "town_name": "North York",
          "country_sub_division": "Ontario",
          "country": "CA"
        }
      },
      {
        "date_of_birth": "2000-05-01",
        "first_name": "White",
        "last_name": "Mark",
        "address": {
          "street_name": "3210 Abcd st",
          "building_number": "123",
          "postal_code": "L5B 111",
          "town_name": "North York",
          "country_sub_division": "Ontario",
          "country": "CA"
        }
      }
    ]
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp VAUpdateEntityDetailsExample (application/json)
using RestSharp;

var client = new RestClient("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"entity\": {\n      \"country_of_operation\": \"CA\",\n      \"last_name\": \"INC\",\n      \"id\": \"EN_45678901234567890\",\n      \"website\": \"www.ddee.com\",\n      \"store_name\": \"ABC\",\n      \"business_purpose\": \"Trade\",\n      \"acronym\": \"Buss\",\n      \"type\": \"C\",\n      \"org_prvt_identification\": {\n        \"type\": \"TAX_ID\",\n        \"id\": \"1234567890\",\n        \"country_of_issuance\": \"US\"\n      },\n      \"address\": {\n        \"street_name\": \"3210 Abcd st\",\n        \"building_number\": \"123\",\n        \"postal_code\": \"L5B 111\",\n        \"town_name\": \"North York\",\n        \"country_sub_division\": \"Ontario\",\n        \"country\": \"CA\"\n      }\n    },\n    \"beneficial_owner\": [\n      {\n        \"date_of_birth\": \"2001-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"James\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      },\n      {\n        \"date_of_birth\": \"2000-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"Mark\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift VAUpdateEntityDetailsExample (application/json)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "action": "UPDATE",
  "header_account": [
    "account": "01010202030",
    "branch_code": "930"
  ],
  "virtual_account": [
    "account": "0123456789",
    "entity": [
      "country_of_operation": "CA",
      "last_name": "INC",
      "id": "EN_45678901234567890",
      "website": "www.ddee.com",
      "store_name": "ABC",
      "business_purpose": "Trade",
      "acronym": "Buss",
      "type": "C",
      "org_prvt_identification": [
        "type": "TAX_ID",
        "id": "1234567890",
        "country_of_issuance": "US"
      ],
      "address": [
        "street_name": "3210 Abcd st",
        "building_number": "123",
        "postal_code": "L5B 111",
        "town_name": "North York",
        "country_sub_division": "Ontario",
        "country": "CA"
      ]
    ],
    "beneficial_owner": [
      [
        "date_of_birth": "2001-05-01",
        "first_name": "White",
        "last_name": "James",
        "address": [
          "street_name": "3210 Abcd st",
          "building_number": "123",
          "postal_code": "L5B 111",
          "town_name": "North York",
          "country_sub_division": "Ontario",
          "country": "CA"
        ]
      ],
      [
        "date_of_birth": "2000-05-01",
        "first_name": "White",
        "last_name": "Mark",
        "address": [
          "street_name": "3210 Abcd st",
          "building_number": "123",
          "postal_code": "L5B 111",
          "town_name": "North York",
          "country_sub_division": "Ontario",
          "country": "CA"
        ]
      ]
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### VAPostingRestrictionExample (application/json)

**Request**

```json
{
  "action": "UPDATE",
  "header_account": {
    "account": "01010202030",
    "branch_code": "930"
  },
  "virtual_account": {
    "account": "0123456789",
    "credit_debit_preferences": {
      "disallow_credit": "Y",
      "disallow_debit": "N"
    }
  }
}
```

**Response**

```json
{
  "request_id": "29b9c9d7-d4d9-48ce-8823-f9b3ee276b8f",
  "status": "ACCEPTED",
  "message": "Request accepted Successfully"
}
```

**SDK Code**

```python VAPostingRestrictionExample (application/json)
import requests

url = "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts"

payload = {
    "action": "UPDATE",
    "header_account": {
        "account": "01010202030",
        "branch_code": "930"
    },
    "virtual_account": {
        "account": "0123456789",
        "credit_debit_preferences": {
            "disallow_credit": "Y",
            "disallow_debit": "N"
        }
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript VAPostingRestrictionExample (application/json)
const url = 'https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"action":"UPDATE","header_account":{"account":"01010202030","branch_code":"930"},"virtual_account":{"account":"0123456789","credit_debit_preferences":{"disallow_credit":"Y","disallow_debit":"N"}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go VAPostingRestrictionExample (application/json)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts"

	payload := strings.NewReader("{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"credit_debit_preferences\": {\n      \"disallow_credit\": \"Y\",\n      \"disallow_debit\": \"N\"\n    }\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby VAPostingRestrictionExample (application/json)
require 'uri'
require 'net/http'

url = URI("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"credit_debit_preferences\": {\n      \"disallow_credit\": \"Y\",\n      \"disallow_debit\": \"N\"\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java VAPostingRestrictionExample (application/json)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"credit_debit_preferences\": {\n      \"disallow_credit\": \"Y\",\n      \"disallow_debit\": \"N\"\n    }\n  }\n}")
  .asString();
```

```php VAPostingRestrictionExample (application/json)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts', [
  'body' => '{
  "action": "UPDATE",
  "header_account": {
    "account": "01010202030",
    "branch_code": "930"
  },
  "virtual_account": {
    "account": "0123456789",
    "credit_debit_preferences": {
      "disallow_credit": "Y",
      "disallow_debit": "N"
    }
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp VAPostingRestrictionExample (application/json)
using RestSharp;

var client = new RestClient("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"credit_debit_preferences\": {\n      \"disallow_credit\": \"Y\",\n      \"disallow_debit\": \"N\"\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift VAPostingRestrictionExample (application/json)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "action": "UPDATE",
  "header_account": [
    "account": "01010202030",
    "branch_code": "930"
  ],
  "virtual_account": [
    "account": "0123456789",
    "credit_debit_preferences": [
      "disallow_credit": "Y",
      "disallow_debit": "N"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### VAUpdateEntityDetailsExample (application/xml)

**Request**

```json
{
  "action": "UPDATE",
  "header_account": {
    "account": "01010202030",
    "branch_code": "930"
  },
  "virtual_account": {
    "account": "0123456789",
    "entity": {
      "country_of_operation": "CA",
      "last_name": "INC",
      "id": "EN_45678901234567890",
      "website": "www.ddee.com",
      "store_name": "ABC",
      "business_purpose": "Trade",
      "acronym": "Buss",
      "type": "C",
      "org_prvt_identification": {
        "type": "TAX_ID",
        "id": "1234567890",
        "country_of_issuance": "US"
      },
      "address": {
        "street_name": "3210 Abcd st",
        "building_number": "123",
        "postal_code": "L5B 111",
        "town_name": "North York",
        "country_sub_division": "Ontario",
        "country": "CA"
      }
    },
    "beneficial_owner": [
      {
        "date_of_birth": "2001-05-01",
        "first_name": "White",
        "last_name": "James",
        "address": {
          "street_name": "3210 Abcd st",
          "building_number": "123",
          "postal_code": "L5B 111",
          "town_name": "North York",
          "country_sub_division": "Ontario",
          "country": "CA"
        }
      },
      {
        "date_of_birth": "2000-05-01",
        "first_name": "White",
        "last_name": "Mark",
        "address": {
          "street_name": "3210 Abcd st",
          "building_number": "123",
          "postal_code": "L5B 111",
          "town_name": "North York",
          "country_sub_division": "Ontario",
          "country": "CA"
        }
      }
    ]
  }
}
```

**Response**

```json
{
  "request_id": "29b9c9d7-d4d9-48ce-8823-f9b3ee276b8f",
  "status": "ACCEPTED",
  "message": "Request accepted Successfully"
}
```

**SDK Code**

```python VAUpdateEntityDetailsExample (application/xml)
import requests

url = "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts"

payload = {
    "action": "UPDATE",
    "header_account": {
        "account": "01010202030",
        "branch_code": "930"
    },
    "virtual_account": {
        "account": "0123456789",
        "entity": {
            "country_of_operation": "CA",
            "last_name": "INC",
            "id": "EN_45678901234567890",
            "website": "www.ddee.com",
            "store_name": "ABC",
            "business_purpose": "Trade",
            "acronym": "Buss",
            "type": "C",
            "org_prvt_identification": {
                "type": "TAX_ID",
                "id": "1234567890",
                "country_of_issuance": "US"
            },
            "address": {
                "street_name": "3210 Abcd st",
                "building_number": "123",
                "postal_code": "L5B 111",
                "town_name": "North York",
                "country_sub_division": "Ontario",
                "country": "CA"
            }
        },
        "beneficial_owner": [
            {
                "date_of_birth": "2001-05-01",
                "first_name": "White",
                "last_name": "James",
                "address": {
                    "street_name": "3210 Abcd st",
                    "building_number": "123",
                    "postal_code": "L5B 111",
                    "town_name": "North York",
                    "country_sub_division": "Ontario",
                    "country": "CA"
                }
            },
            {
                "date_of_birth": "2000-05-01",
                "first_name": "White",
                "last_name": "Mark",
                "address": {
                    "street_name": "3210 Abcd st",
                    "building_number": "123",
                    "postal_code": "L5B 111",
                    "town_name": "North York",
                    "country_sub_division": "Ontario",
                    "country": "CA"
                }
            }
        ]
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript VAUpdateEntityDetailsExample (application/xml)
const url = 'https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"action":"UPDATE","header_account":{"account":"01010202030","branch_code":"930"},"virtual_account":{"account":"0123456789","entity":{"country_of_operation":"CA","last_name":"INC","id":"EN_45678901234567890","website":"www.ddee.com","store_name":"ABC","business_purpose":"Trade","acronym":"Buss","type":"C","org_prvt_identification":{"type":"TAX_ID","id":"1234567890","country_of_issuance":"US"},"address":{"street_name":"3210 Abcd st","building_number":"123","postal_code":"L5B 111","town_name":"North York","country_sub_division":"Ontario","country":"CA"}},"beneficial_owner":[{"date_of_birth":"2001-05-01","first_name":"White","last_name":"James","address":{"street_name":"3210 Abcd st","building_number":"123","postal_code":"L5B 111","town_name":"North York","country_sub_division":"Ontario","country":"CA"}},{"date_of_birth":"2000-05-01","first_name":"White","last_name":"Mark","address":{"street_name":"3210 Abcd st","building_number":"123","postal_code":"L5B 111","town_name":"North York","country_sub_division":"Ontario","country":"CA"}}]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go VAUpdateEntityDetailsExample (application/xml)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts"

	payload := strings.NewReader("{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"entity\": {\n      \"country_of_operation\": \"CA\",\n      \"last_name\": \"INC\",\n      \"id\": \"EN_45678901234567890\",\n      \"website\": \"www.ddee.com\",\n      \"store_name\": \"ABC\",\n      \"business_purpose\": \"Trade\",\n      \"acronym\": \"Buss\",\n      \"type\": \"C\",\n      \"org_prvt_identification\": {\n        \"type\": \"TAX_ID\",\n        \"id\": \"1234567890\",\n        \"country_of_issuance\": \"US\"\n      },\n      \"address\": {\n        \"street_name\": \"3210 Abcd st\",\n        \"building_number\": \"123\",\n        \"postal_code\": \"L5B 111\",\n        \"town_name\": \"North York\",\n        \"country_sub_division\": \"Ontario\",\n        \"country\": \"CA\"\n      }\n    },\n    \"beneficial_owner\": [\n      {\n        \"date_of_birth\": \"2001-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"James\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      },\n      {\n        \"date_of_birth\": \"2000-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"Mark\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby VAUpdateEntityDetailsExample (application/xml)
require 'uri'
require 'net/http'

url = URI("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"entity\": {\n      \"country_of_operation\": \"CA\",\n      \"last_name\": \"INC\",\n      \"id\": \"EN_45678901234567890\",\n      \"website\": \"www.ddee.com\",\n      \"store_name\": \"ABC\",\n      \"business_purpose\": \"Trade\",\n      \"acronym\": \"Buss\",\n      \"type\": \"C\",\n      \"org_prvt_identification\": {\n        \"type\": \"TAX_ID\",\n        \"id\": \"1234567890\",\n        \"country_of_issuance\": \"US\"\n      },\n      \"address\": {\n        \"street_name\": \"3210 Abcd st\",\n        \"building_number\": \"123\",\n        \"postal_code\": \"L5B 111\",\n        \"town_name\": \"North York\",\n        \"country_sub_division\": \"Ontario\",\n        \"country\": \"CA\"\n      }\n    },\n    \"beneficial_owner\": [\n      {\n        \"date_of_birth\": \"2001-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"James\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      },\n      {\n        \"date_of_birth\": \"2000-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"Mark\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java VAUpdateEntityDetailsExample (application/xml)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"entity\": {\n      \"country_of_operation\": \"CA\",\n      \"last_name\": \"INC\",\n      \"id\": \"EN_45678901234567890\",\n      \"website\": \"www.ddee.com\",\n      \"store_name\": \"ABC\",\n      \"business_purpose\": \"Trade\",\n      \"acronym\": \"Buss\",\n      \"type\": \"C\",\n      \"org_prvt_identification\": {\n        \"type\": \"TAX_ID\",\n        \"id\": \"1234567890\",\n        \"country_of_issuance\": \"US\"\n      },\n      \"address\": {\n        \"street_name\": \"3210 Abcd st\",\n        \"building_number\": \"123\",\n        \"postal_code\": \"L5B 111\",\n        \"town_name\": \"North York\",\n        \"country_sub_division\": \"Ontario\",\n        \"country\": \"CA\"\n      }\n    },\n    \"beneficial_owner\": [\n      {\n        \"date_of_birth\": \"2001-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"James\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      },\n      {\n        \"date_of_birth\": \"2000-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"Mark\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      }\n    ]\n  }\n}")
  .asString();
```

```php VAUpdateEntityDetailsExample (application/xml)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts', [
  'body' => '{
  "action": "UPDATE",
  "header_account": {
    "account": "01010202030",
    "branch_code": "930"
  },
  "virtual_account": {
    "account": "0123456789",
    "entity": {
      "country_of_operation": "CA",
      "last_name": "INC",
      "id": "EN_45678901234567890",
      "website": "www.ddee.com",
      "store_name": "ABC",
      "business_purpose": "Trade",
      "acronym": "Buss",
      "type": "C",
      "org_prvt_identification": {
        "type": "TAX_ID",
        "id": "1234567890",
        "country_of_issuance": "US"
      },
      "address": {
        "street_name": "3210 Abcd st",
        "building_number": "123",
        "postal_code": "L5B 111",
        "town_name": "North York",
        "country_sub_division": "Ontario",
        "country": "CA"
      }
    },
    "beneficial_owner": [
      {
        "date_of_birth": "2001-05-01",
        "first_name": "White",
        "last_name": "James",
        "address": {
          "street_name": "3210 Abcd st",
          "building_number": "123",
          "postal_code": "L5B 111",
          "town_name": "North York",
          "country_sub_division": "Ontario",
          "country": "CA"
        }
      },
      {
        "date_of_birth": "2000-05-01",
        "first_name": "White",
        "last_name": "Mark",
        "address": {
          "street_name": "3210 Abcd st",
          "building_number": "123",
          "postal_code": "L5B 111",
          "town_name": "North York",
          "country_sub_division": "Ontario",
          "country": "CA"
        }
      }
    ]
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp VAUpdateEntityDetailsExample (application/xml)
using RestSharp;

var client = new RestClient("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"entity\": {\n      \"country_of_operation\": \"CA\",\n      \"last_name\": \"INC\",\n      \"id\": \"EN_45678901234567890\",\n      \"website\": \"www.ddee.com\",\n      \"store_name\": \"ABC\",\n      \"business_purpose\": \"Trade\",\n      \"acronym\": \"Buss\",\n      \"type\": \"C\",\n      \"org_prvt_identification\": {\n        \"type\": \"TAX_ID\",\n        \"id\": \"1234567890\",\n        \"country_of_issuance\": \"US\"\n      },\n      \"address\": {\n        \"street_name\": \"3210 Abcd st\",\n        \"building_number\": \"123\",\n        \"postal_code\": \"L5B 111\",\n        \"town_name\": \"North York\",\n        \"country_sub_division\": \"Ontario\",\n        \"country\": \"CA\"\n      }\n    },\n    \"beneficial_owner\": [\n      {\n        \"date_of_birth\": \"2001-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"James\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      },\n      {\n        \"date_of_birth\": \"2000-05-01\",\n        \"first_name\": \"White\",\n        \"last_name\": \"Mark\",\n        \"address\": {\n          \"street_name\": \"3210 Abcd st\",\n          \"building_number\": \"123\",\n          \"postal_code\": \"L5B 111\",\n          \"town_name\": \"North York\",\n          \"country_sub_division\": \"Ontario\",\n          \"country\": \"CA\"\n        }\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift VAUpdateEntityDetailsExample (application/xml)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "action": "UPDATE",
  "header_account": [
    "account": "01010202030",
    "branch_code": "930"
  ],
  "virtual_account": [
    "account": "0123456789",
    "entity": [
      "country_of_operation": "CA",
      "last_name": "INC",
      "id": "EN_45678901234567890",
      "website": "www.ddee.com",
      "store_name": "ABC",
      "business_purpose": "Trade",
      "acronym": "Buss",
      "type": "C",
      "org_prvt_identification": [
        "type": "TAX_ID",
        "id": "1234567890",
        "country_of_issuance": "US"
      ],
      "address": [
        "street_name": "3210 Abcd st",
        "building_number": "123",
        "postal_code": "L5B 111",
        "town_name": "North York",
        "country_sub_division": "Ontario",
        "country": "CA"
      ]
    ],
    "beneficial_owner": [
      [
        "date_of_birth": "2001-05-01",
        "first_name": "White",
        "last_name": "James",
        "address": [
          "street_name": "3210 Abcd st",
          "building_number": "123",
          "postal_code": "L5B 111",
          "town_name": "North York",
          "country_sub_division": "Ontario",
          "country": "CA"
        ]
      ],
      [
        "date_of_birth": "2000-05-01",
        "first_name": "White",
        "last_name": "Mark",
        "address": [
          "street_name": "3210 Abcd st",
          "building_number": "123",
          "postal_code": "L5B 111",
          "town_name": "North York",
          "country_sub_division": "Ontario",
          "country": "CA"
        ]
      ]
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### VAPostingRestrictionExample (application/xml)

**Request**

```json
{
  "action": "UPDATE",
  "header_account": {
    "account": "01010202030",
    "branch_code": "930"
  },
  "virtual_account": {
    "account": "0123456789",
    "credit_debit_preferences": {
      "disallow_credit": "Y",
      "disallow_debit": "N"
    }
  }
}
```

**Response**

```json
{
  "request_id": "29b9c9d7-d4d9-48ce-8823-f9b3ee276b8f",
  "status": "ACCEPTED",
  "message": "Request accepted Successfully"
}
```

**SDK Code**

```python VAPostingRestrictionExample (application/xml)
import requests

url = "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts"

payload = {
    "action": "UPDATE",
    "header_account": {
        "account": "01010202030",
        "branch_code": "930"
    },
    "virtual_account": {
        "account": "0123456789",
        "credit_debit_preferences": {
            "disallow_credit": "Y",
            "disallow_debit": "N"
        }
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript VAPostingRestrictionExample (application/xml)
const url = 'https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"action":"UPDATE","header_account":{"account":"01010202030","branch_code":"930"},"virtual_account":{"account":"0123456789","credit_debit_preferences":{"disallow_credit":"Y","disallow_debit":"N"}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go VAPostingRestrictionExample (application/xml)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts"

	payload := strings.NewReader("{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"credit_debit_preferences\": {\n      \"disallow_credit\": \"Y\",\n      \"disallow_debit\": \"N\"\n    }\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby VAPostingRestrictionExample (application/xml)
require 'uri'
require 'net/http'

url = URI("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"credit_debit_preferences\": {\n      \"disallow_credit\": \"Y\",\n      \"disallow_debit\": \"N\"\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java VAPostingRestrictionExample (application/xml)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"credit_debit_preferences\": {\n      \"disallow_credit\": \"Y\",\n      \"disallow_debit\": \"N\"\n    }\n  }\n}")
  .asString();
```

```php VAPostingRestrictionExample (application/xml)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts', [
  'body' => '{
  "action": "UPDATE",
  "header_account": {
    "account": "01010202030",
    "branch_code": "930"
  },
  "virtual_account": {
    "account": "0123456789",
    "credit_debit_preferences": {
      "disallow_credit": "Y",
      "disallow_debit": "N"
    }
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp VAPostingRestrictionExample (application/xml)
using RestSharp;

var client = new RestClient("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"action\": \"UPDATE\",\n  \"header_account\": {\n    \"account\": \"01010202030\",\n    \"branch_code\": \"930\"\n  },\n  \"virtual_account\": {\n    \"account\": \"0123456789\",\n    \"credit_debit_preferences\": {\n      \"disallow_credit\": \"Y\",\n      \"disallow_debit\": \"N\"\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift VAPostingRestrictionExample (application/xml)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "action": "UPDATE",
  "header_account": [
    "account": "01010202030",
    "branch_code": "930"
  ],
  "virtual_account": [
    "account": "0123456789",
    "credit_debit_preferences": [
      "disallow_credit": "Y",
      "disallow_debit": "N"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```