Microservices
R24 AMR | Min(s) read

Run Time

This section covers the details of the runtime APIs supported by SRMS 2.0.

Create Service Request
This API creates the service request for a request type passed in the URL.

POSTv1.0.0/order/serviceRequests

Sample URL
http://localhost:7101/ms-servicerequest-api/api/v1.0.0/order/serviceRequests
Sample Request
{
    "serviceRequest": {
        "payload": {
            "accountNo": "100101",
            "chequeType": "CURR",
            "notes": "Two 50 slips book required"
        },
        "requestType": "orderChequebook"
    }
}
Sample Response
{
  "serviceRequestId": "SR202384060757966320",
  "message": "orderChequebook Record Created Successfully",
  "responseStatus": "Created"
}					
Save Service Request
This API saves the service request in accordance with the Maker Checker flow.

POSTv1.0.0/order/serviceRequests

Sample URL
http://localhost:7101/ms-servicerequest-api/api/v1.0.0/order/serviceRequests
Sample Request
{
    "serviceRequest": {
        "payload": {
            "accountNo": "100102",
            "chequeType": "CURR",
            "notes": "2 50 slips books required"
        },
        "purpose": "SAVE",
        "requestType": "orderChequebook"
    }
}
Sample Response
{
  "serviceRequestId": "SR202384061630570262",
  "message": "Drafted successfully"
}					
Delete Service Request
This API deletes the service request record. Applicable only to those requests that are in the draft status.

DELETEv1.0.0/order/serviceRequests/{serviceRequestId}

Sample URL
http://localhost:7101/ms-servicerequest-api/api/v1.0.0/order/serviceRequests/SR2023101140435772495
Response
{
    "serviceRequestId": "SR2023101140435772495",
    "message": "SR2023101140435772495 Record Deleted Successfully",
    "responseStatus": "Deleted"
}
Submit Service Request
This API submits the service request in accordance with the Maker Checker flow.

PUTv1.0.0/order/serviceRequests/{serviceRequestId}

Sample URL
http://localhost:7101/ms-servicerequest-api/api/v1.0.0/order/serviceRequests/{serviceRequestId}
Sample Request
{
    "serviceRequest": {
        "payload": {
            "accountNo": "100102",
            "chequeType": "CURR",
            "notes": "2 50 slips books required"
        },
        "purpose": "SUBMIT",
        "requestType": "orderChequebook"
    }
}
Sample Response
{
  "serviceRequestId": "SR202384061630570262",
  "message": "Submitted successfully"
}
Fetch Single Service Request Record
This API fetches a single service request detail with its fulfilment status from the Service Request table. It also returns the user-submitted data created for the respective request type.

GETv1.0.0/order/serviceRequests/{serviceRequestId}

Sample URL
http://localhost:7101/ms-servicerequest-api/api/v1.0.0/order/serviceRequests/SR202318005431225831
Sample Response
{
    "serviceRequestId": "SR202318005431225831",
    "requestType": "orderChequebook",
    "downstreamStatus": "",
    "approvalStatus": "PENDINGFORAPPROVAL",
    "downstreamNotes": "",
    "approverNotes": "",
    "createdBy": "2900086473289",
    "createDate": "Thu Jun 29 05:43:13 GMT 2023",
    "noOfPendingApprovals": "1",
    "payload": {
            "chequeType": "CURR",
            "notes": "50 Slips book",
            "accountNo": "100101"
    }
}
Fetch List of Service Request Records
This API fetches the list of service request records for the given request type and the key field - accountId, customerId, or transactionId.

GETv1.0.0/order/serviceRequests

Sample URL
http://localhost:7101/ms-servicerequest-api/api/v1.0.0/order/serviceRequests?requestType=orderChequebook&accountId=120766
Sample Response
{
    "serviceRequests": [
        {
            "serviceRequestId": "SR2023180055436967342",
            "requestType": "orderChequebook",
            "downstreamStatus": "",
            "approvalStatus": "DRAFT",
            "downstreamNotes": "",
            "approverNotes": "",
            "createdBy": "2900086473289",
            "createDate": "Thu Jun 29 05:54:40 GMT 2023",
            "noOfPendingApprovals": "1",
            "payload": {
                "chequeType": "CURR",
                "notes": "50 slips book",
                "accountNo": "100101"
            }
        },
        {
            "serviceRequestId": "SR2023180055557072802",
            "requestType": "orderChequebook",
            "downstreamStatus": "",
            "approvalStatus": "PENDINGFORAPPROVAL",
            "downstreamNotes": "",
            "approverNotes": "",
            "createdBy": "2900086473289",
            "createDate": "Thu Jun 29 05:55:57 GMT 2023",
            "noOfPendingApprovals": "1",
            "payload": {
                "chequeType": "CURR",
                "notes": "50 Slips book",
                "accountNo": "100101"
            }
        },
        {
            "serviceRequestId": "SR2023180060009069850",
            "requestType": "orderChequebook",
            "downstreamStatus": "",
            "approvalStatus": "REJECTED",
            "downstreamNotes": "",
            "approverNotes": "rejected due to incorrect details",
            "createdBy": "2900086473289",
            "createDate": "Thu Jun 29 06:00:09 GMT 2023",
            "noOfPendingApprovals": "1",
            "payload": {
                "chequeType": "CURR",
                "notes": "50 Slips book",
                "accountNo": "100101"
            }
        },
        {
            "serviceRequestId": "SR2023180055827177771",
            "requestType": "orderChequebook",
            "downstreamStatus": "Submitted",
            "approvalStatus": "APPROVED",
            "downstreamNotes": "50 Slips book",
            "approverNotes": "Everything is fine",
            "createDate": "Thu Jun 29 05:58:28 GMT 2023",
            "noOfPendingApprovals": "0",
            "payload": {
                "notes": "50 Slips book",
                "chequeType": "CURR",
                "accountNo": "100101"
            }
        }
    ]
}

In this topic

Copyright © 2020- Temenos Headquarters SA

Published on :
Wednesday, June 12, 2024 3:49:45 PM IST