Non TMF Biz Api

(0 reviews)

GET-loyalityPoints

/billingAccount/{id}/loyaltyPoints [GET]

This operation retrieves a loyalty points summary of a particular Account.

Request

URL

https://[localhost]:[port]/nontmf-biz/v1/{businessId}/billingAccount/{id}/loyaltyPoints

Base URI Parameter

NameTypeM/ODescription
businessIdstringMbusinessId string M Business unit identifier. Example: "JM”
idstringMbillingAccount Example: Cerillion accountNo 10251101

Headers

NameTypeM/ODescription
X-Correlation-IDstringOThis is a unique identifier for the current call chain that can be used to tie together log entries on multiple layers. Could be uuid value, Min 16 Characters Example: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92c2b

Security Headers

NameTypeM/ODescription
client_idstringMClient Id value for Client Id Enforcement policy. Environment Specific Value. Eg: 6f0ed16a7b494d76b2d60e05bc3b3332
client_secretstringMClient secret value for Client Id Enforcement policy. Environment Specific Value, eg: e4CD4D43449846aA9D8Cb9c43f

Possible success response

This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.

HTTP Status response is 200 with Response body.

{
  "loyaltyPointsSummaryItem": {
        "lpBillAvailable": "0",
        "lpBillCalcDt": "2022-02-01T00:00:00-04:00",
        "lpBillEarned": "0",
        "lpBillExpired": "0",
        "lpBillPrevious": "0",
        "lpBillSpentPrev": "0",
        "lpBillTotal": "0",
        "lpBillWillExpire": "0",
        "lpMemberYn": "false",
        "lpNowAvailable": "0",
        "lpNowAwarded": "0",
        "lpNowSpent": "0"
  }
}

Possible error response

[ 400 ]

Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

{
    "errors": [
        {
            "code": 400,
            "message": "APIKIT:BAD_REQUEST",
            "description": "Required header 'client_id' not specified"
        }
    ]
}
[ 401 ]

Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.

{
  "errors" : [
      {
      "code" : 401,
      "message" : "The user could not be authenticated for this request.",
      "description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
    }
  ]
}
[ 404 ]

Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

{
  "errors" : [{
      "code" : 404,
      "message" : "The request is invalid or not properly formed.",
      "description" : "The requested operation failed because a resource associated with the request could not be found."
    }]
}
[ 405 ]

Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

{
    "errors": [{
            "code": 405,
             "message": "APIKIT:METHOD_NOT_ALLOWED",
             "description": "HTTP Method post not allowed for : /{businessId}/billingAccount/{id}/loyaltyPoints"
        }]
}
[ 500 ]

Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.

{
  "errors" : [{
      "code" : 500,
      "message" : "The request failed due to an internal error.",
      "description": ""
    }]
}
[ 501 ]

Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.

{
  "errors" : [{
      "code" : 501,
      "message" : "Not implemented",
      "description" : "Operation GET /billingAccount/{id}/loyaltyPoints for Business Id: xxxx not implemented"
    }]
  }
[ 503 ]

service unavailable (503).

{
    "errors": [
        {
            "code": 503,
            "message": "HTTP:SERVICE_UNAVAILABLE",
            "description": "HTTP GET on resource 'http://0.0.0.0:9092/cerillion-nontmf-sys/v1/{businessId}/billingAccount/{billingAccountId}/loyaltyPoints' failed: service unavailable (503)."
        }
    ]
}

Request

URL
http://host:port/cerillion-nontmf-sys/v1/{businessId}/billingAccount/{billingAccountId}/loyaltyPoints

Primary Flow

#Actor: Key ActionDescription
1ESB: Read the businessIdRead the business Id from URI params and set to businessId variable. Automatically by Mule4
2ESB: Read Correlation-IDRead the Header Correlation-ID, and set CorrelationId variable. Automatically by Mule4 #[attributes.headers.Correlation-ID],
3ESB: API SecurityPolicyUse policy category – Compliance – Client ID Enforcement.
HTTP Basic Authentication across all http methods and resources
4ESB: Call common Logger.Call common Logger Start sub flow.
5ESB: Forward request to biz layerForward the request to the sys layer. Call cerillion-nontmf-sys via a HTTP Requester Connector . Set property, send Correlation-ID. ALWAYS Set HTTP Method: GET Use businessId to forward request as uriParameter, required header and queryParameters
7ESB: Parse responseParse the response from the sys layer and prepare the HTTP response. Ensure HTTP Response Content-Type: application/json
8ESB: Build http code responsestatusCode = 200
9ESB: Send the response to the client.Send the http response to the client app.
10ESB: Call common Logger.Call common Logger Complete sub flow.

Transformations or Mappings

process layer (biz) have neither transformations nor mappings, instead it has data model representation for the response which is delivered to client.

BaseUriParameter

NameTypeM/ODescription
businessIdstringMBusiness unit identifier. For Jamaica it is JM attributes.uriParams.businessId
billingAccountIdstringMAccount Number.

Headers

namevaluedescriptionrequired
X-Correlation-IDstringIdentifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction.
Example: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92c2b
O

Security Headers

namevaluedescriptionrequired
client_idstringClient Id value for Client Id Enforcement policy. Environment Specific Value.
Eg:6f0ed16a7b494d76b2d60e05bc3b3332
M
client_secretstringClient secret value for Client Id Enforcement policy. Environment Specific Value
Eg: e4CD4D43449846aA9D8Cb9c43fAd324a
M

Cache

Not Applicable

Performance Considerations

Not Applicable

Audit Implementation

Events should be generated when starting to process each of the request and when the processing of the requests is finished, indicating whether the operation was successful.

Database Changes

No Data base Changes are part of this implementations

Network/Infrastructure changes

No network Changes are part of this implementations

3rd Party Interactions

Not Applicable

Administration and data management

In this section you define all the transformations, temporary and final repositories of the data within the method flow.

Transformation Request

In this section the matrix of all the data transformations that is carried out within the service is defined.

Transformation Response

In this section the matrix of all the data transformations that is carried out within the service is defined.

Original PayloadMulesofttransformation
payloadpayload

Services dependencies

This section defines all the connections to the web services and the methods that are used within the method.

cerillion-nontmf-sys
MethodType
/{businessId}/billingAccount/{billingAccountId}/loyaltyPointsGET

Reviews