Welcome to our new docs! Please keep in mind we are still working on making everything is as accurate as possible. Join us on discord and ask us questions if you are unsure.
DezerX Spartan Logo
Services

Update Service Due Date

Update the due date of a service. The new due date must be in the future.

PUT
/api/application/services/{id}/due-date
AuthorizationBearer <token>

Bearer token authentication

In: header

Path Parameters

idinteger

Service ID

due_datestring

New due date for the service (must be after today)

Formatdate-time

Response Body

curl -X PUT "https://api.example.com/api/application/services/0/due-date" \
  -H "Content-Type: application/json" \
  -d '{
    "due_date": "2024-12-31T23:59:59.000000Z"
  }'
{
  "success": true,
  "message": "Service action completed successfully",
  "data": {
    "id": 1,
    "service_name": "Web Hosting Premium",
    "product_id": 1,
    "category_id": 1,
    "owner_id": 1,
    "extra_owners": null,
    "price": "25.00",
    "original_price": null,
    "coupon_id": null,
    "billing_cycle": "yearly",
    "due_date": "2024-12-31T23:59:59.000000Z",
    "status": "active",
    "module": "HostingModule",
    "config": {
      "domain": "example.com",
      "created_at": "2024-01-01T00:00:00.000000Z",
      "license_id": 1,
      "license_key": "LIC-XXXXXXXX-XXXXXXXX-XXXXXXXX",
      "last_rotated": "2024-01-01T00:00:00.000000Z"
    },
    "created_at": "2024-01-01T00:00:00.000000Z",
    "updated_at": "2024-01-01T00:00:00.000000Z",
    "last_reminded": null,
    "owner": {
      "id": 1,
      "name": "user@example.com",
      "email": "user@example.com"
    },
    "product": {
      "id": 1,
      "name": "Premium Hosting"
    },
    "category": {
      "id": 1,
      "name": "Web Hosting"
    }
  }
}
{
  "success": false,
  "message": "Service not found"
}
{
  "success": false,
  "message": "Validation failed",
  "errors": {
    "price": [
      "The price field is required."
    ]
  }
}