[
  {
    "type": "post",
    "url": "/v1/places",
    "title": "Create",
    "version": "1.0.0",
    "group": "Places",
    "name": "Create_Place",
    "description": "<p>Create Place with name, address, latitude and longitude</p>",
    "parameter": {
      "fields": {
        "Parameter": [
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "name",
            "description": "<p>Place's name</p>"
          },
          {
            "group": "Parameter",
            "type": "String",
            "optional": false,
            "field": "address",
            "description": "<p>Place's address</p>"
          },
          {
            "group": "Parameter",
            "type": "Float",
            "optional": false,
            "field": "latitude",
            "description": "<p>Place's latitude</p>"
          },
          {
            "group": "Parameter",
            "type": "Float",
            "optional": false,
            "field": "longitude",
            "description": "<p>Place's longitude</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n  \"name\": \"CD Test\",\n  \"address\":\"Ferrocarril Dolores s/n. Esc. 952\",\n  \"latitude\":16.301138206381935,\n  \"longitude\":-16.188290091090437\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 201 OK\n{\n  \"place\": {\n    \"id\": 1,\n    \"name\": \"CD Test\",\n    \"address\":\"Ferrocarril Dolores s/n. Esc. 952\",\n    \"latitude\":16.301138206381935,\n    \"longitude\":-16.188290091090437\n  }\n}",
          "type": "JSON"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 4xx": [
          {
            "group": "Error 4xx",
            "optional": false,
            "field": "NameError",
            "description": "<p>Can't create Place without name</p>"
          },
          {
            "group": "Error 4xx",
            "optional": false,
            "field": "CoordinatesError",
            "description": "<p>Can't create Place without latitude and longitude</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "NameError",
          "content": "\nHTTP/1.1 422 Error\n{\n  \"errors\"=>\n    [\n      {\n        \"entity\"=>\"place\",\n        \"name\"=>\"El nombre del CD no puede estar en blanco\"\n      }\n    ]\n}",
          "type": "JSON"
        },
        {
          "title": "CoordinatessError",
          "content": "\nHTTP/1.1 422 Error\n{\n  \"errors\"=>\n    [\n      {\n        \"entity\"=>\"place\",\n        \"latitude\"=>\"La latitud no puede estar en blanco\"\n      },\n      {\n        \"entity\"=>\"place\",\n        \"longitude\"=>\"La longitud no puede estar en blanco\"\n      }\n    ]\n}",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/places_api_doc.rb",
    "groupTitle": "Places"
  },
  {
    "type": "delete",
    "url": "/v1/places/:id",
    "title": "Delete",
    "version": "1.0.0",
    "group": "Places",
    "name": "Delete_Place",
    "description": "<p>Delete Place by id from account</p>",
    "parameter": {
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Example:",
          "content": "HTTP/1.1 200 OK\n{\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/places_api_doc.rb",
    "groupTitle": "Places"
  },
  {
    "type": "get",
    "url": "/v1/places",
    "title": "Index",
    "version": "1.0.0",
    "group": "Places",
    "name": "Index_Place",
    "description": "<p>Show all Places from account</p>",
    "success": {
      "examples": [
        {
          "title": "Success-Example:",
          "content": "{\n  \"places\": [\n    {\n      \"id\": 1,\n      \"name\": \"CD Test\",\n      \"address\":\"Ferrocarril Dolores s/n. Esc. 952\",\n      \"latitude\":16.301138206381935,\n      \"longitude\":-16.188290091090437\n    },\n    {\n      \"id\": 2,\n      \"name\": \"CD Test 2\",\n      \"address\":\"Alonso de Córdova 5550\",\n      \"latitude\":32.301138206381935,\n      \"longitude\":-28.188290091090437\n    }\n  ]\n}",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/places_api_doc.rb",
    "groupTitle": "Places"
  },
  {
    "type": "get",
    "url": "/v1/places/:id",
    "title": "Show",
    "version": "1.0.0",
    "group": "Places",
    "name": "Show_Place",
    "description": "<p>Show Place's account by id</p>",
    "parameter": {
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Example:",
          "content": "HTTP/1.1 201 OK\n{\n  \"place\": {\n    \"id\": 1,\n    \"name\": \"CD Test\",\n    \"address\":\"Ferrocarril Dolores s/n. Esc. 952\",\n    \"latitude\":16.301138206381935,\n    \"longitude\":-16.188290091090437\n  }\n}",
          "type": "JSON"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response:",
          "content": "HTTP 1.1/ 404\n{\n  \"message\": Place not found\n}",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/places_api_doc.rb",
    "groupTitle": "Places"
  },
  {
    "type": "put",
    "url": "/v1/places/:id",
    "title": "Update",
    "version": "1.0.0",
    "group": "Places",
    "name": "Update_Place",
    "description": "<p>Update Place by id from account</p>",
    "parameter": {
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n  \"id\": 1,\n  \"address\": 'Rosario Norte 300'\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Example:",
          "content": "{\n  \"place\":\n    {\n      \"id\": 1,\n      \"name\": \"CD Test 2\",\n      \"address\":\"Rosario Norte 300\",\n      \"latitude\":32.301138206381935,\n      \"longitude\":-28.188290091090437\n    }\n}",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/places_api_doc.rb",
    "groupTitle": "Places"
  },
  {
    "type": "post",
    "url": "/v1/planner_plans",
    "title": "Create",
    "name": "Create_Plan",
    "group": "Plans",
    "version": "1.0.0",
    "description": "<p>Create Plan with StopGrops, Stops, Items, Contact, Tags and Trucks</p>",
    "parameter": {
      "fields": {
        "Plan": [
          {
            "group": "Plan",
            "type": "String",
            "optional": false,
            "field": "name",
            "description": "<p>Plan's name</p>"
          }
        ],
        "PlannerSetting": [
          {
            "group": "PlannerSetting",
            "type": "String",
            "optional": true,
            "field": "planner_setting",
            "description": "<p>PlannerSetting's name</p>"
          }
        ],
        "StopGroups": [
          {
            "group": "StopGroups",
            "type": "Integer[]",
            "optional": false,
            "field": "stop_groups_ids",
            "description": "<p>StopGroups's ids use to planning</p>"
          }
        ],
        "Trucks": [
          {
            "group": "Trucks",
            "type": "Integer[]",
            "optional": false,
            "field": "trucks_ids",
            "description": "<p>Truck's ids use to planning</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n  \"name\":\"Plan Test\",\n  \"planner_setting\":\"Estudiante\",\n  \"stop_groups_ids\":[\n     134873,\n     134874\n  ],\n  \"trucks_ids\":[\n     1415,\n     1416\n  ]\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 201 OK\n{\n  \"planner_plan\":{\n     \"id\": 1,\n     \"custom_name\":\"Plan Test\",\n     \"planner_setting\":{\n        \"name\":\"Estudiante\",\n        \"min_money\":3716,\n        \"max_money\":131109,\n        \"use_money_in_settings\":true,\n        \"min_deliveries\":2,\n        \"max_deliveries\":8,\n        \"use_deliveries_in_settings\":true,\n        \"include_service_time\":false,\n        \"laps\":2,\n        \"is_default\":false\n     },\n     \"stop_group_ids\":[134873, 134874],\n     \"truck_identifiers\":[\"VE0044\",\"VE0045\"]\n  }\n}",
          "type": "JSON"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 4xx": [
          {
            "group": "Error 4xx",
            "optional": false,
            "field": "StopGroupError",
            "description": "<p>Can't create Plan without StopGroups</p>"
          },
          {
            "group": "Error 4xx",
            "optional": false,
            "field": "TruckError",
            "description": "<p>Can't create Plan without Trucks</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "StopGroupError",
          "content": "HTTP/1.1 422 Error\n{\n   \"errors\":[\n      {\n         \"entity\":\"planner_plan\",\n         \"plan_stop_groups\":\"missing stop groups\"\n      }\n   ]\n}",
          "type": "JSON"
        },
        {
          "title": "TruckError",
          "content": "HTTP/1.1 422 Error\n{\n   \"errors\":[\n      {\n         \"entity\":\"planner_plan\",\n         \"plan_trucks\":\"missing trucks\"\n      }\n   ]\n}",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/plans_api_doc.rb",
    "groupTitle": "Plans"
  },
  {
    "type": "delete",
    "url": "/v1/planner_plans/:id",
    "title": "Delete",
    "name": "Destroy_Plan",
    "group": "Plans",
    "version": "1.0.0",
    "description": "<p>Destroy Plan from Account by id</p>",
    "parameter": {
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response",
          "content": "HTTP 1.1/ 200\n{\n  \"id\": 1\n}",
          "type": "json"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/plans_api_doc.rb",
    "groupTitle": "Plans"
  },
  {
    "type": "get",
    "url": "/v1/planner_plans",
    "title": "Index",
    "name": "Index_Plans",
    "group": "Plans",
    "version": "1.0.0",
    "description": "<p>List all Account's Plans</p>",
    "success": {
      "examples": [
        {
          "title": "Success-Response",
          "content": "  HTTP 1.1/200\n  {\n   \"planner_plans\":[\n      {\n         \"id\": 1,\n         \"custom_name\":\"IncredibleDiscount994963\",\n         \"planner_setting\":{\n            \"name\":\"Starter\",\n            \"min_money\":7211,\n            \"max_money\":141057,\n            \"use_money_in_settings\":false,\n            \"min_deliveries\":3,\n            \"max_deliveries\":6,\n            \"use_deliveries_in_settings\":false,\n            \"include_service_time\":true,\n            \"laps\":3,\n            \"is_default\":false\n         },\n         \"stop_group_ids\":[152, 524, 555],\n         \"truck_identifiers\":[\"VE0047\",\"VE0048\"]\n      },\n      {\n         \"id\": 2,\n         \"custom_name\":\"KillerSale339985\",\n         \"planner_setting\":{\n            \"name\":\"Platinum\",\n            \"min_money\":5400,\n            \"max_money\":144689,\n            \"use_money_in_settings\":true,\n            \"min_deliveries\":1,\n            \"max_deliveries\":9,\n            \"use_deliveries_in_settings\":true,\n            \"include_service_time\":false,\n            \"laps\":5,\n            \"is_default\":false\n         },\n         \"stop_group_ids\":[120, 224, 535],\n         \"truck_identifiers\":[\"VE0044\",\"VE0045\"]\n      }\n   ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/plans_api_doc.rb",
    "groupTitle": "Plans"
  },
  {
    "type": "get",
    "url": "/v1/planner_plans/:id",
    "title": "Show",
    "name": "Show_Plan",
    "group": "Plans",
    "version": "1.0.0",
    "description": "<p>Get Plan by id</p>",
    "parameter": {
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response",
          "content": "  HTTP 1.1/ 200\n  {\n   \"planner_plan\":{\n      \"id\": 1,\n      \"custom_name\":\"IncredibleDiscount994963\",\n      \"planner_setting\":{\n         \"name\":\"Starter\",\n         \"min_money\":7211,\n         \"max_money\":141057,\n         \"use_money_in_settings\":false,\n         \"min_deliveries\":3,\n         \"max_deliveries\":6,\n         \"use_deliveries_in_settings\":false,\n         \"include_service_time\":true,\n         \"laps\":3,\n         \"is_default\":false\n      },\n      \"stop_group_ids\":[120, 224, 535],\n      \"truck_identifiers\":[\"VE0044\",\"VE0045\"]\n   }\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response:",
          "content": "HTTP 1.1/ 404\n{\n  \"message\": Stop not found\n}",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/plans_api_doc.rb",
    "groupTitle": "Plans"
  },
  {
    "type": "post",
    "url": "/v1/stop_groups",
    "title": "Create",
    "name": "CreateStopGroup",
    "group": "StopGroups",
    "version": "1.0.0",
    "description": "<p>Create StopGroup with Stops, Items, Contact and Tags</p>",
    "parameter": {
      "fields": {
        "StopGroup": [
          {
            "group": "StopGroup",
            "type": "String",
            "optional": false,
            "field": "name",
            "description": "<p>StopGroup's name</p>"
          },
          {
            "group": "StopGroup",
            "type": "Object[]",
            "optional": false,
            "field": "stops",
            "description": "<p>Stops list belongs to StopGroup</p>"
          }
        ],
        "Stops": [
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.identifier",
            "description": "<p>Stop's alphanumeric identification</p>"
          },
          {
            "group": "Stops",
            "type": "Double",
            "optional": true,
            "field": "stop.latitude",
            "description": "<p>Optional Stop's latitude</p>"
          },
          {
            "group": "Stops",
            "type": "Double",
            "optional": true,
            "field": "stop.longitude",
            "description": "<p>Optional Stop's longitude</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": true,
            "field": "stop.address",
            "description": "<p>Optional Stop's address</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.min_dispatch_date",
            "description": "<p>Date with format ISO8601 Y-M-D, Y/M/D, D-M-Y or D/M/Y</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.max_dispatch_date",
            "description": "<p>Date with format ISO8601 Y-M-D, Y/M/D, D-M-Y or D/M/Y</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.window_one_start",
            "description": "<p>Hour with format ISO8601 H:M:S or H:M</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.window_one_end",
            "description": "<p>Hour with format ISO8601 H:M:S or H:M</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.window_two_start",
            "description": "<p>Hour with format ISO8601 H:M:S or H:M</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.window_two_end",
            "description": "<p>Hour with format ISO8601 H:M:S or H:M</p>"
          },
          {
            "group": "Stops",
            "type": "Integer",
            "allowedValues": [
              "0-120"
            ],
            "optional": true,
            "field": "stop.service_time",
            "description": "<p>Optional Stop's service time greater or equal to zero</p>"
          },
          {
            "group": "Stops",
            "type": "Integer",
            "allowedValues": [
              "0-9"
            ],
            "optional": true,
            "field": "stop.priority",
            "description": "<p>Optional Stop's priority values between 0 and 9, 0 is the lower priority and 9 is the highest</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.dispatch_center",
            "description": "<p>Place's name</p>"
          },
          {
            "group": "Stops",
            "type": "Object[]",
            "optional": false,
            "field": "stop.items",
            "description": "<p>Items list belongs to Stop</p>"
          },
          {
            "group": "Stops",
            "type": "Object",
            "optional": true,
            "field": "stop.contact",
            "description": "<p>Stop's Contact, if used contact.identification and contact.name are mandatory</p>"
          },
          {
            "group": "Stops",
            "type": "Object[]",
            "optional": true,
            "field": "stop.tags",
            "description": "<p>Stop's Tags</p>"
          },
          {
            "group": "Stops",
            "type": "Object[]",
            "optional": true,
            "field": "stop.groups",
            "description": "<p>Stop's Groups</p>"
          }
        ],
        "Items": [
          {
            "group": "Items",
            "type": "String",
            "optional": false,
            "field": "item.code",
            "description": "<p>Item's identifier</p>"
          },
          {
            "group": "Items",
            "type": "String",
            "optional": true,
            "field": "item.name",
            "description": "<p>Optional Item's name</p>"
          },
          {
            "group": "Items",
            "type": "Double",
            "optional": false,
            "field": "item.quantity",
            "description": "<p>Item's quantity greater than zero</p>"
          },
          {
            "group": "Items",
            "type": "Double",
            "optional": true,
            "field": "item.cost",
            "description": "<p>Optional Item's cost greater than zero</p>"
          },
          {
            "group": "Items",
            "type": "Integer[]",
            "optional": false,
            "field": "item.capacities",
            "description": "<p>Item's capacities, can be one or both</p>"
          }
        ],
        "Contact": [
          {
            "group": "Contact",
            "type": "String",
            "optional": false,
            "field": "contact.name",
            "description": "<p>Contact's name</p>"
          },
          {
            "group": "Contact",
            "type": "String",
            "optional": false,
            "field": "contact.identification",
            "description": "<p>Contact's identification</p>"
          },
          {
            "group": "Contact",
            "type": "String",
            "optional": true,
            "field": "contact.phone",
            "description": "<p>Optional Contact's phone</p>"
          },
          {
            "group": "Contact",
            "type": "String",
            "optional": true,
            "field": "contact.email",
            "description": "<p>Optional Contact's email</p>"
          }
        ],
        "Tags": [
          {
            "group": "Tags",
            "type": "String",
            "optional": false,
            "field": "tag.type",
            "description": "<p>TagType's name</p>"
          },
          {
            "group": "Tags",
            "type": "String[]",
            "optional": true,
            "field": "tag.values",
            "description": "<p>Optional Tag's values</p>"
          }
        ],
        "Groups": [
          {
            "group": "Groups",
            "type": "String",
            "optional": false,
            "field": "group.name",
            "description": "<p>GroupType's name</p>"
          },
          {
            "group": "Groups",
            "type": "String[]",
            "optional": true,
            "field": "group.names",
            "description": "<p>Optional Group's names</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Request-Example:",
          "content": "  {\n   \"name\":\"Stop Group Test\",\n   \"stops\":[\n      {\n         \"identifier\":\"Stop 1\",\n         \"latitude\":16.301138206381935,\n         \"longitude\":-16.188290091090437,\n         \"address\":\"Ferrocarril Dolores s/n. Esc. 952\",\n         \"min_dispatch_date\":\"2019-11-27\",\n         \"max_dispatch_date\":\"2019-11-30\",\n         \"window_one_start\":\"11:31:19\",\n         \"window_one_end\":\"12:31:19\",\n         \"window_two_start\":\"14:31:19\",\n         \"window_two_end\":\"15:31:19\",\n         \"service_time\":37,\n         \"priority\":8,\n         \"dispatch_center\":\"Centro Despacho Stgo 64569\",\n         \"items\":[\n            {\n               \"code\":\"Item 1\",\n               \"description\":\"Description 1\",\n               \"quantity\":42,\n               \"cost\":5,\n               \"capacities\": [4]\n            },\n            {\n               \"code\":\"Item 2\",\n               \"description\":\"Description 2\",\n               \"quantity\":34,\n               \"cost\":4,\n               \"capacities\": [4,5]\n            }\n         ],\n         \"contact\":{\n            \"name\":\"Contact 1\",\n            \"identification\":\"Identification 1\",\n            \"phone\":\"931-728-663\",\n            \"email\":\"morris_beier@reilly.org\"\n         },\n         \"tags\":[\n            {\n               \"type\":\"Type 1\",\n               \"values\":[\n                  \"Value 1\",\n                  \"Value 2\"\n               ]\n            },\n            {\n               \"type\":\"Type 2\",\n               \"values\":[\n                  \"Value 3\",\n                  \"Value 4\"\n               ]\n            }\n         ],\n         \"groups\":[\n            {\n               \"name\":\"Group One\",\n               \"names\":[\n                  \"Value One\",\n                  \"Value Two\"\n               ]\n            },\n            {\n               \"name\":\"Group Two\",\n               \"names\":[\n                  \"Value Three\",\n                  \"Value Four\"\n               ]\n            }\n         ]\n      },\n      {\n         \"identifier\":\"Stop 2\",\n         \"latitude\":67.9007013225185,\n         \"longitude\":132.46656079039963,\n         \"address\":\"Carretera Graciela 16\",\n         \"min_dispatch_date\":\"2019-11-27\",\n         \"max_dispatch_date\":\"2019-11-30\",\n         \"window_one_start\":\"11:31:19\",\n         \"window_one_end\":\"12:31:19\",\n         \"window_two_start\":\"14:31:19\",\n         \"window_two_end\":\"15:31:19\",\n         \"service_time\":43,\n         \"priority\":8,\n         \"dispatch_center\":\"Centro Despacho Stgo 14882\",\n         \"items\":[\n            {\n               \"code\":\"Item 3\",\n               \"description\":\"Description 3\",\n               \"quantity\":91,\n               \"cost\":4,\n               \"capacities\": [2]\n            },\n            {\n               \"code\":\"Item 4\",\n               \"description\":\"Description 4\",\n               \"quantity\":57,\n               \"cost\":4,\n               \"capacities\": [6,6]\n            }\n         ],\n         \"contact\":{\n            \"name\":\"Contact 2\",\n            \"identification\":\"Identification 2\",\n            \"phone\":\"950 049 743\",\n            \"email\":\"andre@johnstonhegmann.org\"\n         },\n         \"tags\":[\n            {\n               \"type\":\"Type 3\",\n               \"values\":[\n                  \"Value 5\",\n                  \"Value 6\"\n               ]\n            },\n            {\n               \"type\":\"Type 4\",\n               \"values\":[\n                  \"Value 7\",\n                  \"Value 8\"\n               ]\n            }\n         ],\n         \"groups\":[\n            {\n               \"name\":\"Group One\",\n               \"names\":[\n                  \"Value One\",\n                  \"Value Two\"\n               ]\n            },\n            {\n               \"name\":\"Group Two\",\n               \"names\":[\n                  \"Value Three\",\n                  \"Value Four\"\n               ]\n            }\n         ]\n      }\n   ]\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 201 OK\n{\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/stop_groups_api_doc.rb",
    "groupTitle": "StopGroups"
  },
  {
    "type": "delete",
    "url": "/v1/stop_groups/:id",
    "title": "Delete",
    "name": "Destroy_Stop_Group",
    "group": "StopGroups",
    "version": "1.0.0",
    "description": "<p>Destroy Stop Group from Account by id</p>",
    "parameter": {
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response",
          "content": "HTTP 1.1/ 422\n{\n  \"id\": 1\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 4xx": [
          {
            "group": "Error 4xx",
            "optional": false,
            "field": "DeleteError",
            "description": "<p>Can't delete object already destroyed</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "DeleteError",
          "content": "{\n  \"errors\"=>[\n    {\n      \"entity\" => \"stop_group\",\n      \"message\" => \"Object already destroyed\"\n    }\n  ]\n}",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/stop_groups_api_doc.rb",
    "groupTitle": "StopGroups"
  },
  {
    "type": "get",
    "url": "/v1/stop_groups",
    "title": "Index",
    "name": "Index_Stop_Groups",
    "group": "StopGroups",
    "version": "1.0.0",
    "description": "<p>List all Account's Stop Groups</p>",
    "success": {
      "examples": [
        {
          "title": "Success-Response",
          "content": "  HTTP 1.1/ 200\n{\n   \"stop_groups\"=>\n  [\n  {\n    \"id\": 1,\n    \"name\"=>\"Manuel Robles Amaya\",\n    \"account_id\"=>18605,\n    \"stops_count\"=>4,\n    \"errors\"=>{}\n  {\n    \"id\": 2,\n    \"name\"=>\"Patricio Maestas Ulibarri\",\n    \"account_id\"=>18605,\n    \"stops_count\"=>5,\n    \"errors\"=>{}\n  }\n  ]\n}",
          "type": "json"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/stop_groups_api_doc.rb",
    "groupTitle": "StopGroups"
  },
  {
    "type": "get",
    "url": "/v1/stop_groups/:id",
    "title": "Show",
    "name": "Show_Stop_Group",
    "group": "StopGroups",
    "version": "1.0.0",
    "description": "<p>Get Stop Group by id</p>",
    "parameter": {
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response",
          "content": "  HTTP 1.1/ 200\n  {\n  \"stop_group\"=>\n  {\n    \"id\": 1,\n    \"name\"=>\"Natalia Peres Sánchez\",\n    \"account_id\"=>19778,\n    \"stops_count\"=>2,\n    \"errors\": {},\n    \"stops\"=>\n      [\n      {\n        \"id\": 1,\n        \"identification\"=>\"63923\",\n        \"address\"=>\"Extramuros Florencia Reséndez\",\n        \"latitude\"=>-33.4503914919066,\n        \"longitude\"=>-70.685813673512,\n        \"place_id\"=>104486,\n        \"contact_id\"=>16928,\n        \"stop_group_id\"=>90856,\n        \"service_time\"=>31,\n        \"priority\"=>7,\n        \"capacities\": [1159.0, 7924.0],\n        \"total_cost\"=>9874.0,\n        \"items\"=>\n          [\n          {\n            \"name\"=>\"dining table\",\n            \"quantity\"=>6,\n            \"capacities\"=>[85.833, 65.194],\n            \"identification\"=>\"8127250777\",\n            \"cost\"=>nil,\n            \"stop_id\"=>16948\n          },\n          {\n            \"name\"=>\"bedside table\",\n            \"quantity\"=>3,\n            \"capacities\"=>[67.232, 55.469],\n            \"identification\"=>\"8202657872\",\n            \"cost\"=>nil,\n            \"stop_id\"=>16948\n          }\n          ],\n          \"contact\"=>\n          {\n            \"identification\"=>\"RF60386648267\",\n            \"name\"=>\"Manuel Hernandes Bustamante\",\n            \"phone\"=>\"980-330-834\",\n            \"email\"=>\"lora_towne@thiel.biz\"\n          },\n          \"tags\"=>\n            [\n            {\n              \"type\":=>\"Type 1\",\n              \"value\"=>\"et_ea_337\"\n            },\n            {\n              \"type\":=>\"Type 1\",\n              \"value\"=>\"in_et_338\"\n            }\n            ]\n      },\n      {\n        \"id\": 2,\n        \"identification\"=>\"86790\",\n        \"address\"=>\"Escalinata María Cristina Rosado\",\n        \"latitude\"=>-33.4513158848794,\n        \"longitude\"=>-70.6685852500171,\n        \"place_id\"=>104487,\n        \"contact_id\"=>17004,\n        \"stop_group_id\"=>90856,\n        \"service_time\"=>44,\n        \"priority\"=>2,\n        \"capacities\"=>[4321.0, 2086.0],\n        \"total_cost\"=>5682.0,\n        \"items\"=>\n          [\n          {\n            \"name\"=>\"dresser\",\n            \"quantity\"=>6,\n            \"capacities\"=>[51.191, 69.772],\n            \"identification\"=>\"6357526493\",\n            \"cost\"=>nil,\n            \"stop_id\"=>17022\n          },\n          {\n            \"name\"=>\"couch\",\n            \"quantity\"=>9,\n            \"capacities\"=>[65.004, 23.393],\n            \"identification\"=>\"4872183369\",\n            \"cost\"=>nil,\n            \"stop_id\"=>17022\n          }\n          ],\n        \"contact\"=>\n          {\n            \"identification\"=>\"RF198942717848973645\",\n            \"name\"=>\"Pedro Quesada Valle\",\n            \"phone\"=>\"992 357 834\",\n            \"email\"=>\"graig.swaniawski@schulistmohr.co\"\n          },\n        \"tags\"=>\n          [\n          {\n            \"type\":=>\"Type 2\",\n            \"value\"=>\"sed-ut_339\"\n          },\n          {\n            \"type\":=>\"Type 2\",\n            \"value\"=>\"nisi-ea_340\"\n          }\n          ]\n      }\n    ]\n  }\n}",
          "type": "json"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response:",
          "content": "HTTP 1.1/ 404\n{\n  \"message\": StopGroup not found\n}",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/stop_groups_api_doc.rb",
    "groupTitle": "StopGroups"
  },
  {
    "type": "put",
    "url": "/v1/stop_groups/:id",
    "title": "Update",
    "name": "UpdateStopGroup",
    "group": "StopGroups",
    "version": "1.0.0",
    "description": "<p>Update StopGroup adding Stops, Items, Contact and Tags</p>",
    "parameter": {
      "fields": {
        "StopGroup": [
          {
            "group": "StopGroup",
            "type": "Object[]",
            "optional": false,
            "field": "stops",
            "description": "<p>Stops list belongs to StopGroup</p>"
          }
        ],
        "Stops": [
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.identifier",
            "description": "<p>Stop's alphanumeric identification</p>"
          },
          {
            "group": "Stops",
            "type": "Double",
            "optional": true,
            "field": "stop.latitude",
            "description": "<p>Optional Stop's latitude</p>"
          },
          {
            "group": "Stops",
            "type": "Double",
            "optional": true,
            "field": "stop.longitude",
            "description": "<p>Optional Stop's longitude</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": true,
            "field": "stop.address",
            "description": "<p>Optional Stop's address</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.min_dispatch_date",
            "description": "<p>Date with format ISO8601 Y-M-D, Y/M/D, D-M-Y or D/M/Y</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.max_dispatch_date",
            "description": "<p>Date with format ISO8601 Y-M-D, Y/M/D, D-M-Y or D/M/Y</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.window_one_start",
            "description": "<p>Hour with format ISO8601 H:M:S or H:M</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.window_one_end",
            "description": "<p>Hour with format ISO8601 H:M:S or H:M</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.window_two_start",
            "description": "<p>Hour with format ISO8601 H:M:S or H:M</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.window_two_end",
            "description": "<p>Hour with format ISO8601 H:M:S or H:M</p>"
          },
          {
            "group": "Stops",
            "type": "Integer",
            "allowedValues": [
              "0-120"
            ],
            "optional": true,
            "field": "stop.service_time",
            "description": "<p>Optional Stop's service time greater or equal to zero</p>"
          },
          {
            "group": "Stops",
            "type": "Integer",
            "allowedValues": [
              "0-9"
            ],
            "optional": true,
            "field": "stop.priority",
            "description": "<p>Optional Stop's priority values between 0 and 9, 0 is the lower priority and 9 is the highest</p>"
          },
          {
            "group": "Stops",
            "type": "String",
            "optional": false,
            "field": "stop.dispatch_center",
            "description": "<p>Place's name</p>"
          },
          {
            "group": "Stops",
            "type": "Object[]",
            "optional": false,
            "field": "stop.items",
            "description": "<p>Items list belongs to Stop</p>"
          },
          {
            "group": "Stops",
            "type": "Object",
            "optional": true,
            "field": "stop.contact",
            "description": "<p>Stop's Contact, if used contact.identification and contact.name are mandatory</p>"
          },
          {
            "group": "Stops",
            "type": "Object[]",
            "optional": true,
            "field": "stop.tags",
            "description": "<p>Stop's Tags</p>"
          },
          {
            "group": "Stops",
            "type": "Object[]",
            "optional": true,
            "field": "stop.groups",
            "description": "<p>Stop's Groups</p>"
          }
        ],
        "Items": [
          {
            "group": "Items",
            "type": "String",
            "optional": false,
            "field": "item.code",
            "description": "<p>Item's identifier</p>"
          },
          {
            "group": "Items",
            "type": "String",
            "optional": true,
            "field": "item.name",
            "description": "<p>Optional Item's name</p>"
          },
          {
            "group": "Items",
            "type": "Double",
            "optional": false,
            "field": "item.quantity",
            "description": "<p>Item's quantity greater than zero</p>"
          },
          {
            "group": "Items",
            "type": "Double",
            "optional": true,
            "field": "item.cost",
            "description": "<p>Optional Item's cost greater than zero</p>"
          },
          {
            "group": "Items",
            "type": "Integer[]",
            "optional": false,
            "field": "item.capacities",
            "description": "<p>Item's capacities, can be one or both</p>"
          }
        ],
        "Contact": [
          {
            "group": "Contact",
            "type": "String",
            "optional": false,
            "field": "contact.name",
            "description": "<p>Contact's name</p>"
          },
          {
            "group": "Contact",
            "type": "String",
            "optional": false,
            "field": "contact.identification",
            "description": "<p>Contact's identification</p>"
          },
          {
            "group": "Contact",
            "type": "String",
            "optional": true,
            "field": "contact.phone",
            "description": "<p>Optional Contact's phone</p>"
          },
          {
            "group": "Contact",
            "type": "String",
            "optional": true,
            "field": "contact.email",
            "description": "<p>Optional Contact's email</p>"
          }
        ],
        "Tags": [
          {
            "group": "Tags",
            "type": "String",
            "optional": false,
            "field": "tag.type",
            "description": "<p>TagType's name</p>"
          },
          {
            "group": "Tags",
            "type": "String[]",
            "optional": true,
            "field": "tag.values",
            "description": "<p>Optional Tag's values</p>"
          }
        ],
        "Groups": [
          {
            "group": "Groups",
            "type": "String",
            "optional": false,
            "field": "group.name",
            "description": "<p>GroupType's name</p>"
          },
          {
            "group": "Groups",
            "type": "String[]",
            "optional": true,
            "field": "group.names",
            "description": "<p>Optional Group's names</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Request-Example:",
          "content": "  {\n   \"stops\":[\n      {\n         \"identifier\":\"Stop 1\",\n         \"latitude\":16.301138206381935,\n         \"longitude\":-16.188290091090437,\n         \"address\":\"Ferrocarril Dolores s/n. Esc. 952\",\n         \"min_dispatch_date\":\"2019-11-27\",\n         \"max_dispatch_date\":\"2019-11-30\",\n         \"window_one_start\":\"11:31:19\",\n         \"window_one_end\":\"12:31:19\",\n         \"window_two_start\":\"14:31:19\",\n         \"window_two_end\":\"15:31:19\",\n         \"service_time\":37,\n         \"priority\":8,\n         \"dispatch_center\":\"Centro Despacho Stgo 64569\",\n         \"items\":[\n            {\n               \"code\":\"Item 1\",\n               \"description\":\"Description 1\",\n               \"quantity\":42,\n               \"cost\":5,\n               \"capacities\": [4]\n            },\n            {\n               \"code\":\"Item 2\",\n               \"description\":\"Description 2\",\n               \"quantity\":34,\n               \"cost\":4,\n               \"capacities\": [4,5]\n            }\n         ],\n         \"contact\":{\n            \"name\":\"Contact 1\",\n            \"identification\":\"Identification 1\",\n            \"phone\":\"931-728-663\",\n            \"email\":\"morris_beier@reilly.org\"\n         },\n         \"tags\":[\n            {\n               \"type\":\"Type 1\",\n               \"values\":[\n                  \"Value 1\",\n                  \"Value 2\"\n               ]\n            },\n            {\n               \"type\":\"Type 2\",\n               \"values\":[\n                  \"Value 3\",\n                  \"Value 4\"\n               ]\n            }\n         ],\n         \"groups\":[\n            {\n               \"name\":\"Group One\",\n               \"names\":[\n                  \"Value One\",\n                  \"Value Two\"\n               ]\n            },\n            {\n               \"name\":\"Group Two\",\n               \"names\":[\n                  \"Value Three\",\n                  \"Value Four\"\n               ]\n            }\n         ]\n      },\n      {\n         \"identifier\":\"Stop 2\",\n         \"latitude\":67.9007013225185,\n         \"longitude\":132.46656079039963,\n         \"address\":\"Carretera Graciela 16\",\n         \"min_dispatch_date\":\"2019-11-27\",\n         \"max_dispatch_date\":\"2019-11-30\",\n         \"window_one_start\":\"11:31:19\",\n         \"window_one_end\":\"12:31:19\",\n         \"window_two_start\":\"14:31:19\",\n         \"window_two_end\":\"15:31:19\",\n         \"service_time\":43,\n         \"priority\":8,\n         \"dispatch_center\":\"Centro Despacho Stgo 14882\",\n         \"items\":[\n            {\n               \"code\":\"Item 3\",\n               \"description\":\"Description 3\",\n               \"quantity\":91,\n               \"cost\":4,\n               \"capacities\": [2]\n            },\n            {\n               \"code\":\"Item 4\",\n               \"description\":\"Description 4\",\n               \"quantity\":57,\n               \"cost\":4,\n               \"capacities\": [6,6]\n            }\n         ],\n         \"contact\":{\n            \"name\":\"Contact 2\",\n            \"identification\":\"Identification 2\",\n            \"phone\":\"950 049 743\",\n            \"email\":\"andre@johnstonhegmann.org\"\n         },\n         \"tags\":[\n            {\n               \"type\":\"Type 3\",\n               \"values\":[\n                  \"Value 5\",\n                  \"Value 6\"\n               ]\n            },\n            {\n               \"type\":\"Type 4\",\n               \"values\":[\n                  \"Value 7\",\n                  \"Value 8\"\n               ]\n            }\n         ],\n         \"groups\":[\n            {\n               \"name\":\"Group One\",\n               \"names\":[\n                  \"Value One\",\n                  \"Value Two\"\n               ]\n            },\n            {\n               \"name\":\"Group Two\",\n               \"names\":[\n                  \"Value Three\",\n                  \"Value Four\"\n               ]\n            }\n         ]\n      }\n   ]\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 201 OK\n{\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 4xx": [
          {
            "group": "Error 4xx",
            "optional": false,
            "field": "PlanStopGroupError",
            "description": "<p>Can't add Stops to StopGroup already planned</p>"
          },
          {
            "group": "Error 4xx",
            "optional": false,
            "field": "SourceStopGroupError",
            "description": "<p>Can't update stop groups loaded from website</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "PlanStopGroupError",
          "content": "HTTP/1.1 422 Error\n{\n  \"errors\": [\n      {\n          \"entity\": \"stop_group\",\n          \"plan\": \"Can't add Stops to StopGroup already planned\"\n      }\n    ]\n }",
          "type": "JSON"
        },
        {
          "title": "SourceStopGroupError",
          "content": "HTTP/1.1 422 Error\n{\n  \"errors\": [\n      {\n          \"entity\": \"stop_group\",\n          \"source\": \"Can't update stop groups loaded from website\"\n      }\n    ]\n }",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/stop_groups_api_doc.rb",
    "groupTitle": "StopGroups"
  },
  {
    "type": "delete",
    "url": "/v1/stop_groups/:stop_group_id/stops/:id",
    "title": "Delete",
    "version": "1.0.0",
    "group": "Stops",
    "name": "Delete_Stop",
    "description": "<p>Delete Stop by id from StopGroup</p>",
    "parameter": {
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{ \"stop_group_id\": 1,\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Example:",
          "content": "HTTP/1.1 200 OK\n{ \"stop_group_id\": 1,\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 4xx": [
          {
            "group": "Error 4xx",
            "optional": false,
            "field": "Stop",
            "description": "<p>not found</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "DeleteError",
          "content": "{  \"message\": Stop not found}",
          "type": "JSON"
        },
        {
          "title": "DeleteError",
          "content": "{  \"entity\": 'stop',\n   \"stop\" : 'Can not delete a already planned stop'}",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/stops_api_doc.rb",
    "groupTitle": "Stops"
  },
  {
    "type": "get",
    "url": "/v1/stop_groups/:stop_group_id/stops/:id",
    "title": "Show",
    "name": "Stops",
    "group": "Stops",
    "version": "1.0.0",
    "description": "<p>Show Stop from some StopGroup</p>",
    "parameter": {
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n  \"stop_group_id\": 1,\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response",
          "content": "  HTTP 1.1/ 200\n  {\n  \"stop\" : \n    {\n      \"id\": 1,\n      \"identification\" : \"75134\",\n      \"address\" : \"Bloque Jesús Bueno\",\n      \"latitude\" : -33.4505550462081,\n      \"longitude\" : -70.6442797025955,\n      \"stop_group_id\" : 16952,\n      \"service_time\" : 40,\n      \"priority\" : 7,\n      \"total_capacity_one\" : 8023.0,\n      \"total_capacity_two\" : 6236.0,\n      \"total_cost\" : 5051.0,\n      \"items\" : \n        [\n          {\n            \"name\" : \"armchair\\\"\",\n            \"quantity\" : 8,\n            \"capacity_one\" : 60.955,\n            \"capacity_two\" : 21.019,\n            \"identification\" : \"2397352215\",\n            \"cost\" : nil,\n            \"stop_id\" : 429\n          },\n          {\n            \"name\" : \"bed\",\n            \"quantity\" : 9,\n            \"capacity_one\" : 18.112,\n            \"capacity_two\" : 41.781,\n            \"identification\" : \"0837011757\",\n            \"cost\" : nil,\n            \"stop_id\" : 429\n          },\n        ],\n        \"contact\" : \n          {\n            \"identification\" : \"RF79995521118466447\",\n            \"name\" : \"Sta. Teresa Cabán Miramontes\",\n            \"phone\" : \"983373451\",\n            \"email\" : \"trevor_keebler@parker.name\"\n          },\n          \"tags\" : \n          [\n            {\n              \"type\": : \"Type 1\",\n              \"value\" : \"itaque-id_7\"\n            },\n            {\n              \"type\": : \"Type 1\",\n              \"value\" : \"blanditiis-doloremque_8\"\n            }\n          ],\n          \"delivery_times\" : \n          [\n            {\n              \"min_delivery_time\" : \"2019-12-25T10:29:26.090-03:00\",\n              \"max_delivery_time\" : \"2019-12-25T14:02:26.090-03:00\"\n            },\n            {\n              \"min_delivery_time\" : \"2019-12-25T10:29:26.090-03:00\",\n              \"max_delivery_time\" : \"2019-12-25T14:02:26.090-03:00\"\n            }\n          ]\n      }\n}",
          "type": "JSON"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response:",
          "content": "HTTP 1.1/ 404\n{\n  \"message\": Stop not found\n}",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/stops_api_doc.rb",
    "groupTitle": "Stops"
  },
  {
    "type": "put",
    "url": "/v1/stop_groups/:stop_group_id/stops/:id",
    "title": "Update",
    "group": "Stops",
    "version": "1.0.0",
    "name": "Update_Stop",
    "description": "<p>Update Stop</p>",
    "parameter": {
      "fields": {
        "StopGroup": [
          {
            "group": "StopGroup",
            "type": "Integer",
            "optional": false,
            "field": "stop_group_id",
            "description": "<p>StopGroup</p>"
          }
        ],
        "Stop": [
          {
            "group": "Stop",
            "type": "Integer",
            "optional": false,
            "field": "stop.id",
            "description": "<p>Stop's numeric identifier</p>"
          },
          {
            "group": "Stop",
            "type": "String",
            "optional": false,
            "field": "stop.identifier",
            "description": "<p>Stop's alphanumeric identification</p>"
          },
          {
            "group": "Stop",
            "type": "Double",
            "optional": true,
            "field": "stop.latitude",
            "description": "<p>Optional Stop's latitude</p>"
          },
          {
            "group": "Stop",
            "type": "Double",
            "optional": true,
            "field": "stop.longitude",
            "description": "<p>Optional Stop's longitude</p>"
          },
          {
            "group": "Stop",
            "type": "String",
            "optional": true,
            "field": "stop.address",
            "description": "<p>Optional Stop's address</p>"
          },
          {
            "group": "Stop",
            "type": "Integer",
            "optional": true,
            "field": "stop.service_time",
            "description": "<p>Optional Stop's service time greater or equal to zero</p>"
          },
          {
            "group": "Stop",
            "type": "Integer",
            "allowedValues": [
              "0-9"
            ],
            "optional": true,
            "field": "stop.priority",
            "description": "<p>Optional Stop's priority values between 0 and 9, 0 is the lower priority and 9 is the highest</p>"
          },
          {
            "group": "Stop",
            "type": "String",
            "optional": false,
            "field": "stop.dispatch_center",
            "description": "<p>Place's name</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n  \"stop_group_id\": 1,\n  \"id\": 1,\n  \"stop\": {\n      \"id\": 1473,\n      \"identifier\": \"28176573567\",\n      \"address\": \"Arbón 3927, Lo Barnechea\",\n      \"latitude\": 16.301138206381935,\n      \"longitude\": -16.188290091090437,\n      \"service_time\": 3,\n      \"priority\": 5,\n      \"dispatch_center\": \"CD BADAJOZ\"\n  }\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 201 OK\n{\n  {\n  \"stop\": {\n      \"id\": 1473,\n      \"identification\": \"28176573567\",\n      \"address\": \"Arbón 3927, Lo Barnechea\",\n      \"latitude\": 16.301138206381935,\n      \"longitude\": -16.188290091090437,\n      \"stop_group_id\": 4,\n      \"service_time\": 3,\n      \"priority\": 5,\n      \"total_cost\": 0.0,\n      \"capacities\": [\n          2.0,\n          0.0\n      ],\n      \"place\": {\n          \"id\": 400,\n          \"name\": \"CD BADAJOZ\",\n          \"address\": \"Calle Badajoz 45, 7550000 Las Condes, Región Metropolitana de Santiago, República de Chile\",\n          \"latitude\": \"-33.409297\",\n          \"longitude\": \"-70.57204\",\n          \"account_id\": 806\n      },\n      \"delivery_times\": [\n          {\n              \"min_delivery_time\": \"2021-12-30T10:20:00.000-03:00\",\n              \"max_delivery_time\": \"2021-12-30T13:20:00.000-03:00\"\n          },\n          {\n              \"min_delivery_time\": \"2021-12-30T15:20:00.000-03:00\",\n              \"max_delivery_time\": \"2021-12-30T19:20:00.000-03:00\"\n          },\n          {\n              \"min_delivery_time\": \"2021-12-31T10:20:00.000-03:00\",\n              \"max_delivery_time\": \"2021-12-31T13:20:00.000-03:00\"\n          },\n          {\n              \"min_delivery_time\": \"2021-12-31T15:20:00.000-03:00\",\n              \"max_delivery_time\": \"2021-12-31T19:20:00.000-03:00\"\n          }\n      ]\n  }\n}",
          "type": "JSON"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response:",
          "content": "HTTP 1.1/ 404\n{\n  \"errors\": [\n      {\n          \"entity\": \"stop\",\n          \"stop\": \"Stop not found\"\n      }\n    ]\n }",
          "type": "JSON"
        },
        {
          "title": "PlanStopGroupError",
          "content": "HTTP 1.1/ 422\n{\n  \"errors\": [\n      {\n          \"entity\": \"stop\",\n          \"stop\": \"This stop belongs to a already planned stop group\"\n      }\n    ]\n }",
          "type": "JSON"
        }
      ],
      "fields": {
        "Error 4xx": [
          {
            "group": "Error 4xx",
            "optional": false,
            "field": "PlanStopGroupError",
            "description": "<p>Can't update Stops of a  already planned StopGroup</p>"
          }
        ]
      }
    },
    "filename": "app/controllers/concerns/api_doc/v1/stops_api_doc.rb",
    "groupTitle": "Stops"
  },
  {
    "type": "post",
    "url": "/v1/trucks",
    "title": "Create",
    "version": "1.0.0",
    "group": "Trucks",
    "name": "CreateTruck",
    "description": "<p>Create Truck with TruckContext and Tags</p>",
    "parameter": {
      "fields": {
        "Truck": [
          {
            "group": "Truck",
            "type": "String",
            "optional": false,
            "field": "identifier",
            "description": "<p>Truck's identifier</p>"
          },
          {
            "group": "Truck",
            "type": "String",
            "optional": false,
            "field": "start_place",
            "description": "<p>Place's name where start the route</p>"
          },
          {
            "group": "Truck",
            "type": "String",
            "optional": true,
            "field": "end_place",
            "description": "<p>Optional Place's name  where end the route</p>"
          },
          {
            "group": "Truck",
            "type": "String",
            "optional": false,
            "field": "start_work_time",
            "description": "<p>Hour with format ISO8601</p>"
          },
          {
            "group": "Truck",
            "type": "String",
            "optional": false,
            "field": "end_work_time",
            "description": "<p>Hour with format ISO8601</p>"
          },
          {
            "group": "Truck",
            "type": "String",
            "optional": false,
            "field": "start_spare_time",
            "description": "<p>Hour with format ISO8601</p>"
          },
          {
            "group": "Truck",
            "type": "String",
            "optional": false,
            "field": "end_spare_time",
            "description": "<p>Hour with format ISO8601</p>"
          },
          {
            "group": "Truck",
            "type": "Float",
            "optional": false,
            "field": "capacity_one",
            "description": "<p>Truck's capacity one greater than zero</p>"
          },
          {
            "group": "Truck",
            "type": "Float",
            "optional": true,
            "field": "capacity_two",
            "description": "<p>Optional Truck's capacity two greater than zero</p>"
          },
          {
            "group": "Truck",
            "type": "Integer",
            "optional": true,
            "field": "max_transport_point_count_per_tour",
            "description": "<p>Optional Truck's maximum deliveries per route greater than zero</p>"
          },
          {
            "group": "Truck",
            "type": "Double",
            "optional": true,
            "field": "max_driving_period_per_chain",
            "description": "<p>Optional Truck's maximum duration in hours of all routes that the vehicle can do greater than zero</p>"
          },
          {
            "group": "Truck",
            "type": "Integer",
            "optional": true,
            "field": "max_tour_count_per_chain",
            "description": "<p>Optional Truck's maximum number of rounds greater than zero</p>"
          },
          {
            "group": "Truck",
            "type": "Integer",
            "optional": true,
            "field": "max_distance_per_tour",
            "description": "<p>Optional Truck's maximum distance per route in kilometers greater than zero</p>"
          },
          {
            "group": "Truck",
            "type": "Double",
            "optional": true,
            "field": "driving_period_factor",
            "description": "<p>Optional Truck's traffic level greater than zero</p>"
          },
          {
            "group": "Truck",
            "type": "Double",
            "optional": true,
            "field": "intermediate_period",
            "description": "<p>Optional Truck's dispatch center load time in hours greater than zero</p>"
          },
          {
            "group": "Truck",
            "type": "Double",
            "optional": true,
            "field": "max_money",
            "description": "<p>Optional Truck's max money per route greater than zero</p>"
          },
          {
            "group": "Truck",
            "type": "Double",
            "optional": true,
            "field": "cost_per_chain",
            "description": "<p>Optional Truck's cost per use greater than zero</p>"
          },
          {
            "group": "Truck",
            "type": "Double",
            "optional": true,
            "field": "cost_per_km",
            "description": "<p>Optional Truck's cost per kilometer greater than zero</p>"
          },
          {
            "group": "Truck",
            "type": "Double",
            "optional": true,
            "field": "cost_per_hour",
            "description": "<p>Optional Truck's cost per hour greater than zero</p>"
          },
          {
            "group": "Truck",
            "type": "Double",
            "optional": true,
            "field": "fixed_costs",
            "description": "<p>Optional Truck's fixed cost per round greater than zero</p>"
          },
          {
            "group": "Truck",
            "type": "boolean",
            "optional": true,
            "field": "end_in_last_point",
            "description": "<p>Optional Consider return to dispatch center</p>"
          }
        ],
        "Tags": [
          {
            "group": "Tags",
            "type": "Object[]",
            "optional": false,
            "field": "tags",
            "description": "<p>Truck's Tags</p>"
          },
          {
            "group": "Tags",
            "type": "String",
            "optional": false,
            "field": "tag.type",
            "description": "<p>TagType's name</p>"
          },
          {
            "group": "Tags",
            "type": "String[]",
            "optional": true,
            "field": "tag.values",
            "description": "<p>Optional Tag's values</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n    \"identifier\":\"Truck Identifier Test\",\n    \"start_place\":\"Centro Despacho Stgo 44035\",\n    \"end_place\":\"Centro Despacho Stgo 62660\",\n    \"capacity_one\":2829,\n    \"capacity_two\":3135,\n    \"start_work_time\":\"15:33:26\",\n    \"end_work_time\":\"16:33:26\",\n    \"start_spare_time\":\"18:33:26\",\n    \"end_spare_time\":\"19:33:26\",\n    \"max_transport_point_count_per_tour\":1,\n    \"max_driving_period_per_chain\":25200,\n    \"max_tour_count_per_chain\":1,\n    \"max_distance_per_tour\":35,\n    \"driving_period_factor\":1.1,\n    \"intermediate_period\":30,\n    \"max_money\":500000,\n    \"cost_per_chain\":15000,\n    \"cost_per_km\":1200,\n    \"cost_per_hour\":72000,\n    \"fixed_costs\":30000,\n    \"end_in_last_point\":true,\n    \"tags\":[\n       {\n          \"type\":\"Type 1\",\n          \"values\":[\n             \"Value 1\",\n             \"Value 2\"\n          ]\n       },\n       {\n          \"type\":\"Type 2\",\n          \"values\":[\n             \"Value 3\",\n             \"Value 4\"\n          ]\n       }\n    ]\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Response:",
          "content": "HTTP/1.1 201 OK\n{\n    \"truck\":{\n       \"id\": 1,\n       \"identifier\":\"Truck Identifier Test\",\n       \"is_deleted\": null,\n       \"truck_context\":{\n          \"work_time\":\"2019-12-06 18:33:26 UTC..2019-12-06 19:33:26 UTC\",\n          \"spare_time\":\"2019-12-06 21:33:26 UTC..2019-12-06 22:33:26 UTC\",\n          \"capacity_one\":2829.0,\n          \"capacity_two\":3135.0,\n          \"max_transport_point_count_per_tour\":1,\n          \"max_driving_period_per_chain\":25200,\n          \"max_tour_count_per_chain\":1,\n          \"max_distance_per_tour\":35,\n          \"driving_period_factor\":1.1,\n          \"intermediate_period\":30,\n          \"max_money\":500000,\n          \"cost_per_chain\":15000,\n          \"cost_per_km\":1200,\n          \"cost_per_hour\":72000,\n          \"fixed_costs\":30000,\n          \"end_in_last_point\":true,\n          \"start_place\":{\n             \"name\":\"Centro Despacho Stgo 44035\",\n             \"address\":\"Barrio Graciela\",\n             \"latitude\":\"-33.451579\",\n             \"longitude\":\"-70.656355\",\n             \"account_id\":172\n          },\n          \"end_place\":{\n             \"name\":\"Centro Despacho Stgo 62660\",\n             \"address\":\"Parcela Inés Crespo\",\n             \"latitude\":\"-33.451616\",\n             \"longitude\":\"-70.704536\",\n             \"account_id\":172\n          }\n       },\n       \"tags\":[\n          {\n             \"type\":\"Type 1\",\n             \"value\":\"Value 1\"\n          },\n          {\n             \"type\":\"Type 1\",\n             \"value\":\"Value 2\"\n          },\n          {\n             \"type\":\"Type 2\",\n             \"value\":\"Value 3\"\n          },\n          {\n             \"type\":\"Type 2\",\n             \"value\":\"Value 4\"\n          }\n       ]\n    }\n}",
          "type": "JSON"
        }
      ]
    },
    "error": {
      "fields": {
        "Error 4xx": [
          {
            "group": "Error 4xx",
            "optional": false,
            "field": "IdentifierError",
            "description": "<p>Can't create Truck without identifier</p>"
          }
        ]
      },
      "examples": [
        {
          "title": "IdentifierError",
          "content": "HTTP/1.1 422 Error\n{\n  \"errors\"=>\n    [\n      {\n        \"entity\"=>\"truck\",\n        \"identifier\"=> \"Can't be blank\"\n      }\n    ]\n}",
          "type": "JSON"
        }
      ]
    },
    "filename": "app/controllers/concerns/api_doc/v1/trucks_api_doc.rb",
    "groupTitle": "Trucks"
  },
  {
    "type": "delete",
    "url": "/v1/trucks/:id",
    "title": "Delete",
    "name": "Delete_Truck",
    "group": "Trucks",
    "description": "<p>Delete Truck from account by id</p>",
    "parameter": {
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Example:",
          "content": "{\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "version": "0.0.0",
    "filename": "app/controllers/concerns/api_doc/v1/trucks_api_doc.rb",
    "groupTitle": "Trucks"
  },
  {
    "type": "get",
    "url": "/v1/trucks",
    "title": "Index",
    "name": "Index_Trucks",
    "group": "Trucks",
    "description": "<p>Get all Trucks from account</p>",
    "success": {
      "examples": [
        {
          "title": "Success-Request:",
          "content": "HTTP/1.1 200 OK\n{\n  \"trucks\": [\n    {\n       \"id\": 1,\n       \"identifier\":\"Truck Identifier Test\",\n       \"is_deleted\": null,\n       \"truck_context\":{\n          \"work_time\":\"2019-12-06 18:33:26 UTC..2019-12-06 19:33:26 UTC\",\n          \"spare_time\":\"2019-12-06 21:33:26 UTC..2019-12-06 22:33:26 UTC\",\n          \"capacity_one\":2829.0,\n          \"capacity_two\":3135.0,\n          \"max_transport_point_count_per_tour\":1,\n          \"max_driving_period_per_chain\":25200,\n          \"max_tour_count_per_chain\":1,\n          \"max_distance_per_tour\":35,\n          \"driving_period_factor\":1.1,\n          \"intermediate_period\":30,\n          \"max_money\":500000,\n          \"cost_per_chain\":15000,\n          \"cost_per_km\":1200,\n          \"cost_per_hour\":72000,\n          \"fixed_costs\":30000,\n          \"end_in_last_point\":true,\n          \"start_place\":{\n             \"name\":\"Centro Despacho Stgo 44035\",\n             \"address\":\"Barrio Graciela\",\n             \"latitude\":\"-33.451579\",\n             \"longitude\":\"-70.656355\",\n             \"account_id\":172\n          },\n          \"end_place\":{\n             \"name\":\"Centro Despacho Stgo 62660\",\n             \"address\":\"Parcela Inés Crespo\",\n             \"latitude\":\"-33.451616\",\n             \"longitude\":\"-70.704536\",\n             \"account_id\":172\n          }\n       },\n       \"tags\":[\n          {\n             \"type\":\"Type 1\",\n             \"value\":\"Value 1\"\n          },\n          {\n             \"type\":\"Type 1\",\n             \"value\":\"Value 2\"\n          }\n       ]\n    },\n    {\n       \"id\": 2,\n       \"identifier\":\"Truck Identifier Test 2\",\n       \"is_deleted\": null,\n       \"truck_context\":{\n          \"work_time\":\"2019-12-06 18:33:26 UTC..2019-12-06 19:33:26 UTC\",\n          \"spare_time\":\"2019-12-06 21:33:26 UTC..2019-12-06 22:33:26 UTC\",\n          \"capacity_one\":2829.0,\n          \"capacity_two\":3135.0,\n          \"max_transport_point_count_per_tour\":1,\n          \"max_driving_period_per_chain\":25200,\n          \"max_tour_count_per_chain\":1,\n          \"max_distance_per_tour\":35,\n          \"driving_period_factor\":1.1,\n          \"intermediate_period\":30,\n          \"max_money\":500000,\n          \"cost_per_chain\":15000,\n          \"cost_per_km\":1200,\n          \"cost_per_hour\":72000,\n          \"fixed_costs\":30000,\n          \"end_in_last_point\":true,\n          \"start_place\":{\n             \"name\":\"Centro Despacho Stgo 43035\",\n             \"address\":\"Barrio Graciel\",\n             \"latitude\":\"-33.451579\",\n             \"longitude\":\"-70.656355\",\n             \"account_id\":172\n          },\n          \"end_place\":{\n             \"name\":\"Centro Despacho Stgo 42660\",\n             \"address\":\"Parcela Inés Crespo\",\n             \"latitude\":\"-33.451616\",\n             \"longitude\":\"-70.704536\",\n             \"account_id\":172\n          }\n       },\n       \"tags\":[\n          {\n             \"type\":\"Type 2\",\n             \"value\":\"Value 3\"\n          },\n          {\n             \"type\":\"Type 2\",\n             \"value\":\"Value 4\"\n          }\n    }\n  ]\n}",
          "type": "JSON"
        }
      ]
    },
    "version": "0.0.0",
    "filename": "app/controllers/concerns/api_doc/v1/trucks_api_doc.rb",
    "groupTitle": "Trucks"
  },
  {
    "type": "get",
    "url": "/v1/trucks/:id",
    "title": "Show",
    "name": "Show_Truck",
    "group": "Trucks",
    "description": "<p>Show Truck from account by id</p>",
    "parameter": {
      "examples": [
        {
          "title": "Request-Example:",
          "content": "{\n  \"id\": 1\n}",
          "type": "JSON"
        }
      ]
    },
    "success": {
      "examples": [
        {
          "title": "Success-Example:",
          "content": "{\n  \"truck\":\n    {\n       \"id\": 1,\n       \"identifier\":\"Truck Identifier Test\",\n       \"is_deleted\": null,\n       \"truck_context\":{\n          \"work_time\":\"2019-12-06 18:33:26 UTC..2019-12-06 19:33:26 UTC\",\n          \"spare_time\":\"2019-12-06 21:33:26 UTC..2019-12-06 22:33:26 UTC\",\n          \"capacity_one\":2829.0,\n          \"capacity_two\":3135.0,\n          \"max_transport_point_count_per_tour\":1,\n          \"max_driving_period_per_chain\":25200,\n          \"max_tour_count_per_chain\":1,\n          \"max_distance_per_tour\":35,\n          \"driving_period_factor\":1.1,\n          \"intermediate_period\":30,\n          \"max_money\":500000,\n          \"cost_per_chain\":15000,\n          \"cost_per_km\":1200,\n          \"cost_per_hour\":72000,\n          \"fixed_costs\":30000,\n          \"end_in_last_point\":true,\n          \"start_place\":{\n             \"name\":\"Centro Despacho Stgo 44035\",\n             \"address\":\"Barrio Graciela\",\n             \"latitude\":\"-33.451579\",\n             \"longitude\":\"-70.656355\",\n             \"account_id\":172\n          },\n          \"end_place\":{\n             \"name\":\"Centro Despacho Stgo 62660\",\n             \"address\":\"Parcela Inés Crespo\",\n             \"latitude\":\"-33.451616\",\n             \"longitude\":\"-70.704536\",\n             \"account_id\":172\n          }\n       },\n       \"tags\":[\n          {\n             \"type\":\"Type 1\",\n             \"value\":\"Value 1\"\n          },\n          {\n             \"type\":\"Type 1\",\n             \"value\":\"Value 2\"\n          }\n       ]\n    },\n}",
          "type": "JSON"
        }
      ]
    },
    "error": {
      "examples": [
        {
          "title": "Error-Response:",
          "content": "HTTP 1.1/ 404\n{\n  \"message\": Truck not found\n}",
          "type": "JSON"
        }
      ]
    },
    "version": "0.0.0",
    "filename": "app/controllers/concerns/api_doc/v1/trucks_api_doc.rb",
    "groupTitle": "Trucks"
  }
]
