{"openapi":"3.0.3","info":{"title":"LiberLite Reseller API","version":"1.0.0","description":"Programmatic access to the LiberLite catalog, ordering and order tracking.\n\n**Authentication** — create a key in *Dashboard → API keys* and send it as `Authorization: Bearer <key>` (or `X-API-Key: <key>`). Keys are shown once; we store only a hash.\n\n**Scopes** — `read` (catalog, balance, orders), `orders` (place orders), `manage` (cancel & refill).\n\n**Money** — amounts are decimal strings in the wallet currency (USD) with 4 decimals. Rates are per 1000 units unless `pricing` is `per_order`.\n\n**Grouped orders** — `POST /orders` accepts several line items. Each item is validated, priced and tracked independently and has its own quantity. The response contains the parent order id (`data.id`) and every item id (`data.items[].id`).\n\n**Idempotency** — every `POST /orders` requires an `Idempotency-Key` header. Retrying with the same key and body returns the original order (`replayed: true`, HTTP 200) instead of charging again. Reusing a key with a different body returns `409 idempotency_conflict`.\n\n**Charging policy** — the grand total is debited atomically when the order is accepted. If any item is invalid the whole request is rejected and nothing is charged. Items the provider rejects become `failed` and are refunded individually; `partial` items are refunded for the undelivered quantity; `canceled` items are refunded in full.\n\n**Statuses** — `queued`, `submitting`, `pending`, `processing`, `in_progress`, `needs_review` (being verified by staff), `completed`, `partial`, `canceled`, `failed`. Group status: `pending`, `processing`, `completed`, `partial`, `canceled`, `failed`. A group is `completed` only when every item is completed.\n\n**Rate limits** — 120 requests/minute per key and 20 order requests/minute per account. Responses include `X-RateLimit-Limit` / `X-RateLimit-Remaining`; exceeding returns `429` with `Retry-After`.\n\n**Legacy API** — the classic `POST /api/v2` (form fields `key`, `action` = services | add | status | balance | refill | refill_status | cancel) remains available for existing integrations; there `order` ids are item ids."},"servers":[{"url":"https://liberlite.com/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Account"},{"name":"Catalog"},{"name":"Orders"},{"name":"Order items"}],"paths":{"/balance":{"get":{"tags":["Account"],"summary":"Get wallet balance","operationId":"getBalance","responses":{"200":{"description":"Balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"},"example":{"balance":"25.5000","currency":"USD"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/categories":{"get":{"tags":["Catalog"],"summary":"List categories","operationId":"listCategories","responses":{"200":{"description":"Categories","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Category"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/services":{"get":{"tags":["Catalog"],"summary":"List or search services (priced for your account)","operationId":"listServices","parameters":[{"name":"q","in":"query","description":"Search terms: platform, category, service name, keyword (followers, likes, views…) or service id. All terms must match.","schema":{"type":"string"}},{"name":"category_id","in":"query","schema":{"type":"integer"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["default","price_asc","price_desc","name"]}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":100}}],"responses":{"200":{"description":"Services","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Service"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/services/{id}":{"get":{"tags":["Catalog"],"summary":"Get a service, including its required input fields","operationId":"getService","parameters":[{"name":"id","in":"path","required":true,"description":"Service id","schema":{"type":"integer"}}],"responses":{"200":{"description":"Service","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Service"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/orders":{"post":{"tags":["Orders"],"summary":"Create an order (one or many services)","operationId":"createOrder","description":"Send `items` for a grouped multi-service order. Each item has its own `service_id`, `link`, `quantity` and any service-specific fields listed in the service's `fields` (e.g. `comments` for custom comments — one per line; quantity is then the number of lines). Scope: `orders`.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique per logical order, 8-80 chars [A-Za-z0-9._:-]. Reuse it when retrying.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrder"},"example":{"items":[{"service_id":12,"link":"https://instagram.com/p/XYZ","quantity":1000},{"service_id":31,"link":"https://instagram.com/p/XYZ","comments":"Amazing!\nLove it 🔥\nSo good"}],"expected_total":"1.2600"}}}},"responses":{"201":{"description":"Order created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"200":{"description":"Idempotent replay — the original order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"400":{"description":"Missing/invalid Idempotency-Key or malformed JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient balance (code `insufficient_funds`) — nothing was charged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key lacks the `orders` scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`idempotency_conflict` or `price_changed` (when `expected_total` differs from the server total)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed — `error.details.fields.items` maps the item index to field errors. Nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"validation_error","message":"Some services in your order need attention.","details":{"fields":{"items":{"1":{"quantity":"Minimum quantity is 100."}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"tags":["Orders"],"summary":"List your orders (newest first)","operationId":"listOrders","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["pending","processing","completed","partial","canceled","failed"]}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","maximum":100,"default":50}}],"responses":{"200":{"description":"Orders","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/orders/{id}":{"get":{"tags":["Orders"],"summary":"Get an order with every item and its status history","operationId":"getOrder","parameters":[{"name":"id","in":"path","required":true,"description":"Order (group) id","schema":{"type":"integer"}}],"responses":{"200":{"description":"Order","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Order"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/order-items/{id}":{"get":{"tags":["Order items"],"summary":"Get a single order item","operationId":"getOrderItem","parameters":[{"name":"id","in":"path","required":true,"description":"Item id","schema":{"type":"integer"}}],"responses":{"200":{"description":"Item","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OrderItem"}}},"example":{"data":{"id":1042,"group_id":512,"service_id":12,"service_name":"Instagram Likes — Real","category":"Instagram Likes","platform":"instagram","logo_url":"https://liberlite.com/uploads/category-logos/abc.png","link":"https://instagram.com/p/XYZ","quantity":1000,"runs":null,"interval":null,"total_quantity":1000,"fields":{},"charge":"0.9000","refunded":"0.0000","status":"in_progress","start_count":152,"remains":400,"delivered":600,"error":null,"can_cancel":false,"cancel_requested":false,"can_refill":false,"submitted_at":"2026-10-12T10:00:02Z","updated_at":"2026-10-12T10:05:00Z","created_at":"2026-10-12T10:00:00Z"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/order-items/status":{"get":{"tags":["Order items"],"summary":"Status of up to 100 items at once","operationId":"getItemStatuses","parameters":[{"name":"ids","in":"query","required":true,"description":"Comma-separated item ids (max 100)","schema":{"type":"string"},"example":"1042,1043"}],"responses":{"200":{"description":"Map of item id to status (or `{\"error\":\"not_found\"}`)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ItemStatus"}}}},"example":{"data":{"1042":{"status":"completed","start_count":152,"remains":0,"charge":"0.9000","refunded":"0.0000","group_id":512},"999":{"error":"not_found"}}}}}},"422":{"description":"No ids","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/order-items/{id}/cancel":{"post":{"tags":["Order items"],"summary":"Request cancellation","operationId":"cancelItem","description":"Queued items are canceled and refunded immediately. Submitted items: only when the service supports cancellation (`cancel: true`); the refund is applied once the provider confirms. Scope: `manage`.","parameters":[{"name":"id","in":"path","required":true,"description":"Item id","schema":{"type":"integer"}}],"responses":{"200":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Already requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not cancelable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/order-items/{id}/refill":{"post":{"tags":["Order items"],"summary":"Request a refill","operationId":"refillItem","description":"Available for completed/partial items of services with `refill: true`, within `refill_days` of completion, at most once per 24 hours. Scope: `manage`.","parameters":[{"name":"id","in":"path","required":true,"description":"Item id","schema":{"type":"integer"}}],"responses":{"200":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"refill_id":{"type":"integer"},"message":{"type":"string"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Not eligible","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your API key, e.g. `ll_…`"}},"responses":{"Unauthorized":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests — see the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"insufficient_funds"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}},"Balance":{"type":"object","properties":{"balance":{"type":"string","example":"25.5000"},"currency":{"type":"string","example":"USD"}}},"PageMeta":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"},"pages":{"type":"integer"}}},"Category":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"platform":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"logo_url":{"type":"string","nullable":true,"description":"Absolute URL of the category logo, or null"},"service_count":{"type":"integer"}}},"Field":{"type":"object","description":"An input the service needs. Send it in the item using `key` as the property name.","properties":{"key":{"type":"string","example":"comments"},"label":{"type":"string"},"type":{"type":"string","enum":["url","quantity","text","textarea","lines","number","select"]},"required":{"type":"boolean"},"placeholder":{"type":"string"},"help":{"type":"string"},"quantity_source":{"type":"boolean","description":"When true the quantity equals the number of non-empty lines"},"pattern":{"type":"string","description":"Optional regular expression the value must match"},"shareable":{"type":"boolean"}}},"Service":{"type":"object","properties":{"id":{"type":"integer"},"category_id":{"type":"integer"},"category":{"type":"string"},"platform":{"type":"string","nullable":true},"logo_url":{"type":"string","nullable":true},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string","example":"default"},"rate":{"type":"string","description":"Your price per 1000 (or per order when pricing = per_order)","example":"0.9000"},"pricing":{"type":"string","enum":["per_1000","per_order"]},"currency":{"type":"string"},"min":{"type":"integer"},"max":{"type":"integer"},"refill":{"type":"boolean"},"refill_days":{"type":"integer","nullable":true},"cancel":{"type":"boolean"},"dripfeed":{"type":"boolean"},"average_time":{"type":"string","nullable":true},"fields":{"type":"array","items":{"$ref":"#/components/schemas/Field"}}}},"OrderItemInput":{"type":"object","required":["service_id"],"additionalProperties":{"type":"string"},"properties":{"service_id":{"type":"integer"},"link":{"type":"string","format":"uri","description":"http(s) link"},"quantity":{"type":"integer","description":"Per item. Omit for package / list-based services."},"runs":{"type":"integer","description":"Drip-feed runs (2-1000), only if the service supports drip-feed. Total = quantity × runs."},"interval":{"type":"integer","description":"Drip-feed interval in minutes"},"comments":{"type":"string","description":"Example service-specific field (newline separated)"}}},"CreateOrder":{"type":"object","properties":{"items":{"type":"array","minItems":1,"maxItems":10,"items":{"$ref":"#/components/schemas/OrderItemInput"}},"expected_total":{"type":"string","description":"Optional. If it differs from the server-computed total the order is rejected with 409 price_changed."}},"description":"Alternatively send a single item's properties at the top level (no `items` array)."},"HistoryEntry":{"type":"object","properties":{"from":{"type":"string","nullable":true},"to":{"type":"string"},"note":{"type":"string","nullable":true},"start_count":{"type":"integer","nullable":true},"remains":{"type":"integer","nullable":true},"at":{"type":"string","format":"date-time"}}},"OrderItem":{"type":"object","properties":{"id":{"type":"integer"},"group_id":{"type":"integer"},"service_id":{"type":"integer"},"service_name":{"type":"string"},"category":{"type":"string","nullable":true},"platform":{"type":"string","nullable":true},"logo_url":{"type":"string","nullable":true},"link":{"type":"string"},"quantity":{"type":"integer"},"runs":{"type":"integer","nullable":true},"interval":{"type":"integer","nullable":true},"total_quantity":{"type":"integer"},"fields":{"type":"object","additionalProperties":{"type":"string"}},"charge":{"type":"string"},"refunded":{"type":"string"},"status":{"type":"string","enum":["queued","submitting","pending","processing","in_progress","needs_review","completed","partial","canceled","failed"]},"start_count":{"type":"integer","nullable":true},"remains":{"type":"integer","nullable":true},"delivered":{"type":"integer","nullable":true,"description":"Only present when the provider reported real numbers"},"error":{"type":"string","nullable":true},"provider_order_id":{"type":"string","nullable":true,"description":"Order id at the upstream provider — quote it to support when asking about delivery"},"can_cancel":{"type":"boolean"},"cancel_requested":{"type":"boolean"},"can_refill":{"type":"boolean"},"submitted_at":{"type":"string","nullable":true,"format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"history":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/HistoryEntry"}}}},"Order":{"type":"object","properties":{"id":{"type":"integer","description":"Parent (group) order id"},"status":{"type":"string","enum":["pending","processing","completed","partial","canceled","failed"]},"source":{"type":"string","enum":["web","api"]},"item_count":{"type":"integer"},"currency":{"type":"string"},"total_charge":{"type":"string"},"total_refunded":{"type":"string"},"net_charge":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItem"}}}},"OrderResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Order"},"replayed":{"type":"boolean"},"balance":{"type":"string"}}},"ItemStatus":{"type":"object","properties":{"status":{"type":"string"},"start_count":{"type":"integer","nullable":true},"remains":{"type":"integer","nullable":true},"charge":{"type":"string"},"refunded":{"type":"string"},"group_id":{"type":"integer"},"error":{"type":"string"}}}}}}