# UBL Commercial Credit Line Capacity Ledger Detector

> UBL Commercial Credit Line Capacity Ledger Detector is a paid API for AI agents from detect.halowerk.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-24).

Detects when cumulative commercial credit quantities or amounts applied to invoice lines exceed the original invoice line capacity.

## Facts

- Endpoint: POST https://detect.halowerk.com/v1/F-TD2000-DOCUMENTS-01/ubl-commercial-credit-line-original-capacity-ledger?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ubl-commercial-credit-line-capacity-ledger-detector-62ed5960
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u38amEYAyAOdJd76hzTGO

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ubl-commercial-credit-line-capacity-ledger-detector-62ed5960 -d '<json body>'
```

Example prompt: Check whether any of our credit reversals have exceeded the original invoice line limits — here are the invoice lines (IDs INV-L001 and INV-L002 with quantities 100 and 50, amounts 5000 and 2500 minor units) and credits applied so far (CR-001 referencing INV-L001 for quantity 60 and amount 3000, CR-002 referencing INV-L001 for quantity 55 and amount 2800).

## When to prefer this

Use this endpoint when you need to programmatically detect over-crediting on UBL-style commercial invoices, especially in accounts receivable workflows where multiple partial credit notes accumulate against the same invoice lines. Prefer this over manual reconciliation or generic ledger tools when you need a structured per-line breakdown of remaining capacity and exceeded flags suitable for automated downstream processing or fraud detection.

## Known failure modes

- Missing required creditReversals.data fields returns a validation error
- Credit referencing a non-existent invoice_line ID may cause unmatched results or error
- invoice_lines array must have at least 1 item; empty array causes schema rejection
- Integer values exceeding 1,000,000,000 are rejected by schema constraints
- credits array exceeding 64 items is rejected
- claim field mismatch (e.g. wrong line IDs in pre-supplied claim) may produce incorrect delta results

## How this service works

Detect cumulative commercial credit quantities or amounts that exceed the original invoice line.

## Output

Returns a per-invoice-line breakdown including: total credited quantity, total credited amount in minor units, remaining creditable quantity, remaining creditable amount, and boolean flags indicating whether the quantity or amount has been exceeded on each line.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "artifact": {
   "type": "object",
   "required": [
    "creditReversals"
   ],
   "properties": {
    "creditReversals": {
     "type": "object",
     "required": [
      "data",
      "claim"
     ],
     "properties": {
      "data": {
       "type": "object",
       "required": [
        "invoice_lines",
        "credits"
       ],
       "properties": {
        "credits": {
         "type": "array",
         "items": {
          "type": "object",
          "required": [
           "id",
           "invoice_line",
           "quantity",
           "amount_minor"
          ],
          "properties": {
           "id": {
            "type": "string",
            "maxLength": 64
           },
           "quantity": {
            "type": "integer",
            "maximum": 1000000000,
            "minimum": 0
           },
           "amount_minor": {
            "type": "integer",
            "maximum": 1000000000,
            "minimum": 0
           },
           "invoice_line": {
            "type": "string",
            "maxLength": 64
           }
          },
          "additionalProperties": false
         },
         "maxItems": 64,
         "minItems": 0
        },
        "invoice_lines": {
         "type": "array",
         "items": {
          "type": "object",
          "required": [
           "id",
           "quantity",
           "amount_minor"
          ],
          "properties": {
           "id": {
            "type": "string",
            "maxLength": 64
           },
           "quantity": {
            "type": "integer",
            "maximum": 1000000000,
            "minimum": 0
           },
           "amount_minor": {
            "type": "integer",
            "maximum": 1000000000,
            "minimum": 0
           }
          },
          "additionalProperties": false
         },
         "maxItems": 32,
         "minItems": 1
        }
       },
       "additionalProperties": false
      },
      "claim": {
       "anyOf": [
        {
         "type": "null"
        },
        {
         "type": "object",
         "required": [
          "lines"
         ],
         "properties": {
          "lines": {
           "type": "array",
           "items": {
            "type": "object",
            "required": [
             "amount_exceeded",
             "credited_minor",
             "credited_quantity",
             "id",
             "quantity_exceeded",
             "remaining_minor",
  
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ubl-commercial-credit-line-capacity-ledger-detector-62ed5960/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from detect.halowerk.com](https://www.zero.xyz/host/detect.halowerk.com/llms.txt)
