--- swagger: "2.0" info: x-ibm-name: partner-advance-against-salary-api title: Partner Advance Against Salary API version: 1.0.1 description: "This API verifies that the customer is eligible for applying for advance against salary and returns a request_id on successful verification. The response from the CheckAdvanceEligibility operation should be used to construct a pre confirmation page so that customer can review the loan request before confirming. On confirmation, the /advance_against_salary/{aas_request_id} endpoint should be called where {aas_request_id} is the aas_request_id returned by the CheckAdvanceEligibility operation.\n\n\tVersion 1.0.1 :\n\n\t\n - Updated the path <i>/customers/{customer_id_type}:{customer_id}/advance_against_salary</i> and <i>/customers/{customer_id_type}:{customer_id}/advance_against_salary/{aas_request_id}/aas_status</i>\n \ - so that the API only accepts masked customer id.\n \n <h3>OAuth Metadata details</h3>\nOAuth metadata parameter to be passed at the time of generating access token using <a href="/partner-authentication">Partner Authentication API</a> for client credential grant type is mentioned below. For information on OAuth Metadata, see <a href="/security/#oauth-metadata-partnerauth">About the OAuth Metadata</a>\n<p class="oauth_metadata">oauth_metadata.emirates_id : {emirates_id} OR oauth_metadata.account_id : {account_id} </p>" contact: name: API Developer email: apideveloper@rakbank.ae name: "" schemes: - https host: sandboxapi.rakbank.ae basePath: /v1 consumes: - application/json produces: - application/json securityDefinitions: oauth: type: oauth2 description: "" flow: application scopes: advance_against_salary: "" tokenUrl: https://sandboxapi.rakbank.ae/rb/api/oauth2/token clientIdHeader: type: apiKey in: header name: X-IBM-Client-Id security: - oauth: - advance_against_salary clientIdHeader: [] x-ibm-configuration: testable: true enforced: true phase: realized paths: /customers/{customer_id_type}:{customer_id}/advance_against_salary: post: responses: 401: description: Unauthorized schema: $ref: '#/definitions/error_response' 422: description: Invalid/Unprocessable Entity schema: $ref: '#/definitions/error_response' 500: description: Internal Server Error schema: $ref: '#/definitions/error_response' operationId: CheckAdvanceEligibility description: This API verifies that the customer is eligible for applying for advance against salary and returns aas_request_id on successful verification. The response from this resource should be used to construct a pre confirmation page so that customer can review the AAS request before confirming. summary: API for checking customer eligibility prior to confirmation of the AAS request parameters: - name: advance_against_salary required: true in: body schema: $ref: '#/definitions/advance_against_salary' description: request with amount and currency along with customer last three months salary details for verification parameters: - $ref: '#/parameters/MsgId' - name: customer_id type: string maxLength: 20 required: true in: path description: Customer Id of the customer who is requesting for advance against salary - name: customer_id_type type: string enum: - Emirates_ID required: true in: path description: Type of the Customer Id of the customer who is requesting for advance against salary. Allowed values - Emirates_ID /customers/{customer_id_type}:{customer_id}/advance_against_salary/{aas_request_id}/aas_status: post: responses: 200: description: OK schema: $ref: '#/definitions/aas_status' 401: description: Unauthorized schema: $ref: '#/definitions/error_response' 422: description: Invalid/Unprocessed Entity schema: $ref: '#/definitions/error_response' 500: description: Internal Server Error schema: $ref: '#/definitions/error_response' description: On confirmation by customer, this endpoint should be called where {aas_request_id} in the URI is the request_id returned by the CheckAdvanceEligibility api. This API processes the AAS request. summary: API for confirming the AAS request operationId: ProcessAdvanceOnSalary parameters: - name: aas_status required: true in: body schema: $ref: '#/definitions/aas_status' description: request with the status as CONFIRMED to confirm the AAS request tags: [] parameters: - $ref: '#/parameters/MsgId' - name: customer_id type: string maxLength: 20 required: true in: path description: Customer Id of the customer who is requesting for advance against salary - name: customer_id_type type: string enum: - Emirates_ID required: true in: path description: Type of the Customer Id of the customer who is requesting for advance against salary. Allowed values - Emirates_ID - name: aas_request_id type: string required: true in: path description: The bank's unique id for the AAS request, returned in the CheckAdvanceEligibility operation. definitions: advance_against_salary: description: "" type: object properties: value: description: AAS Amount $ref: '#/definitions/value' last_monthly_salaries: description: Last three months salaries of the customer type: array items: $ref: '#/definitions/value' employer_code: type: string minLength: 1 maxLength: 20 description: Employer code example: S12 card_opening_date: type: string description: Date when the prepaid card was opened. example: "2018-11-25" format: date aas_request_id: type: string minLength: 1 maxLength: 10 description: The bank's unique id for the AAS request. Returned in the response. example: "1234567890" href: type: string description: href value to fetch the resource with the specific aas_request_id. example: /v1/customers/Emirates_ID:12312342143243214/advance_against_salary/1234567890 aas_status: $ref: '#/definitions/aas_status' fees: description: disbursement fee for the AAS $ref: '#/definitions/value' required: - value - last_monthly_salaries - employer_code - card_opening_date additionalProperties: false aas_status: properties: href: type: string description: href value to fetch the status of a specific aas_request_id. example: /v1/customers/Emirates_ID:555196916049600/advance_against_salary/1234567890/aas_status status: type: string enum: - PROCESSED - CONFIRMED description: Status of the AAS request. example: CONFIRMED required: - status additionalProperties: false description: This will contain the AAS status value: properties: currency: type: string enum: - AED description: Currency example: AED amount: type: string minLength: 1 maxLength: 20 description: Amount Value example: 2001 additionalProperties: false required: - currency - amount description: Details of the Amount requested as Advance on Salary. This is required in the CheckAdvanceEligibility request. error_response: properties: response_code: type: string description: API specific error code response_message: type: string description: breif details of the error status: type: string description: HTTP Status description: type: string description: detailed description of the error property: type: string additionalProperties: false description: Response in case of error required: - response_code - response_message - status tags: [] parameters: MsgId: name: MsgId type: string required: true in: header description: Unique UUID for the message x-ibm-endpoints: - endpointUrl: https://sandboxapi.rakbank.ae/sb/api type: - production - development ...