GuardQuote
Parse natural language guard transaction text using AI
Parses a natural language description of a guard transaction into structured fields using LLM integration (Google Gemini).
Example Request:
{
"text": "Thames Trading needs to buy €650k against GBP in 45 days for supplier invoice TT-2025-443 with 25 basis points and they want to pay later"
}
Example Response:
{
"payReceive": "PAY",
"foreignCurrency": "EUR",
"guardCurrency": "GBP",
"foreignAmount": 650000,
"guardSettlementWindowTo": "2026-01-06T00:00:00Z",
"salesMarginRate": 0.0025,
"externalRef": "TT-2025-443",
"companyName": "Thames Trading",
"isPayLater": true,
"amountInputMode": "foreign",
"reason": "Supplier invoice TT-2025-443"
}
What gets parsed:
- Direction: "buy" → PAY
- Amount: "€650k" → 650000 (foreignAmount)
- Amount mode: "foreign" (indicates foreignAmount was specified, not targetGuardAmount)
- Currency pair: "€" → EUR, "against GBP" → GBP
- Settlement: "in 45 days" → calculated date
- Margin: "25 basis points" → 0.0025 (decimal rate)
- Reference: "invoice TT-2025-443" → TT-2025-443
- Company/Customer: Returned as strings (companyName, customerName, customerEmail) for client-side fuzzy matching
- Payment terms: "pay later" → true
- Context: "supplier invoice" → extracted to reason field
The parsed fields can then be used to pre-populate a guard quote request. Client performs fuzzy matching against their company/customer lists.
post/api-regulated/v1/guard-quotes/smart-parse
Request
- Base URL: https://api.currencyguard.com
- URL: https://api.currencyguard.com/api-regulated/v1/guard-quotes/smart-parse
- Auth: HTTP bearer
Request body
Example request
{
"text": "Thames Trading needs to buy €650k against GBP in 45 days for supplier invoice TT-2025-443 with 25 basis points and they want to pay later"
}Response
Text successfully parsed
Example response
{
"payReceive": "PAY",
"foreignCurrency": "EUR",
"guardCurrency": "GBP",
"foreignAmount": 650000,
"targetGuardAmount": 735000,
"guardSettlementWindowTo": "2026-01-06T00:00:00Z",
"salesMarginRate": 0.0025,
"salesMarginAmount": 800,
"guardMarginRate": 0.01,
"paymentMarginAtInception": 0.01,
"externalRef": "TT-2025-443",
"companyName": "Thames Trading",
"customerName": "John Smith",
"customerEmail": "john.smith@thamestrading.co.uk",
"isPayLater": true,
"amountInputMode": "foreign",
"reason": "Supplier invoice TT-2025-443"
}Changes
No recorded changes to this operation across all 1 revision of this API.