Skip to main content
Vendor Advances API
curl --request GET \
  --url https://api.pazy.io/v1.0/vendor/:id/advances

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 Vendor to retrieve

Code Examples

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

Success Response

HTTP Status: 200 OK Response Fields:
FieldTypeDescription
okbooleanIndicates whether the request was successful
dataobjectContains the vendor advances response data
data.advancesarrayList of advances entries associated with the vendor
data.advances[].idstringUnique identifier for the advance
data.advances[].dateCreatedstringISO 8601 timestamp of when the advance was created
data.advances[].paymentReasonstringReason for the payment e.g. ADVANCE, PURCHASE_ORDER_ADVANCE
data.advances[].matchingStatestringMatching status of the advance e.g. MATCHED, UNMATCHED
data.advances[].currencystringCurrency code for the advance e.g. INR
data.advances[].paymentRequestobjectAssociated payment request
data.advances[].taxobjectTax details associated with the advance
data.advances[].amountobjectBreakdown of advance amounts
data.advances[].amount.totalAmountnumberTotal amount of the advance
data.advances[].amount.amountSettlednumberAmount that has been settled
data.advances[].amount.pendingAmountnumberAmount still pending settlement
data.advances[].syncStatusstringSync status with external systems e.g. NOT_SYNCED, SYNCED
data.advances[].invoicesarrayList of invoices linked to this advance
data.advances[].invoices[].idstringUnique identifier for the invoice
data.advances[].invoices[].invoiceNostringHuman-readable invoice number
data.advances[].invoices[].amountSettlednumberAmount settled against this invoice
data.advances[].invoices[].currencystringCurrency code for the invoice
data.advances[].userobjectInformation about the user associated with the advance
data.advances[].user.idstringUnique identifier for the user
data.advances[].user.namestringName of the user
data.contextobjectAdditional context for the advances
data.context.countnumberThe total number of advances

Response Example

{
    "ok": true,
    "data": {
        "advances": [
            {
                "id": "poi1jifw7RS2znD3cD",
                "dateCreated": "2025-05-21T08:22:42.483Z",
                "paymentReason": "PURCHASE_ORDER_ADVANCE",
                "matchingState": "UNMATCHED",
                "currency": "INR",
                "paymentRequest": {
                    "slug": "prz1Ur73Q6nhNWHz",
                    "sequenceNo": "615"
                },
                "tax": {
                    "TDS": {
                        "amount": "0"
                    }
                },
                "amount": {
                    "totalAmount": 123,
                    "amountSettled": 0,
                    "pendingAmount": 123
                },
                "syncStatus": "NOT_SYNCED",
                "invoices": [],
                "user": {
                    "id": "uoy93xheb1u",
                    "name": "John Doe"
                }
            },
            {
                "id": "poiGcdJ6Hh42v6gTKmik87j",
                "dateCreated": "2025-05-16T04:31:06.683Z",
                "paymentReason": "ADVANCE",
                "matchingState": "PARTIALLY_MATCHED",
                "currency": "INR",
                "paymentRequest": null,
                "tax": {
                    "TDS": {
                        "amount": "800"
                    }
                },
                "amount": {
                    "totalAmount": 19200,
                    "amountSettled": 37.2,
                    "pendingAmount": 19162.8
                },
                "syncStatus": "NOT_SYNCED",
                "invoices": [
                    {
                        "id": "i9xgdCX7O9ejHXtTD89D3",
                        "invoiceNo": "004",
                        "amountSettled": 37.2,
                        "currency": "INR"
                    }
                ],
                "user": {
                    "id": "uNTwHYj1PFepak5Q",
                    "name": "John Doe"
                }
            }
        ],
        "context": {
            "count": 2,
            "isVendorAdvancesEnabled": true,
            "accountingName": "TALLY",
            "baseCurrency": "INR"
        }
    }
}

Error Responses

Missing Vendor ID

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

Vendor Not Found

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

Access Denied

HTTP Status: 403 Forbidden
{
  "ok": false,
  "error": {
    "code": "ACCESS_DENIED",
    "message": "Access denied: You can only view your own vendors or vendors 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 vendors you created or where you are the vendor owner are accessible (unless you have admin or auditor role)
  • Use the vendor id returned from the vendor creation endpoint to retrieve advances