---
updatedAt: 2025-05-21T09:37:30.000Z
agentTools:
  projectIndex: https://toursolver.readme.io/llms.txt
---

# Get optimization status

This service returns the status of an optimization.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "servers": [
    {
      "url": "https://api.geoconcept.com/tsapi",
      "description": "Production",
      "variables": {}
    }
  ],
  "info": {
    "contact": {
      "email": "support@nomadia-group.com",
      "name": "Nomadia Group",
      "url": "https://www.nomadia-group.com/contact/"
    },
    "description": "Web APIs for TourSolver.",
    "title": "TourSolver API",
    "version": "2.0"
  },
  "tags": [
    {
      "description": "Start optimizations, follow the progress, retrieve the results, etc",
      "name": "Optimization"
    }
  ],
  "paths": {
    "/status": {
      "get": {
        "description": "This service returns the status of an optimization.",
        "operationId": "getStatus",
        "parameters": [
          {
            "description": "the id of optimization task, as returned by the optimize service",
            "in": "query",
            "name": "taskId",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptimStatusResult"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/OptimStatusResult"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/OptimStatusResult"
                }
              }
            },
            "description": "Optimization status"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "servers": [
          {
            "description": "Production",
            "url": "https://api.geoconcept.com/tsapi",
            "variables": {}
          }
        ],
        "summary": "Get optimization status",
        "tags": [
          "Optimization"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "OptimStatusResult": {
        "type": "object",
        "description": "Result of status request",
        "properties": {
          "currentCo2": {
            "type": "number",
            "format": "double",
            "description": "Remaining Kg CO2 of the current solution"
          },
          "currentCost": {
            "type": "integer",
            "format": "int64",
            "description": "Cost of the current solution"
          },
          "currentCourierCost": {
            "type": "integer",
            "format": "int64",
            "description": "Courier cost of the current solution"
          },
          "currentDeliveredQuantity": {
            "type": "number",
            "format": "double",
            "description": "Total quantity delivered of the current solution"
          },
          "currentDeliveryCost": {
            "type": "integer",
            "format": "int64",
            "description": "Delivery cost of the current solution"
          },
          "currentDriveCost": {
            "type": "integer",
            "format": "int64",
            "description": "Drive cost of the current solution"
          },
          "currentDriveDistance": {
            "type": "integer",
            "format": "int64",
            "description": "Drive distance of the current solution"
          },
          "currentDriveTime": {
            "type": "integer",
            "format": "int64",
            "description": "Drive time in seconds of the current solution"
          },
          "currentFixedCost": {
            "type": "integer",
            "format": "int64",
            "description": "Fixed cost of the current solution"
          },
          "currentLateTime": {
            "type": "integer",
            "format": "int64",
            "description": "Late time in seconds of the current solution"
          },
          "currentLongTravelCost": {
            "type": "number",
            "format": "double"
          },
          "currentMaximumReloadsCost": {
            "type": "number",
            "format": "double"
          },
          "currentNights": {
            "type": "integer",
            "format": "int64"
          },
          "currentNightsCost": {
            "type": "integer",
            "format": "int64",
            "description": "Nights cost of the current solution"
          },
          "currentOpenTourNumber": {
            "type": "integer",
            "format": "int64",
            "description": "initial number of open tours (tours with at least one visit)"
          },
          "currentOverWorkCost": {
            "type": "integer",
            "format": "int64",
            "description": "Overwork cost of the current solution"
          },
          "currentOverWorkTime": {
            "type": "integer",
            "format": "int64",
            "description": "Over work time in seconds of the current solution"
          },
          "currentPickUpQuantity": {
            "type": "number",
            "format": "double",
            "description": "Total quantity picked-up of the current solution"
          },
          "currentPlannedVisits": {
            "type": "integer",
            "format": "int64",
            "description": "Number of planned visits of the current solution"
          },
          "currentRestTime": {
            "type": "integer",
            "format": "int64",
            "description": "Rest time in seconds of the current solution"
          },
          "currentUnplannedVisits": {
            "type": "integer",
            "format": "int64",
            "description": "Number of visits unplanned or delivered by a courier of the current\r\nsolution"
          },
          "currentVisitsNb": {
            "type": "integer",
            "format": "int64"
          },
          "currentWaitTime": {
            "type": "integer",
            "format": "int64",
            "description": "Wait time in seconds of the current solution"
          },
          "currentWorkCost": {
            "type": "integer",
            "format": "int64",
            "description": "Work cost of the current solution"
          },
          "currentWorkTime": {
            "type": "integer",
            "format": "int64",
            "description": "Work time in seconds of the current solution"
          },
          "errCode": {
            "type": "string",
            "description": "Error code",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "12",
              "13",
              "14",
              "100",
              "101",
              "102",
              "103",
              "104",
              "105",
              "106",
              "107",
              "108",
              "109",
              "110",
              "111",
              "112",
              "113",
              "114",
              "115",
              "116",
              "200",
              "201",
              "300",
              "301",
              "400",
              "401",
              "500",
              "501",
              "502",
              "600",
              "601",
              "602",
              "603",
              "604",
              "1000",
              "1001",
              "1002",
              "1003",
              "1004",
              "1006",
              "1007",
              "1008",
              "2000",
              "2001",
              "2002",
              "2003",
              "2004",
              "2005",
              "2006",
              "2007",
              "2008",
              "2009",
              "2010",
              "2011",
              "2021",
              "2022",
              "2023",
              "2024",
              "2025",
              "2026",
              "2027",
              "2028",
              "2029",
              "2030",
              "2031",
              "3000",
              "3001",
              "3002",
              "4000",
              "4001",
              "4002",
              "5000",
              "5001",
              "5002",
              "5003",
              "6000"
            ]
          },
          "initialCo2": {
            "type": "number",
            "format": "double",
            "description": "Remaining Kg CO2 of the initial solution"
          },
          "initialCost": {
            "type": "integer",
            "format": "int64",
            "description": "Cost of the initial solution"
          },
          "initialCourierCost": {
            "type": "integer",
            "format": "int64",
            "description": "Courier cost of the initial solution"
          },
          "initialDeliveredQuantity": {
            "type": "number",
            "format": "double",
            "description": "Total quantity delivered of the initial solution"
          },
          "initialDeliveryCost": {
            "type": "integer",
            "format": "int64",
            "description": "Delivery cost of the initial solution"
          },
          "initialDriveCost": {
            "type": "integer",
            "format": "int64",
            "description": "Drive cost of the initial solution"
          },
          "initialDriveDistance": {
            "type": "integer",
            "format": "int64",
            "description": "Drive distance of the initial solution"
          },
          "initialDriveTime": {
            "type": "integer",
            "format": "int64",
            "description": "Drive time in seconds of the initial solution"
          },
          "initialFixedCost": {
            "type": "integer",
            "format": "int64",
            "description": "Fixed cost of the initial solution"
          },
          "initialLateTime": {
            "type": "integer",
            "format": "int64",
            "description": "Late time in seconds of the initial solution"
          },
          "initialLongTravelCost": {
            "type": "number",
            "format": "double"
          },
          "initialMaximumReloadsCost": {
            "type": "number",
            "format": "double"
          },
          "initialNights": {
            "type": "integer",
            "format": "int64"
          },
          "initialNightsCost": {
            "type": "integer",
            "format": "int64",
            "description": "Nights cost of the initial solution"
          },
          "initialOpenTourNumber": {
            "type": "integer",
            "format": "int64",
            "description": "initial number of open tours (tours with at least one visit)"
          },
          "initialOverWorkCost": {
            "type": "integer",
            "format": "int64",
            "description": "Overwork cost of the initial solution"
          },
          "initialOverWorkTime": {
            "type": "integer",
            "format": "int64",
            "description": "Over work time in seconds of the initial solution"
          },
          "initialPickUpQuantity": {
            "type": "number",
            "format": "double",
            "description": "Total quantity picked-up of the initial solution"
          },
          "initialPlannedVisits": {
            "type": "integer",
            "format": "int64",
            "description": "Number of planned visits of the initial solution"
          },
          "initialRestTime": {
            "type": "integer",
            "format": "int64",
            "description": "Rest time in seconds of the initial solution"
          },
          "initialUnplannedVisits": {
            "type": "integer",
            "format": "int64",
            "description": "Number of visits unplanned or delivered by a courier of the initial\r\nsolution"
          },
          "initialVisitsNb": {
            "type": "integer",
            "format": "int64"
          },
          "initialWaitTime": {
            "type": "integer",
            "format": "int64",
            "description": "Wait time in seconds of the initial solution"
          },
          "initialWorkCost": {
            "type": "integer",
            "format": "int64",
            "description": "Work cost of the initial solution"
          },
          "initialWorkTime": {
            "type": "integer",
            "format": "int64",
            "description": "Work time in seconds of the current solution"
          },
          "message": {
            "type": "string",
            "description": "Error message"
          },
          "mileageChartRemainingTime": {
            "type": "integer",
            "format": "int64",
            "description": "Mileage and travel time matrix computing remaining time. This information\r\nmay not be available depending on the geographical area."
          },
          "optimizeStatus": {
            "type": "string",
            "description": "Current status of the optimization process",
            "enum": [
              "UNDEFINED",
              "WAITING",
              "GEOCODING",
              "MILEAGE_CHART_BUILDING",
              "RUNNING",
              "ABORTED",
              "TERMINATED",
              "ERROR",
              "SECTORIZATION_WAITING",
              "SECTORIZATION_RUNNING",
              "SECTORIZATION_FINISHED",
              "SECTORIZATION_ABORTED"
            ]
          },
          "positionInQueue": {
            "type": "integer",
            "format": "int32"
          },
          "simulationId": {
            "type": "string",
            "description": "Id of the simulation associated to this task"
          },
          "startTime": {
            "type": "string",
            "format": "date-time",
            "description": "Start time of the optimization"
          },
          "status": {
            "type": "string",
            "description": "OK or ERROR",
            "enum": [
              "OK",
              "ERROR"
            ]
          },
          "subOptimAbortedNb": {
            "type": "integer",
            "format": "int64",
            "description": "Number of sub-optimizations in aborted state"
          },
          "subOptimErrorNb": {
            "type": "integer",
            "format": "int64",
            "description": "Number of sub-optimizations in error state"
          },
          "subOptimFinishedNb": {
            "type": "integer",
            "format": "int64",
            "description": "Number of sub-optimizations in finished state"
          },
          "subOptimNb": {
            "type": "integer",
            "format": "int64",
            "description": "Number of sub-optimizations created (after pre-sectorization)"
          },
          "subOptimRunningNb": {
            "type": "integer",
            "format": "int64",
            "description": "Number of sub-optimizations in running state"
          },
          "subOptimWaitingNb": {
            "type": "integer",
            "format": "int64",
            "description": "Number of sub-optimizations in waiting state"
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "description": "The api key can be passed through an header or in the query.",
        "in": "header",
        "name": "apiKey",
        "type": "apiKey"
      }
    }
  }
}
```