# API Endpoints

{% hint style="warning" %}
Few important points regarding the date and amount fields in the request payload:

1. Supported date formats are DD/MM/YYYY, YYYYMMDD or YYYY-MM-DD
2. Debit amounts are indicated with a negative (-) sign
   {% endhint %}

## Send banking transaction data for insights analysis

> This endpoint is provided to allows customers to send MogoPlus banking data in a single payload. MogoPlus does not set bounds on the data submitted, so API consumers can submit the data pertinent to their needs. If a given dataset is not required for insights analysis - for example, balances is not required - the data can simply be omitted. The minimum requirements will, however is account and transaction data, which must be supplied for meaningful analysis to take place. API consumers can submit data from multiple applicants or across multiple accounts in a single request.<br>

```json
{"openapi":"3.0.3","info":{"title":"MogoPlus CaaS API","version":"0.0.1"},"tags":[{"name":"Banking Data","description":"Banking-related data, including balances and transactions"}],"servers":[{"description":"PROD Server","url":"https://console.live.mogoplus.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"applicantsData":{"type":"array","items":{"$ref":"#/components/schemas/applicationData"}},"applicationData":{"type":"object","properties":{"applicant":{"$ref":"#/components/schemas/applicantCreateProperties"},"bankingTransactionData":{"type":"object","properties":{"institutions":{"type":"array","items":{"type":"object","properties":{"institutionName":{"type":"string"},"accounts":{"type":"array","items":{"type":"object","properties":{"accountNumber":{"type":"string"},"transactions":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"amount":{"type":"number"},"date":{"type":"string"}}}}}}}}}}}}}},"applicantCreateProperties":{"description":"Properties of the banking customer not available in input data","type":"object","properties":{"firstName":{"description":"First name of applicant","type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z]+(?: |-|)[a-zA-Z]+$"},"lastName":{"description":"Last name of applicant","type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z]+(?: |-|)[a-zA-Z]+$"},"employerNames":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"description":"Employers Name list of a applicant"}},"additionalProperties":false},"insightsIdOrderType":{"description":"Insights ID object","type":"object","required":["insightsId"],"properties":{"insightsId":{"$ref":"#/components/schemas/insightsId"},"insightsReport":{"$ref":"#/components/schemas/insightsIdWithOrders"}}},"insightsId":{"description":"Insights ID object","type":"object","required":["insightsId"],"properties":{"insightsId":{"$ref":"#/components/schemas/insightsIdType"}}},"insightsIdType":{"$ref":"#/components/schemas/uuidV4"},"uuidV4":{"description":"A valid V4 UUID","type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$"},"insightsIdWithOrders":{"description":"Orders associated with a insight record","type":"object","properties":{"subscriptionId":{"type":"string"},"report":{"description":"The URL for this data insight","type":"string","pattern":"^http(s|):\\/\\/.*\\/banking-data-insights\\/.+$"}}},"httpErrorResponse":{"type":"object","required":["code","detail","title"],"properties":{"code":{"description":"The code of the error encountered. Where the error is specific to the respondent, an application-specific error code, expressed as a string value. If the error is application-specific, the URN code that the specific error extends must be provided in the meta object. Otherwise, the value is the error code URN.","type":"string"},"title":{"description":"A short, human-readable summary of the problem that MUST NOT change from occurrence to occurrence of the problem represented by the error code.","type":"string"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"}}}},"responses":{"badRequest":{"description":"Invalid input or arguments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"unauthorized":{"description":"Invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"forbidden":{"description":"Credentials are valid but access to the resource is forbidden due to access controls. Access must be granted for this request to succeed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"methodNotSupported":{"description":"Unsupported HTTP method sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"notAcceptable":{"description":"Requested content type is not supported by this API","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"unprocessableEntity":{"description":"Request cannot be processed by the API as the content contains errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"tooManyRequests":{"description":"The API has receive too many requests from the client and is rate-limiting further requests based on published limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"internalServerError":{"description":"API encountered an error processing the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"serviceUnavailable":{"description":"The API is not currently available due a transient network error, internal service error or planned outage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}}}},"paths":{"/api/application":{"post":{"summary":"Send banking transaction data for insights analysis","description":"This endpoint is provided to allows customers to send MogoPlus banking data in a single payload. MogoPlus does not set bounds on the data submitted, so API consumers can submit the data pertinent to their needs. If a given dataset is not required for insights analysis - for example, balances is not required - the data can simply be omitted. The minimum requirements will, however is account and transaction data, which must be supplied for meaningful analysis to take place. API consumers can submit data from multiple applicants or across multiple accounts in a single request.\n","tags":["Banking Data"],"requestBody":{"description":"Account data supplied by customer, relating to one-or-more accounts held by the customer","content":{"application/json":{"schema":{"description":"Banking data supplied by customer participant","type":"object","properties":{"applicantsData":{"$ref":"#/components/schemas/applicantsData"}},"additionalProperties":false}}}},"responses":{"201":{"description":"Data received successfully and accepted for processing The `insightsId` value is provided for tracking the insights request and retrieving the request from `/banking-data-insights`.\n","content":{"application/json":{"schema":{"type":"object","required":["data","links"],"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/insightsIdOrderType"}]},"links":{"type":"object","required":["self"],"properties":{"self":{"description":"The URL for this data insight","type":"string","pattern":"^http(s|):\\/\\/.*\\/application\\/.+$"}}}}}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"405":{"$ref":"#/components/responses/methodNotSupported"},"406":{"$ref":"#/components/responses/notAcceptable"},"422":{"$ref":"#/components/responses/unprocessableEntity"},"429":{"$ref":"#/components/responses/tooManyRequests"},"500":{"$ref":"#/components/responses/internalServerError"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Retrieve the banking data insights report

> This endpoint provides the insights report. If processing is ongoing the endpoint will return a \`204\` to indicate no data is available.<br>

```json
{"openapi":"3.0.3","info":{"title":"MogoPlus CaaS API","version":"0.0.1"},"tags":[{"name":"Banking Data","description":"Banking-related data, including balances and transactions"}],"servers":[{"description":"PROD Server","url":"https://console.live.mogoplus.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"applicationId":{"name":"applicationId","in":"path","description":"The identifier for a given application submission and the resultant insights aggregated reports","required":true,"schema":{"$ref":"#/components/schemas/resourceId"}}},"schemas":{"resourceId":{"$ref":"#/components/schemas/uuidV4"},"uuidV4":{"description":"A valid V4 UUID","type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$"},"bankingDataInsightsReport":{"description":"Provides both the state of processing and the response data. Whilst processing is ongoing the `data` object will be omitted.\n","type":"object","required":["insightsHeader","reportString"],"properties":{"insightsHeader":{"type":"object","properties":{"insightsId":{"$ref":"#/components/schemas/insightsIdType"},"insightsPublishDate":{"type":"string"},"clientId":{"type":"string"},"clientName":{"type":"string"},"reports":{"type":"array","items":{"$ref":"#/components/schemas/insightsDataforOrder"}}}},"reportString":{"type":"string"}}},"insightsIdType":{"$ref":"#/components/schemas/uuidV4"},"insightsDataforOrder":{"type":"object","properties":{"reportHeader":{"$ref":"#/components/schemas/reportHeader"},"combinedSummary":{"$ref":"#/components/schemas/combinedSummary"},"applicantSummary":{"$ref":"#/components/schemas/applicantSummary"},"incomeSummary":{"$ref":"#/components/schemas/incomeSummary"}}},"reportHeader":{"type":"object","properties":{"reportId":{"type":"string"},"reportPublishDate":{"type":"string"},"applicationType":{"type":"string"},"numberOfApplicants":{"type":"number"},"applicants":{"type":"array","items":{"type":"object","properties":{"applicantId":{"type":"string"},"applicantName":{"type":"string"}}}}}},"combinedSummary":{"type":"object","description":"aggregated summary data for all applicants in this application","properties":{"combinedNumberOfInstitutions":{"type":"number"},"combinedNumberOfAccounts":{"type":"number"},"combinedNumberOfTransactions":{"type":"number"},"currency":{"type":"string"},"combinedTotalSummary":{"$ref":"#/components/schemas/totalSummary"},"combinedCategoryGroupSummary":{"type":"object","properties":{"combinedCategoryGroups":{"$ref":"#/components/schemas/categoryGroups"}}},"combinedCategorySummary":{"type":"object","properties":{"combined":{"$ref":"#/components/schemas/categories"}}},"netMonthlyPosition":{"type":"object","additionalProperties":{"type":"string"}},"combinedIncomeInsights":{"type":"object","properties":{"basicIncomeInsights":{"$ref":"#/components/schemas/basicIncomeInsights"}}}}},"totalSummary":{"type":"object","properties":{"credit":{"type":"object","properties":{"sumAmount":{"type":"number"},"numberOfTransactions":{"type":"number"},"Average":{"type":"number"}}},"debit":{"type":"object","properties":{"sumAmount":{"type":"number"},"numberOfTransactions":{"type":"number"},"Average":{"type":"number"}}}}},"categoryGroups":{"type":"array","items":{"$ref":"#/components/schemas/categoryGroupItem"}},"categoryGroupItem":{"type":"object","properties":{"categoryGroup":{"type":"string"},"categoryGroupDescription":{"type":"string"},"debit":{"type":"object","properties":{"sumAmount":{"type":"number"},"numberOfTransactions":{"type":"number"},"Average":{"type":"number"}}},"credit":{"type":"object","properties":{"sumAmount":{"type":"number"},"numberOfTransactions":{"type":"number"},"Average":{"type":"number"}}}}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/categoryItem"}},"categoryItem":{"type":"object","properties":{"categoryCode":{"type":"string"},"categoryCodeDescription":{"type":"string"},"credit":{"type":"object","properties":{"sumAmount":{"type":"number"},"numberOfTransactions":{"type":"number"},"Average":{"type":"number"}}},"debit":{"type":"object","properties":{"sumAmount":{"type":"number"},"numberOfTransactions":{"type":"number"},"Average":{"type":"number"}}}}},"basicIncomeInsights":{"type":"object","properties":{"currency":{"type":"string"},"income":{"type":"object","properties":{"sumAmount":{"type":"number"},"numberOfTransactions":{"type":"number"},"averageMonthly":{"type":"number"}}},"incomeBuckets":{"type":"object","additionalProperties":{"type":"string"}}}},"applicantSummary":{"type":"object","description":"summary data for applicants","properties":{"applicants":{"type":"array","items":{"$ref":"#/components/schemas/applicantSummaryData"}}}},"applicantSummaryData":{"type":"object","properties":{"applicantName":{"type":"string"},"numberOfInstitutions":{"type":"number"},"numberOfAccounts":{"type":"number"},"numberOfTransactions":{"type":"number"},"currency":{"type":"string"},"applicantTotalSummary":{"$ref":"#/components/schemas/totalSummary"},"applicantCategoryGroupSummary":{"type":"object","properties":{"applicantCategoryGroups":{"$ref":"#/components/schemas/categoryGroups"}}},"applicantCategorySummary":{"type":"object","properties":{"categories":{"$ref":"#/components/schemas/categories"}}},"applicantDetailedTransaction":{"type":"object","properties":{"institutions":{"type":"array","items":{"$ref":"#/components/schemas/institution"}}}},"netMonthlyPosition":{"type":"object","additionalProperties":{"type":"string"}},"categoryReview":{"type":"array","items":{"type":"object","properties":{"categoryCode":{"type":"string"},"categoryCodeDescription":{"type":"string"},"credit":{"type":"object","properties":{"sumAmount":{"type":"number"},"numberOfTransactions":{"type":"number"},"Average":{"type":"number"}}},"debit":{"type":"object","properties":{"sumAmount":{"type":"number"},"numberOfTransactions":{"type":"number"},"Average":{"type":"number"}}},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/transaction"}}}}}}},"institution":{"type":"object","properties":{"institutionId":{"type":"string"},"institutionName":{"type":"string"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/account"}}}},"account":{"type":"object","properties":{"accountNumber":{"type":"string"},"accountName":{"type":"string"},"currentBalance":{"type":"number"},"availableBalance":{"type":"number"},"creditLimit":{"type":"number"},"numberOfTransactionsInTotal":{"type":"number"},"numberOfTransactionsCategorised":{"type":"number"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/transaction"}}}},"transaction":{"type":"object","properties":{"transactionId":{"type":"string"},"transactionDate":{"type":"string"},"transactionCategoryGroup":{"type":"string"},"transactionCategoryCode":{"type":"string"},"transactionDescription":{"type":"string"},"transactionAmount":{"type":"number"},"transactionCurrency":{"type":"string"}}},"incomeSummary":{"type":"object","description":"summary data of income for applicants","properties":{"applicants":{"type":"array","items":{"$ref":"#/components/schemas/incomeSummaryData"}}}},"incomeSummaryData":{"type":"object","properties":{"applicantName":{"type":"string"},"employmentInsights":{"type":"array","items":{"type":"object","properties":{"declaredEmployerName":{"type":"string"},"employerNameVerified":{"type":"boolean"},"latestEmployerVerifiedSalaryDate":{"type":"string"},"latestEmployerVerifiedSalaryAmount":{"type":"number"}}}},"IncomeInsights":{"type":"object","properties":{"basicIncomeInsights":{"$ref":"#/components/schemas/basicIncomeInsights"},"inferentialIncomeInsights":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"employer":{"type":"string"},"recency":{"type":"object","properties":{"daysInPriorMonth":{"type":"number"},"numberOfTransactionsInPriorMonth":{"type":"number"}}},"regularity":{"type":"object","properties":{"numberOfTransactions":{"type":"number"},"incomeDates":{"type":"array","items":{"type":"string"}},"statisticsOfDayIntervals":{"type":"object","properties":{"max":{"type":"number"},"min":{"type":"number"},"mean":{"type":"number"},"median":{"type":"number"},"mode":{"type":"number"},"standardDeviation":{"type":"number"}}}}},"reliability":{"type":"object","properties":{"numberOfTransactions":{"type":"number"},"incomeAmounts":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"amount":{"type":"number"}}}},"statisticsOfSalaryAmount":{"type":"object","properties":{"average":{"type":"number"},"median":{"type":"number"},"mode":{"type":"number"},"range":{"type":"number"},"standardDeviation":{"type":"number"}}}}}}}}}}}},"httpErrorResponse":{"type":"object","required":["code","detail","title"],"properties":{"code":{"description":"The code of the error encountered. Where the error is specific to the respondent, an application-specific error code, expressed as a string value. If the error is application-specific, the URN code that the specific error extends must be provided in the meta object. Otherwise, the value is the error code URN.","type":"string"},"title":{"description":"A short, human-readable summary of the problem that MUST NOT change from occurrence to occurrence of the problem represented by the error code.","type":"string"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"}}}},"responses":{"partialContent":{"description":"partial response content, meaning inprogress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"badRequest":{"description":"Invalid input or arguments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"unauthorized":{"description":"Invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"forbidden":{"description":"Credentials are valid but access to the resource is forbidden due to access controls. Access must be granted for this request to succeed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"methodNotSupported":{"description":"Unsupported HTTP method sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"notAcceptable":{"description":"Requested content type is not supported by this API","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"tooManyRequests":{"description":"The API has receive too many requests from the client and is rate-limiting further requests based on published limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"internalServerError":{"description":"API encountered an error processing the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}},"serviceUnavailable":{"description":"The API is not currently available due a transient network error, internal service error or planned outage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/httpErrorResponse"}}}}}},"paths":{"/api/application/{applicationId}":{"get":{"summary":"Retrieve the banking data insights report","description":"This endpoint provides the insights report. If processing is ongoing the endpoint will return a `204` to indicate no data is available.\n","operationId":"RetrieveBankingDataInsights","tags":["Banking Data"],"parameters":[{"$ref":"#/components/parameters/applicationId"}],"responses":{"200":{"description":"The banking data insights report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/bankingDataInsightsReport"}}}},"206":{"$ref":"#/components/responses/partialContent"},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"405":{"$ref":"#/components/responses/methodNotSupported"},"406":{"$ref":"#/components/responses/notAcceptable"},"429":{"$ref":"#/components/responses/tooManyRequests"},"500":{"$ref":"#/components/responses/internalServerError"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mogoplus.ai/sandbox/api-reference/api-endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
