{"openapi":"3.1.0","info":{"title":"Proledger API","summary":"The Proledger API is a RESTful set of HTTP endpoints that allow you to create new records","description":"\nProledger API helps you do awesome stuff. 🚀\n\n## Records\n\nYou can **create new records**.\n","termsOfService":"https://pro-ledger.com/terms-of-use","contact":{"name":"Customer support","url":"https://pro-ledger.com/contact-us/","email":"admin@pro-ledger.com"},"version":"0.0.1"},"paths":{"/":{"get":{"summary":"Hello World","operationId":"hello_world__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/check_api_key":{"get":{"tags":["auth"],"summary":"Check Api Key","description":"This endpoint serves as a validation mechanism for API keys, allowing clients to verify the authenticity and validity of the provided API key. The primary purpose is to ensure secure access to protected resources and maintain the integrity of the authentication process.","operationId":"check_api_key_api_v1_auth_check_api_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRequestResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/record/get_accounts":{"get":{"tags":["record"],"summary":"Get Accounts","description":"Get accounts setup information","operationId":"get_accounts_api_v1_record_get_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ISetupResponse"},"type":"array","title":"Response Get Accounts Api V1 Record Get Accounts Get"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/record/get_income_categories":{"get":{"tags":["record"],"summary":"Get Income Categories","description":"Get categories setup information","operationId":"get_income_categories_api_v1_record_get_income_categories_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"transactionType","in":"query","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/ITransactionTypeEnum"}],"default":"Income","title":"Transactiontype"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ISetupResponse"},"title":"Response Get Income Categories Api V1 Record Get Income Categories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/record/get_categories":{"get":{"tags":["record"],"summary":"Get Categories","description":"Get categories setup information","operationId":"get_categories_api_v1_record_get_categories_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"transactionType","in":"query","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/ITransactionTypeEnum"}],"default":"Income","title":"Transactiontype"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ISetupResponse"},"title":"Response Get Categories Api V1 Record Get Categories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/record/get_subcategories":{"get":{"tags":["record"],"summary":"Get Subcategories","description":"Get expenses subcategories setup information","operationId":"get_subcategories_api_v1_record_get_subcategories_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"transactionType","in":"query","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/ITransactionTypeEnum"}],"default":"Income","title":"Transactiontype"}},{"name":"category","in":"query","required":true,"schema":{"type":"string","title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ISetupResponse"},"title":"Response Get Subcategories Api V1 Record Get Subcategories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/record/get_classes":{"get":{"tags":["record"],"summary":"Get Classes","description":"Get classes setup information","operationId":"get_classes_api_v1_record_get_classes_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"transactionType","in":"query","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/ITransactionTypeEnum"}],"default":"Income","title":"Transactiontype"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ISetupResponse"},"title":"Response Get Classes Api V1 Record Get Classes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/record/get_tax_collection":{"get":{"tags":["record"],"summary":"Get Tax Collection","description":"Get tax collection setup information","operationId":"get_tax_collection_api_v1_record_get_tax_collection_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ISetupResponse"},"type":"array","title":"Response Get Tax Collection Api V1 Record Get Tax Collection Get"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/record/create_new_record":{"post":{"tags":["record"],"summary":"Create New Record","description":"Create a new record in the Pro Ledger platform.","operationId":"create_new_record_api_v1_record_create_new_record_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"transactionType","in":"query","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/ITransactionTypeEnum"}],"default":"Income","title":"Transactiontype"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRecordIntegration"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRecordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IRecordIntegration":{"properties":{"rec":{"$ref":"#/components/schemas/RecEnum"},"unit":{"allOf":[{"$ref":"#/components/schemas/UnitEnum"}],"default":"Dollars"},"class":{"type":"string","title":"Class"},"source":{"type":"string","title":"Source"},"category":{"type":"string","title":"Category"},"subcategory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subcategory"},"description":{"type":"string","title":"Description","default":""},"total":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Total"},"taxes":{"items":{"$ref":"#/components/schemas/ITaxInputTypeEnum"},"type":"array","title":"Taxes","default":[]},"account":{"type":"string","title":"Account"},"taxIncluded":{"$ref":"#/components/schemas/ITaxIncluded"}},"type":"object","required":["rec","class","source","category","total","account","taxIncluded"],"title":"IRecordIntegration"},"IRecordResponse":{"properties":{"message":{"type":"string","title":"Message"},"data":{"title":"Data"}},"type":"object","required":["message","data"],"title":"IRecordResponse"},"IRequestResponse":{"properties":{"message":{"type":"string","title":"Message"},"data":{"title":"Data"}},"type":"object","required":["message","data"],"title":"IRequestResponse"},"ISetupResponse":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"id":{"anyOf":[{"type":"string"},{"type":"integer"}],"title":"Id"}},"type":"object","required":["key","label","id"],"title":"ISetupResponse"},"ITaxIncluded":{"type":"string","enum":["Incl. Tax","Excl. Tax"],"title":"ITaxIncluded"},"ITaxInputTypeEnum":{"type":"string","enum":["default_tax","other_tax"],"title":"ITaxInputTypeEnum"},"ITransactionTypeEnum":{"type":"string","enum":["Income","Expense","Transfer","Cost of Goods Sold"],"title":"ITransactionTypeEnum"},"RecEnum":{"type":"string","enum":["Select","Done","No Receipt","Foreign $$"],"title":"RecEnum"},"UnitEnum":{"type":"string","enum":["Cents","Dollars"],"title":"UnitEnum"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"tags":[{"name":"auth","description":"Operations to check if a token is valid"},{"name":"record","description":"Operations with records. The **create** logic is here."}]}