{"openapi":"3.1.0","info":{"title":"Own Use Love API","version":"1.0.0","summary":"Read live Own Use Love storefronts, manage a seller's storefront with their API key, and request an account for a person.","description":"Own Use Love lets regular people open a small storefront of the products they own, use and love, with their own affiliate links. Sellers' links are served exactly as entered, to every caller alike, and are never rewritten or redirected. Documentation: https://www.ownuselove.com/developers","termsOfService":"https://www.ownuselove.com/terms","contact":{"name":"Own Use Love support","email":"support@ownuselove.com","url":"https://www.ownuselove.com/developers"}},"servers":[{"url":"https://www.ownuselove.com/api/v1"}],"tags":[{"name":"Public","description":"No authentication. Live storefronts only."},{"name":"Store management","description":"Requires a seller's personal API key."},{"name":"Accounts","description":"Agent-initiated, human-confirmed sign-up."}],"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","description":"A personal API key the seller creates under Settings → Agents & API, or that an agent collects after the seller's Allow (GET /signups/{id}), sent as `Authorization: Bearer oul_…`. Acts as that seller only."},"ClaimSecret":{"type":"http","scheme":"bearer","description":"The one-time claim secret from POST /signups, sent as `Authorization: Bearer oulc_…`. Only valid for GET /signups/{id}."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"A message suitable to show a person."},"code":{"type":"string","description":"A stable code to branch on."},"details":{"description":"Validation messages or retry information."}}},"Product":{"type":"object","required":["id","title","description","affiliate_link","categories","tags","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":5000,"description":"The seller's own words about the product."},"affiliate_link":{"type":"string","maxLength":2048,"description":"The seller's affiliate link, stored and returned verbatim. Never rewritten, tagged or redirected (Terms of Service §11)."},"categories":{"type":"array","minItems":1,"maxItems":2,"uniqueItems":true,"items":{"type":"string","enum":["apparel","arts-crafts","baby-kids","beauty","media","vehicles","electronics","food-drink","garden-outdoor","health-fitness","home-kitchen","office","pets","sports","tools","toys-games","travel","other"]}},"tags":{"type":"array","maxItems":10,"items":{"type":"string","maxLength":30}},"image_url":{"type":["string","null"],"format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ProductInput":{"type":"object","required":["title","description","affiliate_link","categories"],"properties":{"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":5000,"description":"The seller's own words about the product."},"affiliate_link":{"type":"string","maxLength":2048,"description":"The seller's affiliate link, stored and returned verbatim. Never rewritten, tagged or redirected (Terms of Service §11)."},"categories":{"type":"array","minItems":1,"maxItems":2,"uniqueItems":true,"items":{"type":"string","enum":["apparel","arts-crafts","baby-kids","beauty","media","vehicles","electronics","food-drink","garden-outdoor","health-fitness","home-kitchen","office","pets","sports","tools","toys-games","travel","other"]}},"tags":{"type":"array","maxItems":10,"items":{"type":"string","maxLength":30}}}},"ProductPatch":{"type":"object","minProperties":1,"properties":{"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":5000,"description":"The seller's own words about the product."},"affiliate_link":{"type":"string","maxLength":2048,"description":"The seller's affiliate link, stored and returned verbatim. Never rewritten, tagged or redirected (Terms of Service §11)."},"categories":{"type":"array","minItems":1,"maxItems":2,"uniqueItems":true,"items":{"type":"string","enum":["apparel","arts-crafts","baby-kids","beauty","media","vehicles","electronics","food-drink","garden-outdoor","health-fitness","home-kitchen","office","pets","sports","tools","toys-games","travel","other"]}},"tags":{"type":"array","maxItems":10,"items":{"type":"string","maxLength":30}},"image_url":{"type":"null","description":"null removes the picture."}}},"Store":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"url":{"type":"string","format":"uri"},"logo_url":{"type":["string","null"],"format":"uri"},"banner_url":{"type":["string","null"],"format":"uri"},"about":{"type":["object","null"],"properties":{"headline":{"type":["string","null"]},"bio":{"type":["string","null"]}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"links":{"type":"object","properties":{"products":{"type":"string","format":"uri"},"posts":{"type":"string","format":"uri"},"llms_txt":{"type":"string","format":"uri"}}}}},"Post":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"excerpt":{"type":["string","null"]},"content":{"type":"string","description":"Markdown."},"url":{"type":"string","format":"uri"},"published_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Category":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}}},"Me":{"type":"object","properties":{"user":{"type":"object","properties":{"email":{"type":["string","null"]}}},"store":{"type":["object","null"],"description":"null until the person creates their storefront in the dashboard.","properties":{"slug":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"live":{"type":"boolean","description":"Whether visitors can see the store right now."},"product_count":{"type":"integer"}}},"access":{"type":"string","enum":["admin","comp","trial","paid","grace","none"],"description":"Why the account is live; \"none\" means writes are refused with 402."},"key":{"type":"object","properties":{"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}}},"Claim":{"type":"object","description":"How the agent collects the person's API key after they choose Allow (see GET /signups/{id}).","properties":{"id":{"type":"string","format":"uuid"},"secret":{"type":"string","description":"Shown once. Send as `Authorization: Bearer <secret>` to the claim URL."},"url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"},"poll_interval_seconds":{"type":"integer"}}},"ClaimStatus":{"type":"object","properties":{"status":{"type":"string","enum":["pending","approved","denied","consumed","expired"]},"agent":{"type":["string","null"]},"next":{"type":"string","description":"What to do now."},"api_key":{"type":"string","description":"Only on status approved, and only once."},"store":{"type":["object","null"],"description":"Only on status approved. null means create it with POST /me/store.","properties":{"slug":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"}}}}},"StoreInput":{"type":"object","required":["name","slug"],"properties":{"name":{"type":"string","maxLength":60},"slug":{"type":"string","pattern":"^[a-z0-9-]{3,63}$","description":"The storefront address: {slug}.ownuselove.com. Permanent."},"description":{"type":"string","maxLength":500}}},"SignupRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"full_name":{"type":"string","maxLength":80},"store_name":{"type":"string","maxLength":60,"description":"Prefills the setup screen; the person can change it."},"slug":{"type":"string","pattern":"^[a-z0-9-]{3,63}$","description":"Desired storefront address ({slug}.ownuselove.com). Only a suggestion; availability is checked when the person sets up."},"agent":{"type":"string","maxLength":80,"description":"Your name, shown in the email and on the Allow button. Send it."}}}}},"paths":{"/categories":{"get":{"tags":["Public"],"summary":"The fixed product category list","operationId":"listCategories","responses":{"200":{"description":"Categories","content":{"application/json":{"schema":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/Category"}}}}}}}}}},"/stores/{slug}":{"get":{"tags":["Public"],"summary":"A live storefront","operationId":"getStore","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The store","content":{"application/json":{"schema":{"type":"object","properties":{"store":{"$ref":"#/components/schemas/Store"}}}}}},"404":{"description":"No such store, or the store is not live.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/stores/{slug}/products":{"get":{"tags":["Public"],"summary":"A live storefront's products, with the seller's exact links","operationId":"listStoreProducts","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Products, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"store":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}}},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}}}},"404":{"description":"No such store, or the store is not live.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/stores/{slug}/posts":{"get":{"tags":["Public"],"summary":"A live storefront's published posts","operationId":"listStorePosts","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Posts, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"$ref":"#/components/schemas/Post"}}}}}}},"404":{"description":"No such store, or the store is not live.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"tags":["Store management"],"summary":"The account and store behind this key","operationId":"getMe","security":[{"ApiKey":[]}],"responses":{"200":{"description":"Account state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see details.retry_after_seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/products":{"get":{"tags":["Store management"],"summary":"The seller's own products, live or not","operationId":"listOwnProducts","security":[{"ApiKey":[]}],"responses":{"200":{"description":"Products, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The person has not created a storefront yet (code no_storefront).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see details.retry_after_seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products":{"post":{"tags":["Store management"],"summary":"Add a product","operationId":"createProduct","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/Product"}}}}}},"400":{"description":"Validation failed; details lists field messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account's trial or subscription has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No storefront yet (code no_storefront).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The store already holds 500 products (code store_full).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see details.retry_after_seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products/batch":{"post":{"tags":["Store management"],"summary":"Add up to 50 products in one call","operationId":"createProductsBatch","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["products"],"properties":{"products":{"type":"array","minItems":1,"maxItems":50,"items":{"$ref":"#/components/schemas/ProductInput"}}}}}}},"responses":{"200":{"description":"One result per item, in order; each succeeds or fails on its own.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"product":{"$ref":"#/components/schemas/Product"},"error":{"type":"string"},"code":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}}}}}}},"400":{"description":"The body is not { products: [...] } within the size limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account's trial or subscription has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No storefront yet (code no_storefront).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see details.retry_after_seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Store management"],"summary":"One of the seller's products","operationId":"getProduct","security":[{"ApiKey":[]}],"responses":{"200":{"description":"The product","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/Product"}}}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such product in this seller's store.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see details.retry_after_seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"tags":["Store management"],"summary":"Change a product","operationId":"updateProduct","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPatch"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/Product"}}}}}},"400":{"description":"Validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account's trial or subscription has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such product in this seller's store.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see details.retry_after_seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Store management"],"summary":"Remove a product","operationId":"deleteProduct","security":[{"ApiKey":[]}],"responses":{"204":{"description":"Removed"},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account's trial or subscription has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such product in this seller's store.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see details.retry_after_seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products/{id}/image":{"post":{"tags":["Store management"],"summary":"Give a product a picture from a public image URL","description":"The image is copied to our image host (never hotlinked). Amazon-hosted images are refused because Amazon Associates forbids copying them.","operationId":"setProductImage","security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["source_url"],"properties":{"source_url":{"type":"string","format":"uri"}}}}}},"responses":{"200":{"description":"The product with its new image_url","content":{"application/json":{"schema":{"type":"object","properties":{"product":{"$ref":"#/components/schemas/Product"}}}}}},"400":{"description":"Not a usable image address, or an Amazon-hosted image.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"The account's trial or subscription has ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such product in this seller's store.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see details.retry_after_seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/signups":{"post":{"tags":["Accounts"],"summary":"Ask us to invite a person to open an account","description":"We email the person. A new account is confirmed with one click and lands on a page asking whether to let the agent manage the store; an existing account is asked to sign in and allow it. The response carries a claim: poll GET /signups/{id} with its secret, and after the person's Allow the key is returned once. The agent never obtains a key without the person's Allow.","operationId":"requestSignup","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}}},"responses":{"202":{"description":"Invitation sent","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["invited","approval_requested"]},"claim":{"$ref":"#/components/schemas/Claim"},"next":{"type":"string","description":"What to tell the person, and what to do next."}}}}}},"400":{"description":"Validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many sign-up requests from this address or for this email.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The invitation could not be created or sent; try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/signups/{id}":{"get":{"tags":["Accounts"],"summary":"Poll a claim; collect the API key once the person has chosen Allow","operationId":"collectClaim","security":[{"ClaimSecret":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The claim's state. On approved, api_key is included exactly once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimStatus"}}}},"401":{"description":"Missing claim secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such claim, or wrong secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Polling too often (at most every 30 seconds).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The key could not be issued right now; poll again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/store":{"post":{"tags":["Store management"],"summary":"Create the key holder's storefront","description":"One per account; same checks as the dashboard setup form. The slug is permanent.","operationId":"createStore","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"store":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"url":{"type":"string","format":"uri"}}},"next":{"type":"string"}}}}}},"400":{"description":"Validation failed (code validation_failed, with details).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already has a store (already_has_store) or the slug is taken (slug_taken).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited; see details.retry_after_seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}