> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/central-issuance/es/implementar-la-emision-centralizada/consulta-y-cambio.md).

# Consulta y cambio

Use Pull and Change para solicitar actualizaciones de un pedido de tarjeta física que D1 ha recibido a través de la API pero que aún no se ha enviado.

{% hint style="warning" %}
Esta función solo está disponible para tarjetas solicitadas por API.
{% endhint %}

### Flujo

<figure><img src="/files/a02d36fffb7996553d4ae1ab9ecafe28785ddd6d" alt=""><figcaption><p>Flujo de Pull and Change para pedidos de tarjetas físicas.</p></figcaption></figure>

### Diagrama de secuencia

<figure><img src="/files/2f323f3e0bba348c6478559ee9686c01479c2434" alt=""><figcaption></figcaption></figure>

### Cómo funciona

1. El backend del emisor envía una solicitud Pull and Change. Tipos de cambio comunes:
   * `CANCEL`: Cancela el pedido de la tarjeta y destruye la tarjeta.
   * `ACCELERATE`: Produce la tarjeta lo antes posible y envíala con un transportista exprés.
   * `REDIRECT`: Cambia la dirección de entrega del envío.
   * `ACCELERATE_AND_REDIRECT`: Acelera la producción y cambia la dirección de entrega del envío.
2. D1 reenvía la solicitud al centro de personalización que produce la tarjeta.
3. El centro de personalización acepta o rechaza la solicitud según la fase de producción.
4. D1 devuelve el resultado de forma asíncrona mediante notificaciones.

### APIs requeridas

| API                                                                                                                                                                                                           | Entrada/Salida      | Descripción                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ----------------------------------------------------- |
| [Pull and Change](/central-issuance/es/integrar-la-api-de-d1/referencia-de-la-api-de-d1/api-entrante-hacia-d1/api-de-pedido-de-tarjetas.md#post-issuers-issuerid-physicalcards-cardid-operations-updateorder) | Emisor -> Thales D1 | Retira una tarjeta y solicita aplicar un cambio       |
| [Notificaciones](/central-issuance/es/integrar-la-api-de-d1/referencia-de-la-api-de-d1/api-saliente-desde-d1/api-de-tarjetas.md#post-notifications-d1-v2-issuers-issuerid-cards)                              | Emisor <- Thales D1 | Recibe notificaciones para la operación UPDATE\_ORDER |

### Entradas de la API

Entradas obligatorias de la API D1:

* `issuerId`: Identificador único del emisor
* `cardId`: Identificador único de la tarjeta.
* `type`: Tipo de cambio que se aplicará al pedido de la tarjeta.

Entradas condicionales de la API D1, cuando `type` es `REDIRECT`o `ACCELERATE_AND_REDIRECT`.

* `newDeliveryAddress` campos:
  * `title`: Prefijo de nombre (por ejemplo, `Sr.`).
  * `firstName`: Nombre.
  * `lastName`: Apellido.
  * `companyName`: Nombre de la empresa.
  * `line1`: Línea 1 de la dirección.
  * `line2`: Línea 2 de la dirección.
  * `line3`: Línea 3 de la dirección.
  * `city`: Ciudad.
  * `state`: Estado o región.
  * `zipCode`: Código postal.
  * `countryCode`: Código de país (ISO 3166-1 alpha-2, por ejemplo `US`).
  * `mobilePhoneNumber`: Número de teléfono internacional utilizado para el contacto del envío.

### Ejemplos

**Ejemplo - CANCEL**

```json
{
  "type": "CANCEL"
}
```

**Ejemplo - ACCELERATE**

```json
{
  "type": "ACCELERATE",
  "newDueDate": "2025-01-15"
}
```

**Ejemplo - REDIRECT**

```json
{
  "type": "REDIRECT",
  "newDeliveryAddress": {
    "title": "Sra.",
    "firstName": "Alex",
    "lastName": "Chen",
    "companyName": "Example Co",
    "line1": "10 Main St",
    "line2": "Apt 3B",
    "city": "New York",
    "state": "NY",
    "zipCode": "10001",
    "countryCode": "US",
    "mobilePhoneNumber": "+12125550123"
  }
}
```

**Ejemplo - ACCELERATE\_AND\_REDIRECT**

```json
{
  "type": "ACCELERATE_AND_REDIRECT",
  "newDueDate": "2025-01-15",
  "newDeliveryAddress": {
    "title": "Sra.",
    "firstName": "Alex",
    "lastName": "Chen",
    "companyName": "Example Co",
    "line1": "10 Main St",
    "line2": "Apt 3B",
    "city": "New York",
    "state": "NY",
    "zipCode": "10001",
    "countryCode": "US",
    "mobilePhoneNumber": "+12125550123"
  }
}
```

### Seguimiento del resultado

* Consume las notificaciones para obtener el resultado aceptado o rechazado.


---

# 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://docs.payments.thalescloud.io/central-issuance/es/implementar-la-emision-centralizada/consulta-y-cambio.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.
