{"__v":7,"_id":"54464b7af4fc090800349e9b","category":{"__v":7,"_id":"544646d182bd7e0800276763","pages":["54464b7af4fc090800349e9b","5446504c82bd7e0800276778","54464d84f4fc090800349ea1","5447c6e28d7af31a00dd409c","549d3eba7805690b004a86a3","5528e3b62b0d220d00a20860","563b5786c989250d0074c702","563b5934c989250d0074c70a"],"project":"544371233a1a031a00db621d","version":"544371233a1a031a00db6220","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-21T11:43:13.835Z","from_sync":false,"order":4,"slug":"way-point","title":"Way Point"},"editedParams":true,"editedParams2":true,"is_link":false,"parentDoc":null,"project":"544371233a1a031a00db621d","user":"544370c53a1a031a00db621c","version":{"__v":19,"_id":"544371233a1a031a00db6220","project":"544371233a1a031a00db621d","createdAt":"2014-10-19T08:06:59.858Z","releaseDate":"2014-10-19T08:06:59.858Z","categories":["544371233a1a031a00db6221","544373693a1a031a00db6224","5443799eeec0081a00075161","544646d182bd7e0800276763","54478af0b96a63140077d670","54479a7eb96a63140077d6a9","5447af97a1024f14005a6e0a","5447c23e8d7af31a00dd408a","5447c6a28d7af31a00dd409b","5447c8fd0319802200fc065b","5447c9020319802200fc065c","544e42acbd51b9080037f837","5451f39514af501a00b50fa0","5451f421fcaba808000c0f4c","546760c2016b480800bc7bd7","549d423f7805690b004a86a5","54a9516a2c8d8d0b00d08d78","54d9e792537ac319002bf90b","561466bb0ab2550d00166dbd"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-10-21T12:03:06.154Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"basic_auth":false,"examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"success\": true,\n    \"way_point\": {\n        \"id\": 1,\n        \"customer_id\": 1,\n        \"scheduled_at\": \"2013-10-17T22:47:58.000Z\",\n        \"address\": \"416 Water St. New York, NY 10002\",\n        \"lat\": 32.4345345,\n        \"lng\": 34.534534\n    }\n}","name":""},{"status":200,"language":"json","code":"{\n    \"success\": false,\n    \"message\": \"failure description\"\n}","name":"Failure"},{"code":"","language":"text","status":401},{"code":"","language":"text","status":404}]},"settings":"","try":false,"auth":"never","params":[{"_id":"54464b7af4fc090800349e9d","ref":"","in":"path","required":true,"desc":"Unique identifier representing a task","default":"","type":"int","name":"task_id"},{"_id":"54464d3782bd7e0800276773","ref":"","in":"body","required":true,"desc":"Unique identifier representing a customer","default":"","type":"int","name":"customer_id"},{"_id":"544cdd2611845f0e001ed94f","ref":"","in":"body","required":true,"desc":"Unique identifier representing a company","default":"","type":"int","name":"company_id"},{"_id":"54464d3782bd7e0800276772","ref":"","in":"body","required":false,"desc":"Scheduled time for way point (format: %Y-%m-%dT%H:%M:%S%z)","default":"","type":"string","name":"scheduled_at"},{"_id":"54464d3782bd7e0800276771","ref":"","in":"body","required":false,"desc":"Address of way point","default":"","type":"string","name":"address"},{"_id":"564451fa9ce94c0d00068cda","ref":"","in":"body","required":false,"desc":"2nd line of address","default":"","type":"string","name":"address_second_line"},{"_id":"54464d3782bd7e0800276770","ref":"","in":"body","required":false,"desc":"Latitude component of way point location","default":"","type":"double","name":"lat"},{"_id":"54464d3782bd7e080027676f","ref":"","in":"body","required":false,"desc":"Longitude component of way point location","default":"","type":"double","name":"lng"},{"_id":"54464d3782bd7e080027676e","ref":"","in":"body","required":false,"desc":"Note to the driver","default":"","type":"string","name":"note"},{"_id":"561bbdb203bce90d00c4bdb2","ref":"","in":"body","required":false,"desc":"Allow scanning inventory at this way point","default":"","type":"boolean","name":"allow_scanning_inventory"},{"_id":"561bbdb203bce90d00c4bdb1","ref":"","in":"body","required":false,"desc":"Driver can't leave way point before scanning inventory","default":"","type":"boolean","name":"must_approve_inventory, :"},{"_id":"561bbdb203bce90d00c4bdb0","ref":"","in":"body","required":false,"desc":"Allow driver to change inventory","default":"","type":"boolean","name":"allow_editing_inventory"},{"_id":"56b8af4786d2b0190070bd2f","ref":"","in":"body","required":false,"desc":"Task window bottom limit","default":"","type":"timestamp","name":"no_earlier_than"},{"_id":"56b8af4786d2b0190070bd2e","ref":"","in":"body","required":false,"desc":"Task window top limit","default":"","type":"timestamp","name":"no_later_than"}],"url":"/tasks/:task_id/way_points"},"isReference":false,"order":0,"body":"The *Create Way Point* endpoint adds a single way point for an existing task. for adding more than one way point use [Create Route](doc:add-route-to-task).\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"What is Way Point?\",\n  \"body\": \"A waypoint, AKA a stop point, is somewhere along the driver’s route they have to stop and do something. Sometimes there’s only one of those for an order - for example when a driver takes some food from a restaurant, but sometimes there are two - if a driver works with more than one restaurant so they need to know WHICH restaurant is the stop point and then the final customer. Sometimes there are even more than 2 - for example when a driver takes several dishes at once from a restaurant, or a school bus has many stops along the way.\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl --include \\\\\\n     --request POST \\\\\\n     --header \\\"Content-Type: application/json\\\" \\\\\\n     --data-binary \\\"{\\\\\\\"company_id\\\\\\\": 1, \\\\\\\"customer_id\\\\\\\":1, \\\\\\\"scheduled_at\\\\\\\": \\\\\\\"2013-10-17T22:47:58.000Z\\\\\\\", \\\\\\\"address\\\\\\\": \\\\\\\"416 Water St. New York, NY 10002\\\\\\\", \\\\\\\"lat\\\\\\\": 32.4345345, \\\\\\\"lng\\\\\\\": 34.534534, \\\\\\\"timestamp\\\\\\\":\\\\\\\"1414421210832\\\\\\\", \\\\\\\"access_token\\\\\\\":\\\\\\\"K2Pxkwvx6-3PtW44zvEV\\\\\\\", \\\\\\\"signature\\\\\\\":\\\\\\\"db00061fa75f869c968f72d48449e457ae06959a\\\\\\\"}\\\" \\\\\\nhttp://api.bringg.com/partner_api/tasks/{task_id}/way_points\",\n      \"language\": \"shell\",\n      \"name\": \"cURL\"\n    }\n  ]\n}\n[/block]","excerpt":"Add a Way Point to Task","slug":"add-way-point-to-task","type":"post","title":"Create Way Point"}

postCreate Way Point

Add a Way Point to Task

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

task_id:
required
integer
Unique identifier representing a task

Body Params

customer_id:
required
integer
Unique identifier representing a customer
company_id:
required
integer
Unique identifier representing a company
scheduled_at:
string
Scheduled time for way point (format: %Y-%m-%dT%H:%M:%S%z)
address:
string
Address of way point
address_second_line:
string
2nd line of address
lat:
double
Latitude component of way point location
lng:
double
Longitude component of way point location
note:
string
Note to the driver
allow_scanning_inventory:
boolean
Allow scanning inventory at this way point
must_approve_inventory:
boolean
Driver can't leave way point before scanning inventory
allow_editing_inventory:
boolean
Allow driver to change inventory
no_earlier_than:
timestamp
Task window bottom limit
no_later_than:
timestamp
Task window top limit

Result Format


Documentation

The *Create Way Point* endpoint adds a single way point for an existing task. for adding more than one way point use [Create Route](doc:add-route-to-task). [block:callout] { "type": "info", "title": "What is Way Point?", "body": "A waypoint, AKA a stop point, is somewhere along the driver’s route they have to stop and do something. Sometimes there’s only one of those for an order - for example when a driver takes some food from a restaurant, but sometimes there are two - if a driver works with more than one restaurant so they need to know WHICH restaurant is the stop point and then the final customer. Sometimes there are even more than 2 - for example when a driver takes several dishes at once from a restaurant, or a school bus has many stops along the way." } [/block] [block:code] { "codes": [ { "code": "curl --include \\\n --request POST \\\n --header \"Content-Type: application/json\" \\\n --data-binary \"{\\\"company_id\\\": 1, \\\"customer_id\\\":1, \\\"scheduled_at\\\": \\\"2013-10-17T22:47:58.000Z\\\", \\\"address\\\": \\\"416 Water St. New York, NY 10002\\\", \\\"lat\\\": 32.4345345, \\\"lng\\\": 34.534534, \\\"timestamp\\\":\\\"1414421210832\\\", \\\"access_token\\\":\\\"K2Pxkwvx6-3PtW44zvEV\\\", \\\"signature\\\":\\\"db00061fa75f869c968f72d48449e457ae06959a\\\"}\" \\\nhttp://api.bringg.com/partner_api/tasks/{task_id}/way_points", "language": "shell", "name": "cURL" } ] } [/block]