{"openapi":"3.1.0","info":{"title":"Posneeds UK agent API","version":"1.0.0","description":"For AI agents acting for a customer. Read the Posneeds UK catalogue of thermal printers, labels and rolls, and send a quote request on the customer's behalf. Posneeds is quote-led: there is no checkout. A person on the sales team reviews every request and replies to the customer by email. Nothing is ordered or charged. Only send a request after the customer has confirmed the items and quantities and agreed to share their name and email with Posneeds UK.","contact":{"name":"Posneeds UK sales","email":"sales@netontechnologies.uk","url":"https://posneeds.uk/contact"},"termsOfService":"https://posneeds.uk/terms"},"servers":[{"url":"https://posneeds.uk"}],"paths":{"/api/agent/v1/products":{"get":{"operationId":"listProducts","summary":"List every printer and label/roll with specs, price (or price on request), stock and compatible items","responses":{"200":{"description":"Catalogue","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window"},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window"},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets"},"RateLimit-Policy":{"schema":{"type":"string"},"description":"e.g. 3;w=3600"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Catalogue"}}}},"429":{"description":"More than 120 requests a minute from one connection","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window"},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window"},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets"},"RateLimit-Policy":{"schema":{"type":"string"},"description":"e.g. 3;w=3600"},"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agent/v1/quote":{"post":{"operationId":"createQuoteRequest","summary":"Send a quote request to the Posneeds UK sales team on the customer's behalf","description":"Returns a reference to give the customer. Limits: 3 requests per connection per hour. Do not promise a price, delivery date or reply time.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"201":{"description":"Request received by the sales team","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window"},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window"},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets"},"RateLimit-Policy":{"schema":{"type":"string"},"description":"e.g. 3;w=3600"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteReceived"}}}},"400":{"description":"Invalid body (code `invalid` or `bad_json`); `issues` lists each field and what is wrong","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 20 KB (code `too_large`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests (code `rate_limited`); see Retry-After, or ask the customer to email instead","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window"},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window"},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window resets"},"RateLimit-Policy":{"schema":{"type":"string"},"description":"e.g. 3;w=3600"},"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Not sent (code `not_sent`); ask the customer to email or call instead","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Agent interface switched off (code `disabled`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error","code","message","hint"],"properties":{"error":{"type":"string","description":"Same value as `code` (kept for older clients)"},"code":{"type":"string","examples":["invalid","bad_json","too_large","rate_limited","not_sent","disabled","not_found","method_not_allowed"]},"message":{"type":"string","description":"What happened"},"hint":{"type":"string","description":"What to do next"},"issues":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}},"QuoteRequest":{"type":"object","additionalProperties":false,"required":["items","name","email","customer_consent"],"properties":{"items":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"object","additionalProperties":false,"required":["slug","qty"],"properties":{"slug":{"type":"string","enum":["mht-d1","mht-p11","mht-p5801","mht-p58f","mht-p8001","mht-p29l","mht-p80f","mht-p58d","mht-l58g","mht-l80g","mht-p80a","mht-p80e","mht-p80g","mht-p80d","mht-n3","mht-l1081","mht-p8008","mht-m8","mht-m6","mht-500","mht-p19","labels-4x6","rolls-80x80","rolls-57x40","a4-stencil-paper"],"description":"Product slug from /api/agent/v1/products"},"qty":{"type":"integer","minimum":1,"maximum":500}}}},"name":{"type":"string","minLength":2,"maxLength":80,"description":"Customer's name"},"email":{"type":"string","format":"email","maxLength":120,"description":"Customer's email; the sales team replies here"},"phone":{"type":"string","maxLength":25},"company":{"type":"string","maxLength":100},"postcode":{"type":"string","maxLength":10,"description":"UK delivery postcode, helps quote delivery"},"notes":{"type":"string","maxLength":1000,"description":"What the customer needs, in their words (use, timescale, questions)"},"agent_name":{"type":"string","maxLength":60,"description":"Name of the AI agent or app sending this"},"customer_consent":{"type":"boolean","const":true,"description":"true only if the customer agreed to send their details to Posneeds UK for this quote"}}},"QuoteReceived":{"type":"object","properties":{"status":{"type":"string","const":"received"},"reference":{"type":"string","example":"PQ-261123-AB7K"},"items":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"qty":{"type":"integer"},"url":{"type":"string"}}}},"next_steps":{"type":"string"},"contact":{"type":"object","properties":{"email":{"type":"string"},"phone":{"type":"string"},"hours":{"type":"string"}}}}},"Catalogue":{"type":"object","properties":{"seller":{"type":"object"},"how_to_buy":{"type":"string"},"products":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"kind":{"type":"string","enum":["printer","consumable"]},"name":{"type":"string"},"url":{"type":"string"},"summary":{"type":"string"},"specs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}}}},"price_ex_vat_gbp":{"type":["number","null"]},"price_inc_vat_gbp":{"type":["number","null"]},"stock":{"type":["string","null"]},"compatible":{"type":"array","items":{"type":"string"}}}}}}}}}}