curl --fail-with-body -X DELETE "https://maatstays.wtf/v1/listings/7c4b1e58-2a90-4f61-b3d2-5e8a1c0f7d24/quick-actions/pricing.cleaning_fee" \
-H "Authorization: Bearer $MAAT_PARTNER_TOKEN"const res = await fetch('https://maatstays.wtf/v1/listings/7c4b1e58-2a90-4f61-b3d2-5e8a1c0f7d24/quick-actions/pricing.cleaning_fee', {
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.MAAT_PARTNER_TOKEN}` },
});
if (res.status !== 204) {
const body = await res.json();
throw new Error(`${body.code}: ${body.detail}`);
}
import os
import requests
res = requests.delete(
"https://maatstays.wtf/v1/listings/7c4b1e58-2a90-4f61-b3d2-5e8a1c0f7d24/quick-actions/pricing.cleaning_fee",
headers={"Authorization": f"Bearer {os.environ['MAAT_PARTNER_TOKEN']}"},
timeout=30,
)
if res.status_code != 204:
body = res.json()
raise RuntimeError(f"{body['code']}: {body.get('detail')}")
package main
import (
"log"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest(http.MethodDelete, "https://maatstays.wtf/v1/listings/7c4b1e58-2a90-4f61-b3d2-5e8a1c0f7d24/quick-actions/pricing.cleaning_fee", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("MAAT_PARTNER_TOKEN"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
if res.StatusCode != http.StatusNoContent {
log.Fatalf("remove failed: %d", res.StatusCode)
}
}
{
"type": "https://developer.maatstays.wtf/errors/validation-failed",
"title": "Validation failed",
"status": 400,
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "validation_failed",
"errors": [
{
"field": "body.check_out",
"code": "custom"
}
]
}{
"type": "https://developer.maatstays.wtf/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "A valid partner token is required.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "unauthorized"
}{
"type": "https://developer.maatstays.wtf/errors/insufficient-scope",
"title": "Insufficient scope",
"status": 403,
"detail": "This key was not issued with the `pricing:write` scope. Ask whoever issued it to issue a key that carries it.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "insufficient_scope"
}{
"type": "https://developer.maatstays.wtf/errors/listing-not-found",
"title": "Listing not found",
"status": 404,
"detail": "No such listing in this workspace.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "listing_not_found"
}{
"type": "https://developer.maatstays.wtf/errors/inventory-not-supported",
"title": "Inventory kind not supported",
"status": 409,
"detail": "This listing is an experience, and this contract is stays-only. Nothing was read or written.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "inventory_not_supported"
}{
"type": "https://developer.maatstays.wtf/errors/rate-limited",
"title": "Too many requests",
"status": 429,
"detail": "Too many requests for this API key.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "rate_limited"
}{
"type": "https://developer.maatstays.wtf/errors/internal-error",
"title": "Internal error",
"status": 500,
"detail": "The request could not be completed.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "internal_error"
}{
"type": "https://developer.maatstays.wtf/errors/not-enabled",
"title": "Not implemented",
"status": 501,
"detail": "The calendar-blocks contract is published but not yet enabled. This request was authenticated and validated; no dates were blocked. Keep holding these dates on your own platform.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "not_enabled"
}Switch a quick action off
Switch a quick action off. The rule it created is removed along with it.
204 whether or not it was applied — switching off something already off is the
desired end state, not an error to retry.
Takes the same scopes as the PUT, including pricing:write for a pricing.*
key: removing a cleaning fee changes what a guest pays just as surely as adding
one.
Live in a sandbox workspace. Returns 501 against a production one, where no
rule is removed.
curl --fail-with-body -X DELETE "https://maatstays.wtf/v1/listings/7c4b1e58-2a90-4f61-b3d2-5e8a1c0f7d24/quick-actions/pricing.cleaning_fee" \
-H "Authorization: Bearer $MAAT_PARTNER_TOKEN"const res = await fetch('https://maatstays.wtf/v1/listings/7c4b1e58-2a90-4f61-b3d2-5e8a1c0f7d24/quick-actions/pricing.cleaning_fee', {
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.MAAT_PARTNER_TOKEN}` },
});
if (res.status !== 204) {
const body = await res.json();
throw new Error(`${body.code}: ${body.detail}`);
}
import os
import requests
res = requests.delete(
"https://maatstays.wtf/v1/listings/7c4b1e58-2a90-4f61-b3d2-5e8a1c0f7d24/quick-actions/pricing.cleaning_fee",
headers={"Authorization": f"Bearer {os.environ['MAAT_PARTNER_TOKEN']}"},
timeout=30,
)
if res.status_code != 204:
body = res.json()
raise RuntimeError(f"{body['code']}: {body.get('detail')}")
package main
import (
"log"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest(http.MethodDelete, "https://maatstays.wtf/v1/listings/7c4b1e58-2a90-4f61-b3d2-5e8a1c0f7d24/quick-actions/pricing.cleaning_fee", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("MAAT_PARTNER_TOKEN"))
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
if res.StatusCode != http.StatusNoContent {
log.Fatalf("remove failed: %d", res.StatusCode)
}
}
{
"type": "https://developer.maatstays.wtf/errors/validation-failed",
"title": "Validation failed",
"status": 400,
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "validation_failed",
"errors": [
{
"field": "body.check_out",
"code": "custom"
}
]
}{
"type": "https://developer.maatstays.wtf/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "A valid partner token is required.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "unauthorized"
}{
"type": "https://developer.maatstays.wtf/errors/insufficient-scope",
"title": "Insufficient scope",
"status": 403,
"detail": "This key was not issued with the `pricing:write` scope. Ask whoever issued it to issue a key that carries it.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "insufficient_scope"
}{
"type": "https://developer.maatstays.wtf/errors/listing-not-found",
"title": "Listing not found",
"status": 404,
"detail": "No such listing in this workspace.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "listing_not_found"
}{
"type": "https://developer.maatstays.wtf/errors/inventory-not-supported",
"title": "Inventory kind not supported",
"status": 409,
"detail": "This listing is an experience, and this contract is stays-only. Nothing was read or written.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "inventory_not_supported"
}{
"type": "https://developer.maatstays.wtf/errors/rate-limited",
"title": "Too many requests",
"status": 429,
"detail": "Too many requests for this API key.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "rate_limited"
}{
"type": "https://developer.maatstays.wtf/errors/internal-error",
"title": "Internal error",
"status": 500,
"detail": "The request could not be completed.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "internal_error"
}{
"type": "https://developer.maatstays.wtf/errors/not-enabled",
"title": "Not implemented",
"status": 501,
"detail": "The calendar-blocks contract is published but not yet enabled. This request was authenticated and validated; no dates were blocked. Keep holding these dates on your own platform.",
"instance": "urn:maat:request:3b1f7a90-0d4c-4d4e-9b2a-6c1f0a2e5d33",
"code": "not_enabled"
}Authorizations
A short-lived partner token, obtained by exchanging your API key at
POST /token. Send it as Authorization: Bearer <access_token>.
Tokens live for fifteen minutes by default and never for more than an hour. Mint one per batch of work, not one per request.
The token carries the workspace and the environment its key was issued for. You cannot change either by asking: the exchange ignores everything in the request body for exactly that reason.
It also carries the key's scopes (scope, a list). Every operation names a
scope as x-maat-scope, and a token whose key lacks it is refused with
403 insufficient_scope, naming the scope. Scopes are fixed when a key is
issued and are re-read from the key on every request, so a key narrowed today is
narrowed on its next call — the token's scope is what the key held at exchange
time, for your own reading, never what authorizes a request.
x-maat-scope is the floor, and on the quick-action operations it is not the
whole requirement. PUT and DELETE /listings/{listing_id}/quick-actions/{template_key}
carry rules:write, and additionally require pricing:write when
template_key begins pricing. — the capability depends on the template in
the path, because a cleaning fee changes what a guest pays and a minimum stay
does not. The refusal is the same 403 insufficient_scope, naming
pricing:write. The two READS apply the same requirement without erroring:
GET /listings/{listing_id}/quick-actions still lists the pricing.* rows but
withholds their applied state, and GET /listings/{listing_id}/rules omits the
pricing rules entirely and reports pricing_withheld in warnings. These four
are the only operations in this document whose requirement is not exactly their
x-maat-scope, and each of them says so machine-readably:
x-maat-scope-additional lists the second scope it can require and
x-maat-scope-additional-when says what happens without it.
Never send it as a cookie or in a query string, and never store it — store the API key, mint tokens from it.
Path Parameters
Maat's identifier for the listing.
The quick action's identifier. A closed set. Permanent: a withdrawn template
keeps its identifier and is refused with validation_failed, never removed.
The identifier of a quick action. A CLOSED set, and every member of it is
permanent: a template that is withdrawn keeps its identifier and is reported
available: false, unavailable_reason: "retired" rather than disappearing.
This list is checked in CI against the platform's seeded templates, so it cannot lag what we actually run.
booking.min_stay, booking.max_stay, booking.no_checkout_days, booking.weekend_min_stay, pricing.weekend_surcharge, pricing.long_stay_discount, pricing.large_group_surcharge, pricing.cleaning_fee "pricing.cleaning_fee"
Response
The action is off.