# Update Information
source: https://developer.mastercard.com/agent-suite-for-merchants/documentation/use-cases/update-database-information/index.md

👉 Replace the generic update flows, endpoints, Mermaid diagrams, and sample descriptions with the actual update behavior for your service. Update each Mermaid `basename` to the matching file in `data/mermaid/`, and replace every Swagger embed with the real OpenAPI file, endpoint path, and method. If you change the tab layout, keep each variant in its own `sliding-tabs-item` block. Keep the GET-then-PUT or status-only patterns only where they are really supported.

Update information about a primary resource, secondary resource, resource status, transaction record, or administrative record.

### Preconditions {#preconditions}

* The record you want to update must already exist in the system.
* Before sending the update, retrieve the latest version of the record and keep its identifier.

## Update Information About a Primary or Secondary Resource {#update-information-about-a-primary-or-secondary-resource}

Use the full-record update endpoint when you need to replace the current representation of a resource. In the sample specification, these examples are represented by `PUT /dogs/{pet_id}` and `PUT /cats/{pet_id}`.

### Example sequence {#example-sequence}

Diagram update-dog-information An operator corrects or updates the full primary-resource record. A GET-then-PUT pattern is recommended: retrieve the latest version first to avoid overwriting newer data, then submit the updated payload with the same identifier.

See the endpoint structure used by the sample specification:

API Reference: `PUT /dogs/{pet_id}`

An operator corrects or updates the full secondary-resource record. A GET-then-PUT pattern is recommended here as well so the latest state is preserved and optimistic locking requirements can be honored if the service uses versioning.

See the endpoint structure used by the sample specification:

API Reference: `PUT /cats/{pet_id}`

<br />

## Update the Status of an Existing Resource {#update-the-status-of-an-existing-resource}

Some services expose a dedicated status update endpoint so callers can change only the lifecycle state without resubmitting the full record. In the sample specification, this is represented by `PUT /pets/{pet_id}/status`.

### Example sequence {#example-sequence-1}

Diagram update-pet-information

### Update resource status request {#update-resource-status-request}

An operator changes availability or lifecycle state, such as activating, suspending, or completing a resource. Use a dedicated status endpoint when the API supports targeted state transitions separate from full-record updates.

See the endpoint structure used by the sample specification:


API Reference: `PUT /pets/{pet_id}/status`

<br />

## Update a Transaction Record {#update-a-transaction-record}

Use the transaction update endpoint when downstream details, payment state, or linked workflow metadata must change after creation. In the sample specification, this is represented by `PUT /adoptions/{adoption_id}`.

### Example sequence {#example-sequence-2}

Diagram oauth-update-pet-adoption

### Update transaction request {#update-transaction-request}

An operator modifies a transaction record after reviewing the current version. Use the same GET-then-PUT pattern to avoid replacing the record with stale data.

See the endpoint structure used by the sample specification:


API Reference: `PUT /adoptions/{adoption_id}`

<br />

## Update an Administrative Record {#update-an-administrative-record}

Use the administrative update endpoint to change profile, role, contact, or operational metadata associated with an internal record. In the sample specification, this is represented by `PUT /employees/{username}`.

### Example sequence {#example-sequence-3}

Diagram oauth-update-employee-info

### Update administrative record request {#update-administrative-record-request}

An administrator updates an operational profile after retrieving the current version. This keeps role changes, contact updates, and related metadata consistent with the latest record state.

See the endpoint structure used by the sample specification:


API Reference: `PUT /employees/{username}`

<br />

## Error Resolution {#error-resolution}

For details on error resolution please visit our [Code and Formats](https://developer.mastercard.com/agent-suite-for-merchants/documentation/code-and-formats/index.md) section.
