> For the complete documentation index, see [llms.txt](https://customer-api-docs.ibanera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://customer-api-docs.ibanera.com/api-endpoints/cards/review-replace-card.md).

# Review Replace Card

## Review Card Replacement

The Review Replace Card endpoint previews a card replacement before it is carried out. It validates that the card is eligible for replacement and returns the replacement fee together with the account the fee will be charged from. No card is replaced and no funds are moved by this endpoint. Once reviewed, call Replace Card to perform the replacement.\
The optional **`shippingAddress`** may be supplied on the review request for consistency with the replace request. It is not required to preview the replacement.

* **Endpoint:** `/api/v1/customer/cards/reviewreplace`
* **Method:** `POST`
* **Request Format:** application/json
* **Header Parameter**
  * otp : **required**

#### Request Body

```json
{
  "cardsId": 1359,               // required, number, ID of the card to be replaced
  "replaceReason": "Damaged",    // required, string, one of: "Damaged", "Lost", "FraudCompromised", "Returned", "Expired", "Stolen"
  "shippingMethod": "Standard",  // optional, string, one of: "Standard" (default), "Express"
  "shippingAddress": {           // optional. Supply to ship the replacement card to a new address
    "shippingAddressLine1": "1 Roshar Ave",  // required when shippingAddress is supplied, string, max 60 characters
    "shippingAddressLine2": null,            // optional, string, max 60 characters
    "shippingAddressCity": "New York",       // required when shippingAddress is supplied, string, max 60 characters
    "shippingAddressState": "NY",            // required when shippingAddress is supplied, string, letters only, max 30 characters
    "shippingAddressPostcode": "10001",      // required when shippingAddress is supplied, string, digits only, max 10 characters
    "shippingAddressCountry": "US"           // required when shippingAddress is supplied, string, letters only
  }
}
```

#### Response Body

```json
{
  "id": 0,
  "details": {
    "cardsId": 1359,
    "nameOnCard": "John Smith",
    "fee": 15.00,
    "currency": "USD",
    "feesCustomerAssetAccountsId": 8204
  },
  "status": "1",
  "errors": []
}
```

#### Error Responses

Errors are returned using the standard envelope, with `status` set to `"0"` and one or more entries in the `errors` array, each containing a `fieldName` and a `messageCode`.

| messageCode                           | Meaning                                                                                  |
| ------------------------------------- | ---------------------------------------------------------------------------------------- |
| `Required`                            | A required field (`cardsId` or `replaceReason`) was not provided.                        |
| `Invalid`                             | `replaceReason` or `shippingMethod` is not one of the accepted values.                   |
| `Card_Provider_Not_Supported`         | Card replacement is not supported for this card.                                         |
| `Card_Already_Replaced`               | The card has already been replaced.                                                      |
| `Card_Account_Not_Found`              | The funding account for the card could not be found.                                     |
| `Card_Replacement_Fee_Not_Configured` | No card replacement fee is configured for the customer.                                  |
| `Insufficient_Funds`                  | The funding account does not have enough available balance to cover the replacement fee. |

```json
{
  "id": 0,
  "details": null,
  "status": "0",
  "errors": [
    {
      "fieldName": "CardsId",
      "messageCode": "Card_Replacement_Fee_Not_Configured"
    }
  ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://customer-api-docs.ibanera.com/api-endpoints/cards/review-replace-card.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
