API: Update Offer and promo

Request

Update the details of a specific offer and promo by ID:

PUT /offer-and-promos/{id}

Request Body Parameters:

Parameter Validation Rule Example
title Required | String | Max: 255 This is a test offer
expired_date Nullable | Date | Format: Y-m-d
description Nullable | String
link Nullable | Integer | Min: 1 | Max: 5
image Nullable | Image File | Max Size: 2MB | format: jpeg,png,jpg Image File

Sample Response:

                    
    {
        "status": "success",
        "message": "Offer and promo updated successfully",
        "data": {
            "id": 1,
            "title": "This is a test offer and promo",
            "expired_date": null,
            "description": null,
            "image": "http://127.0.0.1:8000/uploads/offer-and-promos/1762016881_K67aahLH22AWOFDhelFs.jpeg",
            "link": null,
            "status": 1,
            "created_by": 1,
            "updated_by": null,
            "created_at": "2025-11-01T17:08:01.000000Z",
            "updated_at": "2025-11-01T17:08:01.000000Z",
            "deleted_at": null
        }
    }