Courier API
Courier API allows to communicate with Tiramizoo.
Host: https://dev.tiramizoo.com/courier-api-doc/
Text payloads are supported only as UTF-8-encoded.
Activation ¶
Activate ¶
ActivatePOST/v1/activation/activate
Attribute name | Type | Required | Description |
---|---|---|---|
string |
X |
Courier email | |
registration_code | string |
X |
Registration code |
password | string |
X |
Min 8 characters |
password_confirmation | string |
X |
Example URI
Headers
Content-Type: application/json
Body
{
"email": "test@courier.com",
"registration_code": "8r4g632dh7",
"password": "test1234",
"password_confirmation": "test1234"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"email": {
"type": "string"
},
"registration_code": {
"type": "string"
},
"password": {
"type": "string"
},
"password_confirmation": {
"type": "string"
}
},
"required": [
"email",
"registration_code",
"password",
"password_confirmation"
]
}
200
Headers
Content-Type: application/json
Couriers ¶
Protected resource.
Authorization required via auth_token
.
Update courier ¶
Update courierPUT/v1/courier
Attribute name | Type | Required | Description | Available types: |
---|---|---|---|---|
auth_token | string |
X |
Authentication token | |
vehicle_type_identifier | string |
Vehicle type |
|
|
time_zone | string |
Courier time zone |
|
|
profile_picture_data_uri | string |
Image (png, jpg, jpeg, gif). Encoded using Data URI scheme. File max size 5 MB |
||
remove_profile_picture | boolean |
Set this field to true to delete profile picture |
||
home_address | string |
Must be provided along with lat, lng | ||
home_address_lat | number |
|||
home_address_lng | number |
Example URI
Headers
Content-Type: application/json
Body
{
"auth_token": "bf545b8e453536ee431648d86711243b",
"vehicle_type": "bike",
"timezone": "Europe/Berlin",
"profile_picture_data_uri": "data:image/png;base64,TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5",
"remove_profile_picture": false,
"home_address": "Wilhelm-Hale-Str. 50, 80639 Munich, Germany",
"home_address_lat": 48.14903,
"home_address_lng": 11.54085
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"auth_token": {
"type": "string",
"description": "authentication token"
},
"vehicle_type": {
"type": "string",
"enum": [
"bike",
"scooter",
"cargobike",
"car",
"caddy",
"van",
"large_van"
],
"description": "Vehicle type. Available types are:"
},
"timezone": {
"type": "string",
"enum": [
"Europe/Berlin",
"Europe/London",
"Asia/Manila"
],
"description": "Time zone in which courier works. Supported time zones are:"
},
"profile_picture_data_uri": {
"type": "string",
"description": "Image encoded using Data URI scheme. Supported formats: jpg, png, jpeg, gif. File max size 5 MB"
},
"remove_profile_picture": {
"type": "boolean",
"description": "Allows to delete profile picture"
},
"home_address": {
"type": "string"
},
"home_address_lat": {
"type": "number"
},
"home_address_lng": {
"type": "number"
}
},
"required": [
"auth_token"
]
}
200
Headers
Content-Type: application/json
Body
{
"auth_token": "fb560839122d0754408a0efd5a85b61c",
"push_token": null,
"name": "Nida Hartmann",
"timezone": "Asia/Manila",
"available_vehicle_types": [
{
"name": "bike",
"kind": "bike",
"max_length": 50,
"max_width": 30,
"max_height": 30,
"max_weight": 5,
"identifier": "bike",
"active": true
},
{
"name": "van",
"kind": "car",
"max_length": 350,
"max_width": 150,
"max_height": 180,
"max_weight": 1000,
"identifier": "van",
"active": false
}
],
"home_address": null,
"home_address_lat": null,
"home_address_lng": null,
"packages_by_tour_access": false
}
Tours ¶
Manage courier’s tours
Protected resources.
Authorization required via auth_token
.
Obtain all recent courier stops grouped into tours ¶
Obtain all recent courier stops grouped into toursGET/v1/tours{?auth_token}
There are 3 types of a tour - tour
, adhoc
, and placeholder
.
-
tour
depicts a real tour that was calculated by the system. It contains list of stops ordered in an optimized manner. A map can - and should - be drawn out ofconsecutive_stops_locations
. -
adhoc
is a list of point-2-point deliveries, each stop in this group represents a separate “tour”, which means that the map generated out ofconsecutive_stops_locations
doesn’t make much sense, because each stop can be from a different day. That’s why thetime_window
comes empty as well. -
placeholder
represents a tour that MIGHT happen for the courier, because the courier told us they will be available if we needed them.time_window
is broad to indicate when the courier might be occupied,stops
andconsecutive_stops_locations
come in empty - it is a placeholder after all.
Example URI
- auth_token
string
(required) Example: bf545b8e453536ee431648d86711243bAuthentication token
Headers
Content-Type: application/json
200
Headers
Content-Type: application/json
Body
[
{
"stops": [
{
"uuid": "8ccfc1cf-c65e-4ec4-aaea-2e17b9012c1f",
"address_line": "609 Eda Springs",
"postal_code": "08964",
"city": "Belvatown",
"starts_at": "2012-04-16T08:05:00+02:00",
"ends_at": "2012-04-16T08:10:00+02:00",
"name": "Jaskolski, Hane and Lang",
"lat": 10.231,
"lng": 43.001,
"require_signature": false,
"pickups_require_signature": false,
"pickups_require_photo_proof": false,
"require_real_service_time": true,
"finishing_blocked": false,
"change": null,
"applicable_events": [
{
"type": "failed_due_to_business_closed",
"jobs": [
{
"uuid": "a4f84090-1579-413c-b245-38527f930d9d",
"photo_proof": false,
"sign": false
}
],
"common": true,
"creates_return_stop": true
},
{
"type": "address_not_found",
"jobs": [
{
"uuid": "a4f84090-1579-413c-b245-38527f930d9d",
"photo_proof": false,
"sign": false
}
],
"common": true,
"creates_return_stop": true
},
{
"type": "name_not_found_on_doorbell",
"jobs": [
{
"uuid": "a4f84090-1579-413c-b245-38527f930d9d",
"photo_proof": true,
"sign": false
}
],
"common": true,
"creates_return_stop": true
},
{
"type": "no_attempt_due_to_being_late",
"jobs": [
{
"uuid": "a4f84090-1579-413c-b245-38527f930d9d",
"photo_proof": false,
"sign": false
}
],
"common": true,
"creates_return_stop": true
},
{
"type": "wrong_package_size",
"jobs": [
{
"uuid": "a4f84090-1579-413c-b245-38527f930d9d",
"photo_proof": true,
"sign": false
}
],
"common": false,
"creates_return_stop": true
},
{
"type": "package_was_not_ready",
"jobs": [
{
"uuid": "a4f84090-1579-413c-b245-38527f930d9d",
"photo_proof": false,
"sign": true
}
],
"common": false,
"creates_return_stop": true
},
{
"type": "sender_wants_to_cancel",
"jobs": [
{
"uuid": "a4f84090-1579-413c-b245-38527f930d9d",
"photo_proof": false,
"sign": true
}
],
"common": false,
"creates_return_stop": true
},
{
"type": "sender_was_not_at_home",
"jobs": [
{
"uuid": "a4f84090-1579-413c-b245-38527f930d9d",
"photo_proof": false,
"sign": false
}
],
"common": true,
"creates_return_stop": true
}
],
"service_time": 5,
"jobs": [
{
"uuid": "a4f84090-1579-413c-b245-38527f930d9d",
"require_signature": false,
"require_real_service_time": true,
"state": "created",
"type": "pickup",
"packages": [
{
"identifier": "42B182BD230739E5",
"description": "A fish",
"length": 30,
"weight": 5,
"height": 20,
"width": 10,
"size": "L",
"order_identifier": "CR2CMF",
"non_rotatable": false,
"fragile_goods": false,
"protect_from_water": false,
"external_id": null,
"state": "pending",
"actions": [
"hand_over",
"not_hand_over"
]
},
{
"identifier": "CE3E4E4FFE93BC5A",
"description": "A fish",
"length": 30,
"weight": 5,
"height": 20,
"width": 10,
"size": "L",
"order_identifier": "CR2CMF",
"non_rotatable": false,
"fragile_goods": false,
"protect_from_water": false,
"external_id": null,
"state": "pending",
"actions": [
"hand_over",
"not_hand_over"
]
}
],
"order_identifier": "CR2CMF",
"external_order_id": "B7ZAFH",
"courier_information": "go go go; now now now",
"hazard_index": 0,
"distance": 2,
"events": [],
"pickup": {
"name": "I.P. Freely",
"address_line": "Im Dol 2",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "30049223333",
"after": "2012-04-16T07:00:00+02:00",
"before": "2012-04-16T07:30:00+02:00",
"information": "go go go",
"requirements": [
{
"type": "custom",
"value": "ensure boxes are well packed!",
"message": "ensure boxes are well packed!"
},
{
"type": "security_code",
"value": "123XSDF",
"message": "Authenticate with security code: 123XSDF"
}
],
"can_cancel_package_pickup": true,
"allow_partial_pick_up": true
},
"delivery": {
"name": "Mike Rotch",
"address_line": "Im Dol 48",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "30049224444",
"after": "2012-04-16T08:50:00+02:00",
"before": "2012-04-16T09:00:00+02:00",
"information": "now now now",
"requirements": [
{
"type": "age",
"value": 21,
"message": "Verify recipient age to be at least 21 years old"
}
],
"allow_partial_delivery": false
},
"return": {
"service_times": {
"1": 6
},
"location_service_time": 0,
"additional_service_time": 0
}
},
{
"uuid": "883bfbb2-4f0a-455e-91f2-6005f4143f4c",
"require_signature": false,
"require_real_service_time": false,
"state": "created",
"type": "custom"
}
],
"available_additional_service_time_reasons": [
{
"type": "goods_could_not_be_found",
"job_uuids": [
"a4f84090-1579-413c-b245-38527f930d9d"
]
},
{
"type": "handover_took_longer_as_planned",
"job_uuids": [
"a4f84090-1579-413c-b245-38527f930d9d"
]
},
{
"type": "place_was_not_specified_correctly",
"job_uuids": [
"a4f84090-1579-413c-b245-38527f930d9d"
]
},
{
"type": "contact_was_not_available",
"job_uuids": [
"a4f84090-1579-413c-b245-38527f930d9d"
]
},
{
"type": "contact_was_busy",
"job_uuids": [
"a4f84090-1579-413c-b245-38527f930d9d"
]
},
{
"type": "courier_was_ignored",
"job_uuids": [
"a4f84090-1579-413c-b245-38527f930d9d"
]
}
],
"service_time_options": [
5,
10,
15,
20,
30,
45,
60,
90,
120
],
"can_not_be_served_before": "2012-04-16T07:00:00+02:00",
"applicable_delivered_to_options": {
"recipient": {
"photo_proof": false,
"signature": true
},
"neighbour": {
"photo_proof": false,
"signature": true
},
"housemate": {
"photo_proof": false,
"signature": true
},
"safe_place": {
"at_the_apartments_door": {
"photo_proof": false,
"signature": false
},
"on_the_doorstep": {
"photo_proof": false,
"signature": false
},
"mailbox": {
"photo_proof": false,
"signature": false
},
"garage": {
"photo_proof": false,
"signature": false
},
"other": {
"photo_proof": false,
"signature": false
}
}
},
"mandatory_recipient_name": false,
"allow_one_click_selection": false,
"information": null,
"deferred": false,
"lang": [
"de"
]
},
{
"uuid": "abc1d9d5-258b-4d6d-a41b-e5f8635fb16e",
"address_line": "00451 Runte Port",
"postal_code": "63797-9626",
"city": "Kassulketon",
"starts_at": "2012-04-16T08:51:00+02:00",
"ends_at": "2012-04-16T08:56:00+02:00",
"name": "Parker-Dickinson",
"lat": 10.2511,
"lng": 43.998,
"require_signature": false,
"pickups_require_signature": false,
"pickups_require_photo_proof": false,
"require_real_service_time": true,
"finishing_blocked": false,
"change": null,
"applicable_events": [
{
"type": "recipient_was_not_at_home",
"jobs": [
{
"uuid": "e1b9101d-6e44-46fa-ba2a-71b64f122935",
"photo_proof": false,
"sign": false
}
],
"common": true,
"creates_return_stop": true
},
{
"type": "failed_due_to_business_closed",
"jobs": [
{
"uuid": "e1b9101d-6e44-46fa-ba2a-71b64f122935",
"photo_proof": false,
"sign": false
}
],
"common": true,
"creates_return_stop": true
},
{
"type": "address_not_found",
"jobs": [
{
"uuid": "e1b9101d-6e44-46fa-ba2a-71b64f122935",
"photo_proof": false,
"sign": false
}
],
"common": true,
"creates_return_stop": true
},
{
"type": "name_not_found_on_doorbell",
"jobs": [
{
"uuid": "e1b9101d-6e44-46fa-ba2a-71b64f122935",
"photo_proof": true,
"sign": false
}
],
"common": true,
"creates_return_stop": true
},
{
"type": "no_attempt_due_to_being_late",
"jobs": [
{
"uuid": "e1b9101d-6e44-46fa-ba2a-71b64f122935",
"photo_proof": false,
"sign": false
}
],
"common": true,
"creates_return_stop": true
},
{
"type": "package_was_not_accepted",
"jobs": [
{
"uuid": "e1b9101d-6e44-46fa-ba2a-71b64f122935",
"photo_proof": false,
"sign": true
}
],
"common": false,
"creates_return_stop": true
},
{
"type": "no_access_to_building",
"jobs": [
{
"uuid": "e1b9101d-6e44-46fa-ba2a-71b64f122935",
"photo_proof": false,
"sign": false
}
],
"common": false,
"creates_return_stop": true
},
{
"type": "abort_delivery",
"jobs": [
{
"uuid": "e1b9101d-6e44-46fa-ba2a-71b64f122935",
"photo_proof": false,
"sign": false
}
],
"common": false,
"creates_return_stop": true
},
{
"type": "package_was_not_ordered",
"jobs": [
{
"uuid": "e1b9101d-6e44-46fa-ba2a-71b64f122935",
"photo_proof": false,
"sign": true
}
],
"common": false,
"creates_return_stop": true
},
{
"type": "package_is_damaged",
"jobs": [
{
"uuid": "e1b9101d-6e44-46fa-ba2a-71b64f122935",
"photo_proof": false,
"sign": true
}
],
"common": false,
"creates_return_stop": true
},
{
"type": "not_enough_money_for_payment",
"jobs": [
{
"uuid": "e1b9101d-6e44-46fa-ba2a-71b64f122935",
"photo_proof": false,
"sign": true
}
],
"common": false,
"creates_return_stop": true
},
{
"type": "package_was_delivered_too_late",
"jobs": [
{
"uuid": "e1b9101d-6e44-46fa-ba2a-71b64f122935",
"photo_proof": false,
"sign": true
}
],
"common": false,
"creates_return_stop": true
}
],
"service_time": 5,
"jobs": [
{
"uuid": "e1b9101d-6e44-46fa-ba2a-71b64f122935",
"require_signature": false,
"require_real_service_time": true,
"state": "created",
"type": "delivery",
"packages": [
{
"identifier": "42B182BD230739E5",
"description": "A fish",
"length": 30,
"weight": 5,
"height": 20,
"width": 10,
"size": "L",
"order_identifier": "CR2CMF",
"non_rotatable": false,
"fragile_goods": false,
"protect_from_water": false,
"external_id": null,
"state": "pending",
"actions": []
},
{
"identifier": "CE3E4E4FFE93BC5A",
"description": "A fish",
"length": 30,
"weight": 5,
"height": 20,
"width": 10,
"size": "L",
"order_identifier": "CR2CMF",
"non_rotatable": false,
"fragile_goods": false,
"protect_from_water": false,
"external_id": null,
"state": "pending",
"actions": []
}
],
"order_identifier": "CR2CMF",
"external_order_id": "B7ZAFH",
"courier_information": "go go go; now now now",
"hazard_index": 0,
"distance": 2,
"events": [],
"pickup": {
"name": "I.P. Freely",
"address_line": "Im Dol 2",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "30049223333",
"after": "2012-04-16T07:00:00+02:00",
"before": "2012-04-16T07:30:00+02:00",
"information": "go go go",
"requirements": [
{
"type": "custom",
"value": "ensure boxes are well packed!",
"message": "ensure boxes are well packed!"
},
{
"type": "security_code",
"value": "123XSDF",
"message": "Authenticate with security code: 123XSDF"
}
],
"can_cancel_package_pickup": true,
"allow_partial_pick_up": true
},
"delivery": {
"name": "Mike Rotch",
"address_line": "Im Dol 48",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "30049224444",
"after": "2012-04-16T08:50:00+02:00",
"before": "2012-04-16T09:00:00+02:00",
"information": "now now now",
"requirements": [
{
"type": "age",
"value": 21,
"message": "Verify recipient age to be at least 21 years old"
}
],
"allow_partial_delivery": false
},
"return": {
"service_times": {
"1": 6
},
"location_service_time": 0,
"additional_service_time": 0
}
}
],
"available_additional_service_time_reasons": [
{
"type": "contact_could_not_be_found",
"job_uuids": [
"e1b9101d-6e44-46fa-ba2a-71b64f122935"
]
},
{
"type": "unloading_longer_than_expected_due_bulky_goods",
"job_uuids": [
"e1b9101d-6e44-46fa-ba2a-71b64f122935"
]
},
{
"type": "recipient_was_contacted_by_phone",
"job_uuids": [
"e1b9101d-6e44-46fa-ba2a-71b64f122935"
]
},
{
"type": "hotline_had_to_be_contacted_for_clarification",
"job_uuids": [
"e1b9101d-6e44-46fa-ba2a-71b64f122935"
]
}
],
"service_time_options": [
5,
10,
15,
20,
30,
45,
60,
90,
120
],
"can_not_be_served_before": null,
"applicable_delivered_to_options": {
"recipient": {
"photo_proof": false,
"signature": true
},
"neighbour": {
"photo_proof": false,
"signature": true
},
"housemate": {
"photo_proof": false,
"signature": true
},
"safe_place": {
"at_the_apartments_door": {
"photo_proof": false,
"signature": false
},
"on_the_doorstep": {
"photo_proof": false,
"signature": false
},
"mailbox": {
"photo_proof": false,
"signature": false
},
"garage": {
"photo_proof": false,
"signature": false
},
"other": {
"photo_proof": false,
"signature": false
}
}
},
"mandatory_recipient_name": false,
"allow_one_click_selection": false,
"information": null,
"deferred": false,
"lang": [
"de"
]
}
],
"type": "adhoc",
"consecutive_stops_locations": [
[
10.231,
43.001
],
[
10.2511,
43.998
]
],
"name": "On demand stops",
"distance": null,
"duration": "0h 51min",
"position": null,
"total_stops_count": 2,
"done_stops_count": 0,
"identifier": null,
"starts_at": "2012-04-16T08:05:00+02:00",
"ends_at": "2012-04-16T08:56:00+02:00"
}
]
Stops ¶
Manage stops in scope of tour
Protected resources.
Authorization required via auth_token
.
Update stop ¶
Update stopPUT/v1/stops/{uuid}
Attribute name | Type | Required | Description | Available types: |
---|---|---|---|---|
auth_token | string |
X |
Authentication token | |
jobs: | array |
X |
Jobs list on given stop | |
uuid | string |
X |
Job uuid | |
id | number |
Job id (deprecated) | ||
done | boolean |
X |
Job done/undone | |
packages: | array |
X |
||
identifier | string |
X |
Package identifier | |
pickup_state | string |
X |
State to which the package is being transitioned. |
|
external_id | string |
Mandatory in case order pickup requirements include scanning of external label. Must meet the value scanning requirements |
External label package identifier | |
recorded_at | string |
X |
Date time of courier's action | |
delivered_to | string |
X |
Specify to whom was order delivered |
|
delivered_to_extra_info | string |
Specify to which safe place order was delivered | ||
photo_proof: | object |
Mandatory in case delivered_to is listed in applicable_delivered_to_options |
Photo proof | |
note | string |
Explanation message | ||
data_uris | array |
Array of images encoded using Data URI scheme. Allowed image types: png, jpg, jpeg, gif. File max size 700 kb. |
||
signature: | object |
Mandatory in case job require signature | Signature | |
name | string |
Recipient / sender name | ||
data_uri | string |
Image (png, jpg, jpeg, gif). Encoded using Data URI scheme. File max size 100 kb. | ||
service_time | number |
X |
Service time | |
additional_service_time_reason | string |
Mandatory in case service_time is greaterthan service time included .Service time included means service_time attribute from response v1/stops
|
Additional service time reason |
On pickup:
|
Example URI
- uuid
string
(required) Example: 67a58538-a5ce-4de7-9a57-825487a9ba63Stop uuid
Headers
Content-Type: application/json
Body
{
"auth_token": "bf545b8e453536ee431648d86711243b",
"jobs": [
{
"uuid": "1d16702c-19ab-4b37-9293-3fe24cfd03e4",
"done": true,
"packages": [
{
"identifier": "FCB8349CA1858BBA",
"external_id": "ABCD"
}
]
}
],
"recorded_at": "2012-04-16 09:05",
"delivered_to: safe_place": "neighbour",
"delivered_to_extra_info: when delivered to safe_place, it should contain which specific place it was": "Hello, world!",
"signature": {
"name": "Otto Normalverbraucher",
"data_uri": "TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5"
},
"service_time": 10,
"photo_proof": {
"note": "Next to big tree",
"data_uris": [
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACC...REfRXH4tWFZGswQ2yAAAAAElFTkSuQmCC"
]
},
"additional_service_time_reason": "goods_could_not_be_found"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"auth_token": {
"type": "string",
"description": "Authentication token"
},
"jobs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string",
"description": "Job uuid"
},
"done": {
"type": "boolean",
"description": "Job done/undone"
},
"packages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "Identifier of package"
},
"external_id": {
"type": "string",
"description": "External label package identifier"
}
},
"required": [
"identifier"
]
},
"description": "Mandatory on pickup"
}
},
"required": [
"uuid",
"done",
"packages"
]
},
"description": "Jobs list on given stop"
},
"recorded_at": {
"type": "string",
"description": "Date time of courier's action"
},
"delivered_to: safe_place": {
"type": "string",
"enum": [
"neighbour",
"recipient",
"housemate",
"safe_place"
],
"description": "To whom was order delivered"
},
"delivered_to_extra_info: when delivered to safe_place, it should contain which specific place it was": {
"type": "string"
},
"signature": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of recipient / sender"
},
"data_uri": {
"type": "string",
"description": "Image encoded using Data URI scheme. Supported formats: jpg, png, jpeg, gif. File max size 100 kb."
}
},
"description": "Signature (required if job require signature)"
},
"service_time": {
"type": "number",
"description": "Service time"
},
"photo_proof": {
"type": "object",
"properties": {
"note": {
"type": "string",
"description": "Explanation message"
},
"data_uris": {
"type": "array",
"description": "Images array encoded using Data URI scheme."
}
},
"description": "Photo_proof (required if type has `photo_proof = true`)"
},
"additional_service_time_reason": {
"type": "string",
"enum": [
"goods_could_not_be_found",
"handover_took_longer_as_planned",
"place_was_not_specified_correctly",
"contact_was_not_available",
"contact_was_busy",
"courier_was_ignored",
"contact_could_not_be_found",
"unloading_longer_than_expected_due_bulky_goods",
"recipient_was_contacted_by_phone",
"hotline_had_to_be_contacted_for_clarification",
"courier_was_ignored",
"reception_was_refused",
"receiving_department_was_busy"
],
"description": "Mandatory in case `service_time` is greater than service time included. Service time included means service time from response GET v1/stops."
}
},
"required": [
"auth_token",
"recorded_at",
"service_time"
]
}
200
Headers
Content-Type: application/json
Body
{
"uuid": "fa4e7d66-c533-43be-adb3-02925a81d8bf",
"address_line": "07682 Gibson Dale",
"postal_code": "15858-9094",
"city": "Bednarside",
"starts_at": "2012-04-16T08:05:00+02:00",
"ends_at": "2012-04-16T08:10:00+02:00",
"name": "Kuhn and Sons",
"lat": 10.2511,
"lng": 43.998,
"require_signature": false,
"pickups_require_signature": false,
"pickups_require_photo_proof": false,
"require_real_service_time": true,
"finishing_blocked": false,
"change": null,
"applicable_events": [],
"service_time": 5,
"jobs": [
{
"uuid": "39a6c369-0b3c-48a0-bf1d-d15e1f8fb9dd",
"require_signature": false,
"require_real_service_time": true,
"state": "success",
"type": "delivery",
"packages": [
{
"identifier": "ACF91397314FF310",
"description": "A fish",
"length": 30,
"weight": 5,
"height": 20,
"width": 10,
"size": "L",
"order_identifier": "AZCMEK",
"non_rotatable": false,
"fragile_goods": false,
"protect_from_water": false,
"external_id": null,
"state": "delivered",
"actions": []
},
{
"identifier": "5E7ED1997B9D13E4",
"description": "A fish",
"length": 30,
"weight": 5,
"height": 20,
"width": 10,
"size": "L",
"order_identifier": "AZCMEK",
"non_rotatable": false,
"fragile_goods": false,
"protect_from_water": false,
"external_id": null,
"state": "delivered",
"actions": []
}
],
"order_identifier": "AZCMEK",
"external_order_id": "DYMFSL",
"courier_information": "go go go; now now now",
"hazard_index": 0,
"distance": 2,
"events": [],
"pickup": {
"name": "I.P. Freely",
"address_line": "Im Dol 2",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "30049223333",
"after": "2012-04-16T08:10:00+02:00",
"before": "2012-04-16T08:20:00+02:00",
"information": "go go go",
"requirements": [],
"can_cancel_package_pickup": false,
"allow_partial_pick_up": false
},
"delivery": {
"name": "Mike Rotch",
"address_line": "Im Dol 48",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "30049224444",
"after": "2012-04-16T08:10:00+02:00",
"before": "2012-04-16T08:20:00+02:00",
"information": "now now now",
"requirements": [],
"allow_partial_delivery": false
},
"return": {
"service_times": {
"1": 6
},
"location_service_time": 0,
"additional_service_time": 0
}
},
{
"uuid": "3df0b1ff-617a-45ec-b01e-bbeb8b164806",
"require_signature": false,
"require_real_service_time": false,
"state": "created",
"type": "custom"
}
],
"available_additional_service_time_reasons": [],
"service_time_options": [
5,
10,
15,
20,
30,
45,
60,
90,
120
],
"can_not_be_served_before": null,
"applicable_delivered_to_options": {
"recipient": {
"photo_proof": false,
"signature": true
},
"neighbour": {
"photo_proof": false,
"signature": true
},
"housemate": {
"photo_proof": false,
"signature": true
},
"safe_place": {
"at_the_apartments_door": {
"photo_proof": false,
"signature": false
},
"on_the_doorstep": {
"photo_proof": false,
"signature": false
},
"mailbox": {
"photo_proof": false,
"signature": false
},
"garage": {
"photo_proof": false,
"signature": false
},
"other": {
"photo_proof": false,
"signature": false
}
}
},
"mandatory_recipient_name": false,
"allow_one_click_selection": false,
"information": null,
"deferred": false,
"lang": [
"de"
]
}
422
Signature params are missing | Stop can not be completed. Make sure that the pickup is marked correctly. |
---|---|
Returned if job require signature | Returned if delivery new state is incorrect |
Headers
Content-Type: application/json
Body
{
"uuid": "fa4e7d66-c533-43be-adb3-02925a81d8bf",
"address_line": "07682 Gibson Dale",
"postal_code": "15858-9094",
"city": "Bednarside",
"starts_at": "2012-04-16T08:05:00+02:00",
"ends_at": "2012-04-16T08:10:00+02:00",
"name": "Kuhn and Sons",
"lat": 10.2511,
"lng": 43.998,
"require_signature": false,
"pickups_require_signature": false,
"pickups_require_photo_proof": false,
"require_real_service_time": true,
"finishing_blocked": false,
"change": null,
"applicable_events": [],
"service_time": 5,
"jobs": [
{
"uuid": "39a6c369-0b3c-48a0-bf1d-d15e1f8fb9dd",
"require_signature": false,
"require_real_service_time": true,
"state": "success",
"type": "delivery",
"packages": [
{
"identifier": "ACF91397314FF310",
"description": "A fish",
"length": 30,
"weight": 5,
"height": 20,
"width": 10,
"size": "L",
"order_identifier": "AZCMEK",
"non_rotatable": false,
"fragile_goods": false,
"protect_from_water": false,
"external_id": null,
"state": "delivered",
"actions": []
},
{
"identifier": "5E7ED1997B9D13E4",
"description": "A fish",
"length": 30,
"weight": 5,
"height": 20,
"width": 10,
"size": "L",
"order_identifier": "AZCMEK",
"non_rotatable": false,
"fragile_goods": false,
"protect_from_water": false,
"external_id": null,
"state": "delivered",
"actions": []
}
],
"order_identifier": "AZCMEK",
"external_order_id": "DYMFSL",
"courier_information": "go go go; now now now",
"hazard_index": 0,
"distance": 2,
"events": [],
"pickup": {
"name": "I.P. Freely",
"address_line": "Im Dol 2",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "30049223333",
"after": "2012-04-16T08:10:00+02:00",
"before": "2012-04-16T08:20:00+02:00",
"information": "go go go",
"requirements": [],
"can_cancel_package_pickup": false,
"allow_partial_pick_up": false
},
"delivery": {
"name": "Mike Rotch",
"address_line": "Im Dol 48",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "30049224444",
"after": "2012-04-16T08:10:00+02:00",
"before": "2012-04-16T08:20:00+02:00",
"information": "now now now",
"requirements": [],
"allow_partial_delivery": false
},
"return": {
"service_times": {
"1": 6
},
"location_service_time": 0,
"additional_service_time": 0
}
},
{
"uuid": "3df0b1ff-617a-45ec-b01e-bbeb8b164806",
"require_signature": false,
"require_real_service_time": false,
"state": "created",
"type": "custom"
}
],
"available_additional_service_time_reasons": [],
"service_time_options": [
5,
10,
15,
20,
30,
45,
60,
90,
120
],
"can_not_be_served_before": null,
"applicable_delivered_to_options": {
"recipient": {
"photo_proof": false,
"signature": true
},
"neighbour": {
"photo_proof": false,
"signature": true
},
"housemate": {
"photo_proof": false,
"signature": true
},
"safe_place": {
"at_the_apartments_door": {
"photo_proof": false,
"signature": false
},
"on_the_doorstep": {
"photo_proof": false,
"signature": false
},
"mailbox": {
"photo_proof": false,
"signature": false
},
"garage": {
"photo_proof": false,
"signature": false
},
"other": {
"photo_proof": false,
"signature": false
}
}
},
"mandatory_recipient_name": false,
"allow_one_click_selection": false,
"information": null,
"deferred": false,
"lang": [
"de"
]
}
Return Stop ¶
Deliver packages to return stop.
Protected resources.
Authorization required via auth_token
.
Deliver packages to return stop ¶
Deliver packages to return stopPUT/v1/return_stop
Attribute name | Type | Required | Description | Available types: |
---|---|---|---|---|
auth_token | string |
X |
Authentication token | |
packages: | array |
X |
||
identifier | string |
X |
Package identifier | |
external_id | string |
|
External label package identifier | |
trigger_type | string |
|||
recorded_at | string |
X |
Date time of courier's action | |
delivered_to | string |
X |
Specify to whom was order delivered |
|
delivered_to_extra_info | string |
Specify to which safe place order was delivered | ||
photo_proof: | object |
Mandatory in case delivered_to is listed in applicable_delivered_to_options |
Photo proof | |
note | string |
Explanation message | ||
data_uris | array |
Array of images encoded using Data URI scheme. Allowed image types: png, jpg, jpeg, gif. File max size 700 kb. |
||
signature: | object |
Mandatory in case job require signature | Signature | |
name | string |
Recipient / sender name | ||
data_uri | string |
Image (png, jpg, jpeg, gif). Encoded using Data URI scheme. File max size 100 kb. | ||
service_time | number |
X |
Service time | |
additional_service_time_reason | string |
Mandatory in case service_time is greaterthan service time included .Service time included means service_time attribute from response v1/stops
|
Additional service time reason |
On pickup:
|
Example URI
simple message
Headers
Content-Type: application/json
Body
{
"auth_token": "f5b20522ee11d31c09fd0ac46ab4e759",
"recorded_at": "2012-04-16T08:00:00+02:00",
"service_time": 5,
"packages": [
{
"identifier": "3F965356F287DE4C"
}
]
}
Headers
Content-Type: application/json
Body
{
"auth_token": "bf545b8e453536ee431648d86711243b",
"packages": [
{
"identifier": "FCB8349CA1858BBA",
"external_id": "id123",
"trigger_type": "Hello, world!"
}
],
"recorded_at": "2012-04-16 09:05",
"delivered_to": "neighbour",
"delivered_to_extra_info": "Hello, world!",
"signature": {
"name": "Otto Normalverbraucher",
"data_uri": "TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5"
},
"service_time": 10,
"photo_proof": {
"note": "Next to big tree",
"data_uris": [
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACC...REfRXH4tWFZGswQ2yAAAAAElFTkSuQmCC"
]
},
"additional_service_time_reason": "goods_could_not_be_found"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"auth_token": {
"type": "string",
"description": "Authentication token"
},
"packages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "Package identifier"
},
"external_id": {
"type": "string",
"description": "External label package identifier"
},
"trigger_type": {
"type": "string"
}
},
"required": [
"identifier"
]
},
"description": "Packages list delivered to return stop"
},
"recorded_at": {
"type": "string",
"description": "Date time of courier's action"
},
"delivered_to": {
"type": "string",
"enum": [
"neighbour",
"recipient",
"housemate",
"safe_place"
],
"description": "To whom was order delivered"
},
"delivered_to_extra_info": {
"type": "string",
"description": "when delivered to safe_place, it should contain which specific place it was"
},
"signature": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of recipient / sender"
},
"data_uri": {
"type": "string",
"description": "Image encoded using Data URI scheme. Supported formats: jpg, png, jpeg, gif. File max size 100 kb."
}
},
"description": "Signature (required if job require signature)"
},
"service_time": {
"type": "number",
"description": "Service time"
},
"photo_proof": {
"type": "object",
"properties": {
"note": {
"type": "string",
"description": "Explanation message"
},
"data_uris": {
"type": "array",
"description": "Images array encoded using Data URI scheme."
}
},
"description": "Photo_proof (required if type has `photo_proof = true`)"
},
"additional_service_time_reason": {
"type": "string",
"enum": [
"goods_could_not_be_found",
"handover_took_longer_as_planned",
"place_was_not_specified_correctly",
"contact_was_not_available",
"contact_was_busy",
"courier_was_ignored",
"contact_could_not_be_found",
"unloading_longer_than_expected_due_bulky_goods",
"recipient_was_contacted_by_phone",
"hotline_had_to_be_contacted_for_clarification",
"courier_was_ignored",
"reception_was_refused",
"receiving_department_was_busy"
],
"description": "Mandatory in case `service_time` is greater than service time included. Service time included means service time from response GET v1/stops."
}
},
"required": [
"auth_token",
"recorded_at",
"delivered_to",
"service_time"
]
}
200
Headers
Content-Type: application/json
Body
{
"uuid": "8c4e9e4b-a563-416a-828e-c6be2674546f",
"address_line": "72454 McGlynn Loop",
"postal_code": "60358-8053",
"city": "Brunohaven",
"starts_at": "2012-04-16T11:47:00+02:00",
"ends_at": "2012-04-16T11:52:00+02:00",
"name": "Leannon and Sons",
"lat": 10.231,
"lng": 43.001,
"require_signature": false,
"pickups_require_signature": false,
"pickups_require_photo_proof": false,
"require_real_service_time": true,
"finishing_blocked": false,
"change": null,
"applicable_events": [],
"service_time": 5,
"jobs": [
{
"uuid": "59f9c5ab-1c69-432f-a3ec-fdcb68046f9c",
"require_signature": false,
"require_real_service_time": true,
"state": "success",
"type": "delivery",
"packages": [
{
"identifier": "DED5F7D5F96AEA1F",
"description": "A fish",
"length": 30,
"weight": 5,
"height": 20,
"width": 10,
"size": "L",
"order_identifier": "M5AYCS",
"non_rotatable": false,
"fragile_goods": false,
"protect_from_water": false,
"external_id": null,
"state": "returned",
"actions": []
}
],
"order_identifier": "M5AYCS",
"external_order_id": "Z4HERJ",
"courier_information": "go go go; now now now",
"hazard_index": 0,
"distance": 2,
"events": [],
"pickup": {
"name": "I.P. Freely",
"address_line": "Im Dol 2",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "30049223333",
"after": "2012-04-16T07:00:00+02:00",
"before": "2012-04-16T07:30:00+02:00",
"information": "go go go",
"requirements": [],
"can_cancel_package_pickup": false,
"allow_partial_pick_up": false
},
"delivery": {
"name": "Mike Rotch",
"address_line": "Im Dol 48",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "30049224444",
"after": "2012-04-16T07:30:00+02:00",
"before": "2012-04-16T09:00:00+02:00",
"information": "now now now",
"requirements": [],
"allow_partial_delivery": false
},
"return": {
"service_times": {
"1": 6
},
"location_service_time": 0,
"additional_service_time": 0
}
}
],
"available_additional_service_time_reasons": [],
"service_time_options": [
5,
10,
15,
20,
30,
45,
60,
90,
120
],
"can_not_be_served_before": null,
"applicable_delivered_to_options": {
"recipient": {
"photo_proof": false,
"signature": true
},
"neighbour": {
"photo_proof": false,
"signature": true
},
"housemate": {
"photo_proof": false,
"signature": true
},
"safe_place": {
"at_the_apartments_door": {
"photo_proof": false,
"signature": false
},
"on_the_doorstep": {
"photo_proof": false,
"signature": false
},
"mailbox": {
"photo_proof": false,
"signature": false
},
"garage": {
"photo_proof": false,
"signature": false
},
"other": {
"photo_proof": false,
"signature": false
}
}
},
"mandatory_recipient_name": false,
"allow_one_click_selection": false,
"information": null,
"deferred": false,
"lang": [
"de"
]
}
Stops Updates ¶
Resource responsible for acceptance of not maintained yet stops
Protected resources.
Authorization required via auth_token
.
Obtain all stops with pending offers ¶
Obtain all stops with pending offersGET/v1/stops_updates{?auth_token}
Example URI
- auth_token
string
(required) Example: bf545b8e453536ee431648d86711243bAuthentication token
Headers
Content-Type: application/json
200
Headers
Content-Type: application/json
Body
[
{
"uuid": "daa650aa-4be1-4051-b9d5-329222b24e35",
"order_identifier": "X15MES",
"courier_company_name": "Company 36",
"packages": [
{
"length": 30,
"weight": 5,
"height": 20,
"width": 10,
"size": "L",
"order_identifier": "X15MES",
"description": "--- Hidden ---",
"identifier": "--- Hidden ---"
}
],
"courier_information": "go go go; now now now",
"hazard_index": 0,
"distance": 2,
"pickup": {
"name": "--- Hidden ---",
"address_line": "Im Dol 2",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "--- Hidden ---",
"after": "2012-04-16T07:00:00+02:00",
"before": "2012-04-16T07:30:00+02:00",
"information": "--- Hidden ---",
"requirements": []
},
"delivery": {
"name": "--- Hidden ---",
"address_line": "Im Dol 48",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "--- Hidden ---",
"after": "2012-04-16T07:30:00+02:00",
"before": "2012-04-16T09:00:00+02:00",
"information": "--- Hidden ---",
"requirements": []
}
}
]
Show offer ¶
Show offerGET/v1/stops_updates/{id}{?auth_token}
Example URI
- id
number
(required) Example: f56bc59fbb2adh67swoa7gv7Pending offer uuid
- auth_token
string
(required) Example: bf545b8e453536ee431648d86711243bAuthentication token
Headers
Content-Type: application/json
200
Headers
Content-Type: application/json
Body
{
"courier_company_name": "Company 40",
"courier_offer_uuid": "7eed6f14-7b14-4e37-add1-4af149468972",
"stops": [
{
"uuid": null,
"address_line": "Im Dol 2",
"postal_code": "14195",
"city": "Berlin",
"starts_at": "2012-04-15T23:48:00+02:00",
"ends_at": "2012-04-15T23:54:00+02:00",
"lat": 10.231,
"lng": 43.001,
"require_signature": false,
"require_real_service_time": true,
"change": "created",
"available_events": [
{
"type": "wrong_package_size",
"retry": false,
"retry_count": 0,
"photo_proof": true,
"sign": false,
"job_uuids": [
null
],
"common": false
},
{
"type": "package_was_not_ready",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": true,
"job_uuids": [
null
],
"common": false
},
{
"type": "sender_wants_to_cancel",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": true,
"job_uuids": [
null
],
"common": false
},
{
"type": "sender_was_not_at_home",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": false,
"job_uuids": [
null
],
"common": true
},
{
"type": "address_not_found",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": false,
"job_uuids": [
null
],
"common": true
},
{
"type": "name_not_found_on_doorbell",
"retry": false,
"retry_count": 0,
"photo_proof": true,
"sign": false,
"job_uuids": [
null
],
"common": true
},
{
"type": "no_attempt_due_to_being_late",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": false,
"job_uuids": [
null
],
"common": true
},
{
"type": "failed_due_to_business_closed",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": false,
"job_uuids": [
null
],
"common": true
}
],
"service_time": 6,
"time_window": "07:00 - 07:30 16.04.2012",
"available_additional_service_time_reasons": [
{
"type": "goods_could_not_be_found",
"job_uuids": [
null
]
},
{
"type": "handover_took_longer_as_planned",
"job_uuids": [
null
]
},
{
"type": "place_was_not_specified_correctly",
"job_uuids": [
null
]
},
{
"type": "contact_was_not_available",
"job_uuids": [
null
]
},
{
"type": "contact_was_busy",
"job_uuids": [
null
]
},
{
"type": "courier_was_ignored",
"job_uuids": [
null
]
}
],
"jobs": [
{
"id": null,
"type": "pickup",
"require_signature": false,
"require_real_service_time": true,
"state": "created",
"packages": [
{
"length": 30,
"weight": 5,
"height": 20,
"width": 10,
"size": "L",
"order_identifier": "NHA5NW",
"description": "--- Hidden ---",
"identifier": "--- Hidden ---"
}
],
"order_identifier": "NHA5NW",
"courier_information": "go go go; now now now",
"hazard_index": 0,
"distance": 2,
"pickup": {
"name": "--- Hidden ---",
"address_line": "Im Dol 2",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "--- Hidden ---",
"after": "2012-04-16T07:00:00+02:00",
"before": "2012-04-16T07:30:00+02:00",
"information": "--- Hidden ---",
"requirements": []
},
"delivery": {
"name": "--- Hidden ---",
"address_line": "Im Dol 48",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "--- Hidden ---",
"after": "2012-04-16T07:30:00+02:00",
"before": "2012-04-16T09:00:00+02:00",
"information": "--- Hidden ---",
"requirements": []
}
}
]
},
{
"uuid": null,
"address_line": "Im Dol 48",
"postal_code": "14195",
"city": "Berlin",
"starts_at": "2012-04-16T08:54:00+02:00",
"ends_at": "2012-04-16T09:00:00+02:00",
"lat": 10.2511,
"lng": 43.998,
"require_signature": false,
"require_real_service_time": true,
"change": "created",
"available_events": [
{
"type": "abort_delivery",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": false,
"job_uuids": [
null
],
"common": false
},
{
"type": "package_is_damaged",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": true,
"job_uuids": [
null
],
"common": false
},
{
"type": "no_access_to_building",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": false,
"job_uuids": [
null
],
"common": false
},
{
"type": "package_was_not_ordered",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": true,
"job_uuids": [
null
],
"common": false
},
{
"type": "package_was_not_accepted",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": true,
"job_uuids": [
null
],
"common": false
},
{
"type": "recipient_was_not_at_home",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": false,
"job_uuids": [
null
],
"common": true
},
{
"type": "not_enough_money_for_payment",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": true,
"job_uuids": [
null
],
"common": false
},
{
"type": "package_was_delivered_too_late",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": true,
"job_uuids": [
null
],
"common": false
},
{
"type": "address_not_found",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": false,
"job_uuids": [
null
],
"common": true
},
{
"type": "name_not_found_on_doorbell",
"retry": false,
"retry_count": 0,
"photo_proof": true,
"sign": false,
"job_uuids": [
null
],
"common": true
},
{
"type": "no_attempt_due_to_being_late",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": false,
"job_uuids": [
null
],
"common": true
},
{
"type": "failed_due_to_business_closed",
"retry": false,
"retry_count": 0,
"photo_proof": false,
"sign": false,
"job_uuids": [
null
],
"common": true
}
],
"service_time": 6,
"time_window": "07:30 - 09:00 16.04.2012",
"available_additional_service_time_reasons": [
{
"type": "contact_could_not_be_found",
"job_uuids": [
null
]
},
{
"type": "unloading_longer_than_expected_due_bulky_goods",
"job_uuids": [
null
]
},
{
"type": "recipient_was_contacted_by_phone",
"job_uuids": [
null
]
},
{
"type": "hotline_had_to_be_contacted_for_clarification",
"job_uuids": [
null
]
}
],
"jobs": [
{
"id": null,
"type": "delivery",
"require_signature": false,
"require_real_service_time": true,
"state": "created",
"packages": [
{
"length": 30,
"weight": 5,
"height": 20,
"width": 10,
"size": "L",
"order_identifier": "NHA5NW",
"description": "--- Hidden ---",
"identifier": "--- Hidden ---"
}
],
"order_identifier": "NHA5NW",
"courier_information": "go go go; now now now",
"hazard_index": 0,
"distance": 2,
"pickup": {
"name": "--- Hidden ---",
"address_line": "Im Dol 2",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "--- Hidden ---",
"after": "2012-04-16T07:00:00+02:00",
"before": "2012-04-16T07:30:00+02:00",
"information": "--- Hidden ---",
"requirements": []
},
"delivery": {
"name": "--- Hidden ---",
"address_line": "Im Dol 48",
"postal_code": "14195",
"city": "Berlin",
"phone_number": "--- Hidden ---",
"after": "2012-04-16T07:30:00+02:00",
"before": "2012-04-16T09:00:00+02:00",
"information": "--- Hidden ---",
"requirements": []
}
}
]
}
]
}
Count offers ¶
Count offersGET/v1/stops_updates/count{?auth_token}
Example URI
- auth_token
string
(required) Example: bf545b8e453536ee431648d86711243bAuthentication token
Headers
Content-Type: application/json
200
Headers
Content-Type: application/json
Body
{
"count": 0
}
Signatures ¶
Show signature ¶
Show signatureGET/v1/signatures/{id}.png
Example URI
- id
string
(required) Example: ed25b451-43d6-427f-845d-e0d5914e5965Signature uuid
Headers
Content-Type: application/json
200
Respond with image file
Delivery events ¶
Protected resource.
Authorization required via auth_token
.
Create delivery event ¶
Create delivery eventPOST/v1/delivery_events
Attribute name | Type | Required | Description | Available types: |
---|---|---|---|---|
auth_token | string |
X |
Authentication token | |
job_uuids | array |
X |
Array of job uuids | |
job_ids | array |
Array of job ids (deprecated) | ||
type | string |
X |
Event type |
Pickup failed events:
|
retry_at | string |
Date time when job should be retried | ||
recorded_at | string |
Date time when event had place. If not param present current time is used. |
||
photo_proof: | object |
Mandatory in case job require photo proof | Photo proof | |
note | string |
Explanation message | ||
data_uri | string |
Deprecated Image (png, jpg, jpeg, gif). Encoded using Data URI scheme. File max size 700 kb. |
||
data_uris | array |
Array of images encoded using Data URI scheme. Allowed image types: png, jpg, jpeg, gif. File max size 700 kb. |
||
signature: | object |
Mandatory in case job require signature | Signature | |
name | string |
Recipient / sender name | ||
data_uri | string |
Image (png, jpg, jpeg, gif). Encoded using Data URI scheme. File max size 100 kb. | ||
service_time | number |
Service time in minutes | ||
additional_service_time_reason | string |
Mandatory in case service_time is greaterthan service time included .Service time included means service_time attribute from response v1/stops
|
Additional service time reason |
On pickup:
|
Example URI
Headers
Content-Type: application/json
Body
{
"auth_token": "bf545b8e453536ee431648d86711243b",
"job_uuids": [
"1d16702c-19ab-4b37-9293-3fe24cfd03e4",
"333bea5e-d4b1-4f7b-ab29-a62f4b27be7c"
],
"type": "package_was_not_ready",
"retry_at": "2015-01-08 15:18:42",
"recorded_at": "2015-01-07 15:18:42",
"signature": {
"name": "Otto Normalverbraucher",
"data_uri": "TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5"
},
"photo_proof": {
"note": "the left corner is damaged",
"data_uris": [
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACC...REfRXH4tWFZGswQ2yAAAAAElFTkSuQmCC"
]
},
"service_time": 30,
"additional_service_time_reason": "goods_could_not_be_found"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"auth_token": {
"type": "string",
"description": "Authentication token"
},
"job_uuids": {
"type": "array",
"description": "Array of job uuids"
},
"type": {
"type": "string",
"enum": [
"package_was_not_ready",
"sender_wants_to_cancel",
"sender_was_not_at_home",
"wrong_package_size",
"abort_delivery",
"address_not_found",
"failed_due_to_business_closed",
"name_not_found_on_doorbell",
"no_attempt_due_to_being_late",
"not_enough_money_for_payment",
"package_is_damaged",
"package_was_delivered_too_late",
"package_was_not_accepted",
"package_was_not_ordered",
"recipient_was_not_at_home"
],
"description": "Event type"
},
"retry_at": {
"type": "string",
"description": "Date time when job should be retried"
},
"recorded_at": {
"type": "string",
"description": "Date time when event had place (if not param present current time is used)"
},
"signature": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of recipient / sender"
},
"data_uri": {
"type": "string",
"description": "Image encoded using Data URI scheme. Supported formats: jpg, png, jpeg, gif. File max size 100 kb."
}
},
"description": "Signature (required if job require signature)"
},
"photo_proof": {
"type": "object",
"properties": {
"note": {
"type": "string",
"description": "Explanation message"
},
"data_uris": {
"type": "array",
"description": "Images array encoded using Data URI scheme."
}
},
"description": "Photo_proof (required if type is `name_not_found_on_doorbell` or `wrong_package_size`))"
},
"service_time": {
"type": "number"
},
"additional_service_time_reason": {
"type": "string",
"enum": [
"goods_could_not_be_found",
"handover_took_longer_as_planned",
"place_was_not_specified_correctly",
"contact_was_not_available",
"contact_was_busy",
"courier_was_ignored",
"contact_could_not_be_found",
"unloading_longer_than_expected_due_bulky_goods",
"recipient_was_contacted_by_phone",
"hotline_had_to_be_contacted_for_clarification"
],
"description": "Mandatory in case `service_time` is greater than service time included. Service time included means service time from response GET v1/stops."
}
},
"required": [
"auth_token",
"job_uuids",
"type"
]
}
201
Statuses ¶
Record courier GPS information
Protected resource.
Authorization required via auth_token
.
Create status ¶
Create statusPOST/v1/statuses
Attribute name | Type | Required | Description |
---|---|---|---|
auth_token | string |
X |
Authentication token |
location: | object |
X |
GPS location data |
latitude | number |
X |
Current position latitude |
longitude | number |
X |
Current position longitude |
vehicle | string |
Courier vehicle information | |
recorded_at | string |
Date time | |
device_id | string |
Identification number of courier's device | |
stop_uuid | string |
Stop UUID | |
event | string |
Example URI
Headers
Content-Type: application/json
Body
{
"auth_token": "bf545b8e453536ee431648d86711243b",
"vehicle": "bmw 500",
"recorded_at": "2014-5-3 17:00",
"event": "delivery_failed",
"device_id": "352523",
"stop_uuid": "6b887f5e-7db3-45ec-badc-b32bacb88071",
"location": {
"latitude": 12.12,
"longitude": 11.11
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"auth_token": {
"type": "string",
"description": "Authentication token"
},
"vehicle": {
"type": "string",
"description": "Courier vehicle information"
},
"recorded_at": {
"type": "string",
"description": "date of event"
},
"event": {
"type": "string",
"description": "event type"
},
"device_id": {
"type": "string",
"description": "device identification number"
},
"stop_uuid": {
"type": "string",
"description": "stop identifier"
},
"location": {
"type": "object",
"properties": {
"latitude": {
"type": "number",
"description": "Current position latitude"
},
"longitude": {
"type": "number",
"description": "Current position longitude"
}
},
"required": [
"latitude",
"longitude"
],
"description": "GPS location data"
}
},
"required": [
"auth_token",
"location"
]
}
201
Headers
Content-Type: application/json
Activities ¶
Record when courier is navigating to the stop and when he’s started fulfilling jobs on the stop location.
Protected resource.
Authorization required via auth_token
.
Create status ¶
Create statusPOST/v1/activities
Record type of action courier is performing
Attribute name | Type | Required | Description | Available types |
---|---|---|---|---|
auth_token | string |
X |
Authentication token | |
recorded_at | string |
X |
Date time | |
action | string |
X |
Action type |
|
offline | boolean |
Indication if action was recorded while courier was offline |
Example URI
Headers
Content-Type: application/json
Body
{
"auth_token": "bf545b8e453536ee431648d86711243b",
"action": "task_start",
"recorded_at": "2014-05-03 17:00",
"stop_uuid": "6b887f5e-7db3-45ec-badc-b32bacb88071",
"offline": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"auth_token": {
"type": "string",
"description": "Authentication token"
},
"action": {
"type": "string",
"description": "Action type"
},
"recorded_at": {
"type": "string",
"description": "Date of action"
},
"stop_uuid": {
"type": "string",
"description": "Stop UUID"
},
"offline": {
"type": "boolean",
"description": "Indication if action was recorded offline"
}
},
"required": [
"auth_token",
"action",
"recorded_at",
"stop_uuid"
]
}
201
Headers
Content-Type: application/json
Performance ¶
Show performance of a courier ¶
Show performance of a courierGET/v1/performance
Example URI
Headers
Content-Type: application/json
Body
{
"auth_token": "bf545b8e453536ee431648d86711243b"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"auth_token": {
"type": "string",
"description": "Authentication token"
}
},
"required": [
"auth_token"
]
}
200
Headers
Content-Type: application/json
Body
[
// Object with the stats, API sends data in order
// i.e. today, current month, remaining 11 months.
// If period doesn't have any data the stats are not being sent
{
// "today", "current_month", lowercased month names
"label": "today",
"number_of_tours": 1,
"deliveries": {
// "good", "neutral", or "bad"
"rating": "good",
"ratio": 0.98
},
"pickups": {
"rating": "neutral",
"ratio": 0.94
},
"hit_rate": {
"rating": "bad",
"ratio": 0.93
}
}
]
Data consent ¶
Manage data consent
Protected resources.
Authorization required via auth_token
.
Obtain data consent ¶
Obtain data consentGET/v1/data_consent{?auth_token}
Example URI
- auth_token
string
(required) Example: bf545b8e453536ee431648d86711243bAuthentication token
Headers
Content-Type: application/json
200
Headers
Content-Type: application/json
Body
{
"share_with_receiver_sender": true,
"share_with_employer_client": true,
"share_with_tiramizoo_analytics": true,
"accept_data_and_privacy_policies": true
}
404
Returned if courier has never given consent
Headers
Content-Type: application/json
Update data consent ¶
Update data consentPUT/v1/data_consent
Attribute name | Type | Required | Description | Available types: |
---|---|---|---|---|
auth_token | string |
X |
Authentication token | |
share_with_receiver_sender | boolean |
Use courier's data with a delivery sender and recipient |
|
|
share_with_employer_client | boolean |
Share courier's data with theirs employer/client |
|
|
share_with_tiramizoo_analytics | boolean |
Use courier's data to improve the app (eg. better routes) |
|
|
accept_data_and_privacy_policies | boolean |
Acceptance of Data & Privacy policies |
|
Example URI
Headers
Content-Type: application/json
Body
{
"auth_token": "bf545b8e453536ee431648d86711243b",
"share_with_receiver_sender": true,
"share_with_employer_client": true,
"share_with_tiramizoo_analytics": true,
"accept_data_and_privacy_policies": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"auth_token": {
"type": "string",
"description": "Authentication token"
},
"share_with_receiver_sender": {
"type": "boolean",
"description": "Use courier's data with a delivery sender and recipient"
},
"share_with_employer_client": {
"type": "boolean",
"description": "Share courier's data with theirs employer/client"
},
"share_with_tiramizoo_analytics": {
"type": "boolean",
"description": "Use courier's data to improve the app (eg. better routes)"
},
"accept_data_and_privacy_policies": {
"type": "boolean",
"description": "Acceptance of Data & Privacy policies"
}
},
"required": [
"auth_token"
]
}
200
Headers
Content-Type: application/json
Body
{
"share_with_receiver_sender": true,
"share_with_employer_client": true,
"share_with_tiramizoo_analytics": true,
"accept_data_and_privacy_policies": true
}
422
Returned if share_with_receiver_sender
or accept_data_and_privacy_policies
are not true
.
Headers
Content-Type: application/json
Saas Organization ¶
Show details of a Saas Organization ¶
Show details of a Saas OrganizationGET/v1/saas_organization
Example URI
Headers
Content-Type: application/json
200
Body
{
"organization_email": "support@tiramizoo.com",
"organization_phone_number": "+49.89 21556870",
"organization_name": "Tiramizoo',
"organization_return_additional_service_time_reasons": ["courier_was_ignored", "reception_was_refused", "receiving_department_was_busy"],
"code_joinable_tours": true,
"loading_without_tour_enabled": true,
"whatsapp_messaging_enabled": true
}
Tour plan packages ¶
Return list of packages for each tour in current tour plan. This allows to sort packages by couriers, because when scanning courier knows which tour plan the package belongs to.
This resousce is only enabled if the POST to /v1/auth returns flag packages_by_tour_access: true
.
Protected resource.
Authorization required via auth_token
.
Get packages ¶
Get packagesGET/v1/tour_plan_packages
Example URI
201
Headers
Content-Type: application/json
Body
[
{
"name": "Tour #1",
"tour_position": 1,
DEPRECATED "packages_external_id": ["First external ID", "Second external ID"],
"packages_scanning_codes": ["First external ID", "Second external ID"]
}, {
"name": "Tour #2",
"tour_position": 2,
DEPRECATED "packages_external_id": ["Third external ID", "Fourth external ID", "Fifth external ID"],
"packages_scanning_codes": ["Third external ID", "Fourth external ID", "Fifth external ID"]
}
]