{"openapi":"3.1.0","info":{"title":"Signal Telecom Suite — BSS APIs","description":"Business Support Systems: Identity, Billing, Rating, Payments, Collections, Tickets, Tax, POS","version":"0.1.0"},"paths":{"/api/v1/customers/":{"post":{"tags":["SIG-ID — Identity & CRM"],"summary":"Create Customer","operationId":"create_customer_api_v1_customers__post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-ID — Identity & CRM"],"summary":"List Customers","description":"List customers with filtering, search, and pagination.","operationId":"list_customers_api_v1_customers__get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"customer_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Type"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Country"}},{"name":"segment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":2},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Customers Api V1 Customers  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers/bulk":{"post":{"tags":["SIG-ID — Identity & CRM"],"summary":"Bulk Import Customers","description":"Create multiple customers in batch. Returns summary with created/failed counts.","operationId":"bulk_import_customers_api_v1_customers_bulk_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerCreate"},"title":"Customers"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCustomerImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers/{customer_id}":{"get":{"tags":["SIG-ID — Identity & CRM"],"summary":"Get Customer","operationId":"get_customer_api_v1_customers__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["SIG-ID — Identity & CRM"],"summary":"Update Customer","operationId":"update_customer_api_v1_customers__customer_id__patch","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SIG-ID — Identity & CRM"],"summary":"Delete Customer","description":"Delete a customer and all associated data (KYC docs, contacts, etc.).","operationId":"delete_customer_api_v1_customers__customer_id__delete","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers/{customer_id}/status":{"post":{"tags":["SIG-ID — Identity & CRM"],"summary":"Change Status","description":"Transition customer lifecycle status with validation.","operationId":"change_status_api_v1_customers__customer_id__status_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerStatusChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers/{customer_id}/contacts":{"post":{"tags":["SIG-ID — Identity & CRM"],"summary":"Add Contact","operationId":"add_contact_api_v1_customers__customer_id__contacts_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-ID — Identity & CRM"],"summary":"List Contacts","operationId":"list_contacts_api_v1_customers__customer_id__contacts_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactResponse"},"title":"Response List Contacts Api V1 Customers  Customer Id  Contacts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers/{customer_id}/kyc":{"post":{"tags":["SIG-ID — Identity & CRM"],"summary":"Add Kyc Document","operationId":"add_kyc_document_api_v1_customers__customer_id__kyc_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KYCDocumentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KYCDocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-ID — Identity & CRM"],"summary":"List Kyc Documents","operationId":"list_kyc_documents_api_v1_customers__customer_id__kyc_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KYCDocumentResponse"},"title":"Response List Kyc Documents Api V1 Customers  Customer Id  Kyc Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers/{customer_id}/kyc/{document_id}/verify":{"post":{"tags":["SIG-ID — Identity & CRM"],"summary":"Verify Kyc Document","operationId":"verify_kyc_document_api_v1_customers__customer_id__kyc__document_id__verify_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KYCVerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KYCDocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers/{customer_id}/kyc/compliance":{"get":{"tags":["SIG-ID — Identity & CRM"],"summary":"Check Kyc Compliance","description":"Check if customer meets KYC requirements for their country and type.","operationId":"check_kyc_compliance_api_v1_customers__customer_id__kyc_compliance_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"service_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(all|broadband|mobile|sim_only)$","default":"all","title":"Service Type"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KYCComplianceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/plans":{"post":{"tags":["SIG-PROV — Provisioning"],"summary":"Create Plan","description":"Create a new service plan in draft status.","operationId":"create_plan_api_v1_provisioning_plans_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-PROV — Provisioning"],"summary":"List Plans","description":"List service plans with filtering, search, and pagination.","operationId":"list_plans_api_v1_provisioning_plans_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"plan_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Type"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":2},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Plans Api V1 Provisioning Plans Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/plans/{plan_id}":{"get":{"tags":["SIG-PROV — Provisioning"],"summary":"Get Plan","description":"Get a single service plan by ID.","operationId":"get_plan_api_v1_provisioning_plans__plan_id__get","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["SIG-PROV — Provisioning"],"summary":"Update Plan","description":"Update a service plan (draft or active only).","operationId":"update_plan_api_v1_provisioning_plans__plan_id__patch","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/plans/{plan_id}/activate":{"post":{"tags":["SIG-PROV — Provisioning"],"summary":"Activate Plan","description":"Transition plan from draft to active.","operationId":"activate_plan_api_v1_provisioning_plans__plan_id__activate_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/plans/{plan_id}/deprecate":{"post":{"tags":["SIG-PROV — Provisioning"],"summary":"Deprecate Plan","description":"Transition plan from active to deprecated.","operationId":"deprecate_plan_api_v1_provisioning_plans__plan_id__deprecate_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/plans/{plan_id}/archive":{"post":{"tags":["SIG-PROV — Provisioning"],"summary":"Archive Plan","description":"Transition plan from deprecated to archived.","operationId":"archive_plan_api_v1_provisioning_plans__plan_id__archive_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/subscriptions":{"post":{"tags":["SIG-PROV — Provisioning"],"summary":"Create Subscription","description":"Create a new subscription (pending status). Plan must be active.","operationId":"create_subscription_api_v1_provisioning_subscriptions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-PROV — Provisioning"],"summary":"List Subscriptions","description":"List subscriptions with filtering and pagination.","operationId":"list_subscriptions_api_v1_provisioning_subscriptions_get","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"}},{"name":"plan_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Subscriptions Api V1 Provisioning Subscriptions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/subscriptions/{subscription_id}":{"get":{"tags":["SIG-PROV — Provisioning"],"summary":"Get Subscription","description":"Get a single subscription by ID.","operationId":"get_subscription_api_v1_provisioning_subscriptions__subscription_id__get","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/subscriptions/{subscription_id}/activate":{"post":{"tags":["SIG-PROV — Provisioning"],"summary":"Activate Subscription","description":"Activate a pending or suspended subscription. Starts billing period.","operationId":"activate_subscription_api_v1_provisioning_subscriptions__subscription_id__activate_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionStatusChange"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/subscriptions/{subscription_id}/suspend":{"post":{"tags":["SIG-PROV — Provisioning"],"summary":"Suspend Subscription","description":"Suspend an active subscription.","operationId":"suspend_subscription_api_v1_provisioning_subscriptions__subscription_id__suspend_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionStatusChange"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/subscriptions/{subscription_id}/terminate":{"post":{"tags":["SIG-PROV — Provisioning"],"summary":"Terminate Subscription","description":"Terminate an active or suspended subscription. Irreversible.","operationId":"terminate_subscription_api_v1_provisioning_subscriptions__subscription_id__terminate_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionStatusChange"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/subscriptions/{subscription_id}/change-plan":{"post":{"tags":["SIG-PROV — Provisioning"],"summary":"Change Plan","description":"Upgrade or downgrade a subscription to a different plan.\nTerminates the old subscription and creates a new one.","operationId":"change_plan_api_v1_provisioning_subscriptions__subscription_id__change_plan_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePlanRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/subscriptions/{subscription_id}/renew":{"post":{"tags":["SIG-PROV — Provisioning"],"summary":"Renew Subscription","description":"Advance billing period for an active, auto-renew subscription.","operationId":"renew_subscription_api_v1_provisioning_subscriptions__subscription_id__renew_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/subscriptions/{subscription_id}/devices":{"post":{"tags":["SIG-PROV — Provisioning"],"summary":"Add Subscription Device","description":"Attach a device (vessel, aircraft, terminal, sensor) to a subscription.","operationId":"add_subscription_device_api_v1_provisioning_subscriptions__subscription_id__devices_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDeviceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDeviceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-PROV — Provisioning"],"summary":"List Subscription Devices","description":"List all devices attached to a subscription.","operationId":"list_subscription_devices_api_v1_provisioning_subscriptions__subscription_id__devices_get","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionDeviceResponse"},"title":"Response List Subscription Devices Api V1 Provisioning Subscriptions  Subscription Id  Devices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/provisioning/devices/{device_id}":{"patch":{"tags":["SIG-PROV — Provisioning"],"summary":"Update Subscription Device","description":"Update a device's fields.","operationId":"update_subscription_device_api_v1_provisioning_devices__device_id__patch","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","title":"Device Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDeviceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDeviceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SIG-PROV — Provisioning"],"summary":"Delete Subscription Device","description":"Remove a device from a subscription (hard delete).","operationId":"delete_subscription_device_api_v1_provisioning_devices__device_id__delete","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","title":"Device Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/invoices":{"post":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Create Invoice","description":"Create a new invoice.\n\nExternal orchestration systems identify themselves via the X-Source\nheader; the value is stored on the invoice so Reports can show\nprovenance. X-Source-Ref carries an optional opaque correlation id\nfrom the source system's own workflow.\n\n**Idempotent when X-Source-Ref is set.** A duplicate POST with the same\n`(source, source_ref, customer_id, period_start)` returns the existing\ninvoice with HTTP 200 instead of creating a duplicate. Lets external\nworkflows retry mid-run crashes without tracking per-customer success\nin their own state. The new invoice case returns HTTP 201.","operationId":"create_invoice_api_v1_billing_invoices_post","parameters":[{"name":"x-source","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source"}},{"name":"x-source-ref","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Source-Ref"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreate"}}}},"responses":{"201":{"description":"New invoice created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailResponse"}}}},"200":{"description":"Idempotent return-of-existing. `X-Source-Ref` matched an invoice already written for `(source, source_ref, customer_id, period_start)`; the existing row is returned unchanged."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]},"example":{"detail":"Authentication required"}}}},"403":{"description":"Authenticated but the token lacks the required scope.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]},"example":{"detail":"Missing scope: invoices:issue"}}}},"422":{"description":"Schema or enum validation failed. `detail` is an array of per-field errors (FastAPI `RequestValidationError` shape).","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"},"ctx":{"type":"object"}}}}}},"example":{"detail":[{"loc":["body","lines",0,"unit"],"msg":"Input should be 'month', 'MB', 'min', 'msg', ...","type":"enum"}]}}}}}},"get":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"List Invoices","operationId":"list_invoices_api_v1_billing_invoices_get","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"sigtel | eikam | manual | partner system code","title":"Source"},"description":"sigtel | eikam | manual | partner system code"},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}],"title":"Currency"}},{"name":"period_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period Start"}},{"name":"period_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period End"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/invoices/{invoice_id}":{"get":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Get Invoice","operationId":"get_invoice_api_v1_billing_invoices__invoice_id__get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/invoices/{invoice_id}/pdf":{"get":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Download Invoice Pdf","description":"Generate and download a PDF invoice.","operationId":"download_invoice_pdf_api_v1_billing_invoices__invoice_id__pdf_get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"tenant_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tenant Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/invoices/{invoice_id}/lines":{"post":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Add Line Item","operationId":"add_line_item_api_v1_billing_invoices__invoice_id__lines_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceLineCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/invoices/{invoice_id}/lines/{line_id}":{"delete":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Remove Line Item","operationId":"remove_line_item_api_v1_billing_invoices__invoice_id__lines__line_id__delete","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"integer","title":"Line Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/invoices/{invoice_id}/issue":{"post":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Issue Invoice","operationId":"issue_invoice_api_v1_billing_invoices__invoice_id__issue_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueInvoiceRequest","default":{"payment_terms_days":30}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/invoices/{invoice_id}/pay":{"post":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Record Payment","operationId":"record_payment_api_v1_billing_invoices__invoice_id__pay_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordPaymentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/invoices/{invoice_id}/void":{"post":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Void Invoice","operationId":"void_invoice_api_v1_billing_invoices__invoice_id__void_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidInvoiceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/credit-notes":{"post":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Create Credit Note","operationId":"create_credit_note_api_v1_billing_credit_notes_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNoteCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/run-billing-cycle":{"post":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Run Billing Cycle","description":"Generate invoices for all active subscriptions whose billing period has ended.","operationId":"run_billing_cycle_api_v1_billing_run_billing_cycle_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Billing Cycle Api V1 Billing Run Billing Cycle Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/cycles":{"post":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Create Billing Cycle","operationId":"create_billing_cycle_api_v1_billing_cycles_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCycleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCycleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"List Billing Cycles","operationId":"list_billing_cycles_api_v1_billing_cycles_get","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCycleListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/cycles/{cycle_id}":{"get":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Get Billing Cycle","operationId":"get_billing_cycle_api_v1_billing_cycles__cycle_id__get","parameters":[{"name":"cycle_id","in":"path","required":true,"schema":{"type":"integer","title":"Cycle Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCycleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/partners":{"post":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Create Partner","description":"Create a partner/reseller revenue share agreement.","operationId":"create_partner_api_v1_billing_partners_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"List Partners","description":"List all partner agreements.","operationId":"list_partners_api_v1_billing_partners_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PartnerResponse"},"title":"Response List Partners Api V1 Billing Partners Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/partners/assign-customer":{"post":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Assign Customer To Partner","description":"Assign a customer to a partner for revenue share tracking.","operationId":"assign_customer_to_partner_api_v1_billing_partners_assign_customer_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignCustomerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Assign Customer To Partner Api V1 Billing Partners Assign Customer Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/partners/{partner_id}/calculate":{"post":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Calculate Settlement","description":"Calculate revenue share for a partner over a billing period.","operationId":"calculate_settlement_api_v1_billing_partners__partner_id__calculate_post","parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"integer","title":"Partner Id"}},{"name":"period_start","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"Period Start"}},{"name":"period_end","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"Period End"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Calculate Settlement Api V1 Billing Partners  Partner Id  Calculate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/partners/{partner_id}/settlements":{"get":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"List Settlements","description":"List all settlements for a partner.","operationId":"list_settlements_api_v1_billing_partners__partner_id__settlements_get","parameters":[{"name":"partner_id","in":"path","required":true,"schema":{"type":"integer","title":"Partner Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SettlementResponse"},"title":"Response List Settlements Api V1 Billing Partners  Partner Id  Settlements Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/partners/settlements/{settlement_id}/approve":{"patch":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Approve Settlement","description":"Approve a calculated settlement for payout.","operationId":"approve_settlement_api_v1_billing_partners_settlements__settlement_id__approve_patch","parameters":[{"name":"settlement_id","in":"path","required":true,"schema":{"type":"integer","title":"Settlement Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Settlement Api V1 Billing Partners Settlements  Settlement Id  Approve Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/partners/settlements/{settlement_id}/pay":{"patch":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Mark Settlement Paid","description":"Mark a settlement as paid with payout reference.","operationId":"mark_settlement_paid_api_v1_billing_partners_settlements__settlement_id__pay_patch","parameters":[{"name":"settlement_id","in":"path","required":true,"schema":{"type":"integer","title":"Settlement Id"}},{"name":"payout_reference","in":"query","required":true,"schema":{"type":"string","title":"Payout Reference"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mark Settlement Paid Api V1 Billing Partners Settlements  Settlement Id  Pay Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/invoicing/trigger":{"post":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Trigger Invoicing","description":"Publish invoicing.requested events for the customers in scope.\n\nConsumers (external workflow like Eikam, or Sigtel's own rating engine\nfor internal-mode tenants) pick up the events and compute the invoices.\nThis endpoint does not compute anything itself — it only emits.\n\nBehaviour by tenant mode:\n  external — invoicing.requested fans out, one per customer in scope.\n  internal — invoicing.requested fans out (still useful as an audit\n             trail), AND the rating engine is invoked synchronously for\n             each customer in scope so the operator gets immediate\n             feedback without waiting for a scheduler tick.","operationId":"trigger_invoicing_api_v1_billing_invoicing_trigger_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_TriggerInvoicingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Trigger Invoicing Api V1 Billing Invoicing Trigger Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/invoicing/runs":{"post":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Create Run","description":"Register an external-orchestrator-initiated invoicing run.\n\nEikam calls this *before* writing invoices, so subsequent invoice POSTs\nthat carry X-Source-Ref=<external_run_id> roll up under one run in\nReports. If Eikam writes invoices first without registering a run, the\ninvoices still land — they just won't be grouped.","operationId":"create_run_api_v1_billing_invoicing_runs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_EikamInitRunRequest"}}}},"responses":{"201":{"description":"New invoicing run registered.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Run Api V1 Billing Invoicing Runs Post"}}}},"200":{"description":"Idempotent — `external_run_id` already registered. The existing run is returned with `deduplicated: true`."},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]},"example":{"detail":"Authentication required"}}}},"403":{"description":"Authenticated but the token lacks the required scope.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]},"example":{"detail":"Missing scope: invoices:read"}}}},"422":{"description":"Schema or enum validation failed. `detail` is an array of per-field errors (FastAPI `RequestValidationError` shape).","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"},"ctx":{"type":"object"}}}}}},"example":{"detail":[{"loc":["body","lines",0,"unit"],"msg":"Input should be 'month', 'MB', 'min', 'msg', ...","type":"enum"}]}}}}}},"get":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"List Runs","description":"List invoicing runs for the calling tenant — newest first.","operationId":"list_runs_api_v1_billing_invoicing_runs_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Runs Api V1 Billing Invoicing Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/invoicing/runs/{run_id}":{"patch":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"Update Run Status","description":"Set a run's terminal status. Used by external orchestrators (Eikam,\npartner ERPs) to report 'I'm done' or 'I failed at customer 7 of 12'.\n\nSigtel also auto-completes a run when its invoice count reaches the\ncustomers_in_scope target, so calling this PATCH is optional for the\nhappy path — but it's how Eikam reports a failure that didn't produce\nany partial invoices.","operationId":"update_run_status_api_v1_billing_invoicing_runs__run_id__patch","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_RunStatusUpdate"}}}},"responses":{"200":{"description":"Status updated.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Run Status Api V1 Billing Invoicing Runs  Run Id  Patch"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]},"example":{"detail":"Authentication required"}}}},"403":{"description":"Authenticated but the token lacks the required scope.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]},"example":{"detail":"Missing scope: invoices:read"}}}},"404":{"description":"Resource not found in this tenant.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]},"example":{"detail":"not found"}}}},"422":{"description":"Schema or enum validation failed. `detail` is an array of per-field errors (FastAPI `RequestValidationError` shape).","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"type":{"type":"string"},"ctx":{"type":"object"}}}}}},"example":{"detail":[{"loc":["body","lines",0,"unit"],"msg":"Input should be 'month', 'MB', 'min', 'msg', ...","type":"enum"}]}}}}}}},"/api/v1/billing/invoicing/eligible-customers":{"get":{"tags":["SIG-BILL — Billing & Invoicing"],"summary":"List Eligible Customers","description":"List customers eligible for invoicing in the given period.\n\nReturns the full subscription + rate-plan context an external\norchestrator needs to compute invoices. Mirrors the\ncustomer_subscription_billing_view exposed over HTTP so workflows\nwithout Postgres access (Eikam HTTP-only mode, serverless, partner\nERPs) can self-serve.\n\nperiod_start/end aren't enforced today — we return every active\nsubscription. They're plumbed through so future logic (mid-cycle\nupgrades, prorated billing) can filter on the period.","operationId":"list_eligible_customers_api_v1_billing_invoicing_eligible_customers_get","parameters":[{"name":"period_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period Start"}},{"name":"period_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period End"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"List of customers eligible for invoicing in the given period. In the rare case where the tenant's `customer_subscription_billing_view` is missing (a skipped migration), the response is `{items: [], total: 0, error: '...'}` — still HTTP 200; surface the `error` field to ops.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Eligible Customers Api V1 Billing Invoicing Eligible Customers Get"}}}},"401":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]},"example":{"detail":"Authentication required"}}}},"403":{"description":"Authenticated but the token lacks the required scope.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]},"example":{"detail":"Missing scope: customers:read"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/rate-plans":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Create Rate Plan","description":"Create a new rate plan.","operationId":"create_rate_plan_api_v1_rating_rate_plans_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatePlanCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatePlanOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-RATE — Rating & Charging"],"summary":"List Rate Plans","description":"List rate plans for the tenant.","operationId":"list_rate_plans_api_v1_rating_rate_plans_get","parameters":[{"name":"plan_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by service plan ID","title":"Plan Id"},"description":"Filter by service plan ID"},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only active rate plans","default":false,"title":"Active Only"},"description":"Only active rate plans"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RatePlanOut"},"title":"Response List Rate Plans Api V1 Rating Rate Plans Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/rate-plans/{rate_plan_id}":{"get":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Get Rate Plan","description":"Get a single rate plan by ID.","operationId":"get_rate_plan_api_v1_rating_rate_plans__rate_plan_id__get","parameters":[{"name":"rate_plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Rate Plan Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatePlanOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Update Rate Plan","description":"Update an existing rate plan.","operationId":"update_rate_plan_api_v1_rating_rate_plans__rate_plan_id__patch","parameters":[{"name":"rate_plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Rate Plan Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatePlanUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatePlanOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Delete Rate Plan","description":"Delete a rate plan. Cascades to its rated_charges only if status='draft'.\n\nIdempotent: 204 if it didn't exist.","operationId":"delete_rate_plan_api_v1_rating_rate_plans__rate_plan_id__delete","parameters":[{"name":"rate_plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Rate Plan Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/usage":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Record Usage","description":"Record a usage event (from RADIUS, CDR, API, manual, or NETCONF).","operationId":"record_usage_api_v1_rating_usage_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageRecordCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageRecordOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/simulate-usage":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Simulate Usage","description":"Simulate a RADIUS accounting session — creates a usage record.\n\nAlias for POST /usage, kept for backward compatibility.","operationId":"simulate_usage_api_v1_rating_simulate_usage_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageRecordCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageRecordOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/rate":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Rate Customer Usage","description":"Rate all unrated usage records for a customer.\n\nFinds the active subscription, looks up rate plans, and produces\nRatedCharge entries for each unrated UsageRecord.","operationId":"rate_customer_usage_api_v1_rating_rate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateCustomerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatingResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/generate-invoice":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Generate Invoice From Charges","description":"Generate an invoice from unbilled rated charges.\n\nRatedCharge (unbilled) -> Invoice + InvoiceLines -> RatedCharge (billed)","operationId":"generate_invoice_from_charges_api_v1_rating_generate_invoice_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateInvoiceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceFromChargesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/reset-billing":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Reset Customer Billing","description":"Wipe a customer's rated charges + invoices for a fresh replay.\n\nOperational utility for re-running a billing month from scratch.\nAlways: deletes all rated_charges and invoice_lines/invoices that hung\noff them, marks usage records as unrated.\nWith drop_usage=true: also deletes the customer's usage records (use for\ndeterministic replay scripts that re-load usage from a known input).","operationId":"reset_customer_billing_api_v1_rating_reset_billing_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetBillingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reset Customer Billing Api V1 Rating Reset Billing Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/manual-charge":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Post Manual Charge","description":"Inject a one-time rated charge for a customer.\n\nCatalog-driven (preferred):  pass service_code; we look up name/unit/price.\nFree-form (fallback):        pass description+amount.\n\nThe charge is written directly to rated_charges with status='unbilled'\nand gets picked up by the next /generate-invoice call alongside engine-\nproduced charges. Currency is forced to the tenant's canonical currency.","operationId":"post_manual_charge_api_v1_rating_manual_charge_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualChargeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatedChargeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/entitlements/apply":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Apply Entitlements","description":"Materialize the customer's active entitlements as unbilled rated_charges\nfor the given period. Called by the seed, by the rating engine, and by\nexternal workflows that want Sigtel to assemble pro-services lines for\na customer before invoicing.\n\nIdempotent — entitlements already materialized for this period are\nskipped.","operationId":"apply_entitlements_api_v1_rating_entitlements_apply_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_ApplyEntitlementsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Apply Entitlements Api V1 Rating Entitlements Apply Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/chain/{customer_id}":{"get":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Get Charging Chain","description":"View the full charging chain for a customer.\n\nShows: UsageRecords -> RatedCharges -> Invoices","operationId":"get_charging_chain_api_v1_rating_chain__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargingChainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/usage-summary/{customer_id}":{"get":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Get Usage Summary","description":"Get aggregated usage statistics for a customer.","operationId":"get_usage_summary_api_v1_rating_usage_summary__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/pipeline/run":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Run Pipeline","description":"Run the full mediation -> rating -> charging -> billing pipeline.\n\nProcesses all unrated CDRs and SMS records for a customer:\n  - Checks allowance counters (voice, SMS, data)\n  - Consumes from allowance or calculates overage charges\n  - Creates charged items in SIG-CHG\n  - Applies flat monthly plan fee (once per period)\n  - Returns summary with counts and totals","operationId":"run_pipeline_api_v1_rating_pipeline_run_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateCustomerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Pipeline Api V1 Rating Pipeline Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/pipeline/generate-invoice":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Pipeline Generate Invoice","description":"Generate an invoice from charged items created by the pipeline.\n\nQueries ALL charged_items for the customer in the billing period,\ngroups overage charges by type, and creates detailed invoice lines.","operationId":"pipeline_generate_invoice_api_v1_rating_pipeline_generate_invoice_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateInvoiceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pipeline Generate Invoice Api V1 Rating Pipeline Generate Invoice Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/threshold/{customer_id}":{"get":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Check Customer Threshold","description":"Check if a customer has exceeded plan thresholds.\n\nUsed by RADIUS authorize callback and PCRF to decide whether to\nallow or block service. Returns remaining allowances and exceeded flags.","operationId":"check_customer_threshold_api_v1_rating_threshold__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Check Customer Threshold Api V1 Rating Threshold  Customer Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/cdr":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Ingest Cdr","description":"Ingest a single Call Detail Record.","operationId":"ingest_cdr_api_v1_rating_cdr_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CdrCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CdrResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/cdr/bulk":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Ingest Cdr Bulk","description":"Ingest a batch of CDRs.","operationId":"ingest_cdr_bulk_api_v1_rating_cdr_bulk_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CdrBulkCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ingest Cdr Bulk Api V1 Rating Cdr Bulk Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/cdr/history/{customer_id}":{"get":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Get Cdr History","description":"Call history for a customer, paginated, ordered by call_start desc.","operationId":"get_cdr_history_api_v1_rating_cdr_history__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CdrListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/cdr/stats/{customer_id}":{"get":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Get Cdr Stats","description":"Call statistics summary for a customer.","operationId":"get_cdr_stats_api_v1_rating_cdr_stats__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallStatsSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/sms":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Ingest Sms","description":"Ingest a single SMS record.","operationId":"ingest_sms_api_v1_rating_sms_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsRecordCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsRecordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/sms/bulk":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Ingest Sms Bulk","description":"Ingest a batch of SMS records.","operationId":"ingest_sms_bulk_api_v1_rating_sms_bulk_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsBulkCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ingest Sms Bulk Api V1 Rating Sms Bulk Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/sms/history/{customer_id}":{"get":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Get Sms History","description":"SMS history for a customer, paginated, ordered by timestamp desc.","operationId":"get_sms_history_api_v1_rating_sms_history__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/sms/stats/{customer_id}":{"get":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Get Sms Stats","description":"SMS statistics summary for a customer.","operationId":"get_sms_stats_api_v1_rating_sms_stats__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsStatsSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/simulator/generate":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Generate Usage","description":"Bulk-generate realistic usage, CDR, and SMS records for demo purposes.\n\nSimulates what RADIUS, CDR feeds, SMSC, and NETCONF polling would produce.\nGenerates:\n  - UsageRecord entries for data sessions (existing behavior)\n  - CallDetailRecord entries with realistic Rwandan phone numbers\n  - SmsRecord entries with realistic delivery patterns","operationId":"generate_usage_api_v1_rating_simulator_generate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulatorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Generate Usage Api V1 Rating Simulator Generate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/dry-run":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Dry Run","description":"Run the rating engine against a synthetic usage payload and return the\nresulting line-by-line invoice preview. Writes nothing to the database.\n\nThe Playground UI calls this on each Recompute. Auth: tenant context is\nenough in sandbox mode; production requires `rating:dry-run` scope.","operationId":"dry_run_api_v1_rating_dry_run_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_DryRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dry Run Api V1 Rating Dry Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/starter-overrides/{customer_id}":{"get":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Get Starter Overrides","description":"Return the usage payload that reproduces this customer's last rated\nmonth. The Playground uses this to prefill each demo customer with its\nmaster-data baseline. Returns zeros for any dimension the customer\ndidn't use.","operationId":"get_starter_overrides_api_v1_rating_starter_overrides__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Starter Overrides Api V1 Rating Starter Overrides  Customer Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/scenarios":{"post":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Create Scenario","description":"Save a named scenario. Computes its total once at save time (cached for\nthe list view) and mints a `share_token` for URL-based sharing.","operationId":"create_scenario_api_v1_rating_scenarios_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_ScenarioCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Scenario Api V1 Rating Scenarios Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-RATE — Rating & Charging"],"summary":"List Scenarios","description":"List this tenant's active scenarios.","operationId":"list_scenarios_api_v1_rating_scenarios_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Scenarios Api V1 Rating Scenarios Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rating/scenarios/{share_token}":{"get":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Get Scenario By Token","description":"Load a saved scenario by its share token + recompute the preview live\n(so any rate-plan edits made since save are reflected).\n\nTenant scoping still applies — the share token alone narrows to one row,\nand the tenant header narrows to one tenant. A public token can be\nforwarded to anyone, but they need at least a sandbox `X-Tenant-ID` to\nfollow the link.","operationId":"get_scenario_by_token_api_v1_rating_scenarios__share_token__get","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Scenario By Token Api V1 Rating Scenarios  Share Token  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SIG-RATE — Rating & Charging"],"summary":"Soft Delete Scenario","description":"Soft-delete a scenario. The row stays for audit; `is_active` flips to\nfalse so it no longer appears in the list or resolves by token.","operationId":"soft_delete_scenario_api_v1_rating_scenarios__share_token__delete","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/methods":{"post":{"tags":["SIG-PAY — Payments"],"summary":"Add Payment Method","operationId":"add_payment_method_api_v1_payments_methods_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/methods/{customer_id}":{"get":{"tags":["SIG-PAY — Payments"],"summary":"List Payment Methods","operationId":"list_payment_methods_api_v1_payments_methods__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodResponse"},"title":"Response List Payment Methods Api V1 Payments Methods  Customer Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/methods/{customer_id}/{method_id}/default":{"post":{"tags":["SIG-PAY — Payments"],"summary":"Set Default Method","operationId":"set_default_method_api_v1_payments_methods__customer_id___method_id__default_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"method_id","in":"path","required":true,"schema":{"type":"integer","title":"Method Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/methods/{method_id}":{"delete":{"tags":["SIG-PAY — Payments"],"summary":"Deactivate Payment Method","operationId":"deactivate_payment_method_api_v1_payments_methods__method_id__delete","parameters":[{"name":"method_id","in":"path","required":true,"schema":{"type":"integer","title":"Method Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/":{"post":{"tags":["SIG-PAY — Payments"],"summary":"Record Payment","operationId":"record_payment_api_v1_payments__post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-PAY — Payments"],"summary":"List Payments","description":"List payments with filtering and pagination.","operationId":"list_payments_api_v1_payments__get","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"}},{"name":"payment_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"invoice_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invoice Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/{payment_id}":{"get":{"tags":["SIG-PAY — Payments"],"summary":"Get Payment","operationId":"get_payment_api_v1_payments__payment_id__get","parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"integer","title":"Payment Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/refund":{"post":{"tags":["SIG-PAY — Payments"],"summary":"Process Refund","operationId":"process_refund_api_v1_payments_refund_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/prepaid/{customer_id}/balance":{"get":{"tags":["SIG-PAY — Payments"],"summary":"Get Prepaid Balance","operationId":"get_prepaid_balance_api_v1_payments_prepaid__customer_id__balance_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepaidBalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/prepaid/topup":{"post":{"tags":["SIG-PAY — Payments"],"summary":"Topup Prepaid","description":"Top up prepaid balance. Returns the payment record.","operationId":"topup_prepaid_api_v1_payments_prepaid_topup_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepaidTopupRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/prepaid/deduct":{"post":{"tags":["SIG-PAY — Payments"],"summary":"Deduct Prepaid","description":"Deduct from prepaid balance (usage session, etc.). Returns updated balance.","operationId":"deduct_prepaid_api_v1_payments_prepaid_deduct_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepaidDeductRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepaidBalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/prepaid/{customer_id}/transactions":{"get":{"tags":["SIG-PAY — Payments"],"summary":"List Prepaid Transactions","description":"List prepaid transactions for a customer.","operationId":"list_prepaid_transactions_api_v1_payments_prepaid__customer_id__transactions_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","title":"Customer Id"}},{"name":"transaction_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transaction Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/pay-invoice":{"post":{"tags":["SIG-PAY — Payments"],"summary":"Pay Invoice","description":"Pay an invoice via MoMo (or other provider).\n\nLooks up the invoice, gets the customer's phone number, initiates a collection\nrequest with the gateway, and creates a pending payment record.\nThe consumer app then polls /payments/{reference}/status until resolved.","operationId":"pay_invoice_api_v1_payments_pay_invoice_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayInvoiceRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayInvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/{reference}/status":{"get":{"tags":["SIG-PAY — Payments"],"summary":"Get Payment Status","description":"Poll payment status by provider reference.\n\nChecks the gateway for the current status. If completed, updates the payment\nrecord and marks the linked invoice as paid. If failed, records the reason.","operationId":"get_payment_status_api_v1_payments__reference__status_get","parameters":[{"name":"reference","in":"path","required":true,"schema":{"type":"string","title":"Reference"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/gateway/balance":{"get":{"tags":["SIG-PAY — Payments"],"summary":"Get Gateway Balance","description":"Check operator float balance with a payment provider.","operationId":"get_gateway_balance_api_v1_payments_gateway_balance_get","parameters":[{"name":"provider","in":"query","required":false,"schema":{"type":"string","default":"momo","title":"Provider"}},{"name":"product","in":"query","required":false,"schema":{"type":"string","default":"collect","title":"Product"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayBalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/gateway/initiate":{"post":{"tags":["SIG-PAY — Payments"],"summary":"Gateway Initiate Payment","description":"Initiate payment via external gateway (MoMo, Stripe, or cash).\n\nDispatches to the appropriate adapter, records a pending payment in the DB,\nand returns the gateway reference for tracking.","operationId":"gateway_initiate_payment_api_v1_payments_gateway_initiate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayInitiateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayInitiateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/gateway/webhook/{provider}":{"post":{"tags":["SIG-PAY — Payments"],"summary":"Gateway Webhook","description":"Receive webhook callbacks from MoMo or Stripe.\n\nUpdates the payment record status based on the provider notification.","operationId":"gateway_webhook_api_v1_payments_gateway_webhook__provider__post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayWebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/cases":{"post":{"tags":["SIG-COL — Collections"],"summary":"Create Case","operationId":"create_case_api_v1_collections_cases_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-COL — Collections"],"summary":"List Cases","operationId":"list_cases_api_v1_collections_cases_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"priority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"}},{"name":"assigned_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"}},{"name":"min_days_overdue","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Days Overdue"}},{"name":"max_days_overdue","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Days Overdue"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Cases Api V1 Collections Cases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/cases/{case_id}":{"get":{"tags":["SIG-COL — Collections"],"summary":"Get Case","operationId":"get_case_api_v1_collections_cases__case_id__get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["SIG-COL — Collections"],"summary":"Update Case","operationId":"update_case_api_v1_collections_cases__case_id__patch","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/cases/{case_id}/status":{"patch":{"tags":["SIG-COL — Collections"],"summary":"Update Case Status","operationId":"update_case_status_api_v1_collections_cases__case_id__status_patch","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/cases/{case_id}/escalate":{"post":{"tags":["SIG-COL — Collections"],"summary":"Escalate Case","operationId":"escalate_case_api_v1_collections_cases__case_id__escalate_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"performed_by","in":"query","required":true,"schema":{"type":"string","title":"Performed By"}},{"name":"notes","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/cases/{case_id}/suspend":{"post":{"tags":["SIG-COL — Collections"],"summary":"Suspend Case","operationId":"suspend_case_api_v1_collections_cases__case_id__suspend_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"notes","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/cases/{case_id}/close":{"post":{"tags":["SIG-COL — Collections"],"summary":"Close Case","operationId":"close_case_api_v1_collections_cases__case_id__close_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"notes","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/cases/{case_id}/write-off":{"post":{"tags":["SIG-COL — Collections"],"summary":"Write Off Case","operationId":"write_off_case_api_v1_collections_cases__case_id__write_off_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"notes","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/cases/{case_id}/actions":{"post":{"tags":["SIG-COL — Collections"],"summary":"Record Action","operationId":"record_action_api_v1_collections_cases__case_id__actions_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionActionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/dunning/run":{"post":{"tags":["SIG-COL — Collections"],"summary":"Run Dunning","description":"Execute dunning policy against all open cases based on days overdue.","operationId":"run_dunning_api_v1_collections_dunning_run_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Dunning Api V1 Collections Dunning Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/dunning/policies":{"post":{"tags":["SIG-COL — Collections"],"summary":"Create Dunning Policy","operationId":"create_dunning_policy_api_v1_collections_dunning_policies_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DunningPolicyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DunningPolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-COL — Collections"],"summary":"List Dunning Policies","operationId":"list_dunning_policies_api_v1_collections_dunning_policies_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DunningPolicyResponse"},"title":"Response List Dunning Policies Api V1 Collections Dunning Policies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/dunning/policies/{policy_id}":{"get":{"tags":["SIG-COL — Collections"],"summary":"Get Dunning Policy","operationId":"get_dunning_policy_api_v1_collections_dunning_policies__policy_id__get","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"integer","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DunningPolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["SIG-COL — Collections"],"summary":"Update Dunning Policy","operationId":"update_dunning_policy_api_v1_collections_dunning_policies__policy_id__patch","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"integer","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DunningPolicyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DunningPolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SIG-COL — Collections"],"summary":"Delete Dunning Policy","operationId":"delete_dunning_policy_api_v1_collections_dunning_policies__policy_id__delete","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"integer","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/collections/dashboard":{"get":{"tags":["SIG-COL — Collections"],"summary":"Get Dashboard Stats","operationId":"get_dashboard_stats_api_v1_collections_dashboard_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets":{"post":{"tags":["SIG-TKT — Support Tickets"],"summary":"Create Ticket","operationId":"create_ticket_api_v1_tickets_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-TKT — Support Tickets"],"summary":"List Tickets","operationId":"list_tickets_api_v1_tickets_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"priority","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"assigned_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"}},{"name":"assigned_team","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Team"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"}},{"name":"sla_breached","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sla Breached"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/stats":{"get":{"tags":["SIG-TKT — Support Tickets"],"summary":"Get Ticket Stats","operationId":"get_ticket_stats_api_v1_tickets_stats_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/{ticket_id}":{"get":{"tags":["SIG-TKT — Support Tickets"],"summary":"Get Ticket","operationId":"get_ticket_api_v1_tickets__ticket_id__get","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["SIG-TKT — Support Tickets"],"summary":"Update Ticket","operationId":"update_ticket_api_v1_tickets__ticket_id__patch","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/{ticket_id}/status":{"post":{"tags":["SIG-TKT — Support Tickets"],"summary":"Change Ticket Status","operationId":"change_ticket_status_api_v1_tickets__ticket_id__status_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketStatusChange"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/{ticket_id}/assign":{"post":{"tags":["SIG-TKT — Support Tickets"],"summary":"Assign Ticket","operationId":"assign_ticket_api_v1_tickets__ticket_id__assign_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketAssign"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/{ticket_id}/resolve":{"post":{"tags":["SIG-TKT — Support Tickets"],"summary":"Resolve Ticket","operationId":"resolve_ticket_api_v1_tickets__ticket_id__resolve_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}},{"name":"resolution_notes","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Notes"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/{ticket_id}/close":{"post":{"tags":["SIG-TKT — Support Tickets"],"summary":"Close Ticket","operationId":"close_ticket_api_v1_tickets__ticket_id__close_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/{ticket_id}/reopen":{"post":{"tags":["SIG-TKT — Support Tickets"],"summary":"Reopen Ticket","operationId":"reopen_ticket_api_v1_tickets__ticket_id__reopen_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/sla/check-breaches":{"post":{"tags":["SIG-TKT — Support Tickets"],"summary":"Check Sla Breaches","operationId":"check_sla_breaches_api_v1_tickets_sla_check_breaches_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"},"title":"Response Check Sla Breaches Api V1 Tickets Sla Check Breaches Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/{ticket_id}/comments":{"post":{"tags":["SIG-TKT — Support Tickets"],"summary":"Add Comment","operationId":"add_comment_api_v1_tickets__ticket_id__comments_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-TKT — Support Tickets"],"summary":"List Comments","operationId":"list_comments_api_v1_tickets__ticket_id__comments_get","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}},{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Internal"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/sla/policies":{"post":{"tags":["SIG-TKT — Support Tickets"],"summary":"Create Sla Policy","operationId":"create_sla_policy_api_v1_tickets_sla_policies_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLAPolicyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLAPolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-TKT — Support Tickets"],"summary":"List Sla Policies","operationId":"list_sla_policies_api_v1_tickets_sla_policies_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLAPolicyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tickets/sla/policies/{policy_id}":{"get":{"tags":["SIG-TKT — Support Tickets"],"summary":"Get Sla Policy","operationId":"get_sla_policy_api_v1_tickets_sla_policies__policy_id__get","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"integer","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLAPolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["SIG-TKT — Support Tickets"],"summary":"Update Sla Policy","operationId":"update_sla_policy_api_v1_tickets_sla_policies__policy_id__patch","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"integer","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLAPolicyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SLAPolicyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SIG-TKT — Support Tickets"],"summary":"Delete Sla Policy","operationId":"delete_sla_policy_api_v1_tickets_sla_policies__policy_id__delete","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"integer","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tax/baselines":{"get":{"tags":["SIG-TAX — Tax Engine"],"summary":"List Tax Baselines","description":"List tax baselines from the shared catalog. Filter by country + region.","operationId":"list_tax_baselines_api_v1_tax_baselines_get","parameters":[{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}],"description":"ISO 3166-1 alpha-2","title":"Country"},"description":"ISO 3166-1 alpha-2"},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Tax Baselines Api V1 Tax Baselines Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tax/effective":{"get":{"tags":["SIG-TAX — Tax Engine"],"summary":"Get Effective Tax","description":"Resolve the effective tax rate for a customer in (country, region).\n\nResolution: tenant's own active TaxRule for the jurisdiction → public\nTaxBaseline for the same jurisdiction → null.","operationId":"get_effective_tax_api_v1_tax_effective_get","parameters":[{"name":"country","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":2,"title":"Country"}},{"name":"region","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Effective Tax Api V1 Tax Effective Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tax/calculate":{"post":{"tags":["SIG-TAX — Tax Engine"],"summary":"Calculate Tax","description":"Calculate taxes for a set of line items given country/region.","operationId":"calculate_tax_api_v1_tax_calculate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxCalculationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxCalculationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tax/rules":{"post":{"tags":["SIG-TAX — Tax Engine"],"summary":"Create Tax Rule","operationId":"create_tax_rule_api_v1_tax_rules_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRuleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-TAX — Tax Engine"],"summary":"List Tax Rules","operationId":"list_tax_rules_api_v1_tax_rules_get","parameters":[{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Country"}},{"name":"tax_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Type"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRuleListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tax/rules/{rule_id}":{"get":{"tags":["SIG-TAX — Tax Engine"],"summary":"Get Tax Rule","operationId":"get_tax_rule_api_v1_tax_rules__rule_id__get","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["SIG-TAX — Tax Engine"],"summary":"Update Tax Rule","operationId":"update_tax_rule_api_v1_tax_rules__rule_id__patch","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["SIG-TAX — Tax Engine"],"summary":"Delete Tax Rule","operationId":"delete_tax_rule_api_v1_tax_rules__rule_id__delete","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tax/exemptions":{"post":{"tags":["SIG-TAX — Tax Engine"],"summary":"Create Exemption","operationId":"create_exemption_api_v1_tax_exemptions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxExemptionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxExemptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-TAX — Tax Engine"],"summary":"List Exemptions","operationId":"list_exemptions_api_v1_tax_exemptions_get","parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"}},{"name":"tax_rule_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Rule Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxExemptionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tax/exemptions/{exemption_id}":{"delete":{"tags":["SIG-TAX — Tax Engine"],"summary":"Delete Exemption","operationId":"delete_exemption_api_v1_tax_exemptions__exemption_id__delete","parameters":[{"name":"exemption_id","in":"path","required":true,"schema":{"type":"integer","title":"Exemption Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tax/summary":{"get":{"tags":["SIG-TAX — Tax Engine"],"summary":"Get Tax Summary","operationId":"get_tax_summary_api_v1_tax_summary_get","parameters":[{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Country"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tax/seed":{"post":{"tags":["SIG-TAX — Tax Engine"],"summary":"Seed Common Rules","description":"Seed common tax rules for a country (Rwanda, India, Kenya, etc.).","operationId":"seed_common_rules_api_v1_tax_seed_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/terminals":{"post":{"tags":["SIG-POS — Point of Sale"],"summary":"Create Terminal","operationId":"create_terminal_api_v1_pos_terminals_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-POS — Point of Sale"],"summary":"List Terminals","operationId":"list_terminals_api_v1_pos_terminals_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/terminals/{terminal_id}":{"get":{"tags":["SIG-POS — Point of Sale"],"summary":"Get Terminal","operationId":"get_terminal_api_v1_pos_terminals__terminal_id__get","parameters":[{"name":"terminal_id","in":"path","required":true,"schema":{"type":"integer","title":"Terminal Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["SIG-POS — Point of Sale"],"summary":"Update Terminal","operationId":"update_terminal_api_v1_pos_terminals__terminal_id__patch","parameters":[{"name":"terminal_id","in":"path","required":true,"schema":{"type":"integer","title":"Terminal Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/terminals/{terminal_id}/assign-operator":{"post":{"tags":["SIG-POS — Point of Sale"],"summary":"Assign Operator","operationId":"assign_operator_api_v1_pos_terminals__terminal_id__assign_operator_post","parameters":[{"name":"terminal_id","in":"path","required":true,"schema":{"type":"integer","title":"Terminal Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignOperatorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/transactions":{"post":{"tags":["SIG-POS — Point of Sale"],"summary":"Create Transaction","operationId":"create_transaction_api_v1_pos_transactions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-POS — Point of Sale"],"summary":"List Transactions","operationId":"list_transactions_api_v1_pos_transactions_get","parameters":[{"name":"terminal_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Terminal Id"}},{"name":"operator","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator"}},{"name":"transaction_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transaction Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date To"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/transactions/{transaction_id}":{"get":{"tags":["SIG-POS — Point of Sale"],"summary":"Get Transaction","operationId":"get_transaction_api_v1_pos_transactions__transaction_id__get","parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"integer","title":"Transaction Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/transactions/{transaction_id}/lines":{"post":{"tags":["SIG-POS — Point of Sale"],"summary":"Add Line Item","operationId":"add_line_item_api_v1_pos_transactions__transaction_id__lines_post","parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"integer","title":"Transaction Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineItemCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/transactions/{transaction_id}/complete":{"post":{"tags":["SIG-POS — Point of Sale"],"summary":"Complete Transaction","operationId":"complete_transaction_api_v1_pos_transactions__transaction_id__complete_post","parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"integer","title":"Transaction Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteTransactionRequest","default":{"payment_method":"cash"}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/transactions/{transaction_id}/void":{"post":{"tags":["SIG-POS — Point of Sale"],"summary":"Void Transaction","operationId":"void_transaction_api_v1_pos_transactions__transaction_id__void_post","parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"integer","title":"Transaction Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidTransactionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/transactions/{transaction_id}/refund":{"post":{"tags":["SIG-POS — Point of Sale"],"summary":"Refund Transaction","operationId":"refund_transaction_api_v1_pos_transactions__transaction_id__refund_post","parameters":[{"name":"transaction_id","in":"path","required":true,"schema":{"type":"integer","title":"Transaction Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/quick/voucher":{"post":{"tags":["SIG-POS — Point of Sale"],"summary":"Quick Voucher Sale","operationId":"quick_voucher_sale_api_v1_pos_quick_voucher_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickVoucherSale"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/quick/sim":{"post":{"tags":["SIG-POS — Point of Sale"],"summary":"Quick Sim Sale","operationId":"quick_sim_sale_api_v1_pos_quick_sim_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickSIMSale"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/quick/topup":{"post":{"tags":["SIG-POS — Point of Sale"],"summary":"Quick Topup","operationId":"quick_topup_api_v1_pos_quick_topup_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickTopup"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/products":{"post":{"tags":["SIG-POS — Point of Sale"],"summary":"Create Product","operationId":"create_product_api_v1_pos_products_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["SIG-POS — Point of Sale"],"summary":"List Products","operationId":"list_products_api_v1_pos_products_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/products/alerts/low-stock":{"get":{"tags":["SIG-POS — Point of Sale"],"summary":"Get Low Stock Alerts","operationId":"get_low_stock_alerts_api_v1_pos_products_alerts_low_stock_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LowStockAlert"},"title":"Response Get Low Stock Alerts Api V1 Pos Products Alerts Low Stock Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/products/{product_id}":{"get":{"tags":["SIG-POS — Point of Sale"],"summary":"Get Product","operationId":"get_product_api_v1_pos_products__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["SIG-POS — Point of Sale"],"summary":"Update Product","operationId":"update_product_api_v1_pos_products__product_id__patch","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/products/{product_id}/stock":{"post":{"tags":["SIG-POS — Point of Sale"],"summary":"Adjust Stock","operationId":"adjust_stock_api_v1_pos_products__product_id__stock_post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"integer","title":"Product Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockAdjustRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pos/reports/daily-summary":{"get":{"tags":["SIG-POS — Point of Sale"],"summary":"Get Daily Summary","operationId":"get_daily_summary_api_v1_pos_reports_daily_summary_get","parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string","description":"Date in YYYY-MM-DD format","title":"Date"},"description":"Date in YYYY-MM-DD format"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-tenant-id","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Tenant-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailySummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActionResult":{"type":"string","enum":["successful","no_response","promised_to_pay","refused","bounced"],"title":"ActionResult"},"ActionType":{"type":"string","enum":["reminder_email","reminder_sms","phone_call","letter","service_suspension","escalation","payment_arrangement","write_off"],"title":"ActionType"},"AgingBucket":{"properties":{"bucket":{"type":"string","title":"Bucket"},"count":{"type":"integer","title":"Count"},"total_outstanding":{"type":"number","title":"Total Outstanding"}},"type":"object","required":["bucket","count","total_outstanding"],"title":"AgingBucket"},"AppliesTo":{"type":"string","enum":["all","broadband","voice","sms","data","equipment","subscription","one_time"],"title":"AppliesTo"},"AssignCustomerRequest":{"properties":{"partner_id":{"type":"integer","title":"Partner Id"},"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"}},"type":"object","required":["partner_id","customer_id"],"title":"AssignCustomerRequest"},"AssignOperatorRequest":{"properties":{"operator_name":{"type":"string","maxLength":200,"title":"Operator Name"}},"type":"object","required":["operator_name"],"title":"AssignOperatorRequest"},"AuthorType":{"type":"string","enum":["agent","customer","system"],"title":"AuthorType"},"BillingCycleCreate":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"cycle_type":{"$ref":"#/components/schemas/CycleType","default":"monthly"},"anchor_day":{"type":"integer","maximum":28.0,"minimum":1.0,"title":"Anchor Day","default":1},"next_bill_date":{"type":"string","format":"date-time","title":"Next Bill Date"}},"type":"object","required":["customer_id","next_bill_date"],"title":"BillingCycleCreate"},"BillingCycleListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BillingCycleResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"BillingCycleListResponse"},"BillingCycleResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"customer_id":{"type":"string","title":"Customer Id"},"cycle_type":{"type":"string","title":"Cycle Type"},"anchor_day":{"type":"integer","title":"Anchor Day"},"next_bill_date":{"type":"string","format":"date-time","title":"Next Bill Date"},"last_billed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Billed At"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","customer_id","cycle_type","anchor_day","next_bill_date","last_billed_at","status","created_at"],"title":"BillingCycleResponse"},"BulkCustomerError":{"properties":{"index":{"type":"integer","title":"Index"},"error":{"type":"string","title":"Error"}},"type":"object","required":["index","error"],"title":"BulkCustomerError"},"BulkCustomerImportResponse":{"properties":{"created":{"type":"integer","title":"Created","default":0},"failed":{"type":"integer","title":"Failed","default":0},"errors":{"items":{"$ref":"#/components/schemas/BulkCustomerError"},"type":"array","title":"Errors","default":[]}},"type":"object","title":"BulkCustomerImportResponse"},"CallDirection":{"type":"string","enum":["outgoing","incoming"],"title":"CallDirection"},"CallStatsSummary":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"total_calls":{"type":"integer","title":"Total Calls","default":0},"total_minutes":{"type":"number","title":"Total Minutes","default":0},"by_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Type"},"by_direction":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Direction"},"total_charged":{"type":"number","title":"Total Charged","default":0},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},"type":"object","required":["customer_id"],"title":"CallStatsSummary","description":"Call statistics summary for a customer."},"CallType":{"type":"string","enum":["local","national","international","roaming","emergency"],"title":"CallType"},"CasePriority":{"type":"string","enum":["low","medium","high","critical"],"title":"CasePriority"},"CaseStatus":{"type":"string","enum":["open","in_progress","payment_promised","payment_received","escalated","suspended","closed","written_off"],"title":"CaseStatus"},"CdrBulkCreate":{"properties":{"records":{"items":{"$ref":"#/components/schemas/CdrCreate"},"type":"array","title":"Records"}},"type":"object","required":["records"],"title":"CdrBulkCreate","description":"Bulk ingest a batch of CDRs."},"CdrCreate":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"calling_number":{"type":"string","maxLength":20,"title":"Calling Number"},"called_number":{"type":"string","maxLength":20,"title":"Called Number"},"call_start":{"type":"string","format":"date-time","title":"Call Start"},"call_end":{"type":"string","format":"date-time","title":"Call End"},"duration_seconds":{"type":"integer","minimum":0.0,"title":"Duration Seconds"},"call_type":{"$ref":"#/components/schemas/CallType","default":"local"},"direction":{"$ref":"#/components/schemas/CallDirection","default":"outgoing"},"termination_cause":{"$ref":"#/components/schemas/TerminationCause","default":"normal"},"cell_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Cell Id"},"trunk_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Trunk Id"},"source":{"$ref":"#/components/schemas/CdrSource","default":"api"},"raw_cdr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Cdr"}},"type":"object","required":["customer_id","calling_number","called_number","call_start","call_end","duration_seconds"],"title":"CdrCreate","description":"Ingest a single Call Detail Record."},"CdrListResponse":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"records":{"items":{"$ref":"#/components/schemas/CdrResponse"},"type":"array","title":"Records"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["customer_id","records","total","page","page_size"],"title":"CdrListResponse","description":"Paginated call history for a customer."},"CdrResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"customer_id":{"type":"string","title":"Customer Id"},"calling_number":{"type":"string","title":"Calling Number"},"called_number":{"type":"string","title":"Called Number"},"call_start":{"type":"string","format":"date-time","title":"Call Start"},"call_end":{"type":"string","format":"date-time","title":"Call End"},"duration_seconds":{"type":"integer","title":"Duration Seconds"},"call_type":{"type":"string","title":"Call Type"},"direction":{"type":"string","title":"Direction"},"termination_cause":{"type":"string","title":"Termination Cause"},"cell_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cell Id"},"trunk_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trunk Id"},"rated":{"type":"boolean","title":"Rated"},"charge_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Charge Amount"},"charge_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Charge Currency"},"included_in_plan":{"type":"boolean","title":"Included In Plan"},"invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invoice Id"},"source":{"type":"string","title":"Source"},"raw_cdr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Cdr"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","customer_id","calling_number","called_number","call_start","call_end","duration_seconds","call_type","direction","termination_cause","cell_id","trunk_id","rated","charge_amount","charge_currency","included_in_plan","invoice_id","source","raw_cdr","created_at"],"title":"CdrResponse","description":"Full CDR with all fields."},"CdrSource":{"type":"string","enum":["msc","cdr_file","api","simulator"],"title":"CdrSource"},"ChangePlanRequest":{"properties":{"new_plan_id":{"type":"integer","title":"New Plan Id"}},"type":"object","required":["new_plan_id"],"title":"ChangePlanRequest","description":"Request to upgrade/downgrade a subscription to a different plan."},"ChargingChainResponse":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"usage_summary":{"$ref":"#/components/schemas/UsageSummary"},"rated_charges":{"items":{"$ref":"#/components/schemas/RatedChargeOut"},"type":"array","title":"Rated Charges"},"total_unbilled":{"type":"number","title":"Total Unbilled"},"total_billed":{"type":"number","title":"Total Billed"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["customer_id","usage_summary","rated_charges","total_unbilled","total_billed","currency"],"title":"ChargingChainResponse"},"CollectionActionCreate":{"properties":{"action_type":{"$ref":"#/components/schemas/ActionType"},"performed_by":{"type":"string","maxLength":120,"title":"Performed By"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"result":{"$ref":"#/components/schemas/ActionResult"},"next_action_type":{"anyOf":[{"$ref":"#/components/schemas/ActionType"},{"type":"null"}]},"next_action_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Action Date"}},"type":"object","required":["action_type","performed_by","result"],"title":"CollectionActionCreate"},"CollectionActionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"case_id":{"type":"integer","title":"Case Id"},"action_type":{"type":"string","title":"Action Type"},"action_date":{"type":"string","format":"date-time","title":"Action Date"},"performed_by":{"type":"string","title":"Performed By"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"result":{"type":"string","title":"Result"},"next_action_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Action Type"},"next_action_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Action Date"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","case_id","action_type","action_date","performed_by","notes","result","next_action_type","next_action_date","created_at"],"title":"CollectionActionResponse"},"CollectionCaseCreate":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"invoice_id":{"type":"integer","title":"Invoice Id"},"total_outstanding":{"type":"number","title":"Total Outstanding"},"currency":{"type":"string","title":"Currency","default":"USD"},"days_overdue":{"type":"integer","title":"Days Overdue","default":0},"priority":{"$ref":"#/components/schemas/CasePriority","default":"medium"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"next_action_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Action Date"}},"type":"object","required":["customer_id","invoice_id","total_outstanding"],"title":"CollectionCaseCreate"},"CollectionCaseDetail":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"customer_id":{"type":"string","title":"Customer Id"},"case_number":{"type":"string","title":"Case Number"},"invoice_id":{"type":"integer","title":"Invoice Id"},"status":{"$ref":"#/components/schemas/CaseStatus"},"priority":{"$ref":"#/components/schemas/CasePriority"},"total_outstanding":{"type":"number","title":"Total Outstanding"},"currency":{"type":"string","title":"Currency"},"days_overdue":{"type":"integer","title":"Days Overdue"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"escalation_level":{"type":"integer","title":"Escalation Level"},"next_action_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Action Date"},"resolution_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Notes"},"opened_at":{"type":"string","format":"date-time","title":"Opened At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"actions":{"items":{"$ref":"#/components/schemas/CollectionActionResponse"},"type":"array","title":"Actions","default":[]}},"type":"object","required":["id","tenant_id","customer_id","case_number","invoice_id","status","priority","total_outstanding","currency","days_overdue","assigned_to","escalation_level","next_action_date","resolution_notes","opened_at","closed_at","created_at","updated_at"],"title":"CollectionCaseDetail"},"CollectionCaseResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"customer_id":{"type":"string","title":"Customer Id"},"case_number":{"type":"string","title":"Case Number"},"invoice_id":{"type":"integer","title":"Invoice Id"},"status":{"$ref":"#/components/schemas/CaseStatus"},"priority":{"$ref":"#/components/schemas/CasePriority"},"total_outstanding":{"type":"number","title":"Total Outstanding"},"currency":{"type":"string","title":"Currency"},"days_overdue":{"type":"integer","title":"Days Overdue"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"escalation_level":{"type":"integer","title":"Escalation Level"},"next_action_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Action Date"},"resolution_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Notes"},"opened_at":{"type":"string","format":"date-time","title":"Opened At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","tenant_id","customer_id","case_number","invoice_id","status","priority","total_outstanding","currency","days_overdue","assigned_to","escalation_level","next_action_date","resolution_notes","opened_at","closed_at","created_at","updated_at"],"title":"CollectionCaseResponse"},"CollectionCaseStatusUpdate":{"properties":{"status":{"$ref":"#/components/schemas/CaseStatus"},"resolution_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Notes"}},"type":"object","required":["status"],"title":"CollectionCaseStatusUpdate"},"CollectionCaseUpdate":{"properties":{"priority":{"anyOf":[{"$ref":"#/components/schemas/CasePriority"},{"type":"null"}]},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"next_action_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Action Date"},"resolution_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Notes"}},"type":"object","title":"CollectionCaseUpdate"},"CommentCreate":{"properties":{"author":{"type":"string","maxLength":200,"minLength":1,"title":"Author"},"author_type":{"$ref":"#/components/schemas/AuthorType","default":"agent"},"body":{"type":"string","minLength":1,"title":"Body"},"is_internal":{"type":"boolean","title":"Is Internal","default":false},"attachments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attachments"}},"type":"object","required":["author","body"],"title":"CommentCreate"},"CommentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CommentResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"CommentListResponse"},"CommentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"ticket_id":{"type":"integer","title":"Ticket Id"},"author":{"type":"string","title":"Author"},"author_type":{"type":"string","title":"Author Type"},"body":{"type":"string","title":"Body"},"is_internal":{"type":"boolean","title":"Is Internal"},"attachments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attachments"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","ticket_id","author","author_type","body","is_internal","attachments","created_at"],"title":"CommentResponse"},"CompleteTransactionRequest":{"properties":{"payment_method":{"$ref":"#/components/schemas/PaymentMethod","default":"cash"},"payment_reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Payment Reference"},"amount_tendered":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount Tendered"}},"type":"object","title":"CompleteTransactionRequest"},"ContactCreate":{"properties":{"contact_type":{"type":"string","maxLength":20,"title":"Contact Type"},"name":{"type":"string","maxLength":200,"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Phone"},"title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Title"},"is_primary":{"type":"boolean","title":"Is Primary","default":false}},"type":"object","required":["contact_type","name"],"title":"ContactCreate"},"ContactResponse":{"properties":{"id":{"type":"integer","title":"Id"},"contact_type":{"type":"string","title":"Contact Type"},"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"is_primary":{"type":"boolean","title":"Is Primary"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","contact_type","name","email","phone","title","is_primary","created_at"],"title":"ContactResponse"},"CreditNoteCreate":{"properties":{"original_invoice_id":{"type":"integer","title":"Original Invoice Id"},"reason":{"type":"string","maxLength":500,"minLength":5,"title":"Reason"},"lines":{"items":{"$ref":"#/components/schemas/InvoiceLineCreate"},"type":"array","minItems":1,"title":"Lines"}},"type":"object","required":["original_invoice_id","reason","lines"],"title":"CreditNoteCreate"},"CustomerCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"display_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Display Name"},"customer_type":{"$ref":"#/components/schemas/CustomerType","default":"individual"},"email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Phone"},"secondary_phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Secondary Phone"},"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country","default":"US"},"region":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Region"},"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"City"},"address_line1":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Address Line2"},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Postal Code"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"segment":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Segment"},"tags":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Tags"},"language":{"type":"string","maxLength":5,"title":"Language","default":"en"},"currency":{"type":"string","maxLength":3,"title":"Currency","default":"USD"},"timezone":{"type":"string","maxLength":50,"title":"Timezone","default":"UTC"},"credit_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit Limit"},"payment_terms_days":{"type":"integer","title":"Payment Terms Days","default":30},"tax_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Tax Id"},"tax_exempt":{"type":"boolean","title":"Tax Exempt","default":false},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"source":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Source"},"referred_by":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"Referred By"},"opaque_customer_id":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"Opaque Customer Id"}},"type":"object","required":["name"],"title":"CustomerCreate"},"CustomerResponse":{"properties":{"opaque_customer_id":{"type":"string","title":"Opaque Customer Id"},"external_id":{"type":"string","title":"External Id"},"name":{"type":"string","title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"customer_type":{"type":"string","title":"Customer Type"},"status":{"type":"string","title":"Status"},"status_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Reason"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"secondary_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secondary Phone"},"country":{"type":"string","title":"Country"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"kyc_status":{"type":"string","title":"Kyc Status"},"segment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"},"tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"},"language":{"type":"string","title":"Language"},"currency":{"type":"string","title":"Currency"},"timezone":{"type":"string","title":"Timezone"},"credit_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit Limit"},"payment_terms_days":{"type":"integer","title":"Payment Terms Days"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"tax_exempt":{"type":"boolean","title":"Tax Exempt"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["opaque_customer_id","external_id","name","display_name","customer_type","status","status_reason","email","phone","secondary_phone","country","region","city","address_line1","postal_code","kyc_status","segment","tags","language","currency","timezone","credit_limit","payment_terms_days","tax_id","tax_exempt","source","created_at","updated_at"],"title":"CustomerResponse"},"CustomerStatusChange":{"properties":{"status":{"$ref":"#/components/schemas/LifecycleStatus"},"reason":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Reason"}},"type":"object","required":["status"],"title":"CustomerStatusChange"},"CustomerType":{"type":"string","enum":["individual","enterprise","government","ngo"],"title":"CustomerType"},"CustomerUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"display_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Display Name"},"email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Phone"},"secondary_phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Secondary Phone"},"country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Country"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"segment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"},"tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"credit_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit Limit"},"payment_terms_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Terms Days"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"tax_exempt":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tax Exempt"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"CustomerUpdate"},"CycleType":{"type":"string","enum":["monthly","quarterly","annual"],"title":"CycleType"},"DailySummaryByOperator":{"properties":{"operator":{"type":"string","title":"Operator"},"transaction_count":{"type":"integer","title":"Transaction Count"},"total_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Amount"}},"type":"object","required":["operator","transaction_count","total_amount"],"title":"DailySummaryByOperator"},"DailySummaryByPaymentMethod":{"properties":{"payment_method":{"type":"string","title":"Payment Method"},"transaction_count":{"type":"integer","title":"Transaction Count"},"total_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Amount"}},"type":"object","required":["payment_method","transaction_count","total_amount"],"title":"DailySummaryByPaymentMethod"},"DailySummaryByTerminal":{"properties":{"terminal_id":{"type":"integer","title":"Terminal Id"},"terminal_code":{"type":"string","title":"Terminal Code"},"terminal_name":{"type":"string","title":"Terminal Name"},"transaction_count":{"type":"integer","title":"Transaction Count"},"total_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Amount"}},"type":"object","required":["terminal_id","terminal_code","terminal_name","transaction_count","total_amount"],"title":"DailySummaryByTerminal"},"DailySummaryResponse":{"properties":{"date":{"type":"string","title":"Date"},"tenant_id":{"type":"integer","title":"Tenant Id"},"total_transactions":{"type":"integer","title":"Total Transactions"},"total_revenue":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Revenue"},"by_terminal":{"items":{"$ref":"#/components/schemas/DailySummaryByTerminal"},"type":"array","title":"By Terminal"},"by_payment_method":{"items":{"$ref":"#/components/schemas/DailySummaryByPaymentMethod"},"type":"array","title":"By Payment Method"},"by_operator":{"items":{"$ref":"#/components/schemas/DailySummaryByOperator"},"type":"array","title":"By Operator"}},"type":"object","required":["date","tenant_id","total_transactions","total_revenue","by_terminal","by_payment_method","by_operator"],"title":"DailySummaryResponse"},"DashboardStats":{"properties":{"total_outstanding":{"type":"number","title":"Total Outstanding"},"total_cases":{"type":"integer","title":"Total Cases"},"cases_by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"Cases By Status"},"aging_buckets":{"items":{"$ref":"#/components/schemas/AgingBucket"},"type":"array","title":"Aging Buckets"}},"type":"object","required":["total_outstanding","total_cases","cases_by_status","aging_buckets"],"title":"DashboardStats"},"DocumentType":{"type":"string","enum":["national_id","passport","drivers_license","proof_of_address","business_registration","tax_certificate","articles_of_incorporation","board_resolution","authorized_signatory_id","operator_license","utility_bill","bank_statement","other"],"title":"DocumentType"},"DunningPolicyCreate":{"properties":{"name":{"type":"string","maxLength":120,"title":"Name"},"is_default":{"type":"boolean","title":"Is Default","default":false},"steps":{"items":{"$ref":"#/components/schemas/DunningStepSchema"},"type":"array","title":"Steps"}},"type":"object","required":["name","steps"],"title":"DunningPolicyCreate"},"DunningPolicyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"is_default":{"type":"boolean","title":"Is Default"},"steps":{"type":"string","title":"Steps"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","name","is_default","steps","created_at"],"title":"DunningPolicyResponse"},"DunningPolicyUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/DunningStepSchema"},"type":"array"},{"type":"null"}],"title":"Steps"}},"type":"object","title":"DunningPolicyUpdate"},"DunningStepSchema":{"properties":{"day":{"type":"integer","title":"Day"},"action":{"$ref":"#/components/schemas/ActionType"},"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template"},"level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Level"}},"type":"object","required":["day","action"],"title":"DunningStepSchema"},"GatewayBalanceResponse":{"properties":{"balance":{"type":"number","title":"Balance"},"currency":{"type":"string","title":"Currency"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["balance","currency"],"title":"GatewayBalanceResponse"},"GatewayInitiateRequest":{"properties":{"amount":{"type":"number","exclusiveMinimum":0.0,"title":"Amount"},"currency":{"type":"string","maxLength":3,"title":"Currency","default":"USD"},"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"method":{"$ref":"#/components/schemas/GatewayMethod"},"phone_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Phone Number"},"invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invoice Id"},"description":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Description"}},"type":"object","required":["amount","customer_id","method"],"title":"GatewayInitiateRequest"},"GatewayInitiateResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"provider":{"type":"string","title":"Provider"},"provider_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Reference"},"status":{"type":"string","title":"Status"},"payment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Id"},"payment_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Number"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"}},"type":"object","required":["success","provider","provider_reference","status"],"title":"GatewayInitiateResponse"},"GatewayMethod":{"type":"string","enum":["momo","stripe","cash"],"title":"GatewayMethod"},"GatewayWebhookResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"provider":{"type":"string","title":"Provider"},"provider_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Reference"},"status":{"type":"string","title":"Status"},"payment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Id"}},"type":"object","required":["success","provider","provider_reference","status"],"title":"GatewayWebhookResponse"},"GenerateInvoiceRequest":{"properties":{"customer_id":{"type":"string","title":"Customer Id"}},"type":"object","required":["customer_id"],"title":"GenerateInvoiceRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvoiceCreate":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"invoice_type":{"$ref":"#/components/schemas/InvoiceType","default":"standard"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"tax_id":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Tax Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"payment_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Instructions"},"billing_address_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Address Snapshot"},"related_invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Related Invoice Id"},"lines":{"items":{"$ref":"#/components/schemas/InvoiceLineCreate"},"type":"array","title":"Lines"}},"type":"object","required":["customer_id","period_start","period_end"],"title":"InvoiceCreate"},"InvoiceDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"customer_id":{"type":"string","title":"Customer Id"},"invoice_number":{"type":"string","title":"Invoice Number"},"invoice_type":{"type":"string","title":"Invoice Type"},"status":{"type":"string","title":"Status"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"subtotal":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Subtotal"},"tax_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Amount"},"discount_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Discount Amount"},"total_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Amount"},"amount_paid":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount Paid"},"balance_due":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Balance Due"},"currency":{"type":"string","title":"Currency"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"payment_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Instructions"},"billing_address_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Address Snapshot"},"related_invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Related Invoice Id"},"void_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Void Reason"},"source":{"type":"string","title":"Source","default":"sigtel"},"source_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Ref"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"lines":{"items":{"$ref":"#/components/schemas/InvoiceLineResponse"},"type":"array","title":"Lines","default":[]},"tax_breakdown":{"items":{"$ref":"#/components/schemas/TaxBreakdownItem"},"type":"array","title":"Tax Breakdown","default":[]}},"type":"object","required":["id","tenant_id","customer_id","invoice_number","invoice_type","status","period_start","period_end","subtotal","tax_amount","discount_amount","total_amount","amount_paid","balance_due","currency","due_date","paid_at","tax_id","notes","payment_instructions","billing_address_snapshot","related_invoice_id","void_reason","created_at","updated_at"],"title":"InvoiceDetailResponse"},"InvoiceFromChargesResponse":{"properties":{"id":{"type":"integer","title":"Id"},"invoice_number":{"type":"string","title":"Invoice Number"},"customer_id":{"type":"string","title":"Customer Id"},"line_items":{"type":"integer","title":"Line Items"},"subtotal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Subtotal"},"tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax"},"tax_breakdown":{"anyOf":[{"items":{"$ref":"#/components/schemas/TaxBreakdownItem"},"type":"array"},{"type":"null"}],"title":"Tax Breakdown"},"total":{"type":"number","title":"Total"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","invoice_number","customer_id","line_items","total","currency","status"],"title":"InvoiceFromChargesResponse"},"InvoiceLineCreate":{"properties":{"description":{"type":"string","maxLength":300,"title":"Description"},"category":{"type":"string","maxLength":30,"title":"Category","default":"other"},"quantity":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Quantity","default":"1"},"unit":{"$ref":"#/components/schemas/LineUnit","default":"unit"},"unit_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Unit Price","default":"0"},"discount_percent":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Discount Percent","default":"0"},"tax_rate_percent":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Tax Rate Percent","default":"0"},"reference_type":{"anyOf":[{"$ref":"#/components/schemas/ReferenceType"},{"type":"null"}]},"reference_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reference Id"}},"type":"object","required":["description"],"title":"InvoiceLineCreate"},"InvoiceLineResponse":{"properties":{"id":{"type":"integer","title":"Id"},"line_number":{"type":"integer","title":"Line Number"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category","default":"other"},"quantity":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Quantity"},"unit":{"type":"string","title":"Unit"},"unit_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Unit Price"},"discount_percent":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Discount Percent"},"tax_rate_percent":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Rate Percent"},"line_total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Line Total"},"tax_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Amount"},"total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"},"reference_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reference Id"},"tier_breakdown":{"items":{"$ref":"#/components/schemas/TierBreakdownItem"},"type":"array","title":"Tier Breakdown"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","line_number","description","quantity","unit","unit_price","discount_percent","tax_rate_percent","line_total","tax_amount","total","reference_type","reference_id","created_at"],"title":"InvoiceLineResponse"},"InvoiceListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InvoiceResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"InvoiceListResponse"},"InvoiceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"customer_id":{"type":"string","title":"Customer Id"},"invoice_number":{"type":"string","title":"Invoice Number"},"invoice_type":{"type":"string","title":"Invoice Type"},"status":{"type":"string","title":"Status"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"subtotal":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Subtotal"},"tax_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Amount"},"discount_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Discount Amount"},"total_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Amount"},"amount_paid":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount Paid"},"balance_due":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Balance Due"},"currency":{"type":"string","title":"Currency"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"payment_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Instructions"},"billing_address_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Address Snapshot"},"related_invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Related Invoice Id"},"void_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Void Reason"},"source":{"type":"string","title":"Source","default":"sigtel"},"source_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Ref"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","tenant_id","customer_id","invoice_number","invoice_type","status","period_start","period_end","subtotal","tax_amount","discount_amount","total_amount","amount_paid","balance_due","currency","due_date","paid_at","tax_id","notes","payment_instructions","billing_address_snapshot","related_invoice_id","void_reason","created_at","updated_at"],"title":"InvoiceResponse"},"InvoiceType":{"type":"string","enum":["standard","credit_note","debit_note","proforma"],"title":"InvoiceType"},"IssueInvoiceRequest":{"properties":{"payment_terms_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Payment Terms Days","default":30}},"type":"object","title":"IssueInvoiceRequest"},"KYCComplianceResponse":{"properties":{"compliant":{"type":"boolean","title":"Compliant"},"policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy"},"enforcement":{"type":"string","title":"Enforcement","default":"none"},"required_documents":{"items":{"type":"string"},"type":"array","title":"Required Documents","default":[]},"submitted_documents":{"items":{"type":"string"},"type":"array","title":"Submitted Documents","default":[]},"verified_documents":{"items":{"type":"string"},"type":"array","title":"Verified Documents","default":[]},"missing_documents":{"items":{"type":"string"},"type":"array","title":"Missing Documents","default":[]},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["compliant"],"title":"KYCComplianceResponse"},"KYCDocumentCreate":{"properties":{"document_type":{"$ref":"#/components/schemas/DocumentType"},"document_number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Document Number"},"issuing_country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Issuing Country"},"issue_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Issue Date"},"expiry_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiry Date"},"file_reference":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"File Reference"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["document_type"],"title":"KYCDocumentCreate"},"KYCDocumentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"document_type":{"type":"string","title":"Document Type"},"document_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Number"},"issuing_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuing Country"},"issue_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Issue Date"},"expiry_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiry Date"},"status":{"type":"string","title":"Status"},"verified_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verified By"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"file_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Reference"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","document_type","document_number","issuing_country","issue_date","expiry_date","status","verified_by","verified_at","file_reference","notes","created_at"],"title":"KYCDocumentResponse"},"KYCVerifyRequest":{"properties":{"verified_by":{"type":"string","maxLength":100,"title":"Verified By"},"status":{"type":"string","pattern":"^(verified|rejected)$","title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["verified_by","status"],"title":"KYCVerifyRequest"},"LifecycleStatus":{"type":"string","enum":["prospect","onboarding","active","suspended","terminated","churned"],"title":"LifecycleStatus"},"LineItemCreate":{"properties":{"item_type":{"$ref":"#/components/schemas/LineItemType","default":"product"},"item_code":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Item Code"},"description":{"type":"string","maxLength":300,"title":"Description"},"quantity":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Quantity","default":"1"},"unit_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Unit Price"},"discount_percent":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Discount Percent","default":"0"},"tax_rate_percent":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Tax Rate Percent","default":"0"},"reference_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Reference Type"},"reference_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Reference Id"}},"type":"object","required":["description","unit_price"],"title":"LineItemCreate"},"LineItemResponse":{"properties":{"id":{"type":"integer","title":"Id"},"line_number":{"type":"integer","title":"Line Number"},"item_type":{"type":"string","title":"Item Type"},"item_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Code"},"description":{"type":"string","title":"Description"},"quantity":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Quantity"},"unit_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Unit Price"},"discount_percent":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Discount Percent"},"tax_rate_percent":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Rate Percent"},"line_total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Line Total"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"},"reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","line_number","item_type","item_code","description","quantity","unit_price","discount_percent","tax_rate_percent","line_total","reference_type","reference_id","created_at"],"title":"LineItemResponse"},"LineItemType":{"type":"string","enum":["product","service","sim_card","voucher","topup","subscription","custom"],"title":"LineItemType"},"LineUnit":{"type":"string","enum":["month","hour","one_time","MB","GB","min","msg","Mbps","Mbps_burst","device_day","site","day","session","visit","unit"],"title":"LineUnit"},"LowStockAlert":{"properties":{"id":{"type":"integer","title":"Id"},"sku":{"type":"string","title":"Sku"},"name":{"type":"string","title":"Name"},"in_stock":{"type":"integer","title":"In Stock"},"low_stock_threshold":{"type":"integer","title":"Low Stock Threshold"}},"type":"object","required":["id","sku","name","in_stock","low_stock_threshold"],"title":"LowStockAlert"},"ManualChargeRequest":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"service_code":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Service Code"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"plan_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Plan Name"},"charge_type":{"type":"string","title":"Charge Type","default":"one_time"},"quantity":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Quantity","default":"1"},"unit":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Unit"}},"type":"object","required":["customer_id"],"title":"ManualChargeRequest","description":"Inject a one-time charge.\n\nTwo ways to call:\n  A) catalog-driven: pass `service_code` (and optional `quantity`); the\n     service will look up name/description/unit/unit_price from the\n     pro-services catalog. This is the recommended path — keeps line\n     items consistent across invoices.\n  B) free-form: pass description+amount directly (fallback for ad-hoc)."},"MethodType":{"type":"string","enum":["bank_transfer","mobile_money","credit_card","debit_card","cash","cheque","crypto","prepaid_balance","other"],"title":"MethodType"},"PartnerCreate":{"properties":{"partner_name":{"type":"string","maxLength":200,"title":"Partner Name"},"partner_type":{"type":"string","title":"Partner Type","default":"reseller"},"partner_tenant_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Partner Tenant Id"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"revenue_share_pct":{"type":"number","maximum":50.0,"minimum":0.0,"title":"Revenue Share Pct","default":10.0},"tier_rules":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Rules"},"payout_method":{"type":"string","title":"Payout Method","default":"bank_transfer"},"payout_currency":{"type":"string","maxLength":3,"title":"Payout Currency","default":"USD"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["partner_name"],"title":"PartnerCreate"},"PartnerResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"partner_name":{"type":"string","title":"Partner Name"},"partner_type":{"type":"string","title":"Partner Type"},"partner_tenant_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Partner Tenant Id"},"revenue_share_pct":{"type":"number","title":"Revenue Share Pct"},"payout_method":{"type":"string","title":"Payout Method"},"payout_currency":{"type":"string","title":"Payout Currency"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","tenant_id","partner_name","partner_type","partner_tenant_id","revenue_share_pct","payout_method","payout_currency","is_active"],"title":"PartnerResponse"},"PayInvoiceRequest":{"properties":{"invoice_id":{"type":"integer","title":"Invoice Id"},"provider":{"type":"string","maxLength":20,"title":"Provider","default":"momo"}},"type":"object","required":["invoice_id"],"title":"PayInvoiceRequest"},"PayInvoiceResponse":{"properties":{"status":{"type":"string","title":"Status"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"payment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Id"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"}},"type":"object","required":["status"],"title":"PayInvoiceResponse"},"PaymentCreate":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"payment_method_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Method Id"},"invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invoice Id"},"payment_type":{"$ref":"#/components/schemas/PaymentType"},"amount":{"type":"number","exclusiveMinimum":0.0,"title":"Amount"},"currency":{"type":"string","maxLength":3,"title":"Currency","default":"USD"},"provider_reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Provider Reference"},"provider_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Response"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_by":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Created By"}},"type":"object","required":["customer_id","payment_type","amount"],"title":"PaymentCreate"},"PaymentMethod":{"type":"string","enum":["cash","card","mobile_money","prepaid_balance","mixed"],"title":"PaymentMethod"},"PaymentMethodCreate":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"method_type":{"$ref":"#/components/schemas/MethodType"},"provider":{"$ref":"#/components/schemas/Provider"},"account_reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Account Reference"},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["customer_id","method_type","provider"],"title":"PaymentMethodCreate"},"PaymentMethodResponse":{"properties":{"id":{"type":"integer","title":"Id"},"customer_id":{"type":"string","title":"Customer Id"},"method_type":{"type":"string","title":"Method Type"},"provider":{"type":"string","title":"Provider"},"account_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Reference"},"is_default":{"type":"boolean","title":"Is Default"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","customer_id","method_type","provider","account_reference","is_default","is_active","created_at"],"title":"PaymentMethodResponse"},"PaymentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"customer_id":{"type":"string","title":"Customer Id"},"payment_number":{"type":"string","title":"Payment Number"},"payment_method_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Method Id"},"invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invoice Id"},"payment_type":{"type":"string","title":"Payment Type"},"status":{"type":"string","title":"Status"},"amount":{"type":"number","title":"Amount"},"currency":{"type":"string","title":"Currency"},"provider_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Reference"},"provider_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Response"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"processed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processed At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","customer_id","payment_number","payment_method_id","invoice_id","payment_type","status","amount","currency","provider_reference","provider_response","failure_reason","processed_at","notes","created_by","created_at"],"title":"PaymentResponse"},"PaymentStatusResponse":{"properties":{"status":{"type":"string","title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"payment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Id"}},"type":"object","required":["status"],"title":"PaymentStatusResponse"},"PaymentType":{"type":"string","enum":["invoice_payment","prepaid_topup","refund","credit","write_off"],"title":"PaymentType"},"PlanCreate":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"plan_type":{"type":"string","maxLength":50,"title":"Plan Type"},"features":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Features","description":"JSON string of key-value feature pairs, e.g. '{\"speed_down_kbps\": 50000, \"data_cap_mb\": 5120}'"},"speed_down_kbps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Speed Down Kbps"},"speed_up_kbps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Speed Up Kbps"},"data_cap_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Cap Mb"},"voice_minutes_included":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Voice Minutes Included"},"sms_included":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sms Included"},"international_calls_enabled":{"type":"boolean","title":"International Calls Enabled","default":false},"international_rate_per_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"International Rate Per Min"},"overage_voice_rate_per_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overage Voice Rate Per Min"},"overage_sms_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overage Sms Rate"},"overage_data_rate_per_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overage Data Rate Per Mb"},"price_monthly":{"type":"number","minimum":0.0,"title":"Price Monthly","description":"Monthly price (backward compat)"},"price_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Amount","description":"Price per billing interval"},"price_currency":{"type":"string","maxLength":3,"title":"Price Currency","default":"USD"},"billing_interval":{"type":"string","title":"Billing Interval","default":"monthly"},"setup_fee":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Setup Fee"},"currency":{"type":"string","maxLength":3,"title":"Currency","default":"USD"},"trial_days":{"type":"integer","minimum":0.0,"title":"Trial Days","default":0},"parent_plan_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Plan Id"},"effective_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective From"},"effective_to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective To"}},"type":"object","required":["name","plan_type","price_monthly"],"title":"PlanCreate","description":"Create a new service plan."},"PlanResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"plan_type":{"type":"string","title":"Plan Type"},"features":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Features"},"speed_down_kbps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Speed Down Kbps"},"speed_up_kbps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Speed Up Kbps"},"data_cap_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Cap Mb"},"voice_minutes_included":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Voice Minutes Included"},"sms_included":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sms Included"},"international_calls_enabled":{"type":"boolean","title":"International Calls Enabled","default":false},"international_rate_per_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"International Rate Per Min"},"overage_voice_rate_per_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overage Voice Rate Per Min"},"overage_sms_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overage Sms Rate"},"overage_data_rate_per_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overage Data Rate Per Mb"},"price_monthly":{"type":"number","title":"Price Monthly"},"price_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Amount"},"price_currency":{"type":"string","title":"Price Currency"},"billing_interval":{"type":"string","title":"Billing Interval"},"setup_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Setup Fee"},"currency":{"type":"string","title":"Currency"},"trial_days":{"type":"integer","title":"Trial Days"},"status":{"type":"string","title":"Status"},"version":{"type":"integer","title":"Version"},"parent_plan_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Plan Id"},"effective_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective From"},"effective_to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective To"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","tenant_id","name","description","plan_type","features","speed_down_kbps","speed_up_kbps","data_cap_mb","voice_minutes_included","sms_included","price_monthly","price_amount","price_currency","billing_interval","setup_fee","currency","trial_days","status","version","parent_plan_id","effective_from","effective_to","created_at","updated_at"],"title":"PlanResponse","description":"Service plan response."},"PlanUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"plan_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Plan Type"},"features":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Features"},"speed_down_kbps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Speed Down Kbps"},"speed_up_kbps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Speed Up Kbps"},"data_cap_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Cap Mb"},"overage_voice_rate_per_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overage Voice Rate Per Min"},"overage_sms_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overage Sms Rate"},"overage_data_rate_per_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overage Data Rate Per Mb"},"price_monthly":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Monthly"},"price_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Amount"},"price_currency":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Price Currency"},"billing_interval":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Interval"},"setup_fee":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Setup Fee"},"currency":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Currency"},"trial_days":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Trial Days"},"effective_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective From"},"effective_to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective To"}},"type":"object","title":"PlanUpdate","description":"Update an existing service plan (partial)."},"PrepaidBalanceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"customer_id":{"type":"string","title":"Customer Id"},"balance":{"type":"number","title":"Balance"},"currency":{"type":"string","title":"Currency"},"last_topup_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Topup At"},"last_deduction_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Deduction At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","customer_id","balance","currency","last_topup_at","last_deduction_at","updated_at"],"title":"PrepaidBalanceResponse"},"PrepaidDeductRequest":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"amount":{"type":"number","exclusiveMinimum":0.0,"title":"Amount"},"description":{"type":"string","maxLength":300,"title":"Description"},"reference_type":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Reference Type"},"reference_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Reference Id"}},"type":"object","required":["customer_id","amount","description"],"title":"PrepaidDeductRequest"},"PrepaidTopupRequest":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"amount":{"type":"number","exclusiveMinimum":0.0,"title":"Amount"},"currency":{"type":"string","maxLength":3,"title":"Currency","default":"USD"},"payment_method_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Method Id"},"provider_reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Provider Reference"},"description":{"type":"string","maxLength":300,"title":"Description","default":"Prepaid top-up"},"created_by":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Created By"}},"type":"object","required":["customer_id","amount"],"title":"PrepaidTopupRequest"},"PricingShape":{"type":"string","enum":["flat","quantity"],"title":"PricingShape","description":"Does the rate depend on consumed quantity at all?\n\nflat     — no; charge = rate, full stop (subscription fee, one-off dispatch)\nquantity — yes; engine reads usage quantity and applies rate_curve"},"ProductCategory":{"type":"string","enum":["hardware","accessory","voucher","sim","subscription","consumable","service","other"],"title":"ProductCategory"},"ProductCreate":{"properties":{"sku":{"type":"string","maxLength":50,"title":"Sku"},"name":{"type":"string","maxLength":200,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"category":{"$ref":"#/components/schemas/ProductCategory","default":"other"},"unit_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Unit Price"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"tax_rate_percent":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Tax Rate Percent","default":"0"},"in_stock":{"type":"integer","minimum":0.0,"title":"In Stock","default":0},"low_stock_threshold":{"type":"integer","minimum":0.0,"title":"Low Stock Threshold","default":5},"barcode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Barcode"}},"type":"object","required":["sku","name","unit_price"],"title":"ProductCreate"},"ProductListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProductResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"ProductListResponse"},"ProductResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"sku":{"type":"string","title":"Sku"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"type":"string","title":"Category"},"unit_price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Unit Price"},"currency":{"type":"string","title":"Currency"},"tax_rate_percent":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Rate Percent"},"in_stock":{"type":"integer","title":"In Stock"},"low_stock_threshold":{"type":"integer","title":"Low Stock Threshold"},"is_active":{"type":"boolean","title":"Is Active"},"barcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Barcode"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","tenant_id","sku","name","description","category","unit_price","currency","tax_rate_percent","in_stock","low_stock_threshold","is_active","barcode","created_at","updated_at"],"title":"ProductResponse"},"ProductUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"$ref":"#/components/schemas/ProductCategory"},{"type":"null"}]},"unit_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unit Price"},"currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Currency"},"tax_rate_percent":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tax Rate Percent"},"low_stock_threshold":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Low Stock Threshold"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"barcode":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Barcode"}},"type":"object","title":"ProductUpdate"},"Provider":{"type":"string","enum":["momo_mtn","mpesa","airtel_money","orange_money","upi","razorpay","paytm","phonepe","stripe","paypal","square","adyen","ach","wire","zelle","bank","cash","cheque","other"],"title":"Provider"},"QuickSIMSale":{"properties":{"terminal_id":{"type":"integer","title":"Terminal Id"},"operator":{"type":"string","maxLength":200,"title":"Operator"},"customer_id":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"Customer Id"},"sim_code":{"type":"string","maxLength":50,"title":"Sim Code"},"description":{"type":"string","maxLength":300,"title":"Description","default":"SIM card activation"},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"payment_method":{"$ref":"#/components/schemas/PaymentMethod","default":"cash"},"payment_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Reference"},"amount_tendered":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount Tendered"}},"type":"object","required":["terminal_id","operator","sim_code","amount"],"title":"QuickSIMSale"},"QuickTopup":{"properties":{"terminal_id":{"type":"integer","title":"Terminal Id"},"operator":{"type":"string","maxLength":200,"title":"Operator"},"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"payment_method":{"$ref":"#/components/schemas/PaymentMethod","default":"cash"},"payment_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Reference"},"amount_tendered":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount Tendered"}},"type":"object","required":["terminal_id","operator","customer_id","amount"],"title":"QuickTopup"},"QuickVoucherSale":{"properties":{"terminal_id":{"type":"integer","title":"Terminal Id"},"operator":{"type":"string","maxLength":200,"title":"Operator"},"customer_id":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"Customer Id"},"voucher_code":{"type":"string","maxLength":50,"title":"Voucher Code"},"description":{"type":"string","maxLength":300,"title":"Description","default":"Voucher sale"},"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"payment_method":{"$ref":"#/components/schemas/PaymentMethod","default":"cash"},"payment_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Reference"},"amount_tendered":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount Tendered"}},"type":"object","required":["terminal_id","operator","voucher_code","amount"],"title":"QuickVoucherSale"},"RateCurve":{"type":"string","enum":["linear","tiered","threshold"],"title":"RateCurve","description":"How a quantity is priced. Only meaningful when pricing_shape='quantity'.\n\nlinear    — charge = rate × quantity\ntiered    — stepped bands, see TierRule[]\nthreshold — free up to N, then per-unit above, see ThresholdRule"},"RateCustomerRequest":{"properties":{"customer_id":{"type":"string","title":"Customer Id"}},"type":"object","required":["customer_id"],"title":"RateCustomerRequest"},"RatePlanCreate":{"properties":{"name":{"type":"string","maxLength":120,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"plan_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Id"},"service_code":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Service Code"},"category":{"type":"string","maxLength":30,"title":"Category","default":"other"},"pricing_shape":{"$ref":"#/components/schemas/PricingShape"},"rate_curve":{"anyOf":[{"$ref":"#/components/schemas/RateCurve"},{"type":"null"}]},"unit":{"$ref":"#/components/schemas/UsageUnit"},"rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Rate","default":"0"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"tiers":{"anyOf":[{"items":{"$ref":"#/components/schemas/TierRule-Input"},"type":"array"},{"type":"null"}],"title":"Tiers"},"threshold":{"anyOf":[{"$ref":"#/components/schemas/ThresholdRule-Input"},{"type":"null"}]},"time_of_day_rules":{"anyOf":[{"items":{"$ref":"#/components/schemas/TimeRule-Input"},"type":"array"},{"type":"null"}],"title":"Time Of Day Rules"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","pricing_shape","unit"],"title":"RatePlanCreate"},"RatePlanOut":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"plan_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Id"},"service_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Code"},"category":{"type":"string","title":"Category","default":"other"},"pricing_shape":{"type":"string","title":"Pricing Shape"},"rate_curve":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Curve"},"unit":{"type":"string","title":"Unit"},"rate":{"type":"number","title":"Rate"},"currency":{"type":"string","title":"Currency"},"tiers":{"anyOf":[{"items":{"$ref":"#/components/schemas/TierRule-Output"},"type":"array"},{"type":"null"}],"title":"Tiers"},"threshold":{"anyOf":[{"$ref":"#/components/schemas/ThresholdRule-Output"},{"type":"null"}]},"time_of_day_rules":{"anyOf":[{"items":{"$ref":"#/components/schemas/TimeRule-Output"},"type":"array"},{"type":"null"}],"title":"Time Of Day Rules"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","name","description","plan_id","pricing_shape","unit","rate","currency","is_active","created_at"],"title":"RatePlanOut"},"RatePlanUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"plan_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Id"},"service_code":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Service Code"},"category":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Category"},"pricing_shape":{"anyOf":[{"$ref":"#/components/schemas/PricingShape"},{"type":"null"}]},"rate_curve":{"anyOf":[{"$ref":"#/components/schemas/RateCurve"},{"type":"null"}]},"unit":{"anyOf":[{"$ref":"#/components/schemas/UsageUnit"},{"type":"null"}]},"rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate"},"currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Currency"},"tiers":{"anyOf":[{"items":{"$ref":"#/components/schemas/TierRule-Input"},"type":"array"},{"type":"null"}],"title":"Tiers"},"threshold":{"anyOf":[{"$ref":"#/components/schemas/ThresholdRule-Input"},{"type":"null"}]},"time_of_day_rules":{"anyOf":[{"items":{"$ref":"#/components/schemas/TimeRule-Input"},"type":"array"},{"type":"null"}],"title":"Time Of Day Rules"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"RatePlanUpdate"},"RatedChargeOut":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"customer_id":{"type":"string","title":"Customer Id"},"usage_record_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usage Record Id"},"rate_plan_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Plan Id"},"plan_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Id"},"plan_name":{"type":"string","title":"Plan Name"},"pricing_shape":{"type":"string","title":"Pricing Shape"},"rate_curve":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Curve"},"category":{"type":"string","title":"Category","default":"other"},"description":{"type":"string","title":"Description"},"quantity":{"type":"number","title":"Quantity"},"unit":{"type":"string","title":"Unit"},"rate":{"type":"number","title":"Rate"},"amount":{"type":"number","title":"Amount"},"currency":{"type":"string","title":"Currency"},"invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invoice Id"},"status":{"type":"string","title":"Status"},"extra_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extra Data"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","customer_id","usage_record_id","rate_plan_id","plan_id","plan_name","pricing_shape","description","quantity","unit","rate","amount","currency","invoice_id","status","extra_data","created_at"],"title":"RatedChargeOut"},"RatingResultResponse":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name"},"usage_records_rated":{"type":"integer","title":"Usage Records Rated"},"charges":{"items":{"$ref":"#/components/schemas/RatedChargeOut"},"type":"array","title":"Charges"},"total":{"type":"number","title":"Total"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["customer_id","usage_records_rated","charges","total","currency"],"title":"RatingResultResponse"},"RecordPaymentRequest":{"properties":{"amount":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Reference"}},"type":"object","required":["amount"],"title":"RecordPaymentRequest"},"ReferenceType":{"type":"string","enum":["rated_charge","subscription","one_time","adjustment"],"title":"ReferenceType"},"RefundCreate":{"properties":{"payment_id":{"type":"integer","title":"Payment Id"},"amount":{"type":"number","exclusiveMinimum":0.0,"title":"Amount"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"},"created_by":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Created By"}},"type":"object","required":["payment_id","amount"],"title":"RefundCreate"},"RefundRequest":{"properties":{"line_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Line Ids","description":"Specific line IDs to refund. None = full refund."},"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"},"operator":{"type":"string","maxLength":200,"title":"Operator"}},"type":"object","required":["reason","operator"],"title":"RefundRequest"},"RelatedEntityType":{"type":"string","enum":["subscription","invoice","device","sim"],"title":"RelatedEntityType"},"ResetBillingRequest":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"drop_usage":{"type":"boolean","title":"Drop Usage","description":"Also delete usage_records for the customer","default":false}},"type":"object","required":["customer_id"],"title":"ResetBillingRequest"},"SLAPolicyCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"priority_rules":{"type":"string","title":"Priority Rules","description":"JSON object mapping priority to response/resolution hours. Example: {\"critical\": {\"response_hours\": 1, \"resolution_hours\": 4}}"},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["name","priority_rules"],"title":"SLAPolicyCreate"},"SLAPolicyListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SLAPolicyResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"SLAPolicyListResponse"},"SLAPolicyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"priority_rules":{"type":"string","title":"Priority Rules"},"is_default":{"type":"boolean","title":"Is Default"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","name","priority_rules","is_default","created_at"],"title":"SLAPolicyResponse"},"SLAPolicyUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"priority_rules":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority Rules"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"}},"type":"object","title":"SLAPolicyUpdate"},"SeedRequest":{"properties":{"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country"}},"type":"object","required":["country"],"title":"SeedRequest"},"SeedResponse":{"properties":{"country":{"type":"string","title":"Country"},"rules_created":{"type":"integer","title":"Rules Created"},"rules":{"items":{"$ref":"#/components/schemas/TaxRuleResponse"},"type":"array","title":"Rules"}},"type":"object","required":["country","rules_created","rules"],"title":"SeedResponse"},"SettlementResponse":{"properties":{"id":{"type":"integer","title":"Id"},"partner_id":{"type":"integer","title":"Partner Id"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"total_revenue":{"type":"number","title":"Total Revenue"},"share_pct":{"type":"number","title":"Share Pct"},"commission_amount":{"type":"number","title":"Commission Amount"},"currency":{"type":"string","title":"Currency"},"invoice_count":{"type":"integer","title":"Invoice Count"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","partner_id","period_start","period_end","total_revenue","share_pct","commission_amount","currency","invoice_count","status"],"title":"SettlementResponse"},"SimulatorRequest":{"properties":{"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id","description":"Specific customer, or null for all customers"},"count":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Count","description":"Records per customer","default":5},"source":{"type":"string","title":"Source","description":"radius, cdr, netconf, api","default":"radius"},"source_device":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Device","description":"Device hostname"},"data_mb_min":{"type":"integer","minimum":0.0,"title":"Data Mb Min","default":50},"data_mb_max":{"type":"integer","minimum":0.0,"title":"Data Mb Max","default":2000},"voice_min_min":{"type":"integer","minimum":0.0,"title":"Voice Min Min","default":0},"voice_min_max":{"type":"integer","minimum":0.0,"title":"Voice Min Max","default":60},"sms_min":{"type":"integer","minimum":0.0,"title":"Sms Min","default":0},"sms_max":{"type":"integer","minimum":0.0,"title":"Sms Max","default":20},"session_sec_min":{"type":"integer","minimum":0.0,"title":"Session Sec Min","default":300},"session_sec_max":{"type":"integer","minimum":0.0,"title":"Session Sec Max","default":7200}},"type":"object","title":"SimulatorRequest","description":"Generate realistic usage records for demo/testing."},"SmsBulkCreate":{"properties":{"records":{"items":{"$ref":"#/components/schemas/SmsRecordCreate"},"type":"array","title":"Records"}},"type":"object","required":["records"],"title":"SmsBulkCreate","description":"Bulk ingest a batch of SMS records."},"SmsDeliveryStatus":{"type":"string","enum":["delivered","failed","pending","expired"],"title":"SmsDeliveryStatus"},"SmsDirection":{"type":"string","enum":["outgoing","incoming"],"title":"SmsDirection"},"SmsListResponse":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"records":{"items":{"$ref":"#/components/schemas/SmsRecordResponse"},"type":"array","title":"Records"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["customer_id","records","total","page","page_size"],"title":"SmsListResponse","description":"Paginated SMS history for a customer."},"SmsMessageType":{"type":"string","enum":["mo","mt"],"title":"SmsMessageType"},"SmsRecordCreate":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"sender_number":{"type":"string","maxLength":20,"title":"Sender Number"},"recipient_number":{"type":"string","maxLength":20,"title":"Recipient Number"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"direction":{"$ref":"#/components/schemas/SmsDirection","default":"outgoing"},"message_type":{"$ref":"#/components/schemas/SmsMessageType","default":"mo"},"delivery_status":{"$ref":"#/components/schemas/SmsDeliveryStatus","default":"delivered"},"smsc_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Smsc Id"},"source":{"$ref":"#/components/schemas/SmsSource","default":"api"}},"type":"object","required":["customer_id","sender_number","recipient_number","timestamp"],"title":"SmsRecordCreate","description":"Ingest a single SMS record."},"SmsRecordResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"customer_id":{"type":"string","title":"Customer Id"},"sender_number":{"type":"string","title":"Sender Number"},"recipient_number":{"type":"string","title":"Recipient Number"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"direction":{"type":"string","title":"Direction"},"message_type":{"type":"string","title":"Message Type"},"delivery_status":{"type":"string","title":"Delivery Status"},"smsc_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smsc Id"},"rated":{"type":"boolean","title":"Rated"},"charge_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Charge Amount"},"charge_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Charge Currency"},"included_in_plan":{"type":"boolean","title":"Included In Plan"},"invoice_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invoice Id"},"source":{"type":"string","title":"Source"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","customer_id","sender_number","recipient_number","timestamp","direction","message_type","delivery_status","smsc_id","rated","charge_amount","charge_currency","included_in_plan","invoice_id","source","created_at"],"title":"SmsRecordResponse","description":"Full SMS record with all fields."},"SmsSource":{"type":"string","enum":["smsc","cdr_file","api","simulator"],"title":"SmsSource"},"SmsStatsSummary":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"total_sms":{"type":"integer","title":"Total Sms","default":0},"by_direction":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Direction"},"by_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Type"},"by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Status"},"total_charged":{"type":"number","title":"Total Charged","default":0},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},"type":"object","required":["customer_id"],"title":"SmsStatsSummary","description":"SMS statistics summary for a customer."},"StockAdjustRequest":{"properties":{"quantity":{"type":"integer","title":"Quantity","description":"Positive to add, negative to deduct."},"reason":{"type":"string","maxLength":200,"title":"Reason","default":"manual adjustment"}},"type":"object","required":["quantity"],"title":"StockAdjustRequest"},"SubscriptionCreate":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"plan_id":{"type":"integer","title":"Plan Id"},"quantity":{"type":"integer","minimum":1.0,"title":"Quantity","default":1},"auto_renew":{"type":"boolean","title":"Auto Renew","default":true},"status_reason":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Status Reason"}},"type":"object","required":["customer_id","plan_id"],"title":"SubscriptionCreate","description":"Create a new subscription."},"SubscriptionDeviceCreate":{"properties":{"label":{"type":"string","maxLength":120,"title":"Label"},"imei":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Imei"},"iccid":{"anyOf":[{"type":"string","maxLength":22},{"type":"null"}],"title":"Iccid"},"imsi":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Imsi"},"mac":{"anyOf":[{"type":"string","maxLength":17},{"type":"null"}],"title":"Mac"},"serial":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Serial"},"device_type":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Device Type"},"latitude":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Longitude"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["label"],"title":"SubscriptionDeviceCreate","description":"Create a device under a subscription. At least one identifier\n(imei/iccid/imsi/mac/serial) should be set, but none is individually\nrequired so partial bootstrap is possible."},"SubscriptionDeviceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"subscription_id":{"type":"integer","title":"Subscription Id"},"label":{"type":"string","title":"Label"},"imei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imei"},"iccid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iccid"},"imsi":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imsi"},"mac":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mac"},"serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial"},"device_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Type"},"status":{"type":"string","title":"Status"},"activated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activated At"},"deactivated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deactivated At"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","tenant_id","subscription_id","label","imei","iccid","imsi","mac","serial","device_type","status","activated_at","deactivated_at","latitude","longitude","notes","created_at","updated_at"],"title":"SubscriptionDeviceResponse"},"SubscriptionDeviceUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Label"},"imei":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Imei"},"iccid":{"anyOf":[{"type":"string","maxLength":22},{"type":"null"}],"title":"Iccid"},"imsi":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Imsi"},"mac":{"anyOf":[{"type":"string","maxLength":17},{"type":"null"}],"title":"Mac"},"serial":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Serial"},"device_type":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Device Type"},"status":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Status"},"latitude":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Longitude"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"SubscriptionDeviceUpdate","description":"Patch fields on a device. All fields optional."},"SubscriptionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"customer_id":{"type":"string","title":"Customer Id"},"plan_id":{"type":"integer","title":"Plan Id"},"status":{"type":"string","title":"Status"},"status_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Reason"},"activated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activated At"},"suspended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Suspended At"},"terminated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Terminated At"},"current_period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"trial_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial End"},"auto_renew":{"type":"boolean","title":"Auto Renew"},"quantity":{"type":"integer","title":"Quantity"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","tenant_id","customer_id","plan_id","status","status_reason","activated_at","suspended_at","terminated_at","current_period_start","current_period_end","trial_end","auto_renew","quantity","created_at","updated_at"],"title":"SubscriptionResponse","description":"Full subscription response."},"SubscriptionStatusChange":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Reason"}},"type":"object","title":"SubscriptionStatusChange","description":"Change subscription status."},"TaxApplied":{"properties":{"name":{"type":"string","title":"Name"},"tax_type":{"type":"string","title":"Tax Type"},"rate":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Rate"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"}},"type":"object","required":["name","tax_type","rate","amount"],"title":"TaxApplied"},"TaxBreakdownItem":{"properties":{"name":{"type":"string","title":"Name"},"rate":{"type":"number","title":"Rate"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["name","rate","amount"],"title":"TaxBreakdownItem"},"TaxCalculationRequest":{"properties":{"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country"},"region":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Region"},"line_items":{"items":{"$ref":"#/components/schemas/TaxLineItem"},"type":"array","minItems":1,"title":"Line Items"},"customer_id":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"Customer Id"}},"type":"object","required":["country","line_items"],"title":"TaxCalculationRequest"},"TaxCalculationResponse":{"properties":{"lines":{"items":{"$ref":"#/components/schemas/TaxLineResult"},"type":"array","title":"Lines"},"tax_total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Total"},"grand_total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Grand Total"}},"type":"object","required":["lines","tax_total","grand_total"],"title":"TaxCalculationResponse"},"TaxExemptionCreate":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"tax_rule_id":{"type":"integer","title":"Tax Rule Id"},"reason":{"type":"string","maxLength":200,"title":"Reason"},"exemption_certificate":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Exemption Certificate"},"valid_from":{"type":"string","format":"date-time","title":"Valid From"},"valid_to":{"type":"string","format":"date-time","title":"Valid To"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["customer_id","tax_rule_id","reason","valid_from","valid_to"],"title":"TaxExemptionCreate"},"TaxExemptionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaxExemptionResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"TaxExemptionListResponse"},"TaxExemptionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"customer_id":{"type":"string","title":"Customer Id"},"tax_rule_id":{"type":"integer","title":"Tax Rule Id"},"reason":{"type":"string","title":"Reason"},"exemption_certificate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exemption Certificate"},"valid_from":{"type":"string","format":"date-time","title":"Valid From"},"valid_to":{"type":"string","format":"date-time","title":"Valid To"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","customer_id","tax_rule_id","reason","exemption_certificate","valid_from","valid_to","is_active","created_at"],"title":"TaxExemptionResponse"},"TaxLineItem":{"properties":{"amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"category":{"type":"string","maxLength":20,"title":"Category","default":"all"}},"type":"object","required":["amount"],"title":"TaxLineItem"},"TaxLineResult":{"properties":{"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"category":{"type":"string","title":"Category"},"taxes":{"items":{"$ref":"#/components/schemas/TaxApplied"},"type":"array","title":"Taxes"},"tax_total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Total"},"total":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total"}},"type":"object","required":["amount","category","taxes","tax_total","total"],"title":"TaxLineResult"},"TaxRuleCreate":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country"},"region":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Region"},"tax_type":{"$ref":"#/components/schemas/TaxType"},"rate_percent":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Rate Percent"},"applies_to":{"$ref":"#/components/schemas/AppliesTo","default":"all"},"is_compound":{"type":"boolean","title":"Is Compound","default":false},"is_inclusive":{"type":"boolean","title":"Is Inclusive","default":false},"priority":{"type":"integer","minimum":0.0,"title":"Priority","default":0},"effective_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective From"},"effective_to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective To"},"is_active":{"type":"boolean","title":"Is Active","default":true},"compliance_code":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Compliance Code"}},"type":"object","required":["name","country","tax_type","rate_percent"],"title":"TaxRuleCreate"},"TaxRuleListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaxRuleResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"TaxRuleListResponse"},"TaxRuleResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"name":{"type":"string","title":"Name"},"country":{"type":"string","title":"Country"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"tax_type":{"type":"string","title":"Tax Type"},"rate_percent":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Rate Percent"},"applies_to":{"type":"string","title":"Applies To"},"is_compound":{"type":"boolean","title":"Is Compound"},"is_inclusive":{"type":"boolean","title":"Is Inclusive"},"priority":{"type":"integer","title":"Priority"},"effective_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective From"},"effective_to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective To"},"is_active":{"type":"boolean","title":"Is Active"},"compliance_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compliance Code"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","tenant_id","name","country","region","tax_type","rate_percent","applies_to","is_compound","is_inclusive","priority","effective_from","effective_to","is_active","compliance_code","created_at","updated_at"],"title":"TaxRuleResponse"},"TaxRuleUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"},"region":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Region"},"rate_percent":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate Percent"},"applies_to":{"anyOf":[{"$ref":"#/components/schemas/AppliesTo"},{"type":"null"}]},"is_compound":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Compound"},"is_inclusive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Inclusive"},"priority":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Priority"},"effective_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective From"},"effective_to":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective To"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"compliance_code":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Compliance Code"}},"type":"object","title":"TaxRuleUpdate"},"TaxSummaryEntry":{"properties":{"tax_type":{"type":"string","title":"Tax Type"},"name":{"type":"string","title":"Name"},"country":{"type":"string","title":"Country"},"total_collected":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Collected"},"rule_count":{"type":"integer","title":"Rule Count"}},"type":"object","required":["tax_type","name","country","total_collected","rule_count"],"title":"TaxSummaryEntry"},"TaxSummaryResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/TaxSummaryEntry"},"type":"array","title":"Entries"}},"type":"object","required":["entries"],"title":"TaxSummaryResponse"},"TaxType":{"type":"string","enum":["vat","gst","sales_tax","withholding","excise","telecom_tax","universal_service_fund","regulatory_fee"],"title":"TaxType"},"TerminalCreate":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"location_name":{"type":"string","maxLength":200,"title":"Location Name"},"location_address":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Location Address"},"country":{"type":"string","maxLength":2,"minLength":2,"title":"Country"},"region":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Region"},"operator_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Operator Name"}},"type":"object","required":["name","location_name","country"],"title":"TerminalCreate"},"TerminalListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TerminalResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"TerminalListResponse"},"TerminalResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"terminal_code":{"type":"string","title":"Terminal Code"},"name":{"type":"string","title":"Name"},"location_name":{"type":"string","title":"Location Name"},"location_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Address"},"country":{"type":"string","title":"Country"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"operator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Name"},"status":{"type":"string","title":"Status"},"last_transaction_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Transaction At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","terminal_code","name","location_name","location_address","country","region","operator_name","status","last_transaction_at","created_at"],"title":"TerminalResponse"},"TerminalStatus":{"type":"string","enum":["active","inactive","maintenance"],"title":"TerminalStatus"},"TerminalUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"},"location_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Location Name"},"location_address":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Location Address"},"country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country"},"region":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Region"},"status":{"anyOf":[{"$ref":"#/components/schemas/TerminalStatus"},{"type":"null"}]}},"type":"object","title":"TerminalUpdate"},"TerminationCause":{"type":"string","enum":["normal","busy","no_answer","network_failure","user_hangup"],"title":"TerminationCause"},"ThresholdRule-Input":{"properties":{"free_to":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Free To"},"overage_rate":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Overage Rate"}},"type":"object","required":["free_to","overage_rate"],"title":"ThresholdRule","description":"Threshold curve payload: free up to `free_to`, then `overage_rate` per unit.\n\nReplaces the old practice of hijacking the `tiers` column with a degenerate\ntwo-tier payload to express thresholds."},"ThresholdRule-Output":{"properties":{"free_to":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Free To"},"overage_rate":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Overage Rate"}},"type":"object","required":["free_to","overage_rate"],"title":"ThresholdRule","description":"Threshold curve payload: free up to `free_to`, then `overage_rate` per unit.\n\nReplaces the old practice of hijacking the `tiers` column with a degenerate\ntwo-tier payload to express thresholds."},"TicketAssign":{"properties":{"assigned_to":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Assigned To"},"assigned_team":{"anyOf":[{"$ref":"#/components/schemas/TicketTeam"},{"type":"null"}]}},"type":"object","title":"TicketAssign"},"TicketCategory":{"type":"string","enum":["billing","technical","provisioning","general","complaint","feature_request"],"title":"TicketCategory"},"TicketCreate":{"properties":{"customer_id":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"Customer Id"},"subject":{"type":"string","maxLength":300,"minLength":1,"title":"Subject"},"description":{"type":"string","minLength":1,"title":"Description"},"category":{"$ref":"#/components/schemas/TicketCategory","default":"general"},"priority":{"$ref":"#/components/schemas/TicketPriority","default":"medium"},"source":{"$ref":"#/components/schemas/TicketSource","default":"portal"},"assigned_to":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Assigned To"},"assigned_team":{"anyOf":[{"$ref":"#/components/schemas/TicketTeam"},{"type":"null"}]},"related_entity_type":{"anyOf":[{"$ref":"#/components/schemas/RelatedEntityType"},{"type":"null"}]},"related_entity_id":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"Related Entity Id"},"tags":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Tags"},"created_by":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Created By"}},"type":"object","required":["subject","description"],"title":"TicketCreate"},"TicketDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"ticket_number":{"type":"string","title":"Ticket Number"},"subject":{"type":"string","title":"Subject"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"priority":{"type":"string","title":"Priority"},"status":{"type":"string","title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"assigned_team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Team"},"source":{"type":"string","title":"Source"},"sla_due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sla Due At"},"sla_breached":{"type":"boolean","title":"Sla Breached"},"first_response_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Response At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"resolution_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Notes"},"related_entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Related Entity Type"},"related_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Related Entity Id"},"tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"comments":{"items":{"$ref":"#/components/schemas/CommentResponse"},"type":"array","title":"Comments","default":[]}},"type":"object","required":["id","tenant_id","customer_id","ticket_number","subject","description","category","priority","status","assigned_to","assigned_team","source","sla_due_at","sla_breached","first_response_at","resolved_at","closed_at","resolution_notes","related_entity_type","related_entity_id","tags","created_by","created_at","updated_at"],"title":"TicketDetailResponse"},"TicketListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TicketResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"TicketListResponse"},"TicketPriority":{"type":"string","enum":["low","medium","high","critical"],"title":"TicketPriority"},"TicketResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"ticket_number":{"type":"string","title":"Ticket Number"},"subject":{"type":"string","title":"Subject"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"priority":{"type":"string","title":"Priority"},"status":{"type":"string","title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"assigned_team":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Team"},"source":{"type":"string","title":"Source"},"sla_due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sla Due At"},"sla_breached":{"type":"boolean","title":"Sla Breached"},"first_response_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Response At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"resolution_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Notes"},"related_entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Related Entity Type"},"related_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Related Entity Id"},"tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","tenant_id","customer_id","ticket_number","subject","description","category","priority","status","assigned_to","assigned_team","source","sla_due_at","sla_breached","first_response_at","resolved_at","closed_at","resolution_notes","related_entity_type","related_entity_id","tags","created_by","created_at","updated_at"],"title":"TicketResponse"},"TicketSource":{"type":"string","enum":["portal","phone","email","chat","api","system"],"title":"TicketSource"},"TicketStats":{"properties":{"open_count":{"type":"integer","title":"Open Count"},"assigned_count":{"type":"integer","title":"Assigned Count"},"in_progress_count":{"type":"integer","title":"In Progress Count"},"waiting_customer_count":{"type":"integer","title":"Waiting Customer Count"},"waiting_internal_count":{"type":"integer","title":"Waiting Internal Count"},"resolved_count":{"type":"integer","title":"Resolved Count"},"closed_count":{"type":"integer","title":"Closed Count"},"reopened_count":{"type":"integer","title":"Reopened Count"},"total_count":{"type":"integer","title":"Total Count"},"sla_breached_count":{"type":"integer","title":"Sla Breached Count"},"avg_resolution_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Resolution Hours"},"sla_compliance_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sla Compliance Rate"}},"type":"object","required":["open_count","assigned_count","in_progress_count","waiting_customer_count","waiting_internal_count","resolved_count","closed_count","reopened_count","total_count","sla_breached_count","avg_resolution_hours","sla_compliance_rate"],"title":"TicketStats"},"TicketStatus":{"type":"string","enum":["open","assigned","in_progress","waiting_customer","waiting_internal","resolved","closed","reopened"],"title":"TicketStatus"},"TicketStatusChange":{"properties":{"status":{"$ref":"#/components/schemas/TicketStatus"},"resolution_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Notes"}},"type":"object","required":["status"],"title":"TicketStatusChange"},"TicketTeam":{"type":"string","enum":["support","billing","network","provisioning"],"title":"TicketTeam"},"TicketUpdate":{"properties":{"subject":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Subject"},"description":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"$ref":"#/components/schemas/TicketCategory"},{"type":"null"}]},"priority":{"anyOf":[{"$ref":"#/components/schemas/TicketPriority"},{"type":"null"}]},"related_entity_type":{"anyOf":[{"$ref":"#/components/schemas/RelatedEntityType"},{"type":"null"}]},"related_entity_id":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"Related Entity Id"},"tags":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Tags"}},"type":"object","title":"TicketUpdate"},"TierBreakdownItem":{"properties":{"label":{"type":"string","title":"Label"},"from":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"From"},"to":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"To"},"rate":{"type":"number","title":"Rate"},"qty":{"type":"number","title":"Qty"},"charge":{"type":"number","title":"Charge"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},"type":"object","required":["label","rate","qty","charge"],"title":"TierBreakdownItem","description":"One tier band that contributed to a tiered-pricing invoice line."},"TierRule-Input":{"properties":{"from":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"From"},"to":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"To"},"rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Rate"},"label":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Label"}},"type":"object","required":["from","to","rate"],"title":"TierRule","description":"A single tier band for tiered pricing.\n\n`label` is optional — when present it's what the invoice line shows\ninstead of the engine's generic \"{qty} {unit} @ {rate}\" wording. So a\nvoice-tier band with label='Tier 1' on a 3,120-minute bill renders as\n\"Tier 1: 1,000 min @ $0.08\" rather than \"1000.00 min @ 0.0800\"."},"TierRule-Output":{"properties":{"from":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"From"},"to":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"To"},"rate":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Rate"},"label":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Label"}},"type":"object","required":["from","to","rate"],"title":"TierRule","description":"A single tier band for tiered pricing.\n\n`label` is optional — when present it's what the invoice line shows\ninstead of the engine's generic \"{qty} {unit} @ {rate}\" wording. So a\nvoice-tier band with label='Tier 1' on a 3,120-minute bill renders as\n\"Tier 1: 1,000 min @ $0.08\" rather than \"1000.00 min @ 0.0800\"."},"TimeRule-Input":{"properties":{"start":{"type":"string","title":"Start","description":"HH:MM format"},"end":{"type":"string","title":"End","description":"HH:MM format"},"multiplier":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Multiplier"}},"type":"object","required":["start","end","multiplier"],"title":"TimeRule","description":"A time-of-day multiplier window. Composes with any rate_curve."},"TimeRule-Output":{"properties":{"start":{"type":"string","title":"Start","description":"HH:MM format"},"end":{"type":"string","title":"End","description":"HH:MM format"},"multiplier":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Multiplier"}},"type":"object","required":["start","end","multiplier"],"title":"TimeRule","description":"A time-of-day multiplier window. Composes with any rate_curve."},"TransactionCreate":{"properties":{"terminal_id":{"type":"integer","title":"Terminal Id"},"customer_id":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"Customer Id"},"transaction_type":{"$ref":"#/components/schemas/TransactionType","default":"sale"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"operator":{"type":"string","maxLength":200,"title":"Operator"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"lines":{"items":{"$ref":"#/components/schemas/LineItemCreate"},"type":"array","title":"Lines"}},"type":"object","required":["terminal_id","operator"],"title":"TransactionCreate"},"TransactionDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"terminal_id":{"type":"integer","title":"Terminal Id"},"transaction_number":{"type":"string","title":"Transaction Number"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"transaction_type":{"type":"string","title":"Transaction Type"},"status":{"type":"string","title":"Status"},"subtotal":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Subtotal"},"tax_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Amount"},"discount_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Discount Amount"},"total_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Amount"},"currency":{"type":"string","title":"Currency"},"payment_method":{"type":"string","title":"Payment Method"},"payment_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Reference"},"amount_tendered":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount Tendered"},"change_given":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Change Given"},"operator":{"type":"string","title":"Operator"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"voided_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voided Reason"},"receipt_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Number"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"lines":{"items":{"$ref":"#/components/schemas/LineItemResponse"},"type":"array","title":"Lines","default":[]}},"type":"object","required":["id","tenant_id","terminal_id","transaction_number","customer_id","transaction_type","status","subtotal","tax_amount","discount_amount","total_amount","currency","payment_method","payment_reference","amount_tendered","change_given","operator","notes","voided_reason","receipt_number","created_at"],"title":"TransactionDetailResponse"},"TransactionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TransactionResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"TransactionListResponse"},"TransactionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"terminal_id":{"type":"integer","title":"Terminal Id"},"transaction_number":{"type":"string","title":"Transaction Number"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Id"},"transaction_type":{"type":"string","title":"Transaction Type"},"status":{"type":"string","title":"Status"},"subtotal":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Subtotal"},"tax_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Tax Amount"},"discount_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Discount Amount"},"total_amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Amount"},"currency":{"type":"string","title":"Currency"},"payment_method":{"type":"string","title":"Payment Method"},"payment_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Reference"},"amount_tendered":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount Tendered"},"change_given":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Change Given"},"operator":{"type":"string","title":"Operator"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"voided_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voided Reason"},"receipt_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Number"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","terminal_id","transaction_number","customer_id","transaction_type","status","subtotal","tax_amount","discount_amount","total_amount","currency","payment_method","payment_reference","amount_tendered","change_given","operator","notes","voided_reason","receipt_number","created_at"],"title":"TransactionResponse"},"TransactionType":{"type":"string","enum":["sale","refund","exchange","void","topup","sim_activation","voucher_sale"],"title":"TransactionType"},"UsageRecordCreate":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"subscription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscription Id"},"device_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Id"},"source":{"$ref":"#/components/schemas/UsageSource","default":"api"},"source_device":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Device"},"usage_type":{"$ref":"#/components/schemas/UsageType","default":"data"},"service_code":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Service Code"},"bytes_in":{"type":"integer","minimum":0.0,"title":"Bytes In","default":0},"bytes_out":{"type":"integer","minimum":0.0,"title":"Bytes Out","default":0},"session_time_sec":{"type":"integer","minimum":0.0,"title":"Session Time Sec","default":0},"voice_minutes":{"type":"integer","minimum":0.0,"title":"Voice Minutes","default":0},"sms_count":{"type":"integer","minimum":0.0,"title":"Sms Count","default":0},"custom_quantity":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Custom Quantity"},"custom_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Unit"},"period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period End"}},"type":"object","required":["customer_id"],"title":"UsageRecordCreate"},"UsageRecordOut":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"customer_id":{"type":"string","title":"Customer Id"},"subscription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscription Id"},"device_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Id"},"source":{"type":"string","title":"Source"},"source_device":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Device"},"usage_type":{"type":"string","title":"Usage Type"},"service_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Code"},"bytes_in":{"type":"integer","title":"Bytes In"},"bytes_out":{"type":"integer","title":"Bytes Out"},"session_time_sec":{"type":"integer","title":"Session Time Sec"},"voice_minutes":{"type":"integer","title":"Voice Minutes"},"sms_count":{"type":"integer","title":"Sms Count"},"custom_quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Custom Quantity"},"custom_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Unit"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"rated":{"type":"boolean","title":"Rated"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","customer_id","subscription_id","source","source_device","usage_type","bytes_in","bytes_out","session_time_sec","voice_minutes","sms_count","custom_quantity","custom_unit","period_start","period_end","rated","created_at"],"title":"UsageRecordOut"},"UsageSource":{"type":"string","enum":["radius","cdr","api","manual","netconf"],"title":"UsageSource"},"UsageSummary":{"properties":{"total_bytes":{"type":"integer","title":"Total Bytes","default":0},"total_mb":{"type":"number","title":"Total Mb","default":0},"total_sessions":{"type":"integer","title":"Total Sessions","default":0},"total_voice_min":{"type":"integer","title":"Total Voice Min","default":0},"total_sms":{"type":"integer","title":"Total Sms","default":0},"total_custom_quantity":{"type":"number","title":"Total Custom Quantity","default":0},"custom_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Unit"},"records_count":{"type":"integer","title":"Records Count","default":0},"unrated_count":{"type":"integer","title":"Unrated Count","default":0}},"type":"object","title":"UsageSummary"},"UsageType":{"type":"string","enum":["data","voice","sms","transaction","session"],"title":"UsageType"},"UsageUnit":{"type":"string","enum":["MB","GB","min","msg","session","transaction","month","unit","Mbps","Mbps_burst","device_day"],"title":"UsageUnit"},"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"},"VoidInvoiceRequest":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":5,"title":"Reason"}},"type":"object","required":["reason"],"title":"VoidInvoiceRequest"},"VoidTransactionRequest":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"}},"type":"object","required":["reason"],"title":"VoidTransactionRequest"},"_ApplyEntitlementsRequest":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"}},"type":"object","required":["customer_id","period_start","period_end"],"title":"_ApplyEntitlementsRequest"},"_DryRunRequest":{"properties":{"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"voice_day_min":{"type":"integer","minimum":0.0,"title":"Voice Day Min","default":0},"voice_night_min":{"type":"integer","minimum":0.0,"title":"Voice Night Min","default":0},"sms_count":{"type":"integer","minimum":0.0,"title":"Sms Count","default":0},"data_gb":{"type":"number","minimum":0.0,"title":"Data Gb","default":0},"ip_mbps":{"type":"integer","minimum":0.0,"title":"Ip Mbps","default":0},"burst_mbps":{"type":"integer","minimum":0.0,"title":"Burst Mbps","default":0},"monitor_device_days":{"type":"integer","minimum":0.0,"title":"Monitor Device Days","default":0},"pro_service_codes":{"items":{"type":"string"},"type":"array","title":"Pro Service Codes"}},"type":"object","required":["customer_id"],"title":"_DryRunRequest"},"_EikamInitRunRequest":{"properties":{"external_run_id":{"type":"string","maxLength":120,"title":"External Run Id"},"integration_type":{"type":"string","maxLength":40,"title":"Integration Type","default":"eikam"},"cycle_start":{"type":"string","format":"date-time","title":"Cycle Start"},"cycle_end":{"type":"string","format":"date-time","title":"Cycle End"},"customers_in_scope":{"type":"integer","title":"Customers In Scope","default":0},"note":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Note"}},"type":"object","required":["external_run_id","cycle_start","cycle_end"],"title":"_EikamInitRunRequest","description":"Eikam (or any external orchestrator) registers a run it's about to\nprocess. Optional but recommended — lets Sigtel's Reports surface the\nrun as it executes, not just after invoices land."},"_RunStatusUpdate":{"properties":{"status":{"type":"string","maxLength":20,"title":"Status"},"last_error":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Last Error"}},"type":"object","required":["status"],"title":"_RunStatusUpdate","description":"External orchestrator updates a run's terminal status.\n\nAllowed transitions:\n  running → completed | failed | partial\nRe-issuing the same terminal status is a no-op."},"_ScenarioCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"customer_id":{"type":"string","maxLength":36,"title":"Customer Id"},"voice_day_min":{"type":"integer","minimum":0.0,"title":"Voice Day Min","default":0},"voice_night_min":{"type":"integer","minimum":0.0,"title":"Voice Night Min","default":0},"sms_count":{"type":"integer","minimum":0.0,"title":"Sms Count","default":0},"data_gb":{"type":"number","minimum":0.0,"title":"Data Gb","default":0},"ip_mbps":{"type":"integer","minimum":0.0,"title":"Ip Mbps","default":0},"burst_mbps":{"type":"integer","minimum":0.0,"title":"Burst Mbps","default":0},"monitor_device_days":{"type":"integer","minimum":0.0,"title":"Monitor Device Days","default":0},"pro_service_codes":{"items":{"type":"string"},"type":"array","title":"Pro Service Codes"},"is_public":{"type":"boolean","title":"Is Public","default":true}},"type":"object","required":["name","customer_id"],"title":"_ScenarioCreate"},"_TriggerInvoicingRequest":{"properties":{"customer_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Customer Ids","description":"Specific customers to invoice. Omit to invoice every active customer."},"cycle_start":{"type":"string","format":"date-time","title":"Cycle Start"},"cycle_end":{"type":"string","format":"date-time","title":"Cycle End"},"note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Note"}},"type":"object","required":["cycle_start","cycle_end"],"title":"_TriggerInvoicingRequest","description":"Operator-initiated invoicing run.\n\nPublishes invoicing.requested outbox events for the customers in scope.\nThe same event is published by the billing-cycle scheduler — this gives\noperators a way to fire it on demand (re-runs, ad-hoc periods, demos)."}}},"servers":[{"url":"/docs/bss"}]}