{"openapi":"3.1.0","info":{"title":"Crowdlume Reseller API","version":"1.0.0","description":"Account-priced catalog, prepaid ordering, and public delivery tracking for approved Crowdlume resellers."},"servers":[{"url":"https://crowdlume.com/api/v1"}],"security":[{"bearerAuth":[]}],"paths":{"/services":{"get":{"operationId":"listServices","summary":"List reseller services and prices","responses":{"200":{"description":"Service catalog"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"401":{"description":"Invalid or inactive API key"},"403":{"description":"API key scope does not allow this operation"},"429":{"description":"Rate limit exceeded"}}}},"/services/{service_id}":{"get":{"operationId":"getService","summary":"Get one reseller service","parameters":[{"in":"path","name":"service_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Service"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"401":{"description":"Invalid or inactive API key"},"403":{"description":"API key scope does not allow this operation"},"404":{"description":"Service not found"},"429":{"description":"Rate limit exceeded"}}}},"/balance":{"get":{"operationId":"getBalance","summary":"Get available prepaid balance","responses":{"200":{"description":"USD wallet balance"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"401":{"description":"Invalid or inactive API key"},"403":{"description":"API key scope does not allow this operation"},"429":{"description":"Rate limit exceeded"}}}},"/orders":{"get":{"operationId":"listOrders","summary":"List reseller orders","parameters":[{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated orders"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"401":{"description":"Invalid or inactive API key"},"403":{"description":"API key scope does not allow this operation"},"429":{"description":"Rate limit exceeded"}}},"post":{"operationId":"createOrder","summary":"Create a prepaid reseller order","description":"Spends the authenticated reseller account's Crowdlume wallet balance. client_order_id provides idempotency. For automated services, use the live minimum and maximum returned by the service catalog.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["service_id","target_url","client_order_id"],"properties":{"service_id":{"type":"string"},"target_url":{"type":"string","format":"uri"},"client_order_id":{"type":"string","minLength":8,"maxLength":80},"quantity":{"type":"integer","minimum":1,"maximum":2000000000},"package_id":{"type":"string","pattern":"^pkg_[0-9]{2}$"}},"oneOf":[{"required":["quantity"],"not":{"required":["package_id"]}},{"required":["package_id"],"not":{"required":["quantity"]}}]}}}},"responses":{"201":{"description":"Crowdlume order","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"duplicate":{"type":"boolean"},"data":{"type":"object","required":["id","client_order_id","service","amount_cents","payment_status","status","progress","created_at"],"properties":{"id":{"type":"string","examples":["cl_01abc…"]},"client_order_id":{"type":"string"},"service":{"type":"string"},"target_url":{"type":"string","format":"uri"},"amount_cents":{"type":"integer"},"amount":{"type":"string","examples":["$4.95"]},"payment_status":{"type":"string","enum":["paid","refunded","manual_review"]},"status":{"type":"string","examples":["Queued","In progress","Completed"]},"published_at":{"type":["string","null"],"format":"date-time"},"expected_completion_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"progress":{"type":"object","required":["current","target"],"properties":{"current":{"type":"integer"},"target":{"type":"integer","maximum":2000000000}}},"created_at":{"type":"string","format":"date-time"}}},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"401":{"description":"Invalid or inactive API key"},"402":{"description":"Insufficient balance"},"403":{"description":"API key scope does not allow this operation"},"409":{"description":"Idempotency conflict or temporarily unavailable service"},"429":{"description":"Rate limit exceeded"}}}},"/orders/{order_id}":{"get":{"operationId":"getOrder","summary":"Get public order progress","parameters":[{"in":"path","name":"order_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Crowdlume order","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"duplicate":{"type":"boolean"},"data":{"type":"object","required":["id","client_order_id","service","amount_cents","payment_status","status","progress","created_at"],"properties":{"id":{"type":"string","examples":["cl_01abc…"]},"client_order_id":{"type":"string"},"service":{"type":"string"},"target_url":{"type":"string","format":"uri"},"amount_cents":{"type":"integer"},"amount":{"type":"string","examples":["$4.95"]},"payment_status":{"type":"string","enum":["paid","refunded","manual_review"]},"status":{"type":"string","examples":["Queued","In progress","Completed"]},"published_at":{"type":["string","null"],"format":"date-time"},"expected_completion_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"progress":{"type":"object","required":["current","target"],"properties":{"current":{"type":"integer"},"target":{"type":"integer","maximum":2000000000}}},"created_at":{"type":"string","format":"date-time"}}},"request_id":{"type":"string"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"request_id":{"type":"string"}}}}}},"401":{"description":"Invalid or inactive API key"},"403":{"description":"API key scope does not allow this operation"},"404":{"description":"Order not found"},"429":{"description":"Rate limit exceeded"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Crowdlume API key"}},"schemas":{"Order":{"type":"object","required":["id","client_order_id","service","amount_cents","payment_status","status","progress","created_at"],"properties":{"id":{"type":"string","examples":["cl_01abc…"]},"client_order_id":{"type":"string"},"service":{"type":"string"},"target_url":{"type":"string","format":"uri"},"amount_cents":{"type":"integer"},"amount":{"type":"string","examples":["$4.95"]},"payment_status":{"type":"string","enum":["paid","refunded","manual_review"]},"status":{"type":"string","examples":["Queued","In progress","Completed"]},"published_at":{"type":["string","null"],"format":"date-time"},"expected_completion_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"progress":{"type":"object","required":["current","target"],"properties":{"current":{"type":"integer"},"target":{"type":"integer","maximum":2000000000}}},"created_at":{"type":"string","format":"date-time"}}},"Error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}