Deactivate a service
const url = 'https://api.keptslot.com/v1/services/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/deactivate';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.keptslot.com/v1/services/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/deactivate \ --header 'Authorization: Bearer <token>'This endpoint stops new bookings for a service. It does not erase the service, and it does not cancel the bookings it already has.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The service id.
Responses
Section titled “ Responses ”The service is inactive.
The full service, with the rules that drive availability. The Service
schema is the smaller customer-facing view of the same row.
object
Free time held before the appointment.
Free time held after the appointment.
How far ahead a customer must book.
How far ahead a customer can book. If you send 0 on a write, the API stores 60.
How long before the start time cancellation closes. It binds customers only. A secret key cancels at any time. A value of 0 keeps cancellation open until the start time.
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "duration_minutes": 1, "buffer_before_minutes": 1, "buffer_after_minutes": 1, "min_lead_minutes": 1, "max_advance_days": 1, "min_cancel_notice_minutes": 1, "active": true, "price_cents": 1, "description": "example", "payment_mode": "example", "deposit_amount_cents": 1, "deposit_percent": 1}The key is missing, malformed or revoked.
object
object
A stable machine-readable code. Match on this.
A sentence for a person. Do not match on this.
The field that caused the refusal, if one field did.
The plan limit that refused the request. It is present only on a 402, and only for a secret key or an account key. See the errors guide.
The current count for that dimension. It is present only on a 402, and only for an account key. It is absent when the refusal has no count to report. Absent and zero are different answers.
The cap for that dimension. It is present only on a 402, and only for an account key. A cap of zero is a real value.
Example generated
{ "error": { "type": "example", "message": "example", "param": "example", "dimension": "example", "used": 1, "limit": 1 }}There is no such resource in this workspace.
object
object
A stable machine-readable code. Match on this.
A sentence for a person. Do not match on this.
The field that caused the refusal, if one field did.
The plan limit that refused the request. It is present only on a 402, and only for a secret key or an account key. See the errors guide.
The current count for that dimension. It is present only on a 402, and only for an account key. It is absent when the refusal has no count to report. Absent and zero are different answers.
The cap for that dimension. It is present only on a 402, and only for an account key. A cap of zero is a real value.
Example generated
{ "error": { "type": "example", "message": "example", "param": "example", "dimension": "example", "used": 1, "limit": 1 }}The request body or the query is not valid.
object
object
A stable machine-readable code. Match on this.
A sentence for a person. Do not match on this.
The field that caused the refusal, if one field did.
The plan limit that refused the request. It is present only on a 402, and only for a secret key or an account key. See the errors guide.
The current count for that dimension. It is present only on a 402, and only for an account key. It is absent when the refusal has no count to report. Absent and zero are different answers.
The cap for that dimension. It is present only on a 402, and only for an account key. A cap of zero is a real value.
Example generated
{ "error": { "type": "example", "message": "example", "param": "example", "dimension": "example", "used": 1, "limit": 1 }}