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

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/comments \
  -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 comments response data
data.commentsarrayList of comments associated with the invoice
data.comments[].contentstringThe content of the comment
data.comments[].typestringThe type of the comment. It is one of five values: GENERAL, DECLINE, APPROVAL, REMARKS, FLAG
data.comments[].dateCreatedstringDate when the comment was created (ISO 8601 format)
data.comments[].userobjectInformation about the user who made the comment
data.comments[].user.idstringUnique identifier for the user
data.comments[].user.namestringName of the user
data.contextobjectAdditional context for the comments
data.context.countnumberThe total number of comments

Response Example

{
  "ok": true,
  "data": {
    "comments": [
      {
        "content": "@Jane Smith Hello Hi testing @John Q",
        "type": "GENERAL",
        "dateCreated": "2026-03-28T09:11:30.293Z",
        "user": {
          "id": "udEuCDNptqWF7881",
          "name": "John Doe"
        }
      },
      {
        "content": "Hello",
        "type": "GENERAL",
        "dateCreated": "2026-03-28T08:54:42.476Z",
        "user": {
          "id": "udEuCDNptqWF7881",
          "name": "John Doe"
        }
      },
      {
        "content": "@Jane Smith @John Q Testing",
        "type": "GENERAL",
        "dateCreated": "2026-03-28T08:52:28.625Z",
        "user": {
          "id": "udEuCDNptqEF7881",
          "name": "John Doe"
        }
      },
      {
        "content": "@Jane Smith Hi",
        "type": "GENERAL",
        "dateCreated": "2026-03-28T08:50:15.571Z",
        "user": {
          "id": "udEuCDNptqEF7881",
          "name": "John Doe"
        }
      }
    ],
    "context": {
      "count": 4
    }
  }
}

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 comments