{"openapi":"3.1.0","info":{"title":"Fasty Vendor API","version":"1","description":"Read and change your Fasty Vendor store from your own scripts, games, HUDs and sites. Create a key in the panel (Settings → API; Fasty Pro) and send it as `Authorization: Bearer fsk_…`. Limits are per store: 600 reads, 120 writes, 60 deliveries and 20 reports per minute; 5,000 deliveries and 200,000 requests per day; 5 requests at the same time. Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (seconds). LSL works as is: llHTTPRequest sends the Authorization header and the PATCH method (tested in Second Life); a client that cannot send PATCH can use POST with X-HTTP-Method-Override: PATCH."},"externalDocs":{"description":"Guide and examples (LSL, JavaScript, Python)","url":"https://docs.hienjoystore.com/fasty/developers/api"},"servers":[{"url":"https://api.fastyvendor.com/api/v1"}],"tags":[{"name":"Account","description":"The key and the store it belongs to."},{"name":"Products","description":"Products and groups of variations (needs products:read / products:write)."},{"name":"Sales","description":"Sales, the same objects webhooks send (sales:read)."},{"name":"Deliveries","description":"Send products and redeliver through your hubs (deliveries:write)."},{"name":"Customers","description":"Customers and what they own (customers:read)."},{"name":"Points","description":"Loyalty points (points:read / points:write)."},{"name":"Gift cards","description":"Store credit (gift_cards:read / gift_cards:write)."},{"name":"Coupons","description":"Coupon codes (coupons:read / coupons:write)."},{"name":"Discounts","description":"Promotions with dates (discounts:read / discounts:write)."},{"name":"Vendors","description":"Vendors and hubs in Second Life (vendors:read / vendors:write)."},{"name":"Reports","description":"Numbers for a period (reports:read)."}],"security":[{"bearer":[]}],"paths":{"/me":{"get":{"operationId":"me","tags":["Account"],"summary":"Who am I","description":"The store, this key, its scopes, the limits and today’s usage. Handy to test a key.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products":{"get":{"operationId":"listProducts","tags":["Products"],"summary":"List products","x-scope":"products:read","security":[{"bearer":["products:read"]}],"parameters":[{"name":"q","in":"query","required":false,"description":"Search in the name and the item name.","schema":{"description":"Search in the name and the item name.","type":"string","maxLength":80}},{"name":"active","in":"query","required":false,"description":"true = selling · false = paused.","schema":{"description":"true = selling · false = paused.","type":"string","enum":["true","false"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["item","giftcard","charge"]}},{"name":"group_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page.","schema":{"description":"The next_cursor of the previous page.","type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size (default 50, max 200).","schema":{"description":"Page size (default 50, max 200).","type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"next_cursor":{"description":"Pass it as ?cursor= for the next page; null = last page.","type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateProducts","tags":["Products"],"summary":"Change many products","description":"The same change for up to 500 products in one request.","x-scope":"products:write","security":[{"bearer":["products:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"Product ids (up to 500)."},"patch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":63},"price":{"type":"integer","minimum":0,"maximum":1000000},"category":{"type":"string","enum":["apparel","gacha","home","accessories","avatar","builder","celebrations","animations","art","fun","buildings","animals","breedables","vehicles","furry","gadgets","avatars","scripts","business","weapons","audio","animesh","other"]},"active":{"type":"boolean"},"description":{"type":"string","maxLength":250},"role":{"type":"string","enum":["item","fatpack","demo"]},"variant":{"type":"string","maxLength":40},"points":{"type":"boolean"},"free":{"type":"boolean","description":"Free on purpose (\"Get Free\" on the vendor)."},"image":{"anyOf":[{"type":"string","const":""},{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}],"description":"Texture UUID, or \"\" for none."},"group_discount":{"anyOf":[{"type":"integer","minimum":0,"maximum":90},{"type":"null"}],"description":"SL group discount in %; null = follow the group of variations."},"stock":{"type":"object","properties":{"total":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}],"description":"null = unlimited"},"show":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false,"description":"The same change for all of them."}},"required":["ids","patch"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["updated"],"additionalProperties":false}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products/{id}":{"get":{"operationId":"getProduct","tags":["Products"],"summary":"Get a product","x-scope":"products:read","security":[{"bearer":["products:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateProduct","tags":["Products"],"summary":"Change a product","description":"Send only the fields you want to change. In a group of variations, changing price or name makes it custom (the group no longer overrides it). Vendors pick the change up by themselves.","x-scope":"products:write","security":[{"bearer":["products:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":63},"price":{"type":"integer","minimum":0,"maximum":1000000},"category":{"type":"string","enum":["apparel","gacha","home","accessories","avatar","builder","celebrations","animations","art","fun","buildings","animals","breedables","vehicles","furry","gadgets","avatars","scripts","business","weapons","audio","animesh","other"]},"active":{"type":"boolean"},"description":{"type":"string","maxLength":250},"role":{"type":"string","enum":["item","fatpack","demo"]},"variant":{"type":"string","maxLength":40},"points":{"type":"boolean"},"free":{"type":"boolean","description":"Free on purpose (\"Get Free\" on the vendor)."},"image":{"anyOf":[{"type":"string","const":""},{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}],"description":"Texture UUID, or \"\" for none."},"group_discount":{"anyOf":[{"type":"integer","minimum":0,"maximum":90},{"type":"null"}],"description":"SL group discount in %; null = follow the group of variations."},"stock":{"type":"object","properties":{"total":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}],"description":"null = unlimited"},"show":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/groups":{"get":{"operationId":"listGroups","tags":["Products"],"summary":"List groups of variations","x-scope":"products:read","security":[{"bearer":["products:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page.","schema":{"description":"The next_cursor of the previous page.","type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size (default 50, max 200).","schema":{"description":"Page size (default 50, max 200).","type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Group"}},"next_cursor":{"description":"Pass it as ?cursor= for the next page; null = last page.","type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/groups/{id}":{"get":{"operationId":"getGroup","tags":["Products"],"summary":"Get a group of variations","x-scope":"products:read","security":[{"bearer":["products:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupDetail"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateGroup","tags":["Products"],"summary":"Change a group of variations","description":"Prices apply to every variation that is not custom.","x-scope":"products:write","security":[{"bearer":["products:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":63},"category":{"type":"string","enum":["apparel","gacha","home","accessories","avatar","builder","celebrations","animations","art","fun","buildings","animals","breedables","vehicles","furry","gadgets","avatars","scripts","business","weapons","audio","animesh","other"]},"price_item":{"type":"integer","minimum":0,"maximum":1000000},"price_fatpack":{"type":"integer","minimum":0,"maximum":1000000},"price_demo":{"type":"integer","minimum":0,"maximum":1000000},"active":{"type":"boolean"},"points":{"type":"boolean"},"image":{"anyOf":[{"type":"string","const":""},{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}],"description":"Texture UUID, or \"\" for none."},"group_discount":{"type":"integer","minimum":0,"maximum":90},"stock":{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["each","shared"]},{"type":"null"}],"description":"null = unlimited"},"total":{"type":"integer","minimum":1,"maximum":1000000},"show":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupDetail"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sales":{"get":{"operationId":"listSales","tags":["Sales"],"summary":"List sales","description":"Newest first by default. To keep a copy in sync, use sort=updated_at&order=asc and keep the next_cursor of the last page: new and changed sales (delivered, refunded) come after it. Changes show up within a few seconds.","x-scope":"sales:read","security":[{"bearer":["sales:read"]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["received","pending","delivered","needs_attention","refunded"]}},{"name":"origin","in":"query","required":false,"schema":{"type":"string","enum":["vendor","gacha","tokens","points","giveaway","blog","sent","kit","giftcard","marketplace","partner","charge"]}},{"name":"product_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"buyer_key","in":"query","required":false,"description":"Avatar UUID (key).","schema":{"description":"Avatar UUID (key).","type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},{"name":"from","in":"query","required":false,"description":"Only sales from this moment on (ISO 8601).","schema":{"description":"Only sales from this moment on (ISO 8601).","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"to","in":"query","required":false,"description":"Only sales before this moment (ISO 8601).","schema":{"description":"Only sales before this moment (ISO 8601).","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"sort","in":"query","required":false,"description":"updated_at + order=asc keeps a copy in sync: every new or changed sale comes after your last cursor.","schema":{"default":"created_at","description":"updated_at + order=asc keeps a copy in sync: every new or changed sale comes after your last cursor.","type":"string","enum":["created_at","updated_at"]}},{"name":"order","in":"query","required":false,"schema":{"default":"desc","type":"string","enum":["desc","asc"]}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page.","schema":{"description":"The next_cursor of the previous page.","type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size (default 50, max 200).","schema":{"description":"Page size (default 50, max 200).","type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Sale"}},"next_cursor":{"description":"Pass it as ?cursor= for the next page; null = last page.","type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sales/{id}":{"get":{"operationId":"getSale","tags":["Sales"],"summary":"Get a sale","x-scope":"sales:read","security":[{"bearer":["sales:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sale"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products/{id}/send":{"post":{"operationId":"sendProduct","tags":["Deliveries"],"summary":"Send a product to an avatar","description":"Delivers the product for free through your hubs (a L$0 sale with origin \"sent\"), like Send to someone in the panel. The avatar does not need to be online now: the hub delivers when they are. With username, if Second Life does not answer right away the send is saved and goes out by itself (202 with pending: true).","x-scope":"deliveries:write","security":[{"bearer":["deliveries:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (up to 255 characters). Repeating the request with the same key returns the first answer instead of doing it twice (kept 24 h).","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"avatar_key":{"description":"Avatar UUID (key).","type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"username":{"type":"string","pattern":"^[a-zA-Z0-9._ -]{2,63}$"}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sale_id":{"type":"string"}},"required":["sale_id"],"additionalProperties":false}}}},"202":{"description":"Second Life has not answered who the username is yet: the send is saved and goes out by itself.","content":{"application/json":{"schema":{"type":"object","properties":{"pending":{"const":true},"username":{"type":"string"}},"required":["pending","username"]}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sales/{id}/redeliver":{"post":{"operationId":"redeliverSale","tags":["Deliveries"],"summary":"Redeliver a sale","x-scope":"deliveries:write","security":[{"bearer":["deliveries:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (up to 255 characters). Repeating the request with the same key returns the first answer instead of doing it twice (kept 24 h).","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"delivery_id":{"type":"string"}},"required":["delivery_id"],"additionalProperties":false}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{key}/redeliver":{"post":{"operationId":"redeliverCustomer","tags":["Deliveries"],"summary":"Redeliver everything an avatar owns","description":"Once per product (the latest purchase), up to 100 products. Gift cards and delivered gacha prizes are not redelivered.","x-scope":"deliveries:write","security":[{"bearer":["deliveries:write"]}],"parameters":[{"name":"key","in":"path","required":true,"description":"Avatar UUID (key).","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (up to 255 characters). Repeating the request with the same key returns the first answer instead of doing it twice (kept 24 h).","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["count"],"additionalProperties":false}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers":{"get":{"operationId":"listCustomers","tags":["Customers"],"summary":"List customers","description":"Top spenders first.","x-scope":"customers:read","security":[{"bearer":["customers:read"]}],"parameters":[{"name":"q","in":"query","required":false,"description":"Name or avatar UUID.","schema":{"description":"Name or avatar UUID.","type":"string","maxLength":80}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page.","schema":{"description":"The next_cursor of the previous page.","type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size (default 50, max 200).","schema":{"description":"Page size (default 50, max 200).","type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"next_cursor":{"description":"Pass it as ?cursor= for the next page; null = last page.","type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{key}":{"get":{"operationId":"getCustomer","tags":["Customers"],"summary":"Get a customer","x-scope":"customers:read","security":[{"bearer":["customers:read"]}],"parameters":[{"name":"key","in":"path","required":true,"description":"Avatar UUID (key).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDetail"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{key}/purchases":{"get":{"operationId":"customerPurchases","tags":["Customers"],"summary":"Did this avatar buy it?","description":"What the avatar owns from your store: bought for themselves or received as a gift, refunds excluded. Filter by product_id (or several) or group_id to check a license in a game or HUD. Older versions of a product count too.","x-scope":"customers:read","security":[{"bearer":["customers:read"]}],"parameters":[{"name":"key","in":"path","required":true,"description":"Avatar UUID (key).","schema":{"type":"string"}},{"name":"product_id","in":"query","required":false,"description":"One product id, or several separated by commas (up to 50).","schema":{"description":"One product id, or several separated by commas (up to 50).","type":"string","maxLength":3249}},{"name":"group_id","in":"query","required":false,"description":"Any product of this group of variations.","schema":{"description":"Any product of this group of variations.","type":"string","maxLength":64}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page.","schema":{"description":"The next_cursor of the previous page.","type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size (default 50, max 200).","schema":{"description":"Page size (default 50, max 200).","type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Purchases"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/customers/{key}/points":{"get":{"operationId":"getPoints","tags":["Points"],"summary":"Points of a customer","x-scope":"points:read","security":[{"bearer":["points:read"]}],"parameters":[{"name":"key","in":"path","required":true,"description":"Avatar UUID (key).","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page.","schema":{"description":"The next_cursor of the previous page.","type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Points"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"adjustPoints","tags":["Points"],"summary":"Give or take points","description":"For example, points for winning a game. Taking more than the balance stops at zero.","x-scope":"points:write","security":[{"bearer":["points:write"]}],"parameters":[{"name":"key","in":"path","required":true,"description":"Avatar UUID (key).","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (up to 255 characters). Repeating the request with the same key returns the first answer instead of doing it twice (kept 24 h).","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"delta":{"type":"integer","minimum":-1000000,"maximum":1000000,"description":"Points to add (positive) or take (negative)."},"note":{"type":"string","maxLength":120}},"required":["delta"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PointsAdjusted"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/gift-cards":{"get":{"operationId":"listGiftCards","tags":["Gift cards"],"summary":"List gift cards","x-scope":"gift_cards:read","security":[{"bearer":["gift_cards:read"]}],"parameters":[{"name":"owner_key","in":"query","required":false,"description":"Avatar UUID (key).","schema":{"description":"Avatar UUID (key).","type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","enum":["active","used","expired","canceled"]}},{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page.","schema":{"description":"The next_cursor of the previous page.","type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size (default 50, max 200).","schema":{"description":"Page size (default 50, max 200).","type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GiftCard"}},"next_cursor":{"description":"Pass it as ?cursor= for the next page; null = last page.","type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createGiftCard","tags":["Gift cards"],"summary":"Give a gift card","description":"Store credit for an avatar; they get an IM in Second Life.","x-scope":"gift_cards:write","security":[{"bearer":["gift_cards:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (up to 255 characters). Repeating the request with the same key returns the first answer instead of doing it twice (kept 24 h).","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"owner_key":{"description":"Avatar UUID (key).","type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"value":{"type":"integer","minimum":1,"maximum":1000000,"description":"Balance in L$."},"days":{"description":"Days until the balance expires (null = never).","anyOf":[{"type":"integer","minimum":1,"maximum":3650},{"type":"null"}]},"scope":{"type":"object","properties":{"mode":{"type":"string","enum":["all","except","only"]},"products":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"groups":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["mode"],"additionalProperties":false},"note":{"type":"string","maxLength":200}},"required":["owner_key","value"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/gift-cards/{id}":{"get":{"operationId":"getGiftCard","tags":["Gift cards"],"summary":"Get a gift card","x-scope":"gift_cards:read","security":[{"bearer":["gift_cards:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/gift-cards/{id}/adjust":{"post":{"operationId":"adjustGiftCard","tags":["Gift cards"],"summary":"Add or remove balance","x-scope":"gift_cards:write","security":[{"bearer":["gift_cards:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (up to 255 characters). Repeating the request with the same key returns the first answer instead of doing it twice (kept 24 h).","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"delta":{"type":"integer","minimum":-1000000,"maximum":1000000},"note":{"type":"string","maxLength":120}},"required":["delta"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/gift-cards/{id}/cancel":{"post":{"operationId":"cancelGiftCard","tags":["Gift cards"],"summary":"Cancel a gift card","description":"The balance left can no longer be used.","x-scope":"gift_cards:write","security":[{"bearer":["gift_cards:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (up to 255 characters). Repeating the request with the same key returns the first answer instead of doing it twice (kept 24 h).","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":120}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/coupons":{"get":{"operationId":"listCoupons","tags":["Coupons"],"summary":"List coupons","x-scope":"coupons:read","security":[{"bearer":["coupons:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page.","schema":{"description":"The next_cursor of the previous page.","type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size (default 50, max 200).","schema":{"description":"Page size (default 50, max 200).","type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Coupon"}},"next_cursor":{"description":"Pass it as ?cursor= for the next page; null = last page.","type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createCoupon","tags":["Coupons"],"summary":"Create a coupon","description":"One code, or a batch of single-use codes (batch.count up to 500).","x-scope":"coupons:write","security":[{"bearer":["coupons:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (up to 255 characters). Repeating the request with the same key returns the first answer instead of doing it twice (kept 24 h).","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":60},"kind":{"type":"string","enum":["percent","amount"]},"value":{"type":"integer","minimum":1,"maximum":1000000,"description":"percent: 1–100 (100 = free) · amount: L$ off."},"scope":{"type":"object","properties":{"mode":{"type":"string","enum":["all","except","only"]},"products":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"groups":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["mode"],"additionalProperties":false},"min_price":{"type":"integer","minimum":0,"maximum":1000000},"starts_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"ends_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"max_uses":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}],"description":"null = unlimited"},"per_avatar":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}],"description":"Uses per avatar (default 1; null = unlimited)."},"avatars":{"maxItems":100,"type":"array","items":{"description":"Avatar UUID (key).","type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"description":"Personal coupon: only these avatars."},"code":{"description":"3–24 letters, numbers, - or _ (empty = generated).","type":"string","maxLength":24},"batch":{"description":"Create single-use codes instead of one code.","type":"object","properties":{"prefix":{"type":"string","maxLength":10},"count":{"type":"integer","minimum":1,"maximum":500}},"required":["count"],"additionalProperties":false},"notify":{"description":"Personal coupon: send the code to the avatars by IM.","type":"boolean"}},"required":["kind","value"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponCreated"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/coupons/{id}":{"get":{"operationId":"getCoupon","tags":["Coupons"],"summary":"Get a coupon","x-scope":"coupons:read","security":[{"bearer":["coupons:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateCoupon","tags":["Coupons"],"summary":"Change a coupon","description":"active: false pauses it.","x-scope":"coupons:write","security":[{"bearer":["coupons:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":60},"kind":{"type":"string","enum":["percent","amount"]},"value":{"type":"integer","minimum":1,"maximum":1000000,"description":"percent: 1–100 (100 = free) · amount: L$ off."},"scope":{"type":"object","properties":{"mode":{"type":"string","enum":["all","except","only"]},"products":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"groups":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["mode"],"additionalProperties":false},"min_price":{"type":"integer","minimum":0,"maximum":1000000},"starts_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"ends_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"max_uses":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}],"description":"null = unlimited"},"per_avatar":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000000},{"type":"null"}],"description":"Uses per avatar (default 1; null = unlimited)."},"avatars":{"maxItems":100,"type":"array","items":{"description":"Avatar UUID (key).","type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"description":"Personal coupon: only these avatars."},"active":{"type":"boolean"},"code":{"type":"string","maxLength":24,"description":"Only while nobody used it, and not for batches."}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/discounts":{"get":{"operationId":"listDiscounts","tags":["Discounts"],"summary":"List promotions","x-scope":"discounts:read","security":[{"bearer":["discounts:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page.","schema":{"description":"The next_cursor of the previous page.","type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size (default 50, max 200).","schema":{"description":"Page size (default 50, max 200).","type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Discount"}},"next_cursor":{"description":"Pass it as ?cursor= for the next page; null = last page.","type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createDiscount","tags":["Discounts"],"summary":"Create a promotion","description":"A % off with dates. When several apply, the biggest one wins.","x-scope":"discounts:write","security":[{"bearer":["discounts:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (up to 255 characters). Repeating the request with the same key returns the first answer instead of doing it twice (kept 24 h).","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":60},"percent":{"type":"integer","minimum":1,"maximum":90},"scope":{"type":"object","properties":{"mode":{"type":"string","enum":["all","except","only"]},"products":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"groups":{"default":[],"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"required":["mode"],"additionalProperties":false},"starts_at":{"description":"null or missing = now.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"ends_at":{"description":"null = until you end it.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["percent"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/discounts/{id}/end":{"post":{"operationId":"endDiscount","tags":["Discounts"],"summary":"End a promotion now","x-scope":"discounts:write","security":[{"bearer":["discounts:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (up to 255 characters). Repeating the request with the same key returns the first answer instead of doing it twice (kept 24 h).","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendors":{"get":{"operationId":"listVendors","tags":["Vendors"],"summary":"List vendors","description":"Newest first.","x-scope":"vendors:read","security":[{"bearer":["vendors:read"]}],"parameters":[{"name":"cursor","in":"query","required":false,"description":"The next_cursor of the previous page.","schema":{"description":"The next_cursor of the previous page.","type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size (default 50, max 200).","schema":{"description":"Page size (default 50, max 200).","type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Vendor"}},"next_cursor":{"description":"Pass it as ?cursor= for the next page; null = last page.","type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendors/{id}":{"get":{"operationId":"getVendor","tags":["Vendors"],"summary":"Get a vendor","x-scope":"vendors:read","security":[{"bearer":["vendors:read"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vendor"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateVendor","tags":["Vendors"],"summary":"Change what a vendor sells","description":"The vendor picks the new product up within seconds.","x-scope":"vendors:write","security":[{"bearer":["vendors:write"]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"description":"What the vendor sells; null = nothing (it stops taking payments)."}},"required":["product_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vendor"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this store (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicts with the current state (CONFLICT), or an Idempotency-Key reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hubs":{"get":{"operationId":"listHubs","tags":["Vendors"],"summary":"List hubs","x-scope":"vendors:read","security":[{"bearer":["vendors:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Hub"}},"next_cursor":{"description":"Pass it as ?cursor= for the next page; null = last page.","type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/reports/summary":{"get":{"operationId":"reportSummary","tags":["Reports"],"summary":"Sales summary","description":"Totals, the series and the top products for a period. period=custom is a Pro feature.","x-scope":"reports:read","security":[{"bearer":["reports:read"]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"default":"30d","type":"string","enum":["7d","30d","90d","12m","all","custom"]}},{"name":"from","in":"query","required":false,"description":"period=custom: first day (YYYY-MM-DD).","schema":{"description":"period=custom: first day (YYYY-MM-DD).","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"description":"period=custom: last day (YYYY-MM-DD), included.","schema":{"description":"period=custom: last day (YYYY-MM-DD), included.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"tz","in":"query","required":false,"description":"IANA time zone for the days (e.g. America/Los_Angeles).","schema":{"default":"UTC","description":"IANA time zone for the days (e.g. America/Los_Angeles).","type":"string","maxLength":60}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"400":{"description":"Invalid request (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong or revoked key (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks a scope (MISSING_SCOPE), the store needs Pro (PRO_REQUIRED) or is suspended (STORE_SUSPENDED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A limit was reached (RATE_LIMITED); wait retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable, machine-readable code (e.g. NOT_FOUND, RATE_LIMITED)."},"message":{"type":"string","description":"Human-readable explanation, in English."},"retry_after":{"description":"Seconds to wait before trying again (429 only).","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"request_id":{"type":"string","description":"Send it to support if something looks wrong."}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"Me":{"type":"object","properties":{"store":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"plan":{"type":"string","enum":["basic","pro"]},"pro_until":{"description":"When Pro ends (null = no end date, or no Pro).","type":["string","null"]},"suspended":{"type":"boolean"}},"required":["id","name","plan","pro_until","suspended"],"additionalProperties":false},"key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hint":{"type":"string","description":"Last 4 characters of the key."},"scopes":{"type":"array","items":{"type":"string","enum":["products:read","products:write","sales:read","customers:read","deliveries:write","points:read","points:write","gift_cards:read","gift_cards:write","coupons:read","coupons:write","discounts:read","discounts:write","vendors:read","vendors:write","reports:read"]}}},"required":["id","name","hint","scopes"],"additionalProperties":false},"access":{"type":"string","enum":["full","read_only"],"description":"read_only: Pro expired or store suspended (reads keep working, writes return 403)."},"limits":{"type":"object","properties":{"reads_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"writes_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deliveries_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deliveries_per_day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reports_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"requests_per_day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"concurrent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"page_max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"batch_max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reads_per_minute","writes_per_minute","deliveries_per_minute","deliveries_per_day","reports_per_minute","requests_per_day","concurrent","page_max","batch_max"],"additionalProperties":false},"usage":{"type":"object","properties":{"day":{"type":"string","description":"UTC day."},"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deliveries":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["day","requests","deliveries"],"additionalProperties":false}},"required":["store","key","access","limits","usage"],"additionalProperties":false},"Product":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"item":{"type":"string","description":"Name of the inventory item the hub delivers."},"kind":{"type":"string","enum":["item","giftcard","charge"]},"price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Price in L$."},"price_now":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What a buyer pays right now (after a running promotion)."},"promo":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"percent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","percent"],"additionalProperties":false},{"type":"null"}],"description":"Promotion running now, or null."},"group_discount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"SL group discount in % (0 = none)."},"group_price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Price for members of the store SL group (0 = no discount)."},"free":{"type":"boolean"},"category":{"type":"string","enum":["apparel","gacha","home","accessories","avatar","builder","celebrations","animations","art","fun","buildings","animals","breedables","vehicles","furry","gadgets","avatars","scripts","business","weapons","audio","animesh","other"]},"description":{"type":"string"},"image":{"type":"string","description":"Own texture UUID (\"\" = uses the group cover)."},"image_url":{"type":["string","null"]},"active":{"type":"boolean","description":"false = paused: vendors do not sell it."},"group_id":{"type":["string","null"]},"role":{"type":"string","enum":["item","fatpack","demo"]},"variant":{"type":"string"},"points":{"type":"boolean","description":"Buying it gives loyalty points."},"stock":{"anyOf":[{"$ref":"#/components/schemas/Stock"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO 8601 date and time (UTC)."}},"required":["id","name","item","kind","price","price_now","promo","group_discount","group_price","free","category","description","image","image_url","active","group_id","role","variant","points","stock","created_at"],"additionalProperties":false},"Stock":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sold":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"left":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"show":{"type":"boolean","description":"The vendor shows how many are left."},"scope":{"type":"string","enum":["product","each","shared"],"description":"product = its own number · each = every variation of the group has this number · shared = one stock for the whole group."}},"required":["total","sold","left","show","scope"],"additionalProperties":false,"description":"Limited quantity; null = unlimited."},"Group":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["apparel","gacha","home","accessories","avatar","builder","celebrations","animations","art","fun","buildings","animals","breedables","vehicles","furry","gadgets","avatars","scripts","business","weapons","audio","animesh","other"]},"image":{"type":"string"},"image_url":{"type":["string","null"]},"price_item":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price_fatpack":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price_demo":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"points":{"type":"boolean"},"group_discount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stock":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["each","shared"]},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sold":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"show":{"type":"boolean"}},"required":["mode","total","sold","show"],"additionalProperties":false},{"type":"null"}]},"products":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many products are in the group."},"created_at":{"type":"string","description":"ISO 8601 date and time (UTC)."}},"required":["id","name","category","image","image_url","price_item","price_fatpack","price_demo","active","points","group_discount","stock","products","created_at"],"additionalProperties":false,"description":"A group of variations (colors, sizes) with shared prices."},"GroupDetail":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["apparel","gacha","home","accessories","avatar","builder","celebrations","animations","art","fun","buildings","animals","breedables","vehicles","furry","gadgets","avatars","scripts","business","weapons","audio","animesh","other"]},"image":{"type":"string"},"image_url":{"type":["string","null"]},"price_item":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price_fatpack":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price_demo":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"},"points":{"type":"boolean"},"group_discount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"stock":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["each","shared"]},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sold":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"show":{"type":"boolean"}},"required":["mode","total","sold","show"],"additionalProperties":false},{"type":"null"}]},"products":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many products are in the group."},"created_at":{"type":"string","description":"ISO 8601 date and time (UTC)."},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["item","fatpack","demo"]},"variant":{"type":"string"},"price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"active":{"type":"boolean"}},"required":["id","name","role","variant","price","active"],"additionalProperties":false}}},"required":["id","name","category","image","image_url","price_item","price_fatpack","price_demo","active","points","group_discount","stock","products","created_at","members"],"additionalProperties":false},"Sale":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["received","pending","delivered","needs_attention","refunded"]},"origin":{"type":"string","enum":["vendor","gacha","tokens","points","giveaway","blog","sent","kit","giftcard","marketplace","partner","charge"],"description":"Where it came from: a vendor, a gacha play, a points reward, the Marketplace…"},"source":{"type":"string","enum":["inworld","marketplace"]},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"L$ paid."},"price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Product price at the time of the sale."},"currency":{"type":"string","const":"L$"},"fee":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Marketplace fee in L$."},"discount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Coupon discount in L$."},"gift_card":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Part paid with gift card balance, in L$."},"coupon":{"type":["string","null"]},"product":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"item":{"type":"string"},"image_url":{"type":["string","null"]}},"required":["id","name","item","image_url"],"additionalProperties":false},"buyer":{"$ref":"#/components/schemas/Avatar"},"recipient":{"anyOf":[{"$ref":"#/components/schemas/Avatar"},{"type":"null"}],"description":"Who received it as a gift, or null."},"place":{"anyOf":[{"type":"object","properties":{"region":{"type":"string"},"parcel":{"type":"string"},"position":{"type":"string"},"slurl":{"type":["string","null"]}},"required":["region","parcel","position","slurl"],"additionalProperties":false},{"type":"null"}]},"vendor":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"marketplace":{"anyOf":[{"type":"object","properties":{"order_id":{"type":"string"},"listing_id":{"type":"string"},"listing_url":{"type":"string"}},"required":["order_id","listing_id","listing_url"],"additionalProperties":false},{"type":"null"}]},"receipt_url":{"type":"string"},"partner":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string","description":"ISO 8601 date and time (UTC)."},"updated_at":{"type":"string","description":"ISO 8601 date and time (UTC)."},"delivered_at":{"description":"ISO 8601 date and time (UTC), or null.","type":["string","null"]}},"required":["id","status","origin","source","amount","price","currency","fee","discount","gift_card","coupon","product","buyer","recipient","place","vendor","marketplace","receipt_url","partner","created_at","updated_at","delivered_at"],"additionalProperties":false,"description":"The same object webhooks send as data.sale."},"Avatar":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string","description":"Username (\"\" when the store has never seen it)."}},"required":["key","name"],"additionalProperties":false},"Customer":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"spent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"L$ spent in the store (refunds excluded)."},"purchases":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"first_purchase_at":{"description":"ISO 8601 date and time (UTC), or null.","type":["string","null"]},"last_purchase_at":{"description":"ISO 8601 date and time (UTC), or null.","type":["string","null"]}},"required":["key","name","spent","purchases","first_purchase_at","last_purchase_at"],"additionalProperties":false},"CustomerDetail":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"spent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purchases":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refunded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"gifts_sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"gifts_received":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"points":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Loyalty points balance."},"first_purchase_at":{"description":"ISO 8601 date and time (UTC), or null.","type":["string","null"]},"last_purchase_at":{"description":"ISO 8601 date and time (UTC), or null.","type":["string","null"]}},"required":["key","name","spent","purchases","refunded","gifts_sent","gifts_received","points","first_purchase_at","last_purchase_at"],"additionalProperties":false},"Purchases":{"type":"object","properties":{"avatar_key":{"type":"string"},"purchased":{"type":"boolean","description":"true = the avatar owns at least one matching product (bought or received as a gift, not refunded)."},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Matching purchases on this page."},"items":{"type":"array","items":{"type":"object","properties":{"sale_id":{"type":"string"},"product":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"status":{"type":"string","enum":["received","pending","delivered","needs_attention","refunded"]},"amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"gift_from":{"description":"Key of who gave it as a gift, or null.","type":["string","null"]},"created_at":{"type":"string","description":"ISO 8601 date and time (UTC)."}},"required":["sale_id","product","status","amount","gift_from","created_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["avatar_key","purchased","count","items","next_cursor"],"additionalProperties":false},"Points":{"type":"object","properties":{"avatar_key":{"type":"string"},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"earned":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"spent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"moves":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delta":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"type":"string","description":"earn, redeem, adjust, refund…"},"note":{"type":"string"},"sale_id":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO 8601 date and time (UTC)."}},"required":["id","delta","kind","note","sale_id","created_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["avatar_key","balance","earned","spent","moves","next_cursor"],"additionalProperties":false},"PointsAdjusted":{"type":"object","properties":{"avatar_key":{"type":"string"},"delta":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What actually changed (taking more than the balance stops at zero)."},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["avatar_key","delta","balance"],"additionalProperties":false},"GiftCard":{"type":"object","properties":{"id":{"type":"string"},"owner":{"$ref":"#/components/schemas/Avatar"},"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"state":{"type":"string","enum":["active","used","expired","canceled"]},"expires_at":{"description":"ISO 8601 date and time (UTC), or null.","type":["string","null"]},"scope":{"$ref":"#/components/schemas/Scope"},"source":{"type":"string","description":"sale, given, import…"},"note":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 date and time (UTC)."}},"required":["id","owner","value","balance","state","expires_at","scope","source","note","created_at"],"additionalProperties":false},"Scope":{"type":"object","properties":{"mode":{"type":"string","enum":["all","except","only"]},"products":{"type":"array","items":{"type":"string"},"description":"Product ids."},"groups":{"type":"array","items":{"type":"string"},"description":"Group ids."}},"required":["mode","products","groups"],"additionalProperties":false,"description":"Where it is valid: all products, all except the lists, or only the lists."},"Coupon":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string","description":"The code (the first one of a batch)."},"codes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many codes (1, or the batch size)."},"codes_used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"batch":{"type":"boolean","description":"A batch of single-use codes."},"kind":{"type":"string","enum":["percent","amount"]},"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"percent: 1–100 (100 = free) · amount: L$ off."},"scope":{"$ref":"#/components/schemas/Scope"},"min_price":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"starts_at":{"description":"ISO 8601 date and time (UTC), or null.","type":["string","null"]},"ends_at":{"description":"ISO 8601 date and time (UTC), or null.","type":["string","null"]},"max_uses":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_avatar":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"avatars":{"type":"array","items":{"type":"string"},"description":"Personal coupon: only these avatars can use it (empty = anyone)."},"active":{"type":"boolean"},"state":{"type":"string","description":"active, scheduled, ended, paused or used_up."},"uses":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discount_given":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"revenue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string","description":"ISO 8601 date and time (UTC)."}},"required":["id","name","code","codes","codes_used","batch","kind","value","scope","min_price","starts_at","ends_at","max_uses","per_avatar","avatars","active","state","uses","discount_given","revenue","created_at"],"additionalProperties":false},"CouponCreated":{"type":"object","properties":{"coupon":{"$ref":"#/components/schemas/Coupon"},"codes":{"type":"array","items":{"type":"string"},"description":"Every code created (one, or the whole batch)."}},"required":["coupon","codes"],"additionalProperties":false},"Discount":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"percent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"scope":{"$ref":"#/components/schemas/Scope"},"starts_at":{"type":"string","description":"ISO 8601 date and time (UTC)."},"ends_at":{"description":"ISO 8601 date and time (UTC), or null.","type":["string","null"]},"state":{"type":"string","enum":["scheduled","active","ended"]},"products":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Products whose price it changes right now."},"sales":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"revenue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"given":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"L$ given as discount."},"created_at":{"type":"string","description":"ISO 8601 date and time (UTC)."}},"required":["id","name","percent","scope","starts_at","ends_at","state","products","sales","revenue","given","created_at"],"additionalProperties":false,"description":"A promotion with dates."},"Vendor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"region":{"type":"string"},"position":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"[x, y, z] in the region."},"slurl":{"type":["string","null"]},"status":{"type":"string","enum":["online","offline"]},"script_version":{"type":"string"},"last_seen":{"type":"string","description":"ISO 8601 date and time (UTC)."},"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"What it sells (null = nothing yet)."},"created_at":{"type":"string","description":"ISO 8601 date and time (UTC)."}},"required":["id","name","region","position","slurl","status","script_version","last_seen","product","created_at"],"additionalProperties":false},"Hub":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"region":{"type":"string"},"position":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"[x, y, z] in the region."},"slurl":{"type":["string","null"]},"status":{"type":"string","enum":["online","offline"]},"script_version":{"type":"string"},"last_seen":{"type":"string","description":"ISO 8601 date and time (UTC)."},"items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items it holds."},"created_at":{"type":"string","description":"ISO 8601 date and time (UTC)."}},"required":["id","name","region","position","slurl","status","script_version","last_seen","items","created_at"],"additionalProperties":false},"Report":{"type":"object","properties":{"period":{"type":"string"},"from":{"type":"string","description":"ISO 8601 date and time (UTC)."},"to":{"type":"string","description":"ISO 8601 date and time (UTC)."},"unit":{"type":"string","enum":["day","week","month"],"description":"Size of each series bucket."},"totals":{"type":"object","properties":{"sales":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"revenue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"L$ paid."},"received":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"L$ after profit shares."},"buyers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"new_buyers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refunded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"gifts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refunded_amount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["sales","revenue","received","buyers","new_buyers","refunded","gifts","refunded_amount"],"additionalProperties":false},"previous":{"anyOf":[{"type":"object","properties":{"sales":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"revenue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"L$ paid."},"received":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"L$ after profit shares."},"buyers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"new_buyers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refunded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["sales","revenue","received","buyers","new_buyers","refunded"],"additionalProperties":false},{"type":"null"}],"description":"The same numbers for the period before (null for period=all)."},"series":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","description":"YYYY-MM-DD"},"sales":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"revenue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"received":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["start","sales","revenue","received"],"additionalProperties":false}},"top_products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["product","group"]},"name":{"type":"string"},"sales":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"revenue":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","kind","name","sales","revenue"],"additionalProperties":false}}},"required":["period","from","to","unit","totals","previous","series","top_products"],"additionalProperties":false}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Your API key (fsk_…)."}}}}