{"openapi":"3.1.0","info":{"title":"Square Metre office API","version":"0.1.0","description":"Square Metre is independent. Free to you. We pass your brief to the broker or operator who fits, and they may pay us a referral fee. Listings by Ping Offices. Prices from EUR/month excluding VAT. Simulation: consented enquiries stored in app DB only. NEVER sent to Ping Offices or anyone else."},"servers":[{"url":"https://www.squaremetre.ie/api","description":"Current host, simulation-only enquiries"}],"tags":[{"name":"health","description":"Health operations"}],"paths":{"/enquiries":{"post":{"operationId":"submitEnquiry","summary":"Store a simulation enquiry, never email or forward it","description":"Explicit consent:true is mandatory. Server tags REST as agent_api, MCP as agent_mcp and the same-origin website form as web. Stores channel, User-Agent, source listing and consent in our database only. No external delivery. Not idempotent; do not retry after saved:true.","parameters":[{"name":"X-SquareMetre-Channel","in":"header","description":"Website-only attribution hint web, honoured only with a matching Origin. Ordinary REST callers omit it and are tagged agent_api. Not an authentication mechanism; body attribution fields are ignored.","schema":{"type":"string","enum":["web"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnquiryInput"},"example":{"spaceId":"ping-29-mount-street-upper-office-31","name":"Example Person","email":"example@example.invalid","phone":"+353 1 234 5678","consent":true}}}},"responses":{"201":{"description":"Saved internally, not delivered to Ping Offices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnquiryReceipt"},"example":{"saved":true,"referenceId":"550e8400-e29b-41d4-a716-446655440000"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/spaces":{"get":{"operationId":"searchSpaces","summary":"Search office units listed by Ping Offices","description":"Public CORS search. Defaults to Dublin; area Anywhere includes all Ireland. Numeric people is minimum desk capacity and budget is a monthly ceiling excluding VAT. Unknown prices are excluded when a budget is set. Missing values are null, never invented.","parameters":[{"name":"q","in":"query","schema":{"type":"string","maxLength":500},"description":"Free-text location/name keywords; understands numeric people and budget. Explicit filters override inferred numbers. Never put contact details here.","example":"8 people near Grand Canal under €6k"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Optional maximum results; omitted returns all matches","example":20},{"name":"people","in":"query","schema":{"type":"string"},"description":"Headcount number, or 1-2, 3-5, 6-10, 11-20, 20+"},{"name":"area","in":"query","schema":{"type":"string"},"description":"Dublin, Dublin district such as Dublin 2, locality such as Cork, or Anywhere"},{"name":"district","in":"query","schema":{"type":"string"},"description":"Alias for area, e.g. Dublin 2"},{"name":"budget","in":"query","schema":{"type":"string"},"description":"Maximum EUR per month, or Under €1.5k, Up to €3k, Up to €6k, Up to €12k, €12k+"}],"responses":{"200":{"description":"Matching office units, not building overviews","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Space"}},"example":[{"id":"ping-29-mount-street-upper-office-31","slug":"29-mount-street-upper-office-31","name":"29 Mount Street Upper - Office 31","sourceUrl":"https://www.pingoffices.ie/properties/29-mount-street-upper-office-31","listingPageUrl":"https://squaremetre.ie/spaces/29-mount-street-upper-office-31","source":"Ping Offices","area":"Dublin 2","size":35,"desks":10,"price":4000,"currency":"EUR","pricePeriod":"month","exampleData":false,"description":null,"image":null,"images":[],"address":{},"details":{},"geo":{"latitude":null,"longitude":null},"slots":[],"isDublin":true}]}}},"400":{"$ref":"#/components/responses/InvalidRequest"}}}},"/spaces/{id}":{"get":{"operationId":"getSpace","summary":"Get one Ping office unit by id or slug","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Office unit with original source and building reference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"},"example":{"id":"ping-29-mount-street-upper-office-31","slug":"29-mount-street-upper-office-31","name":"29 Mount Street Upper - Office 31","sourceUrl":"https://www.pingoffices.ie/properties/29-mount-street-upper-office-31","listingPageUrl":"https://squaremetre.ie/spaces/29-mount-street-upper-office-31","source":"Ping Offices","area":"Dublin 2","size":35,"desks":10,"price":4000,"currency":"EUR","pricePeriod":"month","exampleData":false,"description":null,"image":null,"images":[],"address":{},"details":{},"geo":{"latitude":null,"longitude":null},"slots":[],"isDublin":true}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/spaces/{id}/slots":{"get":{"operationId":"getViewingSlots","summary":"Returns an empty array because Ping does not supply viewing slots","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"No published viewing availability","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ViewingSlot"}},"example":[]}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/viewings":{"post":{"operationId":"requestViewing","summary":"Legacy viewing request endpoint, retired","description":"Missing explicit consent returns 400. Otherwise returns 410. Ping supplies no real viewing slots; use POST /enquiries instead.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewingRequestInput"}}}},"responses":{"400":{"$ref":"#/components/responses/InvalidRequest"},"410":{"$ref":"#/components/responses/Retired"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"$ref":"#/components/responses/Unavailable"}}}}},"components":{"responses":{"InvalidRequest":{"description":"Invalid request or missing explicit boolean consent:true","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"error":"Explicit consent: true is required."}}}},"NotFound":{"description":"Unknown office unit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"error":"Office unit not found."}}}},"RateLimited":{"description":"Too many attempts, retry after 60 seconds; do not retry a saved enquiry","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before another attempt"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"error":"Please wait a minute before trying again."}}}},"Unavailable":{"description":"Storage unavailable, no successful save confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"error":"Your enquiry could not be saved. Please try again."}}}},"Forbidden":{"description":"Origin refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"error":"Origin refused"}}}},"Retired":{"description":"Viewing slots unavailable. Use POST /api/enquiries after explicit consent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"example":{"error":"Viewing times are not supplied by Ping Offices. Please enquire about the office instead."}}}}},"schemas":{"ContactClickInput":{"type":"object","required":["listingId","source","page"],"properties":{"listingId":{"type":"string","minLength":1,"maxLength":250},"source":{"type":"string","enum":["whatsapp"]},"page":{"type":"string","minLength":1,"maxLength":500}}},"ContactClickReceipt":{"type":"object","required":["saved"],"properties":{"saved":{"type":"boolean","enum":[true]}}},"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"EnquiryReceipt":{"type":"object","required":["saved","referenceId"],"properties":{"saved":{"type":"boolean","const":true},"referenceId":{"type":"string","format":"uuid","description":"Internal simulation enquiry reference. Not a booking or external delivery confirmation."}}},"EnquiryInput":{"type":"object","additionalProperties":false,"required":["spaceId","name","email","phone","consent"],"properties":{"spaceId":{"type":"string","minLength":1,"maxLength":250},"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","format":"email","maxLength":254},"phone":{"type":"string","minLength":7,"maxLength":30},"consent":{"type":"boolean","enum":[true]}}},"Space":{"type":"object","required":["id","slug","name","sourceUrl","listingPageUrl","source","area","size","desks","price","slots","description","image","images","geo","exampleData","currency","pricePeriod","details","address","isDublin"],"properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"area":{"type":"string"},"type":{"type":["string","null"]},"size":{"type":["number","null"],"description":"Source floor area in m²"},"desks":{"type":["integer","null"]},"price":{"type":["number","null"],"description":"From monthly EUR price excluding VAT, not all in"},"currency":{"type":"string","enum":["EUR"]},"pricePeriod":{"type":"string","enum":["month"]},"exampleData":{"type":"boolean","enum":[false]},"sourceUrl":{"type":"string","format":"uri"},"listingPageUrl":{"type":"string","format":"uri","description":"Absolute stable Square Metre unit page URL on the current host"},"source":{"type":"string","enum":["Ping Offices"]},"description":{"type":["string","null"]},"image":{"type":["string","null"],"description":"Ping photo URL"},"images":{"type":"array","items":{"type":"string"}},"address":{"type":"object","additionalProperties":true},"details":{"type":"object","additionalProperties":{"type":"string"}},"district":{"type":["string","null"]},"isDublin":{"type":"boolean"},"desksLabel":{"type":["string","null"]},"desksMin":{"type":["integer","null"]},"buildingId":{"type":["string","null"]},"geo":{"type":"object","required":["latitude","longitude"],"properties":{"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]}}},"slots":{"type":"array","items":{"$ref":"#/components/schemas/ViewingSlot"}}}},"ViewingSlot":{"type":"object","required":["id","label","startsAt"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"startsAt":{"type":"string","format":"date-time"}}},"ViewingSpace":{"type":"object","required":["id","name","area","type","size","desks","price","slots"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"area":{"type":"string"},"type":{"type":["string","null"]},"size":{"type":["number","null"]},"desks":{"type":["integer","null"]},"price":{"type":["number","null"]},"slug":{"type":"string"},"sourceUrl":{"type":"string"},"source":{"type":"string"},"description":{"type":["string","null"]},"image":{"type":["string","null"]},"images":{"type":"array","items":{"type":"string"}},"district":{"type":["string","null"]},"isDublin":{"type":"boolean"},"desksLabel":{"type":["string","null"]},"buildingId":{"type":["string","null"]},"details":{"type":"object","additionalProperties":{"type":"string"}},"address":{"type":"object","additionalProperties":true},"slots":{"type":"array","items":{"$ref":"#/components/schemas/ViewingSlot"}}}},"ViewingSelection":{"type":"object","required":["spaceId","slotId"],"properties":{"spaceId":{"type":"string","maxLength":250},"slotId":{"type":"string","maxLength":100}}},"ViewingRequestInput":{"type":"object","additionalProperties":false,"required":["name","email","phone","consent","selections"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","format":"email","maxLength":254},"phone":{"type":"string","minLength":7,"maxLength":30,"pattern":"^\\+?[0-9 ()-]{7,30}$"},"consent":{"type":"boolean","enum":[true]},"selections":{"type":"array","minItems":1,"maxItems":3,"items":{"$ref":"#/components/schemas/ViewingSelection"}}}},"BriefInput":{"type":"object","additionalProperties":false,"required":["name","email","phone","headcount","area","budget","moveDate","leaseLength","consent"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","format":"email","maxLength":254},"phone":{"type":"string","minLength":7,"maxLength":30,"pattern":"^\\+?[0-9 ()-]{7,30}$"},"headcount":{"type":"string","enum":["1-2","3-5","6-10","11-20","20+"]},"area":{"type":"string","enum":["Dublin 1/2","Dublin 4","Docklands","Dublin 8","Dublin suburbs","Anywhere"]},"budget":{"type":"string","enum":["Under €1.5k","€1.5k-3k","€3k-6k","€6k-12k","€12k+"]},"moveDate":{"type":"string","enum":["ASAP","1-3 months","3-6 months","6+ months"]},"leaseLength":{"type":"string","enum":["Flexible/monthly","1 year","2-3 years","5+ years"]},"consent":{"type":"boolean","enum":[true]}}},"BriefReceipt":{"type":"object","required":["saved"],"properties":{"saved":{"type":"boolean"}}},"HealthStatus":{"type":"object","properties":{"status":{"type":"string"}},"required":["status"]}}}}