NAV -image
bash javascript

Introduction

Turpal API documentation

This documentation aims to provide all the information you need to work with Turpal Channel API.

Base URL

https://api.connect.turpal.com

Multi-language Support

This API supports handling multiple languages.

You need to send X-Lang: <language code> e.g. X-lang: ar.

Language code is ISO 639 2-letter codes: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

When you are unauthenticated you would get such response:

Example Response (401)


{
    "message": "Unauthenticated."
}

Auth

Login user.

You can login the user and get authentication tokens.

Example request:

curl -X POST \
    "https://api.connect.turpal.com/v1/tokens" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"email":"consequatur","username":"consequatur","password":"consequatur"}'
const url = new URL(
    "https://api.connect.turpal.com/v1/tokens"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "consequatur",
    "username": "consequatur",
    "password": "consequatur"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):

{
    "data": {
        "access_token": "eyJ0eXAiOiJKV1BiLCJhbGciOiJIUzI1NiJ9.eyJpc3MpOiJodHRwOlwvXC9sb2NhbGhvc3RcL3YxXC91c2VycyIsImlhdCI6MTYxOTczMjc4NiwiZXhwIjoxNjE5NzM5OTg2LCJuYmYiOjE2MTk3MzI3ODYsImp0aSI6IkljcHRrbzFqMGZ2bTFQSnYiLCJzdWIiOjk0LCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.4-FpXEJ8G-OMgsI6uSBYJh6Utihix-KOp2IMLAy3QRY",
        "refresh_token": "2|qxw2FGdueeliMgRCCRmWfDVsy8I7ws3muRRPx5Pl"
    }
}

Request      

POST v1/tokens

Body Parameters

email  string optional  
User email

username  string optional  
User username

password  string  
User password

Refresh auth token.

Using this endpoint you can refresh both accessToken and refreshToken

Example request:

curl -X PUT \
    "https://api.connect.turpal.com/v1/tokens/17" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"refresh_token":"consequatur"}'
const url = new URL(
    "https://api.connect.turpal.com/v1/tokens/17"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "refresh_token": "consequatur"
}

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT v1/tokens/{token}

PATCH v1/tokens/{token}

URL Parameters

token  integer  
The ID of the refresh token

Body Parameters

refresh_token  string  
the refreshToken provided in login

Log out user.

requires authentication

Example request:

curl -X DELETE \
    "https://api.connect.turpal.com/v1/tokens/17" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.connect.turpal.com/v1/tokens/17"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE v1/tokens/{token}

URL Parameters

token  integer  
This is the id of refresh token provided in the refresh token itself

Category

Search Categories.

requires authentication

Search through categories. The result categories are the ones that start with the query parameter.

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/categories?query=consequatur" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.connect.turpal.com/v1/categories"
);

let params = {
    "query": "consequatur",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "data": [
        {
            "id": 1062,
            "title": "dolores",
            "tags": []
        },
        {
            "id": 1063,
            "title": "dolorum",
            "tags": []
        }
    ]
}

Request      

GET v1/categories

Query Parameters

query  string optional  
search term. (case insensitive)

Response

Response Fields

id  integer  
ID of category

title  string  
Title of category

City

Search Cities.

requires authentication

Search cities with pagination that user has access to.

All query filters can have multiple values using | separator.

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/cities?per_page=17&filter[name]=Tehran%7CMashhad&filter[country_id]=1&filter[id]=1%7C2%7C3" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"per_page":17,"filter[name]":"consequatur","filter[country_id]":"consequatur","filter[id]":"consequatur"}'
const url = new URL(
    "https://api.connect.turpal.com/v1/cities"
);

let params = {
    "per_page": "17",
    "filter[name]": "Tehran|Mashhad",
    "filter[country_id]": "1",
    "filter[id]": "1|2|3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "per_page": 17,
    "filter[name]": "consequatur",
    "filter[country_id]": "consequatur",
    "filter[id]": "consequatur"
}

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "data": [
        {
            "id": 1,
            "name": "Ashkasham",
            "country": {
                "id": 1,
                "name": "Afghanistan",
                "code": "AF"
            },
            "tags": []
        },
        {
            "id": 1,
            "name": "Ashkasham",
            "country": {
                "id": 1,
                "name": "Afghanistan",
                "code": "AF"
            },
            "tags": []
        }
    ]
}

Request      

GET v1/cities

Query Parameters

per_page  integer optional  
Number of items in a page. max: 20

filter[name]  string optional  
filter cities based on name.

filter[country_id]  integer optional  
filter cities based on country id.

filter[id]  string optional  
filter cities based on city id.

Body Parameters

per_page  integer optional  

filter[name]  string optional  

filter[country_id]  string optional  

filter[id]  string optional  

Country

Search Countries.

requires authentication

Search through countries. The result countries are the ones that start with the query parameter.

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/countries?query=consequatur" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.connect.turpal.com/v1/countries"
);

let params = {
    "query": "consequatur",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "data": [
        {
            "id": null,
            "name": "Christmas Island",
            "code": "ME"
        },
        {
            "id": null,
            "name": "San Marino",
            "code": "BW"
        }
    ]
}

Request      

GET v1/countries

Query Parameters

query  string optional  
search term. (case insensitive)

Destination

Search destinations.

Search through cities, countries and experiences (products).

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/destinations?query=consequatur" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.connect.turpal.com/v1/destinations"
);

let params = {
    "query": "consequatur",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "data": [
        {
            "id": 100,
            "title": "London",
            "type": "city"
        },
        {
            "id": 23,
            "title": "United Kingdom",
            "type": "country"
        }
    ]
}

Request      

GET v1/destinations

Query Parameters

query  string optional  
search term. (case insensitive)

Response

Response Fields

id  integer  
ID of resource

title  string  
Title of resource

type  string  
Type of destination: "city"|"country"

Label

Get list of all labels.

requires authentication

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/labels?query=consequatur" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.connect.turpal.com/v1/labels"
);

let params = {
    "query": "consequatur",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "data": [
        "first label",
        "second label",
        "third label"
    ]
}

Request      

GET v1/labels

Query Parameters

query  string optional  
search term. (case insensitive)

Order

All query filters can have multiple values using | separator.

Export orders.

requires authentication

Export the selected orders into a csv file.

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/orders/export" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"filter":{"today_orders":true,"product":{"ids":"1|2|3"},"supplier":{"ids":"1|2|3"},"client":{"ids":"1|2|3"},"city":{"ids":"1|2|3","tags":[{},null]},"order_date":{"start":"2022-01-01","end":"2022-01-01"},"book_date":{"start":"2022-01-01","end":"2022-01-01"},"activity_date":{"start":"2022-01-01","end":"2022-01-01"},"include":"pickup.driver|dropoff.driver","status":"InCart|Booked|Deleted|Cancelled","search":"some-tag-value","tags":[{},null]},"page":1,"per_page":1}'
const url = new URL(
    "https://api.connect.turpal.com/v1/orders/export"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filter": {
        "today_orders": true,
        "product": {
            "ids": "1|2|3"
        },
        "supplier": {
            "ids": "1|2|3"
        },
        "client": {
            "ids": "1|2|3"
        },
        "city": {
            "ids": "1|2|3",
            "tags": [
                {},
                null
            ]
        },
        "order_date": {
            "start": "2022-01-01",
            "end": "2022-01-01"
        },
        "book_date": {
            "start": "2022-01-01",
            "end": "2022-01-01"
        },
        "activity_date": {
            "start": "2022-01-01",
            "end": "2022-01-01"
        },
        "include": "pickup.driver|dropoff.driver",
        "status": "InCart|Booked|Deleted|Cancelled",
        "search": "some-tag-value",
        "tags": [
            {},
            null
        ]
    },
    "page": 1,
    "per_page": 1
}

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

GET v1/orders/export

Body Parameters

filter  object optional  

filter.today_orders  boolean optional  
If you only want orders for today.

filter.product  object optional  
Array of product ids.

filter.product.ids  string optional  
Id of products separated by |.

filter.supplier  object optional  
Array of supplier ids.

filter.supplier.ids  string optional  
Id of suppliers seperated by |.

filter.client  object optional  
Array of client ids.

filter.client.ids  string optional  
Id of clients seperated by |.

filter.city  object optional  

filter.city.ids  string optional  
Id of cities separated by |.

filter.city.tags  string[] optional  

filter.order_date  object optional  

filter.order_date.start  string optional  
start date of creating an order in format of yyyyy-mm-dd The value must be a valid date.

filter.order_date.end  string optional  
end date of creating an order in format of yyyyy-mm-dd The value must be a valid date.

filter.book_date  object optional  

filter.book_date.start  string optional  
Filter orders that are finalized after this date. Provide date in format of yyyyy-mm-dd The value must be a valid date.

filter.book_date.end  string optional  
Filter orders that are finalized before this date. Provide date in format of yyyyy-mm-dd The value must be a valid date.

filter.activity_date  object optional  

filter.activity_date.start  string optional  
Start date of executing an experience in format of yyyyy-mm-dd The value must be a valid date. The value must be a valid date in the format Y-m-d.

filter.activity_date.end  string optional  
End date of executing an experience in format of yyyyy-mm-dd The value must be a valid date. The value must be a valid date in the format Y-m-d.

filter.include  string optional  
Include relations based on request.

filter.status  string optional  
Status of order seperated by |.

filter.search  string optional  
search orders by value of tags, id of orders or name of passengers.

filter.tags  string[] optional  

page  integer optional  
The page of the pagination.

per_page  integer optional  
Number of items in a page. max: 100.

Get list of orders.

requires authentication

Get all the orders with pagination and filter that user has access to .

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/orders" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"filter":{"today_orders":true,"product":{"ids":"1|2|3"},"supplier":{"ids":"1|2|3"},"client":{"ids":"1|2|3"},"city":{"ids":"1|2|3","tags":[{},null]},"order_date":{"start":"2022-01-01","end":"2022-01-01"},"book_date":{"start":"2022-01-01","end":"2022-01-01"},"activity_date":{"start":"2022-01-01","end":"2022-01-01"},"include":"pickup.driver|dropoff.driver","status":"InCart|Booked|Deleted|Cancelled","search":"some-tag-value","tags":[{},null]},"page":1,"per_page":1}'
const url = new URL(
    "https://api.connect.turpal.com/v1/orders"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filter": {
        "today_orders": true,
        "product": {
            "ids": "1|2|3"
        },
        "supplier": {
            "ids": "1|2|3"
        },
        "client": {
            "ids": "1|2|3"
        },
        "city": {
            "ids": "1|2|3",
            "tags": [
                {},
                null
            ]
        },
        "order_date": {
            "start": "2022-01-01",
            "end": "2022-01-01"
        },
        "book_date": {
            "start": "2022-01-01",
            "end": "2022-01-01"
        },
        "activity_date": {
            "start": "2022-01-01",
            "end": "2022-01-01"
        },
        "include": "pickup.driver|dropoff.driver",
        "status": "InCart|Booked|Deleted|Cancelled",
        "search": "some-tag-value",
        "tags": [
            {},
            null
        ]
    },
    "page": 1,
    "per_page": 1
}

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "data": [
        {
            "id": 1,
            "tags": [
                {
                    "key": "trip_id",
                    "value": "1"
                }
            ],
            "booked_at": "2020-01-01 00:00:00",
            "bookings": [
                {
                    "id": 5,
                    "status": "Booked",
                    "prices": {
                        "original": {
                            "amount": 668,
                            "currency": {
                                "code": "AED",
                                "symbol": "a",
                                "name": "voluptatem"
                            }
                        },
                        "agent": {
                            "amount": 885,
                            "currency": {
                                "code": "AED",
                                "symbol": "a",
                                "name": "voluptatem"
                            }
                        },
                        "sold": {
                            "amount": 90,
                            "currency": {
                                "code": "AED",
                                "symbol": "a",
                                "name": "voluptatem"
                            }
                        }
                    },
                    "availability": {
                        "id": 5,
                        "start_time": "16:02:23",
                        "date": "2027-11-27"
                    },
                    "passengers": [
                        {
                            "passenger_id": 1,
                            "status": "Booked",
                            "prices": {
                                "original": {
                                    "amount": 599,
                                    "currency": {
                                        "code": "LBP",
                                        "symbol": "s",
                                        "name": "dolore"
                                    }
                                },
                                "agent": {
                                    "amount": 13,
                                    "currency": {
                                        "code": "IDR",
                                        "symbol": "i",
                                        "name": "harum"
                                    }
                                },
                                "sold": {
                                    "amount": 779,
                                    "currency": {
                                        "code": "GNF",
                                        "symbol": "o",
                                        "name": "atque"
                                    }
                                }
                            }
                        }
                    ]
                }
            ],
            "booked_details": {
                "product": {
                    "id": 1,
                    "title": "quo doloribus",
                    "highlights": [
                        "Similique repellendus expedita non excepturi veritatis tempore id.",
                        "Maxime tenetur ut aut eaque molestiae.",
                        "Consectetur similique magni quos delectus inventore perspiciatis quia."
                    ],
                    "description": "Porro ut neque officiis at nobis. Et voluptas ut deleniti voluptas. Consequatur a ut enim ea nihil temporibus omnis. Optio a enim recusandae laborum similique maxime id.",
                    "what_to_bring": "Et odit libero corporis sunt iure. Vel incidunt aliquid voluptatum sed architecto. Dolorum ut fuga excepturi quis autem.",
                    "supplier": {
                        "id": 11,
                        "name": "Green Apple Travel",
                        "description": "Travel",
                        "tags": [
                            {
                                "key": "some-tag",
                                "value": "some-value"
                            }
                        ],
                        "permissions": [
                            {
                                "name": "create-and-edit-product",
                                "description": "create and edit product"
                            }
                        ]
                    },
                    "banner": {
                        "id": 1,
                        "filename": "quod",
                        "url": "http:\/\/localhost\/storage\/tmp\/fakerSH2YJL"
                    },
                    "know_before_you_go": "Ut qui officia earum optio rerum vel sed. At necessitatibus praesentium eum harum occaecati. Earum quod est praesentium et repudiandae aperiam ut. Provident aut veritatis odio ut harum ut.",
                    "thumbnail": {
                        "id": 2,
                        "filename": "distinctio",
                        "url": "http:\/\/localhost\/storage\/tmp\/fakeraOwD9M"
                    },
                    "images": [
                        {
                            "id": 3,
                            "filename": "sit",
                            "url": "http:\/\/localhost\/storage\/tmp\/fakert9rJHJ"
                        },
                        {
                            "id": 4,
                            "filename": "unde",
                            "url": "http:\/\/localhost\/storage\/tmp\/fakerj4p1oK"
                        }
                    ],
                    "videos": [
                        {
                            "video_code": "et",
                            "type": "youtube",
                            "url": "https:\/\/www.youtube.com\/watch?v=et"
                        },
                        {
                            "video_code": "autem",
                            "type": "vimeo",
                            "url": "https:\/\/vimeo.com\/autem"
                        }
                    ],
                    "categories": [
                        {
                            "id": 1,
                            "title": "mollitia",
                            "tags": [
                                {
                                    "key": "ds-category-id",
                                    "value": "3"
                                }
                            ]
                        }
                    ],
                    "labels": [
                        "Ski",
                        "Dubai"
                    ],
                    "tags": [
                        {
                            "key": "product tag",
                            "value": "tag value"
                        }
                    ],
                    "distributor": {
                        "name": "Rayna"
                    }
                },
                "service_level": {
                    "title": "fugiat",
                    "description": "Possimus et asperiores fuga voluptas. Illum corrupti tempora molestiae consectetur neque aut. Ex ex veniam neque velit. Hic perspiciatis dignissimos ut cupiditate quis incidunt.",
                    "business_hours": "08:12 - 15:122 asperiores fuga voluptas.",
                    "capacity": 6,
                    "pricing_type": "per_person",
                    "has_pickup": false,
                    "has_drop_off": true,
                    "has_tour_guide": false,
                    "duration": {
                        "time": 20,
                        "description": null
                    },
                    "cut_off_time": 0,
                    "availability_type": "pass",
                    "offer_time_start": "2021-01-25",
                    "offer_time_end": "2021-02-08"
                },
                "rate": {
                    "pass_expiration_date": "2040-01-01",
                    "pass_expiration_minutes_after_booking": 1000
                },
                "rates": [
                    {
                        "id": 1,
                        "title": "mollitia",
                        "cancellation_policies": {
                            "penalties": [
                                {
                                    "id": 4,
                                    "time": 918,
                                    "percentage": 20
                                }
                            ],
                            "description": null
                        }
                    }
                ],
                "starting_point": {
                    "latitude": "53.197256",
                    "longitude": "153.01775",
                    "address": "316 Virginie Forest Suite 866\nPaytonside, WA 97624-6260",
                    "city": {
                        "id": 1,
                        "name": "North Evelyntown",
                        "tags": [
                            {
                                "key": "ds-city-id",
                                "value": "3"
                            }
                        ]
                    },
                    "country": {
                        "id": 1,
                        "name": "Australia",
                        "code": "EE"
                    }
                }
            },
            "city": {
                "id": 1,
                "name": "North Evelyntown",
                "country": {
                    "id": 1,
                    "name": "Australia",
                    "code": "EE"
                },
                "tags": [
                    {
                        "key": "ds-city-id",
                        "value": "3"
                    }
                ]
            },
            "supplier": {
                "id": 11,
                "name": "Green Apple Travel",
                "description": "Travel",
                "tags": [
                    {
                        "key": "some-tag",
                        "value": "some-value"
                    }
                ],
                "permissions": [
                    {
                        "name": "create-and-edit-product",
                        "description": "create and edit product"
                    }
                ]
            },
            "passengers": [
                {
                    "id": 1,
                    "first_name": "Remington",
                    "last_name": "Reilly",
                    "gender": "Male",
                    "phone_number": "9999",
                    "whatsapp_number": "9999",
                    "email": "lemke.marc@example.com",
                    "is_leader": true,
                    "price_category": {
                        "id": 1,
                        "title": "dolorem recusandae",
                        "is_default": false,
                        "minimum": 0,
                        "maximum": 5,
                        "age_range": {
                            "min": 24,
                            "max": 63
                        }
                    }
                },
                {
                    "id": 2,
                    "first_name": "Remington",
                    "last_name": "Reilly",
                    "gender": "Male",
                    "phone_number": "9999",
                    "whatsapp_number": "9999",
                    "email": "lemke.marc@example.com",
                    "is_leader": false,
                    "price_category": {
                        "id": 3,
                        "title": "dolorem recusandae",
                        "is_default": false,
                        "minimum": 0,
                        "maximum": 5,
                        "age_range": {
                            "min": 24,
                            "max": 63
                        }
                    }
                }
            ],
            "status": "Booked",
            "starts_at": "2021-07-11 02:00:00"
        }
    ]
}

Request      

GET v1/orders

Body Parameters

filter  object optional  

filter.today_orders  boolean optional  
If you only want orders for today.

filter.product  object optional  
Array of product ids.

filter.product.ids  string optional  
Id of products separated by |.

filter.supplier  object optional  
Array of supplier ids.

filter.supplier.ids  string optional  
Id of suppliers seperated by |.

filter.client  object optional  
Array of client ids.

filter.client.ids  string optional  
Id of clients seperated by |.

filter.city  object optional  

filter.city.ids  string optional  
Id of cities separated by |.

filter.city.tags  string[] optional  

filter.order_date  object optional  

filter.order_date.start  string optional  
start date of creating an order in format of yyyyy-mm-dd The value must be a valid date.

filter.order_date.end  string optional  
end date of creating an order in format of yyyyy-mm-dd The value must be a valid date.

filter.book_date  object optional  

filter.book_date.start  string optional  
Filter orders that are finalized after this date. Provide date in format of yyyyy-mm-dd The value must be a valid date.

filter.book_date.end  string optional  
Filter orders that are finalized before this date. Provide date in format of yyyyy-mm-dd The value must be a valid date.

filter.activity_date  object optional  

filter.activity_date.start  string optional  
Start date of executing an experience in format of yyyyy-mm-dd The value must be a valid date. The value must be a valid date in the format Y-m-d.

filter.activity_date.end  string optional  
End date of executing an experience in format of yyyyy-mm-dd The value must be a valid date. The value must be a valid date in the format Y-m-d.

filter.include  string optional  
Include relations based on request.

filter.status  string optional  
Status of order seperated by |.

filter.search  string optional  
search orders by value of tags, id of orders or name of passengers.

filter.tags  string[] optional  

page  integer optional  
The page of the pagination.

per_page  integer optional  
Number of items in a page. max: 100.

Get a single order.

requires authentication

Get a single Order and its details using identifier (ID or Tag).

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/orders/17" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.connect.turpal.com/v1/orders/17"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "data": {
        "id": 1,
        "starts_at": "2021-03-01 20:23:55",
        "ends_at": "2021-03-01 20:23:55",
        "reference_code": null,
        "booked_at": "2020-01-01 00:00:00",
        "tour_guide": {
            "id": 4,
            "name": "Darius Kulas DDS",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Darius+Kulas+DDS&color=7F9CF5&background=EBF4FF",
            "tags": [
                {
                    "key": "some tag key",
                    "value": "some tag value"
                }
            ]
        },
        "issuer": {
            "id": 1,
            "name": "Thurman Mertz",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Thurman+Mertz&color=7F9CF5&background=EBF4FF",
            "tags": [
                {
                    "key": "some tag key",
                    "value": "some tag value"
                }
            ]
        },
        "contact_person": {
            "id": 2,
            "name": "Lavon Nicolas",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Lavon+Nicolas&color=7F9CF5&background=EBF4FF",
            "tags": [
                {
                    "key": "some tag key",
                    "value": "some tag value"
                }
            ]
        },
        "status": "InCart",
        "bookings": [
            {
                "id": 1,
                "status": "InCart",
                "prices": {
                    "original": null,
                    "agent": null,
                    "sold": null
                },
                "availability": {
                    "id": 1,
                    "start_time": "20:23:55",
                    "date": "2021-03-01"
                },
                "passengers": [
                    {
                        "passenger_id": 1,
                        "status": "InCart",
                        "prices": {
                            "original": {
                                "amount": 691,
                                "currency": {
                                    "code": "AED",
                                    "symbol": "v",
                                    "name": "nisi"
                                }
                            },
                            "agent": {
                                "amount": 691,
                                "currency": {
                                    "code": "AED",
                                    "symbol": "v",
                                    "name": "nisi"
                                }
                            },
                            "sold": {
                                "amount": 691,
                                "currency": {
                                    "code": "AED",
                                    "symbol": "v",
                                    "name": "nisi"
                                }
                            }
                        }
                    },
                    {
                        "passenger_id": 2,
                        "status": "InCart",
                        "prices": {
                            "original": {
                                "amount": 603,
                                "currency": {
                                    "code": "AED",
                                    "symbol": "v",
                                    "name": "nisi"
                                }
                            },
                            "agent": {
                                "amount": 603,
                                "currency": {
                                    "code": "AED",
                                    "symbol": "v",
                                    "name": "nisi"
                                }
                            },
                            "sold": {
                                "amount": 603,
                                "currency": {
                                    "code": "AED",
                                    "symbol": "v",
                                    "name": "nisi"
                                }
                            }
                        }
                    }
                ]
            }
        ],
        "client": {
            "id": 2,
            "name": "Tyshawn Nader DVM",
            "description": "similique quaerat",
            "tags": [
                {
                    "key": "some tag key",
                    "value": "some tag value"
                }
            ]
        },
        "vat": {
            "percentage": "5.0",
            "type": "included"
        },
        "passengers": [
            {
                "id": 1,
                "first_name": "Kaleigh",
                "last_name": "Roob",
                "gender": "male",
                "phone_number": "+1 (984) 759-7630",
                "whatsapp_number": "1-551-489-1815",
                "email": "carlie06@windler.com",
                "is_leader": false,
                "price_category": {
                    "id": 2,
                    "title": "et assumenda",
                    "is_default": false,
                    "minimum": 0,
                    "maximum": 5,
                    "age_range": {
                        "min": 14,
                        "max": 101
                    }
                }
            },
            {
                "id": 2,
                "first_name": "Britney",
                "last_name": "Hill",
                "gender": "male",
                "phone_number": "864.635.6728",
                "whatsapp_number": "+1.949.652.2136",
                "email": "anabelle.rau@walter.com",
                "is_leader": false,
                "price_category": {
                    "id": 3,
                    "title": "et aspernatur",
                    "is_default": false,
                    "minimum": 0,
                    "maximum": 1,
                    "age_range": {
                        "min": 6,
                        "max": 164
                    }
                }
            }
        ],
        "pickup": {
            "id": 1,
            "date": "2022-01-01",
            "time": "12:00:00",
            "driver": {
                "id": 13,
                "name": "Nia Smith",
                "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Nia+Smith&color=7F9CF5&background=EBF4FF",
                "tags": [
                    {
                        "key": "ds_driver_id",
                        "value": "1"
                    }
                ]
            },
            "location": {
                "point": {
                    "id": 2,
                    "latitude": "8.41593300",
                    "longitude": "-59.74564700",
                    "address": "168 Kutch Fort Suite 081\nSelmerborough, SD 24152-3101",
                    "city": {
                        "id": 1,
                        "name": "East Aaron",
                        "country": {
                            "id": 1,
                            "name": "Uganda",
                            "code": "VU"
                        },
                        "tags": [
                            {
                                "key": "ds_city_id",
                                "value": "1"
                            }
                        ]
                    }
                }
            }
        },
        "dropoff": {
            "id": 2,
            "date": "2022-01-01",
            "time": "12:00:00",
            "driver": {
                "id": 15,
                "name": "Alberta Osinski",
                "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Alberta+Osinski&color=7F9CF5&background=EBF4FF",
                "tags": [
                    {
                        "key": "ds_driver_id",
                        "value": "1"
                    }
                ]
            },
            "location": {
                "point": {
                    "id": 3,
                    "latitude": "44.76111300",
                    "longitude": "144.67273800",
                    "address": "5851 Georgianna Walk\nGagechester, SD 88867",
                    "city": {
                        "id": 3,
                        "name": "West Gerardhaven",
                        "country": {
                            "id": 3,
                            "name": "Peru",
                            "code": "SN"
                        },
                        "tags": []
                    }
                }
            }
        },
        "tickets": [
            {
                "id": 4,
                "filename": "consequatur",
                "url": "https:\/\/rkfgejgwd.com\/rfeg\/rer"
            }
        ],
        "tags": [
            {
                "key": "ds_invoice_id",
                "value": "1"
            }
        ],
        "booked_details": {
            "rate": {
                "pass_expiration_date": null,
                "pass_expiration_minutes_after_booking": null
            },
            "rates": [
                {
                    "id": 1,
                    "title": "natus eum deserunt",
                    "cancellation_policies": {
                        "penalties": [
                            {
                                "id": 1,
                                "time": 137,
                                "percentage": 46
                            }
                        ],
                        "description": null
                    }
                }
            ],
            "product": {
                "id": 1,
                "tags": [
                    {
                        "key": "product tag",
                        "value": "tag value"
                    }
                ],
                "title": "et eum",
                "banner": {
                    "id": 1,
                    "url": "\/storage\/\/tmp\/fakeruEzGvp",
                    "filename": "facilis"
                },
                "images": [
                    {
                        "id": 3,
                        "url": "\/storage\/\/tmp\/fakerCVSnzr",
                        "filename": "repudiandae"
                    },
                    {
                        "id": 4,
                        "url": "\/storage\/\/tmp\/fakerT9Ysct",
                        "filename": "incidunt"
                    }
                ],
                "labels": [
                    "eum"
                ],
                "videos": [
                    {
                        "url": "https:\/\/www.youtube.com\/watch?v=cum",
                        "type": "youtube",
                        "video_code": "cum"
                    },
                    {
                        "url": "https:\/\/vimeo.com\/natus",
                        "type": "vimeo",
                        "video_code": "natus"
                    }
                ],
                "supplier": {
                    "id": 10,
                    "name": "Prof. Rogelio Adams",
                    "tags": [
                        {
                            "key": "supplier tag",
                            "value": "tag value"
                        }
                    ],
                    "description": "fuga nesciunt",
                    "permissions": [
                        {
                            "name": "create-and-edit-product",
                            "description": "create and edit product"
                        }
                    ]
                },
                "thumbnail": {
                    "id": 2,
                    "url": "\/storage\/\/tmp\/faker7QdgUs",
                    "filename": "quis"
                },
                "categories": [
                    {
                        "id": 1,
                        "title": "mollitia",
                        "tags": [
                            {
                                "key": "ds-category-id",
                                "value": "3"
                            }
                        ]
                    }
                ],
                "highlights": [
                    "Vero aut ad et odio sunt.",
                    "Cumque ipsum ea atque inventore minima sit.",
                    "Perspiciatis ullam ut atque possimus ea quis et et."
                ],
                "description": "Dolor minima odio nemo quod. Iure molestias explicabo deleniti adipisci at. Quibusdam quam totam quae.",
                "distributor": {
                    "name": "Rayna"
                },
                "what_to_bring": "Temporibus consequatur mollitia dolores aut blanditiis. Consequatur voluptatem inventore vero id.",
                "know_before_you_go": "Ducimus officiis quia numquam. Consequuntur omnis nisi blanditiis et molestiae. Incidunt quos eaque hic."
            },
            "service_level": {
                "title": "adipisci",
                "capacity": 6,
                "duration": {
                    "time": 0,
                    "description": null
                },
                "has_pickup": true,
                "description": "Totam aut vel et ut doloribus. Voluptatem nulla recusandae ducimus ducimus porro illo assumenda. At temporibus ea eius atque excepturi. Distinctio praesentium ad consequatur corrupti et eum.",
                "cut_off_time": 0,
                "has_drop_off": true,
                "pricing_type": "per_person",
                "business_hours": null,
                "has_tour_guide": false,
                "offer_time_end": "2021-02-08",
                "offer_time_start": "2021-01-25",
                "availability_type": "per_slot"
            },
            "starting_point": {
                "city": {
                    "id": 1,
                    "name": "East Aaron",
                    "tags": [
                        {
                            "key": "ds-city-id",
                            "value": 3
                        }
                    ]
                },
                "address": "8158 Ernser Isle Apt. 048\nEast Yvette, MT 10477-0195",
                "country": {
                    "id": 1,
                    "code": "VU",
                    "name": "Uganda"
                },
                "latitude": "53.03937800",
                "longitude": "-41.04082300"
            }
        },
        "total_prices": {
            "original": {
                "amount": 0,
                "currency": {
                    "code": "AED",
                    "symbol": "v",
                    "name": "nisi"
                }
            },
            "agent": {
                "amount": 0,
                "currency": {
                    "code": "AED",
                    "symbol": "v",
                    "name": "nisi"
                }
            },
            "sold": {
                "amount": 0,
                "currency": {
                    "code": "AED",
                    "symbol": "v",
                    "name": "nisi"
                }
            }
        }
    }
}

Request      

GET v1/orders/{order}

URL Parameters

order  integer  
Order ID or Tag.

Update order details.

requires authentication

Update details of an order .

Example request:

curl -X PUT \
    "https://api.connect.turpal.com/v1/orders/consequatur" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"pickup":{"date":"2023-03-26T22:12:13+0000","time":"22:12","driver_id":{},"location":{"point":["consequatur"]}},"dropoff":{"date":"2023-03-26T22:12:13+0000","time":"22:12","driver_id":{},"location":{"point":["consequatur"]}},"status":"consequatur","contact_person":{"tags":[{},null],"id":17},"tour_guide":{"tags":[{},null],"id":17},"reference_code":"consequatur","leader":{"first_name":"consequatur","last_name":"consequatur","gender":"consequatur","phone_number":"consequatur","phone_country_code":"consequatur","whatsapp_number":"consequatur","email":"qkunze@example.com"}}'
const url = new URL(
    "https://api.connect.turpal.com/v1/orders/consequatur"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "pickup": {
        "date": "2023-03-26T22:12:13+0000",
        "time": "22:12",
        "driver_id": {},
        "location": {
            "point": [
                "consequatur"
            ]
        }
    },
    "dropoff": {
        "date": "2023-03-26T22:12:13+0000",
        "time": "22:12",
        "driver_id": {},
        "location": {
            "point": [
                "consequatur"
            ]
        }
    },
    "status": "consequatur",
    "contact_person": {
        "tags": [
            {},
            null
        ],
        "id": 17
    },
    "tour_guide": {
        "tags": [
            {},
            null
        ],
        "id": 17
    },
    "reference_code": "consequatur",
    "leader": {
        "first_name": "consequatur",
        "last_name": "consequatur",
        "gender": "consequatur",
        "phone_number": "consequatur",
        "phone_country_code": "consequatur",
        "whatsapp_number": "consequatur",
        "email": "qkunze@example.com"
    }
}

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT v1/orders/{order}

PATCH v1/orders/{order}

URL Parameters

order  string  

Body Parameters

pickup  object optional  

pickup.date  string optional  
The value must be a valid date.

pickup.time  string optional  
The value must be a valid date in the format H:i.

pickup.driver_id  string optional  

pickup.location  object optional  

pickup.location.point  string[] optional  

dropoff  object optional  

dropoff.date  string optional  
The value must be a valid date.

dropoff.time  string optional  
The value must be a valid date in the format H:i.

dropoff.driver_id  string optional  

dropoff.location  object optional  

dropoff.location.point  string[] optional  

status  string optional  

contact_person  object optional  

contact_person.tags  string[] optional  

contact_person.id  integer optional  

tour_guide  object optional  

tour_guide.tags  string[] optional  

tour_guide.id  integer optional  

reference_code  string optional  

leader  object optional  

leader.first_name  string optional  

leader.last_name  string optional  

leader.gender  string optional  

leader.phone_number  string optional  

leader.phone_country_code  string optional  

leader.whatsapp_number  string optional  

leader.email  string optional  
The value must be a valid email address.

Update batch of orders details.

requires authentication

Update details of orders .

Example request:

curl -X PUT \
    "https://api.connect.turpal.com/v1/orders" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"pickup":{"date":"2023-03-26T22:12:13+0000","time":"22:12","driver_id":{},"location":{"point":["consequatur"]}},"dropoff":{"date":"2023-03-26T22:12:13+0000","time":"22:12","driver_id":{},"location":{"point":["consequatur"]}},"status":"consequatur","contact_person":{"tags":[{},null],"id":17},"tour_guide":{"tags":[{},null],"id":17},"reference_code":"consequatur","leader":{"first_name":"consequatur","last_name":"consequatur","gender":"consequatur","phone_number":"consequatur","phone_country_code":"consequatur","whatsapp_number":"consequatur","email":"qkunze@example.com"},"orders":{"tags":[{},null],"ids":[17,17]}}'
const url = new URL(
    "https://api.connect.turpal.com/v1/orders"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "pickup": {
        "date": "2023-03-26T22:12:13+0000",
        "time": "22:12",
        "driver_id": {},
        "location": {
            "point": [
                "consequatur"
            ]
        }
    },
    "dropoff": {
        "date": "2023-03-26T22:12:13+0000",
        "time": "22:12",
        "driver_id": {},
        "location": {
            "point": [
                "consequatur"
            ]
        }
    },
    "status": "consequatur",
    "contact_person": {
        "tags": [
            {},
            null
        ],
        "id": 17
    },
    "tour_guide": {
        "tags": [
            {},
            null
        ],
        "id": 17
    },
    "reference_code": "consequatur",
    "leader": {
        "first_name": "consequatur",
        "last_name": "consequatur",
        "gender": "consequatur",
        "phone_number": "consequatur",
        "phone_country_code": "consequatur",
        "whatsapp_number": "consequatur",
        "email": "qkunze@example.com"
    },
    "orders": {
        "tags": [
            {},
            null
        ],
        "ids": [
            17,
            17
        ]
    }
}

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "data": [
        {
            "id": 1,
            "tags": [
                {
                    "key": "some tag key",
                    "value": "some tag value"
                }
            ],
            "bookings": [
                {
                    "id": 1,
                    "status": "Cancelled",
                    "prices": {
                        "original": {
                            "amount": 183,
                            "currency": {
                                "code": "AED",
                                "symbol": "k",
                                "name": "fuga"
                            }
                        },
                        "agent": {
                            "amount": 906,
                            "currency": {
                                "code": "AED",
                                "symbol": "k",
                                "name": "fuga"
                            }
                        },
                        "sold": {
                            "amount": 480,
                            "currency": {
                                "code": "AED",
                                "symbol": "k",
                                "name": "fuga"
                            }
                        }
                    },
                    "availability": {
                        "id": 1,
                        "start_time": "20:23:55",
                        "date": "2021-03-01"
                    },
                    "passengers": [
                        {
                            "passenger_id": 1,
                            "status": "Cancelled",
                            "prices": {
                                "original": {
                                    "amount": 691,
                                    "currency": {
                                        "code": "AED",
                                        "symbol": "v",
                                        "name": "nisi"
                                    }
                                },
                                "agent": {
                                    "amount": 691,
                                    "currency": {
                                        "code": "AED",
                                        "symbol": "v",
                                        "name": "nisi"
                                    }
                                },
                                "sold": {
                                    "amount": 691,
                                    "currency": {
                                        "code": "AED",
                                        "symbol": "v",
                                        "name": "nisi"
                                    }
                                }
                            }
                        }
                    ]
                }
            ],
            "booked_details": {
                "rate": {
                    "pass_expiration_date": "2022-10-01",
                    "pass_expiration_minutes_after_booking": 1000
                },
                "rates": [],
                "product": {
                    "id": 1,
                    "tags": [
                        {
                            "key": "some tag key",
                            "value": "some tag value"
                        }
                    ],
                    "title": "voluptatem fugit",
                    "banner": {
                        "id": 1,
                        "url": "\/storage\/\/tmp\/fakerA08FoR",
                        "filename": "sed"
                    },
                    "images": [
                        {
                            "id": 3,
                            "filename": "sit",
                            "url": "http:\/\/localhost\/storage\/tmp\/fakert9rJHJ"
                        }
                    ],
                    "labels": [
                        "Ski",
                        "Adventure"
                    ],
                    "videos": [
                        {
                            "video_code": "et",
                            "type": "youtube",
                            "url": "https:\/\/www.youtube.com\/watch?v=et"
                        }
                    ],
                    "supplier": {
                        "id": 1,
                        "name": "supplier",
                        "tags": [
                            {
                                "key": "some tag key",
                                "value": "some tag value"
                            }
                        ],
                        "description": "fuga nesciunt",
                        "permissions": [
                            {
                                "name": "create-and-edit-product",
                                "description": "create and edit product"
                            },
                            {
                                "name": "view-product",
                                "description": "view product"
                            }
                        ]
                    },
                    "thumbnail": {
                        "id": 2,
                        "url": "\/storage\/\/tmp\/faker9kFrZP",
                        "filename": "rerum"
                    },
                    "categories": [
                        {
                            "id": 1,
                            "title": "mollitia",
                            "tags": [
                                {
                                    "key": "ds-category-id",
                                    "value": "3"
                                }
                            ]
                        }
                    ],
                    "highlights": [
                        "Molestiae necessitatibus consequuntur in voluptas laboriosam.",
                        "Corporis quibusdam occaecati sequi est recusandae.",
                        "Itaque molestiae hic labore."
                    ],
                    "description": "Eum id est odit expedita inventore aliquid et. Vitae ad necessitatibus possimus corrupti. Blanditiis rem aspernatur ullam voluptatem autem aliquid dignissimos aperiam.",
                    "distributor": {
                        "name": "Rayna"
                    },
                    "what_to_bring": "Deserunt officiis animi voluptatem. Dicta quasi fugiat a.",
                    "know_before_you_go": "In quia dolorem quisquam expedita dolore. Ut fuga nihil ducimus quia maxime hic. Molestias praesentium asperiores itaque libero aliquid neque iste. Ut dolores quis molestias maiores quia debitis rerum corporis."
                },
                "service_level": {
                    "title": "corrupti",
                    "capacity": 4,
                    "duration": {
                        "time": 0,
                        "description": null
                    },
                    "has_pickup": false,
                    "description": "Laboriosam minima qui ea nihil odio ut est quisquam. Qui omnis ea neque dolorem non deleniti ut. Nulla et dicta illum quod omnis molestias. A rem provident laboriosam autem eum.",
                    "cut_off_time": 0,
                    "has_drop_off": true,
                    "pricing_type": "per_person",
                    "business_hours": "21:16 mcvsloyue apkwi",
                    "has_tour_guide": false,
                    "offer_time_end": "2022-05-30",
                    "offer_time_start": "2022-05-16",
                    "availability_type": "pass"
                },
                "starting_point": {
                    "city": {
                        "id": 1,
                        "name": "North Cristal",
                        "tags": [
                            {
                                "key": "ds-city-id",
                                "value": "3"
                            }
                        ]
                    },
                    "address": "288 Bruen Trafficway\nWest Kareemstad, DC 22330",
                    "country": {
                        "id": 1,
                        "name": "Haiti",
                        "code": "SO"
                    },
                    "latitude": "-69.52422600",
                    "longitude": "-48.86871300"
                }
            },
            "city": {
                "id": 1,
                "name": "North Cristal",
                "country": {
                    "id": 1,
                    "name": "Haiti",
                    "code": "SO"
                },
                "tags": [
                    {
                        "key": "ds-city-id",
                        "value": "3"
                    }
                ]
            },
            "supplier": {
                "id": 1,
                "name": "supplier",
                "tags": [
                    {
                        "key": "some tag key",
                        "value": "some tag value"
                    }
                ],
                "description": "fuga nesciunt",
                "permissions": [
                    {
                        "name": "create-and-edit-product",
                        "description": "create and edit product"
                    },
                    {
                        "name": "view-product",
                        "description": "view product"
                    }
                ]
            },
            "passengers": [
                {
                    "id": 1,
                    "first_name": "Kaleigh",
                    "last_name": "Roob",
                    "gender": "male",
                    "phone_number": "+1 (984) 759-7630",
                    "whatsapp_number": "1-551-489-1815",
                    "email": "carlie06@windler.com",
                    "is_leader": false,
                    "price_category": {
                        "id": 2,
                        "title": "et assumenda",
                        "is_default": false,
                        "minimum": 0,
                        "maximum": 5,
                        "age_range": {
                            "min": 14,
                            "max": 101
                        }
                    }
                }
            ],
            "status": "Cancelled",
            "starts_at": "2022-01-22T14:38:23.000000Z"
        },
        {
            "id": 2,
            "tags": [
                {
                    "key": "some tag key",
                    "value": "some tag value"
                }
            ],
            "bookings": [
                {
                    "id": 2,
                    "status": "Booked",
                    "prices": {
                        "original": {
                            "amount": 505,
                            "currency": {
                                "code": "AED",
                                "symbol": "k",
                                "name": "fuga"
                            }
                        },
                        "agent": {
                            "amount": 655,
                            "currency": {
                                "code": "AED",
                                "symbol": "k",
                                "name": "fuga"
                            }
                        },
                        "sold": {
                            "amount": 681,
                            "currency": {
                                "code": "AED",
                                "symbol": "k",
                                "name": "fuga"
                            }
                        }
                    },
                    "availability": {
                        "id": 2,
                        "start_time": null,
                        "date": "1978-07-15"
                    },
                    "passengers": []
                }
            ],
            "booked_details": [],
            "city": {
                "id": 1,
                "name": "North Cristal",
                "country": {
                    "id": 1,
                    "name": "Haiti",
                    "code": "SO"
                },
                "tags": []
            },
            "supplier": null,
            "passengers": [],
            "status": "Booked",
            "starts_at": "2022-01-22T14:38:23.000000Z"
        }
    ]
}

Request      

PUT v1/orders

Body Parameters

pickup  object optional  

pickup.date  string optional  
The value must be a valid date.

pickup.time  string optional  
The value must be a valid date in the format H:i.

pickup.driver_id  string optional  

pickup.location  object optional  

pickup.location.point  string[] optional  

dropoff  object optional  

dropoff.date  string optional  
The value must be a valid date.

dropoff.time  string optional  
The value must be a valid date in the format H:i.

dropoff.driver_id  string optional  

dropoff.location  object optional  

dropoff.location.point  string[] optional  

status  string optional  

contact_person  object optional  

contact_person.tags  string[] optional  

contact_person.id  integer optional  

tour_guide  object optional  

tour_guide.tags  string[] optional  

tour_guide.id  integer optional  

reference_code  string optional  

leader  object optional  

leader.first_name  string optional  

leader.last_name  string optional  

leader.gender  string optional  

leader.phone_number  string optional  

leader.phone_country_code  string optional  

leader.whatsapp_number  string optional  

leader.email  string optional  
The value must be a valid email address.

orders  object optional  

orders.tags  string[] optional  

orders.ids  integer[] optional  

Point of sale (POS)

All query filters can have multiple values using | seperator.

Search POS products.

requires authentication

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/pos/roles/consequatur/products?page=17&per_page=17" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"page":17,"per_page":17,"filter":{"title":"consequatur","back_office":false,"labels":"consequatur","city":{"ids":"consequatur","tags":[{},null]},"categories":{"ids":"consequatur"},"product_ids":"consequatur","start_date":"2023-03-26","end_date":"2023-03-26","number_of_books":17,"tags":[{},null]}}'
const url = new URL(
    "https://api.connect.turpal.com/v1/pos/roles/consequatur/products"
);

let params = {
    "page": "17",
    "per_page": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "page": 17,
    "per_page": 17,
    "filter": {
        "title": "consequatur",
        "back_office": false,
        "labels": "consequatur",
        "city": {
            "ids": "consequatur",
            "tags": [
                {},
                null
            ]
        },
        "categories": {
            "ids": "consequatur"
        },
        "product_ids": "consequatur",
        "start_date": "2023-03-26",
        "end_date": "2023-03-26",
        "number_of_books": 17,
        "tags": [
            {},
            null
        ]
    }
}

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "data": [
        {
            "id": 2,
            "title": "provident nisi",
            "short_description": "Provident incidunt animi eum minus quis possimus sint.",
            "back_office": true,
            "organization": {
                "id": 5,
                "name": "Denesik, Runte and Ziemann",
                "currency": {
                    "code": "AED",
                    "symbol": "p",
                    "name": "autem"
                },
                "languages": [
                    {
                        "code": "ar",
                        "name": "Arabic",
                        "is_default": false
                    },
                    {
                        "code": "en",
                        "name": "English",
                        "is_default": true
                    },
                    {
                        "code": "fa",
                        "name": "Persian",
                        "is_default": false
                    }
                ]
            },
            "location": {
                "id": 2,
                "latitude": "-68.112651",
                "longitude": "37.74133",
                "address": "811 Hane Rapids\nNorth Hughstad, MI 79394",
                "city": {
                    "id": 2,
                    "name": "Port Ignatius",
                    "country": {
                        "id": 2,
                        "name": "Poland",
                        "code": "MC"
                    },
                    "tags": [
                        {
                            "key": "ds-city-id",
                            "value": "3"
                        }
                    ]
                }
            },
            "categories": [
                {
                    "id": 1,
                    "title": "mollitia",
                    "tags": [
                        {
                            "key": "ds-category-id",
                            "value": "3"
                        }
                    ]
                }
            ],
            "labels": [
                "Ski",
                "Dubai"
            ],
            "images": [
                {
                    "id": 3,
                    "filename": "sit",
                    "url": "http:\/\/localhost\/storage\/tmp\/fakert9rJHJ"
                }
            ],
            "banner": {
                "id": 3,
                "filename": "assumenda",
                "url": "\/storage\/\/tmp\/fakerhy6xu6"
            },
            "thumbnail": {
                "id": 4,
                "filename": "dolores",
                "url": "\/storage\/\/tmp\/fakerGolK33"
            },
            "price": {
                "starting_from": {
                    "amount": 60,
                    "currency": {
                        "code": "USD",
                        "symbol": "US$",
                        "name": "United States dollar"
                    }
                }
            },
            "tags": [
                {
                    "key": "product tag key",
                    "value": "tag value"
                }
            ],
            "additional_services": []
        },
        {
            "id": 3,
            "title": "numquam aliquam",
            "short_description": "Consequatur aut commodi veritatis iure.",
            "back_office": false,
            "organization": {
                "id": 8,
                "name": "Hoeger, Cronin and Sauer",
                "currency": {
                    "code": "AED",
                    "symbol": "p",
                    "name": "autem"
                },
                "languages": [
                    {
                        "code": "ar",
                        "name": "Arabic",
                        "is_default": false
                    },
                    {
                        "code": "en",
                        "name": "English",
                        "is_default": true
                    },
                    {
                        "code": "fa",
                        "name": "Persian",
                        "is_default": false
                    }
                ]
            },
            "location": {
                "id": 3,
                "latitude": "38.832929",
                "longitude": "102.246215",
                "address": "98223 Kamryn Mountains Suite 413\nEast Mikel, NE 25658-9956",
                "city": {
                    "id": 3,
                    "name": "Carterchester",
                    "country": {
                        "id": 3,
                        "name": "Turks and Caicos Islands",
                        "code": "KM"
                    },
                    "tags": []
                }
            },
            "categories": [],
            "labels": [],
            "images": [],
            "banner": {
                "id": 5,
                "filename": "reprehenderit",
                "url": "\/storage\/\/tmp\/fakerYG7Xy7"
            },
            "thumbnail": {
                "id": 6,
                "filename": "recusandae",
                "url": "\/storage\/\/tmp\/fakerVizcb7"
            },
            "price": {
                "starting_from": {
                    "amount": 60,
                    "currency": {
                        "code": "USD",
                        "symbol": "US$",
                        "name": "United States dollar"
                    }
                }
            },
            "tags": [
                {
                    "key": "tag key",
                    "value": "tag value"
                }
            ],
            "additional_services": []
        }
    ],
    "meta": {
        "total": 15,
        "per_page": 20,
        "last_page": 3,
        "current_page": 2,
        "from": 6,
        "to": 10
    }
}

Request      

GET v1/pos/roles/{role}/products

URL Parameters

role  string  

Query Parameters

page  integer optional  
The page of the pagination.

per_page  integer optional  
Number of items in a page. max: 50

Body Parameters

page  integer optional  

per_page  integer optional  

filter  object optional  

filter.title  string optional  

filter.back_office  boolean optional  

filter.labels  string optional  

filter.city  object optional  

filter.city.ids  string optional  

filter.city.tags  string[] optional  

filter.categories  object optional  

filter.categories.ids  string optional  

filter.product_ids  string optional  

filter.start_date  string optional  
The value must be a valid date in the format Y-m-d.

filter.end_date  string optional  
The value must be a valid date in the format Y-m-d.

filter.number_of_books  integer optional  

filter.tags  string[] optional  

Get a product details.

requires authentication

Get a single product and its categories, tags, location, images, videos, ... using its id

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/pos/roles/consequatur/products/17" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.connect.turpal.com/v1/pos/roles/consequatur/products/17"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "data": {
        "id": 1,
        "title": "pariatur totam",
        "supplier": {
            "id": 17,
            "name": "Layla Russel",
            "description": "porro sint",
            "tags": [
                {
                    "key": "supplier tag",
                    "value": "tag value"
                }
            ]
        },
        "currencies": {
            "supported": [
                {
                    "code": "AED",
                    "symbol": "p",
                    "name": "autem"
                }
            ]
        },
        "description": "Ut sit quibusdam amet provident earum dolor repellat. Enim dicta velit earum laborum reprehenderit. Illum ipsam voluptas magni ut. Ut animi ullam vel recusandae necessitatibus. Qui labore et dolores error id voluptatem qui.",
        "highlights": [
            "Ut sit quibusdam amet provident earum dolor repellat.",
            "Ut sit quibusdam amet provident earum dolor repellat."
        ],
        "short_description": "Sit aperiam quidem tempora enim illo necessitatibus.",
        "know_before_you_go": "Sint dolorem dolore quaerat voluptas voluptatem iure nihil tempore.",
        "what_to_bring": "Minus animi et voluptate reprehenderit adipisci.",
        "is_published": true,
        "back_office": true,
        "organization": {
            "id": 1,
            "name": "Robb Runte's Organization",
            "currency": {
                "code": "AED",
                "symbol": "p",
                "name": "autem"
            },
            "languages": [
                {
                    "code": "ar",
                    "name": "Arabic",
                    "is_default": false
                },
                {
                    "code": "en",
                    "name": "English",
                    "is_default": true
                },
                {
                    "code": "fa",
                    "name": "Persian",
                    "is_default": false
                }
            ]
        },
        "location": {
            "id": 1,
            "latitude": "1.14773100",
            "longitude": "64.35058400",
            "address": "6917 Osinski Springs\nPort Suzanneberg, IL 04852",
            "city": {
                "id": 1,
                "name": "Hartmannfurt",
                "country": {
                    "id": 1,
                    "name": "Papua New Guinea",
                    "code": "GI"
                },
                "tags": [
                    {
                        "key": "ds-city-id",
                        "value": "2"
                    }
                ]
            }
        },
        "points": [
            {
                "id": 1,
                "latitude": "1.14773100",
                "longitude": "64.35058400",
                "address": "6917 Osinski Springs\nPort Suzanneberg, IL 04852",
                "city": {
                    "id": 1,
                    "name": "Hartmannfurt",
                    "country": {
                        "id": 1,
                        "name": "Papua New Guinea",
                        "code": "GI"
                    },
                    "tags": [
                        {
                            "key": "ds-city-id",
                            "value": "3"
                        }
                    ]
                }
            }
        ],
        "categories": [
            {
                "id": 1,
                "title": "accusantium",
                "tags": [
                    {
                        "key": "ds-category-id",
                        "value": "1"
                    }
                ]
            },
            {
                "id": 2,
                "title": "cupiditate",
                "tags": [
                    {
                        "key": "ds-category-id",
                        "value": "2"
                    }
                ]
            }
        ],
        "labels": [
            "error",
            "in",
            "quis",
            "suscipit",
            "sit"
        ],
        "ticket": {
            "title": "dolorum amet iste",
            "message": "Est dolor dolores minus voluptatem. Quibusdam sed vel a quo sed fugit facilis. Dolores molestias ipsam sit.",
            "per_participant": false
        },
        "images": [
            {
                "id": 1,
                "filename": "first.jpg",
                "url": "https:\/\/via.placeholder.com\/800x500.png"
            },
            {
                "id": 2,
                "filename": "second.jpg",
                "url": "https:\/\/via.placeholder.com\/800x400.png"
            }
        ],
        "videos": [
            {
                "video_code": "vSAa_ls9grQ",
                "type": "youtube",
                "url": "https:\/\/www.youtube.com\/watch?v=vSAa_ls9grQ"
            }
        ],
        "banner": {
            "id": 1,
            "filename": "banner.jpg",
            "url": "https:\/\/via.placeholder.com\/400x400.png"
        },
        "thumbnail": {
            "id": 1,
            "filename": "banner.jpg",
            "url": "https:\/\/via.placeholder.com\/1200x400.png"
        },
        "service_levels": [
            {
                "id": 1,
                "title": "illo",
                "description": "Ipsum temporibus repellat sunt harum rerum rerum aspernatur. Sed delectus eaque aperiam saepe vel ex suscipit. Facilis hic voluptates recusandae perferendis.",
                "business_hours": "sunt harum rerum rerum aspernatur.",
                "capacity": 2,
                "pricing_type": "per_person",
                "has_pickup": true,
                "has_drop_off": false,
                "has_tour_guide": true,
                "duration": {
                    "time": 0,
                    "description": null
                },
                "availability_type": "pass",
                "cut_off_time": 0,
                "offer_time_start": "2021-09-01",
                "offer_time_end": "2021-09-15",
                "is_complete": false,
                "price_categories": [
                    {
                        "id": 1,
                        "title": "perferendis totam",
                        "is_default": true,
                        "minimum": 0,
                        "maximum": 5,
                        "age_range": {
                            "min": 5,
                            "max": 148
                        }
                    }
                ]
            },
            {
                "id": 2,
                "title": "sit",
                "description": "Rerum ipsum voluptatum minima est. Perferendis eos ut reprehenderit excepturi dignissimos error. Incidunt dolore autem molestias quo.",
                "business_hours": null,
                "capacity": 4,
                "pricing_type": "per_item",
                "has_pickup": 1,
                "has_drop_off": 1,
                "has_tour_guide": 1,
                "duration": {
                    "time": 0,
                    "description": null
                },
                "availability_type": "per_time",
                "cut_off_time": 0,
                "offer_time_start": "2021-09-06",
                "offer_time_end": "2021-09-20",
                "is_complete": true,
                "price_categories": []
            }
        ],
        "additional_services": [],
        "tags": [
            {
                "key": "tag key",
                "value": "tag value"
            }
        ],
        "editable": true
    }
}

Request      

GET v1/pos/roles/{role}/products/{product}

URL Parameters

role  string  

product  integer  
The ID of product.

Get a product rates.

requires authentication

Get a single product rates indexed by date. Availabilities are included in the rate.

Default date range is 3 months.

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/pos/roles/consequatur/products/consequatur/rates/dates" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"filter":{"number_of_books":17,"rates":["consequatur"],"service_level":{"ids":"1|2"},"start_date":"2023-03-26","end_date":"2023-03-26"}}'
const url = new URL(
    "https://api.connect.turpal.com/v1/pos/roles/consequatur/products/consequatur/rates/dates"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filter": {
        "number_of_books": 17,
        "rates": [
            "consequatur"
        ],
        "service_level": {
            "ids": "1|2"
        },
        "start_date": "2023-03-26",
        "end_date": "2023-03-26"
    }
}

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "data": [
        {
            "date": "2020-01-01",
            "rates": [
                {
                    "id": 3,
                    "title": "facilis praesentium laudantium",
                    "service_level": {
                        "id": 4,
                        "title": "perferendis",
                        "capacity": "1",
                        "duration": {
                            "time": 0,
                            "description": null
                        },
                        "business_hours": "21:16 mcvsloyue apkwi",
                        "has_pickup": false,
                        "pricing_type": "per_item",
                        "has_drop_off": true,
                        "has_tour_guide": true,
                        "availability_type": "pass"
                    },
                    "per_item_prices": [
                        {
                            "amount": 330,
                            "currency": {
                                "code": "USD",
                                "symbol": "l",
                                "name": "corporis"
                            }
                        }
                    ],
                    "per_person_prices": [],
                    "cancellation_policies": {
                        "penalties": [
                            {
                                "id": 4,
                                "time": 918,
                                "percentage": 20
                            }
                        ],
                        "description": null
                    },
                    "availabilities": [
                        {
                            "id": 1,
                            "start_time": null,
                            "end_time": null,
                            "remaining": 10,
                            "availability_type": "pass",
                            "expiration_date": "2020-01-03",
                            "expiration_minutes_after_booking": 1000
                        }
                    ]
                }
            ]
        },
        {
            "date": "2020-01-02",
            "rates": [
                {
                    "id": 1,
                    "title": "nisi at libero",
                    "service_level": {
                        "id": 1,
                        "title": "delectus",
                        "capacity": "1",
                        "duration": {
                            "time": 0,
                            "description": null
                        },
                        "business_hours": null,
                        "has_pickup": false,
                        "pricing_type": "per_person",
                        "has_drop_off": true,
                        "has_tour_guide": false,
                        "availability_type": "daily"
                    },
                    "per_item_prices": [],
                    "per_person_prices": [
                        {
                            "price_category": {
                                "id": 2,
                                "title": "minima omnis",
                                "is_default": false,
                                "minimum": 0,
                                "maximum": 3,
                                "age_range": {
                                    "min": 10,
                                    "max": 101
                                }
                            },
                            "prices": [
                                {
                                    "amount": 125,
                                    "currency": {
                                        "code": "USD",
                                        "symbol": "l",
                                        "name": "corporis"
                                    }
                                }
                            ]
                        }
                    ],
                    "cancellation_policies": {
                        "penalties": [],
                        "description": "delectus omnis nulla"
                    },
                    "availabilities": [
                        {
                            "id": 1,
                            "start_time": null,
                            "end_time": null,
                            "remaining": 2,
                            "availability_type": "daily",
                            "expiration_date": null,
                            "expiration_minutes_after_booking": null
                        }
                    ]
                },
                {
                    "id": 2,
                    "title": "similique voluptatem ducimus",
                    "service_level": {
                        "id": 3,
                        "title": "fuga",
                        "capacity": "3",
                        "duration": {
                            "time": 0,
                            "description": null
                        },
                        "business_hours": null,
                        "has_pickup": false,
                        "pricing_type": "per_item",
                        "has_drop_off": false,
                        "has_tour_guide": true,
                        "availability_type": "per_slot"
                    },
                    "per_item_prices": [
                        {
                            "amount": 290,
                            "currency": {
                                "code": "USD",
                                "symbol": "l",
                                "name": "corporis"
                            }
                        }
                    ],
                    "per_person_prices": [],
                    "cancellation_policies": {
                        "penalties": [
                            {
                                "id": 3,
                                "time": 333,
                                "percentage": 21
                            },
                            {
                                "id": 2,
                                "time": 328,
                                "percentage": 23
                            }
                        ],
                        "description": null
                    },
                    "availabilities": [
                        {
                            "id": 1,
                            "start_time": "22:09:45",
                            "end_time": "22:09:45",
                            "remaining": 10,
                            "availability_type": "per_slot",
                            "expiration_date": null,
                            "expiration_minutes_after_booking": null
                        }
                    ]
                },
                {
                    "id": 3,
                    "title": "facilis praesentium laudantium",
                    "service_level": {
                        "id": 4,
                        "title": "perferendis",
                        "capacity": "1",
                        "duration": {
                            "time": 0,
                            "description": null
                        },
                        "business_hours": "Odio enim laborum occaecati quas qui earum.",
                        "has_pickup": false,
                        "pricing_type": "per_item",
                        "has_drop_off": true,
                        "has_tour_guide": true,
                        "availability_type": "pass"
                    },
                    "per_item_prices": [
                        {
                            "amount": 330,
                            "currency": {
                                "code": "USD",
                                "symbol": "l",
                                "name": "corporis"
                            }
                        }
                    ],
                    "per_person_prices": [],
                    "cancellation_policies": {
                        "penalties": [],
                        "description": "delectus omnis nulla"
                    },
                    "availabilities": [
                        {
                            "id": 1,
                            "start_time": null,
                            "end_time": null,
                            "remaining": 10,
                            "availability_type": "pass",
                            "expiration_date": "2020-01-03",
                            "expiration_minutes_after_booking": 50
                        }
                    ]
                }
            ]
        },
        {
            "date": "2020-01-03",
            "rates": [
                {
                    "id": 2,
                    "title": "similique voluptatem ducimus",
                    "service_level": {
                        "id": 3,
                        "title": "fuga",
                        "capacity": "3",
                        "duration": {
                            "time": 0,
                            "description": null
                        },
                        "business_hours": null,
                        "has_pickup": false,
                        "pricing_type": "per_item",
                        "has_drop_off": false,
                        "has_tour_guide": true,
                        "availability_type": "per_time"
                    },
                    "per_item_prices": [
                        {
                            "amount": 200,
                            "currency": {
                                "code": "USD",
                                "symbol": "l",
                                "name": "corporis"
                            }
                        }
                    ],
                    "per_person_prices": [],
                    "cancellation_policies": {
                        "penalties": [
                            {
                                "id": 3,
                                "time": 333,
                                "percentage": 21
                            },
                            {
                                "id": 2,
                                "time": 328,
                                "percentage": 23
                            }
                        ],
                        "description": null
                    },
                    "availabilities": [
                        {
                            "id": 2,
                            "start_time": "12:12:43",
                            "end_time": "12:12:43",
                            "remaining": 5,
                            "availability_type": "per_time",
                            "expiration_date": null,
                            "expiration_minutes_after_booking": null
                        }
                    ]
                },
                {
                    "id": 3,
                    "title": "facilis praesentium laudantium",
                    "service_level": {
                        "id": 4,
                        "title": "perferendis",
                        "capacity": "1",
                        "duration": {
                            "time": 0,
                            "description": null
                        },
                        "business_hours": "Omnis aut optio est quo expedita.",
                        "has_pickup": false,
                        "pricing_type": "per_item",
                        "has_drop_off": true,
                        "has_tour_guide": true,
                        "availability_type": "pass"
                    },
                    "per_item_prices": [
                        {
                            "amount": 330,
                            "currency": {
                                "code": "USD",
                                "symbol": "l",
                                "name": "corporis"
                            }
                        }
                    ],
                    "per_person_prices": [],
                    "cancellation_policies": {
                        "penalties": [],
                        "description": "delectus omnis nulla"
                    },
                    "availabilities": [
                        {
                            "id": 1,
                            "start_time": null,
                            "end_time": null,
                            "remaining": 10,
                            "availability_type": "pass",
                            "expiration_date": "2020-01-03",
                            "expiration_minutes_after_booking": 40
                        }
                    ]
                }
            ]
        }
    ]
}

Request      

GET v1/pos/roles/{role}/products/{product}/rates/dates

URL Parameters

role  string  

product  string  

Body Parameters

filter  object optional  

filter.number_of_books  integer optional  

filter.rates  string[] optional  

filter.service_level  object optional  

filter.service_level.ids  string optional  
ids of service levels seperated by | .

filter.start_date  string optional  
The value must be a valid date in the format Y-m-d.

filter.end_date  string optional  
The value must be a valid date in the format Y-m-d.

Get product availabilities by dates.

requires authentication

Get array of dates which product is available.

Default date range is 3 months.

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/pos/roles/consequatur/products/consequatur/rates/dates-availability" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"filter":{"start_date":"2023-03-26","end_date":"2023-03-26","service_level_id":17}}'
const url = new URL(
    "https://api.connect.turpal.com/v1/pos/roles/consequatur/products/consequatur/rates/dates-availability"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filter": {
        "start_date": "2023-03-26",
        "end_date": "2023-03-26",
        "service_level_id": 17
    }
}

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

[
    "2020-01-01",
    "2020-01-02",
    "2020-01-03"
]

Request      

GET v1/pos/roles/{role}/products/{product}/rates/dates-availability

URL Parameters

role  string  

product  string  

Body Parameters

filter  object optional  

filter.start_date  string optional  
The value must be a valid date in the format Y-m-d.

filter.end_date  string optional  
The value must be a valid date in the format Y-m-d.

filter.service_level_id  integer optional  

Get pickup list of service level.

requires authentication

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/pos/roles/consequatur/service_levels/17/pickups" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.connect.turpal.com/v1/pos/roles/consequatur/service_levels/17/pickups"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "data": {
        "type": "pre-defined",
        "time_window": 20,
        "time_before": 40,
        "places": [
            {
                "id": 1,
                "address": "Dublane Place",
                "time_before": 90,
                "time_range": {
                    "start": "08:30",
                    "end": "08:50"
                }
            },
            {
                "id": 2,
                "address": "Airport Road",
                "time_before": 60,
                "time_range": {
                    "start": "10:00",
                    "end": "10:20"
                }
            },
            {
                "id": 3,
                "address": "Al Ain - Dubai Road",
                "time_before": 30,
                "time_range": {
                    "start": "10:30",
                    "end": "10:50"
                }
            }
        ],
        "time_selection": {
            "time_range": {
                "start": "00:00",
                "end": "23:59"
            },
            "time_list": [
                {
                    "id" : 1,
                    "time": "08:30"
                },
                {
                    "id" : 2,
                    "time": "09:30"
                }
            ]
        }
    }
}

Request      

GET v1/pos/roles/{role}/service_levels/{service_level}/pickups

URL Parameters

role  string  

service_level  integer  
The ID of service level.

Create a new order.

requires authentication

Book a product.

Example request:

curl -X POST \
    "https://api.connect.turpal.com/v1/pos/roles/consequatur/service_levels/consequatur/orders" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"leader":{"first_name":"consequatur","last_name":"consequatur","gender":"male","phone_number":"consequatur","phone_country_code":"consequatur","whatsapp_number":"consequatur","email":"qkunze@example.com","price_category_id":{}},"passengers":[{"first_name":"consequatur","last_name":"consequatur","gender":"male","phone_number":"consequatur","phone_country_code":"consequatur","whatsapp_number":"consequatur","email":"qkunze@example.com","price_category_id":{}}],"details":{"selected_date":"consequatur","quantity":{},"availability_id":{},"checkin_date":{},"checkout_date":{},"start_date":"2023-03-26","start_time":{},"number_of_bookings":{}},"additional_information":{"contact_person":{"tags":[{},null],"id":17},"tour_guide":{"tags":[{},null],"id":17},"pickup":{"date":"2023-03-26T22:12:13+0000","time":"22:12","driver_id":{},"location":{"point":{"latitude":{},"longitude":{},"address":"consequatur","id":17}}},"dropoff":{"date":"2023-03-26T22:12:13+0000","time":"22:12","driver_id":{},"location":{"point":{"latitude":{},"longitude":{},"address":"consequatur"}}}},"tags":[{},null],"pending_booking":false}'
const url = new URL(
    "https://api.connect.turpal.com/v1/pos/roles/consequatur/service_levels/consequatur/orders"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "leader": {
        "first_name": "consequatur",
        "last_name": "consequatur",
        "gender": "male",
        "phone_number": "consequatur",
        "phone_country_code": "consequatur",
        "whatsapp_number": "consequatur",
        "email": "qkunze@example.com",
        "price_category_id": {}
    },
    "passengers": [
        {
            "first_name": "consequatur",
            "last_name": "consequatur",
            "gender": "male",
            "phone_number": "consequatur",
            "phone_country_code": "consequatur",
            "whatsapp_number": "consequatur",
            "email": "qkunze@example.com",
            "price_category_id": {}
        }
    ],
    "details": {
        "selected_date": "consequatur",
        "quantity": {},
        "availability_id": {},
        "checkin_date": {},
        "checkout_date": {},
        "start_date": "2023-03-26",
        "start_time": {},
        "number_of_bookings": {}
    },
    "additional_information": {
        "contact_person": {
            "tags": [
                {},
                null
            ],
            "id": 17
        },
        "tour_guide": {
            "tags": [
                {},
                null
            ],
            "id": 17
        },
        "pickup": {
            "date": "2023-03-26T22:12:13+0000",
            "time": "22:12",
            "driver_id": {},
            "location": {
                "point": {
                    "latitude": {},
                    "longitude": {},
                    "address": "consequatur",
                    "id": 17
                }
            }
        },
        "dropoff": {
            "date": "2023-03-26T22:12:13+0000",
            "time": "22:12",
            "driver_id": {},
            "location": {
                "point": {
                    "latitude": {},
                    "longitude": {},
                    "address": "consequatur"
                }
            }
        }
    },
    "tags": [
        {},
        null
    ],
    "pending_booking": false
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "data": {
        "id": 1,
        "starts_at": "2021-03-01 20:23:55",
        "ends_at": "2021-03-01 20:23:55",
        "reference_code": null,
        "booked_at": "2020-01-01 00:00:00",
        "tour_guide": {
            "id": 4,
            "name": "Darius Kulas DDS",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Darius+Kulas+DDS&color=7F9CF5&background=EBF4FF",
            "tags": [
                {
                    "key": "some tag key",
                    "value": "some tag value"
                }
            ]
        },
        "issuer": {
            "id": 1,
            "name": "Thurman Mertz",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Thurman+Mertz&color=7F9CF5&background=EBF4FF",
            "tags": [
                {
                    "key": "some tag key",
                    "value": "some tag value"
                }
            ]
        },
        "contact_person": {
            "id": 2,
            "name": "Lavon Nicolas",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Lavon+Nicolas&color=7F9CF5&background=EBF4FF",
            "tags": [
                {
                    "key": "some tag key",
                    "value": "some tag value"
                }
            ]
        },
        "status": "InCart",
        "bookings": [
            {
                "id": 1,
                "status": "InCart",
                "prices": {
                    "original": null,
                    "agent": null,
                    "sold": null
                },
                "availability": {
                    "id": 1,
                    "start_time": "20:23:55",
                    "date": "2021-03-01"
                },
                "passengers": [
                    {
                        "passenger_id": 1,
                        "status": "InCart",
                        "prices": {
                            "original": {
                                "amount": 691,
                                "currency": {
                                    "code": "AED",
                                    "symbol": "v",
                                    "name": "nisi"
                                }
                            },
                            "agent": {
                                "amount": 691,
                                "currency": {
                                    "code": "AED",
                                    "symbol": "v",
                                    "name": "nisi"
                                }
                            },
                            "sold": {
                                "amount": 691,
                                "currency": {
                                    "code": "AED",
                                    "symbol": "v",
                                    "name": "nisi"
                                }
                            }
                        }
                    },
                    {
                        "passenger_id": 2,
                        "status": "InCart",
                        "prices": {
                            "original": {
                                "amount": 603,
                                "currency": {
                                    "code": "AED",
                                    "symbol": "v",
                                    "name": "nisi"
                                }
                            },
                            "agent": {
                                "amount": 603,
                                "currency": {
                                    "code": "AED",
                                    "symbol": "v",
                                    "name": "nisi"
                                }
                            },
                            "sold": {
                                "amount": 603,
                                "currency": {
                                    "code": "AED",
                                    "symbol": "v",
                                    "name": "nisi"
                                }
                            }
                        }
                    }
                ]
            }
        ],
        "client": {
            "id": 2,
            "name": "Tyshawn Nader DVM",
            "description": "similique quaerat",
            "tags": [
                {
                    "key": "some tag key",
                    "value": "some tag value"
                }
            ]
        },
        "vat": {
            "percentage": "5.0",
            "type": "included"
        },
        "passengers": [
            {
                "id": 1,
                "first_name": "Kaleigh",
                "last_name": "Roob",
                "gender": "male",
                "phone_number": "+1 (984) 759-7630",
                "whatsapp_number": "1-551-489-1815",
                "email": "carlie06@windler.com",
                "is_leader": false,
                "price_category": {
                    "id": 2,
                    "title": "et assumenda",
                    "is_default": false,
                    "minimum": 0,
                    "maximum": 5,
                    "age_range": {
                        "min": 14,
                        "max": 101
                    }
                }
            },
            {
                "id": 2,
                "first_name": "Britney",
                "last_name": "Hill",
                "gender": "male",
                "phone_number": "864.635.6728",
                "whatsapp_number": "+1.949.652.2136",
                "email": "anabelle.rau@walter.com",
                "is_leader": false,
                "price_category": {
                    "id": 3,
                    "title": "et aspernatur",
                    "is_default": false,
                    "minimum": 0,
                    "maximum": 1,
                    "age_range": {
                        "min": 6,
                        "max": 164
                    }
                }
            }
        ],
        "pickup": {
            "id": 1,
            "date": "2022-01-01",
            "time": "12:00:00",
            "driver": {
                "id": 13,
                "name": "Nia Smith",
                "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Nia+Smith&color=7F9CF5&background=EBF4FF",
                "tags": [
                    {
                        "key": "ds_driver_id",
                        "value": "1"
                    }
                ]
            },
            "location": {
                "point": {
                    "id": 2,
                    "latitude": "8.41593300",
                    "longitude": "-59.74564700",
                    "address": "168 Kutch Fort Suite 081\nSelmerborough, SD 24152-3101",
                    "city": {
                        "id": 1,
                        "name": "East Aaron",
                        "country": {
                            "id": 1,
                            "name": "Uganda",
                            "code": "VU"
                        },
                        "tags": [
                            {
                                "key": "ds_city_id",
                                "value": "1"
                            }
                        ]
                    }
                }
            }
        },
        "dropoff": {
            "id": 2,
            "date": "2022-01-01",
            "time": "12:00:00",
            "driver": {
                "id": 15,
                "name": "Alberta Osinski",
                "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Alberta+Osinski&color=7F9CF5&background=EBF4FF",
                "tags": [
                    {
                        "key": "ds_driver_id",
                        "value": "1"
                    }
                ]
            },
            "location": {
                "point": {
                    "id": 3,
                    "latitude": "44.76111300",
                    "longitude": "144.67273800",
                    "address": "5851 Georgianna Walk\nGagechester, SD 88867",
                    "city": {
                        "id": 3,
                        "name": "West Gerardhaven",
                        "country": {
                            "id": 3,
                            "name": "Peru",
                            "code": "SN"
                        },
                        "tags": []
                    }
                }
            }
        },
        "tickets": [
            {
                "id": 4,
                "filename": "consequatur",
                "url": "https:\/\/rkfgejgwd.com\/rfeg\/rer"
            }
        ],
        "tags": [
            {
                "key": "ds_invoice_id",
                "value": "1"
            }
        ],
        "booked_details": {
            "rate": {
                "pass_expiration_date": null,
                "pass_expiration_minutes_after_booking": null
            },
            "rates": [
                {
                    "id": 1,
                    "title": "natus eum deserunt",
                    "cancellation_policies": {
                        "penalties": [
                            {
                                "id": 1,
                                "time": 137,
                                "percentage": 46
                            }
                        ],
                        "description": null
                    }
                }
            ],
            "product": {
                "id": 1,
                "tags": [
                    {
                        "key": "product tag",
                        "value": "tag value"
                    }
                ],
                "title": "et eum",
                "banner": {
                    "id": 1,
                    "url": "\/storage\/\/tmp\/fakeruEzGvp",
                    "filename": "facilis"
                },
                "images": [
                    {
                        "id": 3,
                        "url": "\/storage\/\/tmp\/fakerCVSnzr",
                        "filename": "repudiandae"
                    },
                    {
                        "id": 4,
                        "url": "\/storage\/\/tmp\/fakerT9Ysct",
                        "filename": "incidunt"
                    }
                ],
                "labels": [
                    "eum"
                ],
                "videos": [
                    {
                        "url": "https:\/\/www.youtube.com\/watch?v=cum",
                        "type": "youtube",
                        "video_code": "cum"
                    },
                    {
                        "url": "https:\/\/vimeo.com\/natus",
                        "type": "vimeo",
                        "video_code": "natus"
                    }
                ],
                "supplier": {
                    "id": 10,
                    "name": "Prof. Rogelio Adams",
                    "tags": [
                        {
                            "key": "supplier tag",
                            "value": "tag value"
                        }
                    ],
                    "description": "fuga nesciunt",
                    "permissions": [
                        {
                            "name": "create-and-edit-product",
                            "description": "create and edit product"
                        }
                    ]
                },
                "thumbnail": {
                    "id": 2,
                    "url": "\/storage\/\/tmp\/faker7QdgUs",
                    "filename": "quis"
                },
                "categories": [
                    {
                        "id": 1,
                        "title": "mollitia",
                        "tags": [
                            {
                                "key": "ds-category-id",
                                "value": "3"
                            }
                        ]
                    }
                ],
                "highlights": [
                    "Vero aut ad et odio sunt.",
                    "Cumque ipsum ea atque inventore minima sit.",
                    "Perspiciatis ullam ut atque possimus ea quis et et."
                ],
                "description": "Dolor minima odio nemo quod. Iure molestias explicabo deleniti adipisci at. Quibusdam quam totam quae.",
                "distributor": {
                    "name": "Rayna"
                },
                "what_to_bring": "Temporibus consequatur mollitia dolores aut blanditiis. Consequatur voluptatem inventore vero id.",
                "know_before_you_go": "Ducimus officiis quia numquam. Consequuntur omnis nisi blanditiis et molestiae. Incidunt quos eaque hic."
            },
            "service_level": {
                "title": "adipisci",
                "capacity": 6,
                "duration": {
                    "time": 0,
                    "description": null
                },
                "has_pickup": true,
                "description": "Totam aut vel et ut doloribus. Voluptatem nulla recusandae ducimus ducimus porro illo assumenda. At temporibus ea eius atque excepturi. Distinctio praesentium ad consequatur corrupti et eum.",
                "cut_off_time": 0,
                "has_drop_off": true,
                "pricing_type": "per_person",
                "business_hours": null,
                "has_tour_guide": false,
                "offer_time_end": "2021-02-08",
                "offer_time_start": "2021-01-25",
                "availability_type": "per_slot"
            },
            "starting_point": {
                "city": {
                    "id": 1,
                    "name": "East Aaron",
                    "tags": [
                        {
                            "key": "ds-city-id",
                            "value": 3
                        }
                    ]
                },
                "address": "8158 Ernser Isle Apt. 048\nEast Yvette, MT 10477-0195",
                "country": {
                    "id": 1,
                    "code": "VU",
                    "name": "Uganda"
                },
                "latitude": "53.03937800",
                "longitude": "-41.04082300"
            }
        },
        "total_prices": {
            "original": {
                "amount": 0,
                "currency": {
                    "code": "AED",
                    "symbol": "v",
                    "name": "nisi"
                }
            },
            "agent": {
                "amount": 0,
                "currency": {
                    "code": "AED",
                    "symbol": "v",
                    "name": "nisi"
                }
            },
            "sold": {
                "amount": 0,
                "currency": {
                    "code": "AED",
                    "symbol": "v",
                    "name": "nisi"
                }
            }
        }
    }
}

Request      

POST v1/pos/roles/{role}/service_levels/{service_level}/orders

URL Parameters

role  string  

service_level  string  

Body Parameters

leader  object optional  

leader.first_name  string optional  

leader.last_name  string optional  

leader.gender  string optional  
The value must be one of male, female, or other.

leader.phone_number  string optional  

leader.phone_country_code  string optional  

leader.whatsapp_number  string optional  

leader.email  string optional  
The value must be a valid email address.

leader.price_category_id  string optional  

passengers  object[] optional  

passengers[].first_name  string optional  

passengers[].last_name  string optional  

passengers[].gender  string optional  
The value must be one of male, female, or other.

passengers[].phone_number  string optional  

passengers[].phone_country_code  string optional  

passengers[].whatsapp_number  string optional  

passengers[].email  string optional  
The value must be a valid email address.

passengers[].price_category_id  string optional  

details  object optional  

details.selected_date  string optional  
Required when availability type is pass. Format Y-m-d.

details.quantity  string optional  

details.availability_id  string optional  

details.checkin_date  string optional  

details.checkout_date  string optional  

details.start_date  string optional  
The value must be a valid date in the format Y-m-d.

details.start_time  string optional  

details.number_of_bookings  string optional  

additional_information  object optional  

additional_information.contact_person  object optional  

additional_information.contact_person.tags  string[] optional  

additional_information.contact_person.id  integer optional  

additional_information.tour_guide  object optional  

additional_information.tour_guide.tags  string[] optional  

additional_information.tour_guide.id  integer optional  

additional_information.pickup  object optional  

additional_information.pickup.date  string optional  
The value must be a valid date.

additional_information.pickup.time  string optional  
The value must be a valid date in the format H:i.

additional_information.pickup.driver_id  string optional  

additional_information.pickup.location  object optional  

additional_information.pickup.location.point  object optional  

additional_information.pickup.location.point.latitude  string optional  

additional_information.pickup.location.point.longitude  string optional  

additional_information.pickup.location.point.address  string optional  

additional_information.pickup.location.point.id  integer  
when pickup type is pre_defined.

additional_information.dropoff  object optional  

additional_information.dropoff.date  string optional  
The value must be a valid date.

additional_information.dropoff.time  string optional  
The value must be a valid date in the format H:i.

additional_information.dropoff.driver_id  string optional  

additional_information.dropoff.location  object optional  

additional_information.dropoff.location.point  object optional  

additional_information.dropoff.location.point.latitude  string optional  

additional_information.dropoff.location.point.longitude  string optional  

additional_information.dropoff.location.point.address  string optional  

tags  string[] optional  

pending_booking  boolean optional  

Update order.

requires authentication

Client or contact person can update status, leader, pickup and dropOff;

Example request:

curl -X PUT \
    "https://api.connect.turpal.com/v1/pos/orders" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"pickup":{"date":"2023-03-26T22:12:13+0000","time":"22:12","driver_id":{},"location":{"point":["consequatur"]}},"dropoff":{"date":"2023-03-26T22:12:13+0000","time":"22:12","driver_id":{},"location":{"point":["consequatur"]}},"status":"consequatur","contact_person":{"tags":[{},null],"id":17},"reference_code":"consequatur","leader":{"first_name":"consequatur","last_name":"consequatur","gender":"consequatur","phone_number":"consequatur","phone_country_code":"consequatur","whatsapp_number":"consequatur","email":"qkunze@example.com"},"orders":{"tags":[{},null],"ids":[17,17]},"tour_guide":{"tags":[{},null]}}'
const url = new URL(
    "https://api.connect.turpal.com/v1/pos/orders"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "pickup": {
        "date": "2023-03-26T22:12:13+0000",
        "time": "22:12",
        "driver_id": {},
        "location": {
            "point": [
                "consequatur"
            ]
        }
    },
    "dropoff": {
        "date": "2023-03-26T22:12:13+0000",
        "time": "22:12",
        "driver_id": {},
        "location": {
            "point": [
                "consequatur"
            ]
        }
    },
    "status": "consequatur",
    "contact_person": {
        "tags": [
            {},
            null
        ],
        "id": 17
    },
    "reference_code": "consequatur",
    "leader": {
        "first_name": "consequatur",
        "last_name": "consequatur",
        "gender": "consequatur",
        "phone_number": "consequatur",
        "phone_country_code": "consequatur",
        "whatsapp_number": "consequatur",
        "email": "qkunze@example.com"
    },
    "orders": {
        "tags": [
            {},
            null
        ],
        "ids": [
            17,
            17
        ]
    },
    "tour_guide": {
        "tags": [
            {},
            null
        ]
    }
}

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT v1/pos/orders

PATCH v1/pos/orders

Body Parameters

pickup  object optional  

pickup.date  string optional  
The value must be a valid date.

pickup.time  string optional  
The value must be a valid date in the format H:i.

pickup.driver_id  string optional  

pickup.location  object optional  

pickup.location.point  string[] optional  

dropoff  object optional  

dropoff.date  string optional  
The value must be a valid date.

dropoff.time  string optional  
The value must be a valid date in the format H:i.

dropoff.driver_id  string optional  

dropoff.location  object optional  

dropoff.location.point  string[] optional  

status  string optional  

contact_person  object optional  

contact_person.tags  string[] optional  

contact_person.id  integer optional  

reference_code  string optional  

leader  object optional  

leader.first_name  string optional  

leader.last_name  string optional  

leader.gender  string optional  

leader.phone_number  string optional  

leader.phone_country_code  string optional  

leader.whatsapp_number  string optional  

leader.email  string optional  
The value must be a valid email address.

orders  object optional  

orders.tags  string[] optional  

orders.ids  integer[] optional  

tour_guide  object optional  

tour_guide.tags  string[] optional  

Retrieve all products.

requires authentication

Retrieve all the products with pagination that client has access to .

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/pos/products?page=17&per_page=17&sort=consequatur" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"page":17,"per_page":17,"filter":{"id":"consequatur","title":"consequatur","city":{"ids":"consequatur","tags":[{"key":"consequatur","value":"consequatur"}]},"country":"consequatur","category":{"ids":"consequatur"},"back_office":false,"label":"consequatur","supplier":{"ids":"consequatur"},"tags":[{},null]},"sort":["consequatur"]}'
const url = new URL(
    "https://api.connect.turpal.com/v1/pos/products"
);

let params = {
    "page": "17",
    "per_page": "17",
    "sort": "consequatur",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "page": 17,
    "per_page": 17,
    "filter": {
        "id": "consequatur",
        "title": "consequatur",
        "city": {
            "ids": "consequatur",
            "tags": [
                {
                    "key": "consequatur",
                    "value": "consequatur"
                }
            ]
        },
        "country": "consequatur",
        "category": {
            "ids": "consequatur"
        },
        "back_office": false,
        "label": "consequatur",
        "supplier": {
            "ids": "consequatur"
        },
        "tags": [
            {},
            null
        ]
    },
    "sort": [
        "consequatur"
    ]
}

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "data": [
        {
            "id": 8345,
            "title": "aut consequatur",
            "supplier": null,
            "description": "Id nisi qui id. Temporibus quia ipsam ut iusto iusto. Iusto similique accusantium et a qui ducimus nihil. Nihil autem omnis cum molestiae vel.",
            "highlights": [
                "Ex dicta hic inventore asperiores illum est.",
                "Non quia dicta in.",
                "Provident qui a voluptatem dignissimos error sit labore quos."
            ],
            "short_description": "Rerum repudiandae est nostrum et voluptas.",
            "know_before_you_go": "Autem nam sunt provident quia et perferendis fuga a. Autem eveniet quis labore vel autem deleniti ut.",
            "what_to_bring": "Eum repellendus illo dolorum omnis repellendus voluptatibus nihil. Nisi officiis rerum id tempore voluptate sit rem. Odit aut voluptas quasi ut. Culpa reiciendis totam est consequatur doloribus optio est.",
            "is_published": null,
            "back_office": false,
            "organization": {
                "id": 3822,
                "name": "Reichel PLC",
                "currency": {
                    "code": "AED",
                    "symbol": "د.إ;",
                    "name": "UAE dirham"
                },
                "languages": []
            },
            "location": null,
            "points": [],
            "categories": [],
            "labels": [],
            "ticket": null,
            "images": [],
            "videos": [],
            "banner": {
                "id": 79878,
                "filename": "hic",
                "url": "https:\/\/ur2h9smi.turpal.com\/tmp\/fakerzsr8V9"
            },
            "thumbnail": {
                "id": 79879,
                "filename": "qui",
                "url": "https:\/\/ur2h9smi.turpal.com\/tmp\/fakerah1zzb"
            },
            "service_levels": [],
            "additional_services": [],
            "tags": [],
            "editable": true,
            "currencies": {
                "supported": [
                    {
                        "code": "AED",
                        "symbol": "د.إ;",
                        "name": "UAE dirham"
                    }
                ]
            }
        },
        {
            "id": 8346,
            "title": "incidunt aut",
            "supplier": null,
            "description": "Quibusdam sint iste nesciunt delectus inventore ratione voluptas doloremque. Deserunt placeat fugit non. Sequi soluta nesciunt consequatur eligendi blanditiis consequatur vitae et. Iure maxime corporis ut quas sit quo explicabo.",
            "highlights": [
                "Nihil dolorem est quod aspernatur perspiciatis dolor sint.",
                "Harum nihil recusandae voluptatem quam suscipit ut.",
                "Sunt et sunt itaque culpa tempore."
            ],
            "short_description": "Velit eius qui vel porro occaecati.",
            "know_before_you_go": "Eos incidunt alias accusantium. Est voluptatem debitis iusto quia doloribus molestiae explicabo. Sit error iste similique sint et libero.",
            "what_to_bring": "Ab qui et omnis pariatur. Quae doloremque dolorum libero nam placeat quaerat saepe. Omnis vel dolor autem omnis doloribus.",
            "is_published": null,
            "back_office": false,
            "organization": {
                "id": 3823,
                "name": "Graham Inc",
                "currency": {
                    "code": "AED",
                    "symbol": "د.إ;",
                    "name": "UAE dirham"
                },
                "languages": []
            },
            "location": null,
            "points": [],
            "categories": [],
            "labels": [],
            "ticket": null,
            "images": [],
            "videos": [],
            "banner": {
                "id": 79880,
                "filename": "laboriosam",
                "url": "https:\/\/ur2h9smi.turpal.com\/tmp\/fakermSWTya"
            },
            "thumbnail": {
                "id": 79881,
                "filename": "deserunt",
                "url": "https:\/\/ur2h9smi.turpal.com\/tmp\/fakervP5oxb"
            },
            "service_levels": [],
            "additional_services": [],
            "tags": [],
            "editable": true,
            "currencies": {
                "supported": [
                    {
                        "code": "AED",
                        "symbol": "د.إ;",
                        "name": "UAE dirham"
                    }
                ]
            }
        }
    ]
}

Request      

GET v1/pos/products

Query Parameters

page  integer optional  
The page of the pagination.

per_page  integer optional  
Number of items in a page. max: 100

filter.id  integer optional  
filter products based on a single product ID.

filter.title  string optional  
filter products based on title.

filter.city.ids  string optional  
filter products based on city ids.

filter.city.tags[].key  string optional  
key of city tag.

filter.city.tags[].value  string optional  
value of city tag.

filter.country  integer optional  
filter products based on country name.

filter.category.ids  string optional  
filter products based on category ids.

filter.labels  string optional  
filter products based on product labels.

sort  string optional  
the title of the field you want to sort by. options: `id`, `title', `city`.

Body Parameters

page  integer optional  

per_page  integer optional  

filter  object optional  

filter.id  string optional  

filter.title  string optional  

filter.city  object optional  

filter.city.ids  string optional  

filter.city.tags  object[] optional  

filter.city.tags[].key  string  

filter.city.tags[].value  string  

filter.country  string optional  

filter.category  object optional  

filter.category.ids  string optional  

filter.back_office  boolean optional  

filter.label  string optional  

filter.supplier  object optional  

filter.supplier.ids  string optional  

filter.tags  string[] optional  

sort  string[] optional  

Profile

Get user profile info.

requires authentication

Get user profile info and setting.

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/profile" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.connect.turpal.com/v1/profile"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "data": {
        "id": 1,
        "name": "Remington Reilly",
        "email": "lemke.marc@example.com",
        "tags": [
            {
                "key": "user_key",
                "value": "user_tag_value"
            }
        ],
        "roles": [
            {
                "id": 1,
                "name": "admin",
                "description": null,
                "tags": [],
                "permissions": [
                    {
                        "name": "some-permission",
                        "description": "some demo access"
                    },
                    {
                        "name": "real-permission",
                        "description": "real permission for product"
                    },
                    {
                        "name": "read-everything",
                        "description": "read all data"
                    }
                ]
            }
        ],
        "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Remington+Reilly&color=7F9CF5&background=EBF4FF",
        "organizations": [
            {
                "id": 1,
                "name": "Remington Reilly's Organization",
                "currency": {
                    "name": "UAE dirham",
                    "symbol": "د.إ;",
                    "code": "AED"
                },
                "languages": [
                    {
                        "code": "ar",
                        "name": "Arabic",
                        "is_default": false
                    },
                    {
                        "code": "en",
                        "name": "English",
                        "is_default": true
                    }
                ]
            }
        ],
        "email_verified": true
    }
}

Request      

GET v1/profile

Tag

Add tag.

requires authentication

Batch assign tag to taggables (listed below). It updates the tag if the key already exists.

Supported URLs

Example request:

curl -X POST \
    "https://api.connect.turpal.com/v1/tags/consequatur/consequatur" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"ids":[17,17],"tags":[{"key":"some-external-id","value":"12"},{"key":"some-external-id","value":"12"}]}'
const url = new URL(
    "https://api.connect.turpal.com/v1/tags/consequatur/consequatur"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        17,
        17
    ],
    "tags": [
        {
            "key": "some-external-id",
            "value": "12"
        },
        {
            "key": "some-external-id",
            "value": "12"
        }
    ]
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "data": []
}

Request      

POST v1/tags/{tag}/{taggable}

URL Parameters

tag  string optional  
tag in 'key:value' format.

taggable  string optional  
one of taggable types: products, roles, cities, users, transfers, orders, categories, bookings

Body Parameters

ids  integer[] optional  

tags  object[] optional  

tags[].key  string optional  
Tag key.

tags[].value  string optional  
Tag value.

Update tag.

requires authentication

Batch sync tag of taggables (listed below). It removes tag from taggables that not present.

Supported URLs

Example request:

curl -X PUT \
    "https://api.connect.turpal.com/v1/tags/consequatur/consequatur" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"ids":[17,17],"tags":[{"key":"some-external-id","value":"12"},{"key":"some-external-id","value":"12"}]}'
const url = new URL(
    "https://api.connect.turpal.com/v1/tags/consequatur/consequatur"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        17,
        17
    ],
    "tags": [
        {
            "key": "some-external-id",
            "value": "12"
        },
        {
            "key": "some-external-id",
            "value": "12"
        }
    ]
}

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "data": []
}

Request      

PUT v1/tags/{tag}/{taggable}

URL Parameters

tag  string optional  
tag in 'key:value' format.

taggable  string optional  
one of taggable types: products, roles, cities, users, transfers, orders, categories, bookings

Body Parameters

ids  integer[] optional  

tags  object[] optional  

tags[].key  string optional  
Tag key.

tags[].value  string optional  
Tag value.

Delete tag.

requires authentication

Delete tag from taggable(s).

Supported URLs

Example request:

curl -X DELETE \
    "https://api.connect.turpal.com/v1/tags/consequatur/consequatur" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"ids":[17,17],"tags":[{"key":"some-external-id","value":"12"},{"key":"some-external-id","value":"12"}]}'
const url = new URL(
    "https://api.connect.turpal.com/v1/tags/consequatur/consequatur"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        17,
        17
    ],
    "tags": [
        {
            "key": "some-external-id",
            "value": "12"
        },
        {
            "key": "some-external-id",
            "value": "12"
        }
    ]
}

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):

{
    "data": []
}

Request      

DELETE v1/tags/{tag}/{taggable}

URL Parameters

tag  string optional  
tag in 'key:value' format.

taggable  string optional  
one of taggable types: products, roles, cities, users, transfers, orders, categories, bookings

Body Parameters

ids  integer[] optional  

tags  object[] optional  

tags[].key  string optional  
Tag key.

tags[].value  string optional  
Tag value.

User

Get list of contact persons.

requires authentication

Get list of users that have permission of being assigned as contact person

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/contactpersons" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.connect.turpal.com/v1/contactpersons"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "data": [
        {
            "id": 6593,
            "name": "Dr. Enid Harber II",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Dr.+Enid+Harber+II&color=7F9CF5&background=EBF4FF",
            "tags": []
        },
        {
            "id": 6594,
            "name": "Norval Nitzsche",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Norval+Nitzsche&color=7F9CF5&background=EBF4FF",
            "tags": []
        }
    ]
}

Request      

GET v1/contactpersons

Get list of drivers.

requires authentication

Get list of users that have permission of being assigned as drivers to a transfer

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/drivers" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.connect.turpal.com/v1/drivers"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "data": [
        {
            "id": 6595,
            "name": "Dr. Enid Harber II",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Dr.+Enid+Harber+II&color=7F9CF5&background=EBF4FF",
            "tags": []
        },
        {
            "id": 6596,
            "name": "Shayna Blanda",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Shayna+Blanda&color=7F9CF5&background=EBF4FF",
            "tags": []
        }
    ]
}

Request      

GET v1/drivers

Get list of issuers.

requires authentication

Get list of users that have permission of booking product

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/issuers" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.connect.turpal.com/v1/issuers"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "data": [
        {
            "id": 6597,
            "name": "Dr. Enid Harber II",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Dr.+Enid+Harber+II&color=7F9CF5&background=EBF4FF",
            "tags": []
        },
        {
            "id": 6598,
            "name": "Korbin Heathcote",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Korbin+Heathcote&color=7F9CF5&background=EBF4FF",
            "tags": []
        }
    ]
}

Request      

GET v1/issuers

Get list of tour guides.

requires authentication

Get list of users that have tour-guide permission.

Example request:

curl -X GET \
    -G "https://api.connect.turpal.com/v1/tourguides" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.connect.turpal.com/v1/tourguides"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

{
    "data": [
        {
            "id": 6630,
            "name": "Dr. Enid Harber II",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Dr.+Enid+Harber+II&color=7F9CF5&background=EBF4FF",
            "tags": []
        },
        {
            "id": 6631,
            "name": "Mrs. Jaclyn Purdy IV",
            "profile_photo_url": "https:\/\/ui-avatars.com\/api\/?name=Mrs.+Jaclyn+Purdy+IV&color=7F9CF5&background=EBF4FF",
            "tags": []
        }
    ]
}

Request      

GET v1/tourguides

Validation and Errors

Validation errors

Many endpoints require validation and would return 422 status code in case of validation errors.

Example response (422)

{
    "errors": {
        "password": [
            "The password must be at least 8 characters."
        ],
        "terms": [
            "The terms must be accepted."
        ]
    },
    "meta": {
        "message": "Request is not valid",
        "tracking_id": null
    }
}

Expected error types

If anything happens in the server that is not planned, it returns the status code for example 401, 403, 404, 409 with a body that is in the following format

Example response (401, 403, 404, 409, ...)

{
    "errors": null,
    "meta": {
        "message": "Email or password is incorrect",
        "tracking_id": null
    }
}

Server Unexpected Errors

If anything unexpected happens in the server, it will respond with 500 status code with an error code in the meta that can be returned for debugging purposes.

Example response (500)

{
    "errors": null,
    "meta": {
        "message": "Oops!! Something bad happened on our side. For more information, Please contact us and provide the following error code",
        "tracking_id": "5c822001"
    }
}

Webhooks

Webhooks allow you to be notified of significant events in the system:

Order Events

booking.prices.original, booking.prices.sold, booking.prices.agent are null and pricing data is stored into booking.passengers.prices.original, booking.passengers.prices.sold, booking.passengers.prices.agent

booking.passengers.prices.original, booking.passengers.prices.sold, booking.passengers.prices.agent are null and pricing data is stored into booking.prices.original, booking.prices.sold, booking.prices.agent

Example webhook

{
    "id": "4699cd36-28ac-4e33-95b1-f4e02557055f",
    "event": "order-updated",
    "created_at": "2021-11-01 11:32:57",
    "data": {
        "id": 1,
        "starts_at": "2021-12-01 11:32:57",
        "ends_at": "2021-12-01 11:32:57",
        "reference_code": "2021",
        "created_at": "2021-11-01T11:32:57.000000Z",
        "tour_guide": {
            "id": 7,
            "name": "Keenan Will",
            "profile_photo_url": "https://ui-avatars.com/api/?name=Keenan+Will&color=7F9CF5&background=EBF4FF",
            "tags": [
                {
                    "key": "ds-user-id",
                    "value": 3
                }
            ]
        },
        "issuer": {
            "id": 9,
            "name": "Rod Kshlerin",
            "profile_photo_url": "https://ui-avatars.com/api/?name=Rod+Kshlerin&color=7F9CF5&background=EBF4FF",
            "tags": [
                {
                    "key": "ds-user-id",
                    "value": 3
                }
            ]
        },
        "contact_person": {
            "id": 8,
            "name": "Ms. Mariana Berge II",
            "profile_photo_url": "https://ui-avatars.com/api/?name=Ms.+Mariana+Berge+II&color=7F9CF5&background=EBF4FF",
            "tags": [
                {
                    "key": "ds-user-id",
                    "value": 3
                }
            ]
        },
        "status": "Booked",
        "total_prices": {
            "original": {
                "amount": 797,
                "currency": {
                    "code": "USD",
                    "symbol": "$",
                    "name": "dollar"
                }
            },
            "agent": {
                "amount": 337,
                "currency": {
                    "code": "USD",
                    "symbol": "$",
                    "name": "dollar"
                }
            },
            "sold": {
                "amount": 904,
                "currency": {
                    "code": "USD",
                    "symbol": "$",
                    "name": "dollar"
                }
            }
        },
        "bookings": [
            {
                "id": 1,
                "status": "Cancelled",
                "prices": {
                    "original": {
                        "amount": 797,
                        "currency": {
                            "code": "USD",
                            "symbol": "$",
                            "name": "dollar"
                        }
                    },
                    "agent": {
                        "amount": 337,
                        "currency": {
                            "code": "USD",
                            "symbol": "$",
                            "name": "dollar"
                        }
                    },
                    "sold": {
                        "amount": 904,
                        "currency": {
                            "code": "USD",
                            "symbol": "$",
                            "name": "dollar"
                        }
                    }
                },
                "availability": {
                    "id": 1,
                    "start_time": "13:21:31",
                    "date": "2027-10-22"
                },
                "passengers": [
                    {
                        "passenger_id": 1,
                        "status": "CANCELED",
                        "prices": {
                            "original": null,
                            "agent": null,
                            "sold": null
                        }
                    }
                ]
            }
        ],
        "client": {
            "id": 6,
            "name": "Carlee Mann",
            "description": "mollitia explicabo",
            "tags": [
                {
                    "key": "ds-client-id",
                    "value": 3
                }
            ]
        },
        "vat": {
            "percentage": 9.5,
            "type": "included"
        },
        "passengers": [
            {
                "id": 1,
                "first_name": "Eliezer",
                "last_name": "Gibson",
                "gender": "Male",
                "phone_number": "04662656656",
                "whatsapp_number": "04662656656",
                "email": "jfgsajdgs@gmail.com",
                "is_leader": false,
                "price_category_details": ""
            },
            {
                "id": 2,
                "first_name": "Eliezer",
                "last_name": "Gibson",
                "gender": "Male",
                "phone_number": "04662656656",
                "whatsapp_number": "04662656656",
                "email": "jfgsajdgs@gmail.com",
                "is_leader": false,
                "price_category_details": ""
            }
        ],
        "pickup": {
            "id": 1,
            "date": "2022-01-01",
            "time": "12:00:00",
            "driver": {
                "id": 4,
                "name": "Prof. Maxime Renner",
                "profile_photo_url": "https://ui-avatars.com/api/?name=Prof.+Maxime+Renner&color=7F9CF5&background=EBF4FF",
                "tags": [
                    {
                        "key": "ds-user-id",
                        "value": 3
                    }
                ]
            },
            "location": {
                "point": {
                    "id": 1,
                    "latitude": "-64.327155",
                    "longitude": "-113.694641",
                    "address": "39928 Stracke Ranch\nCarrollborough, UT 22396",
                    "city": {
                        "id": 1,
                        "name": "North Evelyntown",
                        "tags": [
                            {
                                "key": "ds-city-id",
                                "value": 3
                            }
                        ],
                        "country": {
                            "id": 1,
                            "name": "Australia",
                            "code": "EE"
                        }
                    }
                }
            }
        },
        "dropoff": {
            "id": 2,
            "date": "2022-01-01",
            "time": "12:00:00",
            "driver": {
                "id": 6,
                "name": "Eliezer Gibson",
                "profile_photo_url": "https://ui-avatars.com/api/?name=Eliezer+Gibson&color=7F9CF5&background=EBF4FF",
                "tags": [
                    {
                        "key": "ds-client-id",
                        "value": 3
                    }
                ]
            },
            "location": {
                "point": {
                    "id": 2,
                    "latitude": "-64.327155",
                    "longitude": "-113.694641",
                    "address": "39928 Stracke Ranch\nCarrollborough, UT 22396",
                    "city": {
                        "id": 1,
                        "name": "North Evelyntown",
                        "tags": [
                            {
                                "key": "ds-city-id",
                                "value": 3
                            }
                        ],
                        "country": {
                            "id": 1,
                            "name": "Australia",
                            "code": "EE"
                        }
                    }
                }
            }
        },
        "tickets": [
            {
                "id": 4,
                "filename": "consequatur",
                "url": "https://rkfgejgwd.com/rfeg/rer"
            }
        ],
        "tags": [
            {
                "key": "ds-invoice-id",
                "value": 3
            },
            {
                "key": "ds-tour-id",
                "value": 3
            }
        ],
         "booked_details": {
            "product": {
                "id": 2,
                "title": "qui nemo",
                "highlights": [
                    "Quidem maxime odio dolores officiis.",
                    "Eos commodi voluptates molestias accusantium.",
                    "Saepe vitae facilis corrupti ad et nam reiciendis."
                ],
                "description": "Aperiam dolorem blanditiis qui. Aliquid ea corrupti vel autem ullam ut officiis. Debitis illo quas possimus ratione omnis nobis et.",
                "what_to_bring": "Perferendis animi ut distinctio sed est. Ut sed sit eaque nulla magnam. Omnis quia minus quisquam placeat voluptas.",
                "supplier": {
                    "id": 1,
                    "name": "admin",
                    "description": null,
                    "tags": [
                        {
                            "key": "some key",
                            "value": "some value"
                        }
                    ],
                    "permissions": [
                        {
                            "name": "create-and-edit-product",
                            "description": "create and edit product"
                        }
                    ]
                },
                "banner": {
                    "id": 3,
                    "filename": "veniam",
                    "url": "\/storage\/\/tmp\/fakerb5xsI4"
                },
                "know_before_you_go": "Assumenda necessitatibus facilis totam deserunt autem quia dignissimos. Excepturi eaque velit accusantium eligendi ut numquam.",
                "thumbnail": {
                    "id": 4,
                    "filename": "ut",
                    "url": "\/storage\/\/tmp\/fakerC6Ljx4"
                },
                "images": [
                    {
                        "id": 3,
                        "filename": "sit",
                        "url": "http:\/\/localhost\/storage\/tmp\/fakert9rJHJ"
                    },
                    {
                        "id": 4,
                        "filename": "unde",
                        "url": "http:\/\/localhost\/storage\/tmp\/fakerj4p1oK"
                    }
                ],
                "videos": [
                    {
                        "video_code": "et",
                        "type": "youtube",
                        "url": "https:\/\/www.youtube.com\/watch?v=et"
                    },
                    {
                        "video_code": "autem",
                        "type": "vimeo",
                        "url": "https:\/\/vimeo.com\/autem"
                    }
                ],
                "categories": [
                    {
                        "id": 1,
                        "title": "mollitia",
                        "tags": [
                            {
                                "key": "ds-category-id",
                                "value": 3
                            }
                        ]
                    }
                ],
                "labels": ["Ski", "Dubai"],
                "tags": [
                    {
                        "key": "product tag",
                        "value": "tag value"
                    }
                ]
            },
            "service_level": {
                "title": "modi",
                "description": "Aspernatur numquam dolorem at cupiditate deleniti quo. Est nihil laborum corrupti architecto. Consequatur molestiae vero voluptatibus. Numquam alias fuga modi iusto et id.",
                "business_hours": null,
                "capacity": "2",
                "pricing_type": "per_person",
                "has_pickup": false,
                "has_drop_off": false,
                "has_tour_guide": false,
                "duration": "0",
                "cut_off_time": "0",
                "availability_type": "pass",
                "offer_time_start": "2020-12-25 00:00:00",
                "offer_time_end": "2021-01-08 00:00:00"
            },
            "rate": {
                "pass_expiration_date": null,
                "pass_expiration_minutes_after_booking": null
            },
            "rates": [],
            "starting_point": {
                "latitude": "-36.544205",
                "longitude": "-56.415927",
                "address": "6743 Beier Rapid Apt. 214\nWest Ianport, DE 60710",
                "city": {
                    "id": 7,
                    "name": "Jayneborough",
                    "tags": []
                },
                "country": {
                    "id": 7,
                    "name": "Uruguay",
                    "code": "SS"
                }
            }
        }
    },
    "meta": {
        "user": {
            "id": 1,
            "name": "Eliezer Gibson",
            "profile_photo_url": "/tmp/faker3psgrh",
            "tags": [
                {
                    "key": "ds-user-id",
                    "value": 3
                }
            ]
        }
    }
}