{"info":{"title":"AutoInvoice Receivables API","description":"The Receivables Management Service handles reminders, payment monitoring, payment allocation, and debt collection after sending an invoice. More information about how the service works and how to get started at [Integration guide - Receivables Management Service](https://documentation.maventa.com/integration-guide/#receivables-management-service-for-finnish-companies)\n## Changelog\n  ## 2026-10-26 13:41 UTC id:c19356c (0.0.148)\n\n## 2026-10-20 09:07 UTC id:8ee3e1a (0.0.147)\n\n## 2026-10-19 12:54 UTC id:5b44890 (0.0.146)\n\n## 2026-09-29 12:50 UTC id:4b747ce (0.0.145)\n\n## 2026-09-16 07:42 UTC id:a94d8b4 (0.0.144)\n\n\n","version":"0.0.1"},"swagger":"2.0","produces":["application/json"],"securityDefinitions":{"company_auth":{"type":"oauth2","tokenUrl":"https://ax-stage.maventa.com/oauth2/token","flow":"application","scopes":{"receivables:assignments":"Grants access to assignments","company:read":"Grants read access to company data"}},"operator_auth":{"type":"oauth2","tokenUrl":"https://ax-stage.maventa.com/oauth2/token","flow":"application","scopes":{"operator:receivables:assignments":"Grants access to assignments","operator:receivables:assignments:create":"Grants access for creating assignments","operator:receivables:webhooks":"Grants access to webhook endpoints"}}},"host":"receivables-stage.maventa.com","tags":[{"name":"assignments","description":"Operations about assignments"},{"name":"events","description":"Operations about events"},{"name":"message_threads","description":"Operations about message_threads"},{"name":"messages","description":"Operations about messages"},{"name":"service_levels","description":"Operations about service_levels"},{"name":"reports","description":"Operations about reports"},{"name":"webhooks","description":"Operations about webhooks"}],"paths":{"/v1/assignments":{"get":{"summary":"Assignment listing","description":"#### Pagination and sorting\nThe resultset is always paged based on the parameters given in the request or default values.\nAdditional information about the paging can be extracted from the headers:\n\n- **X-Total**: Total number of items\n- **X-Total-Pages**: Total number of pages\n- **X-Page**: Index of the current page\n- **X-Per-Page**: Items per page\n\nThe page indexing starts from 1 and default page size is 10.\n\nThe assignments are sorted ascending by the **updated_at** date, meaning that the oldest changed entry is first.\n","produces":["application/json"],"parameters":[{"in":"query","name":"reference_ids","description":"Reference ids. e.g. The invoice ID in AutoInvoice/Maventa","type":"array","items":{"type":"string"},"required":false},{"in":"query","name":"reference_types","description":"Reference types. e.g. For listing only invoice references.","type":"array","items":{"type":"string","enum":["invoice_id","agency_id","number","collectible_invoice_id","vendor_key_id"]},"required":false},{"in":"query","name":"statuses","description":"List of statuses. e.g. For only listing open assignments","type":"array","items":{"type":"string","enum":["open","closed","partially_closed"]},"required":false},{"in":"query","name":"collection_statuses","description":"List of collection_statuses","type":"array","items":{"type":"string","enum":["unknown","reminder_sent","debt_collection","legal_collection","recovery_proceedings","debt_surveillance","payment_plan"]},"required":false},{"in":"query","name":"service_levels","description":"List of service_levels.","type":"array","items":{"type":"string","enum":["default","premium","vip","service_bypass"]},"required":false},{"in":"query","name":"event_types","description":"List of event types. e.g. For listing only credited assignments","type":"array","items":{"type":"string","enum":["comment","paid","close","reminder_sent","due_date_changed","due_date_change_request","credit_loss","collection_started","freeze","cancel","credit_note","interest_paid","cash_discount","delivery_status","partially_close","service_level_changed","second_reminder_sent","second_demand_sent","tratta_sent","legal_collection_started","application_for_enforcement","credit_loss_suggestion","lack_of_means","payment_plan","unfreezed","freeze_confirmed"]},"required":false},{"in":"query","name":"page","description":"Page to fetch","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Number of items per page","type":"integer","format":"int32","default":10,"required":false},{"in":"query","name":"unseen_by","description":"List only assignment that has unseen events. The value is related to the seen_by parameter when tagging events as seen. Use '*' to list events unseen by anyone","type":"array","items":{"type":"string"},"required":false},{"in":"query","name":"due_date[start]","description":"Left bound interval for due date selection.","type":"string","format":"date","required":false},{"in":"query","name":"due_date[end]","description":"Right bound interval for due date selection.","type":"string","format":"date","required":false},{"in":"query","name":"issued_at[start]","description":"Left bound interval for issued date selection.","type":"string","format":"date","required":false},{"in":"query","name":"issued_at[end]","description":"Right bound interval for issued date selection.","type":"string","format":"date","required":false},{"in":"query","name":"partially_closed_at[start]","description":"Left bound interval for partially_closed time selection.","type":"string","format":"date-time","required":false},{"in":"query","name":"partially_closed_at[end]","description":"Right bound interval for partially_closed time selection.","type":"string","format":"date-time","required":false},{"in":"query","name":"closed_at[start]","description":"Left bound interval for closed time selection.","type":"string","format":"date-time","required":false},{"in":"query","name":"closed_at[end]","description":"Right bound interval for closed time selection.","type":"string","format":"date-time","required":false},{"in":"query","name":"created_at[start]","description":"Left bound interval for created time selection.","type":"string","format":"date-time","required":false},{"in":"query","name":"created_at[end]","description":"Right bound interval for created time selection.","type":"string","format":"date-time","required":false},{"in":"query","name":"debtor_name","description":"List assignments with debtor name that contains given text.","type":"string","required":false},{"in":"query","name":"number","description":"List assignments with invoice number that containes given text.","type":"string","required":false},{"in":"query","name":"query","description":"List assignments with invoice number or debtor name that containes the given text.","type":"string","required":false},{"in":"query","name":"order","description":"Set sorting order. e.g. -created_at. Available values: created_at, updated_at, due_date, issued_at, status, number, sum, paid, debtor_name","type":"string","default":"updated_at","required":false},{"in":"query","name":"agency","description":"List only assignments for a specific agency.","type":"string","enum":["AMILI","INTRUM"],"required":false}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"200":{"description":"List of assignments","schema":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_Assignment"}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["assignments"],"operationId":"getV1Assignments"},"post":{"summary":"Create new assignment","description":"Create new assignment","produces":["application/json"],"consumes":["application/json"],"parameters":[{"name":"PostAssignment","in":"body","required":true,"schema":{"$ref":"#/definitions/postV1Assignments"}}],"security":[{"operator_auth":["operator:receivables:assignments:create"]}],"responses":{"201":{"description":"Assignment created","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Assignment"}},"409":{"description":"Conflicting ids","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["assignments"],"operationId":"postV1Assignments"}},"/v1/assignments/overview":{"get":{"summary":"Assignments overview","description":"Overall stats about open assignments","produces":["application/json"],"parameters":[{"in":"query","name":"due_date","description":"Overview of receivables for a specific due_date. Default: today.","type":"string","format":"date","required":false}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"200":{"description":"Assignments overview","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_AssignmentOverview"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["assignments"],"operationId":"getV1AssignmentsOverview"}},"/v1/assignments/{assignment_id}":{"get":{"summary":"Fetch an assignment","description":"Fetch an single assignment by id","produces":["application/json"],"parameters":[{"in":"path","name":"assignment_id","description":"Assignment ID","type":"string","required":true}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"200":{"description":"Fetch an assignment","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Assignment"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["assignments"],"operationId":"getV1AssignmentsAssignmentId"}},"/v1/assignments/{assignment_id}/reference_ids":{"post":{"summary":"Add a new reference to an assignment","description":"## Add reference to an assignment\nParties connected to an assignment can add references to describe links between their entities.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"assignment_id","description":"Assignment ID","type":"string","required":true},{"name":"PostReference","in":"body","required":true,"schema":{"$ref":"#/definitions/postV1AssignmentsAssignmentIdReferenceIds"}}],"security":[{"operator_auth":["operator:receivables:assignments"]}],"responses":{"201":{"description":"Reference created","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_ReferenceId"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["assignments"],"operationId":"postV1AssignmentsAssignmentIdReferenceIds"}},"/v1/assignments/{assignment_id}/events":{"get":{"summary":"List events related to an assignment","description":"List all events related to an assignment\n\n#### Pagination and sorting\nThe resultset is always paged based on the parameters given in the request or default values.\nAdditional information about the paging can be extracted from the headers:\n\n- **X-Total**: Total number of items\n- **X-Total-Pages**: Total number of pages\n- **X-Page**: Index of the current page\n- **X-Per-Page**: Items per page\n\nThe page indexing starts from 1 and default page size is 10.\n\nEvents are sorted ascending by the **updated_at** date, meaning that the oldest changed entry is first.\n","produces":["application/json"],"parameters":[{"in":"path","name":"assignment_id","description":"Assignment ID","type":"string","required":true},{"in":"query","name":"page","description":"Page to fetch","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Number of items per page","type":"integer","format":"int32","default":10,"required":false},{"in":"query","name":"event_types","description":"List of event types. e.g. For listing only credit loss events","type":"array","items":{"type":"string","enum":["comment","paid","close","reminder_sent","due_date_changed","due_date_change_request","credit_loss","collection_started","freeze","cancel","credit_note","interest_paid","cash_discount","delivery_status","partially_close","service_level_changed","second_reminder_sent","second_demand_sent","tratta_sent","legal_collection_started","application_for_enforcement","credit_loss_suggestion","lack_of_means","payment_plan","unfreezed","freeze_confirmed"]},"required":false},{"in":"query","name":"happened_at[start]","description":"Left bound interval for happened_at selection.","type":"string","format":"date-time","required":false},{"in":"query","name":"happened_at[end]","description":"Right bound interval for happened_at selection.","type":"string","format":"date-time","required":false},{"in":"query","name":"created_at[start]","description":"Left bound interval for created_at selection.","type":"string","format":"date-time","required":false},{"in":"query","name":"created_at[end]","description":"Right bound interval for created_at selection.","type":"string","format":"date-time","required":false}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"200":{"description":"List of events","schema":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_Event"}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["assignments"],"operationId":"getV1AssignmentsAssignmentIdEvents"},"post":{"summary":"Add a new event to an assignment","description":"## Add event to an assignment\nParties connected to an assignment can add events to communicate changes to the assignment.\n\n## **comment** - Comment or question\n\nRequired fields: **comment**\nAllowed for: **agency,customer,owner**\nSupported agencies: **amili**\n\nAdds a freetext comment or question to the assignment.\n\n```javascript\n{\n  \"type\": \"comment\",\n  \"data\": {\n    \"comment\": \"This is a free text.\"\n  }\n}\n```\n\n## **paid** - Invoice has been fully paid or paid something by the debtor\n\nRequired fields: **sum_paid,booked_at**\nAllowed for: **agency,customer,owner**\nSupported agencies: **amili, intrum, ropo**\n\nThe invoice has been fully paid or paid something to the agency or customer (invoice sender).\n\n```javascript\n{\n  \"type\": \"paid\",\n  \"data\": {\n    \"sum_paid\": 200.5,\n    \"booked_at\": \"2019-01-04\",\n    \"archive_number\": \"12345\"\n  }\n}\n```\n\n## **credit_note** - Credit note sent for an invoice.\n\nRequired fields: **credit_sum,booked_at**\nAllowed for: **agency,customer,owner**\nSupported agencies: **amili, ropo**\n\nCredit note sent for an invoice. Positive values will descrease the paid sum of the assignment. Negative values will increase the paid sum of the assignment.\n\n```javascript\n{\n  \"type\": \"credit_note\",\n  \"data\": {\n    \"credit_sum\": 200.5,\n    \"booked_at\": \"2019-01-04\",\n    \"referenced_document_number\": \"12345\"\n  }\n}\n```\n\n## **interest_paid** - Interest paid for invoice.\n\nRequired fields: **sum,booked_at**\nAllowed for: **agency,owner**\nSupported agencies: **amili, intrum**\n\nInterest paid for invoice.\n\n```javascript\n{\n  \"type\": \"interest_paid\",\n  \"data\": {\n    \"sum\": 200.5,\n    \"booked_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **cash_discount** - Cash discount for invoice.\n\nRequired fields: **discount_sum,booked_at**\nAllowed for: **agency,owner**\nSupported agencies: **amili**\n\nCash discount for invoice.\n\n```javascript\n{\n  \"type\": \"cash_discount\",\n  \"data\": {\n    \"discount_sum\": 20.5,\n    \"booked_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **due_date_change_request** - Request a new due date set for the invoice\n\nRequired fields: **due_date,reason**\nAllowed for: **customer**\nSupported agencies: **amili**\n\nCustomer requests to change the due date.\n\n```javascript\n{\n  \"type\": \"due_date_change_request\",\n  \"data\": {\n    \"due_date\": \"2019-01-04\",\n    \"reason\": \"Postponed\"\n  }\n}\n```\n\n## **due_date_changed** - New due date set for the invoice\n\nRequired fields: **due_date**\nAllowed for: **agency,owner**\nSupported agencies: **amili**\n\nThe agency or customer has set a new due date.\n\n```javascript\n{\n  \"type\": \"due_date_changed\",\n  \"data\": {\n    \"due_date\": \"2019-01-04\"\n  }\n}\n```\n\n## **collection_started** - Date when collection started\n\nRequired fields: **started_at**\nAllowed for: **agency,owner**\nSupported agencies: **amili, intrum, ropo**\n\nThe agency or customer started a new collection.\n\n```javascript\n{\n  \"type\": \"collection_started\",\n  \"data\": {\n    \"started_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **reminder_sent** - Reminder sent to the debtor\n\nRequired fields: **sent_at**\nAllowed for: **agency,owner**\nSupported agencies: **amili, intrum, ropo**\n\nThe agency has sent a reminder to the debtor.\n\n```javascript\n{\n  \"type\": \"reminder_sent\",\n  \"data\": {\n    \"sent_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **close** - Assignment closed.\n\nAllowed for: **agency**\nSupported agencies: **amili, intrum, ropo**\n\nAllows assignment to be closed.\n\n```javascript\n{\n  \"type\": \"close\",\n  \"data\": {\n    \"reason\": \"closed\"\n  }\n}\n```\n\n## **partially_close** - Assignment partially_closed.\n\nAllowed for: **agency**\nSupported agencies: **amili**\n\nAllows assignment to be partially_closed. Can be used when invoice sum is fully paid but end customer did not pay reminder or collection charges. This means that from the mandators perspective the assignment is closed, but the debtor still needs to pay more money to the creditor.\n\n```javascript\n{\n  \"type\": \"partially_close\",\n  \"data\": {\n    \"reason\": \"partially_closed\"\n  }\n}\n```\n\n## **credit_loss** - We lost money!\n\nRequired fields: **sum,booked_at**\nAllowed for: **agency,customer,owner**\nSupported agencies: **amili**\n\nWe lost some money.\n\n```javascript\n{\n  \"type\": \"credit_loss\",\n  \"data\": {\n    \"sum\": 200.5,\n    \"booked_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **freeze** - Request to freeze a collection.\n\nRequired fields: **frozen,end_date**\nAllowed for: **agency,customer,owner**\nSupported agencies: **amili**\n\nCustomer/owner/agency requests to freeze a collection.\n\n```javascript\n{\n  \"type\": \"freeze\",\n  \"data\": {\n    \"frozen\": true,\n    \"end_date\": \"2019-01-04\"\n  }\n}\n```\n\n## **cancel** - Request to cancel a collection.\n\nRequired fields: **reason**\nAllowed for: **agency,customer,owner**\nSupported agencies: **amili**\n\nCustomer/owner/agency requests to cancel a collection.\n\n```javascript\n{\n  \"type\": \"cancel\",\n  \"data\": {\n    \"reason\": \"Some reason to cancel\"\n  }\n}\n```\n\n## **delivery_status** - Status of the delivery of the invoice related to this assignment.\n\nRequired fields: **code**\nAllowed for: **owner**\nSupported agencies: **amili**\n\nIndicates if the invoice has been successfully delivered to the customer or not. Possible values are 'PENDING', 'DELIVERED' and 'FAILED'.\n\n```javascript\n{\n  \"type\": \"delivery_status\",\n  \"data\": {\n    \"code\": \"FAILED\",\n    \"reason\": \"Delivery failed\"\n  }\n}\n```\n\n## **service_level_changed** - Change the service level of an assignment\n\nRequired fields: **service_level**\nAllowed for: **agency**\nSupported agencies: **amili**\n\nEvent is added when customer is listed to have special service_level\n\n```javascript\n{\n  \"type\": \"service_level_changed\",\n  \"data\": {\n    \"service_level\": \"premium\"\n  }\n}\n```\n\n## **second_reminder_sent** - \n\nRequired fields: **happened_at**\nAllowed for: **agency**\nSupported agencies: **amili**\n\nA second payment reminder has been sent of an unpaid invoice\n\n```javascript\n{\n  \"type\": \"second_reminder_sent\",\n  \"data\": {\n    \"happened_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **second_demand_sent** - \n\nRequired fields: **happened_at**\nAllowed for: **agency**\nSupported agencies: **amili, ropo**\n\nA payment demand has been sent of an unpaid invoice\n\n```javascript\n{\n  \"type\": \"second_demand_sent\",\n  \"data\": {\n    \"happened_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **tratta_sent** - \n\nRequired fields: **happened_at**\nAllowed for: **agency**\nSupported agencies: **amili, ropo**\n\nA tratta has been sent of an unpaid invoice\n\n```javascript\n{\n  \"type\": \"tratta_sent\",\n  \"data\": {\n    \"happened_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **legal_collection_started** - \n\nRequired fields: **happened_at**\nAllowed for: **agency**\nSupported agencies: **amili, intrum, ropo**\n\nA summons application has been sent and legal collection of the case has started\n\n```javascript\n{\n  \"type\": \"legal_collection_started\",\n  \"data\": {\n    \"happened_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **application_for_enforcement** - \n\nRequired fields: **happened_at**\nAllowed for: **agency**\nSupported agencies: **amili, ropo**\n\nAn application for enforcement has been sent and the case has been transferred to the enforcement authority\n\n```javascript\n{\n  \"type\": \"application_for_enforcement\",\n  \"data\": {\n    \"happened_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **credit_loss_suggestion** - \n\nRequired fields: **happened_at**\nAllowed for: **agency**\nSupported agencies: **amili, intrum, ropo**\n\nA recommendation to mark the receivable as credit loss\n\n```javascript\n{\n  \"type\": \"credit_loss_suggestion\",\n  \"data\": {\n    \"happened_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **lack_of_means** - \n\nRequired fields: **happened_at**\nAllowed for: **agency**\nSupported agencies: **amili, ropo**\n\nThe enforcement authority has found the debtor insolvent\n\n```javascript\n{\n  \"type\": \"lack_of_means\",\n  \"data\": {\n    \"happened_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **payment_plan** - \n\nRequired fields: **happened_at**\nAllowed for: **agency**\nSupported agencies: **amili, ropo**\n\nA payment plan has been agreed on the invoice\n\n```javascript\n{\n  \"type\": \"payment_plan\",\n  \"data\": {\n    \"happened_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **unfreezed** - \n\nRequired fields: **happened_at**\nAllowed for: **agency**\nSupported agencies: **amili**\n\nThe debt collection suspension has been terminated and the debt collection of the case continues\n\n```javascript\n{\n  \"type\": \"unfreezed\",\n  \"data\": {\n    \"happened_at\": \"2019-01-04\"\n  }\n}\n```\n\n## **freeze_confirmed** - \n\nRequired fields: **happened_at,end_date**\nAllowed for: **agency**\nSupported agencies: **amili**\n\nDebt collection is suspended until the specified date\n\n```javascript\n{\n  \"type\": \"freeze_confirmed\",\n  \"data\": {\n    \"happened_at\": \"2019-01-04\",\n    \"end_date\": \"2019-02-15\"\n  }\n}\n```\n\n\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"assignment_id","description":"Assignment ID","type":"string","required":true},{"name":"PostEvent","in":"body","required":true,"schema":{"$ref":"#/definitions/postV1AssignmentsAssignmentIdEvents"}}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"201":{"description":"Event created","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Event"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["assignments"],"operationId":"postV1AssignmentsAssignmentIdEvents"}},"/v1/assignments/{assignment_id}/events/{event_id}/seen":{"post":{"summary":"Mark event as seen","description":"","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"assignment_id","description":"Assignment ID","type":"string","required":true},{"in":"path","name":"event_id","description":"Event ID","type":"string","required":true},{"in":"query","name":"seen_by","description":"Identifier for the seen, to identify different system for the same user","type":"string","required":false}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"201":{"description":"Event was marked as seen","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_EventSeen"}},"200":{"description":"Event has already been marked as seen","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_EventSeen"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["assignments"],"operationId":"postV1AssignmentsAssignmentIdEventsEventIdSeen"}},"/v1/assignments/{assignment_id}/messages":{"post":{"description":"Add a new message to an assignment","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"assignment_id","description":"Assignment ID","type":"string","required":true},{"name":"postV1AssignmentsAssignmentIdMessages","in":"body","required":true,"schema":{"$ref":"#/definitions/postV1AssignmentsAssignmentIdMessages"}}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"204":{"description":"Message created"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["assignments"],"operationId":"postV1AssignmentsAssignmentIdMessages"},"get":{"summary":"Assignment messages listing","description":"#### Pagination and sorting\nThe resultset is always paged based on the parameters given in the request or default values.\nAdditional information about the paging can be extracted from the headers:\n\n- **X-Total**: Total number of items\n- **X-Total-Pages**: Total number of pages\n- **X-Page**: Index of the current page\n- **X-Per-Page**: Items per page\n\nThe page indexing starts from 1 and default page size is 10.\n\nThe messages are sorted descending by the **updated_at** date, meaning that the newest entry is first.\n","produces":["application/json"],"parameters":[{"in":"path","name":"assignment_id","description":"Assignment ID","type":"string","required":true},{"in":"query","name":"page","description":"Page to fetch","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Number of items per page","type":"integer","format":"int32","default":10,"required":false}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"200":{"description":"List of assignment messages","schema":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_Message"}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["assignments"],"operationId":"getV1AssignmentsAssignmentIdMessages"}},"/v1/events":{"get":{"summary":"Assignment events listing","description":"#### Pagination and sorting\nThe resultset is always paged based on the parameters given in the request or default values.\nAdditional information about the paging can be extracted from the headers:\n\n- **X-Total**: Total number of items\n- **X-Total-Pages**: Total number of pages\n- **X-Page**: Index of the current page\n- **X-Per-Page**: Items per page\n\nThe page indexing starts from 1 and default page size is 10.\n\nEvents are sorted ascending by the **updated_at** date, meaning that the oldest changed entry is first.\n","produces":["application/json"],"parameters":[{"in":"query","name":"page","description":"Page to fetch","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Number of items per page","type":"integer","format":"int32","default":10,"required":false},{"in":"query","name":"event_types","description":"List of event types. e.g. For listing only credit loss events","type":"array","items":{"type":"string","enum":["comment","paid","close","reminder_sent","due_date_changed","due_date_change_request","credit_loss","collection_started","freeze","cancel","credit_note","interest_paid","cash_discount","delivery_status","partially_close","service_level_changed","second_reminder_sent","second_demand_sent","tratta_sent","legal_collection_started","application_for_enforcement","credit_loss_suggestion","lack_of_means","payment_plan","unfreezed","freeze_confirmed"]},"required":false},{"in":"query","name":"happened_at[start]","description":"Left bound interval for happened_at selection.","type":"string","format":"date-time","required":false},{"in":"query","name":"happened_at[end]","description":"Right bound interval for happened_at selection.","type":"string","format":"date-time","required":false},{"in":"query","name":"created_at[start]","description":"Left bound interval for created_at selection.","type":"string","format":"date-time","required":false},{"in":"query","name":"created_at[end]","description":"Right bound interval for created_at selection.","type":"string","format":"date-time","required":false}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"200":{"description":"List of assignment events","schema":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_EventDetailed"}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["events"],"operationId":"getV1Events"}},"/v1/message_threads":{"get":{"summary":"MessageThreads listing","description":"#### Pagination and sorting\nThe resultset is always paged based on the parameters given in the request or default values.\nAdditional information about the paging can be extracted from the headers:\n\n- **X-Total**: Total number of items\n- **X-Total-Pages**: Total number of pages\n- **X-Page**: Index of the current page\n- **X-Per-Page**: Items per page\n\nThe page indexing starts from 1 and default page size is 10.\n\nThe threads are sorted ascending by seen and descending by the **updated_at** date, meaning the newest unseen ones come first.\n","produces":["application/json"],"parameters":[{"in":"query","name":"search","description":"List message_threads where debtor_name or invoice_nr contains given text.","type":"string","required":false},{"in":"query","name":"unseen","description":"true = List only message_threads with unseen messages.\nfalse = List only message_threads with seen messages.\nempty = List all message_threads.\n","type":"boolean","required":false},{"in":"query","name":"page","description":"Page to fetch","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Number of items per page","type":"integer","format":"int32","default":10,"required":false}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"200":{"description":"List of threads","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_MessageThreads"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["message_threads"],"operationId":"getV1MessageThreads"}},"/v1/message_threads/{thread_id}":{"patch":{"description":"Set message thread parameters","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"thread_id","description":"Thread ID","type":"string","required":true},{"name":"patchV1MessageThreadsThreadId","in":"body","required":true,"schema":{"$ref":"#/definitions/patchV1MessageThreadsThreadId"}}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"204":{"description":"Message thread successfully patched"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["message_threads"],"operationId":"patchV1MessageThreadsThreadId"},"get":{"description":"Get a message thread by id","produces":["application/json"],"parameters":[{"in":"path","name":"thread_id","description":"Thread ID","type":"string","required":true}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"200":{"description":"Message Thread","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_MessageThread"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["message_threads"],"operationId":"getV1MessageThreadsThreadId"}},"/v1/message_threads/{thread_id}/messages":{"get":{"summary":"Messages listing","description":"#### Pagination and sorting\nThe resultset is always paged based on the parameters given in the request or default values.\nAdditional information about the paging can be extracted from the headers:\n\n- **X-Total**: Total number of items\n- **X-Total-Pages**: Total number of pages\n- **X-Page**: Index of the current page\n- **X-Per-Page**: Items per page\n\nThe page indexing starts from 1 and default page size is 10.\n\nThe messages are sorted descending by the **updated_at** date, meaning that the newest entry is first.\n","produces":["application/json"],"parameters":[{"in":"path","name":"thread_id","description":"Thread ID","type":"string","required":true},{"in":"query","name":"page","description":"Page to fetch","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Number of items per page","type":"integer","format":"int32","default":10,"required":false}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"200":{"description":"List of threads","schema":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_Message"}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["message_threads"],"operationId":"getV1MessageThreadsThreadIdMessages"},"post":{"description":"Add a new message to a thread","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"thread_id","description":"Thread ID","type":"string","required":true},{"name":"postV1MessageThreadsThreadIdMessages","in":"body","required":true,"schema":{"$ref":"#/definitions/postV1MessageThreadsThreadIdMessages"}}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"204":{"description":"Message created"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["message_threads"],"operationId":"postV1MessageThreadsThreadIdMessages"}},"/v1/messages/{message_id}/seen":{"put":{"description":"Mark a message as seen","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"message_id","description":"The UUID of the message","type":"string","required":true}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"204":{"description":"Message successfully marked as seen"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["messages"],"operationId":"putV1MessagesMessageIdSeen"}},"/v1/service_levels":{"get":{"summary":"List service levels","description":"List the service levels for all of your customers. Calling this methods requires a token with both scopes: receivables:assignments and company:read. This method will only return customers that have a special service level set (premium, vip or service_bypass), the default service level is named \"default\" and that applies to every customer that does not have a service level. There is no way to list customers with the default service level.","produces":["application/json"],"security":[{"company_auth":["receivables:assignments"]}],"responses":{"200":{"description":"List service levels"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["service_levels"],"operationId":"getV1ServiceLevels"}},"/v1/service_levels/{customer_bid}":{"patch":{"summary":"Set service level for customer","description":"Set service level for customer. Calling this methods requires a token with both scopes: receivables:assignments and company:read","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"customer_bid","description":"Customer BID","type":"string","required":true},{"name":"PostServiceLevel","in":"body","required":true,"schema":{"$ref":"#/definitions/patchV1ServiceLevelsCustomerBid"}}],"security":[{"company_auth":["receivables:assignments"]}],"responses":{"204":{"description":"Service level successfully set"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["service_levels"],"operationId":"patchV1ServiceLevelsCustomerBid"},"get":{"summary":"Get service level for customer","description":"Get service level for customer. Calling this methods requires a token with both scopes: receivables:assignments and company:read","produces":["application/json"],"parameters":[{"in":"path","name":"customer_bid","description":"Customer BID","type":"string","required":true}],"security":[{"company_auth":["receivables:assignments"]}],"responses":{"200":{"description":"Get service level for customer"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unathorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["service_levels"],"operationId":"getV1ServiceLevelsCustomerBid"}},"/v1/reports/settlement":{"get":{"description":"Settlement Report for the given interval. (Only available for Amili)","produces":["application/pdf","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],"parameters":[{"in":"query","name":"reporting_interval[start]","description":"Beginning date of the interval (must be within 1 year of the end date)","type":"string","format":"date","required":true},{"in":"query","name":"reporting_interval[end]","description":"End date of the interval (must be within 1 year of start date)","type":"string","format":"date","required":true}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"200":{"description":"Settlement Report for given interval successfully retrieved"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["reports"],"operationId":"getV1ReportsSettlement"}},"/v1/reports/credit_loss_recommendation":{"get":{"description":"Credit Loss Recommendation Report for the given interval. (Only available for Amili)","produces":["application/pdf","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],"parameters":[{"in":"query","name":"reporting_interval[start]","description":"Beginning date of the interval (must be within 1 year of the end date)","type":"string","format":"date","required":true},{"in":"query","name":"reporting_interval[end]","description":"End date of the interval (must be within 1 year of start date)","type":"string","format":"date","required":true}],"security":[{"company_auth":["receivables:assignments"],"operator_auth":["operator:receivables:assignments"]}],"responses":{"200":{"description":"Credit Loss Recommendation Report for given interval successfully retrieved"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["reports"],"operationId":"getV1ReportsCreditLossRecommendation"}},"/v1/webhooks/ropo":{"post":{"summary":"Ropo webhook endpoint","description":"Receives webhook notifications from Ropo system for payment and lifecycle status events","produces":["application/json"],"consumes":["application/json"],"security":[{"operator_auth":["operator:receivables:webhooks"]}],"responses":{"200":{"description":"Webhook processed successfully"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"422":{"description":"Webhook processing failed","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Receivables_API_Entities_V1_Error"}}},"tags":["webhooks"],"operationId":"postV1WebhooksRopo"}}},"definitions":{"Receivables_API_Entities_V1_Assignment":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID for the assignment"},"status":{"type":"string","enum":["open","closed","partially_closed"],"description":"Status of the assignment"},"collection_status":{"type":"string","enum":["unknown","reminder_sent","debt_collection","legal_collection","recovery_proceedings","debt_surveillance","payment_plan"],"description":"Collection status of the assignment"},"service_level":{"type":"string","enum":["default","premium","vip","service_bypass"],"description":"Service level of the assignment"},"debtor":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_Debtor"},"description":"The debtor associated with the assignment"},"due_date":{"type":"string","format":"date","description":"Invoice due date"},"issued_at":{"type":"string","format":"date","description":"Invoice date"},"number":{"type":"string","description":"The invoice number of the assignment"},"sum":{"type":"number","format":"float","description":"The receivable amount"},"paid":{"type":"number","format":"float","description":"The paid amount."},"currency":{"type":"string","description":"The receivable currency"},"created_at":{"type":"string","format":"date-time","description":"Creation time of the assignment"},"updated_at":{"type":"string","format":"date-time","description":"Time the assignment was updated on"},"partially_closed_at":{"type":"string","format":"date","description":"Time the assignment was partially_closed on"},"closed_at":{"type":"string","format":"date-time","description":"Time the assignment was closed on"},"reference_ids":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_ReferenceId"},"description":"Reference ids associated with the assignment"},"events":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_Event"},"description":"Events related to the assignment"},"message_thread_id":{"type":"string","description":"The id of the message thread"},"agency":{"type":"string","description":"The agency associated with the assignment"}},"required":["id","status","collection_status","service_level","debtor","due_date","issued_at","number","sum","paid","currency","created_at","updated_at","partially_closed_at","closed_at","reference_ids","events","message_thread_id","agency"],"description":"Receivables_API_Entities_V1_Assignment model"},"Receivables_API_Entities_V1_Debtor":{"type":"object","properties":{"name":{"type":"string","description":"Name of the debtor"},"bid":{"type":"string","description":"Business ID of the debtor"}},"required":["name"]},"Receivables_API_Entities_V1_ReferenceId":{"type":"object","properties":{"type":{"type":"string","description":"Type of id"},"value":{"type":"string","description":"Id value"}},"required":["type","value"],"description":"Receivables_API_Entities_V1_ReferenceId model"},"Receivables_API_Entities_V1_Event":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID for the event"},"type":{"type":"string","enum":["comment","paid","close","reminder_sent","due_date_changed","due_date_change_request","credit_loss","collection_started","freeze","cancel","credit_note","interest_paid","cash_discount","delivery_status","partially_close","service_level_changed","second_reminder_sent","second_demand_sent","tratta_sent","legal_collection_started","application_for_enforcement","credit_loss_suggestion","lack_of_means","payment_plan","unfreezed","freeze_confirmed"],"description":"The type of the event"},"data":{"type":"object","description":"Data related to the event"},"party_id":{"type":"string","description":"The party that added the event"},"seens":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_EventSeen"},"description":"Event seen by"},"created_at":{"type":"string","format":"date-time","description":"Event creation time"},"happened_at":{"type":"string","format":"date-time","description":"Event time"}},"required":["id","type","data","party_id","seens","created_at","happened_at"],"description":"Receivables_API_Entities_V1_Event model"},"Receivables_API_Entities_V1_EventSeen":{"type":"object","properties":{"seen_at":{"type":"string","format":"date-time","description":"The event was marked as seen at this time"},"seen_by":{"type":"string","description":"Who saw the event"}},"required":["seen_at","seen_by"],"description":"Receivables_API_Entities_V1_EventSeen model"},"Receivables_API_Entities_V1_Error":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"string"},"description":"Error messages"}},"required":["messages"],"description":"Receivables_API_Entities_V1_Error model"},"Receivables_API_Entities_V1_AssignmentOverview":{"type":"object","properties":{"items_due":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_AssignmentOverviewStats"},"description":"Stats about opened overdue assignments"},"items_soon_due":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_AssignmentOverviewStats"},"description":"Stats about opened assignments still on time"},"items_total":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_AssignmentOverviewStats"},"description":"Stats about opened assignments"}},"required":["items_due","items_soon_due","items_total"],"description":"Receivables_API_Entities_V1_AssignmentOverview model"},"Receivables_API_Entities_V1_AssignmentOverviewStats":{"type":"object","properties":{"sum":{"type":"number","format":"float","description":"Total receivable amount."},"paid":{"type":"number","format":"float","description":"Total paid amount."},"count":{"type":"integer","format":"int64","description":"Total number of receivables."},"currency":{"type":"string","description":"The receivable amounts currency"}},"required":["sum","paid","count","currency"]},"postV1Assignments":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of assignment, will be auto-generated if not given"},"debtor":{"type":"object","description":"Information about the debtor","properties":{"name":{"type":"string","description":"Name of the debtor"},"bid":{"type":"string","description":"The organisation number of the debtor"}},"required":["name"]},"number":{"type":"string","description":"Invoice number for the assignment"},"sum":{"type":"number","format":"double","description":"Total amount for the assignment"},"currency":{"type":"string","description":"The assignment currency","enum":["EUR","NOK","SEK"]},"due_date":{"type":"string","format":"date","description":"Invoice due date"},"issued_at":{"type":"string","format":"date","description":"Invoice issue date"},"parties":{"type":"array","description":"Parties associated with the assignment","items":{"type":"object","properties":{"role":{"type":"string","description":"Role of the party","enum":["customer","agency"]},"party_id":{"type":"string","description":"Party id"}},"required":["role","party_id"]}},"reference_ids":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Type of id","enum":["invoice_id","agency_id","number","collectible_invoice_id","vendor_key_id"]},"value":{"type":"string","description":"The id value"}},"required":["type","value"]}}},"required":["debtor"],"description":"Create new assignment"},"postV1AssignmentsAssignmentIdReferenceIds":{"type":"object","properties":{"type":{"type":"string","description":"Type of id","enum":["invoice_id","agency_id","number","collectible_invoice_id","vendor_key_id"]},"value":{"type":"string","description":"The id value"}},"required":["type","value"],"description":"Add a new reference to an assignment"},"postV1AssignmentsAssignmentIdEvents":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of event, will be auto-generated if not given"},"type":{"type":"string","description":"Type of event","enum":["comment","paid","close","reminder_sent","due_date_changed","due_date_change_request","credit_loss","collection_started","freeze","cancel","credit_note","interest_paid","cash_discount","delivery_status","partially_close","service_level_changed","second_reminder_sent","second_demand_sent","tratta_sent","legal_collection_started","application_for_enforcement","credit_loss_suggestion","lack_of_means","payment_plan","unfreezed","freeze_confirmed"]},"data":{"type":"object","description":"Data related to the event"}},"required":["type","data"],"description":"Add a new event to an assignment"},"postV1AssignmentsAssignmentIdMessages":{"type":"object","properties":{"text":{"type":"string","description":"The text to be sent"}},"description":"Add a new message to an assignment"},"Receivables_API_Entities_V1_Message":{"type":"object","properties":{"uuid":{"type":"string","description":"The UUID of the message"},"text":{"type":"string","description":"The content of the message"},"sender_party":{"type":"string","enum":["mandator","agency"],"description":"The sender party of the message"},"seen":{"type":"boolean","description":"Seen by yourself"},"created_at":{"type":"string","format":"date-time","description":"Creation time of the message"}},"required":["uuid","text","sender_party","seen","created_at"],"description":"Receivables_API_Entities_V1_Message model"},"Receivables_API_Entities_V1_EventDetailed":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID for the event"},"type":{"type":"string","enum":["comment","paid","close","reminder_sent","due_date_changed","due_date_change_request","credit_loss","collection_started","freeze","cancel","credit_note","interest_paid","cash_discount","delivery_status","partially_close","service_level_changed","second_reminder_sent","second_demand_sent","tratta_sent","legal_collection_started","application_for_enforcement","credit_loss_suggestion","lack_of_means","payment_plan","unfreezed","freeze_confirmed"],"description":"The type of the event"},"data":{"type":"object","description":"Data related to the event"},"party_id":{"type":"string","description":"The party that added the event"},"seens":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_EventSeen"},"description":"Event seen by"},"created_at":{"type":"string","format":"date-time","description":"Event creation time"},"happened_at":{"type":"string","format":"date-time","description":"Event time"},"assignment":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_BaseAssignment"},"description":"The assignment associated with the event"}},"required":["id","type","data","party_id","seens","created_at","happened_at","assignment"],"description":"Receivables_API_Entities_V1_EventDetailed model"},"Receivables_API_Entities_V1_BaseAssignment":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID for the assignment"},"status":{"type":"string","enum":["open","closed","partially_closed"],"description":"Status of the assignment"},"collection_status":{"type":"string","enum":["unknown","reminder_sent","debt_collection","legal_collection","recovery_proceedings","debt_surveillance","payment_plan"],"description":"Collection status of the assignment"},"service_level":{"type":"string","enum":["default","premium","vip","service_bypass"],"description":"Service level of the assignment"}},"required":["id","status","collection_status","service_level"]},"Receivables_API_Entities_V1_MessageThreads":{"type":"object","properties":{"message_threads":{"type":"array","items":{"$ref":"#/definitions/Receivables_API_Entities_V1_MessageThread"},"description":"The threads"},"unseen":{"type":"integer","format":"int64","description":"The number of unseen threads"}},"required":["message_threads","unseen"],"description":"Receivables_API_Entities_V1_MessageThreads model"},"Receivables_API_Entities_V1_MessageThread":{"type":"object","properties":{"id":{"type":"string","description":"The id of the thread"},"agency_name":{"type":"string","description":"The name of the agency"},"mandator_id":{"type":"string","description":"The ID of the mandator"},"flagged":{"type":"boolean","default":false,"description":"Do whatever you want with this flag"},"assignment_id":{"type":"string","description":"The id of the assignment"},"invoice_nr":{"type":"string","description":"The number of the invoice"},"debtor_name":{"type":"string","description":"The name of the debtor"},"seen":{"type":"boolean","default":false,"description":"Did this party see the newest message?"},"latest_message":{"default":false,"allOf":[{"$ref":"#/definitions/Receivables_API_Entities_V1_LatestMessage"}],"description":"Latest message in the thread"}},"required":["id","agency_name","mandator_id","flagged","assignment_id","invoice_nr","debtor_name","seen","latest_message"],"description":"Receivables_API_Entities_V1_MessageThread model"},"Receivables_API_Entities_V1_LatestMessage":{"type":"object","properties":{"text":{"type":"string","description":"The content of the message"},"sender_party":{"type":"string","enum":["mandator","agency"],"description":"The sender party of the message"},"created_at":{"type":"string","format":"date-time","description":"Creation time of the message"}},"required":["text","sender_party","created_at"]},"patchV1MessageThreadsThreadId":{"type":"object","properties":{"flagged":{"type":"boolean","description":"Is the thread flagged"}},"required":["flagged"],"description":"Set message thread parameters"},"postV1MessageThreadsThreadIdMessages":{"type":"object","properties":{"text":{"type":"string","description":"The text to be sent"}},"description":"Add a new message to a thread"},"patchV1ServiceLevelsCustomerBid":{"type":"object","properties":{"service_level":{"type":"string","description":"Service level","enum":["default","premium","vip","service_bypass"]}},"required":["service_level"],"description":"Set service level for customer"}}}