{"openapi":"3.0.1","info":{"title":"AIS Developer API","version":"1.0","description":"Every request must have the header \"Content-Type: application/json\" otherwise you'll receive a \"404 NotFound\".<br>\nAfter logging in, it is necessary to add the provided token as a header too: \"Authorization: Bearer [token]\"                         "},"servers":[{"url":"https://api.aisgmbh.at/developer/"}],"paths":{"/login":{"post":{"description":"Login to the API","tags":["Auth"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string"},"email":{"type":"string"},"prn":{"type":"integer"}}},"examples":{"0":{"value":"{\n    \"email\":\"testas1@gmail.com\",\n    \"password\":\"testas1\",\n    \"prn\": 5000001\n}"}}}}},"responses":{"200":{"description":"Successfully authenticated","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}}},"examples":{"0":{"value":"{\"token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE1NzkxNjQ5MzksImV4cCI6MTU3OTIwMDkzOSwicm9sZXMiOltdLCJlbWFpbCI6InRlc3QxQGdtYWlsLmNvbSJ9.BpCJ_nwrI19F2JZu0ejZNGux-7Up_D6-9LvAtq3uOXsypv10T4DWvZTmg1gwz98Ro8nwYH9KbwSkIsnkGDi-JVi_8xZkQL561WDdNFDI6psZpsHqrk2CXQCCPI_oXpnA0aWKSuy8ZOo0iGRDlsD4PzSCJpdW44t_deaEITpFB08frIs7IB1Pv1qyJOtMnUGIZT2wFEmLQbIQxyhgKFAjPLKvkVYuKOaV4iBXPV_WusSjwVb93mpiXptclNAMgdMIAckKbCOLbSwNA0vVp35jbgDgn9Ujv4qmk983LBZzpgkWY496l8-RfPZ59Bltwek_npb0t66UVruwTpC_6fYpnmAhIsZukTLfy6KQEKpnGMOwYV2FhlDBigFs_3FeQHPHfbdElVQScoeuaE7R2Szq6EjuUueESIm_b-VOvVPbv-B3mY5bl1K0UGZ4dq3dq8ypE8IqCYxHOzfietBfLH-wKOWtzohD5dTlCHAP77yV_CUvTg6W5-rLkQEGNjhdNMCjHWXz3WEvEZ4c6wQJ2Ou6gi6n477DLrlr5YNpFWEtjDYMQ8MzAumZNF28Rx2aZjgfQIH5rj-0kMusp-83fsY5NY_ox_c_UUQGsqXlrO8H7Q6MTny9u2HXiuT3Bxdhy9Nflg4V2VzEQuGPTr3D51InbgT5Qpk1ny8hFxwYgsjF9pU\"}"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}},"examples":{"0":{"value":"{\"code\":401,\"message\":\"Invalid credentials.\"}"}}}}}}}},"/products/list":{"get":{"security":[{"bearerAuth":[]}],"tags":["Products"],"description":"Lists all assigned products for the current user","responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"example":[{"id":"c93ab70e-3ca6-11ec-8084-0242ac120002","name":"50SLove"},{"id":"c93adb5f-3ca6-11ec-8084-0242ac120002","name":"TheCasualArcade"}]}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"object"}}},"examples":{"error":{"value":"{\n  \"errors\": {\n    \"32\": \"Database error occured\"\n  }\n}"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/sites/list":{"get":{"security":[{"bearerAuth":[]}],"tags":["Sites"],"description":"Lists all assigned sites for the current user","responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Site"}},"example":[{"id":"c3bee943b-a6bc-11ec-8373-02bfeb4c8d80","name":"www.50slove.at"},{"id":"3bf0b112-a6bc-11ec-8373-02bfeb4c8d80","name":"www.thecasualarcade.at"}]}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"object"}}},"examples":{"error":{"value":"{\n  \"errors\": {\n    \"32\": \"Database error occured\"\n  }\n}"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/email/check_exists/{id}":{"get":{"security":[{"bearerAuth":[]}],"tags":["Email"],"description":"Check if an e-mail already exists for the given product","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"\"Product ID which can be retrieved from /products/list If ommited, search will run over all assigned products\"\n"},{"name":"email","in":"query","required":true,"schema":{"type":"string"},"description":"\"E-Mail to lookup\"\n"},{"name":"siteId","in":"query","schema":{"type":"string"},"description":"\"Site ID to check. If ommited, all assigned sites get checked\"\n"}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean"}}},"examples":{"email exists":{"value":"{\n  \"exists\": true\n}"},"email does not exist":{"value":"{\n    \"exists\": false\n}"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"object"}}},"examples":{"error":{"value":"{\n  \"errors\": {\n    \"32\": \"Database error occured\"\n  }\n}"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/email/check_exists":{"get":{"security":[{"bearerAuth":[]}],"tags":["Email"],"description":"Check if an e-mail already exists","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string"},"description":"E-Mail to be checked for existance"},{"name":"siteId","in":"query","schema":{"type":"string"},"description":"\"Site ID to check. If ommited, all assigned sites get checked\"\n"}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"boolean"}}},"examples":{"email exists":{"value":"{\n  \"exists\": true\n}"},"email does not exist":{"value":"{\n    \"exists\": false\n}"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"object"}}},"examples":{"error":{"value":"{\n  \"errors\": {\n    \"32\": \"Database error occured\"\n  }\n}"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}},"/email/register":{"post":{"security":[{"bearerAuth":[]}],"tags":["Email"],"description":"Register a new user","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email","password","country","locale","gender","siteId"],"properties":{"email":{"type":"string"},"password":{"type":"string","minLength":2,"maxLength":255},"country":{"type":"string","maxLength":2,"minLength":2,"description":"ISO-3166-2 country code"},"locale":{"type":"string","maxLength":2,"minLength":2,"description":"ISO-639-1 language code for the user"},"gender":{"type":"string","enum":["male","female"],"description":"Customer gender"},"siteId":{"type":"string","description":"Can be retrieved via /sites/list"},"a_bid":{"type":"string","description":"PostAffiliatePro (PAP) Banner ID (if available)"},"data1":{"type":"string","description":"Free text field which gets send to PAP"},"data2":{"type":"string","description":"Free text field which gets send to PAP"}}},"example":{"email":"test@50slove.com","password":"123456","country":"at","locale":"de","gender":"male","siteId":"3d68db53-3cb2-11ec-8084-0242ac120002"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","properties":{"registered":{"type":"boolean"}}},"example":{"registered":true}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"exists":{"type":"object"}}},"examples":{"error":{"value":"{\n  \"errors\": {\n    \"32\": \"Database error occured\"\n  }\n}"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Product":{"type":"object","description":"Returned by products/list","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"Site":{"type":"object","description":"Returned by sites/list","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"UnauthorizedError":{"type":"object","description":"JWT Token not found","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}}}