{"uid":"cap_u38amEYAyAOdJd76hzTGO","slug":"ubl-commercial-credit-line-capacity-ledger-detector-62ed5960","name":"UBL Commercial Credit Line Capacity Ledger Detector","description":"Detect cumulative commercial credit quantities or amounts that exceed the original invoice line.","url":"https://detect.halowerk.com/v1/F-TD2000-DOCUMENTS-01/ubl-commercial-credit-line-original-capacity-ledger?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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","remaining_quantity"],"properties":{"id":{"type":"string","maxLength":20000},"credited_minor":{"type":"integer"},"amount_exceeded":{"type":"boolean"},"remaining_minor":{"type":"integer"},"credited_quantity":{"type":"integer"},"quantity_exceeded":{"type":"boolean"},"remaining_quantity":{"type":"integer"}},"additionalProperties":false},"maxItems":4096}},"additionalProperties":false}]}},"additionalProperties":false}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_uH0JKO-0bG5cUbFQdqCjz","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Detects when cumulative commercial credit quantities or amounts applied to invoice lines exceed the original invoice line capacity.","exampleAgentPrompt":"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).","exampleUseCases":[{"title":"Detect over-credited invoice lines","prompt":"I have two invoice lines — line A for quantity 200 at 10000 minor units and line B for quantity 50 at 2500 minor units — and three credit notes have been applied totaling quantity 210 and amount 10500 against line A. Can you check which lines have been over-credited and by how much?"},{"title":"Credit memo validation before issuance","prompt":"Before I issue this next credit note for 30 units and 1500 minor units against invoice line INV-99, can you verify whether the cumulative credits already applied (45 units, 2250 minor units) would push us over the original line capacity of 70 units and 3500 minor units?"},{"title":"Accounts receivable reconciliation audit","prompt":"Run a full capacity check on all our outstanding invoice lines for this month — I'll give you the original invoice lines and all the credit reversals we've booked so far, and I need to know which lines still have remaining creditable balance and which ones have already been exceeded."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-24T00:45:00.634Z","isFirstParty":false,"canonicalSlug":"ubl-commercial-credit-line-capacity-ledger-detector-62ed5960"}