dxp-ux

(0 reviews)

Get-topupBalance

/topupBalance [GET]

This operation retrieves a list of TopupBalance resources.

This API is available for LCPR.

URL

http://[localhost]:[port]/dxp-ux/v1/{businessId}/topupBalance

URI PARAMS

nametypedescriptionrequired
businessIdstringMarket: PRY

Headers

nametypedescriptionrequired
client_idstringThe client_id identifying the channel. Minimum characters: 5Y
client_secretstringPassword associated with the client_id. Minimum characters: 5Y
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
Minimum characters: 1
N
targetSystemstringExpected target system: matrixxY
channelIdstringChannel to business
Can be : APP
Y

Query Params

nametypedescriptionrequired
accountIdstringTo list the topupBalance from a specific Subscription id of the line
NOTE : accountId queryParamter will be deprecated from next change. Going forward this shall not be used.
M/O
partyAccount.idstringTo list the topupBalance of a specific Subscription idM/O
partyAccount."@type"stringType of party account
Y when partyAccount.id is passed
example: "subscriptionRef"
M/O
logicalResource.idstringTo list the topupBalance of a specific MSISDN id
logicalResource."@type"stringType of logical resource
Y when logicalResource.id is paased
example: "MSISDN"
M/O
confirmationDate.gtedatetimeStart Date TimeN
confirmationDate.lteendtimeEnd Date TimeN
limitintegerRequested number of resources to be provided in responseN

NOTE: It is mandatory to pass one of the queryParams.

Possible response success

[ 200 ]

OK - list topupBalance request processed successfully, response body contains an entity corresponding to the requested resource.

List topupBalances by partyAccount.id
[
    {
        "id": "IC40:1:52:3164",
        "requestedDate": "2022-09-06T09:27:24.919832Z",
        "channel": {
            "name": "IVR"
        },
        "validFor": {
            "endDateTime": "65535-12-31T23:59:59.999999Z",
            "startDateTime": "2022-08-29T06:29:41.000Z"
        },
        "partyAccount": {
            "id": "S-9077196",
            "@type": "subscriptionRef"
        },
        "bucket": {
            "id": 1
        },
        "product": [
            {
                "id": 0,
                "name": "RechargeOffer"
            }
        ],
        "amount": {
            "amount": -100.0,
            "units": "USD"
        },
        "impactedBucket": [
            {
                "amountAfter": -111.5,
                "name": "Total Amount",
                "item": [
                    {
                        "amount": 10.5,
                        "name": "STATE SALES TAX"
                    },
                    {
                        "amount": 1.0,
                        "name": "CITY SALES TAX"
                    }
                ]
            }
        ]
    },
    {
        "id": "IC30:1:52:3018",
        "requestedDate": "2022-09-05T11:59:55.535953Z",
        "channel": {
            "name": "sfdc-b2c"
        },
        "validFor": {
            "endDateTime": "65535-12-31T23:59:59.999999Z",
            "startDateTime": "2022-08-29T06:29:41.000Z"
        },
        "partyAccount": {
            "id": "S-9077196",
            "@type": "subscriptionRef"
        },
        "bucket": {
            "id": 1
        },
        "product": [
            {
                "id": 0,
                "name": "RechargeOffer"
            }
        ],
        "amount": {
            "amount": -100.0,
            "units": "USD"
        },
        "impactedBucket": [
            {
                "amountAfter": -111.5,
                "name": "Total Amount",
                "item": [
                    {
                        "amount": 10.5,
                        "name": "STATE SALES TAX"
                    },
                    {
                        "amount": 1.0,
                        "name": "CITY SALES TAX"
                    }
                ]
            }
        ]
    },
    {
        "id": "ICU0:1:52:1990",
        "requestedDate": "2022-08-29T06:41:30.084205Z",
        "reason": "Low balance",
        "validFor": {
            "endDateTime": "65535-12-31T23:59:59.999999Z",
            "startDateTime": "2022-08-29T06:29:41.000Z"
        },
        "partyAccount": {
            "id": "S-9077196",
            "@type": "subscriptionRef"
        },
        "bucket": {
            "id": 1
        },
        "amount": {
            "amount": -100.0,
            "units": "USD"
        },
        "impactedBucket": [
            {
                "amountAfter": -100.0,
                "name": "Total Amount",
                "item": [
                    {
                        "amount": 10.5,
                        "name": "STATE SALES TAX"
                    },
                    {
                        "amount": 1.0,
                        "name": "CITY SALES TAX"
                    }
                ]
            }
        ]
    },
    {
        "id": "ICU0:1:52:1988",
        "requestedDate": "2022-08-29T06:39:06.672519Z",
        "reason": "Low balance",
        "validFor": {
            "endDateTime": "65535-12-31T23:59:59.999999Z",
            "startDateTime": "2022-08-29T06:29:41.000Z"
        },
        "partyAccount": {
            "id": "S-9077196",
            "@type": "subscriptionRef"
        },
        "bucket": {
            "id": 1
        },
        "amount": {
            "amount": -100.0,
            "units": "USD"
        },
        "impactedBucket": [
            {
                "amountAfter": -100.0,
                "name": "Total Amount",
                "item": [
                    {
                        "amount": 10.5,
                        "name": "STATE SALES TAX"
                    },
                    {
                        "amount": 1.0,
                        "name": "CITY SALES TAX"
                    }
                ]
            }
        ]
    },
    {
        "id": "ICU0:1:52:1985",
        "requestedDate": "2022-08-29T06:35:50.033819Z",
        "channel": {
            "name": "sfdc-b2c"
        },
        "validFor": {
            "endDateTime": "65535-12-31T23:59:59.999999Z",
            "startDateTime": "2022-08-29T06:29:41.000Z"
        },
        "partyAccount": {
            "id": "S-9077196",
            "@type": "subscriptionRef"
        },
        "bucket": {
            "id": 1
        },
        "product": [
            {
                "id": 0,
                "name": "RechargeOffer"
            }
        ],
        "amount": {
            "amount": -100.0,
            "units": "USD"
        },
        "impactedBucket": [
            {
                "amountAfter": -111.5,
                "name": "Total Amount",
                "item": [
                    {
                        "amount": 10.5,
                        "name": "STATE SALES TAX"
                    },
                    {
                        "amount": 1.0,
                        "name": "CITY SALES TAX"
                    }
                ]
            }
        ]
    }
]
List topupBalances by logicalResource.id
[
    {
        "id": "IC40:1:52:3164",
        "requestedDate": "2022-09-06T09:27:24.919832Z",
        "channel": {
            "name": "IVR"
        },
        "validFor": {
            "endDateTime": "65535-12-31T23:59:59.999999Z",
            "startDateTime": "2022-08-29T06:29:41.000Z"
        },
        "logicalResource": [
            {
                "id": "9077196",
                "@type": "msisdn"
            }
        ],
        "bucket": {
            "id": 1
        },
        "product": [
            {
                "id": 0,
                "name": "RechargeOffer"
            }
        ],
        "amount": {
            "amount": -100.0,
            "units": "USD"
        },
        "impactedBucket": [
            {
                "amountAfter": -111.5,
                "name": "Total Amount",
                "item": [
                    {
                        "amount": 10.5,
                        "name": "STATE SALES TAX"
                    },
                    {
                        "amount": 1.0,
                        "name": "CITY SALES TAX"
                    }
                ]
            }
        ]
    },
    {
        "id": "IC30:1:52:3018",
        "requestedDate": "2022-09-05T11:59:55.535953Z",
        "channel": {
            "name": "sfdc-b2c"
        },
        "validFor": {
            "endDateTime": "65535-12-31T23:59:59.999999Z",
            "startDateTime": "2022-08-29T06:29:41.000Z"
        },
        "logicalResource": [
            {
                "id": "9077196",
                "@type": "msisdn"
            }
        ],
        "bucket": {
            "id": 1
        },
        "product": [
            {
                "id": 0,
                "name": "RechargeOffer"
            }
        ],
        "amount": {
            "amount": -100.0,
            "units": "USD"
        },
        "impactedBucket": [
            {
                "amountAfter": -111.5,
                "name": "Total Amount",
                "item": [
                    {
                        "amount": 10.5,
                        "name": "STATE SALES TAX"
                    },
                    {
                        "amount": 1.0,
                        "name": "CITY SALES TAX"
                    }
                ]
            }
        ]
    },
    {
        "id": "ICU0:1:52:1990",
        "requestedDate": "2022-08-29T06:41:30.084205Z",
        "reason": "Low balance",
        "validFor": {
            "endDateTime": "65535-12-31T23:59:59.999999Z",
            "startDateTime": "2022-08-29T06:29:41.000Z"
        },
        "logicalResource": [
            {
                "id": "9077196",
                "@type": "msisdn"
            }
        ],
        "bucket": {
            "id": 1
        },
        "amount": {
            "amount": -100.0,
            "units": "USD"
        },
        "impactedBucket": [
            {
                "amountAfter": -100.0,
                "name": "Total Amount",
                "item": [
                    {
                        "amount": 10.5,
                        "name": "STATE SALES TAX"
                    },
                    {
                        "amount": 1.0,
                        "name": "CITY SALES TAX"
                    }
                ]
            }
        ]
    },
    {
        "id": "ICU0:1:52:1988",
        "requestedDate": "2022-08-29T06:39:06.672519Z",
        "reason": "Low balance",
        "validFor": {
            "endDateTime": "65535-12-31T23:59:59.999999Z",
            "startDateTime": "2022-08-29T06:29:41.000Z"
        },
        "logicalResource": [
            {
                "id": "9077196",
                "@type": "msisdn"
            }
        ],
        "bucket": {
            "id": 1
        },
        "amount": {
            "amount": -100.0,
            "units": "USD"
        },
        "impactedBucket": [
            {
                "amountAfter": -100.0,
                "name": "Total Amount",
                "item": [
                    {
                        "amount": 10.5,
                        "name": "STATE SALES TAX"
                    },
                    {
                        "amount": 1.0,
                        "name": "CITY SALES TAX"
                    }
                ]
            }
        ]
    },
    {
        "id": "ICU0:1:52:1985",
        "requestedDate": "2022-08-29T06:35:50.033819Z",
        "channel": {
            "name": "sfdc-b2c"
        },
        "validFor": {
            "endDateTime": "65535-12-31T23:59:59.999999Z",
            "startDateTime": "2022-08-29T06:29:41.000Z"
        },
        "logicalResource": [
            {
                "id": "9077196",
                "@type": "msisdn"
            }
        ],
        "bucket": {
            "id": 1
        },
        "product": [
            {
                "id": 0,
                "name": "RechargeOffer"
            }
        ],
        "amount": {
            "amount": -100.0,
            "units": "USD"
        },
        "impactedBucket": [
            {
                "amountAfter": -111.5,
                "name": "Total Amount",
                "item": [
                    {
                        "amount": 10.5,
                        "name": "STATE SALES TAX"
                    },
                    {
                        "amount": 1.0,
                        "name": "CITY SALES TAX"
                    }
                ]
            }
        ]
    }
]
Definitions

Each of the request parameters is detailed.

nametypedescriptionrequired
descriptionstringRepresents a detailed description of a recharge operation requested over a bucket (defined by a specific product or reference to a product (i.e.: a commercial id such as an msisidn) and a service type)N
idstringUnique Identifier for the resourceY
hrefstringA reference to the resourceN
confirmationDatedatetimeDate when the deduction was confirmed in the serverY
descriptionstringDescription of the recharge operationY
isAutoTopupbooleanIndicates if the topup requested is an autotopup (to be processed periodically)N
numberOfPeriodsintegerFor autotopup indicates the number of occurrences of the period the recharge operation must be executed. If not included then no limit is set to stop the executionof the topup every periodN
reasonstringText describing the reason for the action/taskN
requestedDatedatetimeDate when the deduction request was received in the serverY
voucherstringIdentifier for a voucher when the topup can be performed by this meansN
amountQuantityAn amount in a given unitY
amount.amountnumberNumeric value in a given unitY
amount.unitstringUnitY
balanceTopupobjectRelated Entity reference. A related balance topup defines a relationship via a role to another balance topup. Used in the PrepayBalanceManagement API to track child topups that are related to the parent (initiating balance topup resource). PrepayBalanceManagement defines the child roleN
balanceTopup.idstringunique identifierN
balanceTopup.hrefstringHyperlink referenceN
balanceTopup.namestringName of the related entity.N
balanceTopup.rolestringRole played by the TopupBalance. In the PrepayBalanceManagement API this is parent or childN
balanceTopup.@baseTypestringWhen sub-classing, this defines the super-classN
balanceTopup.@schemaLocationstringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
balanceTopup.@typestringWhen sub-classing, this defines the sub-class Extensible nameN
balanceTopup.@referredTypestringThe actual type of the target instance when needed for disambiguation.N
bucketobjectlink to the resource that holds bucket informationN
bucket.idstringunique identifierN
bucket.hrefstringHyperlink referenceN
bucket.namestringName of the related entity.N
bucket.@baseTypestringWhen sub-classing, this defines the super-classN
bucket.@schemaLocationstringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
bucket.@typestringWhen sub-classing, this defines the sub-class Extensible nameN
bucket.@referredTypestringThe actual type of the target instance when needed for disambiguation.N
channelobjectThe channel to which the resource reference to. e.g. channel for selling product offerings, channel for opening a trouble ticket etc..N
channel.idstringunique identifierN
channel.hrefstringHyperlink referenceN
channel.namestringName of the channel.N
channel.@baseTypestringWhen sub-classing, this defines the super-classN
channel.@schemaLocationstringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
channel.@typestringWhen sub-classing, this defines the sub-class Extensible nameN
channel.@referredTypestringThe actual type of the target instance when needed for disambiguation.N
logicalResourcearrayreference to the LogicalResource eg MSISDNN
logicalResource.idstringunique identifierN
logicalResource.hrefstringHyperlink reference
logicalResource.namestringName of the related entity.N
logicalResource.@baseTypestringWhen sub-classing, this defines the super-classN
logicalResource.@schemaLocationstringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
logicalResource.@typestringWhen sub-classing, this defines the sub-class Extensible nameN
logicalResource.@referredTypestringThe actual type of the target instance when needed for disambiguation.N
partyAccountobjectPartyAccount reference. A party account is an arrangement that a party has with an enterprise thatN
partyAccount.idstringUnique identifier of the party accountN
partyAccount.hrefstringReference of the party accountN
partyAccount.descriptionstringDetailed description of the party accountN
partyAccount.namestringName of the party accountN
partyAccount.statusstringThe condition of the account, such as due, paid, in arrears.N
partyAccount.@baseTypestringWhen sub-classing, this defines the super-classN
partyAccount.@schemaLocationstringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
partyAccount.@typestringWhen sub-classing, this defines the sub-class entity nameN
partyAccount.@referredTypestringThe actual type of the target instance when needed for disambiguation.N
paymentMethodobjectPaymentMethod reference. A payment method defines a specific mean of payment (e.g direct debit).N
paymentMethod.idstringunique identifierN
paymentMethod.hrefstringHyperlink referenceN
paymentMethod.namestringName of the related entity.N
paymentMethod.@baseTypestringWhen sub-classing, this defines the super-classN
paymentMethod.@schemaLocationstringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
paymentMethod.@typestringWhen sub-classing, this defines the sub-class Extensible nameN
paymentMethod.@referredTypestringThe actual type of the target instance when needed for disambiguation.N
productarrayA reference to the Product associated with this bucket.N
product.idstringunique identifierN
product.hrefstringHyperlink referenceN
product.namestringName of the related entity.N
product.@baseTypestringWhen sub-classing, this defines the super-classN
product.@schemaLocationstringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
product.@typestringWhen sub-classing, this defines the sub-class Extensible nameN
product.@referredTypestringThe actual type of the target instance when needed for disambiguation.N
recurringPeriodstringValid values for this type. enum:
- weekly
- fortnightly
- monthly
N
relatedPartyarrayUsed to provide information about any other entity with relation to the operationN
relatedParty.idstringUnique identifier of a related entity.N
relatedParty.hrefstringReference of the related entity.N
relatedParty.namestringName of the related entity.N
relatedParty.rolestringRole played by the related partyN
relatedParty.@baseTypestringWhen sub-classing, this defines the super-classN
relatedParty.@schemaLocationstringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
relatedParty.@typestringWhen sub-classing, this defines the sub-class entity nameN
relatedParty.@referredTypestringThe actual type of the target instance when needed for disambiguation.N
requestorobjectRelated Entity reference. A related party defines party or party role linked to a specific entity.N
requestor.idstringUnique identifier of a related entity.N
requestor.hrefstringReference of the related entity.N
requestor.namestringName of the related entity.N
requestor.rolestringRole played by the related partyN
requestor.@baseTypestringWhen sub-classing, this defines the super-classN
requestor.@schemaLocationstringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
requestor.@typestringWhen sub-classing, this defines the sub-class entity nameN
relatedParty.@referredTypestringThe actual type of the target instance when needed for disambiguation.N
statusstringValid values for the Action Status TypeY
usageTypestringValid values for the usage type areN
validForobjectA period of time, either as a deadline (endDateTime only) a startDateTime only, or bothN
validFor.startDateTimedatetimeStart of the time period, using IETC-RFC-3339 format. If you define a start, you must also define an endN
validFor.endDateTimedatetimeEnd of the time period, using IETC-RFC-3339 formatN
@baseTypestringWhen sub-classing, this defines the super-classN
@schemaLocationstringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
@typestringWhen sub-classing, this defines the sub-class entity nameN
paymentobjectPaymentMethod reference. A payment method defines a specific mean of payment (e.g direct debit).Y
payment.idstringunique identifierY
payment.hrefstringHyperlink referenceN
payment.namestringName of the related entity.N
payment.@baseTypestringWhen sub-classing, this defines the super-classN
payment.@schemaLocationstringA URI to a JSON-Schema file that defines additional attributes and relationshipsN
payment.@typestringWhen sub-classing, this defines the sub-class Extensible nameY
payment.@referredTypestringThe actual type of the target instance when needed for disambiguation.N
impactedBucketarrayA resource that references other buckets that have been impacted by the action of TopupBalanceN
impactedBucket.amountAfternumberIndicates the amount on the impacted bucket after the action has completed.N
impactedBucket.namestringFriendly name to identify the bucketN
impactedBucket.itemarrayA resource used by the ImpactedBucket resource to capture the impact of an ImpactedBucketN
impactedBucket.item.amountnumberIndicate the amount on the bucketN
impactedBucket.item.namestringThis represents the transaction activity. e.g. topup, bonus, additional bonus, tax, fees, and so onN

Possible Error Scenarios: :

IF WE ARE NOT PASSING QUERYPARAMS
{
    "errors": [
        {
            "code": 400,
            "message": "VALIDATION:BLANK_STRING",
            "description": "Either of accountId | partyAccount.id | logicalResource.id is expected"
        }
    ]
}
IF WE ARE PASSING INVALID ACCOUNTID IN QUERYPARAMS
[
    {
        "errors": [
            {
                "code": 404,
                "message": "MATRIXX:RETRIEVE_TOPUPBALANCE",
                "description": "11 | Subscriber not found (ExternalId=S-9012)"
            }
        ]
    }
]
INVALID URL
{
    "errors": [
        {
            "code": 405,
            "message": "APIKIT:METHOD_NOT_ALLOWED",
            "description": "HTTP Method get not allowed for : /{businessId}"
        }
    ]
}

Reviews