{"openapi":"3.1.0","info":{"title":"INGA business tools","version":"1.0.0"},"servers":[{"url":"https://pay.ingapay.se"}],"components":{"securitySchemes":{"agentKey":{"type":"http","scheme":"bearer"}}},"security":[{"agentKey":[]}],"paths":{"/v1/agent/tools/get_business_config":{"post":{"operationId":"get_business_config","description":"Read the selected business and supported actions. Only businesses explicitly granted to this credential are available.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":[]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/get_business_overview":{"post":{"operationId":"get_business_overview","description":"Read totals and unresolved payment/invoice operations for this business. Amounts are öre. This is not a bank balance or uptime check.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":[]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/list_payments":{"post":{"operationId":"list_payments","description":"List this business payment history; follow next_cursor for more.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","maxLength":300},"q":{"type":"string","maxLength":100},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":[]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/get_payment":{"post":{"operationId":"get_payment","description":"Read payment status. CREATED is accepted, not paid. UNKNOWN requires reconciliation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/list_invoices":{"post":{"operationId":"list_invoices","description":"List this business invoices; follow next_cursor for more.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","maxLength":300},"q":{"type":"string","maxLength":100},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":[]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/get_invoice":{"post":{"operationId":"get_invoice","description":"Read one invoice and its saved items and payment status.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/preview_invoice":{"post":{"operationId":"preview_invoice","description":"Validate an invoice without issuing, reserving a number, sending messages or charging anyone. Returns version and total. Sending defaults to false.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"invoice":{"type":"object","additionalProperties":false,"required":["items","customer_name"],"properties":{"customer_name":{"type":"string","minLength":1,"maxLength":120},"customer_email":{"type":"string","maxLength":160},"customer_phone":{"type":"string","maxLength":30},"due_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"invoice_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"source_id":{"type":"string","maxLength":40},"note":{"type":"string","maxLength":300},"your_reference":{"type":"string","maxLength":80},"customer_orgnr":{"type":"string","maxLength":20},"customer_address":{"type":"string","maxLength":160},"send_email":{"type":"boolean"},"send_sms":{"type":"boolean"},"items":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","additionalProperties":false,"required":["desc","qty","unit_ore","vat_rate"],"properties":{"desc":{"type":"string","minLength":1,"maxLength":200},"qty":{"type":"integer","minimum":1,"maximum":9999},"unit_ore":{"type":"integer","minimum":1,"maximum":100000000},"vat_rate":{"type":"integer","enum":[0,6,12,25]}}}}}},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["invoice"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/create_invoice":{"post":{"operationId":"create_invoice","description":"Issue the previewed invoice. Requires expectedVersion, maxAmountOre and a stable idempotencyKey. Only explicit send_email/send_sms sends customer messages. Never change the key after an uncertain result.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"invoice":{"type":"object","additionalProperties":false,"required":["items","customer_name"],"properties":{"customer_name":{"type":"string","minLength":1,"maxLength":120},"customer_email":{"type":"string","maxLength":160},"customer_phone":{"type":"string","maxLength":30},"due_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"invoice_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"source_id":{"type":"string","maxLength":40},"note":{"type":"string","maxLength":300},"your_reference":{"type":"string","maxLength":80},"customer_orgnr":{"type":"string","maxLength":20},"customer_address":{"type":"string","maxLength":160},"send_email":{"type":"boolean"},"send_sms":{"type":"boolean"},"items":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","additionalProperties":false,"required":["desc","qty","unit_ore","vat_rate"],"properties":{"desc":{"type":"string","minLength":1,"maxLength":200},"qty":{"type":"integer","minimum":1,"maximum":9999},"unit_ore":{"type":"integer","minimum":1,"maximum":100000000},"vat_rate":{"type":"integer","enum":[0,6,12,25]}}}}}},"expectedVersion":{"type":"string","pattern":"^[a-f0-9]{64}$"},"maxAmountOre":{"type":"integer","minimum":100,"maximum":100000000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["invoice","expectedVersion","maxAmountOre","idempotencyKey"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/get_operation":{"post":{"operationId":"get_operation","description":"Inspect an earlier action. pending/unknown is never permission to repeat with a new key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/list_businesses":{"post":{"operationId":"list_businesses","description":"List the businesses explicitly granted to this key. Use merchantId on every business tool for a multi-business key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/list_consents":{"post":{"operationId":"list_consents","description":"List consents in the selected business. Follow next_cursor.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","maxLength":300},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":[]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/get_consent":{"post":{"operationId":"get_consent","description":"Read one consent and the system that owns it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/list_products":{"post":{"operationId":"list_products","description":"List products in the selected business. Follow next_cursor.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","maxLength":300},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":[]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/get_product":{"post":{"operationId":"get_product","description":"Read one product and the system that owns it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/list_schedules":{"post":{"operationId":"list_schedules","description":"List schedules in the selected business. Follow next_cursor.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","maxLength":300},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":[]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/get_schedule":{"post":{"operationId":"get_schedule","description":"Read one schedule and the system that owns it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/preview_create_draw":{"post":{"operationId":"preview_create_draw","description":"Preview without changes. Request a real EXTRA Swish debit on an active consent. This does not advance or replace its recurring schedule. Bank acceptance is not confirmed payment.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"amountOre":{"type":"integer","minimum":100,"maximum":100000000},"reason":{"type":"string","minLength":1,"maxLength":200},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","amountOre","reason"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/create_draw":{"post":{"operationId":"create_draw","description":"Request a real EXTRA Swish debit on an active consent. This does not advance or replace its recurring schedule. Bank acceptance is not confirmed payment. Requires the preview version, explicit amount ceiling and a stable idempotency key. Inspect unknown outcomes; never change the key to retry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"amountOre":{"type":"integer","minimum":100,"maximum":100000000},"reason":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"maxAmountOre":{"type":"integer","minimum":0,"maximum":100000000},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","amountOre","reason","expectedVersion","idempotencyKey","maxAmountOre"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/preview_create_refund":{"post":{"operationId":"preview_create_refund","description":"Preview without changes. Return money against one original PAID Swish or Stripe payment. Never more than its unrefunded amount.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"amountOre":{"type":"integer","minimum":100,"maximum":100000000},"reason":{"type":"string","minLength":1,"maxLength":200},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","amountOre","reason"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/create_refund":{"post":{"operationId":"create_refund","description":"Return money against one original PAID Swish or Stripe payment. Never more than its unrefunded amount. Requires the preview version, explicit amount ceiling and a stable idempotency key. Inspect unknown outcomes; never change the key to retry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"amountOre":{"type":"integer","minimum":100,"maximum":100000000},"reason":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"maxAmountOre":{"type":"integer","minimum":0,"maximum":100000000},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","amountOre","reason","expectedVersion","idempotencyKey","maxAmountOre"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/preview_update_consent":{"post":{"operationId":"preview_update_consent","description":"Preview without changes. Update an Inga-owned consent amount or draw schedule. Changes affect future automatic debits, outside this key’s immediate daily budget. Does not change bank-approved consent identity.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"patch":{"type":"object","additionalProperties":false,"properties":{"monthly_amount_ore":{"type":"integer","minimum":100,"maximum":100000000},"draw_day":{"type":"integer","minimum":1,"maximum":28},"next_draw_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end_date":{"type":"string","pattern":"^(|\\d{4}-\\d{2}-\\d{2})$"}}},"reason":{"type":"string","minLength":1,"maxLength":200},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","patch","reason"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/update_consent":{"post":{"operationId":"update_consent","description":"Update an Inga-owned consent amount or draw schedule. Changes affect future automatic debits, outside this key’s immediate daily budget. Does not change bank-approved consent identity. Requires the preview version, explicit amount ceiling and a stable idempotency key. Inspect unknown outcomes; never change the key to retry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"patch":{"type":"object","additionalProperties":false,"properties":{"monthly_amount_ore":{"type":"integer","minimum":100,"maximum":100000000},"draw_day":{"type":"integer","minimum":1,"maximum":28},"next_draw_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end_date":{"type":"string","pattern":"^(|\\d{4}-\\d{2}-\\d{2})$"}}},"reason":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"maxAmountOre":{"type":"integer","minimum":0,"maximum":100000000},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","patch","reason","expectedVersion","idempotencyKey","maxAmountOre"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/preview_revoke_consent":{"post":{"operationId":"preview_revoke_consent","description":"Preview without changes. Permanently revoke an Inga-owned Swish consent at the bank. It cannot be restored without new customer approval.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"reason":{"type":"string","minLength":1,"maxLength":200},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","reason"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/revoke_consent":{"post":{"operationId":"revoke_consent","description":"Permanently revoke an Inga-owned Swish consent at the bank. It cannot be restored without new customer approval. Requires the preview version, explicit amount ceiling and a stable idempotency key. Inspect unknown outcomes; never change the key to retry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"reason":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"maxAmountOre":{"type":"integer","minimum":0,"maximum":100000000},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","reason","expectedVersion","idempotencyKey","maxAmountOre"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/preview_cancel_invoice":{"post":{"operationId":"preview_cancel_invoice","description":"Preview cancelling (makulera) one open invoice without changes. Paid, split, member-linked (DRIV) invoices and invoices with a started payment are refused. Returns version.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"reason":{"type":"string","minLength":1,"maxLength":200},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","reason"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/cancel_invoice":{"post":{"operationId":"cancel_invoice","description":"Cancel the previewed invoice. A cancelled invoice cannot be restored or marked paid; check for incoming payments first. Sends nothing to the customer. Requires expectedVersion and a stable idempotencyKey; never change the key to retry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"reason":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","reason","expectedVersion","idempotencyKey"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/preview_send_invoice":{"post":{"operationId":"preview_send_invoice","description":"Preview sending one open invoice again as a payment reminder. Choose channels explicitly; at least one must be true. Refused if the invoice was already sent in the last 20 hours. Returns version.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"send_email":{"type":"boolean"},"send_sms":{"type":"boolean"},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","send_email","send_sms"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/send_invoice":{"post":{"operationId":"send_invoice","description":"Send the previewed invoice to the customer on the chosen channels. emailed/smsed confirm provider acceptance, not that the customer read it. Requires expectedVersion and a stable idempotencyKey; never change the key to retry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"send_email":{"type":"boolean"},"send_sms":{"type":"boolean"},"expectedVersion":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","send_email","send_sms","expectedVersion","idempotencyKey"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/preview_update_product":{"post":{"operationId":"preview_update_product","description":"Preview without changes. Change an Inga checkout product price. Only future checkouts use the new price; existing consents and external membership contracts are unchanged.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"patch":{"type":"object","additionalProperties":false,"properties":{"amount_ore":{"type":"integer","minimum":100,"maximum":100000000}}},"reason":{"type":"string","minLength":1,"maxLength":200},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","patch","reason"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/update_product":{"post":{"operationId":"update_product","description":"Change an Inga checkout product price. Only future checkouts use the new price; existing consents and external membership contracts are unchanged. Requires the preview version, explicit amount ceiling and a stable idempotency key. Inspect unknown outcomes; never change the key to retry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"patch":{"type":"object","additionalProperties":false,"properties":{"amount_ore":{"type":"integer","minimum":100,"maximum":100000000}}},"reason":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"maxAmountOre":{"type":"integer","minimum":0,"maximum":100000000},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","patch","reason","expectedVersion","idempotencyKey","maxAmountOre"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/preview_update_schedule":{"post":{"operationId":"preview_update_schedule","description":"Preview without changes. Change an Inga recurring invoice schedule. Future invoices and selected sends run automatically, outside this key’s immediate daily budget.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"patch":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","additionalProperties":false,"required":["desc","qty","unit_ore","vat_rate"],"properties":{"desc":{"type":"string","minLength":1,"maxLength":200},"qty":{"type":"integer","minimum":1,"maximum":9999},"unit_ore":{"type":"integer","minimum":1,"maximum":100000000},"vat_rate":{"type":"integer","enum":[0,6,12,25]}}}},"day_of_month":{"type":"integer","minimum":1,"maximum":28},"interval_months":{"type":"integer","minimum":1,"maximum":12},"period_months":{"type":"integer","minimum":1,"maximum":12},"due_rule":{"type":"string","enum":["end_of_month","net14","net30"]},"active":{"type":"boolean"},"send_email":{"type":"boolean"},"send_sms":{"type":"boolean"}}},"reason":{"type":"string","minLength":1,"maxLength":200},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","patch","reason"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}},"/v1/agent/tools/update_schedule":{"post":{"operationId":"update_schedule","description":"Change an Inga recurring invoice schedule. Future invoices and selected sends run automatically, outside this key’s immediate daily budget. Requires the preview version, explicit amount ceiling and a stable idempotency key. Inspect unknown outcomes; never change the key to retry.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","minLength":1,"maxLength":100},"patch":{"type":"object","additionalProperties":false,"properties":{"items":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","additionalProperties":false,"required":["desc","qty","unit_ore","vat_rate"],"properties":{"desc":{"type":"string","minLength":1,"maxLength":200},"qty":{"type":"integer","minimum":1,"maximum":9999},"unit_ore":{"type":"integer","minimum":1,"maximum":100000000},"vat_rate":{"type":"integer","enum":[0,6,12,25]}}}},"day_of_month":{"type":"integer","minimum":1,"maximum":28},"interval_months":{"type":"integer","minimum":1,"maximum":12},"period_months":{"type":"integer","minimum":1,"maximum":12},"due_rule":{"type":"string","enum":["end_of_month","net14","net30"]},"active":{"type":"boolean"},"send_email":{"type":"boolean"},"send_sms":{"type":"boolean"}}},"reason":{"type":"string","minLength":1,"maxLength":200},"expectedVersion":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":160},"maxAmountOre":{"type":"integer","minimum":0,"maximum":100000000},"merchantId":{"type":"string","minLength":1,"maxLength":100,"description":"Explicit target business. Required for keys covering more than one business; must be in list_businesses."}},"required":["id","patch","reason","expectedVersion","idempotencyKey","maxAmountOre"]}}}},"responses":{"200":{"description":"Tool result"},"403":{"description":"Insufficient permission"},"409":{"description":"Stale preview or conflicting operation"}}}}}}