{"openapi":"3.1.0","info":{"title":"POST /api/v1/bills/payment-suggestions/{suggestion_id}/accept","version":"1.0.0","description":"Accept a bill payment suggestion"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/bills/payment-suggestions/{suggestion_id}/accept":{"post":{"tags":["bills"],"summary":"Accept a bill payment suggestion","description":"Accept a suggestion and create the actual BillPayment.","operationId":"accept_bill_payment_suggestion_api_v1_bills_payment_suggestions__suggestion_id__accept_post","parameters":[{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","title":"Suggestion Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillPaymentResponse"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"detail":"Invalid request parameters"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"detail":"Resource not found"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BillPaymentResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Payment record UUID."},"bill_id":{"type":"string","title":"Bill Id","description":"UUID of the bill being paid."},"transaction_id":{"type":"string","title":"Transaction Id","description":"UUID of the bank transaction."},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount","description":"Payment amount in cents."},"currency":{"type":"string","title":"Currency","description":"Currency for the payment (USD, CAD, AUD, EUR, or GBP).","default":"USD"},"paid_on":{"type":"string","format":"date-time","title":"Paid On","description":"Payment date."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Record creation timestamp."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last update timestamp."},"business_id":{"type":"string","title":"Business Id","description":"Business UUID."}},"type":"object","required":["id","bill_id","transaction_id","amount","paid_on","created_at","updated_at","business_id"],"title":"BillPaymentResponse","description":"Response schema for a bill payment record.\n\nRepresents a payment made against a bill, linking to the bank transaction.","example":{"amount":250000,"bill_id":"019ab37c-bill-7000-8000-000000000001","business_id":"019ab37c-bus1-7000-8000-000000000001","created_at":"2024-01-25T10:30:00Z","id":"019ab37c-pay1-7000-8000-000000000001","paid_on":"2024-01-25T00:00:00Z","transaction_id":"019ab37c-txn1-7000-8000-000000000001","updated_at":"2024-01-25T10:30:00Z"}},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}