Create a new offer and promo with a POST request:
POST /offer-and-promos
| 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 |
Required | Image File | Max Size: 2MB | format: jpeg,png,jpg | Image File |
{
"status": "success",
"message": "Offer and promo created 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
}
}