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

# Export to operational planning

Exports the result of an optimization to operational planning that mobile
resources will be able to browse on the field through a mobile app.

This command only works on completed optimizations. Mobile resource
identifiers must have been set previously in TsCloud app. If optimization
period overlaps an already existing operational planning, export will
work only if the force attribut has been set to true.

# 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": "Publish routes on the mobile app, add visits, follow the fulfillment, etc",
      "name": "Fulfillment"
    }
  ],
  "paths": {
    "/exportToOperationalPlanning": {
      "post": {
        "description": "Exports the result of an optimization to operational planning that mobile\nresources will be able to browse on the field through a mobile app.\n\nThis command only works on completed optimizations. Mobile resource\nidentifiers must have been set previously in TsCloud app. If optimization\nperiod overlaps an already existing operational planning, export will\nwork only if the force attribut has been set to true.",
        "operationId": "exportToOperationPlanning",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OperationalExportRequest"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/OperationalExportRequest"
              }
            },
            "text/xml": {
              "schema": {
                "$ref": "#/components/schemas/OperationalExportRequest"
              }
            }
          }
        },
        "responses": {
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToursolverServiceResult"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ToursolverServiceResult"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ToursolverServiceResult"
                }
              }
            },
            "description": "ToursolverServiceResult with success or error message"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "servers": [
          {
            "description": "Production",
            "url": "https://api.geoconcept.com/tsapi",
            "variables": {}
          }
        ],
        "summary": "Export to operational planning",
        "tags": [
          "Fulfillment"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "LocalTime": {
        "type": "object",
        "properties": {
          "hour": {
            "type": "integer",
            "format": "int32"
          },
          "minute": {
            "type": "integer",
            "format": "int32"
          },
          "nano": {
            "type": "integer",
            "format": "int32"
          },
          "second": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "OperationalExportRequest": {
        "type": "object",
        "description": "Operational planning export parameters",
        "properties": {
          "dayNums": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "uniqueItems": true
          },
          "force": {
            "type": "boolean",
            "description": "if true, any existing operational planning will be replaced\r\n if false and if optimization period overlaps any existing operational planning, export will fail."
          },
          "generateFollowingLink": {
            "type": "boolean",
            "description": "if true, a following short link is generated and stored in each order.\r\nThis will make this export quite longer."
          },
          "resourceMapping": {
            "type": "array",
            "description": "List of MobileResourceMapping defining relation between resource identifier in optimize request and real mobile resource identifier",
            "items": {
              "$ref": "#/components/schemas/OperationalResourceMapping"
            }
          },
          "startDate": {
            "type": "string",
            "format": "date",
            "description": "real date corresponding to day 1 of optimize request data"
          },
          "taskId": {
            "type": "string",
            "description": "Task identifier. Must point to a completed optimization."
          },
          "waitForWeatherUpdate": {
            "type": "boolean",
            "description": "if true, weather info update will be synchronously : export request will end only after weather info update\r\nif false, export request will return before  weather info update is finished.\r\nNote : if generateFollowingLink is true, export will always wait weather info update."
          },
          "zoneId": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "rules": {
                "type": "object",
                "properties": {
                  "fixedOffset": {
                    "type": "boolean"
                  },
                  "transitionRules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "dayOfMonthIndicator": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "dayOfWeek": {
                          "type": "string",
                          "enum": [
                            "MONDAY",
                            "TUESDAY",
                            "WEDNESDAY",
                            "THURSDAY",
                            "FRIDAY",
                            "SATURDAY",
                            "SUNDAY"
                          ]
                        },
                        "localTime": {
                          "$ref": "#/components/schemas/LocalTime"
                        },
                        "midnightEndOfDay": {
                          "type": "boolean"
                        },
                        "month": {
                          "type": "string",
                          "enum": [
                            "JANUARY",
                            "FEBRUARY",
                            "MARCH",
                            "APRIL",
                            "MAY",
                            "JUNE",
                            "JULY",
                            "AUGUST",
                            "SEPTEMBER",
                            "OCTOBER",
                            "NOVEMBER",
                            "DECEMBER"
                          ]
                        },
                        "offsetAfter": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "totalSeconds": {
                              "type": "integer",
                              "format": "int32"
                            }
                          }
                        },
                        "offsetBefore": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "totalSeconds": {
                              "type": "integer",
                              "format": "int32"
                            }
                          }
                        },
                        "standardOffset": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "totalSeconds": {
                              "type": "integer",
                              "format": "int32"
                            }
                          }
                        },
                        "timeDefinition": {
                          "type": "string",
                          "enum": [
                            "UTC",
                            "WALL",
                            "STANDARD"
                          ]
                        }
                      }
                    }
                  },
                  "transitions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "dateTimeAfter": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "dateTimeBefore": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "duration": {
                          "type": "object",
                          "properties": {
                            "nano": {
                              "type": "integer",
                              "format": "int32"
                            },
                            "negative": {
                              "type": "boolean"
                            },
                            "seconds": {
                              "type": "integer",
                              "format": "int64"
                            },
                            "units": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "dateBased": {
                                    "type": "boolean"
                                  },
                                  "durationEstimated": {
                                    "type": "boolean"
                                  },
                                  "timeBased": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            },
                            "zero": {
                              "type": "boolean"
                            }
                          }
                        },
                        "gap": {
                          "type": "boolean"
                        },
                        "instant": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "offsetAfter": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "totalSeconds": {
                              "type": "integer",
                              "format": "int32"
                            }
                          }
                        },
                        "offsetBefore": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "totalSeconds": {
                              "type": "integer",
                              "format": "int32"
                            }
                          }
                        },
                        "overlap": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "OperationalResourceMapping": {
        "type": "object",
        "description": "The mobile resource mapping links the resource identifier used in optimized data\nand the mobile resource identifier used for operational planning export",
        "properties": {
          "averageFuelConsumption": {
            "type": "number",
            "format": "double"
          },
          "day": {
            "type": "integer",
            "format": "int32",
            "description": "Day number"
          },
          "fuelType": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "description": "resource identifier"
          },
          "operationalId": {
            "type": "string",
            "description": "Mobile identifier (login)"
          },
          "vehicleType": {
            "type": "string"
          }
        }
      },
      "ToursolverServiceResult": {
        "type": "object",
        "description": "generic result of service",
        "properties": {
          "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"
            ]
          },
          "message": {
            "type": "string",
            "description": "Error message"
          },
          "status": {
            "type": "string",
            "description": "OK or ERROR",
            "enum": [
              "OK",
              "ERROR"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "description": "The api key can be passed through an header or in the query.",
        "in": "header",
        "name": "apiKey",
        "type": "apiKey"
      }
    }
  }
}
```