---
title: "Change the conditions, the opening hours and the live switch of a listing"
method: PATCH
path: "/api/v1/partner/listings/{id}"
---

# Change the conditions, the opening hours and the live switch of a listing

`PATCH /api/v1/partner/listings/{id}`

## Request

- Base URL: `https://wcway.com`
- URL: `https://wcway.com/api/v1/partner/listings/{id}`
- Auth: API key in cookie `__Host-wcway_session`

For the web page of this site only. It needs a signed-in account that owns the listing, an approved claim and a running plan. Send any of the three fields. open_now false closes the toilet for 12 hours, then it follows the hours again. open_now true ends that at once. Conditions and hours are statements of the business. They never change the order of results.

## Path parameters

- `id` string, required

## Request body

- object
  - `conditions` 'everyone' | 'customers', nullable: What the business says about who may use the toilet. everyone: free for everyone. customers: customers only. Null when the business said nothing. It is the word of the business, not a checked fact.
  - `opening_hours` string, nullable: OpenStreetMap opening_hours syntax, for example Mo-Fr 08:00-18:00. An empty string or null clears it.
  - `open_now` boolean

## Response `200`

The profile is saved.

- object
  - `conditions` 'everyone' | 'customers', nullable, required: What the business says about who may use the toilet. everyone: free for everyone. customers: customers only. Null when the business said nothing. It is the word of the business, not a checked fact.
  - `opening_hours` string, nullable, required
  - `closed_until` integer, required: Milliseconds since the epoch. 0 when the live switch is on.
  - `open_now` boolean, required: The state of the live switch. false: closed for now.

## Other responses

- `400`: The body is invalid.
- `401`: No account is signed in.
- `403`: The request came from another origin.
- `404`: The account has no listing with this id.
- `409`: The claim is not approved, or the listing has no running plan.
- `429`: Rate limit reached. Wait Retry-After seconds.

---

[API](https://skmtc.dev/wcway/apis/wcway-api.md) · [All operations](https://skmtc.dev/wcway/apis/wcway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/wcway/apis/wcway-api/revisions/34f42e2ca0e8?raw)
