openapi: 3.0.3 info: title: 'Metrotec API Documentation' description: '' version: 1.0.0 servers: - url: 'https://api2.metrotec.ee' tags: - name: Files description: "\nAPIs for managing files" - name: 'Fish Documents' description: "\nAPIs for managing fish transport documents" - name: 'Fish Documents Report' description: "\nAPI for fish documents report" - name: Parties description: "\nAPIs for managing parties" - name: Products description: "\nAPIs for managing route task products" - name: 'Route Tasks' description: "\nAPIs for managing route tasks. Route tasks support different task types based on user profile:\n- **Standard**: Basic task type for general routing\n- **Rudus**: Concrete delivery tasks with volume tracking\n- **Padapigi**: Logistics tasks with CMR generation\n- **Directo**: Delivery tasks with email notifications\n- **Esvika**: Transport tasks with carrier information\n- **Olaret**: Container management tasks\n- **LotusTimber**: Timber transport tasks with customer/carrier tracking" - name: Ships description: "\nAPIs for managing ships" - name: 'Task Groups' description: "\nAPIs for managing route task groups. Task groups organize multiple route tasks\ninto a single delivery run or work session." - name: Users description: "*\n* APIs for managing users" - name: Vehicles description: "*\n* APIs for managing vehicles" components: securitySchemes: default: type: http scheme: bearer description: 'You can retrieve your API key from the API Keys section in the admin panel of Metrotec GPS web application.' security: - default: [] paths: /api/files: get: summary: 'Get all files for a pivot' operationId: getAllFilesForAPivot description: '' parameters: - in: query name: pivot_type description: 'The entity type' example: route_tasks required: true schema: type: string description: 'The entity type' example: route_tasks - in: query name: pivot_id description: 'The entity ID' example: '12345' required: true schema: type: string description: 'The entity ID' example: '12345' responses: 200: description: '' content: application/json: schema: type: array items: type: object properties: id: type: integer example: 1 pivot_id: type: string example: '12345' pivot_type: type: string example: route_tasks defined_name: type: string example: document.pdf mime: type: string example: application/pdf file_type: type: string example: other uploaded_at: type: string example: '2025-11-28T10:00:00.000000Z' url: type: string example: 'https://api.example.com/cli_img/metrotec_12345_abc123.pdf' example: - id: 1 pivot_id: '12345' pivot_type: route_tasks defined_name: document.pdf mime: application/pdf file_type: other uploaded_at: '2025-11-28T10:00:00.000000Z' url: 'https://api.example.com/cli_img/metrotec_12345_abc123.pdf' tags: - Files post: summary: 'Upload a new file' operationId: uploadANewFile description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 pivot_id: '12345' pivot_type: route_tasks defined_name: document.pdf mime: application/pdf file_type: other uploaded_at: '2025-11-28T10:00:00.000000Z' url: 'https://api.example.com/cli_img/metrotec_12345_abc123.pdf' properties: id: type: integer example: 1 pivot_id: type: string example: '12345' pivot_type: type: string example: route_tasks defined_name: type: string example: document.pdf mime: type: string example: application/pdf file_type: type: string example: other uploaded_at: type: string example: '2025-11-28T10:00:00.000000Z' url: type: string example: 'https://api.example.com/cli_img/metrotec_12345_abc123.pdf' tags: - Files requestBody: required: true content: multipart/form-data: schema: type: object properties: file: type: string format: binary description: 'The file to upload. Must be a file.' pivot_type: type: string description: 'Type of entity the file belongs to.' example: route_tasks enum: - accounts - logos - route_tasks - vehicle_faults - feedback_answers - tech_card_works - signatures - fish_documents - fish_document_signatures pivot_id: type: string description: 'ID of the entity the file belongs to. Väli value ei tohi olla pikem kui 255 tähemärki.' example: '12345' max_files: type: integer description: 'Maximum number of files allowed for this entity. Väli value peab olema vähemalt 1.' example: 5 nullable: true hidden: type: boolean description: 'Whether the file should be hidden.' example: false nullable: true file_type: type: string description: 'Type of file (image, cmr, delivery_note, etc.).' example: image enum: - image - cmr - delivery_note - order - other - receiver_signature - sender_signature - carrier_signature - fish_document nullable: true auto_crop: type: boolean description: 'Automatically crop whitespace from images.' example: false nullable: true auto_type: type: string description: 'Convert image to specified format.' example: webp enum: - jpg - gif - png - webp nullable: true required: - file - pivot_type - pivot_id '/api/files/{id}': get: summary: 'Get a specific file' operationId: getASpecificFile description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 pivot_id: '12345' pivot_type: route_tasks defined_name: document.pdf mime: application/pdf file_type: other uploaded_at: '2025-11-28T10:00:00.000000Z' url: 'https://api.example.com/cli_img/metrotec_12345_abc123.pdf' properties: id: type: integer example: 1 pivot_id: type: string example: '12345' pivot_type: type: string example: route_tasks defined_name: type: string example: document.pdf mime: type: string example: application/pdf file_type: type: string example: other uploaded_at: type: string example: '2025-11-28T10:00:00.000000Z' url: type: string example: 'https://api.example.com/cli_img/metrotec_12345_abc123.pdf' tags: - Files put: summary: 'Update a file' operationId: updateAFile description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 pivot_id: '12345' pivot_type: route_tasks defined_name: document.pdf mime: application/pdf file_type: cmr uploaded_at: '2025-11-28T10:00:00.000000Z' url: 'https://api.example.com/cli_img/metrotec_12345_abc123.pdf' properties: id: type: integer example: 1 pivot_id: type: string example: '12345' pivot_type: type: string example: route_tasks defined_name: type: string example: document.pdf mime: type: string example: application/pdf file_type: type: string example: cmr uploaded_at: type: string example: '2025-11-28T10:00:00.000000Z' url: type: string example: 'https://api.example.com/cli_img/metrotec_12345_abc123.pdf' tags: - Files requestBody: required: true content: application/json: schema: type: object properties: file_type: type: string description: 'Type of file (image, cmr, delivery_note, etc.).' example: cmr enum: - image - cmr - delivery_note - order - other - receiver_signature - sender_signature - carrier_signature - fish_document required: - file_type delete: summary: 'Delete a file' operationId: deleteAFile description: '' parameters: [] responses: 204: description: success content: text/plain: schema: type: string example: '' tags: - Files parameters: - in: path name: id description: 'The ID of the file.' example: 1 required: true schema: type: integer - in: path name: file description: 'File ID' example: 1 required: true schema: type: integer '/api/drawing/{file_id}': post: summary: 'Add drawing overlay to an existing image' operationId: addDrawingOverlayToAnExistingImage description: "Takes an existing image file and overlays a PNG drawing on top of it.\nThe original file is replaced with the new combined image." parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 pivot_id: '12345' pivot_type: route_tasks defined_name: photo.png mime: image/png file_type: image uploaded_at: '2025-11-28T10:00:00.000000Z' url: 'https://api.example.com/cli_img/metrotec_12345_abc123.png' properties: id: type: integer example: 1 pivot_id: type: string example: '12345' pivot_type: type: string example: route_tasks defined_name: type: string example: photo.png mime: type: string example: image/png file_type: type: string example: image uploaded_at: type: string example: '2025-11-28T10:00:00.000000Z' url: type: string example: 'https://api.example.com/cli_img/metrotec_12345_abc123.png' tags: - Files requestBody: required: true content: multipart/form-data: schema: type: object properties: file: type: string format: binary description: 'The PNG overlay image with transparency. Must be a file. Väli value peab olema pilt.' required: - file parameters: - in: path name: file_id description: 'The ID of the file.' example: 1 required: true schema: type: integer - in: path name: file description: 'The file ID' example: 1 required: true schema: type: integer /api/signature: post: summary: 'Upload signature for route tasks' operationId: uploadSignatureForRouteTasks description: 'Uploads a signature image and associates it with one or more route tasks.' parameters: [] responses: 201: description: '' content: application/json: schema: type: array items: type: object properties: id: type: integer example: 1 pivot_id: type: string example: '12345' pivot_type: type: string example: signatures defined_name: type: string example: signature.png mime: type: string example: image/png file_type: type: string example: receiver_signature uploaded_at: type: string example: '2025-11-28T10:00:00.000000Z' url: type: string example: 'https://api.example.com/signatures/metrotec_12345_abc123.png' example: - id: 1 pivot_id: '12345' pivot_type: signatures defined_name: signature.png mime: image/png file_type: receiver_signature uploaded_at: '2025-11-28T10:00:00.000000Z' url: 'https://api.example.com/signatures/metrotec_12345_abc123.png' tags: - Files requestBody: required: true content: multipart/form-data: schema: type: object properties: signature: type: string format: binary description: 'The signature image file. Must be a file. Väli value peab olema pilt.' ids: type: array description: '' example: - 16 items: type: integer pivot_type: type: string description: 'Type of pivot for signature storage.' example: signatures enum: - signatures - fish_document_signatures file_type: type: string description: 'Type of signature.' example: receiver_signature enum: - receiver_signature - sender_signature - carrier_signature nullable: true required: - signature - ids /api/fishdocuments: get: summary: 'Get all fish documents' operationId: getAllFishDocuments description: 'Returns documents that are not sent/finished, or sent/finished today.' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object properties: id: type: integer example: 1 document_number: type: string example: FD-2026-001 object_id: type: string example: ABC123 ship_name: type: string example: Aurora receiver_id: type: integer example: 1 receiver: type: object properties: id: type: integer example: 1 company_name: type: string example: 'Fish Processing Ltd' destination_address: type: string example: 'Harbor Street 1, Tallinn' quantity: type: number example: 500.5 status: type: integer example: 0 created_at: type: string example: '2026-01-14T10:00:00.000000Z' updated_at: type: string example: '2026-01-14T10:00:00.000000Z' example: - id: 1 document_number: FD-2026-001 object_id: ABC123 ship_name: Aurora receiver_id: 1 receiver: id: 1 company_name: 'Fish Processing Ltd' destination_address: 'Harbor Street 1, Tallinn' quantity: 500.5 status: 0 created_at: '2026-01-14T10:00:00.000000Z' updated_at: '2026-01-14T10:00:00.000000Z' tags: - 'Fish Documents' post: summary: 'Create a new fish document' operationId: createANewFishDocument description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 document_number: FD-2026-001 object_id: ABC123 ship_name: Aurora status: 0 created_at: '2026-01-14T10:00:00.000000Z' updated_at: '2026-01-14T10:00:00.000000Z' properties: id: type: integer example: 1 document_number: type: string example: FD-2026-001 object_id: type: string example: ABC123 ship_name: type: string example: Aurora status: type: integer example: 0 created_at: type: string example: '2026-01-14T10:00:00.000000Z' updated_at: type: string example: '2026-01-14T10:00:00.000000Z' tags: - 'Fish Documents' requestBody: required: true content: application/json: schema: type: object properties: object_id: type: string description: 'Vehicle/object identifier. Väli value ei tohi olla pikem kui 50 tähemärki.' example: ABC123 trailer_nr: type: string description: 'Trailer number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: TRL-456 ship_id: type: integer description: 'ID of the associated ship. The id of an existing record in the ships table.' example: 1 ship_name: type: string description: 'Name of the ship. Väli value ei tohi olla pikem kui 255 tähemärki.' example: Aurora owner_name: type: string description: 'Name of the ship owner. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'John Smith' board_number: type: string description: 'Ship board number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: EST-1234 license_number: type: string description: 'Fishing license number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: LIC-2026-001 voyage_number: type: string description: 'Voyage number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: VOY-2026-005 receiver_id: type: integer description: 'ID of the receiver party. The id of an existing record in the parties table.' example: 1 receiver_name: type: string description: 'Receiver person name. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Jane Doe' nullable: true destination_address: type: string description: 'Destination address. Väli value ei tohi olla pikem kui 500 tähemärki.' example: 'Harbor Street 1, Tallinn' destination_lat: type: number description: 'Destination latitude.' example: 59.437 nullable: true destination_lon: type: number description: 'Destination longitude.' example: 24.753 nullable: true products: type: array description: 'Array of products with quantities. Väljal value peab olema vähemalt 1 elementi.' example: - product_id: 1 quantity: 500 fishing_area: IIId items: type: object properties: id: type: integer description: 'ID of the existing fish document product record (for updates).' example: 1 nullable: true product_id: type: integer description: 'ID of the fish product type. The id of an existing record in the products table.' example: 1 quantity: type: integer description: 'Quantity of fish in kg. Väli value peab olema vähemalt 0.' example: 500 fishing_area: type: string description: 'Fishing area code or name. Väli value ei tohi olla pikem kui 255 tähemärki.' example: IIId nullable: true size_category: type: string description: 'Size category. Väli value ei tohi olla pikem kui 255 tähemärki.' example: Large nullable: true freshness_category: type: string description: 'Freshness category. Väli value ei tohi olla pikem kui 255 tähemärki.' example: A nullable: true purpose: type: string description: 'Purpose of the product. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Human consumption' nullable: true count_number: type: string description: 'Count number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: '100' nullable: true required: - product_id - quantity category: type: string description: 'Fish category. Väli value ei tohi olla pikem kui 255 tähemärki.' example: A nullable: true captain_name: type: string description: 'Name of the captain. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Captain Jack' carrier_id: type: integer description: 'ID of the carrier party. The id of an existing record in the parties table.' example: 1 unloading_at: type: string description: 'Unloading date and time. Väli value peab olema kehtiv kuupäev.' example: '2026-01-15 10:00:00' nullable: true unloading_location: type: string description: 'Unloading location. Väli value ei tohi olla pikem kui 500 tähemärki.' example: 'Dock B' nullable: true status: type: integer description: 'Document status (0=new, 1=in progress, 2=completed). Väli value peab olema vähemalt 0. Väli value ei tohi olla suurem kui 255.' example: 0 nullable: true required: - object_id - trailer_nr - ship_id - ship_name - owner_name - board_number - license_number - voyage_number - receiver_id - destination_address - products - captain_name - carrier_id '/api/fishdocuments/{id}': get: summary: 'Get a specific fish document' operationId: getASpecificFishDocument description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 document_number: FD-2026-001 object_id: ABC123 trailer_nr: TRL-456 ship_id: 1 ship_name: Aurora owner_name: 'John Smith' board_number: EST-1234 license_number: LIC-2026-001 voyage_number: VOY-2026-005 receiver_id: 1 receiver: id: 1 company_name: 'Fish Processing Ltd' receiver_name: 'Jane Doe' destination_address: 'Harbor Street 1, Tallinn' destination_lat: 59.437 destination_lon: 24.753 product_id: 1 quantity: 500.5 fishing_area: IIId containers: 10 category: A captain_name: 'Captain Jack' carrier_name: 'Transport Co' unloading_at: '2026-01-15T10:00:00.000000Z' unloading_location: 'Dock B' status: 0 captain_signed: false carrier_signed: false receiver_signed: false created_at: '2026-01-14T10:00:00.000000Z' updated_at: '2026-01-14T10:00:00.000000Z' properties: id: type: integer example: 1 document_number: type: string example: FD-2026-001 object_id: type: string example: ABC123 trailer_nr: type: string example: TRL-456 ship_id: type: integer example: 1 ship_name: type: string example: Aurora owner_name: type: string example: 'John Smith' board_number: type: string example: EST-1234 license_number: type: string example: LIC-2026-001 voyage_number: type: string example: VOY-2026-005 receiver_id: type: integer example: 1 receiver: type: object properties: id: type: integer example: 1 company_name: type: string example: 'Fish Processing Ltd' receiver_name: type: string example: 'Jane Doe' destination_address: type: string example: 'Harbor Street 1, Tallinn' destination_lat: type: number example: 59.437 destination_lon: type: number example: 24.753 product_id: type: integer example: 1 quantity: type: number example: 500.5 fishing_area: type: string example: IIId containers: type: integer example: 10 category: type: string example: A captain_name: type: string example: 'Captain Jack' carrier_name: type: string example: 'Transport Co' unloading_at: type: string example: '2026-01-15T10:00:00.000000Z' unloading_location: type: string example: 'Dock B' status: type: integer example: 0 captain_signed: type: boolean example: false carrier_signed: type: boolean example: false receiver_signed: type: boolean example: false created_at: type: string example: '2026-01-14T10:00:00.000000Z' updated_at: type: string example: '2026-01-14T10:00:00.000000Z' tags: - 'Fish Documents' put: summary: 'Update a fish document' operationId: updateAFishDocument description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 document_number: FD-2026-001 object_id: ABC123 ship_name: 'Aurora Updated' status: 1 created_at: '2026-01-14T10:00:00.000000Z' updated_at: '2026-01-14T11:00:00.000000Z' properties: id: type: integer example: 1 document_number: type: string example: FD-2026-001 object_id: type: string example: ABC123 ship_name: type: string example: 'Aurora Updated' status: type: integer example: 1 created_at: type: string example: '2026-01-14T10:00:00.000000Z' updated_at: type: string example: '2026-01-14T11:00:00.000000Z' tags: - 'Fish Documents' requestBody: required: true content: application/json: schema: type: object properties: object_id: type: string description: 'Vehicle/object identifier. Väli value ei tohi olla pikem kui 50 tähemärki.' example: ABC123 trailer_nr: type: string description: 'Trailer number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: TRL-456 ship_id: type: integer description: 'ID of the associated ship. The id of an existing record in the ships table.' example: 1 ship_name: type: string description: 'Name of the ship. Väli value ei tohi olla pikem kui 255 tähemärki.' example: Aurora owner_name: type: string description: 'Name of the ship owner. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'John Smith' board_number: type: string description: 'Ship board number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: EST-1234 license_number: type: string description: 'Fishing license number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: LIC-2026-001 voyage_number: type: string description: 'Voyage number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: VOY-2026-005 receiver_id: type: integer description: 'ID of the receiver party. The id of an existing record in the parties table.' example: 1 receiver_name: type: string description: 'Receiver person name. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Jane Doe' nullable: true destination_address: type: string description: 'Destination address. Väli value ei tohi olla pikem kui 500 tähemärki.' example: 'Harbor Street 1, Tallinn' destination_lat: type: number description: 'Destination latitude.' example: 59.437 nullable: true destination_lon: type: number description: 'Destination longitude.' example: 24.753 nullable: true products: type: array description: 'Array of products with quantities. Väljal value peab olema vähemalt 1 elementi.' example: - product_id: 1 quantity: 500 fishing_area: IIId items: type: object properties: id: type: integer description: 'ID of the existing fish document product record (for updates).' example: 1 nullable: true product_id: type: integer description: 'ID of the fish product type. The id of an existing record in the products table.' example: 1 quantity: type: integer description: 'Quantity of fish in kg. Väli value peab olema vähemalt 0.' example: 500 fishing_area: type: string description: 'Fishing area code or name. Väli value ei tohi olla pikem kui 255 tähemärki.' example: IIId nullable: true size_category: type: string description: 'Size category. Väli value ei tohi olla pikem kui 255 tähemärki.' example: Large nullable: true freshness_category: type: string description: 'Freshness category. Väli value ei tohi olla pikem kui 255 tähemärki.' example: A nullable: true purpose: type: string description: 'Purpose of the product. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Human consumption' nullable: true count_number: type: string description: 'Count number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: '100' nullable: true required: - product_id - quantity category: type: string description: 'Fish category. Väli value ei tohi olla pikem kui 255 tähemärki.' example: A nullable: true captain_name: type: string description: 'Name of the captain. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Captain Jack' carrier_id: type: integer description: 'ID of the carrier party. The id of an existing record in the parties table.' example: 1 unloading_at: type: string description: 'Unloading date and time. Väli value peab olema kehtiv kuupäev.' example: '2026-01-15 10:00:00' nullable: true unloading_location: type: string description: 'Unloading location.' example: 'Dock B' status: type: integer description: 'Document status (0=new, 1=in progress, 2=completed). Väli value peab olema vähemalt 0. Väli value ei tohi olla suurem kui 255.' example: 0 nullable: true required: - object_id - trailer_nr - ship_id - ship_name - owner_name - board_number - license_number - voyage_number - receiver_id - destination_address - products - captain_name - carrier_id parameters: - in: path name: id description: 'The ID of the fishdocument.' example: 16 required: true schema: type: integer - in: path name: fishDocument description: 'Fish Document ID' example: 1 required: true schema: type: integer /api/fishdocuments/report: get: summary: 'Get fish documents report' operationId: getFishDocumentsReport description: 'Returns fish documents filtered by date range and other criteria.' parameters: - in: query name: filter.start_time description: '' example: [] required: false schema: type: object description: '' example: [] properties: { } - in: query name: filter description: '' example: [] required: false schema: type: object description: '' example: [] properties: { } - in: query name: filter.start_time.0 description: 'Start date (must be before or equal to end date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev enne või võrdne kuupäevaga filter.start_time.1.' example: '2026-01-01' required: true schema: type: string description: 'Start date (must be before or equal to end date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev enne või võrdne kuupäevaga filter.start_time.1.' example: '2026-01-01' - in: query name: filter.start_time.1 description: 'End date (must be after or equal to start date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev pärast või võrdne kuupäevaga filter.start_time.0.' example: '2026-01-31' required: true schema: type: string description: 'End date (must be after or equal to start date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev pärast või võrdne kuupäevaga filter.start_time.0.' example: '2026-01-31' - in: query name: filter.status description: 'Filter by status (0=New, 1=InWorks, 2=Sent, 3=Finished).' example: 1 required: false schema: type: integer description: 'Filter by status (0=New, 1=InWorks, 2=Sent, 3=Finished).' example: 1 nullable: true - in: query name: filter.ship_id description: 'Filter by ship ID.' example: 1 required: false schema: type: integer description: 'Filter by ship ID.' example: 1 nullable: true - in: query name: filter.object_id description: 'Filter by vehicle/object ID. Väli value ei tohi olla pikem kui 255 tähemärki.' example: ABC123 required: false schema: type: string description: 'Filter by vehicle/object ID. Väli value ei tohi olla pikem kui 255 tähemärki.' example: ABC123 nullable: true - in: query name: filter.carrier_id description: 'Filter by carrier ID.' example: 1 required: false schema: type: integer description: 'Filter by carrier ID.' example: 1 nullable: true - in: query name: 'filter[start_time]' description: 'Date range [from, to] in YYYY-MM-DD format' example: - '2026-01-01' - '2026-01-31' required: true schema: type: array description: 'Date range [from, to] in YYYY-MM-DD format' example: - '2026-01-01' - '2026-01-31' items: type: string - in: query name: 'filter[status]' description: 'Filter by status' example: 1 required: false schema: type: integer description: 'Filter by status' example: 1 - in: query name: 'filter[ship_id]' description: 'Filter by ship ID' example: 1 required: false schema: type: integer description: 'Filter by ship ID' example: 1 - in: query name: 'filter[object_id]' description: 'Filter by vehicle/object ID' example: ABC123 required: false schema: type: string description: 'Filter by vehicle/object ID' example: ABC123 - in: query name: 'filter[carrier_id]' description: 'Filter by carrier ID' example: 1 required: false schema: type: integer description: 'Filter by carrier ID' example: 1 responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Fish Documents Report' /xls/fishdocuments: get: summary: 'Export fish documents report to Excel' operationId: exportFishDocumentsReportToExcel description: '' parameters: - in: query name: filter.start_time description: '' example: [] required: false schema: type: object description: '' example: [] properties: { } - in: query name: filter description: '' example: [] required: false schema: type: object description: '' example: [] properties: { } - in: query name: filter.start_time.0 description: 'Start date (must be before or equal to end date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev enne või võrdne kuupäevaga filter.start_time.1.' example: '2026-01-01' required: true schema: type: string description: 'Start date (must be before or equal to end date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev enne või võrdne kuupäevaga filter.start_time.1.' example: '2026-01-01' - in: query name: filter.start_time.1 description: 'End date (must be after or equal to start date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev pärast või võrdne kuupäevaga filter.start_time.0.' example: '2026-01-31' required: true schema: type: string description: 'End date (must be after or equal to start date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev pärast või võrdne kuupäevaga filter.start_time.0.' example: '2026-01-31' - in: query name: filter.status description: 'Filter by status (0=New, 1=InWorks, 2=Sent, 3=Finished).' example: 1 required: false schema: type: integer description: 'Filter by status (0=New, 1=InWorks, 2=Sent, 3=Finished).' example: 1 nullable: true - in: query name: filter.ship_id description: 'Filter by ship ID.' example: 1 required: false schema: type: integer description: 'Filter by ship ID.' example: 1 nullable: true - in: query name: filter.object_id description: 'Filter by vehicle/object ID. Väli value ei tohi olla pikem kui 255 tähemärki.' example: ABC123 required: false schema: type: string description: 'Filter by vehicle/object ID. Väli value ei tohi olla pikem kui 255 tähemärki.' example: ABC123 nullable: true - in: query name: filter.carrier_id description: 'Filter by carrier ID.' example: 1 required: false schema: type: integer description: 'Filter by carrier ID.' example: 1 nullable: true responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Fish Documents Report' /pdf/fishdocuments: get: summary: 'Export fish documents report to PDF' operationId: exportFishDocumentsReportToPDF description: 'Combines all fish document PDFs into a single file.' parameters: - in: query name: filter.start_time description: '' example: [] required: false schema: type: object description: '' example: [] properties: { } - in: query name: filter description: '' example: [] required: false schema: type: object description: '' example: [] properties: { } - in: query name: filter.start_time.0 description: 'Start date (must be before or equal to end date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev enne või võrdne kuupäevaga filter.start_time.1.' example: '2026-01-01' required: true schema: type: string description: 'Start date (must be before or equal to end date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev enne või võrdne kuupäevaga filter.start_time.1.' example: '2026-01-01' - in: query name: filter.start_time.1 description: 'End date (must be after or equal to start date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev pärast või võrdne kuupäevaga filter.start_time.0.' example: '2026-01-31' required: true schema: type: string description: 'End date (must be after or equal to start date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev pärast või võrdne kuupäevaga filter.start_time.0.' example: '2026-01-31' - in: query name: filter.status description: 'Filter by status (0=New, 1=InWorks, 2=Sent, 3=Finished).' example: 1 required: false schema: type: integer description: 'Filter by status (0=New, 1=InWorks, 2=Sent, 3=Finished).' example: 1 nullable: true - in: query name: filter.ship_id description: 'Filter by ship ID.' example: 1 required: false schema: type: integer description: 'Filter by ship ID.' example: 1 nullable: true - in: query name: filter.object_id description: 'Filter by vehicle/object ID. Väli value ei tohi olla pikem kui 255 tähemärki.' example: ABC123 required: false schema: type: string description: 'Filter by vehicle/object ID. Väli value ei tohi olla pikem kui 255 tähemärki.' example: ABC123 nullable: true - in: query name: filter.carrier_id description: 'Filter by carrier ID.' example: 1 required: false schema: type: integer description: 'Filter by carrier ID.' example: 1 nullable: true responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - 'Fish Documents Report' /api/parties: get: summary: 'Get all parties' operationId: getAllParties description: '' parameters: - in: query name: 'filter[archived]' description: 'Show all parties including inactive' example: true required: false schema: type: boolean description: 'Show all parties including inactive' example: true - in: query name: 'filter[role]' description: 'Filter by role ID (searches in JSON array)' example: 1 required: false schema: type: integer description: 'Filter by role ID (searches in JSON array)' example: 1 responses: 200: description: '' content: application/json: schema: type: array items: type: object properties: id: type: integer example: 1 oid: type: string example: metrotec role: type: array example: - 1 - 2 items: type: integer lang: type: string example: est company_name: type: string example: 'Example Company' company_no: type: string example: '12345678' company_vat_no: type: string example: EE123456789 company_country_code: type: string example: '+372' company_phone_nr: type: string example: '5555 5555' company_email: type: string example: info@example.com company_address: type: string example: 'Example Street 1, Tallinn' contact_name: type: string example: 'John Doe' contact_country_code: type: string example: '+372' contact_phone_nr: type: string example: '5555 5556' contact_email: type: string example: john@example.com active: type: boolean example: true default: type: boolean example: false created_at: type: string example: '2025-01-01T00:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' example: - id: 1 oid: metrotec role: - 1 - 2 lang: est company_name: 'Example Company' company_no: '12345678' company_vat_no: EE123456789 company_country_code: '+372' company_phone_nr: '5555 5555' company_email: info@example.com company_address: 'Example Street 1, Tallinn' contact_name: 'John Doe' contact_country_code: '+372' contact_phone_nr: '5555 5556' contact_email: john@example.com active: true default: false created_at: '2025-01-01T00:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' tags: - Parties post: summary: 'Create a new party' operationId: createANewParty description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 oid: metrotec role: - 1 - 2 def_lang: est company_name: 'Example Company' company_no: '12345678' company_vat_no: EE123456789 company_country_code: '+372' company_phone_nr: '5555 5555' company_email: info@example.com company_address: 'Example Street 1, Tallinn' contact_name: 'John Doe' contact_country_code: '+372' contact_phone_nr: '5555 5556' contact_email: john@example.com active: true default: false created_at: '2025-11-28T10:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' properties: id: type: integer example: 1 oid: type: string example: metrotec role: type: array example: - 1 - 2 items: type: integer def_lang: type: string example: est company_name: type: string example: 'Example Company' company_no: type: string example: '12345678' company_vat_no: type: string example: EE123456789 company_country_code: type: string example: '+372' company_phone_nr: type: string example: '5555 5555' company_email: type: string example: info@example.com company_address: type: string example: 'Example Street 1, Tallinn' contact_name: type: string example: 'John Doe' contact_country_code: type: string example: '+372' contact_phone_nr: type: string example: '5555 5556' contact_email: type: string example: john@example.com active: type: boolean example: true default: type: boolean example: false created_at: type: string example: '2025-11-28T10:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' tags: - Parties requestBody: required: true content: application/json: schema: type: object properties: company_name: type: string description: 'Company name. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Example Company' role: type: array description: 'Role IDs (1 = Customer, 2 = Sender, 3 = Carrier).' example: - 1 items: type: integer enum: - 1 - 2 - 3 lang: type: string description: 'Default language for communications (est, rus, eng, swe, lat).' example: est enum: - est - rus - eng - swe - lat company_no: type: string description: 'Company registration number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: '12345678' company_vat_no: type: string description: 'VAT number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: EE123456789 nullable: true company_country_code: type: string description: 'Company phone country code. Väli value ei tohi olla pikem kui 10 tähemärki.' example: '+372' nullable: true company_phone_nr: type: string description: 'Company phone number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: '5555 5555' nullable: true company_email: type: string description: 'Company email address. Väli value peab olema kehtiv e-posti aadress. Väli value ei tohi olla pikem kui 255 tähemärki.' example: info@example.com nullable: true company_address: type: string description: 'Company legal address. Väli value ei tohi olla pikem kui 500 tähemärki.' example: 'Example Street 1, Tallinn' nullable: true contact_name: type: string description: 'Contact person name. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'John Doe' nullable: true contact_country_code: type: string description: 'Contact person phone country code. Väli value ei tohi olla pikem kui 10 tähemärki.' example: '+372' nullable: true contact_phone_nr: type: string description: 'Contact person phone number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: '5555 5556' nullable: true contact_email: type: string description: 'Contact person email. Väli value peab olema kehtiv e-posti aadress. Väli value ei tohi olla pikem kui 255 tähemärki.' example: john@example.com nullable: true active: type: boolean description: 'Whether the party is active.' example: false nullable: true default: type: boolean description: 'Whether this is the default party for the role (only one per role per organization).' example: false nullable: true required: - company_name - role - lang - company_no '/api/parties/{id}': get: summary: 'Get a specific party' operationId: getASpecificParty description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 oid: metrotec role: - 1 - 2 def_lang: est company_name: 'Example Company' company_no: '12345678' company_vat_no: EE123456789 company_country_code: '+372' company_phone_nr: '5555 5555' company_email: info@example.com company_address: 'Example Street 1, Tallinn' contact_name: 'John Doe' contact_country_code: '+372' contact_phone_nr: '5555 5556' contact_email: john@example.com active: true default: false created_at: '2025-01-01T00:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' properties: id: type: integer example: 1 oid: type: string example: metrotec role: type: array example: - 1 - 2 items: type: integer def_lang: type: string example: est company_name: type: string example: 'Example Company' company_no: type: string example: '12345678' company_vat_no: type: string example: EE123456789 company_country_code: type: string example: '+372' company_phone_nr: type: string example: '5555 5555' company_email: type: string example: info@example.com company_address: type: string example: 'Example Street 1, Tallinn' contact_name: type: string example: 'John Doe' contact_country_code: type: string example: '+372' contact_phone_nr: type: string example: '5555 5556' contact_email: type: string example: john@example.com active: type: boolean example: true default: type: boolean example: false created_at: type: string example: '2025-01-01T00:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' tags: - Parties put: summary: 'Update a party' operationId: updateAParty description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 oid: metrotec role: - 1 - 2 def_lang: est company_name: 'Updated Company' company_no: '12345678' company_vat_no: EE123456789 company_country_code: '+372' company_phone_nr: '5555 5555' company_email: info@example.com company_address: 'Example Street 1, Tallinn' contact_name: 'John Doe' contact_country_code: '+372' contact_phone_nr: '5555 5556' contact_email: john@example.com active: true default: false created_at: '2025-01-01T00:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' properties: id: type: integer example: 1 oid: type: string example: metrotec role: type: array example: - 1 - 2 items: type: integer def_lang: type: string example: est company_name: type: string example: 'Updated Company' company_no: type: string example: '12345678' company_vat_no: type: string example: EE123456789 company_country_code: type: string example: '+372' company_phone_nr: type: string example: '5555 5555' company_email: type: string example: info@example.com company_address: type: string example: 'Example Street 1, Tallinn' contact_name: type: string example: 'John Doe' contact_country_code: type: string example: '+372' contact_phone_nr: type: string example: '5555 5556' contact_email: type: string example: john@example.com active: type: boolean example: true default: type: boolean example: false created_at: type: string example: '2025-01-01T00:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' tags: - Parties requestBody: required: true content: application/json: schema: type: object properties: company_name: type: string description: 'Company name. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Example Company' role: type: array description: 'Role IDs (1 = Customer, 2 = Sender, 3 = Carrier).' example: - 1 items: type: integer enum: - 1 - 2 - 3 lang: type: string description: 'Default language for communications (est, rus, eng, swe, lat).' example: est enum: - est - rus - eng - swe - lat company_no: type: string description: 'Company registration number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: '12345678' company_vat_no: type: string description: 'VAT number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: EE123456789 nullable: true company_country_code: type: string description: 'Company phone country code. Väli value ei tohi olla pikem kui 10 tähemärki.' example: '+372' nullable: true company_phone_nr: type: string description: 'Company phone number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: '5555 5555' nullable: true company_email: type: string description: 'Company email address. Väli value peab olema kehtiv e-posti aadress. Väli value ei tohi olla pikem kui 255 tähemärki.' example: info@example.com nullable: true company_address: type: string description: 'Company legal address. Väli value ei tohi olla pikem kui 500 tähemärki.' example: 'Example Street 1, Tallinn' nullable: true contact_name: type: string description: 'Contact person name. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'John Doe' nullable: true contact_country_code: type: string description: 'Contact person phone country code. Väli value ei tohi olla pikem kui 10 tähemärki.' example: '+372' nullable: true contact_phone_nr: type: string description: 'Contact person phone number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: '5555 5556' nullable: true contact_email: type: string description: 'Contact person email. Väli value peab olema kehtiv e-posti aadress. Väli value ei tohi olla pikem kui 255 tähemärki.' example: john@example.com nullable: true active: type: boolean description: 'Whether the party is active.' example: false nullable: true default: type: boolean description: 'Whether this is the default party for the role (only one per role per organization).' example: false nullable: true required: - company_name - role - lang - company_no delete: summary: 'Delete a party' operationId: deleteAParty description: '' parameters: [] responses: 204: description: success content: text/plain: schema: type: string example: '' tags: - Parties parameters: - in: path name: id description: 'The ID of the party.' example: 1 required: true schema: type: integer - in: path name: party description: 'Party ID' example: 1 required: true schema: type: integer /api/products: get: summary: 'Get all products' operationId: getAllProducts description: '' parameters: - in: query name: archived description: 'Show all products including inactive' example: true required: false schema: type: boolean description: 'Show all products including inactive' example: true - in: query name: show_type description: 'Filter by show type (1 = RouteTask, 2 = FishDocument)' example: 1 required: false schema: type: integer description: 'Filter by show type (1 = RouteTask, 2 = FishDocument)' example: 1 responses: 200: description: '' content: application/json: schema: type: array items: type: object properties: id: type: integer example: 1 oid: type: string example: metrotec value: type: string example: PROD001 text: type: string example: 'Product Name' external_id: type: string example: EXT123 active: type: boolean example: true default: type: boolean example: false show_type: type: integer example: 1 created_at: type: string example: '2025-01-01T00:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' example: - id: 1 oid: metrotec value: PROD001 text: 'Product Name' external_id: EXT123 active: true default: false show_type: 1 created_at: '2025-01-01T00:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' tags: - Products post: summary: 'Create a new product' operationId: createANewProduct description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 oid: metrotec value: PROD001 text: 'Product Name' external_id: EXT123 active: true default: false created_at: '2025-11-28T10:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' properties: id: type: integer example: 1 oid: type: string example: metrotec value: type: string example: PROD001 text: type: string example: 'Product Name' external_id: type: string example: EXT123 active: type: boolean example: true default: type: boolean example: false created_at: type: string example: '2025-11-28T10:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' tags: - Products requestBody: required: true content: application/json: schema: type: object properties: value: type: string description: 'Product code. Väli value ei tohi olla pikem kui 10 tähemärki.' example: PROD001 text: type: string description: 'Product name. Väli value ei tohi olla pikem kui 150 tähemärki.' example: 'Product Name' external_id: type: string description: 'External system identifier. Väli value ei tohi olla pikem kui 30 tähemärki.' example: EXT123 nullable: true comment: type: string description: 'Product comment. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Additional product information' nullable: true active: type: boolean description: 'Whether the product is active.' example: false nullable: true default: type: boolean description: 'Whether this is the default product (only one per organization).' example: false nullable: true show_type: type: integer description: 'Where the product should be shown (1 = RouteTask, 2 = FishDocument).' example: 1 enum: - 1 - 2 nullable: true required: - value - text '/api/products/{id}': get: summary: 'Get a specific product' operationId: getASpecificProduct description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 oid: metrotec value: PROD001 text: 'Product Name' external_id: EXT123 active: true default: false created_at: '2025-01-01T00:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' properties: id: type: integer example: 1 oid: type: string example: metrotec value: type: string example: PROD001 text: type: string example: 'Product Name' external_id: type: string example: EXT123 active: type: boolean example: true default: type: boolean example: false created_at: type: string example: '2025-01-01T00:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' tags: - Products put: summary: 'Update a product' operationId: updateAProduct description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 oid: metrotec value: PROD001 text: 'Updated Product Name' external_id: EXT123 active: true default: false created_at: '2025-01-01T00:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' properties: id: type: integer example: 1 oid: type: string example: metrotec value: type: string example: PROD001 text: type: string example: 'Updated Product Name' external_id: type: string example: EXT123 active: type: boolean example: true default: type: boolean example: false created_at: type: string example: '2025-01-01T00:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' tags: - Products requestBody: required: true content: application/json: schema: type: object properties: value: type: string description: 'Product code. Väli value ei tohi olla pikem kui 10 tähemärki.' example: PROD001 text: type: string description: 'Product name. Väli value ei tohi olla pikem kui 150 tähemärki.' example: 'Product Name' external_id: type: string description: 'External system identifier. Väli value ei tohi olla pikem kui 30 tähemärki.' example: EXT123 nullable: true comment: type: string description: 'Product comment. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Additional product information' nullable: true active: type: boolean description: 'Whether the product is active.' example: false nullable: true default: type: boolean description: 'Whether this is the default product (only one per organization).' example: false nullable: true show_type: type: integer description: 'Where the product should be shown (1 = RouteTask, 2 = FishDocument).' example: 1 enum: - 1 - 2 nullable: true required: - value - text delete: summary: 'Delete a product' operationId: deleteAProduct description: '' parameters: [] responses: 204: description: success content: text/plain: schema: type: string example: '' tags: - Products parameters: - in: path name: id description: 'The ID of the product.' example: 1 required: true schema: type: integer - in: path name: product description: 'Product ID' example: 1 required: true schema: type: integer /api/tasks: get: summary: 'Get all tasks' operationId: getAllTasks description: 'Returns a list of route tasks for the authenticated user. By default, only active tasks are returned.' parameters: - in: query name: all description: 'Show all tasks including completed ones.' example: false required: false schema: type: boolean description: 'Show all tasks including completed ones.' example: false - in: query name: offset description: 'Pagination offset.' example: 0 required: false schema: type: integer description: 'Pagination offset.' example: 0 - in: query name: limit description: 'Number of records to return.' example: 30 required: false schema: type: integer description: 'Number of records to return.' example: 30 - in: query name: files description: 'Include files with tasks.' example: false required: false schema: type: boolean description: 'Include files with tasks.' example: false responses: 200: description: '' content: application/json: schema: oneOf: - description: 'Standard Task' type: array items: type: object properties: id: type: integer example: 12346 oid: type: string example: metrotec object_id: type: string example: ABC123 lat: type: number example: 59.437 lon: type: number example: 24.754 start_lat: type: string example: null start_lon: type: string example: null start_address: type: string example: null start_time: type: string example: '2025-01-20 08:00:00' stop_time: type: string example: '2025-01-20 17:00:00' order_ref: type: string example: ORDER-2025-001 order_details: type: string example: null task_address: type: string example: 'Tallinn, Estonia' task_description: type: string example: 'Standard delivery task' cancel_reason: type: string example: null status: type: integer example: 1 created_at: type: string example: '2025-01-19 16:00:00' updated_at: type: string example: '2025-01-19 16:00:00' work_started_at: type: string example: null work_finished_at: type: string example: null sender: type: string example: DispatchSystem tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: null active: type: boolean example: true group_id: type: string example: null is_not_own_vehicle: type: boolean example: false products: type: array example: [] example: - id: 12346 oid: metrotec object_id: ABC123 lat: 59.437 lon: 24.754 start_lat: null start_lon: null start_address: null start_time: '2025-01-20 08:00:00' stop_time: '2025-01-20 17:00:00' order_ref: ORDER-2025-001 order_details: null task_address: 'Tallinn, Estonia' task_description: 'Standard delivery task' cancel_reason: null status: 1 created_at: '2025-01-19 16:00:00' updated_at: '2025-01-19 16:00:00' work_started_at: null work_finished_at: null sender: DispatchSystem tracking_nr: abc123xyz789def456 task_notes: null active: true group_id: null is_not_own_vehicle: false products: [] - description: 'Rudus Task' type: array items: type: object properties: id: type: integer example: 12345 oid: type: string example: metrotec object_id: type: string example: RUDUS-01 lat: type: number example: 59.437 lon: type: number example: 24.754 start_lat: type: number example: 59.395 start_lon: type: number example: 24.662 start_address: type: string example: 'Factory, Tallinn' start_time: type: string example: '2025-01-20 08:00:00' stop_time: type: string example: '2025-01-20 12:00:00' order_ref: type: string example: RUDUS-2025-001 order_details: type: string example: 'Client: Construction Site A' task_address: type: string example: 'Construction Site A, Tallinn' task_description: type: string example: 'Concrete delivery C30/37' cancel_reason: type: string example: null status: type: integer example: 2 created_at: type: string example: '2025-01-19 15:30:00' updated_at: type: string example: '2025-01-20 08:15:00' work_started_at: type: string example: '2025-01-20 08:05:00' work_finished_at: type: string example: '2025-01-20 11:45:00' sender: type: string example: RudusAPI tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: 'Special delivery' active: type: boolean example: true group_id: type: integer example: 10 is_not_own_vehicle: type: boolean example: false preparation_time: type: string example: '2025-01-20 07:30:00' volume: type: number example: 8.5 client_id: type: string example: CLIENT123 ordered_volume: type: number example: 10.0 delivered_volume: type: number example: 8.2 pumped_volume: type: number example: 8.0 dn_trash: type: string example: '0.5' dn_plastic: type: string example: '1.2' dn_water: type: string example: '10.5' categoryID: type: integer example: 15 client_emails: type: array example: - client@example.com - manager@example.com items: type: string last_cargo: type: integer example: 0 geozone_entered_at: type: string example: '2025-01-20 11:20:00' arrived_at: type: string example: '2025-01-20 11:15:00' geozone_left_at: type: string example: '2025-01-20 11:50:00' concrete_type: type: string example: C30/37 concrete_strength_class: type: string example: C30 environmental_class: type: string example: XC3 dmax: type: string example: '16' consistency_class: type: string example: S3 cement_type: type: string example: 'CEM II/A-LL 42,5N' additives: type: string example: Superplasticizer concrete_extra_info: type: string example: 'High durability' concrete_extra_info2: type: string example: 'Special finish required' unload_method: type: string example: Pump driving_instructions: type: string example: 'Use back entrance' offer_number: type: string example: OFF-2025-123 work_order_number: type: string example: WO-2025-456 notes: type: string example: 'Handle with care' operator_name: type: string example: 'John Smith' pumper_name: type: string example: 'ABC Pumping Ltd' pump_type: type: string example: Stationary factory_id: type: integer example: 5 client_address: type: string example: '123 Construction Ave' other_object_id: type: string example: PUMP-01 products: type: array example: [] example: - id: 12345 oid: metrotec object_id: RUDUS-01 lat: 59.437 lon: 24.754 start_lat: 59.395 start_lon: 24.662 start_address: 'Factory, Tallinn' start_time: '2025-01-20 08:00:00' stop_time: '2025-01-20 12:00:00' order_ref: RUDUS-2025-001 order_details: 'Client: Construction Site A' task_address: 'Construction Site A, Tallinn' task_description: 'Concrete delivery C30/37' cancel_reason: null status: 2 created_at: '2025-01-19 15:30:00' updated_at: '2025-01-20 08:15:00' work_started_at: '2025-01-20 08:05:00' work_finished_at: '2025-01-20 11:45:00' sender: RudusAPI tracking_nr: abc123xyz789def456 task_notes: 'Special delivery' active: true group_id: 10 is_not_own_vehicle: false preparation_time: '2025-01-20 07:30:00' volume: 8.5 client_id: CLIENT123 ordered_volume: 10.0 delivered_volume: 8.2 pumped_volume: 8.0 dn_trash: '0.5' dn_plastic: '1.2' dn_water: '10.5' categoryID: 15 client_emails: - client@example.com - manager@example.com last_cargo: 0 geozone_entered_at: '2025-01-20 11:20:00' arrived_at: '2025-01-20 11:15:00' geozone_left_at: '2025-01-20 11:50:00' concrete_type: C30/37 concrete_strength_class: C30 environmental_class: XC3 dmax: '16' consistency_class: S3 cement_type: 'CEM II/A-LL 42,5N' additives: Superplasticizer concrete_extra_info: 'High durability' concrete_extra_info2: 'Special finish required' unload_method: Pump driving_instructions: 'Use back entrance' offer_number: OFF-2025-123 work_order_number: WO-2025-456 notes: 'Handle with care' operator_name: 'John Smith' pumper_name: 'ABC Pumping Ltd' pump_type: Stationary factory_id: 5 client_address: '123 Construction Ave' other_object_id: PUMP-01 products: [] - description: 'Padapigi Task' type: array items: type: object properties: id: type: integer example: 12347 oid: type: string example: metrotec object_id: type: string example: TRUCK-05 lat: type: number example: 59.437 lon: type: number example: 24.754 start_lat: type: number example: 59.395 start_lon: type: number example: 24.662 start_address: type: string example: 'Warehouse A, Tallinn' start_time: type: string example: '2025-01-20 06:00:00' stop_time: type: string example: '2025-01-20 18:00:00' order_ref: type: string example: PAD-2025-100 order_details: type: string example: 'CMR delivery to Latvia' task_address: type: string example: 'Warehouse District, Tallinn' task_description: type: string example: 'International delivery to Latvia' cancel_reason: type: string example: null status: type: integer example: 2 created_at: type: string example: '2025-01-19 14:00:00' updated_at: type: string example: '2025-01-20 06:30:00' work_started_at: type: string example: '2025-01-20 06:15:00' work_finished_at: type: string example: null sender: type: string example: PadapigiAPI tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: 'CMR documents prepared' active: type: boolean example: true group_id: type: integer example: 15 is_not_own_vehicle: type: boolean example: false contact_name: type: string example: 'John Doe' contact_email: type: string example: john.doe@example.com contact_sender: type: string example: SENDER123 contact_receiver: type: string example: 'ABC Logistics Ltd' contact_trailer: type: string example: TRL456 contact_order: type: string example: ORD-PAD-100 contact_delivery_term: type: string example: DAP contact_language: type: string example: en delivery_name: type: string example: 'ABC Logistics Ltd' delivery_address1: type: string example: 'Industrial Street 15' delivery_address2: type: string example: 'Riga, LV-1234' delivery_address3: type: string example: Latvia start_address1: type: string example: 'Warehouse A' start_address2: type: string example: 'Tallinn Port' start_address3: type: string example: Estonia weight: type: integer example: 15000 amount: type: integer example: 24 hash: type: string example: abc123def456 products: type: array example: [] example: - id: 12347 oid: metrotec object_id: TRUCK-05 lat: 59.437 lon: 24.754 start_lat: 59.395 start_lon: 24.662 start_address: 'Warehouse A, Tallinn' start_time: '2025-01-20 06:00:00' stop_time: '2025-01-20 18:00:00' order_ref: PAD-2025-100 order_details: 'CMR delivery to Latvia' task_address: 'Warehouse District, Tallinn' task_description: 'International delivery to Latvia' cancel_reason: null status: 2 created_at: '2025-01-19 14:00:00' updated_at: '2025-01-20 06:30:00' work_started_at: '2025-01-20 06:15:00' work_finished_at: null sender: PadapigiAPI tracking_nr: abc123xyz789def456 task_notes: 'CMR documents prepared' active: true group_id: 15 is_not_own_vehicle: false contact_name: 'John Doe' contact_email: john.doe@example.com contact_sender: SENDER123 contact_receiver: 'ABC Logistics Ltd' contact_trailer: TRL456 contact_order: ORD-PAD-100 contact_delivery_term: DAP contact_language: en delivery_name: 'ABC Logistics Ltd' delivery_address1: 'Industrial Street 15' delivery_address2: 'Riga, LV-1234' delivery_address3: Latvia start_address1: 'Warehouse A' start_address2: 'Tallinn Port' start_address3: Estonia weight: 15000 amount: 24 hash: abc123def456 products: [] - description: 'Directo Task' type: array items: type: object properties: id: type: integer example: 12348 oid: type: string example: metrotec object_id: type: string example: INT-TRUCK-02 lat: type: number example: 54.687 lon: type: number example: 25.279 start_lat: type: number example: 59.437 start_lon: type: number example: 24.754 start_address: type: string example: 'Tallinn Logistics Center' start_time: type: string example: '2025-01-20 05:00:00' stop_time: type: string example: '2025-01-21 18:00:00' order_ref: type: string example: DIR-2025-055 order_details: type: string example: 'Electronics to Lithuania' task_address: type: string example: 'Vilnius, Lithuania' task_description: type: string example: 'Electronics transport to Lithuania' cancel_reason: type: string example: null status: type: integer example: 2 created_at: type: string example: '2025-01-19 12:00:00' updated_at: type: string example: '2025-01-20 05:45:00' work_started_at: type: string example: '2025-01-20 05:30:00' work_finished_at: type: string example: null sender: type: string example: DirectoAPI tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: 'Border documents ready' active: type: boolean example: true group_id: type: integer example: 20 is_not_own_vehicle: type: boolean example: false amount: type: integer example: 150 contact_name: type: string example: 'Maria Vasileva' contact_country_code: type: string example: '+370' contact_phone_nr: type: string example: '61234567' product_name: type: string example: 'Electronic Components' project_nr: type: string example: PROJ-2025-10 weight: type: integer example: 12000 carrier: type: string example: 'Baltic Express' receiver_email: type: string example: receiver@example.lt receiver_name: type: string example: 'Tech Solutions UAB' directo_invoice: type: string example: '987654' driver_notes: type: string example: 'Contact receiver 1 hour before arrival' own_transport: type: boolean example: true products: type: array example: [] example: - id: 12348 oid: metrotec object_id: INT-TRUCK-02 lat: 54.687 lon: 25.279 start_lat: 59.437 start_lon: 24.754 start_address: 'Tallinn Logistics Center' start_time: '2025-01-20 05:00:00' stop_time: '2025-01-21 18:00:00' order_ref: DIR-2025-055 order_details: 'Electronics to Lithuania' task_address: 'Vilnius, Lithuania' task_description: 'Electronics transport to Lithuania' cancel_reason: null status: 2 created_at: '2025-01-19 12:00:00' updated_at: '2025-01-20 05:45:00' work_started_at: '2025-01-20 05:30:00' work_finished_at: null sender: DirectoAPI tracking_nr: abc123xyz789def456 task_notes: 'Border documents ready' active: true group_id: 20 is_not_own_vehicle: false amount: 150 contact_name: 'Maria Vasileva' contact_country_code: '+370' contact_phone_nr: '61234567' product_name: 'Electronic Components' project_nr: PROJ-2025-10 weight: 12000 carrier: 'Baltic Express' receiver_email: receiver@example.lt receiver_name: 'Tech Solutions UAB' directo_invoice: '987654' driver_notes: 'Contact receiver 1 hour before arrival' own_transport: true products: [] - description: 'Esvika Task' type: array items: type: object properties: id: type: integer example: 12349 oid: type: string example: metrotec object_id: type: string example: ESV-TRUCK-08 lat: type: number example: 60.169 lon: type: number example: 24.938 start_lat: type: number example: 59.437 start_lon: type: number example: 24.754 start_address: type: string example: 'Tallinn Distribution Center' start_time: type: string example: '2025-01-20 07:00:00' stop_time: type: string example: '2025-01-20 16:00:00' order_ref: type: string example: ESV-2025-220 order_details: type: string example: 'Container to Helsinki Port' task_address: type: string example: 'Helsinki Port, Finland' task_description: type: string example: 'Container transport to Helsinki' cancel_reason: type: string example: null status: type: integer example: 2 created_at: type: string example: '2025-01-19 13:30:00' updated_at: type: string example: '2025-01-20 07:20:00' work_started_at: type: string example: '2025-01-20 07:10:00' work_finished_at: type: string example: null sender: type: string example: EsvikaAPI tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: 'Ferry booking confirmed' active: type: boolean example: true group_id: type: integer example: 25 is_not_own_vehicle: type: boolean example: false contact_name: type: string example: 'Pekka Virtanen' contact_country_code: type: string example: '+358' contact_phone_nr: type: string example: '401234567' amount: type: number example: 1.0 weight: type: integer example: 22000 vehicle_type: type: string example: Curtainsider carrier: type: string example: 'Nordic Transport Oy' order_number: type: string example: ORD-FI-2025-100 unloading_time: type: integer example: 45 products: type: array example: [] example: - id: 12349 oid: metrotec object_id: ESV-TRUCK-08 lat: 60.169 lon: 24.938 start_lat: 59.437 start_lon: 24.754 start_address: 'Tallinn Distribution Center' start_time: '2025-01-20 07:00:00' stop_time: '2025-01-20 16:00:00' order_ref: ESV-2025-220 order_details: 'Container to Helsinki Port' task_address: 'Helsinki Port, Finland' task_description: 'Container transport to Helsinki' cancel_reason: null status: 2 created_at: '2025-01-19 13:30:00' updated_at: '2025-01-20 07:20:00' work_started_at: '2025-01-20 07:10:00' work_finished_at: null sender: EsvikaAPI tracking_nr: abc123xyz789def456 task_notes: 'Ferry booking confirmed' active: true group_id: 25 is_not_own_vehicle: false contact_name: 'Pekka Virtanen' contact_country_code: '+358' contact_phone_nr: '401234567' amount: 1.0 weight: 22000 vehicle_type: Curtainsider carrier: 'Nordic Transport Oy' order_number: ORD-FI-2025-100 unloading_time: 45 products: [] - description: 'Olaret Task' type: array items: type: object properties: id: type: integer example: 12350 oid: type: string example: metrotec object_id: type: string example: CONTAINER-TRUCK-03 lat: type: number example: 59.437 lon: type: number example: 24.754 start_lat: type: string example: null start_lon: type: string example: null start_address: type: string example: null start_time: type: string example: '2025-01-20 09:00:00' stop_time: type: string example: '2025-01-20 15:00:00' order_ref: type: string example: OLA-2025-456 order_details: type: string example: 'Container pickup' task_address: type: string example: 'Container Terminal, Port of Tallinn' task_description: type: string example: 'Container pickup and delivery' cancel_reason: type: string example: null status: type: integer example: 1 created_at: type: string example: '2025-01-19 17:00:00' updated_at: type: string example: '2025-01-19 17:00:00' work_started_at: type: string example: null work_finished_at: type: string example: null sender: type: string example: OlaretAPI tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: 'Terminal gate code: 1234' active: type: boolean example: true group_id: type: string example: null is_not_own_vehicle: type: boolean example: false worder: type: string example: WO_2025_456 containerno: type: string example: MSCU1234567 do_send: type: boolean example: true products: type: array example: [] example: - id: 12350 oid: metrotec object_id: CONTAINER-TRUCK-03 lat: 59.437 lon: 24.754 start_lat: null start_lon: null start_address: null start_time: '2025-01-20 09:00:00' stop_time: '2025-01-20 15:00:00' order_ref: OLA-2025-456 order_details: 'Container pickup' task_address: 'Container Terminal, Port of Tallinn' task_description: 'Container pickup and delivery' cancel_reason: null status: 1 created_at: '2025-01-19 17:00:00' updated_at: '2025-01-19 17:00:00' work_started_at: null work_finished_at: null sender: OlaretAPI tracking_nr: abc123xyz789def456 task_notes: 'Terminal gate code: 1234' active: true group_id: null is_not_own_vehicle: false worder: WO_2025_456 containerno: MSCU1234567 do_send: true products: [] - description: 'LotusTimber Task' type: array items: type: object properties: id: type: integer example: 12351 oid: type: string example: metrotec object_id: type: string example: TIMBER-TRUCK-01 lat: type: number example: 58.378 lon: type: number example: 26.729 start_lat: type: number example: 59.437 start_lon: type: number example: 24.754 start_address: type: string example: 'Timber Yard, Tallinn' start_time: type: string example: '2025-01-20 06:00:00' stop_time: type: string example: '2025-01-20 14:00:00' order_ref: type: string example: LOTUS-2025-001 order_details: type: string example: 'Timber delivery to sawmill' customer_id: type: integer example: 1 carrier_id: type: integer example: 2 trailer_nr: type: string example: TRL-789 task_address: type: string example: 'Sawmill, Tartu' task_description: type: string example: 'Timber transport' cancel_reason: type: string example: null status: type: integer example: 2 created_at: type: string example: '2025-01-19 15:00:00' updated_at: type: string example: '2025-01-20 06:30:00' work_started_at: type: string example: '2025-01-20 06:15:00' work_finished_at: type: string example: null sender: type: string example: LotusTimberAPI tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: 'Handle with care' active: type: boolean example: true group_id: type: string example: null is_not_own_vehicle: type: boolean example: false products: type: array example: [] example: - id: 12351 oid: metrotec object_id: TIMBER-TRUCK-01 lat: 58.378 lon: 26.729 start_lat: 59.437 start_lon: 24.754 start_address: 'Timber Yard, Tallinn' start_time: '2025-01-20 06:00:00' stop_time: '2025-01-20 14:00:00' order_ref: LOTUS-2025-001 order_details: 'Timber delivery to sawmill' customer_id: 1 carrier_id: 2 trailer_nr: TRL-789 task_address: 'Sawmill, Tartu' task_description: 'Timber transport' cancel_reason: null status: 2 created_at: '2025-01-19 15:00:00' updated_at: '2025-01-20 06:30:00' work_started_at: '2025-01-20 06:15:00' work_finished_at: null sender: LotusTimberAPI tracking_nr: abc123xyz789def456 task_notes: 'Handle with care' active: true group_id: null is_not_own_vehicle: false products: [] tags: - 'Route Tasks' security: [] post: summary: 'Create a new task' operationId: createANewTask description: "Creates a new route task. The available fields depend on the user's profile type.\nAll task types share common base fields, with additional fields available per type." parameters: [] responses: 201: description: '' content: application/json: schema: oneOf: - description: 'Standard Task' type: object example: id: 12346 oid: metrotec object_id: ABC123 lat: 59.437 lon: 24.754 start_lat: null start_lon: null start_address: null start_time: '2025-01-20 08:00:00' stop_time: '2025-01-20 17:00:00' order_ref: ORDER-2025-001 order_details: null task_address: 'Tallinn, Estonia' task_description: 'Standard delivery task' cancel_reason: null status: 1 created_at: '2025-01-19 16:00:00' updated_at: '2025-01-19 16:00:00' sender: DispatchSystem tracking_nr: abc123xyz789def456 task_notes: null active: true group_id: null is_not_own_vehicle: false products: [] files: [] signatures: [] properties: id: type: integer example: 12346 oid: type: string example: metrotec object_id: type: string example: ABC123 lat: type: number example: 59.437 lon: type: number example: 24.754 start_lat: type: string example: null start_lon: type: string example: null start_address: type: string example: null start_time: type: string example: '2025-01-20 08:00:00' stop_time: type: string example: '2025-01-20 17:00:00' order_ref: type: string example: ORDER-2025-001 order_details: type: string example: null task_address: type: string example: 'Tallinn, Estonia' task_description: type: string example: 'Standard delivery task' cancel_reason: type: string example: null status: type: integer example: 1 created_at: type: string example: '2025-01-19 16:00:00' updated_at: type: string example: '2025-01-19 16:00:00' sender: type: string example: DispatchSystem tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: null active: type: boolean example: true group_id: type: string example: null is_not_own_vehicle: type: boolean example: false products: type: array example: [] files: type: array example: [] signatures: type: array example: [] - description: 'Rudus Task' type: object example: id: 12345 oid: metrotec object_id: RUDUS-01 lat: 59.437 lon: 24.754 start_lat: 59.395 start_lon: 24.662 start_address: 'Factory, Tallinn' start_time: '2025-01-20 08:00:00' stop_time: '2025-01-20 12:00:00' order_ref: RUDUS-2025-001 order_details: 'Client: Construction Site A' task_address: 'Construction Site A, Tallinn' task_description: 'Concrete delivery C30/37' cancel_reason: null status: 1 created_at: '2025-01-19 15:30:00' updated_at: '2025-01-19 15:30:00' sender: RudusAPI tracking_nr: abc123xyz789def456 task_notes: 'Special delivery' active: true group_id: 10 is_not_own_vehicle: false preparation_time: '2025-01-20 07:30:00' volume: 8.5 client_id: CLIENT123 ordered_volume: 10.0 delivered_volume: 8.2 pumped_volume: 8.0 dn_trash: '0.5' dn_plastic: '1.2' dn_water: '10.5' categoryID: 15 client_emails: - client@example.com - manager@example.com last_cargo: 0 concrete_type: C30/37 concrete_strength_class: C30 environmental_class: XC3 dmax: '16' consistency_class: S3 cement_type: 'CEM II/A-LL 42,5N' additives: Superplasticizer concrete_extra_info: 'High durability' concrete_extra_info2: 'Special finish required' unload_method: Pump driving_instructions: 'Use back entrance' offer_number: OFF-2025-123 work_order_number: WO-2025-456 notes: 'Handle with care' operator_name: 'John Smith' pumper_name: 'ABC Pumping Ltd' pump_type: Stationary factory_id: 5 client_address: '123 Construction Ave' other_object_id: PUMP-01 products: [] files: [] signatures: [] properties: id: type: integer example: 12345 oid: type: string example: metrotec object_id: type: string example: RUDUS-01 lat: type: number example: 59.437 lon: type: number example: 24.754 start_lat: type: number example: 59.395 start_lon: type: number example: 24.662 start_address: type: string example: 'Factory, Tallinn' start_time: type: string example: '2025-01-20 08:00:00' stop_time: type: string example: '2025-01-20 12:00:00' order_ref: type: string example: RUDUS-2025-001 order_details: type: string example: 'Client: Construction Site A' task_address: type: string example: 'Construction Site A, Tallinn' task_description: type: string example: 'Concrete delivery C30/37' cancel_reason: type: string example: null status: type: integer example: 1 created_at: type: string example: '2025-01-19 15:30:00' updated_at: type: string example: '2025-01-19 15:30:00' sender: type: string example: RudusAPI tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: 'Special delivery' active: type: boolean example: true group_id: type: integer example: 10 is_not_own_vehicle: type: boolean example: false preparation_time: type: string example: '2025-01-20 07:30:00' volume: type: number example: 8.5 client_id: type: string example: CLIENT123 ordered_volume: type: number example: 10.0 delivered_volume: type: number example: 8.2 pumped_volume: type: number example: 8.0 dn_trash: type: string example: '0.5' dn_plastic: type: string example: '1.2' dn_water: type: string example: '10.5' categoryID: type: integer example: 15 client_emails: type: array example: - client@example.com - manager@example.com items: type: string last_cargo: type: integer example: 0 concrete_type: type: string example: C30/37 concrete_strength_class: type: string example: C30 environmental_class: type: string example: XC3 dmax: type: string example: '16' consistency_class: type: string example: S3 cement_type: type: string example: 'CEM II/A-LL 42,5N' additives: type: string example: Superplasticizer concrete_extra_info: type: string example: 'High durability' concrete_extra_info2: type: string example: 'Special finish required' unload_method: type: string example: Pump driving_instructions: type: string example: 'Use back entrance' offer_number: type: string example: OFF-2025-123 work_order_number: type: string example: WO-2025-456 notes: type: string example: 'Handle with care' operator_name: type: string example: 'John Smith' pumper_name: type: string example: 'ABC Pumping Ltd' pump_type: type: string example: Stationary factory_id: type: integer example: 5 client_address: type: string example: '123 Construction Ave' other_object_id: type: string example: PUMP-01 products: type: array example: [] files: type: array example: [] signatures: type: array example: [] - description: 'Padapigi Task' type: object example: id: 12347 oid: metrotec object_id: TRUCK-05 lat: 59.437 lon: 24.754 start_lat: 59.395 start_lon: 24.662 start_address: 'Warehouse A, Tallinn' start_time: '2025-01-20 06:00:00' stop_time: '2025-01-20 18:00:00' order_ref: PAD-2025-100 order_details: 'CMR delivery to Latvia' task_address: 'Warehouse District, Tallinn' task_description: 'International delivery to Latvia' cancel_reason: null status: 1 created_at: '2025-01-19 14:00:00' updated_at: '2025-01-19 14:00:00' sender: PadapigiAPI tracking_nr: abc123xyz789def456 task_notes: 'CMR documents prepared' active: false group_id: 15 is_not_own_vehicle: false contact_name: 'John Doe' contact_email: john.doe@example.com contact_sender: SENDER123 contact_receiver: 'ABC Logistics Ltd' contact_trailer: TRL456 contact_order: ORD-PAD-100 contact_delivery_term: DAP contact_language: en delivery_name: 'ABC Logistics Ltd' delivery_address1: 'Industrial Street 15' delivery_address2: 'Riga, LV-1234' delivery_address3: Latvia start_address1: 'Warehouse A' start_address2: 'Tallinn Port' start_address3: Estonia weight: 15000 amount: 24 hash: abc123def456 products: [] files: [] signatures: [] properties: id: type: integer example: 12347 oid: type: string example: metrotec object_id: type: string example: TRUCK-05 lat: type: number example: 59.437 lon: type: number example: 24.754 start_lat: type: number example: 59.395 start_lon: type: number example: 24.662 start_address: type: string example: 'Warehouse A, Tallinn' start_time: type: string example: '2025-01-20 06:00:00' stop_time: type: string example: '2025-01-20 18:00:00' order_ref: type: string example: PAD-2025-100 order_details: type: string example: 'CMR delivery to Latvia' task_address: type: string example: 'Warehouse District, Tallinn' task_description: type: string example: 'International delivery to Latvia' cancel_reason: type: string example: null status: type: integer example: 1 created_at: type: string example: '2025-01-19 14:00:00' updated_at: type: string example: '2025-01-19 14:00:00' sender: type: string example: PadapigiAPI tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: 'CMR documents prepared' active: type: boolean example: false group_id: type: integer example: 15 is_not_own_vehicle: type: boolean example: false contact_name: type: string example: 'John Doe' contact_email: type: string example: john.doe@example.com contact_sender: type: string example: SENDER123 contact_receiver: type: string example: 'ABC Logistics Ltd' contact_trailer: type: string example: TRL456 contact_order: type: string example: ORD-PAD-100 contact_delivery_term: type: string example: DAP contact_language: type: string example: en delivery_name: type: string example: 'ABC Logistics Ltd' delivery_address1: type: string example: 'Industrial Street 15' delivery_address2: type: string example: 'Riga, LV-1234' delivery_address3: type: string example: Latvia start_address1: type: string example: 'Warehouse A' start_address2: type: string example: 'Tallinn Port' start_address3: type: string example: Estonia weight: type: integer example: 15000 amount: type: integer example: 24 hash: type: string example: abc123def456 products: type: array example: [] files: type: array example: [] signatures: type: array example: [] - description: 'Directo Task' type: object example: id: 12348 oid: metrotec object_id: INT-TRUCK-02 lat: 54.687 lon: 25.279 start_lat: 59.437 start_lon: 24.754 start_address: 'Tallinn Logistics Center' start_time: '2025-01-20 05:00:00' stop_time: '2025-01-21 18:00:00' order_ref: DIR-2025-055 order_details: 'Electronics to Lithuania' task_address: 'Vilnius, Lithuania' task_description: 'Electronics transport to Lithuania' cancel_reason: null status: 1 created_at: '2025-01-19 12:00:00' updated_at: '2025-01-19 12:00:00' sender: DirectoAPI tracking_nr: abc123xyz789def456 task_notes: 'Border documents ready' active: false group_id: 20 is_not_own_vehicle: false amount: 150 contact_name: 'Maria Vasileva' contact_country_code: '+370' contact_phone_nr: '61234567' product_name: 'Electronic Components' project_nr: PROJ-2025-10 weight: 12000 carrier: 'Baltic Express' receiver_email: receiver@example.lt receiver_name: 'Tech Solutions UAB' directo_invoice: '987654' driver_notes: 'Contact receiver 1 hour before arrival' own_transport: true products: [] files: [] signatures: [] properties: id: type: integer example: 12348 oid: type: string example: metrotec object_id: type: string example: INT-TRUCK-02 lat: type: number example: 54.687 lon: type: number example: 25.279 start_lat: type: number example: 59.437 start_lon: type: number example: 24.754 start_address: type: string example: 'Tallinn Logistics Center' start_time: type: string example: '2025-01-20 05:00:00' stop_time: type: string example: '2025-01-21 18:00:00' order_ref: type: string example: DIR-2025-055 order_details: type: string example: 'Electronics to Lithuania' task_address: type: string example: 'Vilnius, Lithuania' task_description: type: string example: 'Electronics transport to Lithuania' cancel_reason: type: string example: null status: type: integer example: 1 created_at: type: string example: '2025-01-19 12:00:00' updated_at: type: string example: '2025-01-19 12:00:00' sender: type: string example: DirectoAPI tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: 'Border documents ready' active: type: boolean example: false group_id: type: integer example: 20 is_not_own_vehicle: type: boolean example: false amount: type: integer example: 150 contact_name: type: string example: 'Maria Vasileva' contact_country_code: type: string example: '+370' contact_phone_nr: type: string example: '61234567' product_name: type: string example: 'Electronic Components' project_nr: type: string example: PROJ-2025-10 weight: type: integer example: 12000 carrier: type: string example: 'Baltic Express' receiver_email: type: string example: receiver@example.lt receiver_name: type: string example: 'Tech Solutions UAB' directo_invoice: type: string example: '987654' driver_notes: type: string example: 'Contact receiver 1 hour before arrival' own_transport: type: boolean example: true products: type: array example: [] files: type: array example: [] signatures: type: array example: [] - description: 'Esvika Task' type: object example: id: 12349 oid: metrotec object_id: ESV-TRUCK-08 lat: 60.169 lon: 24.938 start_lat: 59.437 start_lon: 24.754 start_address: 'Tallinn Distribution Center' start_time: '2025-01-20 07:00:00' stop_time: '2025-01-20 16:00:00' order_ref: ESV-2025-220 order_details: 'Container to Helsinki Port' task_address: 'Helsinki Port, Finland' task_description: 'Container transport to Helsinki' cancel_reason: null status: 1 created_at: '2025-01-19 13:30:00' updated_at: '2025-01-19 13:30:00' sender: EsvikaAPI tracking_nr: abc123xyz789def456 task_notes: 'Ferry booking confirmed' active: false group_id: 25 is_not_own_vehicle: false contact_name: 'Pekka Virtanen' contact_country_code: '+358' contact_phone_nr: '401234567' amount: 1.0 weight: 22000 vehicle_type: Curtainsider carrier: 'Nordic Transport Oy' order_number: ORD-FI-2025-100 unloading_time: 45 products: [] files: [] signatures: [] properties: id: type: integer example: 12349 oid: type: string example: metrotec object_id: type: string example: ESV-TRUCK-08 lat: type: number example: 60.169 lon: type: number example: 24.938 start_lat: type: number example: 59.437 start_lon: type: number example: 24.754 start_address: type: string example: 'Tallinn Distribution Center' start_time: type: string example: '2025-01-20 07:00:00' stop_time: type: string example: '2025-01-20 16:00:00' order_ref: type: string example: ESV-2025-220 order_details: type: string example: 'Container to Helsinki Port' task_address: type: string example: 'Helsinki Port, Finland' task_description: type: string example: 'Container transport to Helsinki' cancel_reason: type: string example: null status: type: integer example: 1 created_at: type: string example: '2025-01-19 13:30:00' updated_at: type: string example: '2025-01-19 13:30:00' sender: type: string example: EsvikaAPI tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: 'Ferry booking confirmed' active: type: boolean example: false group_id: type: integer example: 25 is_not_own_vehicle: type: boolean example: false contact_name: type: string example: 'Pekka Virtanen' contact_country_code: type: string example: '+358' contact_phone_nr: type: string example: '401234567' amount: type: number example: 1.0 weight: type: integer example: 22000 vehicle_type: type: string example: Curtainsider carrier: type: string example: 'Nordic Transport Oy' order_number: type: string example: ORD-FI-2025-100 unloading_time: type: integer example: 45 products: type: array example: [] files: type: array example: [] signatures: type: array example: [] - description: 'Olaret Task' type: object example: id: 12350 oid: metrotec object_id: CONTAINER-TRUCK-03 lat: 59.437 lon: 24.754 start_lat: null start_lon: null start_address: null start_time: '2025-01-20 09:00:00' stop_time: '2025-01-20 15:00:00' order_ref: OLA-2025-456 order_details: 'Container pickup' task_address: 'Container Terminal, Port of Tallinn' task_description: 'Container pickup and delivery' cancel_reason: null status: 1 created_at: '2025-01-19 17:00:00' updated_at: '2025-01-19 17:00:00' sender: OlaretAPI tracking_nr: abc123xyz789def456 task_notes: 'Terminal gate code: 1234' active: true group_id: null is_not_own_vehicle: false worder: WO_2025_456 containerno: MSCU1234567 do_send: true products: [] files: [] signatures: [] properties: id: type: integer example: 12350 oid: type: string example: metrotec object_id: type: string example: CONTAINER-TRUCK-03 lat: type: number example: 59.437 lon: type: number example: 24.754 start_lat: type: string example: null start_lon: type: string example: null start_address: type: string example: null start_time: type: string example: '2025-01-20 09:00:00' stop_time: type: string example: '2025-01-20 15:00:00' order_ref: type: string example: OLA-2025-456 order_details: type: string example: 'Container pickup' task_address: type: string example: 'Container Terminal, Port of Tallinn' task_description: type: string example: 'Container pickup and delivery' cancel_reason: type: string example: null status: type: integer example: 1 created_at: type: string example: '2025-01-19 17:00:00' updated_at: type: string example: '2025-01-19 17:00:00' sender: type: string example: OlaretAPI tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: 'Terminal gate code: 1234' active: type: boolean example: true group_id: type: string example: null is_not_own_vehicle: type: boolean example: false worder: type: string example: WO_2025_456 containerno: type: string example: MSCU1234567 do_send: type: boolean example: true products: type: array example: [] files: type: array example: [] signatures: type: array example: [] - description: 'LotusTimber Task' type: object example: id: 12351 oid: metrotec object_id: TIMBER-TRUCK-01 lat: 58.378 lon: 26.729 start_lat: 59.437 start_lon: 24.754 start_address: 'Timber Yard, Tallinn' start_time: '2025-01-20 06:00:00' stop_time: '2025-01-20 14:00:00' order_ref: LOTUS-2025-001 order_details: 'Timber delivery to sawmill' customer_id: 1 carrier_id: 2 trailer_nr: TRL-789 task_address: 'Sawmill, Tartu' task_description: 'Timber transport' cancel_reason: null status: 1 created_at: '2025-01-19 15:00:00' updated_at: '2025-01-19 15:00:00' sender: LotusTimberAPI tracking_nr: abc123xyz789def456 task_notes: 'Handle with care' active: true group_id: null is_not_own_vehicle: false products: - id: 1 name: 'Pine Logs' pivot: route_task_id: 12351 product_id: 1 quantity: '25.00' weight: '1500.00' created_at: '2025-01-19 15:00:00' updated_at: '2025-01-19 15:00:00' - id: 2 name: 'Spruce Logs' pivot: route_task_id: 12351 product_id: 2 quantity: '15.00' weight: '900.00' created_at: '2025-01-19 15:00:00' updated_at: '2025-01-19 15:00:00' files: [] signatures: [] properties: id: type: integer example: 12351 oid: type: string example: metrotec object_id: type: string example: TIMBER-TRUCK-01 lat: type: number example: 58.378 lon: type: number example: 26.729 start_lat: type: number example: 59.437 start_lon: type: number example: 24.754 start_address: type: string example: 'Timber Yard, Tallinn' start_time: type: string example: '2025-01-20 06:00:00' stop_time: type: string example: '2025-01-20 14:00:00' order_ref: type: string example: LOTUS-2025-001 order_details: type: string example: 'Timber delivery to sawmill' customer_id: type: integer example: 1 carrier_id: type: integer example: 2 trailer_nr: type: string example: TRL-789 task_address: type: string example: 'Sawmill, Tartu' task_description: type: string example: 'Timber transport' cancel_reason: type: string example: null status: type: integer example: 1 created_at: type: string example: '2025-01-19 15:00:00' updated_at: type: string example: '2025-01-19 15:00:00' sender: type: string example: LotusTimberAPI tracking_nr: type: string example: abc123xyz789def456 task_notes: type: string example: 'Handle with care' active: type: boolean example: true group_id: type: string example: null is_not_own_vehicle: type: boolean example: false products: type: array example: - id: 1 name: 'Pine Logs' pivot: route_task_id: 12351 product_id: 1 quantity: '25.00' weight: '1500.00' created_at: '2025-01-19 15:00:00' updated_at: '2025-01-19 15:00:00' - id: 2 name: 'Spruce Logs' pivot: route_task_id: 12351 product_id: 2 quantity: '15.00' weight: '900.00' created_at: '2025-01-19 15:00:00' updated_at: '2025-01-19 15:00:00' items: type: object properties: id: type: integer example: 1 name: type: string example: 'Pine Logs' pivot: type: object properties: route_task_id: type: integer example: 12351 product_id: type: integer example: 1 quantity: type: string example: '25.00' weight: type: string example: '1500.00' created_at: type: string example: '2025-01-19 15:00:00' updated_at: type: string example: '2025-01-19 15:00:00' files: type: array example: [] signatures: type: array example: [] 400: description: 'Validation Error' content: application/json: schema: type: object example: message: Lat_Lon_Must_Be_Defined properties: message: type: string example: Lat_Lon_Must_Be_Defined 409: description: 'Duplicate Order Ref' content: application/json: schema: type: object example: message: 'Duplicate order reference' properties: message: type: string example: 'Duplicate order reference' tags: - 'Route Tasks' requestBody: required: true content: application/json: schema: type: object properties: object_id: type: string description: 'Vehicle object ID.' example: ABC123 lat: type: number description: 'Destination latitude.' example: 59.437 lon: type: number description: 'Destination longitude.' example: 24.754 start_time: type: string description: 'Task start time.' example: '2025-01-20 08:00:00' stop_time: type: string description: 'Task end time.' example: '2025-01-20 17:00:00' start_lat: type: number description: 'Starting point latitude.' example: 59.395 nullable: true start_lon: type: number description: 'Starting point longitude.' example: 24.662 nullable: true start_address: type: string description: 'Starting address.' example: 'Tallinn, Estonia' nullable: true task_address: type: string description: 'Destination address.' example: 'Tartu, Estonia' nullable: true order_ref: type: string description: 'Order reference (must be unique per owner).' example: ORD-2025-001 nullable: true order_details: type: string description: 'Order details.' example: 'Delivery of goods' nullable: true task_description: type: string description: 'Task description.' example: 'Deliver package' nullable: true task_notes: type: string description: 'Additional notes.' example: 'Call before arrival' nullable: true cancel_reason: type: string description: '' example: architecto nullable: true status: type: integer description: 'Task status (1=new, 2=ok, 3=completed, 4=rejected, 5=cancel, 6=auto_close, 7=signed, 8=arrived, 9=confirmed).' example: 1 planned_km: type: number description: 'Planned kilometers.' example: 150.5 nullable: true is_not_own_vehicle: type: boolean description: 'Using external vehicle.' example: false active: type: boolean description: 'Whether task is active.' example: true group_id: type: integer description: 'Task group ID.' example: 1 nullable: true products: type: array description: 'Array of products to attach to the task. Syncs products: present items are added/updated, missing items are removed.' example: - [] items: type: object properties: product_id: type: integer description: 'Product ID.' example: 1 quantity: type: number description: 'Product quantity.' example: 10.5 nullable: true weight: type: number description: 'Product weight in kg.' example: 150.0 nullable: true required: - product_id preparation_time: type: string description: '[Rudus] Concrete preparation time at factory.' example: '2025-01-20 07:30:00' volume: type: number description: '[Rudus] Concrete volume in m³.' example: 8.5 client_id: type: string description: '[Rudus] Client identifier.' example: CLIENT123 ordered_volume: type: number description: '[Rudus] Total ordered volume in m³.' example: 10.0 delivered_volume: type: number description: '[Rudus] Delivered volume in m³.' example: 8.2 pumped_volume: type: number description: '[Rudus] Pumped volume in m³.' example: 8.0 dn_trash: type: string description: '[Rudus] Delivery note - trash amount.' example: '0.5' dn_plastic: type: string description: '[Rudus] Delivery note - plastic fiber.' example: '1.2' dn_water: type: string description: '[Rudus] Delivery note - added water.' example: '10.5' categoryID: type: integer description: '[Rudus] Concrete category ID.' example: 15 client_emails: type: array description: '[Rudus] Client emails for notifications.' example: - client@example.com items: type: string last_cargo: type: integer description: '[Rudus] Last cargo flag (0/1).' example: 0 geozone_entered_at: type: string description: '[Rudus] Geozone entry time.' example: '2025-01-20 11:20:00' arrived_at: type: string description: '[Rudus] Arrival time at site.' example: '2025-01-20 11:15:00' geozone_left_at: type: string description: '[Rudus] Geozone exit time.' example: '2025-01-20 11:50:00' work_finished_at: type: string description: '[Rudus] Work completion time.' example: '2025-01-20 11:45:00' concrete_type: type: string description: '[Rudus] Type of concrete.' example: C30/37 concrete_strength_class: type: string description: '[Rudus] Strength class.' example: C30 environmental_class: type: string description: '[Rudus] Environmental class.' example: XC3 dmax: type: string description: '[Rudus] Maximum aggregate size.' example: '16' consistency_class: type: string description: '[Rudus] Consistency class.' example: S3 cement_type: type: string description: '[Rudus] Cement type.' example: 'CEM II/A-LL 42,5N' additives: type: string description: '[Rudus] Concrete additives.' example: Superplasticizer concrete_extra_info: type: string description: '[Rudus] Extra info.' example: 'High durability' concrete_extra_info2: type: string description: '[Rudus] Extra info 2.' example: 'Special finish' unload_method: type: string description: '[Rudus] Unloading method.' example: Pump driving_instructions: type: string description: '[Rudus] Driver instructions.' example: 'Use back entrance' offer_number: type: string description: '[Rudus] Offer number.' example: OFF-2025-123 work_order_number: type: string description: '[Rudus] Work order number.' example: WO-2025-456 notes: type: string description: '[Rudus] Additional notes.' example: 'Handle with care' operator_name: type: string description: '[Rudus] Operator name.' example: 'John Smith' pumper_name: type: string description: '[Rudus] Pumper company.' example: 'ABC Pumping Ltd' pump_type: type: string description: '[Rudus] Pump type.' example: Stationary factory_id: type: integer description: '[Rudus] Factory ID.' example: 5 client_address: type: string description: '[Rudus] Client address.' example: '123 Construction Ave' other_object_id: type: string description: '[Rudus] Secondary vehicle ID.' example: PUMP-01 contact_name: type: string description: '[Padapigi, Directo, Esvika] Contact person name.' example: 'John Doe' contact_email: type: string description: '[Padapigi] Contact email.' example: john@example.com contact_sender: type: string description: '[Padapigi] Sender code/name.' example: SENDER123 contact_receiver: type: string description: '[Padapigi] Receiver code/name.' example: 'ABC Logistics Ltd' contact_trailer: type: string description: '[Padapigi] Trailer number.' example: TRL456 contact_order: type: string description: '[Padapigi] Customer order reference.' example: ORD-PAD-100 contact_delivery_term: type: string description: '[Padapigi] Delivery terms (Incoterms).' example: DAP contact_language: type: string description: '[Padapigi] Language code (est/eng/rus).' example: en delivery_name: type: string description: '[Padapigi] Delivery recipient name.' example: 'ABC Logistics Ltd' delivery_address1: type: string description: '[Padapigi] Delivery address line 1.' example: 'Industrial Street 15' delivery_address2: type: string description: '[Padapigi] Delivery address line 2.' example: 'Riga, LV-1234' delivery_address3: type: string description: '[Padapigi] Delivery address line 3.' example: Latvia start_address1: type: string description: '[Padapigi] Pickup address line 1.' example: 'Warehouse A' start_address2: type: string description: '[Padapigi] Pickup address line 2.' example: 'Tallinn Port' start_address3: type: string description: '[Padapigi] Pickup address line 3.' example: Estonia hash: type: string description: '[Padapigi] Document hash.' example: abc123def456 contact_country_code: type: string description: '[Directo, Esvika] Phone country code.' example: '+372' contact_phone_nr: type: string description: '[Directo, Esvika] Phone number.' example: '5551234' product_name: type: string description: '[Directo] Product name.' example: 'Electronic Components' project_nr: type: string description: '[Directo] Project number.' example: PROJ-2025-10 receiver_email: type: string description: '[Directo] Receiver email.' example: receiver@example.lt receiver_name: type: string description: '[Directo] Receiver company name.' example: 'Tech Solutions UAB' directo_invoice: type: string description: '[Directo] Invoice number.' example: '987654' driver_notes: type: string description: '[Directo] Driver instructions.' example: 'Call 1h before' own_transport: type: boolean description: '[Directo] Using own transport.' example: true weight: type: integer description: '[Padapigi, Directo, Esvika] Weight in kg.' example: 15000 amount: type: number description: '[Padapigi, Directo, Esvika] Amount/quantity.' example: 24.0 carrier: type: string description: '[Directo, Esvika] Carrier company.' example: 'Baltic Express' vehicle_type: type: string description: '[Esvika] Required vehicle type.' example: Curtainsider order_number: type: string description: '[Esvika] Internal order number.' example: ORD-FI-2025-100 unloading_time: type: integer description: '[Esvika] Unloading time in minutes.' example: 45 worder: type: string description: '[Olaret] Work order reference.' example: WO_2025_456 containerno: type: string description: '[Olaret] Container number.' example: MSCU1234567 do_send: type: boolean description: '[Olaret] Send notification on completion.' example: true customer_id: type: integer description: '[LotusTimber] Party ID (role=CUSTOMER).' example: 1 carrier_id: type: integer description: '[LotusTimber] Party ID (role=CARRIER).' example: 2 trailer_nr: type: string description: '[LotusTimber] Trailer number.' example: TRL-789 required: - lat - lon - start_time - stop_time security: [] '/api/tasks/{id}': get: summary: 'Get a specific task' operationId: getASpecificTask description: 'Returns a single route task with files, signatures and products.' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. 404: description: 'Task not found' content: application/json: schema: type: object example: message: 'Not Found' properties: message: type: string example: 'Not Found' tags: - 'Route Tasks' security: [] put: summary: 'Update a task' operationId: updateATask description: "Updates an existing route task. All fields are optional on update.\nAdditional fields depend on the user's profile type.\n\n**Status Changes:**\n- Setting status to 4 (rejected) will deactivate the task and remove group assignment\n- Setting status to 3 (completed) or 7 (signed) triggers task-specific completion logic" parameters: [] responses: 403: description: '' content: application/json: schema: oneOf: - description: Forbidden type: object example: message: Forbidden properties: message: type: string example: Forbidden - description: 'Invalid Period' type: object example: message: 'Invalid period' properties: message: type: string example: 'Invalid period' 409: description: 'Duplicate Order Ref' content: application/json: schema: type: object example: message: 'Duplicate order reference' properties: message: type: string example: 'Duplicate order reference' tags: - 'Route Tasks' requestBody: required: false content: application/json: schema: type: object properties: object_id: type: string description: 'Vehicle object ID.' example: ABC123 lat: type: number description: 'Destination latitude.' example: 59.437 lon: type: number description: 'Destination longitude.' example: 24.754 start_time: type: string description: 'Task start time.' example: '2025-01-20 08:00:00' stop_time: type: string description: 'Task end time.' example: '2025-01-20 17:00:00' start_lat: type: number description: '' example: 4326.41688 nullable: true start_lon: type: number description: '' example: 4326.41688 nullable: true start_address: type: string description: 'Väli value ei tohi olla pikem kui 255 tähemärki.' example: m nullable: true task_address: type: string description: 'Väli value ei tohi olla pikem kui 255 tähemärki.' example: i nullable: true order_ref: type: string description: 'Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'y' nullable: true order_details: type: string description: '' example: architecto nullable: true task_description: type: string description: '' example: architecto nullable: true task_notes: type: string description: '' example: architecto nullable: true cancel_reason: type: string description: 'Reason for cancellation (when status=5).' example: 'Customer not available' nullable: true status: type: integer description: 'Task status.' example: 2 planned_km: type: string description: '' example: null nullable: true is_not_own_vehicle: type: boolean description: '' example: true active: type: boolean description: 'Activate/deactivate task.' example: true group_id: type: integer description: '' example: 16 nullable: true products: type: array description: 'Array of products to sync with the task. Present items are added/updated, missing items are removed.' example: - [] items: type: object properties: product_id: type: integer description: 'Product ID.' example: 1 quantity: type: number description: 'Product quantity.' example: 10.5 nullable: true weight: type: number description: 'Product weight in kg.' example: 150.0 nullable: true required: - product_id security: [] delete: summary: 'Delete a task' operationId: deleteATask description: 'Deletes a route task and its associated extra data from the task-type-specific table.' parameters: [] responses: 204: description: Success content: application/json: schema: type: object example: { } properties: { } 403: description: Forbidden content: application/json: schema: type: object example: message: Forbidden properties: message: type: string example: Forbidden tags: - 'Route Tasks' security: [] parameters: - in: path name: id description: 'The ID of the task.' example: 0 required: true schema: type: integer - in: path name: task description: 'Task ID.' example: 1 required: true schema: type: integer /api/ships: get: summary: 'Get all ships' operationId: getAllShips description: '' parameters: - in: query name: 'filter[archived]' description: 'Show all ships including inactive' example: true required: false schema: type: boolean description: 'Show all ships including inactive' example: true responses: 200: description: '' content: application/json: schema: type: array items: type: object properties: id: type: integer example: 1 ship_name: type: string example: Aurora owner_name: type: string example: 'John Smith' board_number: type: string example: EST-1234 captain_name: type: string example: 'Captain Jack' license_number: type: string example: LIC-2025-001 receiver: type: string example: 'Fish Processing Ltd' receiver_address: type: string example: 'Harbor Street 1, Tallinn' fish_destination: type: string example: 'Processing Plant A' active: type: boolean example: true created_at: type: string example: '2025-01-01T00:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' example: - id: 1 ship_name: Aurora owner_name: 'John Smith' board_number: EST-1234 captain_name: 'Captain Jack' license_number: LIC-2025-001 receiver: 'Fish Processing Ltd' receiver_address: 'Harbor Street 1, Tallinn' fish_destination: 'Processing Plant A' active: true created_at: '2025-01-01T00:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' tags: - Ships post: summary: 'Create a new ship' operationId: createANewShip description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 ship_name: Aurora owner_name: 'John Smith' board_number: EST-1234 captain_name: 'Captain Jack' license_number: LIC-2025-001 receiver: 'Fish Processing Ltd' receiver_address: 'Harbor Street 1, Tallinn' fish_destination: 'Processing Plant A' active: true created_at: '2025-11-28T10:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' properties: id: type: integer example: 1 ship_name: type: string example: Aurora owner_name: type: string example: 'John Smith' board_number: type: string example: EST-1234 captain_name: type: string example: 'Captain Jack' license_number: type: string example: LIC-2025-001 receiver: type: string example: 'Fish Processing Ltd' receiver_address: type: string example: 'Harbor Street 1, Tallinn' fish_destination: type: string example: 'Processing Plant A' active: type: boolean example: true created_at: type: string example: '2025-11-28T10:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' tags: - Ships requestBody: required: true content: application/json: schema: type: object properties: ship_name: type: string description: 'Name of the ship. Väli value ei tohi olla pikem kui 255 tähemärki.' example: Aurora owner_name: type: string description: 'Name of the ship owner. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'John Smith' nullable: true board_number: type: string description: 'Ship board number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: EST-1234 nullable: true captain_name: type: string description: 'Name of the ship captain. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Captain Jack' nullable: true email: type: string description: 'Email address(es) for the ship, comma-separated for multiple. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'captain@ship.com, owner@ship.com' nullable: true license_number: type: string description: 'Ship license number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: LIC-2025-001 nullable: true receiver_id: type: integer description: 'ID of the receiver party. The id of an existing record in the parties table.' example: 1 nullable: true fish_destination: type: object description: 'Fish destination with coordinates.' example: address: 'Processing Plant A, Harbor 5' lat: 59.437 lon: 24.753 properties: address: type: string description: 'Väli value ei tohi olla pikem kui 500 tähemärki.' example: 'Processing Plant A, Harbor 5' nullable: true lat: type: number description: '' example: 59.437 nullable: true lon: type: number description: '' example: 24.753 nullable: true nullable: true active: type: boolean description: 'Whether the ship is active.' example: false nullable: true required: - ship_name '/api/ships/{id}': get: summary: 'Get a specific ship' operationId: getASpecificShip description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 ship_name: Aurora owner_name: 'John Smith' board_number: EST-1234 captain_name: 'Captain Jack' license_number: LIC-2025-001 receiver: 'Fish Processing Ltd' receiver_address: 'Harbor Street 1, Tallinn' fish_destination: 'Processing Plant A' active: true created_at: '2025-01-01T00:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' properties: id: type: integer example: 1 ship_name: type: string example: Aurora owner_name: type: string example: 'John Smith' board_number: type: string example: EST-1234 captain_name: type: string example: 'Captain Jack' license_number: type: string example: LIC-2025-001 receiver: type: string example: 'Fish Processing Ltd' receiver_address: type: string example: 'Harbor Street 1, Tallinn' fish_destination: type: string example: 'Processing Plant A' active: type: boolean example: true created_at: type: string example: '2025-01-01T00:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' tags: - Ships put: summary: 'Update a ship' operationId: updateAShip description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 ship_name: 'Aurora Updated' owner_name: 'John Smith' board_number: EST-1234 captain_name: 'Captain Jack' license_number: LIC-2025-001 receiver: 'Fish Processing Ltd' receiver_address: 'Harbor Street 1, Tallinn' fish_destination: 'Processing Plant A' active: true created_at: '2025-01-01T00:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' properties: id: type: integer example: 1 ship_name: type: string example: 'Aurora Updated' owner_name: type: string example: 'John Smith' board_number: type: string example: EST-1234 captain_name: type: string example: 'Captain Jack' license_number: type: string example: LIC-2025-001 receiver: type: string example: 'Fish Processing Ltd' receiver_address: type: string example: 'Harbor Street 1, Tallinn' fish_destination: type: string example: 'Processing Plant A' active: type: boolean example: true created_at: type: string example: '2025-01-01T00:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' tags: - Ships requestBody: required: true content: application/json: schema: type: object properties: ship_name: type: string description: 'Name of the ship. Väli value ei tohi olla pikem kui 255 tähemärki.' example: Aurora owner_name: type: string description: 'Name of the ship owner. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'John Smith' nullable: true board_number: type: string description: 'Ship board number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: EST-1234 nullable: true captain_name: type: string description: 'Name of the ship captain. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Captain Jack' nullable: true email: type: string description: 'Email address(es) for the ship, comma-separated for multiple. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'captain@ship.com, owner@ship.com' nullable: true license_number: type: string description: 'Ship license number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: LIC-2025-001 nullable: true receiver_id: type: integer description: 'ID of the receiver party. The id of an existing record in the parties table.' example: 1 nullable: true fish_destination: type: object description: 'Fish destination with coordinates.' example: address: 'Processing Plant A, Harbor 5' lat: 59.437 lon: 24.753 properties: address: type: string description: 'Väli value ei tohi olla pikem kui 500 tähemärki.' example: 'Processing Plant A, Harbor 5' nullable: true lat: type: number description: '' example: 59.437 nullable: true lon: type: number description: '' example: 24.753 nullable: true nullable: true active: type: boolean description: 'Whether the ship is active.' example: false nullable: true required: - ship_name delete: summary: 'Delete a ship' operationId: deleteAShip description: '' parameters: [] responses: 204: description: success content: text/plain: schema: type: string example: '' tags: - Ships parameters: - in: path name: id description: 'The ID of the ship.' example: 1 required: true schema: type: integer - in: path name: ship description: 'Ship ID' example: 1 required: true schema: type: integer /api/routetasksgroups: get: summary: 'Get all task groups' operationId: getAllTaskGroups description: "Returns a list of active task groups for the authenticated user.\nGroups are filtered based on:\n- Groups with group_date >= today\n- Or groups with group_date < today that have at least one task with an active status" parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object properties: id: type: integer example: 1 oid: type: string example: metrotec name: type: string example: 'Morning Route' group_date: type: string example: '2025-01-20T08:00:00.000000Z' object_id: type: string example: ABC123 other_object_id: type: string example: null work_started_at: type: string example: null should_return: type: boolean example: true active: type: boolean example: true driver_name: type: string example: 'John Doe' languages: type: string example: 'Estonian, English' driver_phone: type: string example: '+372 5555 5555' trailer_number: type: string example: TRL-123 carrier_id: type: integer example: 1 status: type: string example: null created_at: type: string example: '2025-01-19T10:00:00.000000Z' updated_at: type: string example: '2025-01-19T10:00:00.000000Z' carrier: type: object properties: id: type: integer example: 1 company_name: type: string example: 'ABC Logistics' company_no: type: string example: '12345678' company_vat_no: type: string example: EE123456789 company_phone_nr: type: string example: '+372 5555 5555' company_country_code: type: string example: '+372' company_email: type: string example: info@abc.com company_address: type: string example: 'Warehouse St 1' example: - id: 1 oid: metrotec name: 'Morning Route' group_date: '2025-01-20T08:00:00.000000Z' object_id: ABC123 other_object_id: null work_started_at: null should_return: true active: true driver_name: 'John Doe' languages: 'Estonian, English' driver_phone: '+372 5555 5555' trailer_number: TRL-123 carrier_id: 1 status: null created_at: '2025-01-19T10:00:00.000000Z' updated_at: '2025-01-19T10:00:00.000000Z' carrier: id: 1 company_name: 'ABC Logistics' company_no: '12345678' company_vat_no: EE123456789 company_phone_nr: '+372 5555 5555' company_country_code: '+372' company_email: info@abc.com company_address: 'Warehouse St 1' tags: - 'Task Groups' post: summary: 'Create a new task group' operationId: createANewTaskGroup description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 oid: metrotec name: 'Morning Route' group_date: '2025-01-20T08:00:00.000000Z' object_id: ABC123 other_object_id: null work_started_at: null should_return: true active: true driver_name: 'John Doe' languages: 'Estonian, English' driver_phone: '+372 5555 5555' trailer_number: TRL-123 carrier_id: 1 status: null created_at: '2025-01-19T10:00:00.000000Z' updated_at: '2025-01-19T10:00:00.000000Z' properties: id: type: integer example: 1 oid: type: string example: metrotec name: type: string example: 'Morning Route' group_date: type: string example: '2025-01-20T08:00:00.000000Z' object_id: type: string example: ABC123 other_object_id: type: string example: null work_started_at: type: string example: null should_return: type: boolean example: true active: type: boolean example: true driver_name: type: string example: 'John Doe' languages: type: string example: 'Estonian, English' driver_phone: type: string example: '+372 5555 5555' trailer_number: type: string example: TRL-123 carrier_id: type: integer example: 1 status: type: string example: null created_at: type: string example: '2025-01-19T10:00:00.000000Z' updated_at: type: string example: '2025-01-19T10:00:00.000000Z' tags: - 'Task Groups' requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'Group name. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Morning Delivery Route' group_date: type: string description: 'Date and time of the group. Väli value peab olema kehtiv kuupäev.' example: '2025-01-20 08:00:00' object_id: type: string description: 'Vehicle object ID. Väli value ei tohi olla pikem kui 10 tähemärki.' example: ABC123 nullable: true other_object_id: type: string description: 'Secondary vehicle object ID (e.g., for Padapigi when no primary vehicle). Väli value ei tohi olla pikem kui 10 tähemärki.' example: XYZ789 nullable: true work_started_at: type: string description: 'Timestamp when work started. Väli value peab olema kehtiv kuupäev.' example: '2025-01-20 08:15:00' nullable: true should_return: type: boolean description: 'Whether vehicle should return to origin.' example: false nullable: true active: type: boolean description: 'Whether the group is active.' example: false nullable: true driver_name: type: string description: 'Driver name. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'John Doe' nullable: true languages: type: string description: 'Languages spoken by driver. Väli value ei tohi olla pikem kui 500 tähemärki.' example: 'Estonian, English, Russian' nullable: true driver_phone: type: string description: 'Driver phone number. Väli value ei tohi olla pikem kui 50 tähemärki.' example: '+372 5555 5555' nullable: true trailer_number: type: string description: 'Trailer registration number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: TRL-123 nullable: true carrier_id: type: integer description: 'Party ID of the carrier. The id of an existing record in the parties table.' example: 1 nullable: true required: - name - group_date '/api/routetasksgroups/{id}': get: summary: 'Get a specific task group' operationId: getASpecificTaskGroup description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 oid: metrotec name: 'Morning Route' group_date: '2025-01-20T08:00:00.000000Z' object_id: ABC123 other_object_id: null work_started_at: null should_return: true active: true driver_name: 'John Doe' languages: 'Estonian, English' driver_phone: '+372 5555 5555' trailer_number: TRL-123 carrier_id: 1 status: null created_at: '2025-01-19T10:00:00.000000Z' updated_at: '2025-01-19T10:00:00.000000Z' carrier: id: 1 company_name: 'ABC Logistics' company_no: '12345678' company_vat_no: EE123456789 company_phone_nr: '+372 5555 5555' company_country_code: '+372' company_email: info@abc.com company_address: 'Warehouse St 1' properties: id: type: integer example: 1 oid: type: string example: metrotec name: type: string example: 'Morning Route' group_date: type: string example: '2025-01-20T08:00:00.000000Z' object_id: type: string example: ABC123 other_object_id: type: string example: null work_started_at: type: string example: null should_return: type: boolean example: true active: type: boolean example: true driver_name: type: string example: 'John Doe' languages: type: string example: 'Estonian, English' driver_phone: type: string example: '+372 5555 5555' trailer_number: type: string example: TRL-123 carrier_id: type: integer example: 1 status: type: string example: null created_at: type: string example: '2025-01-19T10:00:00.000000Z' updated_at: type: string example: '2025-01-19T10:00:00.000000Z' carrier: type: object properties: id: type: integer example: 1 company_name: type: string example: 'ABC Logistics' company_no: type: string example: '12345678' company_vat_no: type: string example: EE123456789 company_phone_nr: type: string example: '+372 5555 5555' company_country_code: type: string example: '+372' company_email: type: string example: info@abc.com company_address: type: string example: 'Warehouse St 1' 404: description: 'Not Found' content: application/json: schema: type: object example: message: 'Not Found' properties: message: type: string example: 'Not Found' tags: - 'Task Groups' put: summary: 'Update a task group' operationId: updateATaskGroup description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: id: 1 oid: metrotec name: 'Updated Morning Route' group_date: '2025-01-20T08:00:00.000000Z' object_id: ABC123 other_object_id: null work_started_at: '2025-01-20T08:15:00.000000Z' should_return: true active: true driver_name: 'John Doe' languages: 'Estonian, English' driver_phone: '+372 5555 5555' trailer_number: TRL-123 carrier_id: 1 status: null created_at: '2025-01-19T10:00:00.000000Z' updated_at: '2025-01-20T08:15:00.000000Z' properties: id: type: integer example: 1 oid: type: string example: metrotec name: type: string example: 'Updated Morning Route' group_date: type: string example: '2025-01-20T08:00:00.000000Z' object_id: type: string example: ABC123 other_object_id: type: string example: null work_started_at: type: string example: '2025-01-20T08:15:00.000000Z' should_return: type: boolean example: true active: type: boolean example: true driver_name: type: string example: 'John Doe' languages: type: string example: 'Estonian, English' driver_phone: type: string example: '+372 5555 5555' trailer_number: type: string example: TRL-123 carrier_id: type: integer example: 1 status: type: string example: null created_at: type: string example: '2025-01-19T10:00:00.000000Z' updated_at: type: string example: '2025-01-20T08:15:00.000000Z' 403: description: Forbidden content: application/json: schema: type: object example: message: Forbidden properties: message: type: string example: Forbidden tags: - 'Task Groups' requestBody: required: false content: application/json: schema: type: object properties: name: type: string description: 'Group name. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'Morning Delivery Route' group_date: type: string description: 'Date and time of the group. Väli value peab olema kehtiv kuupäev.' example: '2025-01-20 08:00:00' object_id: type: string description: 'Vehicle object ID. Väli value ei tohi olla pikem kui 10 tähemärki.' example: ABC123 nullable: true other_object_id: type: string description: 'Secondary vehicle object ID (e.g., for Padapigi when no primary vehicle). Väli value ei tohi olla pikem kui 10 tähemärki.' example: XYZ789 nullable: true work_started_at: type: string description: 'Timestamp when work started. Väli value peab olema kehtiv kuupäev.' example: '2025-01-20 08:15:00' nullable: true should_return: type: boolean description: 'Whether vehicle should return to origin.' example: false nullable: true active: type: boolean description: 'Whether the group is active.' example: false nullable: true driver_name: type: string description: 'Driver name. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 'John Doe' nullable: true languages: type: string description: 'Languages spoken by driver. Väli value ei tohi olla pikem kui 500 tähemärki.' example: 'Estonian, English, Russian' nullable: true driver_phone: type: string description: 'Driver phone number. Väli value ei tohi olla pikem kui 50 tähemärki.' example: '+372 5555 5555' nullable: true trailer_number: type: string description: 'Trailer registration number. Väli value ei tohi olla pikem kui 255 tähemärki.' example: TRL-123 nullable: true carrier_id: type: integer description: 'Party ID of the carrier. The id of an existing record in the parties table.' example: 1 nullable: true delete: summary: 'Delete a task group' operationId: deleteATaskGroup description: "Soft deletes a task group. The group will be marked as deleted but not\npermanently removed from the database." parameters: [] responses: 204: description: Success content: text/plain: schema: type: string example: '' 403: description: Forbidden content: application/json: schema: type: object example: message: Forbidden properties: message: type: string example: Forbidden tags: - 'Task Groups' parameters: - in: path name: id description: 'The ID of the routetasksgroup.' example: 16 required: true schema: type: integer - in: path name: taskGroup description: 'Task Group ID' example: 1 required: true schema: type: integer /api/username: get: summary: 'Get an authenticated user' operationId: getAnAuthenticatedUser description: "Returns the authenticated user's identifier and access level." parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: oid: john_doe access: 2 properties: oid: type: string example: john_doe access: type: integer example: 2 tags: - Users security: [] /api/auth-logs: get: summary: 'Get authentication logs report' operationId: getAuthenticationLogsReport description: '' parameters: - in: query name: datetime description: '' example: [] required: false schema: type: object description: '' example: [] properties: { } - in: query name: datetime.0 description: 'Start date (must be before or equal to end date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev enne või võrdne kuupäevaga datetime.1.' example: '2025-01-01' required: true schema: type: string description: 'Start date (must be before or equal to end date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev enne või võrdne kuupäevaga datetime.1.' example: '2025-01-01' - in: query name: datetime.1 description: 'End date (must be after or equal to start date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev pärast või võrdne kuupäevaga datetime.0.' example: '2025-12-31' required: true schema: type: string description: 'End date (must be after or equal to start date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev pärast või võrdne kuupäevaga datetime.0.' example: '2025-12-31' - in: query name: filter description: '' example: [] required: false schema: type: object description: '' example: [] properties: { } - in: query name: filter.oid description: 'Filter by username. Väli value ei tohi olla pikem kui 255 tähemärki.' example: metrotec required: false schema: type: string description: 'Filter by username. Väli value ei tohi olla pikem kui 255 tähemärki.' example: metrotec nullable: true - in: query name: filter.user_agent description: 'Filter by user agent. Väli value ei tohi olla pikem kui 255 tähemärki.' example: Mozilla/5.0 required: false schema: type: string description: 'Filter by user agent. Väli value ei tohi olla pikem kui 255 tähemärki.' example: Mozilla/5.0 nullable: true - in: query name: filter.ip_address description: 'Filter by IP address. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 192.168.1.1 required: false schema: type: string description: 'Filter by IP address. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 192.168.1.1 nullable: true responses: 200: description: '' content: application/json: schema: type: object example: data: - id: 1 authenticatable_type: App\Models\User authenticatable_id: 123 ip_address: 192.168.1.1 user_agent: Mozilla/5.0 login_at: '2025-11-28T10:00:00.000000Z' login_successful: true logout_at: null cleared_by_user: false location: city: Tallinn country: Estonia per_page: 15 current_page: 1 next_page_url: null prev_page_url: null properties: data: type: array example: - id: 1 authenticatable_type: App\Models\User authenticatable_id: 123 ip_address: 192.168.1.1 user_agent: Mozilla/5.0 login_at: '2025-11-28T10:00:00.000000Z' login_successful: true logout_at: null cleared_by_user: false location: city: Tallinn country: Estonia items: type: object properties: id: type: integer example: 1 authenticatable_type: type: string example: App\Models\User authenticatable_id: type: integer example: 123 ip_address: type: string example: 192.168.1.1 user_agent: type: string example: Mozilla/5.0 login_at: type: string example: '2025-11-28T10:00:00.000000Z' login_successful: type: boolean example: true logout_at: type: string example: null cleared_by_user: type: boolean example: false location: type: object properties: city: type: string example: Tallinn country: type: string example: Estonia per_page: type: integer example: 15 current_page: type: integer example: 1 next_page_url: type: string example: null prev_page_url: type: string example: null tags: - Users /api/tokens: get: summary: "Get User's current active sessions" operationId: getUsersCurrentActiveSessions description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object properties: id: type: integer example: 1 oid: type: string example: metrotec name: type: string example: web platform: type: string example: iOS ip: type: string example: 192.168.1.1 location: type: object properties: country: type: string example: EE city: type: string example: Tallinn last_used_at: type: string example: '2025-11-28T10:00:00.000000Z' created_at: type: string example: '2025-11-28T08:00:00.000000Z' expires_at: type: string example: '2025-12-28T10:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' example: - id: 1 oid: metrotec name: web platform: iOS ip: 192.168.1.1 location: country: EE city: Tallinn last_used_at: '2025-11-28T10:00:00.000000Z' created_at: '2025-11-28T08:00:00.000000Z' expires_at: '2025-12-28T10:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' tags: - Users parameters: - in: path name: user_oid description: Username example: metrotec required: true schema: type: string /api/api-tokens: get: summary: 'Get API tokens for all users owned by current user' operationId: getAPITokensForAllUsersOwnedByCurrentUser description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object properties: id: type: integer example: 1 oid: type: string example: metrotec name: type: string example: 'API token' created_at: type: string example: '2025-01-01T00:00:00.000000Z' expires_at: type: string example: null updated_at: type: string example: '2025-11-28T10:00:00.000000Z' example: - id: 1 oid: metrotec name: 'API token' created_at: '2025-01-01T00:00:00.000000Z' expires_at: null updated_at: '2025-11-28T10:00:00.000000Z' tags: - Users post: summary: 'Create an API token for given user' operationId: createAnAPITokenForGivenUser description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: id: 1 tokenable_type: App\Models\User tokenable_id: 123 name: 'API token' abilities: - api last_used_at: null expires_at: '2026-12-31T00:00:00.000000Z' created_at: '2025-11-28T10:00:00.000000Z' updated_at: '2025-11-28T10:00:00.000000Z' plainTextToken: 1|abc123def456... properties: id: type: integer example: 1 tokenable_type: type: string example: App\Models\User tokenable_id: type: integer example: 123 name: type: string example: 'API token' abilities: type: array example: - api items: type: string last_used_at: type: string example: null expires_at: type: string example: '2026-12-31T00:00:00.000000Z' created_at: type: string example: '2025-11-28T10:00:00.000000Z' updated_at: type: string example: '2025-11-28T10:00:00.000000Z' plainTextToken: type: string example: 1|abc123def456... tags: - Users requestBody: required: true content: application/json: schema: type: object properties: oid: type: string description: 'The username for token' example: metrotec token_name: type: string description: 'The name or purpose of the token' example: 'API token' expires_at: type: date description: 'Optional expiration date' example: '2026-12-31' nullable: true required: - oid - token_name '/api/api-tokens/{id}': delete: summary: 'Delete the specific API token' operationId: deleteTheSpecificAPIToken description: '' parameters: [] responses: 204: description: success content: text/plain: schema: type: string example: '' tags: - Users parameters: - in: path name: id description: 'The ID of the api token.' example: 88 required: true schema: type: integer - in: path name: token_id description: 'Token ID' example: '1234' required: true schema: type: string '/api/{user_oid}/tokens': get: summary: 'Get sessions for all users owned by current user' operationId: getSessionsForAllUsersOwnedByCurrentUser description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: object properties: id: type: integer example: 1 oid: type: string example: metrotec name: type: string example: 'API token' created_at: type: string example: '2025-01-01T00:00:00.000000Z' expires_at: type: string example: null updated_at: type: string example: '2025-11-28T10:00:00.000000Z' example: - id: 1 oid: metrotec name: 'API token' created_at: '2025-01-01T00:00:00.000000Z' expires_at: null updated_at: '2025-11-28T10:00:00.000000Z' tags: - Users parameters: - in: path name: user_oid description: '' example: architecto required: true schema: type: string '/api/{user_oid}/tokens/{id}': delete: summary: 'Delete the specific token' operationId: deleteTheSpecificToken description: '' parameters: [] responses: 204: description: success content: text/plain: schema: type: string example: '' tags: - Users parameters: - in: path name: user_oid description: Username example: metrotec required: true schema: type: string - in: path name: id description: 'The ID of the token.' example: 88 required: true schema: type: integer - in: path name: token_id description: 'Token ID' example: '90' required: true schema: type: string '/api/{user_oid}/auth-logs': get: summary: 'Get User authentication logs' operationId: getUserAuthenticationLogs description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: - id: 1 authenticatable_type: App\Models\User authenticatable_id: 123 ip_address: 192.168.1.1 user_agent: Mozilla/5.0 login_at: '2025-11-28T10:00:00.000000Z' login_successful: true logout_at: null cleared_by_user: false location: city: Tallinn country: Estonia per_page: 30 current_page: 1 next_page_url: null prev_page_url: null properties: data: type: array example: - id: 1 authenticatable_type: App\Models\User authenticatable_id: 123 ip_address: 192.168.1.1 user_agent: Mozilla/5.0 login_at: '2025-11-28T10:00:00.000000Z' login_successful: true logout_at: null cleared_by_user: false location: city: Tallinn country: Estonia items: type: object properties: id: type: integer example: 1 authenticatable_type: type: string example: App\Models\User authenticatable_id: type: integer example: 123 ip_address: type: string example: 192.168.1.1 user_agent: type: string example: Mozilla/5.0 login_at: type: string example: '2025-11-28T10:00:00.000000Z' login_successful: type: boolean example: true logout_at: type: string example: null cleared_by_user: type: boolean example: false location: type: object properties: city: type: string example: Tallinn country: type: string example: Estonia per_page: type: integer example: 30 current_page: type: integer example: 1 next_page_url: type: string example: null prev_page_url: type: string example: null tags: - Users parameters: - in: path name: user_oid description: Username example: metrotec required: true schema: type: string /xls/auth-logs: get: summary: '' operationId: getXlsAuthLogs description: '' parameters: - in: query name: datetime description: '' example: [] required: false schema: type: object description: '' example: [] properties: { } - in: query name: datetime.0 description: 'Start date (must be before or equal to end date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev enne või võrdne kuupäevaga datetime.1.' example: '2025-01-01' required: true schema: type: string description: 'Start date (must be before or equal to end date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev enne või võrdne kuupäevaga datetime.1.' example: '2025-01-01' - in: query name: datetime.1 description: 'End date (must be after or equal to start date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev pärast või võrdne kuupäevaga datetime.0.' example: '2025-12-31' required: true schema: type: string description: 'End date (must be after or equal to start date). Väli value peab olema kehtiv kuupäev. Väli value peab olema kuupäev pärast või võrdne kuupäevaga datetime.0.' example: '2025-12-31' - in: query name: filter description: '' example: [] required: false schema: type: object description: '' example: [] properties: { } - in: query name: filter.oid description: 'Filter by username. Väli value ei tohi olla pikem kui 255 tähemärki.' example: metrotec required: false schema: type: string description: 'Filter by username. Väli value ei tohi olla pikem kui 255 tähemärki.' example: metrotec nullable: true - in: query name: filter.user_agent description: 'Filter by user agent. Väli value ei tohi olla pikem kui 255 tähemärki.' example: Mozilla/5.0 required: false schema: type: string description: 'Filter by user agent. Väli value ei tohi olla pikem kui 255 tähemärki.' example: Mozilla/5.0 nullable: true - in: query name: filter.ip_address description: 'Filter by IP address. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 192.168.1.1 required: false schema: type: string description: 'Filter by IP address. Väli value ei tohi olla pikem kui 255 tähemärki.' example: 192.168.1.1 nullable: true responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Users security: [] /api/objects-query: get: summary: '' operationId: getApiObjectsQuery description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Vehicles requestBody: required: true content: application/json: schema: type: object properties: q: type: string description: 'Must match the regex /^[a-zA-Z0-9_]+$/. Väli value peab olema vähemalt 2 tähemärki. Väli value ei tohi olla pikem kui 50 tähemärki.' example: b required: - q security: [] /api/objects: post: summary: '' operationId: postApiObjects description: '' parameters: [] responses: { } tags: - Vehicles requestBody: required: true content: application/json: schema: type: object properties: object_id: type: string description: 'Must contain only letters, numbers, dashes and underscores. Väli value ei tohi olla pikem kui 10 tähemärki.' example: bngzmi oid: type: string description: 'Must contain only letters and numbers. Väli value ei tohi olla pikem kui 30 tähemärki.' example: 'y' Serial_Nr: type: string description: 'Must match the regex /^[0-9_]+$/. Väli value peab olema vähemalt 3 tähemärki.' example: vdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbewtnnoqitpxntltcvip GSM_NR: type: string description: 'Must match the regex /^[0-9+]+$/. Väli value peab olema vähemalt 3 tähemärki.' example: ojsausgioglrbchgsrzyhcttwbkmkftmgosgtvnbobmzezcrcvalexqztppihrtgkkrerexhqz Manufacture: type: integer description: '' example: 16 odometer: type: integer description: '' example: 16 T1max: type: integer description: '' example: 16 T2max: type: integer description: '' example: 16 odometer_day: type: string description: 'Must be a valid date in the format Y-m-d H:i:s.' example: '2026-04-13 07:54:27' description: type: string description: '' example: 'Eius et animi quos velit et.' nullable: true tank_vol: type: number description: '' example: 4326.41688 nullable: true x_coord: type: number description: '' example: 4326.41688 nullable: true y_coord: type: number description: '' example: 4326.41688 nullable: true is_fixed_gps: type: boolean description: '' example: false nullable: true required: - object_id - oid - Serial_Nr - GSM_NR - Manufacture - odometer - T1max - T2max - odometer_day security: [] '/api/objects/{id}': put: summary: '' operationId: putApiObjectsId description: '' parameters: [] responses: { } tags: - Vehicles requestBody: required: false content: application/json: schema: type: object properties: object_id: type: string description: 'Must contain only letters, numbers, dashes and underscores. Väli value ei tohi olla pikem kui 10 tähemärki.' example: bngzmi oid: type: string description: 'Must contain only letters and numbers. Väli value ei tohi olla pikem kui 30 tähemärki.' example: 'y' Serial_Nr: type: string description: 'Must match the regex /^[0-9_]+$/. Väli value peab olema vähemalt 3 tähemärki.' example: vdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbewtnnoqitpxntltcvip GSM_NR: type: string description: 'Must match the regex /^[0-9+]+$/. Väli value peab olema vähemalt 3 tähemärki.' example: ojsausgioglrbchgsrzyhcttwbkmkftmgosgtvnbobmzezcrcvalexqztppihrtgkkrerexhqz Manufacture: type: integer description: '' example: 16 odometer: type: integer description: '' example: 16 T1max: type: integer description: '' example: 16 T2max: type: integer description: '' example: 16 odometer_day: type: string description: 'Must be a valid date in the format Y-m-d H:i:s.' example: '2026-04-13 07:54:27' description: type: string description: '' example: 'Eius et animi quos velit et.' nullable: true tank_vol: type: number description: '' example: 4326.41688 nullable: true x_coord: type: number description: '' example: 4326.41688 nullable: true y_coord: type: number description: '' example: 4326.41688 nullable: true is_fixed_gps: type: boolean description: '' example: true nullable: true security: [] parameters: - in: path name: id description: 'The ID of the object.' example: architecto required: true schema: type: string '/api/rfid/{id}': get: summary: '' operationId: getApiRfidId description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Vehicles security: [] parameters: - in: path name: id description: 'The ID of the rfid.' example: architecto required: true schema: type: string '/api/navilist/{id}': get: summary: '' operationId: getApiNavilistId description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Vehicles security: [] parameters: - in: path name: id description: 'The ID of the navilist.' example: architecto required: true schema: type: string /api/navireq: post: summary: '' operationId: postApiNavireq description: '' parameters: [] responses: { } tags: - Vehicles requestBody: required: true content: application/json: schema: type: object properties: object_id: type: string description: 'Väli value ei tohi olla pikem kui 10 tähemärki.' example: bngzmi content: type: string description: '' example: architecto required: - object_id - content security: [] '/api/smslist/{id}': get: summary: '' operationId: getApiSmslistId description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Vehicles security: [] parameters: - in: path name: id description: 'The ID of the smslist.' example: architecto required: true schema: type: string /api/smsreq: post: summary: '' operationId: postApiSmsreq description: '' parameters: [] responses: { } tags: - Vehicles requestBody: required: true content: application/json: schema: type: object properties: object_id: type: string description: 'Väli value ei tohi olla pikem kui 10 tähemärki.' example: bngzmi content: type: string description: '' example: architecto required: - object_id - content security: [] /api/lastdata: get: summary: '' operationId: getApiLastdata description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Vehicles security: [] '/api/lastdata/{id}': get: summary: '' operationId: getApiLastdataId description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Vehicles security: [] parameters: - in: path name: id description: 'The ID of the lastdatum.' example: architecto required: true schema: type: string