{"openapi":"3.1.0","info":{"title":"OneTrot public stallion API","version":"1.0.0","description":"Read-only, no key. The stallion data a station publishes on OneTrot, for its own website: pedigree, photos, fees, texts and the booking link. Responses may be cached for 5 minutes (Cache-Control) and carry an ETag. Sync on the server (a cron or your CMS import) rather than calling once per page view; 120 requests per minute per IP. Fields are only added within v1; a rename or removal ships as v2. Guide with examples: https://onetrot.com/en/developers/stallion-api"},"servers":[{"url":"https://onetrot.com/api/public/v1"}],"paths":{"/stables/{stableSlug}":{"get":{"summary":"The station","parameters":[{"name":"stableSlug","in":"path","required":true,"schema":{"type":"string"},"description":"The station's slug, as in its booking link `onetrot.com/book/{stableSlug}`."},{"name":"locale","in":"query","required":false,"schema":{"enum":["de","en"],"default":"de"},"description":"Language of labels and texts."}],"responses":{"200":{"description":"The station.","headers":{"ETag":{"schema":{"type":"string"},"description":"Send it back as If-None-Match for a 304."}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Stable"}}}}}},"400":{"description":"Invalid locale.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such station or stallion (or not public).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests from your IP. Cache or sync less often.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/stables/{stableSlug}/stallions":{"get":{"summary":"All stallions the station lists publicly, by name","parameters":[{"name":"stableSlug","in":"path","required":true,"schema":{"type":"string"},"description":"The station's slug, as in its booking link `onetrot.com/book/{stableSlug}`."},{"name":"locale","in":"query","required":false,"schema":{"enum":["de","en"],"default":"de"},"description":"Language of labels and texts."}],"responses":{"200":{"description":"The stallions.","headers":{"ETag":{"schema":{"type":"string"},"description":"Send it back as If-None-Match for a 304."}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Stallion"}}}}}}},"400":{"description":"Invalid locale.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such station or stallion (or not public).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests from your IP. Cache or sync less often.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/stables/{stableSlug}/stallions/{stallionSlug}":{"get":{"summary":"One stallion","parameters":[{"name":"stableSlug","in":"path","required":true,"schema":{"type":"string"},"description":"The station's slug, as in its booking link `onetrot.com/book/{stableSlug}`."},{"name":"stallionSlug","in":"path","required":true,"schema":{"type":"string"}},{"name":"locale","in":"query","required":false,"schema":{"enum":["de","en"],"default":"de"},"description":"Language of labels and texts."}],"responses":{"200":{"description":"The stallion.","headers":{"ETag":{"schema":{"type":"string"},"description":"Send it back as If-None-Match for a 304."}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Stallion"}}}}}},"400":{"description":"Invalid locale.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such station or stallion (or not public).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests from your IP. Cache or sync less often.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Stallion":{"type":"object","required":["id","slug","name","updatedAt","breed","color","wffs","yearOfBirth","heightCm","ueln","breeder","owner","approvedFor","texts","pedigree","media","offers","links"],"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string","description":"Unique per station, stable over time: use it as your key."},"name":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"date-time","description":"Last change to the stallion record."},"breed":{"anyOf":[{"type":"object","required":["key","label"],"properties":{"key":{"type":"string","description":"Stable machine key, e.g. `westphalian`."},"label":{"type":"string","description":"Display label in the requested locale."}}},{"type":"null"}]},"color":{"anyOf":[{"type":"object","required":["key","label"],"properties":{"key":{"type":"string","description":"Stable machine key, e.g. `westphalian`."},"label":{"type":"string","description":"Display label in the requested locale."}}},{"type":"null"}]},"wffs":{"anyOf":[{"type":"object","required":["key","label"],"properties":{"key":{"type":"string","description":"Stable machine key, e.g. `westphalian`."},"label":{"type":"string","description":"Display label in the requested locale."}}},{"type":"null"}]},"yearOfBirth":{"anyOf":[{"type":"integer"},{"type":"null"}]},"heightCm":{"anyOf":[{"type":"integer"},{"type":"null"}]},"ueln":{"anyOf":[{"type":"string"},{"type":"null"}]},"breeder":{"anyOf":[{"type":"string"},{"type":"null"}]},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvedFor":{"type":"array","items":{"type":"string"},"description":"Breeding associations the stallion is approved for, by name."},"texts":{"type":"object","required":["locale","tagline","description","achievements","characteristics","priceNote"],"properties":{"locale":{"anyOf":[{"enum":["de","en"]},{"type":"null"}],"description":"Language actually served. Differs from the request when only the other language has copy; null when there is none."},"tagline":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"object","required":["html","text"],"properties":{"html":{"type":"string","description":"Sanitized HTML: p, br, strong, b, em, i, u, s, ul, ol, li, a[href], h2, h3, blockquote."},"text":{"type":"string","description":"The same text without markup."}}},{"type":"null"}]},"achievements":{"anyOf":[{"type":"object","required":["html","text"],"properties":{"html":{"type":"string","description":"Sanitized HTML: p, br, strong, b, em, i, u, s, ul, ol, li, a[href], h2, h3, blockquote."},"text":{"type":"string","description":"The same text without markup."}}},{"type":"null"}]},"characteristics":{"anyOf":[{"type":"object","required":["html","text"],"properties":{"html":{"type":"string","description":"Sanitized HTML: p, br, strong, b, em, i, u, s, ul, ol, li, a[href], h2, h3, blockquote."},"text":{"type":"string","description":"The same text without markup."}}},{"type":"null"}]},"priceNote":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The stable's note on the price, e.g. `per straw, we recommend 2 straws`."}}},"pedigree":{"anyOf":[{"type":"object","required":["sire","dam"],"properties":{"sire":{"anyOf":[{"$ref":"#/components/schemas/PedigreeNode"},{"type":"null"}]},"dam":{"anyOf":[{"$ref":"#/components/schemas/PedigreeNode"},{"type":"null"}]}}},{"type":"null"}]},"media":{"type":"object","required":["hero","gallery","videos"],"properties":{"hero":{"anyOf":[{"type":"object","required":["url","focalPoint"],"properties":{"url":{"type":"string","format":"uri"},"focalPoint":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"CSS object-position the stable chose for the crop, e.g. `30% 20%`. Null = centered."}}},{"type":"null"}]},"gallery":{"type":"array","items":{"type":"object","required":["url","focalPoint"],"properties":{"url":{"type":"string","format":"uri"},"focalPoint":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"CSS object-position the stable chose for the crop, e.g. `30% 20%`. Null = centered."}}}},"videos":{"type":"array","items":{"type":"string","format":"uri"},"description":"YouTube URLs."}}},"offers":{"type":"array","description":"One entry per bookable option, as on the catalogue page.","items":{"type":"object","required":["type","fees"],"properties":{"type":{"enum":["fresh","frozen","natural_cover"]},"fees":{"type":"array","items":{"type":"object","required":["kind","netCents","grossCents","vatRatePercent","currency","formatted"],"properties":{"kind":{"enum":["initial","pregnancy","redelivery"],"description":"`initial`: due at booking. `pregnancy`: due once the mare is confirmed in foal. `redelivery`: each further frozen-semen shipment."},"netCents":{"type":"integer"},"grossCents":{"type":"integer"},"vatRatePercent":{"type":"number"},"currency":{"const":"EUR"},"formatted":{"type":"string","description":"Gross amount formatted as on the catalogue, e.g. `802,50 €`."}}}}}}},"links":{"type":"object","required":["booking","catalogue","vetCheck"],"properties":{"booking":{"type":"string","format":"uri","description":"The OneTrot booking page for this stallion. Link your \"order semen\" button here."},"catalogue":{"type":"string","format":"uri"},"vetCheck":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}}}}},"Stable":{"type":"object","required":["slug","name","address","contact","links"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"address":{"type":"object","required":["line1","line2","postalCode","city","country"],"properties":{"line1":{"anyOf":[{"type":"string"},{"type":"null"}]},"line2":{"anyOf":[{"type":"string"},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 3166-1 alpha-2."}}},"contact":{"type":"object","required":["email","phone"],"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"E.164."}}},"links":{"type":"object","required":["booking","catalogue"],"properties":{"booking":{"type":"string","format":"uri","description":"The station's booking page (stallion picker)."},"catalogue":{"type":"string","format":"uri"}}}}},"PedigreeNode":{"type":"object","required":["name","registrationNumber","breed","award","sire","dam"],"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"registrationNumber":{"anyOf":[{"type":"string"},{"type":"null"}]},"breed":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Registry breed code as printed, e.g. `Hann`, `xx`."},"award":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Award as the registry writes it, e.g. `StPr`."},"sire":{"anyOf":[{"$ref":"#/components/schemas/PedigreeNode"},{"type":"null"}]},"dam":{"anyOf":[{"$ref":"#/components/schemas/PedigreeNode"},{"type":"null"}]}},"description":"Up to four generations. A node is present while it or an ancestor above it is known."},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"enum":["not_found","invalid_locale","rate_limited","internal"]},"message":{"type":"string"},"incidentId":{"type":"string","description":"Only on `internal`; quote it when you contact us."}}}}}}}}