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

# Retrieve an Account

GET https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/accounts/{accountId}

Return the details of a specific Account.

Reference: https://developer.americanexpress.ferndocs.com/payment-services/card-on-demand/api-reference/retrieve-account

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0 client credentials. Exchange your API key and secret for a bearer token, then send it as `Authorization: Bearer <token>`.

## Servers

- `https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand` (Sandbox, default)
- `https://api.americanexpress.com/commercial/v1/card_on_demand` (Production)

## Request

### Path parameters

- `accountId` (string, required) — A unique ID that is created for the Account.

## Response

### 200

Successful operation

- `buyerId` (string, optional) — A unique Buyer ID that is created during the Buyer enrollment.
- `accountDetails` (AccountsAccountIdGetResponsesContentApplicationJsonSchemaAccountDetails, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `errors` (list of 400ErrorItems, required)

### 401 Unauthorized Error

Unauthorized

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

### 403 Forbidden Error

Unauthenticated

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

### 404 Not Found Error

Resource not found

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

### 500 Internal Server Error

Service error

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

### 503 Service Unavailable Error

Service unavailable

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

## Types

### AccountsAccountIdGetResponsesContentApplicationJsonSchemaAccountDetails

- `accountId` (string, required) — A unique ID that is created for the Account.
- `productDescription` (string, required) — The description of the Card Type.
- `lastFive` (string, required) — The last five digits of the Account.
- `status` (enum, required) — The status of the Account.
  - Allowed values: `ACTIVE`, `INACTIVE`
- `nickname` (string, optional) — The nickname of the American Express funding account.

### 400ErrorItems

- `code` (string, required) — A machine-readable field indicating the type of error.
- `message` (string, required) — Provides a short description of the error.
- `detail` (string, optional) — Provides a detailed description of the error.
- `link` (string, optional) — The link to documentation that explains the error.

## Examples

**Response**

```json
{
  "buyerId": "OBpB8D9X93VO03sm",
  "accountDetails": {
    "accountId": "CR6gVOF5QgCqunZ",
    "productDescription": "Platinum Card",
    "lastFive": "11111",
    "status": "ACTIVE",
    "nickname": "Personal Small Business"
  }
}
```

**SDK Code**

```python retrieveAccount_example
import requests

url = "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/accounts/CR6gVOF5QgCqunZ"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript retrieveAccount_example
const url = 'https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/accounts/CR6gVOF5QgCqunZ';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

```go retrieveAccount_example
package main

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

func main() {

	url := "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/accounts/CR6gVOF5QgCqunZ"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby retrieveAccount_example
require 'uri'
require 'net/http'

url = URI("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/accounts/CR6gVOF5QgCqunZ")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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

```java retrieveAccount_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/accounts/CR6gVOF5QgCqunZ")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php retrieveAccount_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/accounts/CR6gVOF5QgCqunZ', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp retrieveAccount_example
using RestSharp;

var client = new RestClient("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/accounts/CR6gVOF5QgCqunZ");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift retrieveAccount_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/accounts/CR6gVOF5QgCqunZ")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```