{"openapi":"3.1.0","info":{"title":"JomeInvoice V2 API Proxy","version":"0.1.0"},"paths":{"/healthcheck":{"get":{"tags":["Health Check"],"summary":"Health Check","operationId":"Health Check-health_check","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/token":{"post":{"tags":["Authentication"],"summary":"Get OAuth2 token","description":"Get an OAuth2 access token via Client Credentials flow","operationId":"Authentication-oauth_token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1OAuthTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{},"example":{"token_type":"Bearer","expires_in":31536000,"access_token":"eyJ0eXAiOiJKV1QiLCJhbGci..."}}}},"400":{"description":"Invalid request","content":{"application/json":{"example":{"error":"invalid_request","error_description":"The request is missing a required parameter"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"example":{"error":"invalid_client","error_description":"Client authentication failed"}}}},"422":{"description":"Validation error","content":{"application/json":{"example":{"status":"error","message":"Validation Failed","error":{"field":["This field is required."]},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}}}}},"/api/buyer":{"post":{"tags":["Buyers"],"summary":"Create Buyer","description":"Create a buyer record with company and contact information","operationId":"Buyers-create_buyer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CreateBuyerRequest"}}},"required":true},"responses":{"200":{"description":"Buyers successfully processed","content":{"application/json":{"schema":{},"example":{"status":"success","message":"Buyer Request Submitted.","data":{"status":"success","accepted_buyers":[{"buyer_uuid":"123e4567-e89b-12d3-a456-426614174000","message":"Buyer created or updated successfully."}],"rejected_buyers":[{"email":"invalid@example.com","message":"Validation failed: Buyer TIN is not verified according to LHDN"}]},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"status":"error","message":"Buyers Request Failed.","error":"The buyers field must be a non-empty array.","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"422":{"description":"Validation error","content":{"application/json":{"example":{"status":"error","message":"Validation Failed","error":{"field":["This field is required."]},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"500":{"description":"Server error","content":{"application/json":{"example":{"status":"error","message":"Buyer Request Failed.","error":"An internal server error occurred","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}}}}},"/api/buyers":{"get":{"tags":["Buyers"],"summary":"Get Buyers","description":"Retrieve list of buyers (authentication required)","operationId":"Buyers-list_buyers","responses":{"200":{"description":"Buyers retrieved successfully","content":{"application/json":{"schema":{},"example":{"data":[{"Status":"Approved","uuid":"1a6802b5-2833-43f7-aeb1-df0c4e9d82d5","Registration Document Type":"BRN","Company Name":"Redsquare Technologies Sdn Bhd","Email":"anis@jomeinvoice.my","Registration Number":"2018029903","Tin Number":"C25762372080","PIC Name":"Anis","PIC Email":"anis@jomeinvoice.my","PIC Contact Number":"60147207275","Address Line 1":"string","Address City":"string","Address Postal Code":"string","Address State":"string","Address Country":"string","Created At":"16-12-2025 15:47:01","Updated At":"16-12-2025 15:47:01"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"example":{"message":"Unauthenticated."}}}}}}},"/api/supplier":{"post":{"tags":["Suppliers"],"summary":"Create Supplier","description":"Create a supplier record with company and contact information","operationId":"Suppliers-create_supplier","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CreateSupplierRequest"}}},"required":true},"responses":{"200":{"description":"Suppliers successfully processed","content":{"application/json":{"schema":{},"example":{"status":"success","message":"Supplier Request Submitted.","data":{"status":"success","accepted_suppliers":[{"supplier_uuid":"123e4567-e89b-12d3-a456-426614174000","message":"Supplier created or updated successfully."}],"rejected_suppliers":[{"email":"invalid@example.com","message":"Validation failed: Supplier TIN is not verified according to LHDN"}]},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"status":"error","message":"Suppliers Request Failed.","error":"The suppliers field must be a non-empty array.","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"422":{"description":"Validation error","content":{"application/json":{"example":{"status":"error","message":"Validation Failed","error":{"field":["This field is required."]},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"500":{"description":"Server error","content":{"application/json":{"example":{"status":"error","message":"Supplier Request Failed.","error":"An internal server error occurred","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}}}}},"/api/suppliers":{"get":{"tags":["Suppliers"],"summary":"Get Suppliers","description":"Retrieve list of suppliers (authentication required)","operationId":"Suppliers-list_suppliers","responses":{"200":{"description":"Suppliers retrieved successfully","content":{"application/json":{"schema":{},"example":{"data":[{"Status":"Approved","uuid":"1a6802b5-2833-43f7-aeb1-df0c4e9d82d5","Registration Document Type":"BRN","Company Name":"Redsquare Technologies Sdn Bhd","Email":"anis@jomeinvoice.my","Registration Number":"2018029903","Tin Number":"C25762372080","PIC Name":"Anis","PIC Email":"anis@jomeinvoice.my","PIC Contact Number":"60147207275","Address Line 1":"string","Address City":"string","Address Postal Code":"string","Address State":"string","Address Country":"string","Created At":"16-12-2025 15:47:01","Updated At":"16-12-2025 15:47:01"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"example":{"message":"Unauthenticated."}}}}}}},"/api/cleartax/invoices/new":{"post":{"tags":["ClearTax"],"summary":"Create invoice(s) from ClearTax JSON","description":"Submit ClearTax UBL JSON invoice payloads to be converted and submitted to LHDN via JomeInvoice. Standard invoices (Type 01) and credit/debit notes (Types 02-04) are supported. Returns accepted and rejected invoices with status and UUIDs.","operationId":"ClearTax-create_invoice_from_cleartax","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxCreateInvoiceRequest"},{"items":{"$ref":"#/components/schemas/ClearTaxCreateInvoiceRequest"},"type":"array"}],"title":"Body"}}},"required":true},"responses":{"200":{"description":"Invoices accepted for processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearTaxCreateInvoiceResponse"},"example":{"data":{"status":"success","accepted_invoices":[{"invoice_number":"INV-001","invoice_uuid":"123e4567-e89b-12d3-a456-426614174000","status":"pending"}],"rejected_invoices":[],"message":"Invoices accepted for processing."},"meta":{"requestId":"123e4567-e89b-12d3-a456-426614174000","apiVersion":"v1"},"message":"Invoices accepted for processing."}}}},"400":{"description":"Invalid ClearTax payload","content":{"application/json":{"example":{"error":"Data validation failed","message":"InvoiceLine is required","meta":{"requestId":"123e4567-e89b-12d3-a456-426614174000","apiVersion":"v1"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"example":{"status":"error","message":"Unauthorized","error":"Missing Authorization header","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"422":{"description":"Validation error","content":{"application/json":{"example":{"data":{"status":"failed","message":"Invoice creation failed","accepted_invoices":[],"rejected_invoices":[{"invoice_number":"INV-002","message":"Invoice Validation failed"}],"errors":["Invalid invoice total"]},"meta":{"requestId":"123e4567-e89b-12d3-a456-426614174000","apiVersion":"v1"},"message":"Invoice creation failed"}}}},"500":{"description":"Internal server error","content":{"application/json":{"example":{"error":"Internal server error","message":"Unexpected error during ClearTax invoice creation","meta":{"requestId":"123e4567-e89b-12d3-a456-426614174000","apiVersion":"v1"}}}}}}}},"/api/invoices":{"post":{"tags":["Invoices"],"summary":"Create Invoices","description":"Submit a batch of invoices for processing. Each invoice is validated individually. Accepted invoices are queued for LHDN submission. Maximum 500 invoices per request.","operationId":"Invoices-create_invoices","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CreateInvoicesRequest"}}}},"responses":{"200":{"description":"Invoices accepted for asynchronous processing","content":{"application/json":{"schema":{},"example":{"status":"success","message":"Invoices accepted for processing.","data":{"status":"success","message":"Invoices accepted for processing. Use the UUIDs to check status via GET /invoices/{uuid}","accepted_invoices":[{"invoice_number":"INV-001","invoice_uuid":"123e4567-e89b-12d3-a456-426614174000","status":"pending","is_resubmission":false}],"rejected_invoices":[{"invoice_number":"INV-002","message":"Invoice Validation failed: MSIC code not found"}]},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"422":{"description":"Validation Error","content":{"application/json":{"example":{"status":"error","message":"Invoices Request Failed.","error":{},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"500":{"description":"Server Error","content":{"application/json":{"example":{"status":"error","message":"Invoices Request Failed.","error":"An internal server error occurred","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}}}},"get":{"tags":["Invoices"],"summary":"Get Invoices","description":"Retrieve a paginated list of invoices based on date range and optional filters","operationId":"Invoices-list_invoices","parameters":[{"name":"date_from","in":"query","required":true,"schema":{"type":"string","description":"Start date for invoice search (YYYY-MM-DD)","title":"Date From"},"description":"Start date for invoice search (YYYY-MM-DD)"},{"name":"date_to","in":"query","required":true,"schema":{"type":"string","description":"End date for invoice search (YYYY-MM-DD)","title":"Date To"},"description":"End date for invoice search (YYYY-MM-DD)"},{"name":"type","in":"query","required":true,"schema":{"type":"string","description":"Invoice type code (01, 02, 03, 04, 11, 12, 13, 14)","title":"Type"},"description":"Invoice type code (01, 02, 03, 04, 11, 12, 13, 14)"},{"name":"due_date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by due date starting from (YYYY-MM-DD)","title":"Due Date From"},"description":"Filter by due date starting from (YYYY-MM-DD)"},{"name":"due_date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by due date until (YYYY-MM-DD)","title":"Due Date To"},"description":"Filter by due date until (YYYY-MM-DD)"},{"name":"buyer_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by buyer UUID","title":"Buyer Uuid"},"description":"Filter by buyer UUID"},{"name":"supplier_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by supplier UUID","title":"Supplier Uuid"},"description":"Filter by supplier UUID"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/InvoiceStatus"},{"type":"null"}],"description":"Filter by invoice status","title":"Status"},"description":"Filter by invoice status"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/InvoiceSortBy"},{"type":"null"}],"description":"Field to sort results by","title":"Sort By"},"description":"Field to sort results by"},{"name":"order","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SortOrder"},{"type":"null"}],"description":"Sort order","title":"Order"},"description":"Sort order"},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Page number","title":"Page"},"description":"Page number"},{"name":"per_page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Items per page (max 500)","title":"Per Page"},"description":"Items per page (max 500)"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{},"example":{"status":"success","message":"Invoices Request Success.","data":[{"uuid":"123e4567-e89b-12d3-a456-426614174000","invoice_number":"INV-001","type":"01","buyer_name":"Buyer Company","total":1060,"status":"valid","issue_date":"2023-01-01 12:00:00","due_date":"2023-01-31","validation_date":"2023-01-01 12:30:00","lhdn_unique_id":"LHDN-12345","digital_signature":"abcdef1234567890","lhdn_verify_url":"https://verify.lhdn.gov.my/invoice/12345","invoice_pdf":"https://example.com/invoices/INV-001.pdf","is_consolidated":"1","request_invoice_url":"https://app.jomeinvoice.my/workspace/jom-einvoice-sdn-bhd/request-invoice?branch=&date=2025-05-26_00-00-00&receipt_number=1-1049&amount=125.08"}],"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"404":{"description":"Buyer not found","content":{"application/json":{"example":{"status":"error","message":"Buyer not found","error":"Please check the Buyer UUID","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"422":{"description":"Validation error","content":{"application/json":{"example":{"status":"error","message":"Validation Failed","error":{"field":["This field is required."]},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"500":{"description":"Server Error","content":{"application/json":{"example":{"status":"error","message":"Invoices Request Failed.","error":"string","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}}}}},"/api/invoices/{uuid}":{"get":{"tags":["Invoices"],"summary":"Get Invoice by UUID","description":"Retrieve detailed information for a specific invoice by its UUID/ID.","operationId":"Invoices-get_invoice","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{},"example":{"status":"success","message":"Invoice Request Success.","data":{"uuid":"123e4567-e89b-12d3-a456-426614174000","invoice_number":"INV-001","type":"01","buyer_name":"Buyer Company","total":1060,"status":"valid","issue_date":"2023-01-01 12:00:00","due_date":"2023-01-31","validation_date":"2023-01-01 12:30:00","lhdn_unique_id":"LHDN-12345","digital_signature":"abcdef1234567890","lhdn_verify_url":"https://verify.lhdn.gov.my/invoice/12345","invoice_pdf":"https://example.com/invoices/INV-001.pdf","is_consolidated":"1","request_invoice_url":"https://app.jomeinvoice.my/workspace/jom-einvoice-sdn-bhd/request-invoice?branch=&date=2025-05-26_00-00-00&receipt_number=1-1049&amount=125.08","payment_terms":"Net 30","payment_mode":"Bank Transfer","currency":"MYR","buyer_uuid":"123e4567-e89b-12d3-a456-426614174000","buyer_address":"123 Main St, Kuala Lumpur, Malaysia","description":"Monthly services","total_excluding_tax":1000,"total_tax_amount":60,"total_including_tax":1060,"total_payable_amount":1060,"created_at":"2023-01-01 12:00:00","updated_at":"2023-01-01 12:30:00","line_items":[{"description":"Software Development Services","item_code":"SVC-001","classification_code":"S","measurement":"hours","quantity":10,"unit_price":100,"subtotal":1000,"discount_amount":0,"discount_rate":0,"taxable_amount":1000,"tax_amount":60,"tax_type":"SR"}]},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"example":{"status":"error","message":"Invoice not found","error":"UUID not found","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"422":{"description":"Invoice processing failed","content":{"application/json":{"example":{"status":"error","message":"Invoice creation failed","error":"An error occurred during invoice processing","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"500":{"description":"Server Error","content":{"application/json":{"example":{"status":"error","message":"Invoice Request Failed.","error":"string","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}}}}},"/api/invoices/{uuid}/pdf":{"get":{"tags":["Invoices"],"summary":"Export Invoice PDF","description":"Download the PDF for a specific invoice","operationId":"Invoices-export_pdf","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{},"example":{"status":"success","message":"Invoice Request Success.","data":{"status":"success","pdf_url":"https://example.com/invoices/INV-001.pdf","expires_in":"24 hours"},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"example":{"status":"error","message":"Invoice Request Failed.","error":"Missing invoice uuid.","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"422":{"description":"Validation error","content":{"application/json":{"example":{"status":"error","message":"Validation Failed","error":{"field":["This field is required."]},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"500":{"description":"Server Error","content":{"application/json":{"example":{"status":"error","message":"Invoice Request Failed.","error":"string","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}}}}},"/api/invoices/{uuid}/cancel":{"post":{"tags":["Invoices"],"summary":"Cancel Invoice","description":"Cancel a specific invoice by its UUID. Only invoices with status VALID or PENDING_REJECTION can be cancelled within 72 hours.","operationId":"Invoices-cancel_invoice","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CancelInvoiceRequest"}}}},"responses":{"200":{"description":"Invoice successfully cancelled","content":{"application/json":{"schema":{},"example":{"status":"success","message":"Invoice Cancellation Success.","data":{"uuid":"123e4567-e89b-12d3-a456-426614174000","cancel_reason":"Customer requested cancellation","cancelled_at":"2023-01-01 12:00:00"},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"status":"error","message":"Invoice Cancellation Failed.","error":"Cancellation reason is required.","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"403":{"description":"Forbidden","content":{"application/json":{"example":{"status":"error","message":"Invoice Cancellation Failed.","error":"Not authorized to cancel this invoice.","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"example":{"status":"error","message":"Invoice Cancellation Failed.","error":"Missing invoice uuid.","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"422":{"description":"Validation error","content":{"application/json":{"example":{"status":"error","message":"Validation Failed","error":{"field":["This field is required."]},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"500":{"description":"Server Error","content":{"application/json":{"example":{"status":"error","message":"Invoice Cancellation Failed.","error":"An internal server error occurred","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}}}}},"/api/search-tin":{"post":{"tags":["Verification"],"summary":"Search TIN","description":"Search for a Tax Identification Number (TIN) using the MyInvois API. The company_id is automatically injected from the OAuth token.","operationId":"Verification-search_tin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SearchTINRequest"}}},"required":true},"responses":{"200":{"description":"Successful search","content":{"application/json":{"schema":{},"example":{"status":"success","message":"TIN search is successful","data":[{"tin":"1234567890","name":"Example Company Sdn Bhd","registration_document_type":"BRN","registration_number":"12345678","verified":true,"status":"active"}],"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"422":{"description":"Validation error","content":{"application/json":{"example":{"status":"error","message":"Validation Failed","error":{"registration_document_type":["Invalid Registration Document Type"]},"requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"429":{"description":"Too many requests","content":{"application/json":{"example":{"status":"error","message":"Too Many Requests","error":"Too many attempts. Please try again in 60 seconds.","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}},"500":{"description":"Server error","content":{"application/json":{"example":{"status":"error","message":"Search Failed","error":"Failed to search TIN: Connection error","requestId":"123e4567-e89b-12d3-a456-426614174000"}}}}}}},"/api/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhooks","description":"Retrieve a list of all webhooks for the authenticated company","operationId":"Webhooks-list_webhooks","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{},"example":[{"id":"552c3d52-8f5a-4d23-8d81-d3ca7089be5e","url":"https://example.com/webhooks","type":"invoices.status_update","status":"ENABLED","created_at":"2025-09-28T05:04:46Z","updated_at":"2025-09-28T05:04:46Z"}]}}},"401":{"description":"Unauthorized","content":{"application/json":{"example":{"message":"Unauthenticated."}}}}}},"post":{"tags":["Webhooks"],"summary":"Create webhook","description":"Create a new webhook for the authenticated company","operationId":"Webhooks-create_webhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}},"required":true},"responses":{"200":{"description":"Webhook created successfully","content":{"application/json":{"schema":{},"example":{"id":"552c3d52-8f5a-4d23-8d81-d3ca7089be5e","url":"https://example.com/webhooks","type":"invoices.status_update","status":"ENABLED","created_at":"2025-09-28T05:04:46Z","updated_at":"2025-09-28T05:04:46Z"}}}},"201":{"description":"Webhook created successfully","content":{"application/json":{"example":{"id":"552c3d52-8f5a-4d23-8d81-d3ca7089be5e","url":"https://example.com/webhooks","type":"invoices.status_update","status":"ENABLED","created_at":"2025-09-28T05:04:46Z","updated_at":"2025-09-28T05:04:46Z"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"example":{"message":"Unauthenticated."}}}},"422":{"description":"Validation error","content":{"application/json":{"example":{"message":"The given data was invalid.","errors":{"url":["The webhook URL field is required."],"type":["The webhook type does not exist in webhook_actions table.","The webhook type already registered for this company."],"status":["The webhook status must be either ENABLED or DISABLED."]}}}}}}}},"/api/webhooks/{uuid}":{"get":{"tags":["Webhooks"],"summary":"Get webhook","description":"Retrieve a specific webhook by its UUID","operationId":"Webhooks-get_webhook","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{},"example":{"id":"552c3d52-8f5a-4d23-8d81-d3ca7089be5e","url":"https://example.com/webhooks","type":"invoices.status_update","status":"ENABLED","created_at":"2025-09-28T05:04:46Z","updated_at":"2025-09-28T05:04:46Z"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"example":{"message":"Unauthenticated."}}}},"404":{"description":"Webhook not found","content":{"application/json":{"example":{"message":"No query results for model [App\\Models\\Webhook]."}}}},"422":{"description":"Validation error","content":{"application/json":{"example":{"message":"The given data was invalid."}}}}}},"put":{"tags":["Webhooks"],"summary":"Update webhook","description":"Update an existing webhook status (only status field can be updated)","operationId":"Webhooks-update_webhook","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookRequest"}}}},"responses":{"200":{"description":"Webhook updated successfully","content":{"application/json":{"schema":{},"example":{"id":"552c3d52-8f5a-4d23-8d81-d3ca7089be5e","url":"https://example.com/webhooks","type":"invoices.status_update","status":"ENABLED","created_at":"2025-09-28T05:04:46Z","updated_at":"2025-09-28T05:04:46Z"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"example":{"message":"Unauthenticated."}}}},"404":{"description":"Webhook not found","content":{"application/json":{"example":{"message":"No query results for model [App\\Models\\Webhook]."}}}},"422":{"description":"Validation error","content":{"application/json":{"example":{"message":"The given data was invalid.","errors":{"status":["The webhook status is required.","The webhook status must be either ENABLED or DISABLED."]}}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete webhook","description":"Delete a specific webhook","operationId":"Webhooks-delete_webhook","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}}],"responses":{"200":{"description":"Webhook deleted successfully","content":{"application/json":{"schema":{},"example":{"message":"Webhook deleted successfully"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"example":{"message":"Unauthenticated."}}}},"404":{"description":"Webhook not found","content":{"application/json":{"example":{"message":"No query results for model [App\\Models\\Webhook]."}}}},"422":{"description":"Validation error","content":{"application/json":{"example":{"message":"The given data was invalid."}}}}}}}},"components":{"schemas":{"ClearTaxAccountingParty":{"properties":{"Party":{"$ref":"#/components/schemas/ClearTaxParty"},"AdditionalAccountID":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additionalaccountid"}},"additionalProperties":true,"type":"object","required":["Party"],"title":"ClearTaxAccountingParty","description":"Supplier or customer party wrapper."},"ClearTaxAdditionalDocumentReference":{"properties":{"Id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"UUID":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uuid"},"DocumentType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documenttype"},"DocumentDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Documentdescription"}},"additionalProperties":true,"type":"object","title":"ClearTaxAdditionalDocumentReference","description":"Additional document reference from ClearTax payloads (optional for standard invoices)."},"ClearTaxAdditionalItemProperty":{"properties":{"Name":{"type":"string","title":"Name"},"Value":{"type":"string","title":"Value"}},"additionalProperties":true,"type":"object","required":["Name","Value"],"title":"ClearTaxAdditionalItemProperty","description":"Additional item property (custom field from ClearTax)."},"ClearTaxAddressLine":{"properties":{"Line":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line"}},"additionalProperties":true,"type":"object","title":"ClearTaxAddressLine","description":"Single address line."},"ClearTaxBillingReference":{"properties":{"InvoiceDocumentReference":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxInvoiceDocumentReference"},{"type":"null"}]},"AdditionalDocumentReference":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxAdditionalDocumentReference"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"ClearTaxBillingReference","description":"Billing reference pointing to original invoice for credit/debit notes."},"ClearTaxClassificationCode":{"properties":{"Value":{"type":"string","title":"Value"},"Name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":true,"type":"object","required":["Value"],"title":"ClearTaxClassificationCode","description":"Industry classification code."},"ClearTaxCodeType":{"properties":{"Value":{"type":"string","title":"Value"}},"additionalProperties":true,"type":"object","required":["Value"],"title":"ClearTaxCodeType","description":"Generic code value wrapper."},"ClearTaxCommodityClassification":{"properties":{"ItemClassificationCode":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxItemClassificationCode"},{"items":{"$ref":"#/components/schemas/ClearTaxItemClassificationCode"},"type":"array"}],"title":"Itemclassificationcode"}},"additionalProperties":true,"type":"object","required":["ItemClassificationCode"],"title":"ClearTaxCommodityClassification","description":"Commodity classification."},"ClearTaxContact":{"properties":{"ElectronicMail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Electronicmail"},"Telephone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telephone"}},"additionalProperties":true,"type":"object","title":"ClearTaxContact","description":"Contact information."},"ClearTaxCountry":{"properties":{"IdentificationCode":{"$ref":"#/components/schemas/ClearTaxCountryCode"}},"additionalProperties":true,"type":"object","required":["IdentificationCode"],"title":"ClearTaxCountry","description":"Country reference."},"ClearTaxCountryCode":{"properties":{"CountryCode":{"type":"string","title":"Countrycode"}},"additionalProperties":true,"type":"object","required":["CountryCode"],"title":"ClearTaxCountryCode","description":"Country identification code."},"ClearTaxCreateInvoiceRequest":{"properties":{"Id":{"type":"string","title":"Id"},"IssueDate":{"type":"string","title":"Issuedate"},"IssueTime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuetime"},"InvoiceTypeCode":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxCodeType"},{"type":"null"}]},"DocumentCurrencyCode":{"type":"string","title":"Documentcurrencycode"},"TaxCurrencyCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxcurrencycode"},"TaxExchangeRate":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxExchangeRate"},{"type":"null"}]},"BillingReference":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClearTaxBillingReference"},"type":"array"},{"type":"null"}],"title":"Billingreference"},"InvoicePeriod":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxInvoicePeriod"},{"type":"null"}]},"AccountingSupplierParty":{"$ref":"#/components/schemas/ClearTaxAccountingParty"},"AccountingCustomerParty":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxAccountingParty"},{"type":"null"}]},"InvoiceLine":{"items":{"$ref":"#/components/schemas/ClearTaxInvoiceLine"},"type":"array","title":"Invoiceline"},"LegalMonetaryTotal":{"$ref":"#/components/schemas/ClearTaxLegalMonetaryTotal"},"TaxTotal":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClearTaxTaxTotal"},"type":"array"},{"type":"null"}],"title":"Taxtotal"},"PaymentMeans":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxPaymentMeans"},{"type":"null"}]},"PaymentTerms":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxPaymentTerms"},{"type":"null"}]},"is_consolidated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Is Consolidated"},"is_resubmission":{"type":"boolean","title":"Is Resubmission","default":false},"branchCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branchcode"},"Delivery":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxDelivery"},{"type":"null"}]},"PrepaidPayment":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxPrepaidPayment"},{"type":"null"}]},"AllowanceCharge":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Allowancecharge"},"AdditionalDocumentReference":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClearTaxAdditionalDocumentReference"},"type":"array"},{"type":"null"}],"title":"Additionaldocumentreference"}},"additionalProperties":true,"type":"object","required":["Id","IssueDate","DocumentCurrencyCode","AccountingSupplierParty","InvoiceLine","LegalMonetaryTotal"],"title":"ClearTaxCreateInvoiceRequest","description":"Root ClearTax invoice payload for creation."},"ClearTaxCreateInvoiceResponse":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"invoice_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Uuid"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Number"},"accepted_invoices":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Accepted Invoices"},"rejected_invoices":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Rejected Invoices"},"errors":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","required":["status","message"],"title":"ClearTaxCreateInvoiceResponse","description":"Response from ClearTax invoice creation."},"ClearTaxDelivery":{"properties":{"DeliveryParty":{"$ref":"#/components/schemas/ClearTaxDeliveryParty"}},"additionalProperties":true,"type":"object","required":["DeliveryParty"],"title":"ClearTaxDelivery","description":"Delivery / ship-to information."},"ClearTaxDeliveryParty":{"properties":{"PartyIdentification":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClearTaxPartyIdentification"},"type":"array"},{"type":"null"}],"title":"Partyidentification"},"PartyLegalEntity":{"$ref":"#/components/schemas/ClearTaxPartyLegalEntity"},"PostalAddress":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxPostalAddress"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["PartyLegalEntity"],"title":"ClearTaxDeliveryParty","description":"Delivery party information (ship-to)."},"ClearTaxExchangeRate":{"properties":{"CalculationRate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculationrate"}},"additionalProperties":true,"type":"object","title":"ClearTaxExchangeRate","description":"Tax exchange rate info."},"ClearTaxId":{"properties":{"SchemeID":{"type":"string","title":"Schemeid"},"Value":{"type":"string","title":"Value"}},"additionalProperties":true,"type":"object","required":["SchemeID","Value"],"title":"ClearTaxId","description":"ID with SchemeID (TIN, BRN, SST, etc.)."},"ClearTaxInvoiceDocumentReference":{"properties":{"UUID":{"type":"string","title":"Uuid"}},"additionalProperties":true,"type":"object","required":["UUID"],"title":"ClearTaxInvoiceDocumentReference","description":"Reference to an existing invoice document (for credit/debit notes)."},"ClearTaxInvoiceLine":{"properties":{"Id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"InvoicedQuantity":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/ClearTaxInvoicedQuantity"},{"type":"null"}],"title":"Invoicedquantity"},"Item":{"$ref":"#/components/schemas/ClearTaxItem"},"Price":{"$ref":"#/components/schemas/ClearTaxPrice"},"ItemPriceExtension":{"$ref":"#/components/schemas/ClearTaxItemPriceExtension"},"LineExtensionAmount":{"$ref":"#/components/schemas/ClearTaxMoney"},"TaxTotal":{"$ref":"#/components/schemas/ClearTaxTaxTotal"},"AllowanceCharge":{"anyOf":[{},{"type":"null"}],"title":"Allowancecharge"}},"additionalProperties":true,"type":"object","required":["Item","Price","ItemPriceExtension","LineExtensionAmount","TaxTotal"],"title":"ClearTaxInvoiceLine","description":"Single invoice line item."},"ClearTaxInvoicePeriod":{"properties":{"StartDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Startdate"},"EndDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"Description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"additionalProperties":true,"type":"object","title":"ClearTaxInvoicePeriod","description":"Invoice period (optional)."},"ClearTaxInvoicedQuantity":{"properties":{"Quantity":{"type":"number","title":"Quantity"},"UnitCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unitcode"}},"additionalProperties":true,"type":"object","required":["Quantity"],"title":"ClearTaxInvoicedQuantity","description":"Invoiced quantity wrapper (ClearTax can send object with quantity and unit code)."},"ClearTaxItem":{"properties":{"Description":{"type":"string","title":"Description"},"CommodityClassification":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxCommodityClassification"},{"items":{"$ref":"#/components/schemas/ClearTaxCommodityClassification"},"type":"array"},{"type":"null"}],"title":"Commodityclassification"},"ProductTariffCode":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxProductTariffCode"},{"type":"string"},{"type":"null"}],"title":"Producttariffcode"},"OriginCountry":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxOriginCountry"},{"type":"null"}]},"AdditionalItemProperty":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClearTaxAdditionalItemProperty"},"type":"array"},{"type":"null"}],"title":"Additionalitemproperty"}},"additionalProperties":true,"type":"object","required":["Description"],"title":"ClearTaxItem","description":"Invoiced item."},"ClearTaxItemClassificationCode":{"properties":{"ListID":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listid"},"Value":{"type":"string","title":"Value"}},"additionalProperties":true,"type":"object","required":["Value"],"title":"ClearTaxItemClassificationCode","description":"Item classification code (commodity code)."},"ClearTaxItemPriceExtension":{"properties":{"Amount":{"$ref":"#/components/schemas/ClearTaxMoney"}},"additionalProperties":true,"type":"object","required":["Amount"],"title":"ClearTaxItemPriceExtension","description":"Item price extension with nested Amount."},"ClearTaxLegalMonetaryTotal":{"properties":{"TaxExclusiveAmount":{"$ref":"#/components/schemas/ClearTaxMoney"},"TaxInclusiveAmount":{"$ref":"#/components/schemas/ClearTaxMoney"},"PayableAmount":{"$ref":"#/components/schemas/ClearTaxMoney"},"LineExtensionAmount":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxMoney"},{"type":"null"}]},"AllowanceTotalAmount":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxMoney"},{"type":"null"}]},"ChargeTotalAmount":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxMoney"},{"type":"null"}]},"PayableRoundingAmount":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxMoney"},{"type":"null"}]},"PrepaidAmount":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxMoney"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["TaxExclusiveAmount","TaxInclusiveAmount","PayableAmount"],"title":"ClearTaxLegalMonetaryTotal","description":"Invoice monetary totals."},"ClearTaxMoney":{"properties":{"CurrencyID":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currencyid"},"Value":{"type":"number","title":"Value"}},"additionalProperties":true,"type":"object","required":["Value"],"title":"ClearTaxMoney","description":"Amount with currency."},"ClearTaxOriginCountry":{"properties":{"IdentificationCode":{"$ref":"#/components/schemas/ClearTaxCountryCode"}},"additionalProperties":true,"type":"object","required":["IdentificationCode"],"title":"ClearTaxOriginCountry","description":"Origin country reference."},"ClearTaxParty":{"properties":{"PartyIdentification":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClearTaxPartyIdentification"},"type":"array"},{"type":"null"}],"title":"Partyidentification"},"PartyLegalEntity":{"$ref":"#/components/schemas/ClearTaxPartyLegalEntity"},"IndustryClassificationCode":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxClassificationCode"},{"type":"null"}]},"Contact":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxContact"},{"type":"null"}]},"PostalAddress":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxPostalAddress"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["PartyLegalEntity"],"title":"ClearTaxParty","description":"Party (supplier or buyer)."},"ClearTaxPartyIdentification":{"properties":{"Id":{"$ref":"#/components/schemas/ClearTaxId"}},"additionalProperties":true,"type":"object","required":["Id"],"title":"ClearTaxPartyIdentification","description":"Party identification (TIN, BRN, SST, etc.)."},"ClearTaxPartyLegalEntity":{"properties":{"RegistrationName":{"type":"string","title":"Registrationname"}},"additionalProperties":true,"type":"object","required":["RegistrationName"],"title":"ClearTaxPartyLegalEntity","description":"Legal entity / company name."},"ClearTaxPayeeFinancialAccount":{"properties":{"Id":{"type":"string","title":"Id"}},"additionalProperties":true,"type":"object","required":["Id"],"title":"ClearTaxPayeeFinancialAccount","description":"Payee financial account (bank account)."},"ClearTaxPaymentMeans":{"properties":{"PaymentMeansCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmeanscode"},"PayeeFinancialAccount":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxPayeeFinancialAccount"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"ClearTaxPaymentMeans","description":"Payment means (method code)."},"ClearTaxPaymentTerms":{"properties":{"Note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"additionalProperties":true,"type":"object","title":"ClearTaxPaymentTerms","description":"Payment terms note."},"ClearTaxPostalAddress":{"properties":{"AddressLine":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClearTaxAddressLine"},"type":"array"},{"type":"null"}],"title":"Addressline"},"CityName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cityname"},"PostalZone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postalzone"},"CountrySubentityCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Countrysubentitycode"},"Country":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxCountry"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"ClearTaxPostalAddress","description":"Postal address."},"ClearTaxPrepaidPayment":{"properties":{"Id":{"type":"string","title":"Id"},"PaidAmount":{"$ref":"#/components/schemas/ClearTaxMoney"},"PaidDate":{"type":"string","title":"Paiddate"},"PaidTime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paidtime"}},"additionalProperties":true,"type":"object","required":["Id","PaidAmount","PaidDate"],"title":"ClearTaxPrepaidPayment","description":"Prepaid payment information."},"ClearTaxPrice":{"properties":{"PriceAmount":{"$ref":"#/components/schemas/ClearTaxMoney"}},"additionalProperties":true,"type":"object","required":["PriceAmount"],"title":"ClearTaxPrice","description":"Price per unit."},"ClearTaxProductTariffCode":{"properties":{"ItemClassificationCode":{"$ref":"#/components/schemas/ClearTaxItemClassificationCode"}},"additionalProperties":true,"type":"object","required":["ItemClassificationCode"],"title":"ClearTaxProductTariffCode","description":"Product tariff code (HS code) with nested classification."},"ClearTaxTaxCategory":{"properties":{"Id":{"type":"string","title":"Id"},"TaxExemptionReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taxexemptionreason"}},"additionalProperties":true,"type":"object","required":["Id"],"title":"ClearTaxTaxCategory","description":"Tax category (S, Z, E, O)."},"ClearTaxTaxSubtotal":{"properties":{"TaxableAmount":{"$ref":"#/components/schemas/ClearTaxMoney"},"TaxAmount":{"$ref":"#/components/schemas/ClearTaxMoney"},"TaxCategory":{"$ref":"#/components/schemas/ClearTaxTaxCategory"},"Percent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Percent"}},"additionalProperties":true,"type":"object","required":["TaxableAmount","TaxAmount","TaxCategory"],"title":"ClearTaxTaxSubtotal","description":"Single tax line in a subtotal."},"ClearTaxTaxTotal":{"properties":{"TaxAmount":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxMoney"},{"type":"null"}]},"TaxableAmount":{"anyOf":[{"$ref":"#/components/schemas/ClearTaxMoney"},{"type":"null"}]},"TaxSubtotal":{"anyOf":[{"items":{"$ref":"#/components/schemas/ClearTaxTaxSubtotal"},"type":"array"},{"type":"null"}],"title":"Taxsubtotal"}},"additionalProperties":true,"type":"object","title":"ClearTaxTaxTotal","description":"Tax totals for line or invoice."},"CreateWebhookRequest":{"properties":{"url":{"type":"string","title":"Url","description":"Webhook endpoint URL"},"type":{"type":"string","title":"Type","description":"Webhook event type (e.g., 'invoices.status_update')"},"status":{"$ref":"#/components/schemas/WebhookStatus","description":"Webhook status","default":"ENABLED"}},"type":"object","required":["url","type"],"title":"CreateWebhookRequest","description":"V1 webhook creation request."},"InvoiceSortBy":{"type":"string","enum":["uuid","invoice_date","due_date","total","status"],"title":"InvoiceSortBy"},"InvoiceStatus":{"type":"string","enum":["error","submitted","valid","invalid","awaiting","accepted","rejected","cancelled"],"title":"InvoiceStatus"},"SortOrder":{"type":"string","enum":["asc","desc"],"title":"SortOrder"},"UpdateWebhookRequest":{"properties":{"status":{"$ref":"#/components/schemas/WebhookStatus","description":"Webhook status"}},"type":"object","required":["status"],"title":"UpdateWebhookRequest","description":"V1 webhook update request (status only)."},"V1BuyerItem":{"properties":{"email":{"type":"string","title":"Email"},"tin":{"type":"string","title":"Tin"},"name":{"type":"string","title":"Name"},"registration_number":{"type":"string","title":"Registration Number"},"registration_document_type":{"type":"string","title":"Registration Document Type"},"office_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Office Contact"},"contact_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Number"},"address_line0":{"type":"string","title":"Address Line0"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"address_city":{"type":"string","title":"Address City"},"address_postal_code":{"type":"string","title":"Address Postal Code"},"address_country":{"type":"string","title":"Address Country"},"address_state":{"type":"string","title":"Address State"},"sst":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sst"},"cif_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cif Number"}},"type":"object","required":["email","tin","name","registration_number","registration_document_type","address_line0","address_city","address_postal_code","address_country","address_state"],"title":"V1BuyerItem","description":"A single buyer object in the V1 request.\n\nV1 uses address_line0/1/2, transformed to V2 address_line_1/2/3."},"V1CancelInvoiceRequest":{"properties":{"reason":{"type":"string","title":"Reason"}},"type":"object","required":["reason"],"title":"V1CancelInvoiceRequest","description":"V1 cancel invoice request body. Same as V2."},"V1CreateBuyerRequest":{"properties":{"buyers":{"items":{"$ref":"#/components/schemas/V1BuyerItem"},"type":"array","title":"Buyers"}},"type":"object","required":["buyers"],"title":"V1CreateBuyerRequest","description":"V1 create buyer request.\n\nV1 sends { buyers: [{ buyer objects }] }.\nThe proxy transforms address fields and forwards to V2."},"V1CreateInvoicesRequest":{"properties":{"invoices":{"items":{"$ref":"#/components/schemas/V1InvoiceItem"},"type":"array","maxItems":500,"title":"Invoices"}},"type":"object","required":["invoices"],"title":"V1CreateInvoicesRequest","description":"V1 batch-create invoices request body. Max 500 invoices."},"V1CreateSupplierRequest":{"properties":{"suppliers":{"items":{"$ref":"#/components/schemas/V1SupplierItem"},"type":"array","title":"Suppliers"}},"type":"object","required":["suppliers"],"title":"V1CreateSupplierRequest","description":"V1 create supplier request.\n\nV1 sends { suppliers: [{ supplier objects }] }.\nThe proxy transforms address fields and forwards to V2."},"V1InvoiceDetails":{"properties":{"number":{"type":"string","title":"Number"},"issue_date":{"type":"string","title":"Issue Date"},"currency":{"type":"string","title":"Currency"},"msic_code":{"type":"string","title":"Msic Code"},"payment_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Mode"},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Due Date"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Terms"},"exchange_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Exchange Rate"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"payee_bank_account":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payee Bank Account"},"supplier_bank_account_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Bank Account Number"},"billing_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Frequency"},"billing_period_start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Period Start Date"},"billing_period_end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Period End Date"},"offset_invoice_uuid":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Offset Invoice Uuid"},"do_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Do Number"},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["number","issue_date","currency","msic_code"],"title":"V1InvoiceDetails","description":"Nested invoice details (V1 shape)."},"V1InvoiceItem":{"properties":{"uuid":{"type":"string","title":"Uuid"},"type":{"type":"string","title":"Type"},"invoice":{"$ref":"#/components/schemas/V1InvoiceDetails"},"line_items":{"items":{"$ref":"#/components/schemas/V1InvoiceLineItem"},"type":"array","title":"Line Items"},"total_excluding_tax":{"type":"number","title":"Total Excluding Tax"},"total_tax":{"type":"number","title":"Total Tax"},"total_including_tax":{"type":"number","title":"Total Including Tax"},"total_payable_amount":{"type":"number","title":"Total Payable Amount"},"net_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Amount"},"charge_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Charge Amount","default":0},"rounding_amount":{"type":"number","title":"Rounding Amount","default":0},"total_discount_value":{"type":"number","title":"Total Discount Value","default":0},"prepayment_amount":{"type":"number","title":"Prepayment Amount","default":0},"prepayment_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prepayment Date"},"prepayment_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prepayment Ref"},"prepayment_reference_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prepayment Reference Number"},"is_consolidated":{"type":"integer","title":"Is Consolidated","default":0},"is_resubmission":{"type":"boolean","title":"Is Resubmission","default":false},"branch_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Code"},"buyer_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Uuid"},"supplier_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Uuid"},"buyer":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Buyer"},"supplier":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Supplier"},"receipt_tax_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/V1InvoiceLineItemTax"},"type":"array"},{"type":"null"}],"title":"Receipt Tax Items"},"receipt_shipping":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Receipt Shipping"},"receipt_attributes":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Receipt Attributes"},"delivery_party":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Delivery Party"},"additional_document_reference":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Additional Document Reference"},"buyer_id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Buyer Id"},"branch_id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Branch Id"},"msic_code_id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Msic Code Id"},"offset_invoice_ids":{"anyOf":[{"items":{"anyOf":[{"type":"integer"},{"type":"string"}]},"type":"array"},{"type":"null"}],"title":"Offset Invoice Ids"}},"type":"object","required":["uuid","type","invoice","line_items","total_excluding_tax","total_tax","total_including_tax","total_payable_amount"],"title":"V1InvoiceItem","description":"Single invoice in a V1 batch-create request."},"V1InvoiceLineItem":{"properties":{"item":{"type":"string","title":"Item"},"price":{"type":"number","title":"Price"},"qty":{"type":"number","title":"Qty"},"subtotal":{"type":"number","title":"Subtotal"},"total_excluding_tax":{"type":"number","title":"Total Excluding Tax"},"uom":{"type":"string","title":"Uom"},"classification_code":{"type":"string","title":"Classification Code"},"item_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Code"},"line_number":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Line Number"},"item_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Category"},"disc":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Disc"},"discount_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount Rate"},"discount_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discount Percentage"},"disc_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disc Type"},"tax_exempted":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Exempted"},"exemption_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exemption Reason"},"tax_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Amount"},"tax_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Rate"},"tax_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Type"},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Metadata"},"do_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Do Number"},"tax":{"items":{"$ref":"#/components/schemas/V1InvoiceLineItemTax"},"type":"array","title":"Tax"},"receipt_line_tax_items":{"items":{"$ref":"#/components/schemas/V1InvoiceLineItemTax"},"type":"array","title":"Receipt Line Tax Items"}},"type":"object","required":["item","price","qty","subtotal","total_excluding_tax","uom","classification_code"],"title":"V1InvoiceLineItem","description":"Single line item in a V1 invoice.\n\nV1 field names only: item, price, qty, disc, etc.\nThese are transformed to V2 names by the transformer."},"V1InvoiceLineItemTax":{"properties":{"tax_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Type"},"tax_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Rate"},"tax_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Amount"},"taxable_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Taxable Amount"},"tax_exempted_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Exempted Amount"},"tax_exemption_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Exemption Reason"},"tax_exempted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tax Exempted"}},"type":"object","title":"V1InvoiceLineItemTax","description":"Individual tax entry on a line item."},"V1OAuthTokenRequest":{"properties":{"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"grant_type":{"type":"string","title":"Grant Type","default":"client_credentials"}},"type":"object","required":["client_id","client_secret"],"title":"V1OAuthTokenRequest","description":"What the client sends (V1 shape)."},"V1SearchTINRequest":{"properties":{"registration_document_type":{"type":"string","title":"Registration Document Type"},"registration_number":{"type":"string","title":"Registration Number"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"company_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Id"}},"type":"object","required":["registration_document_type","registration_number"],"title":"V1SearchTINRequest","description":"V1 search-tin request body."},"V1SupplierItem":{"properties":{"email":{"type":"string","title":"Email"},"tin":{"type":"string","title":"Tin"},"name":{"type":"string","title":"Name"},"registration_number":{"type":"string","title":"Registration Number"},"registration_document_type":{"type":"string","title":"Registration Document Type"},"office_contact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Office Contact"},"contact_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Number"},"address_line0":{"type":"string","title":"Address Line0"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"address_city":{"type":"string","title":"Address City"},"address_postal_code":{"type":"string","title":"Address Postal Code"},"address_country":{"type":"string","title":"Address Country"},"address_state":{"type":"string","title":"Address State"},"sst":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sst"},"cif_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cif Number"}},"type":"object","required":["email","tin","name","registration_number","registration_document_type","address_line0","address_city","address_postal_code","address_country","address_state"],"title":"V1SupplierItem","description":"A single supplier object in the V1 request.\n\nV1 uses address_line0/1/2, transformed to V2 address_line_1/2/3."},"WebhookStatus":{"type":"string","enum":["ENABLED","DISABLED"],"title":"WebhookStatus","description":"Webhook status values."}}}}