Skip to main content
Expense Details API
curl --request GET \
  --url https://api.pazy.io/v1.0/expense/:expenseId

Authentication

All requests require an API key in the request headers. Headers:
Authorization: Api-Key YOUR_API_KEY

Request

Path Parameters

ParameterTypeRequiredDescription
expenseIdstringYesThe unique slug identifier of the expense

Code Examples

curl -X GET https://api.pazy.io/v1.0/expense/expense_identifier \
  -H "Authorization: Api-Key YOUR_API_KEY"

Success Response

HTTP Status: 200 OK Response Fields:
FieldTypeDescription
okbooleanIndicates whether the request was successful
dataobjectContains the expense details
data.idstringUnique identifier (slug) for the expense
data.expenseTypestringType of the expense
data.descriptionstringDescription of the expense
data.itemCountnumberNumber of line items in the expense
data.expenseDatestringDate the expense was incurred (ISO 8601 format)
data.dueDatestringDue date for the expense (ISO 8601 format)
data.accountingDatestringAccounting date for the expense (ISO 8601 format)
data.approvedDatestringDate the expense was approved (ISO 8601 format)
data.recipientIdstringIdentifier of the payment recipient
data.recipientTypestringType of the payment recipient
data.paymentDatestringDate the expense was paid (ISO 8601 format)
data.amountnumber or stringTotal amount of the expense
data.currencystringCurrency code (e.g., INR)
data.statestringCurrent state of the expense. Possible values: DRAFTED, PENDING, APPROVED, OUT_OF_POLICY
data.paymentStatestringPayment state of the expense
data.amountPaidnumber or stringAmount that has been paid against the expense
data.dateCreatedstringDate the expense was created in the system (ISO 8601 format)
data.remarksstringNotes / remarks on the expense
data.sourcestringSource of the expense. Manual entries are returned as WEB; other possible values include EMAIL, SLACK
data.syncedReferenceIdstringReference identifier of the expense in the connected accounting platform
data.documentIdstringIdentifier of the source document, if any
data.syncStatestringSynchronization state with the accounting system (e.g., SYNCED, NOT_SYNCED)
data.syncModestringSynchronization mode for the expense
data.accountingPlatformstringName of the connected accounting platform. Present only when an accounting integration is connected
data.selfUrlstringShareable URL for viewing the expense in the web interface
data.identifierstringHuman-readable identifier / number for the expense
data.cardInfoobjectCard details if paid by card. Empty object if not applicable
data.cardInfo.namestringCard name
data.cardInfo.slugstringCard slug identifier
data.cardInfo.maskedCardNumberstringMasked card number
data.cardInfo.descriptionstringCard description
data.cardInfo.dateCreatedstringDate the card was created
data.cardInfo.providerstringCard provider
data.transactionobjectTransaction details
data.transaction.utrstringUnique Transaction Reference (UTR) of the payment
data.transaction.dateConfirmedstringDate the transaction was confirmed
data.transaction.narrationstringBank narration for the transaction
data.transaction.ledgerIdstring or nullLedger / instrument identifier the transaction is mapped to
data.initiatorobjectDetails of the user who raised the expense
data.initiator.slugstringUnique slug identifier of the initiator
data.initiator.namestringFull name of the initiator
data.initiator.emailstringEmail address of the initiator
data.merchantobjectMerchant details
data.merchant.namestring or nullMerchant name
data.merchant.vpastring or nullMerchant VPA (UPI address)
data.merchant.mccobjectMerchant Category Code details. Present only when MCC data is available
data.merchant.mcc.codestring or nullMCC code
data.merchant.mcc.groupSlugstring or nullMCC group slug
data.merchant.mcc.groupNamestring or nullMCC group name
data.merchant.mcc.groupDescriptionstring or nullMCC group description
data.merchant.mcc.groupExtraobject or nullAdditional MCC group metadata
data.vendorobjectLinked vendor details. Empty object if no vendor is linked
data.vendor.slugstringUnique slug identifier of the vendor
data.vendor.namestringVendor display name (falls back to legal name)
data.vendor.emailstringVendor email address
data.lineItemsarrayLine items on the expense
data.lineItems[].idstringUnique identifier of the line item
data.lineItems[].descriptionstringLine item description
data.lineItems[].amountnumberTotal amount for the line item
data.lineItems[].ratenumber or nullUnit rate for the line item
data.lineItems[].quantitynumber or nullQuantity for the line item
data.lineItems[].ledgerTypestring or nullLedger type mapped to the line item
data.lineItems[].ledgerIdstring or nullLedger identifier mapped to the line item
data.lineItems[].skuIdstring or nullSKU identifier mapped to the line item
data.lineItems[].trxTaxobjectTransaction (e.g., GST) tax details for the line item
data.lineItems[].trxTax.typestringTax type
data.lineItems[].trxTax.amountnumberTax amount
data.lineItems[].trxTax.namestringTax name
data.lineItems[].trxTax.deductionTypestring or nullTax deduction type
data.lineItems[].trxTax.deductionValuenumber or nullTax deduction value
data.lineItems[].trxTax.idnumber or string or nullTax identifier
data.lineItems[].whtTaxobjectWithholding (e.g., TDS) tax details for the line item
data.lineItems[].whtTax.typestringWithholding tax type
data.lineItems[].whtTax.amountnumberWithholding tax amount
data.lineItems[].whtTax.namestringWithholding tax name
data.lineItems[].whtTax.deductionTypestring or nullWithholding deduction type
data.lineItems[].whtTax.deductionValuenumber or nullWithholding deduction value
data.lineItems[].whtTax.idnumber or string or nullWithholding tax identifier
data.lineItems[].amountBreakdownobjectComputed amount breakdown for the line item
data.lineItems[].amountBreakdown.subTotalnumberAmount before transaction tax
data.lineItems[].amountBreakdown.grossTotalnumberSub-total plus transaction tax
data.lineItems[].amountBreakdown.netPayablenumberGross total minus withholding tax
data.processingStatusobjectDocument-processing status. Present only when the expense was created from a document being processed
data.processingStatus.processingIdstringIdentifier of the processing job
data.processingStatus.statusstringCurrent processing state
data.processingStatus.isReadybooleanWhether processing has completed and the data is ready

Response Example

{
  "ok": true,
  "data": {
    "id": "expense_identifier",
    "expenseType": "GENERAL",
    "description": "Team lunch",
    "itemCount": 1,
    "expenseDate": "2026-01-15",
    "dueDate": "",
    "accountingDate": "2026-01-15",
    "approvedDate": "2026-01-16T09:00:00Z",
    "recipientId": "merchant_identifier",
    "recipientType": "MERCHANT",
    "paymentDate": "2026-01-17T11:00:00Z",
    "amount": 1500.00,
    "currency": "INR",
    "state": "APPROVED",
    "paymentState": "PAID",
    "amountPaid": 1500.00,
    "dateCreated": "2026-01-15T10:30:00Z",
    "remarks": "Approved by manager",
    "source": "WEB",
    "syncedReferenceId": "ACC-REF-001",
    "documentId": "document_identifier",
    "syncState": "SYNCED",
    "syncMode": "AUTO",
    "selfUrl": "https://app.pazy.io/p/expense/expense_identifier",
    "identifier": "EXP-2026-001",
    "cardInfo": {
      "name": "John Doe",
      "slug": "card_identifier",
      "maskedCardNumber": "XXXX XXXX XXXX 1234",
      "description": "Corporate Card",
      "dateCreated": "2025-12-01T00:00:00Z",
      "provider": "VISA"
    },
    "transaction": {
      "utr": "123456789012",
      "dateConfirmed": "2026-01-15T10:30:00Z",
      "narration": "UPI/abc@bank/Team lunch",
      "ledgerId": "ledger_identifier"
    },
    "initiator": {
      "slug": "user_identifier",
      "name": "John Doe",
      "email": "john@example.com"
    },
    "merchant": {
      "name": "ABC Restaurant",
      "vpa": "abc@bank",
      "mcc": {
        "code": "5812",
        "groupSlug": "food-and-dining",
        "groupName": "Food & Dining",
        "groupDescription": "Restaurants and eating places",
        "groupExtra": null
      }
    },
    "vendor": {
      "slug": "vendor_identifier",
      "name": "ABC Restaurant Pvt Ltd",
      "email": "billing@abcrestaurant.com"
    },
    "lineItems": [
      {
        "id": "line_item_identifier",
        "description": "Lunch",
        "amount": 1500.00,
        "rate": 1500.00,
        "quantity": 1,
        "ledgerType": "EXPENSE",
        "ledgerId": "ledger_identifier",
        "skuId": null,
        "trxTax": {
          "type": "GST",
          "amount": 75.00,
          "name": "GST 5%",
          "deductionType": null,
          "deductionValue": null,
          "id": 132
        },
        "whtTax": {
          "type": "TDS",
          "amount": 0,
          "name": "",
          "deductionType": null,
          "deductionValue": null,
          "id": null
        },
        "amountBreakdown": {
          "subTotal": 1425.00,
          "grossTotal": 1500.00,
          "netPayable": 1500.00
        }
      }
    ]
  }
}

Error Responses

Missing Expense ID

HTTP Status: 400 Bad Request
{
  "ok": false,
  "error": {
    "code": "MISSING_REQUIRED_FIELD",
    "message": "Expense ID is required"
  }
}

Expense Not Found

HTTP Status: 404 Not Found
{
  "ok": false,
  "error": {
    "code": "EXPENSE_NOT_FOUND",
    "message": "Expense not found"
  }
}

Access Denied

HTTP Status: 403 Forbidden
{
  "ok": false,
  "error": {
    "code": "ACCESS_DENIED",
    "message": "Access denied: You can only view vendors you own"
  }
}

Authentication Errors

HTTP Status: 401 Unauthorized
{
  "ok": false,
  "error": {
    "code": "MISSING_CREDENTIALS",
    "message": "Missing Credentials"
  }
}
{
  "ok": false,
  "error": {
    "code": "INVALID_API_KEY",
    "message": "Invalid API Key"
  }
}

Permission Errors

HTTP Status: 403 Forbidden
{
  "ok": false,
  "error": {
    "code": "INSUFFICIENT_PERMISSIONS",
    "message": "Permission check failed - PERMISSION_CHECK_FAILED"
  }
}

Internal Error

HTTP Status: 500 Internal Server Error
{
  "ok": false,
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal error"
  }
}

Best Practices

  • Use the id returned by the Expense List API as the expenseId path parameter
  • amountBreakdown is computed per line item: subTotal excludes transaction tax, grossTotal adds it back, and netPayable subtracts withholding tax
  • merchant.mcc and processingStatus are only present when the underlying data exists — guard for their absence
  • Access is limited to users with expense read permission and an admin or bookkeeper role