# Offer_Code_Update

Soft delete functionality for offer codes.
This endpoint implements soft deletion using PATCH.
Behavior:
- Updates the `is_deleted` field to mark offer codes as deleted
- Returns a custom success message when `is_deleted` changes from False to True
- Prevents restoration by rejecting attempts to change `is_deleted` from True to False
- Returns HTTP 400 Bad Request for invalid deletion state transitions

Endpoint: PATCH /api/v1/sponsor/merchants/{merchant_uuid}/offer-code/{id}/
Version: 1.0.0 (sponsor_merchant_v1)
Security: basicAuth

## Security:

  - `basicAuth` (unknown)
    http basic

## Path parameters:

  - `id` (integer, required)
    The ID of the offer code

  - `merchant_uuid` (string, required)
    The external organization ID of the merchant. aka: `external_org_id`

## Request fields (application/json):

  - `request_user_id` (string)
    External Partner user ID of an existing user set up at Momnt who creating the Offer Code.
This user must be an active merchant admin user for the Merchant used in the contractor_id path.

  - `name` (string)
    The name of the Offer Code. Alpha string between 2 and 80 characters. Spaces are allowed.

  - `is_active` (boolean)
    Boolean field indication whether the merchant wants this Offer Code turned on or not after creation.

  - `rate_sheet_merchant_product_prices` (array)
    The value of the rate_sheet_merchant_product_price_id (found in the Merchant Rate Sheet Query)
of the products the Merchant wants to add to this rate sheet.

## Response 200 fields (application/json):

  - `request_user_id` (string)
    External Partner user ID of an existing user set up at Momnt who creating the Offer Code.
This user must be an active merchant admin user for the Merchant used in the contractor_id path.

  - `name` (string, required)
    The name of the Offer Code. Alpha string between 2 and 80 characters. Spaces are allowed.

  - `is_active` (boolean)
    Boolean field indication whether the merchant wants this Offer Code turned on or not after creation.

  - `rate_sheet_merchant_product_prices` (array)
    The value of the rate_sheet_merchant_product_price_id (found in the Merchant Rate Sheet Query)
of the products the Merchant wants to add to this rate sheet.

  - `message` (string)
    Used on the response to return a message when the offer code name is changed.
And it will be the only field when the offer code is removed.

