c. CallMint
← All documentation

invoice-policy

POST /v1/invoice-policy

Invoice Policy API

Apply your project’s immutable invoice rules and check vendor/invoice-number duplicates without storing raw invoices.

30 credits · USD $0.030

Input schema

{
  "type": "object",
  "properties": {
    "project_id": {
      "type": "string",
      "maxLength": 100,
      "x-maxUtf8Bytes": 100
    },
    "rule_version": {
      "type": "integer",
      "minimum": 1
    },
    "invoice": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "minItems": 1,
          "maxItems": 200,
          "items": {
            "type": "object",
            "properties": {
              "quantity": {
                "oneOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 999999999999
                  },
                  {
                    "type": "string",
                    "pattern": "^\\d{1,12}(\\.\\d{1,6})?$"
                  }
                ]
              },
              "unit_price": {
                "oneOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 999999999999
                  },
                  {
                    "type": "string",
                    "pattern": "^\\d{1,12}(\\.\\d{1,6})?$"
                  }
                ]
              }
            },
            "required": [
              "quantity",
              "unit_price"
            ]
          }
        },
        "total": {
          "oneOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 999999999999
            },
            {
              "type": "string",
              "pattern": "^\\d{1,12}(\\.\\d{1,6})?$"
            }
          ]
        },
        "tax": {
          "oneOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 999999999999
            },
            {
              "type": "string",
              "pattern": "^\\d{1,12}(\\.\\d{1,6})?$"
            }
          ]
        },
        "discount": {
          "oneOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 999999999999
            },
            {
              "type": "string",
              "pattern": "^\\d{1,12}(\\.\\d{1,6})?$"
            }
          ]
        },
        "currency": {
          "enum": [
            "USD",
            "EUR",
            "GBP",
            "AUD",
            "CAD",
            "JPY",
            "KWD"
          ]
        },
        "vendor": {
          "type": "string",
          "maxLength": 200,
          "x-maxUtf8Bytes": 200
        },
        "invoice_number": {
          "type": "string",
          "maxLength": 200,
          "x-maxUtf8Bytes": 200
        }
      },
      "required": [
        "items",
        "total"
      ],
      "description": "Vendor and invoice_number are required unless duplicate_check is false in the chosen policy."
    }
  },
  "required": [
    "project_id",
    "rule_version",
    "invoice"
  ]
}

Request

curl -X POST 'https://staging.callmint.dev/v1/invoice-policy' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Idempotency-Key: unique-request-001' \
  -H 'Content-Type: application/json' \
  -d '{"project_id":"YOUR_PROJECT_ID","rule_version":1,"invoice":{"vendor":"Example vendor","invoice_number":"INV-001","items":[{"quantity":2,"unit_price":"10.00"}],"total":"20.00","currency":"USD"}}'

Response result

{
  "project_id": "YOUR_PROJECT_ID",
  "kind": "invoice",
  "passed": true,
  "findings": [],
  "severity": "none",
  "rule_version": 1,
  "checked_at": "2026-11-03T00:00:00.000Z",
  "fingerprint": "KEYED_DIGEST",
  "duplicate": false,
  "changes": []
}

Limitations

30 credits per successful check, including a failed policy finding. Uses invoice-validator arithmetic. Duplicate identity is the normalized vendor and invoice number within one project, retained for 90 days; a retry with the same Idempotency-Key is not a duplicate. Select an explicit policy version. Findings retain no raw invoice; policy rules may contain a vendor requirement. Not tax-law validation.

All enabled routes accept a JSON object of at most 60,000 UTF-8 bytes. String limits are also measured in UTF-8 bytes.

Questions about invoice-policy

What does this endpoint guarantee?

30 credits per successful check, including a failed policy finding. Uses invoice-validator arithmetic. Duplicate identity is the normalized vendor and invoice number within one project, retained for 90 days; a retry with the same Idempotency-Key is not a duplicate. Select an explicit policy version. Findings retain no raw invoice; policy rules may contain a vendor requirement. Not tax-law validation.

How much does a call cost?

30 credits (USD $0.030) per successful call. Invalid inputs and upstream failures are refunded.

Get started Authentication and billing guide