# Alerts Use Cases
source: https://developer.mastercard.com/merchant-self-services/documentation/use-cases/alerts-use-cases/index.md

This article provides sample use cases to show different ways you can use the Merchant Self Services API for the Alerts service. Each use case includes a specific request and response example corresponding to that use case. [Code and Formats](https://developer.mastercard.com/merchant-self-services/documentation/code-and-formats/index.md) provides information on error codes and response status codes, which are common to all of these use cases.

## Create a submerchant {#create-a-submerchant}

For this use case, you are adding one of your sub-merchants to your existing merchant record. You create a `AlertsSubMerchantCreate` object and send a request to the **createAlertsSubMerchant** endpoint of the Merchant Self Services API. The API validates and persists the sub-merchant and returns a `AlertsSubMerchantResource`.
Diagram alerts-create-submerchant
API Reference: `POST /alerts/merchants/{member_id}/sub-merchants`

## Update a submerchant {#update-a-submerchant}

For this use case, you are updating one of the existing submerchants in your organization. You create an `AlertsSubMerchantDetailsUpdate` object and send a request to the **updateAlertsSubMerchant** endpoint of the Merchant Self Services API. The API validates and updates the submerchant.
Diagram alerts-update-submerchant
API Reference: `PUT /alerts/merchants/{member_id}/sub-merchants/{sub_merchant_id}`

## Update a submerchant's status {#update-a-submerchants-status}

For this use case, you are either activating or deactivating the status of one of the existing submerchants in your organization. You create an `AlertsSubMerchantStatusUpdate` object and send a request to the **changeAlertsSubMerchantState** endpoint of the Merchant Self Services API. The API validates and update the submerchant status.
Diagram alerts-update-submerchant-status
API Reference: `PUT /alerts/merchants/{member_id}/sub-merchants/{sub_merchant_id}/status-changes`

## Add submerchant merchant identifiers {#add-submerchant-merchant-identifiers}

Here you will be adding the submerchant identifiers to help identify the equivalent submerchant from a provided Alert transaction.

For this use case, you create `AlertsCardAcceptorIdConfig` objects and send a request to the **createSubMerchantCardAcceptorId** endpoint of the Merchant Self Services API. The API validates and adds the merchant identifier to the merchant record. The API returns a system identifier for this merchant identifier record.

Similarly, you create `AlertsCardAcceptorNameConfig` objects and send a request to the **createSubMerchantCardAcceptorName** endpoint of the Merchant Self Services API. The API validates and adds the merchant identifier to the merchant record. The API returns a system identifier for this merchant identifier record.
Diagram alerts-add-submerchant-identifiers
API Reference: `POST /alerts/merchants/{member_id}/sub-merchants/{sub_merchant_id}/card-acceptor-ids`

## Delete submerchant merchant identifiers {#delete-submerchant-merchant-identifiers}

In this use case, you send a request to remove a merchant identifier record from a submerchant. You send a `DELETE` request to the **deleteSubMerchantCardAcceptorId** or **deleteSubMerchantCardAcceptorName** endpoints using the system identifier the API provided in the previous use case. The API validates and removes this record from the submerchant.
Diagram alerts-delete-submerchant-identifiers
API Reference: `DELETE /alerts/merchants/{member_id}/sub-merchants/{sub_merchant_id}/card-acceptor-ids`

## Next Steps {#next-steps}

* See our [Testing](https://developer.mastercard.com/merchant-self-services/documentation/testing/index.md) article for specific test data relevant to each of these use cases.
* [Code and Formats](https://developer.mastercard.com/merchant-self-services/documentation/code-and-formats/index.md) provides information on the error codes and response status codes that are common to all of these use cases.
