Special Offers API

Create promotions on existing products — "offers of the day", limited time deals or special bundles. Each offer references one or more products from the same business and can be published or kept as a draft.

Base URL

All URLs referenced in the documentation use the following base:

Base URL
https://api.meetandrock.com/v1/dev

Offer Management

Endpoints for listing, creating, updating, and deleting special offers.

GET/special-offers

List special offers

Retrieve special offers with pagination and filters.

  • search matches title, description and banner text.
  • is_published accepts true or false.
  • active=true returns only published offers within their active window.
GEThttps://api.meetandrock.com/v1/dev/special-offers?page=1&limit=10&active=true
List special offers

Retrieve special offers.

curl -X GET "https://api.meetandrock.com/v1/dev/special-offers?page=1&limit=10&active=true" \
-H "Authorization: Bearer YOUR_API_KEY"
POST/special-offers

Create special offer

Create a special offer that references one or more products in your business.

Required fields: title, discount_value, product_ids. Optional: description, banner_text, discount_type (percentage, fixed, price), start_at, end_at, is_published.

POSThttps://api.meetandrock.com/v1/dev/special-offers
Create special offer

Create a special offer linked to existing products.

curl -X POST "https://api.meetandrock.com/v1/dev/special-offers" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Offer of the Day",
"description": "Limited time daily special",
"banner_text": "Save 20% today!",
"discount_type": "percentage",
"discount_value": 20,
"start_at": "2026-05-01T00:00:00.000Z",
"end_at": "2026-05-01T23:59:59.000Z",
"product_ids": ["PROD_1", "PROD_2"],
"is_published": true
}'
GET/special-offers/:specialOfferId

Get special offer

Fetch a single offer by id including the linked products with their images and category.

GEThttps://api.meetandrock.com/v1/dev/special-offers/:specialOfferId
Get special offer

Get a special offer with linked products.

curl -X GET "https://api.meetandrock.com/v1/dev/special-offers/OFFER_ID" \
-H "Authorization: Bearer YOUR_API_KEY"
PUT/special-offers/:specialOfferId

Update special offer

Partially update offer fields. When product_ids is provided, the product list is replaced atomically.

PUThttps://api.meetandrock.com/v1/dev/special-offers/:specialOfferId
Update special offer

Update an existing offer.

curl -X PUT "https://api.meetandrock.com/v1/dev/special-offers/OFFER_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated title",
"discount_value": 30,
"product_ids": ["PROD_1"]
}'
DELETE/special-offers/:specialOfferId

Delete special offer

Permanently remove an offer. The linked products are not deleted.

DELETEhttps://api.meetandrock.com/v1/dev/special-offers/:specialOfferId
Delete special offer

Delete a special offer.

curl -X DELETE "https://api.meetandrock.com/v1/dev/special-offers/OFFER_ID" \
-H "Authorization: Bearer YOUR_API_KEY"

Publishing

Drafts are not visible to customers. Publish or unpublish offers with the dedicated lifecycle endpoints.

POST/special-offers/:specialOfferId/publish

Publish offer

Publish a draft offer. Sets is_published to true and stamps published_at.

POSThttps://api.meetandrock.com/v1/dev/special-offers/:specialOfferId/publish
Publish offer

Publish a draft offer.

curl -X POST "https://api.meetandrock.com/v1/dev/special-offers/OFFER_ID/publish" \
-H "Authorization: Bearer YOUR_API_KEY"
POST/special-offers/:specialOfferId/unpublish

Unpublish offer

Move an offer back to draft state.

POSThttps://api.meetandrock.com/v1/dev/special-offers/:specialOfferId/unpublish
Unpublish offer

Move an offer back to draft.

curl -X POST "https://api.meetandrock.com/v1/dev/special-offers/OFFER_ID/unpublish" \
-H "Authorization: Bearer YOUR_API_KEY"

Filters & pagination

All list endpoints support standard page and limit pagination, returning a pagination object with total, page and limit.

Error responses

400 Bad Request

{
  "message": "Some products do not belong to this business: PROD_X"
}

404 Not Found

{ "message": "Special offer not found" }

Contents