post
https://in.staging.decentro.tech/v2/bytes/alternate-data/spend-analysis
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
| Environment | Method | Endpoint |
|---|---|---|
| Staging | POST | https://in.staging.decentro.tech/v2/bytes/alternate-data/spend-analysis |
| Production | POST | https://in.decentro.tech/v2/bytes/alternate-data/spend-analysis |
Supported spend vectors
| Request value | Response location |
|---|---|
annual_spend | data.spendSummary.annualSpend |
monthly_spend | data.spendSummary.monthlySpend |
user_payment_instruments | data.userPaymentInstruments |
emi_purchases | data.emiPurchases |
income_estimator | data.incomeEstimator |
volume_bucket_size | data.volumeBucketSize |
affluence_score | data.affluenceScore |
big_ticket_purchase_count_above_15000 | data.bigTicketPurchaseCountAbove15000 |
merchant_category_analysis | data.merchantCategoryAnalysis |
Response Description
Available data depends on the user and requested spend vectors. Some fields may be empty.
| Key | Data Type | Description |
|---|---|---|
decentroTxnId | String | Transaction ID generated by Decentro for tracking the request. |
status | String | Overall status of the request (e.g., "SUCCESS" or "FAILURE"). |
responseCode | String | System-defined response code indicating the result of the request (e.g., "S00000" for success). |
message | String | Message providing additional information about the API response status. |
data | Object | Primary container holding the detailed response payload. An empty object is returned when no records are found. |
responseKey | String | Response key identifying the outcome. Refer to Response Key Mapping below. |
data.spendSummary.annualSpend[] | Array of objects | year, txnCount, avgSpendRs, spendRs. |
data.spendSummary.monthlySpend[] | Array of objects | yearMonth, txnCount, avgSpendRs, spendRs. |
data.userPaymentInstruments[] | Array of objects | Available payment instrument information, including latest5Cards and lastTxnPaymode. |
data.emiPurchases[] | Array of objects | product, yearMonth, emiTenureMonths, emiAmountPerTxnRs. |
data.incomeEstimator | Object | minimumRs, maximumRs, confidenceScore. |
data.volumeBucketSize | Object | below1k, from1kTo5k, from5kTo10k, from10kTo25k, from25kTo50k, from50kTo100k, above100k. |
data.affluenceScore[] | Array of objects | Available sequence, score and tier values. |
data.bigTicketPurchaseCountAbove15000 | String | Count of purchases above INR 15,000, as a string. |
data.merchantCategoryAnalysis.monthlyBreakdown[] | Array of objects | Month, total spending, total transaction count and categorySpending[]. |
data.merchantCategoryAnalysis.spendingPatterns[] | Array of objects | Top spending category, MCC, spending amount/share and concentration indicator. |
Response Key Mapping
| Response Key | Scenario |
|---|---|
success_spend_analysis | Spend data pulled successfully. |
success_partial_spend_analysis | Data returned for some requested spend vectors. |
success_no_record_found | Successful lookup with no records. |
error_invalid_spend_vectors | Invalid or unsupported spend vectors. |
error_empty_spend_vectors | Missing or empty spend vectors. |
error_spend_vectors | Requested vector not enabled for the account. |
error_malformed_request | Invalid request structure or field types. |
error_provider_error | Underlying source failure or an unexpected source response. |
