Spend Analysis API

Retrieve available spending insights for a user by mobile number. Select one or more spend vectors enabled for your account.

Use staging credentials for testing. Replace the example mobile number with the user's mobile number.

API endpoints

Supported spend vectors

Request valueResponse location
annual_spenddata.spendSummary.annualSpend
monthly_spenddata.spendSummary.monthlySpend
user_payment_instrumentsdata.userPaymentInstruments
emi_purchasesdata.emiPurchases
income_estimatordata.incomeEstimator
volume_bucket_sizedata.volumeBucketSize
affluence_scoredata.affluenceScore
big_ticket_purchase_count_above_15000data.bigTicketPurchaseCountAbove15000
merchant_category_analysisdata.merchantCategoryAnalysis

Response Description

Available data depends on the user and requested spend vectors. Some fields may be empty.

KeyData TypeDescription
decentroTxnIdStringTransaction ID generated by Decentro for tracking the request.
statusStringOverall status of the request (e.g., "SUCCESS" or "FAILURE").
responseCodeStringSystem-defined response code indicating the result of the request (e.g., "S00000" for success).
messageStringMessage providing additional information about the API response status.
dataObjectPrimary container holding the detailed response payload. An empty object is returned when no records are found.
responseKeyStringResponse key identifying the outcome. Refer to Response Key Mapping below.
data.spendSummary.annualSpend[]Array of objectsyear, txnCount, avgSpendRs, spendRs.
data.spendSummary.monthlySpend[]Array of objectsyearMonth, txnCount, avgSpendRs, spendRs.
data.userPaymentInstruments[]Array of objectsAvailable payment instrument information, including latest5Cards and lastTxnPaymode.
data.emiPurchases[]Array of objectsproduct, yearMonth, emiTenureMonths, emiAmountPerTxnRs.
data.incomeEstimatorObjectminimumRs, maximumRs, confidenceScore.
data.volumeBucketSizeObjectbelow1k, from1kTo5k, from5kTo10k, from10kTo25k, from25kTo50k, from50kTo100k, above100k.
data.affluenceScore[]Array of objectsAvailable sequence, score and tier values.
data.bigTicketPurchaseCountAbove15000StringCount of purchases above INR 15,000, as a string.
data.merchantCategoryAnalysis.monthlyBreakdown[]Array of objectsMonth, total spending, total transaction count and categorySpending[].
data.merchantCategoryAnalysis.spendingPatterns[]Array of objectsTop spending category, MCC, spending amount/share and concentration indicator.

Response Key Mapping

Response KeyScenario
success_spend_analysisSpend data pulled successfully.
success_partial_spend_analysisData returned for some requested spend vectors.
success_no_record_foundSuccessful lookup with no records.
error_invalid_spend_vectorsInvalid or unsupported spend vectors.
error_empty_spend_vectorsMissing or empty spend vectors.
error_spend_vectorsRequested vector not enabled for the account.
error_malformed_requestInvalid request structure or field types.
error_provider_errorUnderlying source failure or an unexpected source response.
Body Params
string
required

Any unique ID assigned by you for this API request.

Allowed:
string
required

Purpose for requesting spend insights.

string
required
^[0-9]{10}$

The mobile number of the individual. Must contain 10 digits without a country code.

spend_vectors
array of strings
required
length ≥ 1

Case-sensitive spend vectors enabled for your account. Duplicate values are considered once.

spend_vectors*
Headers
string
required

ID/identifier that is provided by Decentro to a specific client and environment. Please note, this may change based on the environment you are on.

string
required

The confidential credential provided by Decentro that is associated with the client_id

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json