dambel

دمبل

shevron
ورود | ثبت نام

API Docs / payments / boost



POST /api/v1/payments/boost

Boost a resource (e.g., gym or training service) using a selected boost plan.


Permissions

PermissionDescription
payments.boost_ownBoost your own resources
payments.boost_allBoost any resource

Request Body Parameters

NameTypeRequiredDescriptionExample
boostable_typestringYesType of resource to boost (gym, training_service)"gym"
boostable_idintYesID of the resource to boost42
planstringYesName of the boost plan"premium"

Use /prices to get available plans and prices.


Request Example

{
  "boostable_type": "gym",
  "boostable_id": 42,
  "plan": "premium"
}

Response

201 Created

Returns the created marketing boost resource.

Example

{
  "id": 101,
  "boostable_type": "App\\Models\\Gym",
  "boostable_id": 42,
  "plan": "premium",
  "status": "active",
  "starts_at": "2024-01-01T00:00:00Z",
  "ends_at": "2024-01-31T23:59:59Z"
}

For a full schema, see Marketing Boost Resource.


Error Responses

StatusDescriptionExample/Reference
400Already have a boost{ "error": "You already have a boost" }
400Insufficient balance{ "error": "Insufficient balance" }
404Plan not found{ "error": "Plan not found" }
422Validation errorValidation error
500Purchase failed{ "error": "Purchase failed" }
401UnauthorizedAuthentication error
403Forbidden (no permission)Permission error
footer wave
logo

دمبل، دنیای هوشمند ورزش و تغذیه

LinkedinInstagramXYoutube