Skip to main content
Invoice Details API
curl --request GET \
  --url https://api.pazy.io/v1.0/invoice/:id

Authentication

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

Request

Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the invoice to retrieve

Code Examples

curl -X GET https://api.pazy.io/v1.0/invoice/invoice_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 invoice detail response data
data.idstringUnique identifier for the invoice
data.invoiceNumberstringInvoice number as specified on the invoice document
data.descriptionstringDescription or notes about the invoice
data.invoiceDatestringDate when the invoice was issued (ISO 8601 format)
data.dueDatestringDue date for invoice payment (ISO 8601 format)
data.amountnumberTotal invoice amount
data.currencystringCurrency code (e.g., INR, USD)
data.statestringCurrent state of the invoice. Possible values include: DRAFTED, PENDING, APPROVED, PAID, DECLINED, DELETED, APPROVAL_PENDING, etc.
data.paymentStatestringPayment state of the invoice. Possible values include: PAID, MARKED_AS_PAID, PARTIALLY_PAID, UNPAID, etc.
data.amountPaidnumberAmount that has been paid towards this invoice
data.dateCreatedstringDate when the invoice was created in the system (ISO 8601 format)
data.remarksstringAdditional remarks or notes associated with the invoice
data.sourcestringSource of invoice creation. Possible values: API, WEB, EMAIL, SLACK, WHATSAPP, APP, etc.
data.syncedReferenceIdstringReference identifier from the accounting system if the invoice has been synced
data.taxobjectTax information object containing tax breakdown
data.tax.subTotalnumberSubtotal amount before taxes
data.tax.gstnumberGST (Goods and Services Tax) amount
data.tax.tdsnumberTDS (Tax Deducted at Source) amount
data.tax.roundOffnumberRound-off adjustment amount
data.vendorobjectVendor information object
data.vendor.idstringUnique identifier for the vendor
data.vendor.namestringDisplay name of the vendor
data.vendor.legalNamestringLegal name of the vendor
data.vendor.logostringURL to the vendor’s logo image
data.vendor.localitystringVendor locality type. Possible values: DOMESTIC, INTERNATIONAL
data.syncStatestringSynchronization state with accounting system. Possible values: SYNCED, NOT_SYNCED, SYNCED_WITH_ERRORS, etc.
data.accountingDatestringDate recorded in the accounting system (ISO 8601 format)
data.approvedDatestringDate when the invoice was approved (ISO 8601 format)
data.paymentDatestringDate when the invoice was paid (ISO 8601 format)
data.selfUrlstringShareable URL for viewing the invoice in the web interface
data.accountingPlatformstringName of the connected accounting platform (e.g., “Tally”, “Zoho Books”, “Oracle Fusion”) if available
data.processingStatusobjectProcessing status information for invoices that are still being processed
data.processingStatus.processingIdstringIdentifier for the processing job
data.processingStatus.statusstringCurrent processing status. Possible values: QUEUED, PROCESSING, PROCESSED, FILLED, FAILED, USER_CANCELLED, DISCARDED
data.processingStatus.isReadybooleanIndicates whether the invoice processing is complete and the invoice is ready for use

Response Example

{
  "ok": true,
  "data": {
    "id": "invoice_identifier",
    "invoiceNumber": "INV-2024-001",
    "description": "Monthly services invoice",
    "invoiceDate": "2024-01-15",
    "dueDate": "2024-02-15",
    "amount": 50000.00,
    "currency": "INR",
    "state": "APPROVED",
    "paymentState": "UNPAID",
    "amountPaid": 0.00,
    "dateCreated": "2024-01-15T10:30:00Z",
    "remarks": "Payment due in 30 days",
    "source": "API",
    "syncedReferenceId": "ACC-REF-12345",
    "tax": {
      "subTotal": 44000.00,
      "gst": 6000.00,
      "tds": 0.00,
      "roundOff": 0.00
    },
    "vendor": {
      "id": "vendor_identifier",
      "name": "ABC Suppliers",
      "legalName": "ABC Suppliers Private Limited",
      "logo": "https://cdn.pazy.io/logos/vendor_logo.png",
      "locality": "DOMESTIC"
    },
    "syncState": "SYNCED",
    "accountingDate": "2024-01-15",
    "approvedDate": "2024-01-16T14:20:00Z",
    "paymentDate": null,
    "selfUrl": "https://app.pazy.io/invoice/invoice_identifier",
    "accountingPlatform": "Tally",
    "processingStatus": {
      "processingId": "job_123456",
      "status": "FILLED",
      "isReady": true
    }
  }
}

Error Responses

Missing Invoice ID

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

Invoice Not Found

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

Access Denied

HTTP Status: 403 Forbidden
{
  "ok": false,
  "error": {
    "code": "ACCESS_DENIED",
    "message": "Access denied: You can only view your own invoices or invoices where you are the vendor owner"
  }
}

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"
  }
}

Best Practices

Access Control

  • Only invoices you created or where you are the vendor owner are accessible (unless you have admin or auditor role)
  • Use the invoice id returned from the invoice creation endpoint to retrieve details
  • Check the processingStatus.isReady field to ensure the invoice is fully processed before using its data

Invoice States

  • Common invoice states: DRAFTED, PENDING, APPROVED, PAID, DECLINED
  • Use processingStatus field to track invoice processing for newly uploaded invoices
  • Check syncState to verify accounting system synchronization status