Delivery API v2
The Delivery API provides access to the delivery service of our robots. Delivery requests can be made to the API to retrieve information about deliveries, including their status and tracking information.
Create delivery task
Creates a new delivery task for the specified project. Requires a valid request body and user authentication.
Authorization
x-api-key<token>API key for client delivery v2
In: header
Request Body
application/jsonRequiredtoRequiredstringThe target name to deliver the delivery to.
1fromstringThe target name to pick up the delivery from. If not provided, the robot will pick up from the default pickup location.
langstringThe language to use for the delivery. The robot will speak and change its user interface to this language. Default is tr. Allowed languages: en, tr, de, ru
"tr"Minimum length: 2ordersarray<object>order_notestringThe note for the product to deliver.
order_currencystringThe currency of the order. Default is TRY. Allowed currencies: TRY, EUR, USD
"TRY"order_total_pricenumberThe total price of the order.
0order_receiver_namestringThe name of the receiver. The robot will speak this name when delivering the order.
order_client_idstringThe tracking id of the order provided by the client. This value can be used for tracking the order status. Should be unique for each order if provided.
32Path Parameters
projectIdRequirednumberResponse Body
idRequirednumberThe id of the delivery task created.
pin_codeRequiredstringavailableRequiredbooleanThe availability of robots for delivery in the project.
demand_statusRequiredstringThe demand status of the project. If the demand status is high, the delivery may take longer.
"LOW" | "MEDIUM" | "HIGH" | "NOT_AVAILABLE" | "UNKNOWN"successRequiredbooleanstatusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
detailsRequiredobjectDetails of the error. When the error is a validation error, this will be an array of objects.
"object"requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
statusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
curl -X POST "https://staging.saharobotik.com/api/v2/client/0/delivery" \
-H "x-api-key: <token>" \
-H "Content-Type: application/json" \
-d '{
"to": "Table1",
"from": "Kitchen",
"lang": "tr",
"orders": [
{
"id": "tea",
"label": "Turkish Tea",
"quantity": 2,
"unit": "cup",
"image_url": "https://saha-assets-dev.s3.eu-central-1.amazonaws.com/205/white-tea-cup-1704204745809.png"
}
],
"order_note": "Please bring me a spoon.",
"order_currency": "TRY",
"order_total_price": 10,
"order_receiver_name": "John Doe",
"order_client_id": "1234567890"
}'const body = JSON.stringify({
"to": "Table1",
"from": "Kitchen",
"lang": "tr",
"orders": [
{
"id": "tea",
"label": "Turkish Tea",
"quantity": 2,
"unit": "cup",
"image_url": "https://saha-assets-dev.s3.eu-central-1.amazonaws.com/205/white-tea-cup-1704204745809.png"
}
],
"order_note": "Please bring me a spoon.",
"order_currency": "TRY",
"order_total_price": 10,
"order_receiver_name": "John Doe",
"order_client_id": "1234567890"
})
fetch("https://staging.saharobotik.com/api/v2/client/0/delivery", {
headers: {
"x-api-key": "<token>"
},
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://staging.saharobotik.com/api/v2/client/0/delivery"
body := strings.NewReader(`{
"to": "Table1",
"from": "Kitchen",
"lang": "tr",
"orders": [
{
"id": "tea",
"label": "Turkish Tea",
"quantity": 2,
"unit": "cup",
"image_url": "https://saha-assets-dev.s3.eu-central-1.amazonaws.com/205/white-tea-cup-1704204745809.png"
}
],
"order_note": "Please bring me a spoon.",
"order_currency": "TRY",
"order_total_price": 10,
"order_receiver_name": "John Doe",
"order_client_id": "1234567890"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("x-api-key", "<token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://staging.saharobotik.com/api/v2/client/0/delivery"
body = {
"to": "Table1",
"from": "Kitchen",
"lang": "tr",
"orders": [
{
"id": "tea",
"label": "Turkish Tea",
"quantity": 2,
"unit": "cup",
"image_url": "https://saha-assets-dev.s3.eu-central-1.amazonaws.com/205/white-tea-cup-1704204745809.png"
}
],
"order_note": "Please bring me a spoon.",
"order_currency": "TRY",
"order_total_price": 10,
"order_receiver_name": "John Doe",
"order_client_id": "1234567890"
}
response = requests.request("POST", url, json = body, headers = {
"x-api-key": "<token>",
"Content-Type": "application/json"
})
print(response.text){
"id": 0,
"pin_code": "string",
"available": true,
"demand_status": "LOW",
"success": true
}{
"statusCode": 0,
"error": "string",
"resultCode": "string",
"message": "string",
"details": [
{
"property": "foo",
"constraints": [
"foo is required"
]
}
],
"requestId": "string",
"timestamp": "string",
"path": "string"
}{
"statusCode": 500,
"error": "Internal Server Error",
"resultCode": "string",
"message": "string",
"requestId": "string",
"timestamp": "string",
"path": "string"
}Get delivery by ID
Retrieves the details of a delivery task by its internal delivery ID for the specified project and user.
Authorization
x-api-key<token>API key for client delivery v2
In: header
Path Parameters
projectIdRequirednumberidRequirednumberResponse Body
statusRequirednumberCREATED(0), WAITING_FOR_REQUEST(1), REQUESTED(2), QUEUED(3), TASK_ASSIGNED(4), DELIVERED(5), CANCELLED(6), EXPIRED(7), RECOVERING(8), RECOVERED(9), PENDING_FOR_PAYMENT(10), FAILED(11)
0Value in: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11idRequirednumbersender_nameRequiredstringsender_tracking_idRequiredstringaddress_siteRequiredstringaddress_floorRequiredstringaddress_nameRequiredstringdetailsRequiredobjectpin_codeRequiredstringstatusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
detailsRequiredobjectDetails of the error. When the error is a validation error, this will be an array of objects.
"object"requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
statusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
curl -X GET "https://staging.saharobotik.com/api/v2/client/0/delivery/0" \
-H "x-api-key: <token>"fetch("https://staging.saharobotik.com/api/v2/client/0/delivery/0", {
headers: {
"x-api-key": "<token>"
}
})package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://staging.saharobotik.com/api/v2/client/0/delivery/0"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://staging.saharobotik.com/api/v2/client/0/delivery/0"
response = requests.request("GET", url, headers = {
"x-api-key": "<token>"
})
print(response.text){
"status": 0,
"id": 0,
"sender_name": "string",
"sender_tracking_id": "string",
"address_site": "string",
"address_floor": "string",
"address_name": "string",
"details": {},
"pin_code": "string"
}{
"statusCode": 0,
"error": "string",
"resultCode": "string",
"message": "string",
"details": [
{
"property": "foo",
"constraints": [
"foo is required"
]
}
],
"requestId": "string",
"timestamp": "string",
"path": "string"
}{
"statusCode": 500,
"error": "Internal Server Error",
"resultCode": "string",
"message": "string",
"requestId": "string",
"timestamp": "string",
"path": "string"
}Cancel delivery by ID
Cancels an existing delivery task by its internal delivery ID for the specified project and user.
Authorization
x-api-key<token>API key for client delivery v2
In: header
Path Parameters
projectIdRequirednumberidRequirednumberResponse Body
statusRequirednumberCREATED(0), WAITING_FOR_REQUEST(1), REQUESTED(2), QUEUED(3), TASK_ASSIGNED(4), DELIVERED(5), CANCELLED(6), EXPIRED(7), RECOVERING(8), RECOVERED(9), PENDING_FOR_PAYMENT(10), FAILED(11)
0Value in: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11idRequirednumbersender_nameRequiredstringsender_tracking_idRequiredstringaddress_siteRequiredstringaddress_floorRequiredstringaddress_nameRequiredstringdetailsRequiredobjectpin_codeRequiredstringstatusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
detailsRequiredobjectDetails of the error. When the error is a validation error, this will be an array of objects.
"object"requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
statusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
curl -X DELETE "https://staging.saharobotik.com/api/v2/client/0/delivery/0" \
-H "x-api-key: <token>"fetch("https://staging.saharobotik.com/api/v2/client/0/delivery/0", {
headers: {
"x-api-key": "<token>"
}
})package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://staging.saharobotik.com/api/v2/client/0/delivery/0"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://staging.saharobotik.com/api/v2/client/0/delivery/0"
response = requests.request("DELETE", url, headers = {
"x-api-key": "<token>"
})
print(response.text){
"status": 0,
"id": 0,
"sender_name": "string",
"sender_tracking_id": "string",
"address_site": "string",
"address_floor": "string",
"address_name": "string",
"details": {},
"pin_code": "string"
}{
"statusCode": 0,
"error": "string",
"resultCode": "string",
"message": "string",
"details": [
{
"property": "foo",
"constraints": [
"foo is required"
]
}
],
"requestId": "string",
"timestamp": "string",
"path": "string"
}{
"statusCode": 500,
"error": "Internal Server Error",
"resultCode": "string",
"message": "string",
"requestId": "string",
"timestamp": "string",
"path": "string"
}Get delivery by client ID
Retrieves the details of a delivery task using the client's own delivery ID (senderTrackingId) for the specified project and user.
Authorization
x-api-key<token>API key for client delivery v2
In: header
Path Parameters
projectIdRequirednumberidRequiredstringResponse Body
statusRequirednumberCREATED(0), WAITING_FOR_REQUEST(1), REQUESTED(2), QUEUED(3), TASK_ASSIGNED(4), DELIVERED(5), CANCELLED(6), EXPIRED(7), RECOVERING(8), RECOVERED(9), PENDING_FOR_PAYMENT(10), FAILED(11)
0Value in: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11idRequirednumbersender_nameRequiredstringsender_tracking_idRequiredstringaddress_siteRequiredstringaddress_floorRequiredstringaddress_nameRequiredstringdetailsRequiredobjectpin_codeRequiredstringstatusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
detailsRequiredobjectDetails of the error. When the error is a validation error, this will be an array of objects.
"object"requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
statusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
curl -X GET "https://staging.saharobotik.com/api/v2/client/0/delivery/by-client-id/string" \
-H "x-api-key: <token>"fetch("https://staging.saharobotik.com/api/v2/client/0/delivery/by-client-id/string", {
headers: {
"x-api-key": "<token>"
}
})package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://staging.saharobotik.com/api/v2/client/0/delivery/by-client-id/string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://staging.saharobotik.com/api/v2/client/0/delivery/by-client-id/string"
response = requests.request("GET", url, headers = {
"x-api-key": "<token>"
})
print(response.text){
"status": 0,
"id": 0,
"sender_name": "string",
"sender_tracking_id": "string",
"address_site": "string",
"address_floor": "string",
"address_name": "string",
"details": {},
"pin_code": "string"
}{
"statusCode": 0,
"error": "string",
"resultCode": "string",
"message": "string",
"details": [
{
"property": "foo",
"constraints": [
"foo is required"
]
}
],
"requestId": "string",
"timestamp": "string",
"path": "string"
}{
"statusCode": 500,
"error": "Internal Server Error",
"resultCode": "string",
"message": "string",
"requestId": "string",
"timestamp": "string",
"path": "string"
}Cancel delivery by client ID
Cancels an existing delivery task using the client's own delivery ID (senderTrackingId) for the specified project and user.
Authorization
x-api-key<token>API key for client delivery v2
In: header
Path Parameters
projectIdRequirednumberidRequiredstringResponse Body
statusRequirednumberCREATED(0), WAITING_FOR_REQUEST(1), REQUESTED(2), QUEUED(3), TASK_ASSIGNED(4), DELIVERED(5), CANCELLED(6), EXPIRED(7), RECOVERING(8), RECOVERED(9), PENDING_FOR_PAYMENT(10), FAILED(11)
0Value in: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11idRequirednumbersender_nameRequiredstringsender_tracking_idRequiredstringaddress_siteRequiredstringaddress_floorRequiredstringaddress_nameRequiredstringdetailsRequiredobjectpin_codeRequiredstringstatusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
detailsRequiredobjectDetails of the error. When the error is a validation error, this will be an array of objects.
"object"requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
statusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
curl -X DELETE "https://staging.saharobotik.com/api/v2/client/0/delivery/by-client-id/string" \
-H "x-api-key: <token>"fetch("https://staging.saharobotik.com/api/v2/client/0/delivery/by-client-id/string", {
headers: {
"x-api-key": "<token>"
}
})package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://staging.saharobotik.com/api/v2/client/0/delivery/by-client-id/string"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://staging.saharobotik.com/api/v2/client/0/delivery/by-client-id/string"
response = requests.request("DELETE", url, headers = {
"x-api-key": "<token>"
})
print(response.text){
"status": 0,
"id": 0,
"sender_name": "string",
"sender_tracking_id": "string",
"address_site": "string",
"address_floor": "string",
"address_name": "string",
"details": {},
"pin_code": "string"
}{
"statusCode": 0,
"error": "string",
"resultCode": "string",
"message": "string",
"details": [
{
"property": "foo",
"constraints": [
"foo is required"
]
}
],
"requestId": "string",
"timestamp": "string",
"path": "string"
}{
"statusCode": 500,
"error": "Internal Server Error",
"resultCode": "string",
"message": "string",
"requestId": "string",
"timestamp": "string",
"path": "string"
}Check robot availability
Checks if robots are available for delivery in the specified project. Optionally, a source location can be provided.
Authorization
x-api-key<token>API key for client delivery v2
In: header
Path Parameters
projectIdRequirednumberfromstringOptional. The target name to deliver from. If not provided, the default filling target is used.
Response Body
availableRequiredbooleanThe availability of robots for delivery in the project.
demand_statusRequiredstringThe demand status of the project. If the demand status is high, the delivery may take longer.
"LOW" | "MEDIUM" | "HIGH" | "NOT_AVAILABLE" | "UNKNOWN"statusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
detailsRequiredobjectDetails of the error. When the error is a validation error, this will be an array of objects.
"object"requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
statusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
curl -X GET "https://staging.saharobotik.com/api/v2/client/0/delivery/check-availability/Kitchen" \
-H "x-api-key: <token>"fetch("https://staging.saharobotik.com/api/v2/client/0/delivery/check-availability/Kitchen", {
headers: {
"x-api-key": "<token>"
}
})package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://staging.saharobotik.com/api/v2/client/0/delivery/check-availability/Kitchen"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://staging.saharobotik.com/api/v2/client/0/delivery/check-availability/Kitchen"
response = requests.request("GET", url, headers = {
"x-api-key": "<token>"
})
print(response.text){
"available": true,
"demand_status": "LOW"
}{
"statusCode": 0,
"error": "string",
"resultCode": "string",
"message": "string",
"details": [
{
"property": "foo",
"constraints": [
"foo is required"
]
}
],
"requestId": "string",
"timestamp": "string",
"path": "string"
}{
"statusCode": 500,
"error": "Internal Server Error",
"resultCode": "string",
"message": "string",
"requestId": "string",
"timestamp": "string",
"path": "string"
}Get delivery targets
Retrieves a list of available delivery target names for the specified project.
Authorization
x-api-key<token>API key for client delivery v2
In: header
Path Parameters
projectIdRequirednumberResponse Body
responseRequiredarray<object>statusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
detailsRequiredobjectDetails of the error. When the error is a validation error, this will be an array of objects.
"object"requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
statusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
curl -X GET "https://staging.saharobotik.com/api/v2/client/0/delivery/targets" \
-H "x-api-key: <token>"fetch("https://staging.saharobotik.com/api/v2/client/0/delivery/targets", {
headers: {
"x-api-key": "<token>"
}
})package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://staging.saharobotik.com/api/v2/client/0/delivery/targets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://staging.saharobotik.com/api/v2/client/0/delivery/targets"
response = requests.request("GET", url, headers = {
"x-api-key": "<token>"
})
print(response.text)[
{
"name": "string",
"uid": "string"
}
]{
"statusCode": 0,
"error": "string",
"resultCode": "string",
"message": "string",
"details": [
{
"property": "foo",
"constraints": [
"foo is required"
]
}
],
"requestId": "string",
"timestamp": "string",
"path": "string"
}{
"statusCode": 500,
"error": "Internal Server Error",
"resultCode": "string",
"message": "string",
"requestId": "string",
"timestamp": "string",
"path": "string"
}Get pickup locations
Retrieves a list of available pickup location names for deliveries in the specified project.
Authorization
x-api-key<token>API key for client delivery v2
In: header
Path Parameters
projectIdRequirednumberResponse Body
responseRequiredarray<object>statusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
detailsRequiredobjectDetails of the error. When the error is a validation error, this will be an array of objects.
"object"requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
statusCodeRequirednumberError code.
errorRequiredstringError.
resultCodestringCustom error code.
messageRequiredstringError message.
requestIdRequiredstringUnique request id.
timestampRequiredstringTimestamp of the error.
pathRequiredstringPath of the request.
curl -X GET "https://staging.saharobotik.com/api/v2/client/0/delivery/pickup-locations" \
-H "x-api-key: <token>"fetch("https://staging.saharobotik.com/api/v2/client/0/delivery/pickup-locations", {
headers: {
"x-api-key": "<token>"
}
})package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://staging.saharobotik.com/api/v2/client/0/delivery/pickup-locations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://staging.saharobotik.com/api/v2/client/0/delivery/pickup-locations"
response = requests.request("GET", url, headers = {
"x-api-key": "<token>"
})
print(response.text)[
{
"name": "string",
"uid": "string"
}
]{
"statusCode": 0,
"error": "string",
"resultCode": "string",
"message": "string",
"details": [
{
"property": "foo",
"constraints": [
"foo is required"
]
}
],
"requestId": "string",
"timestamp": "string",
"path": "string"
}{
"statusCode": 500,
"error": "Internal Server Error",
"resultCode": "string",
"message": "string",
"requestId": "string",
"timestamp": "string",
"path": "string"
}