{"openapi":"3.0.0","servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/sdbishop/AAiRA-Subledger-API/1.0.0"},{"description":"AAiRA Accounting Ledger API","url":"https://virtserver.swaggerhub.com/sdbishop/AAiRA-Accounting-Ledger-API/1.0.0"}],"info":{"description":"AAiRA Accounting Ledger API","version":"1.0.0","title":"AAiRA Accounting Ledger API","contact":{"email":"steve.bishop@aa.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"tags":[{"name":"admins","description":"Secured Admin-only calls"},{"name":"developers","description":"Operations available to regular developers"}],"paths":{"/accountingTransaction":{"get":{"tags":["queries"],"summary":"search revenue accounting ledger for accounting transaction(s)","operationId":"searchAccountingLedger","description":"Provide the revenue accounting transaction search criteria to locate accounting transaction(s) from the revenue accounting ledger","parameters":[{"in":"query","name":"accountingTransactionId","description":"pass an optional accountingTransactionId used to select an accounting transaction","required":false,"schema":{"type":"string"}},{"in":"query","name":"accountingTransactionUuid","description":"pass an optional uuid used to select an accounting transaction","required":false,"schema":{"type":"string"}},{"in":"query","name":"correlationId","description":"pass an optional correlationId used to select an accounting transaction","required":false,"schema":{"type":"string"}},{"in":"query","name":"skip","description":"number of records to skip for pagination","required":false,"schema":{"type":"integer","format":"int32","minimum":0}},{"in":"query","name":"limit","description":"maximum number of records to return","required":false,"schema":{"type":"integer","format":"int32","minimum":0,"maximum":50}}],"responses":{"200":{"description":"search results matching criteria","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountingTransaction"}}}}},"400":{"description":"bad input parameter"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"},"503":{"description":"Service Unavailable"}}},"post":{"tags":["commands"],"summary":"adds an AccountingTransaction to the accounting ledger","operationId":"addAccountingTransaction","description":"Adds an AccountingTransaction to the accounting ledger","responses":{"201":{"description":"accounting transaction inserted into accounting ledger"},"202":{"description":"accounting transaction accepted (queued) and future action will be taken"},"400":{"description":"invalid input, object invalid"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"409":{"description":"an existing item already exists"},"500":{"description":"Internal Server Error"},"503":{"description":"Service Unavailable"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingTransaction"}}},"description":"Accounting Transaction to insert into Revenue Accounting Ledger"}}}},"components":{"schemas":{"AccountingTransaction":{"description":"Accounting transaction type","type":"object","required":["transactionDate","totalAmount","entries"],"properties":{"id":{"description":"out: primary unique key","type":"string"},"uuid":{"description":"out: accounting transaction uuid","type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"correlationId":{"description":"in/out: accounting transaction correlation id - used to correlate this item with other entities","type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"transactionDate":{"description":"in: transaction date","type":"string","format":"date-time","example":"YYYY:MM::DDThh:mm:ss.sTZD"},"createdDate":{"description":"out: transaction creation date","type":"string","format":"date-time","example":"YYYY:MM::DDThh:mm:ss.sTZD"},"totalAmount":{"description":"in: accounting transaction total amount","type":"object","$ref":"#/components/schemas/AmountType"},"accountingTransactionEntries":{"description":"The collection of accounting transaction entries","type":"array","items":{"$ref":"#/components/schemas/AccountingTransactionEntry"}}}},"AccountingTransactionEntry":{"description":"Accounting transaction entry type","type":"object","required":["debitAmount","creditAmount","raAccountNumber"],"properties":{"id":{"description":"out: primary unique key","type":"string"},"uuid":{"description":"out: accounting transaction uuid created at time of ledger","type":"string","format":"uuid"},"correlationId":{"description":"in/out: accounting transaction entry correlation id - used to correlate this item with other external entities","type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"debitAmount":{"description":"in: transaction entry debit amount","type":"object","$ref":"#/components/schemas/AmountType"},"creditAmount":{"description":"in: transaction entry credit amount","type":"object","$ref":"#/components/schemas/AmountType"},"raAccountNumber":{"description":"in: revenue accounting-chart-of-accounts Account Number (can be alias to the GL Account Number)","type":"string"}}},"AmountType":{"description":"Number of monetary units specified in a currency. The decimal can either appear directly in the value or specified in decimal","type":"object","required":["value","currencyCode"],"properties":{"value":{"type":"string","example":"15.00"},"currencyCode":{"type":"string","enum":["USD"],"example":"USD"},"decimal":{"type":"integer","example":0}}}}}}