Introduction
Welcome to the Deliverart API! You can use our API to access Deliverart API endpoints, which can get information on orders, customers, deliveries and various things.
We have language bindings in Shell, Php and JavaScript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
Fundamentals
The Deliverart APIs are developed following the RPC protocol and will only use the GET and POST to perform read, write, modify or delete operations.
The response behavior of some APIs can be changed by forwarding some parameters in the request header.
Header parameters
Below is the list of settings offered by the Deliverart API
X-I18n-Locale
This setting allows you to change the localization of parameters that support this behavior, such as menu items.
Allowed values it_IT
en_GB
ar_AE
X-Date-TimeZone
In the Deliverart database all dates are stored in UTC format. The response of the API is based on the timezone of the user making the request via api call.
If you want to override the reference timezone you need to use this setting, or update the user's timezone.
This rule is also valid in the data entry phase, for example: if a user has set the Europe/Rome
timezone and the workshift creation API is used passing as date 2021-01-01 11:00:00, the system will understand that this date refers to the Europe/Rome
timezone and will convert it to UTC
so that when it is read again it will always be shown in the correct format.
Allowed values https://www.php.net/manual/en/timezones.php
Authentication - ApiKey
This is the simplest way to interact with our server-to-server APIs. To start using this system make a request to our team for the generation of an API Key.
To query our API you must send the API Key in the header of the request via the parameter:
X-Deliverart-ApiKey
Authentication - OAuth2
Obtain access token
Make sure to replace
Basic dGVzdGNsaWVudDp0ZXN0cGFzcw==
with your API key and use your username (email) and password pair you use to log-in to Deliverart.
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://auth.deliverart.it/oauth",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"grant_type" => "password",
"username" => "username",
"password" => "password"
]),
CURLOPT_HTTPHEADER => [
"authorization: Basic dGVzdGNsaWVudDp0ZXN0cGFzcw==",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://auth.deliverart.it/oauth \
--header 'authorization: Basic dGVzdGNsaWVudDp0ZXN0cGFzcw==' \
--header 'content-type: application/json' \
--data '{
"grant_type": "password",
"username": "username",
"password": "password"
}'
fetch("https://auth.deliverart.it/oauth", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Basic dGVzdGNsaWVudDp0ZXN0cGFzcw=="
},
"body": {
"grant_type": "password",
"username": "username",
"password": "password"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
The first time you need to login you have to use the client_id and client_secret parameters as HTTP Basic authentication credentials, and the username, and password values in the request body, in order to obtain an access token.
HTTP Request
POST https://auth.deliverart.it/oauth
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the client_id and client_secret as HTTP Basic authentication credentials |
content-type | string | true |
Accepted only the application/json value |
Authorization: Basic dGVzdGNsaWVudDp0ZXN0cGFzcw==
Body Parameters
{
"grant_type": "password",
"username": "username",
"password": "password"
}
Format: JSON
Parameter | Type | Required | Description |
---|---|---|---|
grant_type | string | true |
Only available value is password |
username | string | true |
Your email used to authenticate on Deliverart |
password | string | true |
Your password used to authenticate on Deliverart |
Success response
{
"access_token": "ACCESS_TOKEN",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "SCOPE_1 SCOPE_2 SCOPE_3 SCOPE_n...",
"refresh_token": "REFRESH_TOKEN"
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
access_token | string | false |
Access token |
expires_in | int | false |
Token validity time (in seconds) |
token_type | string | false |
Token type. Only one value: Bearer |
scope | string | true |
If empty, the token will have no limitation scope. Otherwise scopes with strings separated by a space will be returned. |
refresh_token | string | false |
Refresh token. It will be expired in 14 days. |
Error response
Status code: 401
Invalid username or password
Status code: 400
Invalid client id or client secret
Refresh token
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://auth.deliverart.it/oauth",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"grant_type" => "refresh_token",
"refresh_token" => "YOUR_REFRESH_TOKEN"
]),
CURLOPT_HTTPHEADER => [
"authorization: Basic dGVzdGNsaWVudDp0ZXN0cGFzcw==",
"content-type: application/json",
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://auth.deliverart.it/oauth \
--header 'authorization: Basic dGVzdGNsaWVudDp0ZXN0cGFzcw==' \
--header 'content-type: application/json' \
--data '{
"grant_type": "refresh_token",
"refresh_token": "YOUR_REFRESH_TOKEN"
}'
fetch("https://auth.deliverart.it/oauth", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Basic dGVzdGNsaWVudDp0ZXN0cGFzcw=="
},
"body": {
"grant_type": "refresh_token",
"refresh_token": "YOUR_REFRESH_TOKEN"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
When an access token has expired you can renew it this token using the refresh_token obtained from the previous call.
Each refresh call will return a new refresh token that can be used to renew the access token.
HTTP Request
POST https://auth.deliverart.it/oauth
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the client_id and client_secret as HTTP Basic authentication credentials |
content-type | string | true |
Accepted only the application/json value |
Authorization: Basic dGVzdGNsaWVudDp0ZXN0cGFzcw==
Body Parameters
{
"grant_type": "refresh_token",
"refresh_token": "YOUR_REFRESH_TOKEN"
}
Format: JSON
Parameter | Type | Required | Description |
---|---|---|---|
grant_type | string | true |
Only available value is refresh_token |
refresh_token | string | true |
Refresh token obtained from the login or refresh call |
Success response
{
"access_token": "ACCESS_TOKEN",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "SCOPE_1 SCOPE_2 SCOPE_3 SCOPE_n...",
"refresh_token": "REFRESH_TOKEN"
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
access_token | string | false |
Access token |
expires_in | int | false |
Token validity time (in seconds) |
token_type | string | false |
Token type. Only one value: Bearer |
scope | string | true |
If empty, the token will have no limitation scope. Otherwise scopes with strings separated by a space will be returned. |
refresh_token | string | false |
Refresh token. It will be expired in 14 days. |
Error response
Status code: 400
Invalid client id or client secret or invalid refresh token
Registration
The following diagram shows the flow of registering a new user account
Register customer
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/registration/register/customer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'mario.rossi@email.com',
'password' => 'xxxxxxxx',
'firstName' => 'Mario',
'lastName' => 'Rossi',
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/registration/register/customer \
--header 'Content-Type: application/json' \
--data '{
"email": "mario.rossi@email.com",
"password": "xxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi"
}'
fetch("https://pubapi.deliverart.it/registration/register/customer", {
"method": "POST",
"headers": {
"content-type": "application/json"
},
"body": {
"email": "mario.rossi@email.com",
"password": "xxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
This call will create a new user customer and will send an email with the verification code
HTTP Request
POST https://pubapi.deliverart.it/registration/register/customer
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"email": "mario.rossi@email.com",
"password": "xxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
string | true |
validEmail unique |
||
password | string | true |
required |
Password |
firstName | string | true |
required stringLength |
First name |
lastName | string | true |
required stringLength |
Last name |
Success response
{
"id": "UUID"
}
Status code: 201
Return the identifier of the new user
Errors
Status code: 422
Validation fail
Register courier
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/registration/register/courier",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'mario.rossi@email.com',
'password' => 'xxxxxxxx',
'firstName' => 'Mario',
'lastName' => 'Rossi',
'mobilePhoneNumber' => '+39xxxxxxxxxx',
'dateOfBirth' => '2000-01-01',
'consentInternalMarketing' => false,
'consentExternalMarketing' => false,
'consentProfiling' => false,
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/registration/register/courier \
--header 'Content-Type: application/json' \
--data '{
"email": "mario.rossi@email.com",
"password": "xxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi",
"mobilePhoneNumber": "+39xxxxxxxxxx",
"dateOfBirth": "2000-01-01",
"consentInternalMarketing": false,
"consentExternalMarketing": false,
"consentProfiling": false
}'
fetch("https://pubapi.deliverart.it/registration/register/courier", {
"method": "POST",
"headers": {
"content-type": "application/json"
},
"body": {
"email": "mario.rossi@email.com",
"password": "xxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi",
"mobilePhoneNumber": "+39xxxxxxxxxx",
"dateOfBirth": "2000-01-01",
"consentInternalMarketing": false,
"consentExternalMarketing": false,
"consentProfiling": false
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
This call will create a new user courier and will send an email with the verification code
HTTP Request
POST https://pubapi.deliverart.it/registration/register/courier
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"email": "mario.rossi@email.com",
"password": "xxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi",
"mobilePhoneNumber": "+39xxxxxxxxxx",
"dateOfBirth": "2000-01-01",
"consentInternalMarketing": false,
"consentExternalMarketing": false,
"consentProfiling": false
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
string | true |
validEmail unique |
||
password | string | true |
required |
Password |
firstName | string | true |
required stringLength |
First name |
lastName | string | true |
required stringLength |
Last name |
mobilePhoneNumber | string | true |
isEmpty validPhoneNumber unique |
Mobile phone number |
dateOfBirth | string | true |
isEmpty age dateFormat |
Date of birth in this format: YYYY-MM-DD. Age control, greater than or equal to 18 |
consentInternalMarketing | bool | false |
none | Consent to receive information on Deliverart products |
consentExternalMarketing | bool | false |
none | Consent to receive information on third-party products and services |
consentProfiling | bool | false |
none | Consent to receive marketing communications following profiling |
Success response
{
"id": "UUID"
}
Status code: 201
Return the identifier of the new user
Errors
Status code: 422
Validation fail
Activate
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/registration/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => 'xxxxxxxx'
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/registration/activate \
--header 'Content-Type: application/json' \
--data '{
"code": "xxxxxxxx"
}'
fetch("https://pubapi.deliverart.it/registration/activate", {
"method": "POST",
"headers": {
"content-type": "application/json"
},
"body": {
"code": "xxxxxxxx"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
This call will activate the user using verification code
HTTP Request
POST https://pubapi.deliverart.it/registration/activate
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"code": "xxxxxxxx"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
code | string | true |
exists notExpired notUsed |
Activation code |
Success response
Status code: 200
No body response returned
Errors
Status code: 422
Validation fail
Password reset
Request code
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/password/reset/code/request",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'mario.rossi@email.com'
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/password/reset/code/request \
--header 'Content-Type: application/json' \
--data '{
"email": "mario.rossi@email.com"
}'
fetch("https://pubapi.deliverart.it/password/reset/code/request", {
"method": "POST",
"headers": {
"content-type": "application/json"
},
"body": {
"email": "mario.rossi@email.com"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
This call will send an email with the reset password code
HTTP Request
POST https://pubapi.deliverart.it/password/reset/code/request
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"email": "mario.rossi@email.com"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
string | true |
validEmail exists |
Success response
Status code: 200
No body response returned
Errors
Status code: 422
Validation fail
Check valid code
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/password/reset/code/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => 'xxxxxxxx'
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/password/reset/code/check \
--header 'Content-Type: application/json' \
--data '{
"code": "xxxxxxxx"
}'
fetch("https://pubapi.deliverart.it/password/reset/code/check", {
"method": "POST",
"headers": {
"content-type": "application/json"
},
"body": {
"code": "xxxxxxxx"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
This call will verify that the code you are using for the reset password is correct
HTTP Request
POST https://pubapi.deliverart.it/password/reset/code/check
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"code": "xxxxxxxx"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
code | string | true |
exists notExpired notUsed |
Reset password code |
Success response
Status code: 200
No body response returned
Errors
Status code: 422
Validation fail
Reset password
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/password/reset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => 'xxxxxxxxx',
'password' => 'xxxxxxxxx',
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/password/reset \
--header 'Content-Type: application/json' \
--data '{
"code": "xxxxxxxxx",
"password": "xxxxxxxxx",
}'
fetch("https://pubapi.deliverart.it/password/reset", {
"method": "POST",
"headers": {
"content-type": "application/json"
},
"body": {
"code": "xxxxxxxxx",
"password": "xxxxxxxxx",
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
This call will reset the user password
HTTP Request
POST https://pubapi.deliverart.it/password/reset
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"code": "xxxxxxxxx",
"password": "xxxxxxxxx",
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
code | string | true |
exists notExpired notUsed |
Reset password code |
password | string | true |
none | Password |
Success response
Status code: 200
No body response returned
Errors
Status code: 422
Validation fail
Me
Info
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url 'https://pubapi.deliverart.it/me' \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/me", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint will return your profile information
HTTP Request
GET https://pubapi.deliverart.it/me
Available user types
ALL
Available auth scopes
No scope restriction
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"role": "manager",
"locale": "it_IT",
"email": "*********",
"mobilePhoneNumber": "*********",
"verification": {
"email": true,
"mobilePhoneNumber": true
},
"extraData": {
"pushNotification": {
"token": "*********",
"endpoint": {
"login": "https://notification.deliverart.it/push/login",
"logout": "https://notification.deliverart.it/push/logout"
}
}
},
"timezone": "Europe/Rome",
"firstName": "Mario",
"lastName": "Rossi",
"profileCompleted": true,
"consents": {
"profiling": false,
"externalMarketing": true,
"internalMarketing": true
},
"dateOfBirth": "1900-01-01",
"fiscalCode": "*********",
"birthAddress": {
"city": "*********",
"country": "**",
"province": "**"
},
"residenceAddress": {
"id": "84c64da4-d901-4f09-8204-b9603b9acc19",
"placeId": "*********",
"text": "*********",
"point": {
"lat": 41,
"lng": 12
}
},
"company": {
"id": "0471b6bb-053a-4a61-95a5-1c0f0f69a6a1",
"businessName": "Mario Rossi"
}
}
This above is an example response of a manager user. The information returned may be different between the various user roles.
Status code: 200
Parameter | Type | Nullable | Role | Description |
---|---|---|---|---|
id | string | false |
ALL | User identifier. UUID format |
role | string | false |
ALL | User role. Can be assumed one of this values: admin manager manager_2_level customer courier |
locale | string | false |
ALL | The user locale. For example: it_IT |
string | false |
ALL | Email used in the registration flow. | |
mobilePhoneNumber | string | true |
ALL | Mobile telephone contact of the user |
timezone | string | false |
admin manager manager_2_level customer courier |
The user timezone. For example: Europe/Rome . The list is available at https://www.php.net/manual/en/timezones.php |
firstName | string | true |
admin manager manager_2_level customer courier |
First name |
lastName | string | true |
admin manager manager_2_level customer courier |
Last name |
profileCompleted | bool | false |
admin manager manager_2_level customer courier |
Check if the profile is completed. The validation rules my be different between the various user roles |
dateOfBirth | string | true |
manager manager_2_level courier |
Date of birth. Format YYYY-MM-DD |
fiscalCode | string | true |
manager manager_2_level courier |
Fiscal code |
residenceAddress | object | true |
manager manager_2_level courier |
An object that contains the address information |
birthAddress | object | false |
manager manager_2_level courier |
Object containing birth address information |
consents | object | false |
admin manager manager_2_level customer courier |
Object that contains the flags for privacy consents |
verification | object | false |
ALL | Object that contains the verification status for email and mobilePhoneNumber |
Verification
Parameter | Type | Nullable | Description |
---|---|---|---|
bool | false |
Check if the email if validated | |
mobilePhoneNumber | bool | false |
Check if the mobile phone number if validated |
Consents
Parameter | Type | Nullable | Description |
---|---|---|---|
profiling | bool | false |
Flag for the profiling |
externalMarketing | bool | false |
Flag for the consent to external marketing communications |
internalMarketing | bool | false |
Flag for the consent to internal marketing communications |
Birth address
Parameter | Type | Nullable | Description |
---|---|---|---|
city | string | false |
Name of the city |
province | string | false |
Province |
country | string | false |
Address country |
Error response
Status code: 401
Invalid bearer token
Update
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"firstName" => "Mario",
"lastName" => "Rossi",
"timezone" => "Europe/Rome",
"birthAddressCountry" => "IT",
"birthAddressProvince" => "Roma",
"birthAddressCity" => "Roma",
"dateOfBirth" => "1980-01-01",
"fiscalCode" => "xxxxxxxxxxxxx",
"residenceAddressId" => "ADDRESS_UUID",
"workingAddressId" => "ADDRESS_UUID",
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json",
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/me/update \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json' \
--data '{
"firstName": "Mario",
"lastName": "Rossi",
"timezone": "Europe/Rome",
"birthAddressCountry": "IT",
"birthAddressProvince": "Roma",
"birthAddressCity": "Roma",
"dateOfBirth": "1980-01-01",
"fiscalCode": "xxxxxxxxxxxxx",
"residenceAddressId": "ADDRESS_UUID",
"workingAddressId": "ADDRESS_UUID",
}'
fetch("https://pubapi.deliverart.it/me/update", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"firstName": "Mario",
"lastName": "Rossi",
"timezone": "Europe/Rome",
"birthAddressCountry": "IT",
"birthAddressProvince": "Roma",
"birthAddressCity": "Roma",
"dateOfBirth": "1980-01-01",
"fiscalCode": "xxxxxxxxxxxxx",
"residenceAddressId": "ADDRESS_UUID",
"workingAddressId": "ADDRESS_UUID",
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint will allow to change the personal data. Check the table below to find the fields for the specific role
HTTP Request
POST https://pubapi.deliverart.it/me/update
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"firstName": "Mario",
"lastName": "Rossi",
"timezone": "Europe/Rome",
"birthAddressCountry": "IT",
"birthAddressProvince": "Roma",
"birthAddressCity": "Roma",
"dateOfBirth": "1980-01-01",
"fiscalCode": "xxxxxxxxxxxxx",
"residenceAddressId": "ADDRESS_UUID",
"workingAddressId": "ADDRESS_UUID"
}
Format: JSON
Parameter | Type | Required | Validation | Role | Description |
---|---|---|---|---|---|
firstName | string | true |
isEmpty |
manager manager_2_level customer courier |
First name |
lastName | string | true |
isEmpty |
manager manager_2_level customer courier |
Last name |
timezone | string | false |
valid |
manager manager_2_level customer courier |
The user timezone. For example: Europe/Rome . If empty this value will not changed. The list is available at https://www.php.net/manual/en/timezones.php |
birthAddressCountry | string | true |
isEmpty |
courier |
Country. 2 letters |
birthAddressProvince | string | true |
isEmpty |
courier |
Province |
birthAddressCity | string | true |
isEmpty |
courier |
City |
dateOfBirth | string | true |
isEmpty age dateFormat |
courier |
Date of birth in this format: YYYY-MM-DD. Age control, greater than or equal to 18 |
fiscalCode | string | true |
isEmpty unique |
courier |
Fiscal code |
residenceAddressId | string | true |
isEmpty exists |
courier |
Address identifier |
workingAddressId | string | true |
isEmpty exists |
courier |
Address identifier |
Success response
{
"success": "ok"
}
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Update / Password
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/update/password",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"currentPassword" => "PWD",
"password" => "PWD",
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json",
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/me/update/password \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json' \
--data '{
"currentPassword": "PWD",
"password": "PWD"
}'
fetch("https://pubapi.deliverart.it/me/update/password", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"currentPassword": "PWD",
"password": "PWD"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint will allow you to change your personal password
HTTP Request
POST https://pubapi.deliverart.it/me/update/password
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"currentPassword": "PWD",
"password": "PWD"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
currentPassword | string | true |
isEmpty invalidPassword |
Current password |
password | string | true |
isEmpty |
New password |
Success response
{
"success": "ok"
}
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Update / Mobile phone number
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/update/mobile-phone-number",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"mobilePhoneNumber" => "+39xxxxxxxxxx",
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json",
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/me/update/mobile-phone-number \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json' \
--data '{
"mobilePhoneNumber": "+39xxxxxxxxxx"
}'
fetch("https://pubapi.deliverart.it/me/update/mobile-phone-number", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"mobilePhoneNumber": "+39xxxxxxxxxx"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint will update the phone number of the user profile. If the phone number is different from the previous value, you should re-verify via the 2FA flow using the following api calls:
HTTP Request
POST https://pubapi.deliverart.it/me/update/mobile-phone-number
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"mobilePhoneNumber": "+39xxxxxxxxxx"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
mobilePhoneNumber | string | true |
isEmpty validPhoneNumber unique |
Mobile phone number |
Success response
{
"success": "ok"
}
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Verification / Mobile phone number / Request 2FA code
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/verification/mobile/request",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json",
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/me/verification/mobile/request \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/me/verification/mobile/request", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint will send a text message with the phone number validation code. Use the Validate 2FA code call to validate the number with the received code
HTTP Request
POST https://pubapi.deliverart.it/me/verification/mobile/request
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
No body params
Success response
{
"valid": true
}
Status code: 200
To check if the request was successful, check the value of the valid
key
Errors
Status code: 401
Invalid bearer token
Verification / Mobile phone number / Validate 2FA code
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/verification/mobile/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"code" => "xxxxxx",
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json",
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/me/verification/mobile/validate \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json' \
--data '{
"code": "xxxxxx"
}'
fetch("https://pubapi.deliverart.it/me/verification/mobile/validate", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"code": "xxxxxx"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint validates the phone number using the 2FA code.
HTTP Request
POST https://pubapi.deliverart.it/me/verification/mobile/validate
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"code": "xxxxxx"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
code | string | true |
valid |
2FA code |
Success response
Status code: 200
No body response returned
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Update / Email
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/update/email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"email" => "mariorossi@email.com",
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json",
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/me/update/email \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json' \
--data '{
"email": "mariorossi@email.com"
}'
fetch("https://pubapi.deliverart.it/me/update/email", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"email": "mariorossi@email.com"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint will update the email of the user profile. If the email is different from the previous value, you should re-verify via the 2FA flow (by email) using the following api calls:
HTTP Request
POST https://pubapi.deliverart.it/me/update/email
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"email": "mariorossi@email.com"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
string | true |
isEmpty email unique |
Success response
{
"success": "ok"
}
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Verification / Email / Request 2FA code
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/verification/email/request",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json",
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/me/verification/email/request \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/me/verification/email/request", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint will send an email with the validation code. Use the Validate 2FA code call to validate the email with the received code
HTTP Request
POST https://pubapi.deliverart.it/me/verification/email/request
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
No body params
Success response
{
"valid": true
}
Status code: 200
To check if the request was successful, check the value of the valid
key
Errors
Status code: 401
Invalid bearer token
Verification / Email / Validate 2FA code
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/verification/email/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"code" => "xxxxxx",
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json",
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/me/verification/email/validate \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json' \
--data '{
"code": "xxxxxx"
}'
fetch("https://pubapi.deliverart.it/me/verification/email/validate", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"code": "xxxxxx"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint validates the email using the 2FA code.
HTTP Request
POST https://pubapi.deliverart.it/me/verification/email/validate
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"code": "xxxxxx"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
code | string | true |
valid |
2FA code |
Success response
Status code: 200
No body response returned
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Order / List
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/order/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/me/order/list \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/me/order/list", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint will return your order list
HTTP Request
GET https://pubapi.deliverart.it/me/order/list
Available user types
manager
manager_2_level
customer
Available auth scopes
order_admin
order_list
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Filter Parameters
You can pass this parameter as query string
Parameter | Type | Required | Description |
---|---|---|---|
type | string | false |
Order type. Available values: managed unmanaged take_away |
status | string | false |
Order status. Available values: to_be_defined aborted valid canceled |
preparationStatus | string | false |
Preparation status. Available values: to_prepare in_preparation done |
Success response
{
"items": [
{
"id": "UUID",
"source": "customer",
"code": "A1000",
"externalCode": null,
"amount": 48,
"vatAmount": 4.8,
"netAmount": 43.2,
"type": "managed",
"status": "valid",
"preparationStatus": "done",
"payment": {
"method": "undefined",
"status": "waiting"
},
"times": {
"created": "2020-08-09 17:00:28",
"estimatedPreparationEnd": "2020-08-09 17:38:03"
},
"delivery": {
"id": "ee41495d-839a-4e7b-a0b4-8909713f9314",
"status": "waiting_for_orders",
"delivered": false,
"deliveryTime": {
"estimated": "2021-05-19 16:55:00",
"real": null
}
}
},
{
"id": "UUID",
"source": "deliverart",
"code": "1/2021",
"externalCode": null,
"amount": 41,
"vatAmount": 3.7273,
"netAmount": 37.2727,
"type": "take_away",
"status": "valid",
"preparationStatus": "done",
"takeAwayStatus": "withdrawn",
"payment": {
"method": "cash",
"status": "paid"
},
"times": {
"created": "2021-05-05 00:44:18",
"estimatedPreparationEnd": "2021-05-05 02:58:00"
},
"takeAway": {
"id": "UUID",
"status": "withdrawn",
"withdrawn": true,
"takeAwayTime": "2021-05-05 03:00:00"
}
}
],
"pagination": {
"page": 1,
"totalItems": 1,
"pageSize": 30,
"pageCount": 1
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
items | object | false |
List of the items |
pagination | object | false |
Pagination object |
Item
Parameter | Type | Nullable | Type | Description |
---|---|---|---|---|
id | string | false |
managed take_away unmanaged |
Order identifier. UUID format |
source | string | false |
managed take_away unmanaged |
Source of the order. Example deliverart or customer |
code | string | false |
managed take_away unmanaged |
Code of the order |
externalCode | string | false |
managed take_away unmanaged |
Possible reference for an external order code. Eg: UberEats order number |
amount | float | false |
managed take_away unmanaged |
Total order amount |
vatAmount | float | false |
managed take_away unmanaged |
Only vat amount |
netAmount | float | false |
managed take_away unmanaged |
Amount without vat |
type | string | false |
managed take_away unmanaged |
Order type. Available values: managed unmanaged take_away |
status | string | false |
managed take_away unmanaged |
Order status. Available values: to_be_defined aborted valid canceled |
preparationStatus | string | false |
managed take_away unmanaged |
Preparation status. Available values: to_prepare in_preparation done |
times | object | false |
managed take_away unmanaged |
Object that contains the times information |
payment | object | false |
managed take_away unmanaged |
Object that contains the payment information |
delivery | object | true |
managed |
Object that contains the delivery information. If the order has not passed into a valid status this field will not be filled in |
takeAway | object | true |
take_away |
Object that contains the takeAway information. If the order has not passed into a valid status this field will not be filled in |
Time
Parameter | Type | Nullable | Description |
---|---|---|---|
created | string | false |
Creation time. Format: YYYY-MM-DD HH:mm:ss |
estimatedPreparationEnd | string | false |
Estimated end preparation time. Format: YYYY-MM-DD HH:mm:ss |
Payment
Parameter | Type | Nullable | Description |
---|---|---|---|
method | string | false |
Payment method. Available values: undefined cash credit_card paypal satispay transfer |
status | string | false |
Payment status. Available values: waiting paid canceled refunded |
Delivery
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Delivery order identifier. UUID format |
status | string | false |
Delivery status. Available values are: canceled waiting_for_orders ready_to_take_charge taken_over delivery_started delivery_finished |
delivered | bool | false |
Flag indicating whether the order has been delivered |
deliveryTime | object | false |
An object that contains the Estimated and real time information for the delivery time |
Take away
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Take away identifier. UUID format |
status | string | false |
Take away status. Available values are: waiting_for_preparation waiting_to_be_withdrawn withdrawn not_withdrawn |
withdrawn | bool | false |
Flag indicating whether the order has been withdrawn |
takeAwayTime | string | false |
Take away time. Format: YYYY-MM-DD HH:mm:ss |
Errors
Status code: 401
Invalid bearer token
Customer / Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/customer/detail/pos/{ID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/me/customer/detail/pos/{ID} \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/me/customer/detail/pos/{ID}", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the point of sale identifier.
This endpoint will return the customer detail.
The addresses or the business profiles were added to the customer card before the account was created they will not be shown in this call.
HTTP Request
GET https://pubapi.deliverart.it/me/customer/detail/pos/{ID}
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"totalOrders": 94,
"phoneNumber": "+39xxxxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi",
"fullName": "Mario Rossi",
"email": "mario.rossi@email.com",
"addresses": [
{
"id": "UUID",
"main": false,
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": 3,
"internal": null,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
...
],
"businessProfiles": [
{
"id": "UUID",
"businessCountry": "IT",
"businessName": "Mario Rossi SRL",
"vat": "01234567890",
"pec": "mario.rossi@email.com",
"sdi": "xxxxxx",
"fiscalCode": "xxxxxxxxxxxxxxxx",
"main": true,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
...
]
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Customer identifier. UUID format |
totalOrders | int | false |
Number of orders |
phoneNumber | string | false |
Telephone contact of the user |
firstName | string | true |
First name |
lastName | string | true |
Last name |
fullName | string | true |
The full name |
string | true |
The email contact | |
addresses | array | false |
An array object that contains a list of customer address objects. Can be empty |
businessProfiles | array | false |
An array object that contains a list of business profile objects. Can be empty |
Business profile
Parameter | Type | Nullable | Only for country | Description |
---|---|---|---|---|
id | string | false |
ALL | Allergen identifier. UUID format |
businessCountry | string | false |
ALL | Business profile country. Eg: IT |
businessName | string | false |
ALL | Business name |
vat | int | false |
ALL | VAT |
main | bool | false |
ALL | Flag indicating whether the profile is the default company profile |
fiscalCode | string | false |
IT |
The italian fiscal code fo the customer |
pec | string | true |
IT |
Certified email address |
sdi | string | true |
IT |
SDI code for the electronic invoice |
address | object | false |
ALL | An object that contains the address information |
Errors
Status code: 404
Invalid point of sale identifier
Status code: 401
Invalid bearer token
Customer / Create profile
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/customer/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pointOfSale' => 'UUID'
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/me/customer/create \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"pointOfSale": "UUID"
}'
fetch("https://pubapi.deliverart.it/me/customer/create", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"pointOfSale": "UUID"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow
This call will create, for the indicated store, a new customer profile associated with the user.
The property of the customer card already belongs to the user and it will not be necessary to call Redeem profile / By POS.
HTTP Request
POST https://pubapi.deliverart.it/me/customer/create
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"pointOfSale": "UUID"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
pointOfSale | string | true |
isEmpty noProfilesRedeemed userPhoneNumberNotExists |
Point of sale identifier |
Success response
{
"id": "UUID"
}
Status code: 201
Return the identifier of the new customer
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Customer / Redeem profile / By POS
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/customer/ownership/pos",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pointOfSale' => 'UUID'
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/me/customer/ownership/pos \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"pointOfSale": "UUID"
}'
fetch("https://pubapi.deliverart.it/me/customer/ownership/pos", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"pointOfSale": "UUID"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow
This call will take care of redeeming an already created customer profile with the same phone number set in the user profile.
By redeeming the profile, ownership of the data will pass into the hands of the user and the store manager will not be able to change his or her contact information.
A customer profile can only be redeemed if it was created before registering a user profile (for example in telephone orders made in the past)
HTTP Request
POST https://pubapi.deliverart.it/me/customer/ownership/pos
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"pointOfSale": "UUID"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
pointOfSale | string | true |
isEmpty noProfilesRedeemed userPhoneNumberExists |
Point of sale identifier |
Success response
{
"id": "UUID"
}
Status code: 200
Return the identifier of the redeemed customer profile
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Customer address / List
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/customer/addresses/pos/{ID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/me/customer/addresses/pos/{ID} \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/me/customer/addresses/pos/{ID}", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the point of sale identifier.
This endpoint will return the list of a customer's addresses used since their account was created.
If other addresses were added to the customer card before the account was created they will not be shown in this call.
HTTP Request
GET https://pubapi.deliverart.it/me/customer/addresses/pos/{ID}
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"items": [
{
"id": "UUID",
"main": false,
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": 3,
"internal": null,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
...
],
"pagination": {
"page": 1,
"totalItems": 2,
"pageSize": 30,
"pageCount": 1
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
items | object | false |
List of the customer addresses |
pagination | object | false |
Pagination object |
Item
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Customer address identifier. UUID format |
main | bool | false |
Flag indicating whether it is the default address |
intercom | string | false |
Intercom |
building | string | true |
Building |
ladder | string | true |
Ladder |
floor | string | true |
Floor |
internal | string | true |
Internal |
address | object | false |
An object that contains the address information |
Errors
Status code: 404
Invalid point of sale identifier
Status code: 401
Invalid bearer token
Workshift / List
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/workshift/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/me/workshift/list \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/me/workshift/list", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint will return the list of shifts on which a user has received invitations.
HTTP Request
GET https://pubapi.deliverart.it/me/workshift/list
Available user types
courier
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Query Parameters
Parameter | Type | Description |
---|---|---|
page | int | Page number for the pagination flow |
invitationStatus | string | Filter by the invitation status. Available values are: not_sent pending expired canceled accepted rejected |
_workshift | object | List of the sub workshift filters |
Workshift
Parameter | Type | Description |
---|---|---|
currentDay | bool | If true as string or 1 as number, it will show only the shifts of the current day |
Example endpoint with object filter: https://pubapi.deliverart.it/me/workshift/list?invitationStatus=accepted&_workshift%5BcurrentDay%5D=1
Success response
{
"items": [
{
"id": "UUID",
"duration": 60,
"start": "2021-05-25 07:00:00",
"end": "2021-05-25 08:00:00",
"invitation": {
"id": "UUID",
"status": "pending",
"reason": null
},
"codes": [
{
"id": "UUID",
"code": "XXXXXXXXX",
"expiresAt": "2021-05-25 05:00:00",
"used": false
}
],
"pos": {
"id": "UUID",
"name": "Name of the POS",
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
}
},
...
],
"pagination": {
"page": 1,
"totalItems": 2,
"pageSize": 30,
"pageCount": 1
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
items | object | false |
List of the workshift |
pagination | object | false |
Pagination object |
Item
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Workshift identifier. UUID format |
duration | int | false |
Duration of the workshift in minutes |
start | string | false |
Workshift start time. Format: YYYY-MM-DD HH:mm:ss |
end | string | false |
Workshift end time. Format: YYYY-MM-DD HH:mm:ss |
invitation | object | false |
An object that contains the invitation information status |
codes | array | false |
An array object that contains a list of code objects. Can be empty |
pos | object | false |
An object that contains the point of sale information status |
Item - Invitation
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Invitation identifier. UUID format |
status | string | false |
Invitation status. Available values are: not_sent pending expired canceled accepted rejected |
reason | string | true |
Rejected reason |
Item - Code
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Invitation identifier. UUID format |
code | string | false |
Generated code to use for the invitation response |
expiresAt | string | false |
Expiration date and time of the code. Expressed in UTC. Format: YYYY-MM-DD HH:mm:ss |
used | bool | false |
Flag indicating whether the code is already in use |
Item - POS
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Point of sale identifier. UUID format |
name | string | false |
Name of the point of sale |
address | object | false |
An object that contains the address information |
Errors
Status code: 409
Invalid page provided
Status code: 401
Invalid bearer token
POS / List
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/me/pos/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/me/pos/list \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/me/pos/list", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint will return the list of the points of sale on which a user has received invitations.
HTTP Request
GET https://pubapi.deliverart.it/me/pos/list
Available user types
courier
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Query Parameters
Parameter | Type | Description |
---|---|---|
onlyNotActivated | int | Flag that indicates whether to show only the points of sale with not accepted invitations. Possible values 1 or 0 |
onlyActivated | int | Flag that indicates whether to show only the points of sale with accepted invitations. Possible values 1 or 0 |
page | int | Page number for the pagination flow |
Success response
{
"items": [
{
"pos": {
"id": "UUID",
"name": "Name of the POS",
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
"joined": {
"status": true,
"at": "2021-05-25 05:00:00"
},
"codes": [
{
"id": "UUID",
"code": "XXXXXXXXX",
"expiresAt": "2021-05-25 05:00:00",
"used": false
},
...
]
},
...
],
"pagination": {
"page": 1,
"totalItems": 2,
"pageSize": 30,
"pageCount": 1
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
items | object | false |
List of the points of sale |
pagination | object | false |
Pagination object |
Item
Parameter | Type | Nullable | Description |
---|---|---|---|
pos | object | false |
An object that contains the point of sale information status |
joined | object | false |
An object that contains the join information status |
codes | array | false |
An array object that contains a list of code objects. Can be empty |
Item - POS
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Point of sale identifier. UUID format |
name | string | false |
Name of the point of sale |
address | object | false |
An object that contains the address information |
Item - Joined
Parameter | Type | Nullable | Description |
---|---|---|---|
status | bool | false |
Join status. If true the invitation was accepted |
at | string | true |
Join date and time. Expressed in UTC. Format: YYYY-MM-DD HH:mm:ss |
Item - Code
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Invitation identifier. UUID format |
code | string | false |
Generated code to use for the invitation response |
expiresAt | string | false |
Expiration date and time of the code. Expressed in UTC. Format: YYYY-MM-DD HH:mm:ss |
used | bool | false |
Flag indicating whether the code is already in use |
Errors
Status code: 409
Invalid page provided
Status code: 401
Invalid bearer token
Companies
Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/company/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/company/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/company/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
of the company identifier.
This endpoint will return the company detail
HTTP Request
GET https://pubapi.deliverart.it/company/{ID}/detail
Available user types
ALL
Available auth scopes
company_read
company_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"businessName": "Company business name",
"sdi": "xxxxxx",
"vat": "xxxxxxxxxx",
"pec": "mariorossi@pec.com",
"fiscalCode": "xxxxxxxxxxxxx",
"profileCompleted": true,
"contacts": [
{
"type": "web_site",
"value": "https://example.com"
},
{
"type": "phone_number",
"value": "+393320000000"
}
],
"referenceUser": {
"id": "UUID",
"firstName": "First name",
"lastName": "Last name",
"fullName": "Full name"
},
"billingAddress": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
},
"operationalAddress": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Point of sale identifier. UUID format |
businessName | string | false |
Business name of the company |
sdi | string | true |
SDI code |
vat | int | true |
VAT code |
pec | string | true |
Email pec |
fiscalCode | string | true |
Fiscal code |
profileCompleted | bool | false |
Flag indicating whether the company has a complete profile |
contacts | array | false |
An array object that contains a list of contact objects. Can be empty |
referenceUser | object | false |
An object that contains the info of the manager (master) of the company |
billingAddress | object | true |
Reference to the billing address object |
operationalAddress | array | true |
Reference to the operational address object |
Contact
Parameter | Type | Nullable | Description |
---|---|---|---|
type | string | false |
Type of the contact. Available values are: phone_number email web_site fax |
value | string | false |
Contact value |
Reference user
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Reference user identifier. UUID format |
firstName | string | true |
First name |
lastName | string | true |
Last name |
fullName | string | true |
The full name |
Errors
Status code: 404
Invalid company id
Status code: 401
Invalid bearer token
POS / List
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/company/{ID}/pos/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/company/{ID}/pos/list \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/company/{ID}/pos/list", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
of the company identifier.
This endpoint will return the list of associated points of sale
HTTP Request
GET https://pubapi.deliverart.it/company/{ID}/pos/list
Available user types
ALL
Available auth scopes
company_read
company_pos_read
company_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Query Parameters
Parameter | Type | Description |
---|---|---|
page | int | Page number for the pagination flow |
Success response
{
"items": [
{
"id": "UUID",
"name": "Name of the POS",
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
...
],
"pagination": {
"pageCount": 2,
"pageSize": 30,
"totalItems": 44,
"page": 1
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
items | array | false |
An array object that contains a list of Point of sale objects. Can be empty |
pagination | object | false |
Reference to the pagination object |
POS
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Point of sale identifier. UUID format |
name | string | false |
Name of the point of sale |
address | object | true |
Reference to the address object |
Errors
Status code: 409
Invalid page provided
Status code: 404
Invalid company id
Status code: 401
Invalid bearer token
Points of sale
Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/pos/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/pos/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/pos/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the point of sale identifier.
This endpoint will return the point of sale detail
HTTP Request
GET https://pubapi.deliverart.it/pos/{ID}/detail
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"name": "Name of the point of sale",
"country": "IT",
"company": {
"id": "UUID",
"name": "Company name"
},
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
},
"categories": [
{
"id": "UUID",
"name": "Category name"
}
],
"contacts": [
{
"type": "phone_number",
"value": "+39xxxxxxxxxx"
},
...
]
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Point of sale identifier. UUID format |
name | string | false |
Name of the point of sale |
country | string | false |
Country code of the point fo sale |
address | object | false |
An object that contains the address information |
company | object | false |
Reference to the company object |
categories | array | false |
An array object that contains a list of category objects. Can be empty |
contacts | array | false |
An array object that contains a list of contact objects. Can be empty |
Category
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Category identifier. UUID format |
name | string | false |
Category name |
Contact
Parameter | Type | Nullable | Description |
---|---|---|---|
type | string | false |
Type of the contact. Available values are: phone_number email web_site fax |
value | string | false |
Contact value |
Errors
Status code: 404
Invalid point of sale id
Status code: 401
Invalid bearer token
Customers / List
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/pos/{ID}/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/pos/{ID}/customers \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/pos/{ID}/customers", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the point of sale identifier.
This endpoint will return the list of the customers for the selected point of sale
HTTP Request
GET https://pubapi.deliverart.it/pos/{ID}/customers
Available user types
manager
manager_2_level
Available auth scopes
read_customer
customer_admin
point_of_sale_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Query Parameters
Parameter | Type | Description |
---|---|---|
page | int | Page number for the pagination flow |
onlyBusiness | bool | This filter return only the customers who have at least one business profile |
onlyNoBusiness | bool | This filter return only the customers who don't have a business profile |
onlyWithOrders | bool | This filter return only the customers who have at least one order |
onlyWithoutOrders | bool | This filter return only the customers who don't have no orders |
phoneNumber | string | This filter is applied to the phone number value |
string | This filter is applied to the email value | |
firstName | string | This filter is applied to the first name value |
lastName | string | This filter is applied to the last name value |
Success response
{
"items": [
{
"id": "UUID",
"totalOrders": 12,
"phoneNumber": "xxxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi",
"fullName": "Mario Rossi",
"email": "mario.rossi@email.com",
"acl": [
"readCustomer",
"manageCustomer",
"deleteCustomer",
"createCustomerAddress",
"createCustomerBusinessProfile"
],
"isBusiness": true,
"businessProfile": {
"id": "UUID",
"businessCountry": "IT",
"businessName": "Acme",
"vat": "xxxxxxxxxx",
"pec": "mario.rossi@pec.it",
"sdi": null,
"fiscalCode": "xxxxxxxxxx",
"main": true,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
"address": {
"id": "UUID",
"main": false,
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": 3,
"internal": null,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
"latestOrder": {
"id": "7f3b8420-1af3-4321-be23-3c16f2a4e901",
"source": "deliverart",
"amount": 26,
"created": "2022-10-03 11:10:58"
}
},
...
],
"pagination": {
"pageCount": 2,
"pageSize": 30,
"totalItems": 44,
"page": 1
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
items | array | false |
An array object that contains a list of Customer objects. Can be empty |
pagination | object | false |
Reference to the pagination object |
Customers
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Customer identifier. UUID format |
totalOrders | int | false |
Number of orders |
phoneNumber | string | false |
Telephone contact of the user |
firstName | string | true |
First name |
lastName | string | true |
Last name |
fullName | string | true |
The full name |
string | true |
The email contact | |
acl | array | false |
List of available ACL. Available values are: readCustomer createCustomerAddress createCustomerBusinessProfile manageCustomer deleteCustomer |
isBusiness | bool | false |
A flag that indicates if a customer is a business profile |
address | object | true |
An object that contains the customer address info. Can be empty |
businessProfile | object | true |
An object that contains the business profile info. Can be empty |
latestOrder | object | true |
An object that contains the order info. Can be empty |
Latest order
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
managed take_away unmanaged |
source | string | false |
managed take_away unmanaged |
amount | float | false |
managed take_away unmanaged |
created | string | false |
Creation time. Format: YYYY-MM-DD HH:mm:ss |
Errors
Status code: 409
Invalid page provided
Status code: 404
Invalid point of sale id
Status code: 401
Invalid bearer token
Workshifts / List
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/pos/{ID}/workshifts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/pos/{ID}/workshifts \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/pos/{ID}/workshifts", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the point of sale identifier.
This endpoint will return the list of the workshifts generated for the selected point of sale
HTTP Request
GET https://pubapi.deliverart.it/pos/{ID}/workshifts
Available user types
ALL
Available auth scopes
workshifts_read
point_of_sale_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Query Parameters
Parameter | Type | Description |
---|---|---|
page | int | Page number for the pagination flow |
applySettingsRange | bool | This filter automatically applies the range date using the point of sale settings provided by number next days for take order specified in the backend settings. You can pass the value 1 or true to activate this filter, otherwise 0 or false . |
onlyEnabled | bool | If active, this filter shows only the enabled workshifts. You can pass the value 1 or true to activate this filter, otherwise 0 or false . |
startAtLocalizedLower | string | Returns all workshifts that have a starting date/time less than the date/time specified in the filter. Available format is YYYY-MM-DD HH:mm:ss |
endAtLocalizedGreater | string | Returns all workshifts that have a ending date/time greater than the date/time specified in the filter. Available format is YYYY-MM-DD HH:mm:ss |
Success response
{
"items": [
{
"id": "UUID",
"duration": 240,
"start": "2021-01-30 19:00:00",
"end": "2021-01-30 23:00:00"
},
{
"id": "UUID",
"duration": 360,
"start": "2020-12-29 16:00:00",
"end": "2020-12-29 22:00:00"
},
...
],
"pagination": {
"pageCount": 2,
"pageSize": 30,
"totalItems": 44,
"page": 1
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
items | array | false |
An array object that contains a list of Workshift objects. Can be empty |
pagination | object | false |
Reference to the pagination object |
Workshift
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Workshift identifier. UUID format |
duration | int | false |
Workshift duration in minutes |
start | string | false |
Start time. Format YYYY-MM-DD HH:mm:ss |
end | string | false |
End time. Format YYYY-MM-DD HH:mm:ss |
Errors
Status code: 409
Invalid page provided
Status code: 404
Invalid point of sale id
Status code: 401
Invalid bearer token
Delivery fees / List
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/pos/{ID}/delivery/fees",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/pos/{ID}/delivery/fees \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/pos/{ID}/delivery/fees", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the point of sale identifier.
This endpoint will return the list of the delivery fees for the selected point of sale
HTTP Request
GET https://pubapi.deliverart.it/pos/{ID}/delivery/fees
Available user types
manager
manager_2_level
Available auth scopes
deliveries_fee_read
point_of_sale_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
[
{
"id": "UUID",
"amount": 3,
"vatAmount": 0,
"netAmount": 3,
"type": "amount",
"min": 5,
"max": 29.99
},
{
"id": "UUID",
"amount": 1,
"vatAmount": 0,
"netAmount": 1,
"type": "amount",
"min": 30,
"max": null
},
...
]
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
array of delivery fee | array | false |
An array object that contains a list of Delivery fee objects. Can be empty |
Delivery fee
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Delivery fee identifier. UUID format |
amount | float | false |
Value of the delivery fee |
vatAmount | float | false |
Vat amount |
netAmount | float | false |
Price excluding taxes |
type | string | false |
Type of the delivery fee. Available values are: amount distance |
Additional data for each single type of delivery. Used to check which fee to apply.
Type: amount
Parameter | Type | Nullable | Description |
---|---|---|---|
min | float | false |
Min value of the order |
max | float | true |
Max value of the order. If null the control will have only the min limit |
Type: distance
Parameter | Type | Nullable | Description |
---|---|---|---|
min | int | false |
Min value of the distance expressed in meters |
max | int | true |
Max value of the distance expressed in meters. If null the control will have only the min limit |
Errors
Status code: 404
Invalid point of sale id
Status code: 401
Invalid bearer token
Deliveries / List
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/pos/{ID}/deliveries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/pos/{ID}/deliveries \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/pos/{ID}/deliveries", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the point of sale identifier.
This endpoint will return the list of the deliveries generated for the selected point of sale
HTTP Request
GET https://pubapi.deliverart.it/pos/{ID}/deliveries
Available user types
manager
manager_2_level
courier
Available auth scopes
deliveries_read
point_of_sale_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Query Parameters
Parameter | Type | Description |
---|---|---|
page | int | Page number for the pagination flow |
status | string | Delivery status. Available values are: canceled waiting_for_orders ready_to_take_charge taken_over delivery_started delivery_finished |
statuses | array | One or more status as array of strings. Available values are: canceled waiting_for_orders ready_to_take_charge taken_over delivery_started delivery_finished |
Success response
{
"items": [
{
"id": "UUID",
"status": "delivery_finished",
"courier": {
"id": "UUID",
"firstName": "Mario",
"lastName": "Ferreri",
"fullName": "Mario Ferreri",
"mobilePhoneNumber": "+393345948369"
},
"exitTime": {
"estimated": "2019-02-25 15:10:27",
"real": "2019-02-25 15:45:28"
},
"returnTime": {
"estimated": "2019-02-25 15:20:48",
"real": "2019-02-25 15:45:36"
},
"deliveryOrders": [
{
"id": "UUID",
"orderId": "UUID",
"delivered": true,
"sorting": 1,
"deliveryTime": {
"estimated": "2019-02-25 15:15:00",
"real": "2019-02-25 15:45:32"
},
"customer": {
"id": "UUID",
"totalOrders": 94,
"phoneNumber": "+39xxxxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi",
"fullName": "Mario Rossi",
"email": "mario.rossi@email.com"
},
"customerAddress": {
"id": "UUID",
"main": false,
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": null,
"internal": null,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
"tracking": {
"scope": "TRACKING",
"method": "POST",
"endpoint": "https://courier-geolocation.deliverart.it/tracking",
"token": "XXXXXXX"
}
},
...
],
"tracking": {
"scope": "READ",
"method": "GET",
"endpoint": "https://courier-geolocation.deliverart.it/tracking",
"token": "XXXXXXX"
}
},
...
],
"pagination": {
"pageCount": 2,
"pageSize": 30,
"totalItems": 44,
"page": 1
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
items | array | false |
An array object that contains a list of Delivery objects. Can be empty |
pagination | object | false |
Reference to the pagination object |
Delivery
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Delivery identifier. UUID format |
status | string | false |
Delivery status. Available values are: canceled waiting_for_orders ready_to_take_charge taken_over delivery_started delivery_finished |
courier | object | true |
An object that contains the Courier information |
exitTime | object | false |
An object that contains the Estimated and real time information for the exit of the courier from the point of sale |
returnTime | object | false |
An object that contains the Estimated and real time information for the return of the courier to the point of sale |
deliveryOrders | array | false |
An array object that contains a list of Delivery order objects |
tracking | object | true |
An object that contains the Tracking reference. Only the manager and manager_2_level can access this field |
Delivery / Courier
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Courier identifier. UUID format |
firstName | string | false |
First name |
lastName | string | false |
Last name |
fullName | string | false |
The full name |
mobilePhoneNumber | string | false |
Telephone contact of the courier |
Delivery / Delivery order
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Delivery order identifier. UUID format |
orderId | string | false |
Order identifier. UUID format |
delivered | bool | false |
Flag indicating whether the order has been delivered |
sorting | int | false |
Priority of the order within the delivery |
deliveryTime | object | false |
An object that contains the Estimated and real time information for the delivery time |
customer | object | false |
Object that contains the customer information |
customerAddress | array | false |
An object that contains the Customer address information |
tracking | object | true |
An object that contains the Tracking reference. Only the courier can access this field |
Delivery / Delivery order / Customer address
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Customer address identifier. UUID format |
main | bool | false |
Flag indicating whether it is the default address |
intercom | string | false |
Intercom |
building | string | true |
Building |
ladder | string | true |
Ladder |
floor | string | true |
Floor |
internal | string | true |
Internal |
address | object | false |
An object that contains the address information |
Errors
Status code: 409
Invalid page provided
Status code: 404
Invalid point of sale id
Status code: 401
Invalid bearer token
Customers / Find by phone number
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/pos/{ID}/customer/find/phone-number/{PHONE_NUMBER}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/pos/{ID}/customer/find/phone-number/{PHONE_NUMBER} \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/pos/{ID}/customer/find/phone-number/{PHONE_NUMBER}", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and thePHONE_NUMBER
with the phone number to search.
This endpoint will return the customer info if it's exists
HTTP Request
GET https://pubapi.deliverart.it/pos/{ID}/customer/find/phone-number/{PHONE_NUMBER}
Available user types
ALL
Available auth scopes
read_customer
customer_admin
point_of_sale_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"totalOrders": 94,
"phoneNumber": "+39xxxxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi",
"fullName": "Mario Rossi",
"email": "mario.rossi@email.com",
"addresses": [
{
"id": "UUID",
"main": false,
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": 3,
"internal": null,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
...
],
"businessProfiles": [
{
"id": "UUID",
"businessCountry": "IT",
"businessName": "Mario Rossi SRL",
"vat": "01234567890",
"pec": "mario.rossi@email.com",
"sdi": "xxxxxx",
"fiscalCode": "xxxxxxxxxxxxxxxx",
"main": true,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
...
]
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Customer identifier. UUID format |
totalOrders | int | false |
Number of orders |
phoneNumber | string | false |
Telephone contact of the user |
firstName | string | true |
First name |
lastName | string | true |
Last name |
fullName | string | true |
The full name |
string | true |
The email contact | |
addresses | array | false |
An array object that contains a list of customer address objects. Can be empty |
businessProfiles | array | false |
An array object that contains a list of business profile objects. Can be empty |
Business profile
Parameter | Type | Nullable | Only for country | Description |
---|---|---|---|---|
id | string | false |
ALL | Allergen identifier. UUID format |
businessCountry | string | false |
ALL | Business profile country. Eg: IT |
businessName | string | false |
ALL | Business name |
vat | int | false |
ALL | VAT |
main | bool | false |
ALL | Flag indicating whether the profile is the default company profile |
fiscalCode | string | false |
IT |
The italian fiscal code fo the customer |
pec | string | true |
IT |
Certified email address |
sdi | string | true |
IT |
SDI code for the electronic invoice |
address | object | false |
ALL | An object that contains the address information |
Errors
Status code: 404
Invalid point of sale id or phone number does not exist
Status code: 401
Invalid bearer token
Invitation / Accept
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/pos/invitation/accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => 'CODE'
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/pos/invitation/accept \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"code": "CODE"
}'
fetch("https://pubapi.deliverart.it/pos/invitation/accept", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"code": "CODE"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This call accepts an invitation for a point of sale
HTTP Request
POST https://pubapi.deliverart.it/pos/invitation/accept
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"code": "CODE"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
code | string | true |
isEmpty valid alreadyUsed expired invalidScope |
Invitation code |
Success response
{}
Status code: 200
Empty json
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Invitation / Reject
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/pos/invitation/reject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => 'CODE'
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/pos/invitation/reject \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"code": "CODE"
}'
fetch("https://pubapi.deliverart.it/pos/invitation/reject", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"code": "CODE"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This call rejects an invitation for a point of sale
HTTP Request
POST https://pubapi.deliverart.it/pos/invitation/reject
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"code": "CODE"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
code | string | true |
isEmpty valid alreadyUsed expired invalidScope |
Invitation code |
Success response
{}
Status code: 200
Empty json
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Settings / Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/pos/{ID}/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/pos/{ID}/settings \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/pos/{ID}/settings", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the point of sale identifier.
This endpoint will return the settings of the point of sale
HTTP Request
GET https://pubapi.deliverart.it/pos/{ID}/settings
Available user types
manager
manager_2_level
Available auth scopes
point_of_sale_read
point_of_sale_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"numberNextDaysForTakeOrder": 7,
"numberMinutesForReservedDeliveryTime": 5,
"numberMinutesForReservedTakeAwayTime": 5,
"numberMaxOrderSingleDelivery": 3,
"numberMaxMinutesToleranceForShiftOrder": 10,
"numberMinutesDeliveryTimeShiftFromNow": 20,
"numberMaxMinutesAwayForTakeOrder": 10,
"pdfDocumentGeneration": "manual",
"deliveryTimeShiftLogic": "minutes_and_travel_time"
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
numberNextDaysForTakeOrder | int | false |
Number of days from today within which an order can be created |
numberMinutesForReservedDeliveryTime | int | false |
Number of minutes to reserve a delivery time |
numberMinutesForReservedTakeAwayTime | int | false |
Number of minutes to reserve a take away time |
numberMaxOrderSingleDelivery | int | false |
Maximum number of orders that can be placed in a single delivery |
numberMaxMinutesToleranceForShiftOrder | int | false |
Maximum number of minutes for which a delivery can be moved in the case of a multiple delivery |
numberMinutesDeliveryTimeShiftFromNow | int | false |
Minimum time for taking an order. Indicates in minutes the display time of the first available time from the moment the request is made. |
numberMaxMinutesAwayForTakeOrder | int | true |
Maximum distance of a customer (in minutes). If empty there is no limit. Indicate in minutes the maximum time that a courier can take from your point of sale to the address indicated by the customer for the delivery of an order. |
pdfDocumentGeneration | string | false |
PDF generation mode for an order. Available values are: auto (every time an order is created) - manual (via a specific api call) |
deliveryTimeShiftLogic | string | false |
Logic for calculating the first available time. Available values are: only_minutes (Use only the "Minimum time to take an order") - minutes_and_travel_time (Use the "Minimum time to take an order" + the "Delivery time") |
Errors
Status code: 404
Invalid point of sale id
Status code: 401
Invalid bearer token
Settings / Update
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/pos/{ID}/settings/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"numberNextDaysForTakeOrder" => 7,
"numberMinutesForReservedDeliveryTime" => 5,
"numberMinutesForReservedTakeAwayTime" => 5,
"numberMaxOrderSingleDelivery" => 3,
"numberMaxMinutesToleranceForShiftOrder" => 10,
"numberMinutesDeliveryTimeShiftFromNow" => 20,
"numberMaxMinutesAwayForTakeOrder" => 10,
"pdfDocumentGeneration" => "manual",
"deliveryTimeShiftLogic" => "minutes_and_travel_time"
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json",
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/pos/{ID}/settings/update \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json' \
--data '{
"numberNextDaysForTakeOrder": 7,
"numberMinutesForReservedDeliveryTime": 5,
"numberMinutesForReservedTakeAwayTime": 5,
"numberMaxOrderSingleDelivery": 3,
"numberMaxMinutesToleranceForShiftOrder": 10,
"numberMinutesDeliveryTimeShiftFromNow": 20,
"numberMaxMinutesAwayForTakeOrder": 10,
"pdfDocumentGeneration": "manual",
"deliveryTimeShiftLogic": "minutes_and_travel_time"
}'
fetch("https://pubapi.deliverart.it/pos/{ID}/settings/update", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"numberNextDaysForTakeOrder": 7,
"numberMinutesForReservedDeliveryTime": 5,
"numberMinutesForReservedTakeAwayTime": 5,
"numberMaxOrderSingleDelivery": 3,
"numberMaxMinutesToleranceForShiftOrder": 10,
"numberMinutesDeliveryTimeShiftFromNow": 20,
"numberMaxMinutesAwayForTakeOrder": 10,
"pdfDocumentGeneration": "manual",
"deliveryTimeShiftLogic": "minutes_and_travel_time"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the point of sale identifier.
This endpoint will allow to change the point of sale settings
HTTP Request
POST https://pubapi.deliverart.it/pos/{ID}/settings/update
Available user types
manager
manager_2_level
Available auth scopes
point_of_sale_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"numberNextDaysForTakeOrder": 7,
"numberMinutesForReservedDeliveryTime": 5,
"numberMinutesForReservedTakeAwayTime": 5,
"numberMaxOrderSingleDelivery": 3,
"numberMaxMinutesToleranceForShiftOrder": 10,
"numberMinutesDeliveryTimeShiftFromNow": 20,
"numberMaxMinutesAwayForTakeOrder": 10,
"pdfDocumentGeneration": "manual",
"deliveryTimeShiftLogic": "minutes_and_travel_time"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
numberNextDaysForTakeOrder | int | true |
notEmpty between |
Number of days from today within which an order can be created |
numberMinutesForReservedDeliveryTime | int | true |
notEmpty between |
Number of minutes to reserve a delivery time |
numberMinutesForReservedTakeAwayTime | int | true |
notEmpty between |
Number of minutes to reserve a take away time |
numberMaxOrderSingleDelivery | int | true |
notEmpty between |
Maximum number of orders that can be placed in a single delivery |
numberMaxMinutesToleranceForShiftOrder | int | true |
notEmpty between |
Maximum number of minutes for which a delivery can be moved in the case of a multiple delivery |
numberMinutesDeliveryTimeShiftFromNow | int | true |
notEmpty between |
Minimum time for taking an order. Indicates in minutes the display time of the first available time from the moment the request is made. |
numberMaxMinutesAwayForTakeOrder | int | false |
between |
Maximum distance of a customer (in minutes). If empty there is no limit. Indicate in minutes the maximum time that a courier can take from your point of sale to the address indicated by the customer for the delivery of an order. |
pdfDocumentGeneration | string | true |
notEmpty inArray |
PDF generation mode for an order. Available values are: auto (every time an order is created) - manual (via a specific api call) |
deliveryTimeShiftLogic | string | true |
notEmpty inArray |
Logic for calculating the first available time. Available values are: only_minutes (Use only the "Minimum time to take an order") - minutes_and_travel_time (Use the "Minimum time to take an order" + the "Delivery time") |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 404
Invalid point of sale id
Status code: 401
Invalid bearer token
Addresses
Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/address/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/address/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/address/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the address identifier.
This endpoint will return the address detail
HTTP Request
GET https://pubapi.deliverart.it/address/{ID}/detail
Available user types
ALL
Available auth scopes
address_read
address_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
},
"details": {
"street_number": "100",
"route": "Street name",
"locality": "Roma",
"administrative_area_level_3": "Roma",
"administrative_area_level_2": "RM",
"administrative_area_level_1": "Lazio",
"country": "IT",
"postal_code": "00100"
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Address identifier |
placeId | float | false |
Google place ID |
text | float | false |
Google formatted address |
point | object | false |
Address coordinates |
details | object | false |
Address details provided by Google |
Details
Parameter | Type | Nullable | Description |
---|---|---|---|
street_number | string | false |
Street number |
route | string | false |
Route |
locality | string | false |
Locality |
administrative_area_level_3 | string | false |
Administrative area level 3 |
administrative_area_level_2 | string | false |
Administrative area level 2 |
administrative_area_level_1 | string | false |
Administrative area level 1 |
country | string | false |
Country |
postal_code | string | false |
Postal code |
Create / From coordinates
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/address/create/coordinates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"lat" => 41.9163288,
"lng" => 12.497449
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/address/create/coordinates \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"lat": 41.9163288,
"lng": 12.497449
}'
fetch("https://pubapi.deliverart.it/address/create/coordinates", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"lat": 41.9163288,
"lng": 12.497449
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint creates a new Deliverart address starting from the coordinates.
HTTP Request
POST https://pubapi.deliverart.it/address/create/coordinates
Available user types
ALL
Available auth scopes
address_create
address_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"lat": 41.9163288,
"lng": 12.497449
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
lat | float | true |
isEmpty |
Latitude |
lng | float | true |
isEmpty |
Longitude |
Success response
{
"id": "UUID"
}
Status code: 200 | 201
Return the identifier of the new address or of an existing address if it has already been created
Create / From Google place ID
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/address/create/place-id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"placeId" => "GOOGLE_PLACE_ID"
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/address/create/place-id \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"placeId": "GOOGLE_PLACE_ID"
}'
fetch("https://pubapi.deliverart.it/address/create/place-id", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"placeId": "GOOGLE_PLACE_ID"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theGOOGLE_PLACE_ID
with the Google place identifier.
This endpoint creates a new Deliverart address starting from the Google place ID.
HTTP Request
POST https://pubapi.deliverart.it/address/create/place-id
Available user types
ALL
Available auth scopes
address_create
address_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"placeId": "GOOGLE_PLACE_ID"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
placeId | string | false |
isEmpty |
Google place identifier |
Success response
{
"id": "UUID"
}
Status code: 200 | 201
Return the identifier of the new address or of an existing address if it has already been created
Customers
Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/customer/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/customer/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the customer identifier.
This endpoint will return the menu detail
HTTP Request
GET https://pubapi.deliverart.it/customer/{ID}/detail
Available user types
ALL
Available auth scopes
customer_read
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"totalOrders": 94,
"phoneNumber": "+39xxxxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi",
"fullName": "Mario Rossi",
"email": "mario.rossi@email.com",
"addresses": [
{
"id": "UUID",
"main": false,
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": 3,
"internal": null,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
...
],
"businessProfiles": [
{
"id": "UUID",
"businessCountry": "IT",
"businessName": "Mario Rossi SRL",
"vat": "01234567890",
"pec": "mario.rossi@email.com",
"sdi": "xxxxxx",
"fiscalCode": "xxxxxxxxxxxxxxxx",
"main": true,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
...
]
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Customer identifier. UUID format |
totalOrders | int | false |
Number of orders |
phoneNumber | string | false |
Telephone contact of the user |
firstName | string | true |
First name |
lastName | string | true |
Last name |
fullName | string | true |
The full name |
string | true |
The email contact | |
addresses | array | false |
An array object that contains a list of customer address objects. Can be empty |
businessProfiles | array | false |
An array object that contains a list of business profile objects. Can be empty |
Business profile
Parameter | Type | Nullable | Only for country | Description |
---|---|---|---|---|
id | string | false |
ALL | Allergen identifier. UUID format |
businessCountry | string | false |
ALL | Business profile country. Eg: IT |
businessName | string | false |
ALL | Business name |
vat | int | false |
ALL | VAT |
main | bool | false |
ALL | Flag indicating whether the profile is the default company profile |
fiscalCode | string | false |
IT |
The italian fiscal code fo the customer |
pec | string | true |
IT |
Certified email address |
sdi | string | true |
IT |
SDI code for the electronic invoice |
address | object | false |
ALL | An object that contains the address information |
Errors
Status code: 404
Invalid customer id
Status code: 401
Invalid bearer token
Create
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/pos/{ID}/customer/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'Mario',
'lastName' => 'Rossi',
'phoneNumber' => '+39xxxxxxxxxx',
'email' => null
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/pos/{ID}/customer/create \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"firstName": "Mario",
"lastName": "Rossi",
"phoneNumber": "+39xxxxxxxxxx",
"email": null
}'
fetch("https://pubapi.deliverart.it/pos/{ID}/customer/create", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"firstName": "Mario",
"lastName": "Rossi",
"phoneNumber": "+39xxxxxxxxxx",
"email": null
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the point of sale identifier.
This call creates a new customer profile
HTTP Request
POST https://pubapi.deliverart.it/pos/{ID}/customer/create
Available user types
ALL
Available auth scopes
create_customer
point_of_sale_admin
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"phoneNumber": "+39xxxxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi",
"email": "mario.rossi@email.com"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
phoneNumber | string | true |
isEmpty validPhoneNumber unique |
Phone number |
firstName | string | false |
none | First name |
lastName | string | false |
none | Last name |
string | false |
validEmail |
Success response
{
"id": "UUID"
}
Status code: 201
Return the identifier of the new customer
Errors
Status code: 422
Validation fail
Status code: 404
Invalid point of sale identifier
Status code: 401
Invalid bearer token
Update
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/{ID}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'Mario',
'lastName' => 'Rossi',
'phoneNumber' => '+39xxxxxxxxxx',
'email' => null
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/customer/{ID}/update \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"firstName": "Mario",
"lastName": "Rossi",
"phoneNumber": "+39xxxxxxxxxx",
"email": null
}'
fetch("https://pubapi.deliverart.it/customer/{ID}/update", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"firstName": "Mario",
"lastName": "Rossi",
"phoneNumber": "+39xxxxxxxxxx",
"email": null
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the customer identifier.
This call updates the customer profile
HTTP Request
POST https://pubapi.deliverart.it/customer/{ID}/update
Available user types
ALL
Available auth scopes
customer_update
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"phoneNumber": "+39xxxxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi",
"email": "mario.rossi@email.com"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
phoneNumber | string | true |
isEmpty validPhoneNumber unique |
Phone number |
firstName | string | false |
none | First name |
lastName | string | false |
none | Last name |
string | false |
validEmail |
Success response
Status code: 200
No body response returned
Errors
Status code: 422
Validation fail
Status code: 404
Invalid customer identifier
Status code: 401
Invalid bearer token
Delete
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/{ID}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/customer/{ID}/delete \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/customer/{ID}/delete", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the customer identifier.
This endpoint will delete a customer
HTTP Request
POST https://pubapi.deliverart.it/customer/{ID}/delete
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_category_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
No body response returned
Status code: 200
Errors
Status code: 404
Invalid customer identifier
Status code: 403
You cannot access this customer
Status code: 401
Invalid bearer token
Order / List
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/{ID}/order/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/customer/{ID}/order/list \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/customer/{ID}/order/list", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the customer identifier.
This endpoint will return the customer order list
HTTP Request
GET https://pubapi.deliverart.it/customer/{ID}/order/list
Available user types
manager
manager_2_level
Available auth scopes
customer_orders_read
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Filter Parameters
You can pass this parameter as query string
Parameter | Type | Required | Description |
---|---|---|---|
type | string | false |
Order type. Available values: managed unmanaged take_away |
status | string | false |
Order status. Available values: to_be_defined aborted valid canceled |
preparationStatus | string | false |
Preparation status. Available values: to_prepare in_preparation done |
Success response
{
"items": [
{
"id": "UUID",
"source": "customer",
"code": "A1000",
"externalCode": null,
"amount": 48,
"vatAmount": 4.8,
"netAmount": 43.2,
"type": "managed",
"status": "valid",
"preparationStatus": "done",
"payment": {
"method": "undefined",
"status": "waiting"
},
"times": {
"created": "2020-08-09 17:00:28",
"estimatedPreparationEnd": "2020-08-09 17:38:03"
},
"delivery": {
"id": "ee41495d-839a-4e7b-a0b4-8909713f9314",
"status": "waiting_for_orders",
"delivered": false,
"deliveryTime": {
"estimated": "2021-05-19 16:55:00",
"real": null
}
}
},
{
"id": "UUID",
"source": "deliverart",
"code": "1/2021",
"externalCode": null,
"amount": 41,
"vatAmount": 3.7273,
"netAmount": 37.2727,
"type": "take_away",
"status": "valid",
"preparationStatus": "done",
"takeAwayStatus": "withdrawn",
"payment": {
"method": "cash",
"status": "paid"
},
"times": {
"created": "2021-05-05 00:44:18",
"estimatedPreparationEnd": "2021-05-05 02:58:00"
},
"takeAway": {
"id": "UUID",
"status": "withdrawn",
"withdrawn": true,
"takeAwayTime": "2021-05-05 03:00:00"
}
}
],
"pagination": {
"page": 1,
"totalItems": 1,
"pageSize": 30,
"pageCount": 1
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
items | object | false |
List of the items |
pagination | object | false |
Pagination object |
Item
Parameter | Type | Nullable | Type | Description |
---|---|---|---|---|
id | string | false |
managed take_away unmanaged |
Order identifier. UUID format |
source | string | false |
managed take_away unmanaged |
Source of the order. Example deliverart or customer |
code | string | false |
managed take_away unmanaged |
Code of the order |
externalCode | string | false |
managed take_away unmanaged |
Possible reference for an external order code. Eg: UberEats order number |
amount | float | false |
managed take_away unmanaged |
Total order amount |
vatAmount | float | false |
managed take_away unmanaged |
Only vat amount |
netAmount | float | false |
managed take_away unmanaged |
Amount without vat |
type | string | false |
managed take_away unmanaged |
Order type. Available values: managed unmanaged take_away |
status | string | false |
managed take_away unmanaged |
Order status. Available values: to_be_defined aborted valid canceled |
preparationStatus | string | false |
managed take_away unmanaged |
Preparation status. Available values: to_prepare in_preparation done |
times | object | false |
managed take_away unmanaged |
Object that contains the times information |
payment | object | false |
managed take_away unmanaged |
Object that contains the payment information |
delivery | object | true |
managed |
Object that contains the delivery information. If the order has not passed into a valid status this field will not be filled in |
takeAway | object | true |
take_away |
Object that contains the takeAway information. If the order has not passed into a valid status this field will not be filled in |
Time
Parameter | Type | Nullable | Description |
---|---|---|---|
created | string | false |
Creation time. Format: YYYY-MM-DD HH:mm:ss |
estimatedPreparationEnd | string | false |
Estimated end preparation time. Format: YYYY-MM-DD HH:mm:ss |
Payment
Parameter | Type | Nullable | Description |
---|---|---|---|
method | string | false |
Payment method. Available values: undefined cash credit_card paypal satispay transfer |
status | string | false |
Payment status. Available values: waiting paid canceled refunded |
Delivery
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Delivery order identifier. UUID format |
status | string | false |
Delivery status. Available values are: canceled waiting_for_orders ready_to_take_charge taken_over delivery_started delivery_finished |
delivered | bool | false |
Flag indicating whether the order has been delivered |
deliveryTime | object | false |
An object that contains the Estimated and real time information for the delivery time |
Take away
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Take away identifier. UUID format |
status | string | false |
Take away status. Available values are: waiting_for_preparation waiting_to_be_withdrawn withdrawn not_withdrawn |
withdrawn | bool | false |
Flag indicating whether the order has been withdrawn |
takeAwayTime | string | false |
Take away time. Format: YYYY-MM-DD HH:mm:ss |
Errors
Status code: 404
Invalid customer identifier
Status code: 401
Invalid bearer token
Customer addresses
Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/address/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/customer/address/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/customer/address/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the customer address identifier.
This endpoint will return the customer address detail
HTTP Request
GET https://pubapi.deliverart.it/customer/address/CUSTOMER_ID/detail
Available user types
ALL
Available auth scopes
customer_address_read
customer_read
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"main": false,
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": 3,
"internal": null,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Customer address identifier. UUID format |
main | bool | false |
Flag indicating whether it is the default address |
intercom | string | false |
Intercom |
building | string | true |
Building |
ladder | string | true |
Ladder |
floor | string | true |
Floor |
internal | string | true |
Internal |
address | object | false |
An object that contains the address information |
Errors
Status code: 404
Invalid customer address id
Status code: 401
Invalid bearer token
Create
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/{ID}/address/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => '{ADDRESS_ID}',
'intercom' => 'Mario Rossi',
'building' => null,
'ladder' => null,
'floor' => null,
'internal' => null,
'main' => true,
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/customer/{ID}/address/create \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"address": "{ADDRESS_ID}",
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": null,
"internal": null,
"main": true
}'
fetch("https://pubapi.deliverart.it/customer/{ID}/address/create", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"address": "{ADDRESS_ID}",
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": null,
"internal": null,
"main": true
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the customer identifier.
This call adds a new address to the customer profile.
HTTP Request
POST https://pubapi.deliverart.it/customer/{ID}/address/create
Available user types
ALL
Available auth scopes
customer_address_create
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"address": "{ADDRESS_ID}",
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": null,
"internal": null,
"main": true
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
address | string | true |
isEmpty exists |
Address identifier |
intercom | string | false |
none | Intercom |
building | string | false |
none | Building |
ladder | string | false |
none | Ladder |
floor | string | false |
none | Floor |
internal | string | false |
none | Internal |
main | bool | false |
none | Flag indicating whether it is the default address. Default true |
Success response
{
"id": "CUSTOMER_ADDRESS_ID"
}
Status code: 201
The new customer address identifier
Errors
Status code: 422
Validation fail
Status code: 404
Invalid customer id
Status code: 401
Invalid bearer token
Update
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/address/{ID}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => '{ADDRESS_ID}',
'intercom' => 'Mario Rossi',
'building' => null,
'ladder' => null,
'floor' => null,
'internal' => null
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/customer/address/{ID}/update \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"address": "{ADDRESS_ID}",
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": null,
"internal": null
}'
fetch("https://pubapi.deliverart.it/customer/address/{ID}/update", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"address": "{ADDRESS_ID}",
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": null,
"internal": null
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the customer address identifier.
This call update the customer address.
HTTP Request
POST https://pubapi.deliverart.it/customer/address/{ID}/update
Available user types
ALL
Available auth scopes
customer_address_update
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"address": "{ADDRESS_ID}",
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": null,
"internal": null
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
address | string | true |
isEmpty exists |
Address identifier |
intercom | string | false |
none | Intercom |
building | string | false |
none | Building |
ladder | string | false |
none | Ladder |
floor | string | false |
none | Floor |
internal | string | false |
none | Internal |
Success response
{
"id": "CUSTOMER_ADDRESS_ID"
}
Status code: 200
The customer address identifier
Errors
Status code: 422
Validation fail
Status code: 404
Invalid customer address id
Status code: 401
Invalid bearer token
Set as default
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/address/{ID}/default",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/customer/address/{ID}/default \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/customer/address/{ID}/default", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the customer address identifier.
This call sets the customer address as the default address.
HTTP Request
POST https://pubapi.deliverart.it/customer/address/{ID}/default
Available user types
ALL
Available auth scopes
customer_address_update
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
No body response returned
Status code: 200
Errors
Status code: 404
Invalid customer address id
Status code: 401
Invalid bearer token
Delete
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/address/{ID}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/customer/address/{ID}/delete \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/customer/address/{ID}/delete", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the customer address identifier.
This endpoint will cancel the customer address
HTTP Request
POST https://pubapi.deliverart.it/customer/address/{ID}/delete
Available user types
ALL
Available auth scopes
customer_address_update
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
Status code: 200
No body response returned
Errors
Status code: 404
Invalid customer address id
Status code: 401
Invalid bearer token
Customer business profiles
Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/business-profile/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/customer/business-profile/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/customer/business-profile/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the customer business profile identifier.
This endpoint will return the customer business profile detail
HTTP Request
GET https://pubapi.deliverart.it/customer/business-profile/ID/detail
Available user types
ALL
Available auth scopes
customer_business_profile_read
customer_read
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"businessCountry": "IT",
"businessName": "Mario Rossi SRL",
"vat": "01234567890",
"pec": "mario.rossi@email.com",
"sdi": "xxxxxx",
"fiscalCode": "xxxxxxxxxxxxxxxx",
"main": true,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
}
Status code: 200
Parameter | Type | Nullable | Only for country | Description |
---|---|---|---|---|
id | string | false |
ALL | Allergen identifier. UUID format |
businessCountry | string | false |
ALL | Business profile country. Eg: IT |
businessName | string | false |
ALL | Business name |
vat | int | false |
ALL | VAT |
pec | string | true |
IT |
Certified email address |
fiscalCode | string | false |
IT |
The italian fiscal code fo the customer |
sdi | string | true |
IT |
SDI code for the electronic invoice |
main | bool | false |
ALL | Flag indicating whether the profile is the default company profile |
address | object | false |
ALL | An object that contains the address information |
Errors
Status code: 404
Invalid customer business profile id
Status code: 401
Invalid bearer token
Create
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/{ID}/business-profile/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => '{ADDRESS_ID}',
'businessCountry' => 'IT',
'businessName' => 'Mario Rossi',
'vat' => '01234567890',
'businessInfo' => [
'fiscalCode' => 'xxxxxxxxxxxxxxxx',
'pec' => 'mario.rossi@email.com',
'sdi' => 'xxxxxx'
],
'main' => true,
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url 'https://pubapi.deliverart.it/customer/{ID}/business-profile/create' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"address": "{ADDRESS_ID}",
"businessCountry": "IT",
"businessName": "Mario Rossi",
"vat": "01234567890",
"businessInfo": {
"fiscalCode": "xxxxxxxxxxxxxxxx",
"pec": "mario.rossi@email.com",
"sdi": "xxxxxx"
},
"main": true
}'
fetch("https://pubapi.deliverart.it/customer/{ID}/business-profile/create", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"address": "{ADDRESS_ID}",
"businessCountry": "IT",
"businessName": "Mario Rossi",
"vat": "01234567890",
"businessInfo": {
"fiscalCode": "xxxxxxxxxxxxxxxx",
"pec": "mario.rossi@email.com",
"sdi": "xxxxxx"
},
"main": true
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow, theADDRESS_ID
with the address identifier and theID
with the customer identifier.
This call adds a new business profile to the customer profile.
HTTP Request
POST https://pubapi.deliverart.it/customer/{ID}/business-profile/create
Available user types
ALL
Available auth scopes
customer_business_profile_create
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"address": "{ADDRESS_ID}",
"businessCountry": "IT",
"businessName": "Mario Rossi",
"vat": "01234567890",
"businessInfo": {
"fiscalCode": "xxxxxxxxxxxxxxxx",
"pec": "mario.rossi@email.com",
"sdi": "xxxxxx"
},
"main": true
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
address | string | true |
isEmpty exists |
Address identifier |
businessCountry | string | true |
isEmpty valid |
Country of the business profile. Available values are: IT |
businessName | string | true |
isEmpty |
Business name |
vat | int | true |
isEmpty |
VAT |
businessInfo | object | true |
check object validation | Each business country will have its own object |
main | bool | false |
none | Flag indicating whether it is the default business profile. Default true |
Business info
[IT] Info for the Italy country
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
fiscalCode | string | true |
isEmpty |
Fiscal code. It can also have the value of the VAT number |
pec | string | false |
email |
PEC email address. It may be necessary in case of electronic invoicing |
sdi | string | false |
NONE | SDI code. It may be necessary in case of electronic invoicing |
Success response
{
"id": "CUSTOMER_BUSINESS_PROFILE_ID"
}
Status code: 201
The new customer address identifier
Errors
Status code: 422
Validation fail
Status code: 404
Invalid customer id
Status code: 401
Invalid bearer token
Update
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/business-profile/{ID}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => '{ADDRESS_ID}',
'businessCountry' => 'IT',
'businessName' => 'Mario Rossi',
'vat' => '01234567890',
'businessInfo' => [
'fiscalCode' => 'xxxxxxxxxxxxxxxx',
'pec' => 'mario.rossi@email.com',
'sdi' => 'xxxxxx'
],
'main' => true,
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/customer/business-profile/{ID}/update \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"address": "{ADDRESS_ID}",
"businessCountry": "IT",
"businessName": "Mario Rossi",
"vat": "01234567890",
"businessInfo": {
"fiscalCode": "xxxxxxxxxxxxxxxx",
"pec": "mario.rossi@email.com",
"sdi": "xxxxxx"
},
"main": true
}'
fetch("https://pubapi.deliverart.it/customer/business-profile/{ID}/update", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"address": "{ADDRESS_ID}",
"businessCountry": "IT",
"businessName": "Mario Rossi",
"vat": "01234567890",
"businessInfo": {
"fiscalCode": "xxxxxxxxxxxxxxxx",
"pec": "mario.rossi@email.com",
"sdi": "xxxxxx"
},
"main": true
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow, theADDRESS_ID
with the address identifier and theID
with the business profile identifier.
This call update the customer business profile.
HTTP Request
POST https://pubapi.deliverart.it/customer/business-profile/{ID}/update
Available user types
ALL
Available auth scopes
customer_business_profile_update
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"address": "{ADDRESS_ID}",
"businessCountry": "IT",
"businessName": "Mario Rossi",
"vat": "01234567890",
"businessInfo": {
"fiscalCode": "xxxxxxxxxxxxxxxx",
"pec": "mario.rossi@email.com",
"sdi": "xxxxxx"
},
"main": true
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
address | string | true |
isEmpty exists |
Address identifier |
businessCountry | string | true |
isEmpty valid |
Country of the business profile. Available values are: IT |
businessName | string | true |
isEmpty |
Business name |
vat | int | true |
isEmpty |
VAT |
businessInfo | object | true |
check object validation | Each business country will have its own object |
main | bool | false |
none | Flag indicating whether it is the default business profile. Default true |
Business info
[IT] Info for the Italy country
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
fiscalCode | string | true |
isEmpty |
Fiscal code. It can also have the value of the VAT number |
pec | string | false |
email |
PEC email address. It may be necessary in case of electronic invoicing |
sdi | string | false |
NONE | SDI code. It may be necessary in case of electronic invoicing |
Success response
{
"id": "CUSTOMER_BUSINESS_PROFILE_ID"
}
Status code: 200
The customer business profile identifier
Errors
Status code: 422
Validation fail
Status code: 404
Invalid customer business profile id
Status code: 401
Invalid bearer token
Set as default
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/business-profile/{ID}/default",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/customer/business-profile/{ID}/default \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/customer/business-profile/{ID}/default", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the business profile identifier.
This call sets the customer business profile as the default profile.
HTTP Request
POST https://pubapi.deliverart.it/customer/business-profile/{ID}/default
Available user types
ALL
Available auth scopes
customer_business_profile_update
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
No body response returned
Status code: 200
Errors
Status code: 404
Invalid customer business profile id
Status code: 401
Invalid bearer token
Delete
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/customer/business-profile/{ID}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/customer/business-profile/{ID}/delete \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/customer/business-profile/{ID}/delete", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the business profile identifier.
This endpoint will cancel the customer business profile
HTTP Request
POST https://pubapi.deliverart.it/customer/business-profile/{ID}/delete
Available user types
ALL
Available auth scopes
customer_business_profile_update
customer_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
Status code: 200
No body response returned
Errors
Status code: 404
Invalid customer business profile id
Status code: 401
Invalid bearer token
Menu
Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/menu/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the menu identifier.
This endpoint will return the menu detail
HTTP Request
GET https://pubapi.deliverart.it/menu/{ID}/detail
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"name": "MENU NAME",
"default": true,
"acl": [
"manageMenu",
"usableMenu"
],
"categories": [
{
"id": "UUID",
"sorting": 0,
"name": "CATEGORY NAME",
"description": "CATEGORY DESCRIPTION",
"meta": {
"media": "MEDIA_RELATIVE_PATH"
}
},
{
"id": "UUID",
"sorting": 1,
"name": "CATEGORY NAME",
"description": "CATEGORY DESCRIPTION",
"meta": []
},
...
],
"allergens": [
{
"id": "UUID",
"name": "CATEGORY NAME",
"meta": []
},
...
],
"ingredients": [
{
"id": "UUID",
"name": "INGREDIENT NAME",
"allergens": [
"UUID"
],
"meta": []
},
{
"id": "UUID",
"name": "INGREDIENT NAME",
"allergens": [],
"meta": []
},
...
],
"items": [
{
"id": "UUID",
"name": "PRODUCT NAME",
"description": "PRODUCT DESCRIPTION",
"price": 7,
"vatAmount": 0.6364,
"netPrice": 6.3636,
"vat": 10,
"category": "UUID",
"suspended": false,
"editable": true,
"deletable": true,
"acl": [
"deleteMenuItem",
"manageMenuItem",
"manageMenuItemI18n",
"manageMenuItemComposition"
],
"meta": [],
"compositions": [
{
"type": "basic",
"priceImpact": 0,
"vatAmount": 0,
"netPriceImpact": 0,
"ingredient": "UUID",
"rule": null
},
{
"type": "variant",
"priceImpact": 2,
"vatAmount": 0.1818,
"netPriceImpact": 1.8182,
"ingredient": "UUID",
"rule": "UUID"
},
...
],
"rules": [
{
"id": "UUID",
"minItemCount": 1,
"maxItemCount": 3,
"name": "Choose the seasoning",
"description": null
}
]
},
{
"id": "UUID",
"name": "PRODUCT NAME",
"description": null,
"price": 6,
"vatAmount": 0.5455,
"netPrice": 5.4545,
"vat": 10,
"category": "UUID",
"suspended": true,
"editable": true,
"deletable": true,
"acl": [
"deleteMenuItem",
"manageMenuItem",
"manageMenuItemI18n",
"manageMenuItemComposition"
],
"meta": [],
"compositions": []
},
...
]
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Menu identifier. UUID format |
name | string | false |
Menu name |
default | bool | false |
Flag indicating whether the menu is default or not |
acl | array | false |
List of available ACL. Available values are: manageMenu usableMenu |
categories | array | false |
An array object that contains a list of category objects |
allergens | array | false |
An array object that contains a list of allergen objects |
ingredients | array | false |
An array object that contains a list of ingredient objects |
items | array | false |
An array object that contains a list of item objects |
Allergen
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Allergen identifier. UUID format |
name | string | false |
Allergen name |
meta | array or object | false |
Additional metadata |
Ingredient
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Ingredient identifier. UUID format |
name | string | false |
Ingredient name |
allergens | array | false |
An array the contains the allergen identifiers. Array of UUID |
meta | array or object | false |
Additional metadata |
Item
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Item identifier. UUID format |
name | string | false |
Item name |
description | string | true |
Item description |
price | float | false |
Item price |
vatAmount | float | false |
Vat amount |
netPrice | float | false |
Price excluding taxes |
vat | int | false |
Vat percentage |
category | string | false |
Category reference identifier. UUID format |
suspended | bool | false |
flag to indicate if a product is suspended or is available |
editable | bool | false |
flag to indicate if a product is editable |
deletable | bool | false |
flag to indicate if a product is deletable |
meta | array or object | false |
Additional metadata |
acl | array | false |
List of available ACL. Available values are: deleteMenuItem manageMenuItem manageMenuItemI18n manageMenuItemComposition |
compositions | array | false |
An array object that contains a list of item composition objects. Can be empty |
rules | array | false |
An array object that contains a list of rule objects. Can be empty |
Item - Composition
Parameter | Type | Nullable | Description |
---|---|---|---|
type | string | false |
Type of the composition. Available values: basic variant |
priceImpact | float | false |
Impact on item price |
vatAmount | float | false |
Vat amount |
netPriceImpact | float | false |
Impact on item price excluding taxes |
ingredient | string | false |
Ingredient reference identifier. UUID format |
Item - Rule
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Rule identifier. UUID format |
minItemCount | int | false |
Minimum number of products to select. Minimum allowed value 0 |
maxItemCount | int | true |
Maximum number of products to select. If empty, no limit. If the minimum allowed value is entered, it must be greater than or equal to minItemCount |
name | string | false |
Rule name |
description | string | true |
Rule description |
Errors
Status code: 404
Invalid menu id
Status code: 401
Invalid bearer token
Create
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pointOfSale' => 'UUID',
'name' => 'Menu name',
'default' => true,
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/create \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"pointOfSale": "UUID",
"name": "Menu name",
"default": true
}'
fetch("https://pubapi.deliverart.it/menu/create", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"pointOfSale": "UUID",
"name": "Menu name",
"default": true
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This call will create an empty menu
HTTP Request
POST https://pubapi.deliverart.it/menu/create
Available user types
manager
manager_2_level
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"pointOfSale": "UUID",
"name": "Menu name",
"default": true
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
pointOfSale | string | true |
isEmpty inactiveCompany companyProfileIncomplete noManager |
Point of sale identifier |
name | string | true |
isEmpty |
Name of the menu |
default | string | false |
Flag to set the menu as default menu |
Success response
{
"id": "UUID"
}
Status code: 201
Return the identifier of the new menu
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Update
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/{ID}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Menu name',
'default' => true,
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/{ID}/update \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"name": "Menu name",
"default": true
}'
fetch("https://pubapi.deliverart.it/menu/{ID}/update", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"name": "Menu name",
"default": true
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the menu identifier.
This call will update the menu info
HTTP Request
POST https://pubapi.deliverart.it/menu/{ID}/update
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"name": "Menu name",
"default": true
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
name | string | true |
isEmpty |
Name of the menu |
default | string | false |
Flag to set the menu as default menu |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 404
Invalid menu identifier
Status code: 403
You cannot access this menu
Status code: 401
Invalid bearer token
Categories
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/categories",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/menu/categories \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/categories", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint will return the categories
HTTP Request
GET https://pubapi.deliverart.it/menu/categories
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Query Parameters
Parameter | Type | Description |
---|---|---|
includePointOfSale | string | Identifier of point of sale. If set, it will return all global categories and custom categories |
page | int | Page number for the pagination flow |
Success response
{
"items": [
{
"id": "362dd0e7-d3e9-49a3-b0fa-8f1fccb23b0e",
"name": "Extra",
"sorting": 0,
"acl": [
"readMenuItemCategory",
"selectableMenuItemCategory"
]
},
...
],
"pagination": {
"page": 1,
"totalItems": 46,
"pageSize": 30,
"pageCount": 2
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
items | array | false |
An array object that contains a list of category objects |
pagination | object | false |
Pagination object |
Category
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Category identifier. UUID format |
sorting | int | false |
Sorting of the category. Useful for building a menu list |
name | string | false |
Category name |
acl | array | false |
List of available ACL. Available values are: readMenuItemCategory selectableMenuItemCategory manageMenuItemCategory |
Errors
Status code: 409
Invalid page provided
Status code: 401
Invalid bearer token
Categories / Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/category/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/menu/category/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/category/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the category identifier.
This endpoint will return the category detail
HTTP Request
GET https://pubapi.deliverart.it/menu/category/{ID}/detail
Available user types
ALL
Available auth scopes
menu_admin
menu_item_category_admin
menu_read
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"name": "Antipasti",
"sorting": 0,
"acl": [
"readMenuItemCategory",
"selectableMenuItemCategory"
],
"code": "appetizers",
"global": false,
"editable": true,
"selectable": true,
"meta": [],
"translations": [
{
"id": "UUID",
"locale": "en_GB",
"text": "Appetizers",
"description": "Appetizers description"
},
{
"id": "UUID",
"locale": "it_IT",
"text": "Antipasti",
"description": "Descrizione antipasti"
}
],
"posId": "UUID",
"companyId": "UUID"
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Category identifier. UUID format |
sorting | int | false |
Sorting of the category. Useful for building a menu list |
name | string | false |
Category name |
acl | array | false |
List of available ACL. Available values are: readMenuItemCategory selectableMenuItemCategory manageMenuItemCategory |
code | string | false |
Unique category code |
global | bool | false |
Indicates whether the category is global or custom for the point of sale |
editable | bool | false |
Indicates whether the category is editable |
selectable | bool | false |
Indicates whether the category is selectable when creating the menu item |
meta | array or object | false |
Additional metadata |
translations | array | false |
An array object that contains a list of translation objects |
posId | string | true |
Point of sale identifier. Only if the category is custom |
companyId | string | true |
Company identifier. Only if the category is custom |
Translation
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Translation identifier. UUID format |
locale | string | false |
The translation locale. For example: it_IT |
text | string | false |
Text of the translation |
description | string | true |
Description of the translation |
Errors
Status code: 404
Invalid category identifier
Status code: 401
Invalid bearer token
Categories / Create
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/category/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pointOfSale' => 'UUID',
'code' => 'appetizers',
'sorting' => 0,
'translations' => [
[
"locale" => "it_IT",
"text" => "Antipasti",
"description" => "Description antipasti"
],
],
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/category/create \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"pointOfSale": "UUID",
"code": "appetizers",
"sorting": 0,
"translations": [
{
"locale": "it_IT",
"text": "Antipasti",
"description": "Description antipasti"
}
]
}'
fetch("https://pubapi.deliverart.it/menu/category/create", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"pointOfSale": "UUID",
"code": "appetizers",
"sorting": 0,
"translations": [
{
"locale": "it_IT",
"text": "Antipasti",
"description": "Description antipasti"
}
]
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This call creates a new category
HTTP Request
POST https://pubapi.deliverart.it/menu/category/create
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"pointOfSale": "UUID",
"code": "appetizers",
"sorting": 0,
"translations": [
{
"locale": "it_IT",
"text": "Antipasti",
"description": "Description antipasti"
}
]
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
pointOfSale | string | true |
isEmpty inactiveCompany companyProfileIncomplete noManager |
Point of sale identifier |
code | string | true |
isEmpty regexInvalid regexNotMatch callbackValue |
Unique code for the category. Example: if the category is Main courses of meat the code will be main-courses-of-meat |
sorting | int | false |
intInvalid tooLowValue |
Category position within the menu |
translations | array | false |
An array object that contains a list of translation objects |
Translation
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
locale | string | true |
isEmpty notInArray |
The translation locale. For example: it_IT |
text | string | true |
isEmpty |
Text of the translation |
description | string | false |
Description of the translation |
Success response
{
"id": "UUID"
}
Status code: 201
Return the identifier of the new category
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Categories / Update
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/category/{ID}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sorting' => 0,
'media' => '{BASE64_ENCODED_FILE}',
'translations' => [
[
"locale" => "it_IT",
"text" => "Antipasti",
"description" => "Antipasti description",
],
],
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/category/{ID}/update \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"sorting": 0,
"media": "{BASE64_ENCODED_FILE}",
"translations": [
{
"locale": "it_IT",
"text": "Antipasti",
"description": "Antipasti description"
}
]
}'
fetch("https://pubapi.deliverart.it/menu/category/{ID}/update", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"sorting": 0,
"media": "{BASE64_ENCODED_FILE}",
"translations": [
{
"locale": "it_IT",
"text": "Antipasti",
"description": "Antipasti description"
}
]
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace ACCESS_TOKEN with the token obtained from the authentication flow and the ID with the category identifier.
This call updates a category
HTTP Request
POST https://pubapi.deliverart.it/menu/category/{ID}/update
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_category_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"sorting": 0,
"media": "{BASE64_ENCODED_FILE}",
"translations": [
{
"locale": "it_IT",
"text": "Antipasti",
"description": "Antipasti description"
}
]
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
sorting | int | false |
intInvalid tooLowValue |
Category position within the menu |
media | string | false |
streamMimeType streamImageSize streamFileSize |
base64 encoded file |
translations | array | false |
An array object that contains a list of translation objects |
Translation
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
locale | string | true |
isEmpty notInArray |
The translation locale. For example: it_IT |
text | string | true |
isEmpty |
Text of the translation |
description | string | false |
Description of the translation |
Success response
Status code: 200
No body response returned
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Categories / Update metadata
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/category/{ID}/update/meta",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'meta' => [
'key' => 'value'
]
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/category/{ID}/update/meta \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"meta": {
"key": "value"
}
}'
fetch("https://pubapi.deliverart.it/menu/category/{ID}/update/meta", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"meta": {
"key": "value"
}
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the menu item identifier.
This call update the metadata of an existing category
HTTP Request
POST https://pubapi.deliverart.it/menu/allergen/{ID}/category/meta
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_category_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"meta": {
"key": "value"
}
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
meta | object | true |
isEmpty |
Metadata object |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 404
Invalid menu item category identifier
Status code: 403
You cannot access this menu item category
Status code: 401
Invalid bearer token
Categories / Delete
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/category/{ID}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/category/{ID}/delete \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/category/{ID}/delete", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the category identifier.
This endpoint will delete a category
HTTP Request
POST https://pubapi.deliverart.it/menu/category/{ID}/delete
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_category_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
No body response returned
Status code: 200
Errors
Status code: 404
Invalid category identifier
Status code: 403
You cannot access this category
Status code: 401
Invalid bearer token
Categories / Translate
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/category/{ID}/translate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"locale" => "it_IT",
"text" => "Antipasti",
"description" => "Descrizione antipasti"
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/category/{ID}/translate \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"locale": "it_IT",
"text": "Antipasti",
"description": "Descrizione antipasti"
}'
fetch("https://pubapi.deliverart.it/menu/category/{ID}/translate", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"locale": "it_IT",
"text": "Antipasti",
"description": "Descrizione antipasti"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the category identifier.
This call translates a category
HTTP Request
POST https://pubapi.deliverart.it/menu/category/{ID}/translate
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_category_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"locale": "it_IT",
"text": "Antipasti",
"description": "Descrizione antipasti"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
locale | string | true |
isEmpty notInArray |
The translation locale. For example: it_IT |
text | string | true |
isEmpty |
Text of the translation |
description | string | false |
Description of the translation |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 404
Invalid category identifier
Status code: 403
You cannot access this category
Status code: 401
Invalid bearer token
Categories / Sort
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/category/{ID}/sort",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"sorting" => 1,
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/category/{ID}/sort \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"sorting": 1
}'
fetch("https://pubapi.deliverart.it/menu/category/{ID}/sort", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"sorting": 1
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the category identifier.
This call sorts a category
HTTP Request
POST https://pubapi.deliverart.it/menu/category/{ID}/sort
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_category_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"sorting": 1
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
sorting | int | false |
isInt min |
Sorting of the category. Useful for building a menu list |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 404
Invalid category identifier
Status code: 403
You cannot access this category
Status code: 401
Invalid bearer token
Categories / Media / Upload
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/category/{ID}/media/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"media" => "{BASE64_ENCODED_FILE}",
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/category/{ID}/media/upload \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"media": "{BASE64_ENCODED_FILE}"
}'
fetch("https://pubapi.deliverart.it/menu/category/{ID}/media/upload", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"media": "{BASE64_ENCODED_FILE}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow, theID
with the category identifier and the{BASE64_ENCODED_FILE}
with base64 encoded file.
This call sets the reference image for the category. This api adds a metadata value called media
in the category meta field
HTTP Request
POST https://pubapi.deliverart.it/menu/category/{ID}/media/upload
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_category_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"media": "{BASE64_ENCODED_FILE}"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
media | string | true |
notEmpty streamMimeType streamImageSize streamFileSize |
base64 encoded file |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 404
Invalid category identifier
Status code: 403
You cannot access this category
Status code: 401
Invalid bearer token
Categories / Media / Remove
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/category/{ID}/media/remove",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/category/{ID}/media/remove \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/menu/category/{ID}/media/remove", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow, theID
with the category identifier and the{BASE64_ENCODED_FILE}
with base64 encoded file.
This call remove the reference image from the category. This api remove the media
metadata value from the category meta field
HTTP Request
POST https://pubapi.deliverart.it/menu/category/{ID}/media/remove
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_category_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
No body parameters
Success response
No body response returned
Status code: 200
Errors
Status code: 404
Invalid category identifier
Status code: 403
You cannot access this category
Status code: 401
Invalid bearer token
Allergens
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/allergens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/menu/allergens \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/allergens", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint will return the allergens
HTTP Request
GET https://pubapi.deliverart.it/menu/allergens
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Query Parameters
Parameter | Type | Description |
---|---|---|
includePointOfSale | string | Identifier of point of sale. If set, it will return all global allergens and custom allergens |
page | int | Page number for the pagination flow |
Success response
{
"items": [
{
"id": "362dd0e7-d3e9-49a3-b0fa-8f1fccb23b0e",
"name": "Peanuts and derivatives",
"acl": [
"readMenuItemAllergen",
"selectableMenuItemAllergen"
]
},
...
],
"pagination": {
"page": 1,
"totalItems": 46,
"pageSize": 30,
"pageCount": 2
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
items | array | false |
An array object that contains a list of allergen objects |
pagination | object | false |
Pagination object |
Allergen
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Allergen identifier. UUID format |
name | string | false |
Allergen name |
acl | array | false |
List of available ACL. Available values are: readMenuItemAllergen selectableMenuItemAllergen manageMenuItemAllergen |
Errors
Status code: 409
Invalid page provided
Status code: 401
Invalid bearer token
Allergens / Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/allergen/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/menu/allergen/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/allergen/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the allergen identifier.
This endpoint will return the allergen detail
HTTP Request
GET https://pubapi.deliverart.it/menu/allergen/{ID}/detail
Available user types
ALL
Available auth scopes
menu_admin
menu_item_allergen_admin
menu_read
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"name": "Peanuts and derivatives",
"acl": [
"readMenuItemAllergen",
"selectableMenuItemAllergen"
],
"code": "peanuts-and-derivatives",
"global": false,
"editable": true,
"selectable": true,
"meta": [],
"translations": [
{
"id": "UUID",
"locale": "en_GB",
"text": "Peanuts and derivatives"
},
{
"id": "UUID",
"locale": "it_IT",
"text": "Arachidi e derivati"
}
],
"posId": "UUID",
"companyId": "UUID"
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Allergen identifier. UUID format |
name | string | false |
Allergen name |
acl | array | false |
List of available ACL. Available values are: readMenuItemAllergen selectableMenuItemAllergen manageMenuItemAllergen |
code | string | false |
Unique allergen code |
global | bool | false |
Indicates whether the allergen is global or custom for the point of sale |
editable | bool | false |
Indicates whether the allergen is editable |
selectable | bool | false |
Indicates whether the allergen is selectable when creating the menu item |
meta | array or object | false |
Additional metadata |
translations | array | false |
An array object that contains a list of translation objects |
posId | string | true |
Point of sale identifier. Only if the allergen is custom |
companyId | string | true |
Company identifier. Only if the allergen is custom |
Translation
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Translation identifier. UUID format |
locale | string | false |
The translation locale. For example: it_IT |
text | string | false |
Text of the translation |
Errors
Status code: 404
Invalid allergen identifier
Status code: 403
You cannot access this allergen
Status code: 401
Invalid bearer token
Allergens / Create
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/allergen/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pointOfSale' => 'UUID',
'code' => 'peanuts-and-derivatives',
'translations' => [
[
"locale" => "it_IT",
"text" => "Arachidi e derivati",
],
],
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/allergen/create \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"pointOfSale": "UUID",
"code": "peanuts-and-derivatives",
"translations": [
{
"locale": "it_IT",
"text": "Arachidi e derivati"
}
]
}'
fetch("https://pubapi.deliverart.it/menu/allergen/create", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"pointOfSale": "UUID",
"code": "peanuts-and-derivatives",
"translations": [
{
"locale": "it_IT",
"text": "Arachidi e derivati"
}
]
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This call creates a new allergen
HTTP Request
POST https://pubapi.deliverart.it/menu/allergen/create
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"pointOfSale": "UUID",
"code": "peanuts-and-derivatives",
"translations": [
{
"locale": "it_IT",
"text": "Arachidi e derivati"
}
]
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
pointOfSale | string | true |
isEmpty inactiveCompany companyProfileIncomplete noManager |
Point of sale identifier |
code | string | true |
isEmpty regexInvalid regexNotMatch callbackValue |
Unique code for the allergen. Example: if the allergen is Main courses of meat the code will be main-courses-of-meat |
translations | array | false |
An array object that contains a list of translation objects |
Translation
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
locale | string | true |
isEmpty notInArray |
The translation locale. For example: it_IT |
text | string | true |
isEmpty |
Text of the translation |
Success response
{
"id": "UUID"
}
Status code: 201
Return the identifier of the new allergen
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Allergens / Update
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/allergen/{ID}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'translations' => [
[
"locale" => "it_IT",
"text" => "Arachidi e derivati",
],
],
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/allergen/{ID}/update \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"translations": [
{
"locale": "it_IT",
"text": "Arachidi e derivati"
}
]
}'
fetch("https://pubapi.deliverart.it/menu/allergen/{ID}/update", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"translations": [
{
"locale": "it_IT",
"text": "Arachidi e derivati"
}
]
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the allergen identifier.
This call updates an allergen
HTTP Request
POST https://pubapi.deliverart.it/menu/allergen/{ID}/update
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_allergen_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"translations": [
{
"locale": "it_IT",
"text": "Arachidi e derivati"
}
]
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
translations | array | false |
An array object that contains a list of translation objects |
Translation
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
locale | string | true |
isEmpty notInArray |
The translation locale. For example: it_IT |
text | string | true |
isEmpty |
Text of the translation |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Allergens / Update metadata
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/allergen/{ID}/update/meta",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'meta' => [
'key' => 'value'
]
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/allergen/{ID}/update/meta \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"meta": {
"key": "value"
}
}'
fetch("https://pubapi.deliverart.it/menu/allergen/{ID}/update/meta", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"meta": {
"key": "value"
}
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the menu item identifier.
This call update the metadata of an existing allergen
HTTP Request
POST https://pubapi.deliverart.it/menu/allergen/{ID}/update/meta
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_allergen_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"meta": {
"key": "value"
}
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
meta | object | true |
isEmpty |
Metadata object |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 404
Invalid menu item allergen identifier
Status code: 403
You cannot access this menu item allergen
Status code: 401
Invalid bearer token
Allergens / Delete
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/allergen/{ID}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/allergen/{ID}/delete \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/allergen/{ID}/delete", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the allergen identifier.
This endpoint will delete a allergen
HTTP Request
POST https://pubapi.deliverart.it/menu/allergen/{ID}/delete
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_allergen_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
No body response returned
Status code: 200
Errors
Status code: 404
Invalid allergen identifier
Status code: 403
You cannot access this allergen
Status code: 401
Invalid bearer token
Allergens / Translate
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/allergen/{ID}/translate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"locale" => "it_IT",
"text" => "Antipasti",
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/allergen/{ID}/translate \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"locale": "it_IT",
"text": "Antipasti"
}'
fetch("https://pubapi.deliverart.it/menu/allergen/{ID}/translate", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"locale": "it_IT",
"text": "Antipasti"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the allergen identifier.
This call translates a allergen
HTTP Request
POST https://pubapi.deliverart.it/menu/allergen/{ID}/translate
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_allergen_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"locale": "it_IT",
"text": "Antipasti"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
locale | string | true |
isEmpty notInArray |
The translation locale. For example: it_IT |
text | string | true |
isEmpty |
Text of the translation |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 404
Invalid allergen identifier
Status code: 403
You cannot access this allergen
Status code: 401
Invalid bearer token
Ingredients
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/ingredients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/menu/ingredients \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/ingredients", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This endpoint will return the ingredients
HTTP Request
GET https://pubapi.deliverart.it/menu/ingredients
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Query Parameters
Parameter | Type | Description |
---|---|---|
includePointOfSale | string | Identifier of point of sale. If set, it will return all global ingredients and custom ingredients |
page | int | Page number for the pagination flow |
Success response
{
"items": [
{
"id": "362dd0e7-d3e9-49a3-b0fa-8f1fccb23b0e",
"name": "Tomato",
"acl": [
"readMenuItemIngredient",
"selectableMenuItemIngredient"
]
},
...
],
"pagination": {
"page": 1,
"totalItems": 46,
"pageSize": 30,
"pageCount": 2
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
items | array | false |
An array object that contains a list of ingredient objects |
pagination | object | false |
Pagination object |
Ingredient
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Ingredient identifier. UUID format |
name | string | false |
Ingredient name |
acl | array | false |
List of available ACL. Available values are: readMenuItemIngredient selectableMenuItemIngredient manageMenuItemIngredient |
Errors
Status code: 409
Invalid page provided
Status code: 401
Invalid bearer token
Ingredients / Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/ingredient/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/menu/ingredient/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/ingredient/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the ingredient identifier.
This endpoint will return the ingredient detail
HTTP Request
GET https://pubapi.deliverart.it/menu/ingredient/{ID}/detail
Available user types
ALL
Available auth scopes
menu_admin
menu_item_ingredient_admin
menu_read
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"name": "Tomato",
"acl": [
"readMenuItemIngredient",
"selectableMenuItemIngredient"
],
"code": "tomato",
"global": false,
"editable": true,
"selectable": true,
"meta": [],
"translations": [
{
"id": "UUID",
"locale": "en_GB",
"text": "Tomato"
},
{
"id": "UUID",
"locale": "it_IT",
"text": "Pomodoro"
}
],
"posId": "UUID",
"companyId": "UUID"
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Ingredient identifier. UUID format |
name | string | false |
Ingredient name |
acl | array | false |
List of available ACL. Available values are: readMenuItemIngredient selectableMenuItemIngredient manageMenuItemIngredient |
code | string | false |
Unique ingredient code |
global | bool | false |
Indicates whether the ingredient is global or custom for the point of sale |
editable | bool | false |
Indicates whether the ingredient is editable |
selectable | bool | false |
Indicates whether the ingredient is selectable when creating the menu item |
meta | array or object | false |
Additional metadata |
translations | array | false |
An array object that contains a list of translation objects |
posId | string | true |
Point of sale identifier. Only if the ingredient is custom |
companyId | string | true |
Company identifier. Only if the ingredient is custom |
Translation
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Translation identifier. UUID format |
locale | string | false |
The translation locale. For example: it_IT |
text | string | false |
Text of the translation |
Errors
Status code: 404
Invalid ingredient identifier
Status code: 403
You cannot access this ingredient
Status code: 401
Invalid bearer token
Ingredients / Create
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/ingredient/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pointOfSale' => 'UUID',
'code' => 'tomato',
'allergens' => [
'{ALLERGEN1_UUID}',
'{ALLERGEN2_UUID}',
],
'translations' => [
[
"locale" => "it_IT",
"text" => "Pomodoro",
],
],
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/ingredient/create \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"pointOfSale": "UUID",
"code": "tomato",
"allergens": [
"{ALLERGEN1_UUID}",
"{ALLERGEN2_UUID}"
],
"translations": [
{
"locale": "it_IT",
"text": "Pomodoro"
}
]
}'
fetch("https://pubapi.deliverart.it/menu/ingredient/create", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"pointOfSale": "UUID",
"code": "tomato",
"allergens": [
"{ALLERGEN1_UUID}",
"{ALLERGEN2_UUID}"
],
"translations": [
{
"locale": "it_IT",
"text": "Pomodoro"
}
]
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This call creates a new ingredient
HTTP Request
POST https://pubapi.deliverart.it/menu/ingredient/create
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"pointOfSale": "UUID",
"code": "tomato",
"allergens": [
"{ALLERGEN1_UUID}",
"{ALLERGEN2_UUID}"
],
"translations": [
{
"locale": "it_IT",
"text": "Pomodoro"
}
]
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
pointOfSale | string | true |
isEmpty inactiveCompany companyProfileIncomplete noManager |
Point of sale identifier |
code | string | true |
isEmpty regexInvalid regexNotMatch callbackValue |
Unique code for the ingredient. Example: if the ingredient is Main courses of meat the code will be main-courses-of-meat |
allergens | array | false |
notArray invalid unauthorized |
List of identifiers of the allergens present in this ingredient |
translations | array | false |
An array object that contains a list of translation objects |
Translation
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
locale | string | true |
isEmpty notInArray |
The translation locale. For example: it_IT |
text | string | true |
isEmpty |
Text of the translation |
Success response
{
"id": "UUID"
}
Status code: 201
Return the identifier of the new ingredient
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Ingredients / Update
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/ingredient/{ID}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'allergens' => [
'{ALLERGEN1_UUID}',
'{ALLERGEN2_UUID}',
],
'translations' => [
[
"locale" => "it_IT",
"text" => "Pomodoro",
],
],
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/ingredient/{ID}/update \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"allergens": [
"{ALLERGEN1_UUID}",
"{ALLERGEN2_UUID}"
],
"translations": [
{
"locale": "it_IT",
"text": "Pomodoro"
}
]
}'
fetch("https://pubapi.deliverart.it/menu/ingredient/{ID}/update", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"allergens": [
"{ALLERGEN1_UUID}",
"{ALLERGEN2_UUID}"
],
"translations": [
{
"locale": "it_IT",
"text": "Pomodoro"
}
]
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the ingredient identifier.
This call updates an ingredient
HTTP Request
POST https://pubapi.deliverart.it/menu/ingredient/{ID}/update
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_ingredient_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"allergens": [
"{ALLERGEN1_UUID}",
"{ALLERGEN2_UUID}"
],
"translations": [
{
"locale": "it_IT",
"text": "Pomodoro"
}
]
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
allergens | array | false |
notArray invalid unauthorized |
List of identifiers of the allergens present in this ingredient |
translations | array | false |
An array object that contains a list of translation objects |
Translation
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
locale | string | true |
isEmpty notInArray |
The translation locale. For example: it_IT |
text | string | true |
isEmpty |
Text of the translation |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Ingredients / Update metadata
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/ingredient/{ID}/update/meta",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'meta' => [
'key' => 'value'
]
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/ingredient/{ID}/update/meta \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"meta": {
"key": "value"
}
}'
fetch("https://pubapi.deliverart.it/menu/ingredient/{ID}/update/meta", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"meta": {
"key": "value"
}
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the menu item identifier.
This call update the metadata of an existing ingredient
HTTP Request
POST https://pubapi.deliverart.it/menu/ingredient/{ID}/update/meta
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_ingredient_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"meta": {
"key": "value"
}
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
meta | object | true |
isEmpty |
Metadata object |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 404
Invalid menu item ingredient identifier
Status code: 403
You cannot access this menu item ingredient
Status code: 401
Invalid bearer token
Ingredients / Delete
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/ingredient/{ID}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/ingredient/{ID}/delete \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/ingredient/{ID}/delete", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the ingredient identifier.
This endpoint will delete a ingredient
HTTP Request
POST https://pubapi.deliverart.it/menu/ingredient/{ID}/delete
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_ingredient_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
No body response returned
Status code: 200
Errors
Status code: 404
Invalid ingredient identifier
Status code: 403
You cannot access this ingredient
Status code: 401
Invalid bearer token
Ingredients / Translate
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/ingredient/{ID}/translate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"locale" => "it_IT",
"text" => "Antipasti",
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/ingredient/{ID}/translate \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"locale": "it_IT",
"text": "Antipasti"
}'
fetch("https://pubapi.deliverart.it/menu/ingredient/{ID}/translate", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"locale": "it_IT",
"text": "Antipasti"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the ingredient identifier.
This call translates an ingredient
HTTP Request
POST https://pubapi.deliverart.it/menu/ingredient/{ID}/translate
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_ingredient_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"locale": "it_IT",
"text": "Pomodoro"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
locale | string | true |
isEmpty notInArray |
The translation locale. For example: it_IT |
text | string | true |
isEmpty |
Text of the translation |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 404
Invalid ingredient identifier
Status code: 403
You cannot access this ingredient
Status code: 401
Invalid bearer token
Items / Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/item/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/menu/item/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/item/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the menu item identifier.
This endpoint will return the menu item detail
HTTP Request
GET https://pubapi.deliverart.it/menu/item/{ID}/detail
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"name": "PRODUCT NAME",
"description": "PRODUCT DESCRIPTION",
"price": 7,
"vatAmount": 0.6364,
"netPrice": 6.3636,
"suspended": false,
"editable": true,
"deletable": true,
"acl": [
"deleteMenuItem",
"manageMenuItem",
"manageMenuItemI18n",
"manageMenuItemComposition"
],
"vat": 10,
"category": {
"id": "UUID",
"sorting": 0,
"name": "Category name"
},
"compositions": [
{
"type": "basic",
"priceImpact": 0,
"vatAmount": 0,
"netPriceImpact": 0,
"rule": null,
"ingredient": {
"id": "UUID",
"name": "Category name",
"allergens": [
{
"id": "UUID",
"name": "Category name"
},
...
]
}
},
{
"type": "variant",
"priceImpact": 2,
"vatAmount": 0.1818,
"netPriceImpact": 1.8182,
"rule": null,
"ingredient": {
"id": "UUID",
"name": "Category name",
"allergens": []
}
},
{
"type": "variant",
"priceImpact": 2,
"vatAmount": 0.1818,
"netPriceImpact": 1.8182,
"rule": "UUID",
"ingredient": {
"id": "UUID",
"name": "Category name",
"allergens": []
}
},
...
],
"rules": [
{
"id": "UUID",
"minItemCount": 1,
"maxItemCount": 1,
"name": "Base",
"description": null,
"translations": [
{
"id": "UUID",
"locale": "it_IT",
"name": "Base",
"description": null
}
]
},
...
],
"meta": [],
"translations": [
{
"id": "UUID",
"locale": "it_IT",
"name": "PRODUCT NAME",
"description": "PRODUCT DESCRIPTION",
},
...
],
"posId": "UUID",
"companyId": "UUID"
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Item identifier. UUID format |
name | string | false |
Item name |
description | string | true |
Item description |
price | float | false |
Item price |
vatAmount | float | false |
Vat amount |
netPrice | float | false |
Price excluding taxes |
suspended | bool | false |
Flag to indicate if a product is suspended or is available |
editable | bool | false |
Flag to indicate if a product is editable or not |
deletable | bool | false |
Flag to indicate if a product is deletable or not |
acl | array | false |
List of available ACL. Available values are: deleteMenuItem manageMenuItem manageMenuItemI18n manageMenuItemComposition |
vat | int | false |
Vat percentage |
category | object | false |
An object that contains the category information |
compositions | array | false |
An array object that contains a list of item composition objects. Can be empty |
rules | array | false |
An array object that contains a list of rule objects |
meta | array or object | false |
Additional metadata |
translations | array | false |
An array object that contains a list of translation objects |
posId | string | true |
Point of sale identifier |
companyId | string | true |
Company identifier |
Composition
Parameter | Type | Nullable | Description |
---|---|---|---|
type | string | false |
Type of the composition. Available values: basic variant |
priceImpact | float | false |
Impact on item price |
vatAmount | float | false |
Vat amount |
netPriceImpact | float | false |
Impact on item price excluding taxes |
rule | float | true |
Rule reference identifier. UUID format |
ingredient | object | false |
An object that contains the ingredient info |
Composition / Ingredient
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Category identifier. UUID format |
name | string | false |
Category name |
allergens | array | false |
An array object that contains a list of allergen objects. Can be empty |
Rule
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Rule identifier. UUID format |
minItemCount | int | false |
Minimum number of products to select. Minimum allowed value 0 |
maxItemCount | int | true |
Maximum number of products to select. If empty, no limit. If the minimum allowed value is entered, it must be greater than or equal to minItemCount |
name | string | false |
Rule name |
description | string | true |
Rule description |
translations | array | false |
An array object that contains a list of translation objects |
Composition / Ingredient / Allergen
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Allergen identifier. UUID format |
name | string | false |
Allergen name |
Translation
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Translation identifier. UUID format |
locale | string | false |
The translation locale. For example: it_IT |
name | string | false |
Item name |
description | string | true |
Item description |
Errors
Status code: 404
Invalid menu item id
Status code: 403
You cannot access this menu item
Status code: 401
Invalid bearer token
Items / Create
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/item/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'menu' => 'UUID',
'category' => 'UUID',
'vat' => 10,
'price' => 9,
'translations' => [
[
'locale' => 'it_IT',
'name' => 'ITEM NAME',
'description' => 'ITEM DESCRIPTION',
],
],
'compositions' => [
[
'ingredient' => 'UUID',
'type' => 'basic',
'priceImpact' => 0,
'rule' => null
],
[
'ingredient' => 'UUID',
'type' => 'variant',
'priceImpact' => 0.5,
'rule' => 'REFERENCE_RULE_ID'
],
],
'rules' => [
[
'id' => 'REFERENCE_RULE_ID',
'minItemCount' => 1,
'maxItemCount' => 2,
'meta' => [],
'translations' => [
[
'locale' => 'it_IT',
'name' => 'RULE NAME',
'description' => 'RULE DESCRIPTION',
],
],
],
[
'id' => 'REFERENCE_RULE_ID',
'minItemCount' => 0,
'maxItemCount' => null,
'meta' => [],
'translations' => [
[
'locale' => 'it_IT',
'name' => 'RULE NAME',
'description' => null,
],
],
]
],
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/item/create \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"menu": "UUID",
"category": "UUID",
"vat": 10,
"price": 9,
"translations": [
{
"locale": "it_IT",
"name": "ITEM NAME",
"description": "ITEM DESCRIPTION"
}
],
"compositions": [
{
"ingredient": "UUID",
"type": "basic",
"priceImpact": 0,
"rule": null
},
{
"ingredient": "UUID",
"type": "variant",
"priceImpact": 0.5,
"rule": "REFERENCE_RULE_ID"
},
...
],
"rules": [
{
"id": "REFERENCE_RULE_ID",
"minItemCount": 1,
"maxItemCount": 2,
"meta": [],
"translations": [
{
"locale": "it_IT",
"name": "RULE NAME",
"description": "RULE DESCRIPTION",
},
],
},
{
"id": "REFERENCE_RULE_ID",
"minItemCount": 0,
"maxItemCount": null,
"meta": [],
"translations": [
{
"locale": "it_IT",
"name": "RULE NAME",
"description": null,
},
],
},
...
]
}'
fetch("https://pubapi.deliverart.it/menu/item/create", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"menu": "UUID",
"category": "UUID",
"vat": 10,
"price": 9,
"translations": [
{
"locale": "it_IT",
"name": "ITEM NAME",
"description": "ITEM DESCRIPTION"
}
],
"compositions": [
{
"ingredient": "UUID",
"type": "basic",
"priceImpact": 0,
"rule": null
},
{
"ingredient": "UUID",
"type": "variant",
"priceImpact": 0.5,
"rule": "REFERENCE_RULE_ID"
},
...
],
"rules": [
{
"id": "REFERENCE_RULE_ID",
"minItemCount": 1,
"maxItemCount": 2,
"meta": [],
"translations": [
{
"locale": "it_IT",
"name": "RULE NAME",
"description": "RULE DESCRIPTION",
},
],
},
{
"id": "REFERENCE_RULE_ID",
"minItemCount": 0,
"maxItemCount": null,
"meta": [],
"translations": [
{
"locale": "it_IT",
"name": "RULE NAME",
"description": null,
},
],
},
...
]
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This call creates a new item
HTTP Request
POST https://pubapi.deliverart.it/menu/item/create
Available user types
ALL
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"menu": "UUID",
"category": "UUID",
"vat": 10,
"price": 9,
"compositions": [
{
"ingredient": "UUID",
"type": "basic",
"priceImpact": 0,
"rule": null
},
{
"ingredient": "UUID",
"type": "variant",
"priceImpact": 0.5,
"rule": "REFERENCE_RULE_ID"
},
...
],
"rules": [
{
"id": "REFERENCE_RULE_ID",
"minItemCount": 1,
"maxItemCount": 2,
"meta": [],
"translations": [
{
"locale": "it_IT",
"name": "RULE NAME",
"description": "RULE DESCRIPTION"
}
]
},
{
"id": "REFERENCE_RULE_ID",
"minItemCount": 0,
"maxItemCount": null,
"meta": [],
"translations": [
{
"locale": "it_IT",
"name": "RULE NAME",
"description": null
}
]
},
...
]
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
menu | string | true |
isEmpty unauthorized |
Menu identifier |
category | string | true |
isEmpty unauthorized |
Category identifier |
vat | int | true |
isEmpty |
VAT |
price | float | true |
isEmpty invalid tooLowValue |
Product price |
translations | array | false |
An array object that contains a list of translation objects | |
compositions | array | false |
An array object that contains a list of composition objects | |
rules | array | false |
An array object that contains a list of rule objects |
Composition
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
ingredient | string | true |
isEmpty unauthorized |
Ingredient identifier |
type | string | true |
isEmpty notInArray |
Composition type. Available values are: basic variant |
priceImpact | float | false |
isEmpty invalid tooLowValue |
Price impact. Valid only for variant type |
rule | string | false |
isArray |
Reference rule identifier |
Rule
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
id | string | true |
notUnique |
Reference rule identifier |
minItemCount | int | true |
isEmpty tooLow |
Minimum number of selectable products. Minimum allowed value 0 |
maxItemCount | int | false |
tooLow tooHigh invalid |
Maximum number of selectable products. Minimum allowed value equal to the value of minItemCount . Empty no limit |
meta | array or object | false |
Additional metadata | |
translations | array | true |
An array object that contains a list of translation objects |
Translation
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
locale | string | true |
isEmpty notInArray |
The translation locale. For example: it_IT |
name | string | true |
isEmpty |
Product name |
description | string | false |
Product description |
Success response
{
"id": "UUID"
}
Status code: 201
Return the identifier of the new item
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Items / Update
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/item/{ID}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'category' => 'UUID',
'vat' => 10,
'price' => 9,
'translations' => [
[
'locale' => 'it_IT',
'name' => 'ITEM NAME',
'description' => 'ITEM DESCRIPTION',
],
],
'compositions' => [
[
'ingredient' => 'UUID',
'type' => 'basic',
'priceImpact' => 0
],
[
'ingredient' => 'UUID',
'type' => 'variant',
'priceImpact' => 0.5
],
],
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/item/{ID}/update \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"category": "UUID",
"vat": 10,
"price": 9,
"translations": [
{
"locale": "it_IT",
"name": "ITEM NAME",
"description": "ITEM DESCRIPTION"
}
],
"compositions": [
{
"ingredient": "UUID",
"type": "basic",
"priceImpact": 0,
"rule": null
},
{
"ingredient": "UUID",
"type": "variant",
"priceImpact": 0.5,
"rule": "REFERENCE_RULE_ID"
},
...
],
"rules": [
{
"id": "REFERENCE_RULE_ID",
"minItemCount": 1,
"maxItemCount": 2,
"meta": [],
"translations": [
{
"locale": "it_IT",
"name": "RULE NAME",
"description": "RULE DESCRIPTION",
},
],
},
{
"id": "REFERENCE_RULE_ID",
"minItemCount": 0,
"maxItemCount": null,
"meta": [],
"translations": [
{
"locale": "it_IT",
"name": "RULE NAME",
"description": null,
},
],
},
...
]
}'
fetch("https://pubapi.deliverart.it/menu/item/{ID}/update", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"category": "UUID",
"vat": 10,
"price": 9,
"translations": [
{
"locale": "it_IT",
"name": "ITEM NAME",
"description": "ITEM DESCRIPTION"
}
],
"compositions": [
{
"ingredient": "UUID",
"type": "basic",
"priceImpact": 0,
"rule": null
},
{
"ingredient": "UUID",
"type": "variant",
"priceImpact": 0.5,
"rule": "REFERENCE_RULE_ID"
},
...
],
"rules": [
{
"id": "REFERENCE_RULE_ID",
"minItemCount": 1,
"maxItemCount": 2,
"meta": [],
"translations": [
{
"locale": "it_IT",
"name": "RULE NAME",
"description": "RULE DESCRIPTION",
},
],
},
{
"id": "REFERENCE_RULE_ID",
"minItemCount": 0,
"maxItemCount": null,
"meta": [],
"translations": [
{
"locale": "it_IT",
"name": "RULE NAME",
"description": null,
},
],
},
...
]
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the menu item identifier.
This call creates update an existing menu item
HTTP Request
POST https://pubapi.deliverart.it/menu/item/{ID}/update
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"category": "UUID",
"vat": 10,
"price": 9,
"translations": [
{
"locale": "it_IT",
"name": "ITEM NAME",
"description": "ITEM DESCRIPTION"
}
],
"compositions": [
{
"ingredient": "UUID",
"type": "basic",
"priceImpact": 0,
"rule": null
},
{
"ingredient": "UUID",
"type": "variant",
"priceImpact": 0.5,
"rule": "REFERENCE_RULE_ID"
},
...
],
"rules": [
{
"id": "REFERENCE_RULE_ID",
"minItemCount": 1,
"maxItemCount": 2,
"meta": [],
"translations": [
{
"locale": "it_IT",
"name": "RULE NAME",
"description": "RULE DESCRIPTION",
},
],
},
{
"id": "REFERENCE_RULE_ID",
"minItemCount": 0,
"maxItemCount": null,
"meta": [],
"translations": [
{
"locale": "it_IT",
"name": "RULE NAME",
"description": null,
},
],
},
...
]
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
category | string | true |
isEmpty unauthorized |
Category identifier |
vat | int | true |
isEmpty |
VAT |
price | float | true |
isEmpty invalid tooLowValue |
Product price |
translations | array | false |
An array object that contains a list of translation objects | |
compositions | array | false |
An array object that contains a list of composition objects | |
rules | array | false |
An array object that contains a list of rule objects |
Composition
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
ingredient | string | true |
isEmpty unauthorized |
Ingredient identifier |
type | string | true |
isEmpty notInArray |
Composition type. Available values are: basic variant |
priceImpact | float | false |
isEmpty invalid tooLowValue |
Price impact. Valid only for variant type |
rule | string | false |
isArray |
Reference rule identifier |
Rule
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
id | string | true |
notUnique |
Reference rule identifier |
minItemCount | int | true |
isEmpty tooLow |
Minimum number of selectable products. Minimum allowed value 0 |
maxItemCount | int | false |
tooLow tooHigh invalid |
Maximum number of selectable products. Minimum allowed value equal to the value of minItemCount . Empty no limit |
meta | array or object | false |
Additional metadata | |
translations | array | true |
An array object that contains a list of translation objects |
Translation
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
locale | string | true |
isEmpty notInArray |
The translation locale. For example: it_IT |
name | string | true |
isEmpty |
Product name |
description | string | false |
Product description |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 404
Invalid menu item identifier
Status code: 403
You cannot access this menu item
Status code: 401
Invalid bearer token
Items / Update metadata
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/item/{ID}/update/meta",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'meta' => [
'key' => 'value'
]
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/item/{ID}/update/meta \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"meta": {
"key": "value"
}
}'
fetch("https://pubapi.deliverart.it/menu/item/{ID}/update/meta", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"meta": {
"key": "value"
}
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the menu item identifier.
This call update the metadata of an existing menu item
HTTP Request
POST https://pubapi.deliverart.it/menu/item/{ID}/update/meta
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"meta": {
"key": "value"
}
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
meta | object | true |
isEmpty |
Metadata object |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 404
Invalid menu item identifier
Status code: 403
You cannot access this menu item
Status code: 401
Invalid bearer token
Items / Delete
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/item/{ID}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/item/{ID}/delete \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/item/{ID}/delete", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the menu item identifier.
This endpoint will delete a menu item
HTTP Request
POST https://pubapi.deliverart.it/menu/item/{ID}/delete
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
No body response returned
Status code: 200
Errors
Status code: 404
Invalid menu item identifier
Status code: 403
You cannot access this menu item
Status code: 401
Invalid bearer token
Items / Suspend
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/item/{ID}/suspend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/item/{ID}/suspend \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/item/{ID}/suspend", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the menu item identifier.
This endpoint will suspend a menu item
HTTP Request
POST https://pubapi.deliverart.it/menu/item/{ID}/suspend
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
No body response returned
Status code: 200
Errors
Status code: 404
Invalid menu item identifier
Status code: 403
You cannot access this menu item
Status code: 401
Invalid bearer token
Items / Resume
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/item/{ID}/resume",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/item/{ID}/resume \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/menu/item/{ID}/resume", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the menu item identifier.
This endpoint will resume a menu item if it has been suspended
HTTP Request
POST https://pubapi.deliverart.it/menu/item/{ID}/resume
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
No body response returned
Status code: 200
Errors
Status code: 404
Invalid menu item identifier
Status code: 403
You cannot access this menu item
Status code: 401
Invalid bearer token
Items / Translate
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/menu/item/{ID}/translate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"locale" => "it_IT",
"name" => "ITEM NAME",
"description" => "ITEM DESCRIPTION",
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/menu/item/{ID}/translate \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"locale": "it_IT",
"name": "ITEM NAME",
"description": "ITEM DESCRIPTION"
}'
fetch("https://pubapi.deliverart.it/menu/item/{ID}/translate", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"locale": "it_IT",
"name": "ITEM NAME",
"description": "ITEM DESCRIPTION"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the menu item identifier.
This call translates a menu item
HTTP Request
POST https://pubapi.deliverart.it/menu/item/{ID}/translate
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_ingredient_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"locale": "it_IT",
"name": "ITEM NAME",
"description": "ITEM DESCRIPTION"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
locale | string | true |
isEmpty notInArray |
The translation locale. For example: it_IT |
name | string | true |
isEmpty |
Product name |
description | string | false |
Product description |
Success response
No body response returned
Status code: 200
Errors
Status code: 422
Validation fail
Status code: 404
Invalid menu item identifier
Status code: 403
You cannot access this menu item
Status code: 401
Invalid bearer token
Workshifts
Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/workshift/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/workshift/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/workshift/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the workshift identifier.
This endpoint will return the workshift detail
HTTP Request
GET https://pubapi.deliverart.it/workshift/{ID}/detail
Available user types
ALL
Available auth scopes
workshifts_read
workshifts_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"duration": 240,
"start": "2021-01-30 19:00:00",
"end": "2021-01-30 23:00:00"
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Workshift identifier. UUID format |
duration | int | false |
Workshift duration in minutes |
start | string | false |
Start time. Format YYYY-MM-DD HH:mm:ss |
end | string | false |
End time. Format YYYY-MM-DD HH:mm:ss |
Errors
Status code: 404
Invalid workshift id
Status code: 401
Invalid bearer token
Delivery times
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/workshift/{WORKSHIFT_ID}/address/{ADDRESS_ID}/delivery/times",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/workshift/{WORKSHIFT_ID}/address/{ADDRESS_ID}/delivery/times \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/workshift/{WORKSHIFT_ID}/address/{ADDRESS_ID}/delivery/times", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow, theWORKSHIFT_ID
with the workshift identifier and theADDRESS_ID
with the address identifier.
This endpoint will return the list of the available delivery times for the workshift and a specific address
HTTP Request
GET https://pubapi.deliverart.it/workshift/{WORKSHIFT_ID}/address/{ADDRESS_ID}/delivery/times
Available user types
ALL
Available auth scopes
workshifts_read
workshifts_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"travel": {
"distance": 9576,
"durationTime": 1379,
"points": [
{
"lat": 41.9327984,
"lng": 12.5261335
},
{
"lat": 41.901489,
"lng": 12.5031044
},
{
"lat": 41.9327984,
"lng": 12.5261335
}
]
},
"deliveryTimes": [
{
"time": "2021-03-09 13:10:00",
"free": true,
"cause": null,
"valid": true
},
{
"time": "2021-03-09 13:15:00",
"free": true,
"cause": null,
"valid": true
},
...
]
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
travel | object | false |
An object that contains the travel information |
deliveryTimes | object | false |
An object that contains the Delivery time information |
Travel
Parameter | Type | Nullable | Description |
---|---|---|---|
distance | int | false |
Total distance from POS > Address > POS expressed in meters |
durationTime | int | false |
Travel duration from POS > Address > POS expressed in seconds |
points | array | false |
The sequence of the coordinates of: POS - Address - POS |
Delivery time
Parameter | Type | Nullable | Description |
---|---|---|---|
time | string | false |
Date/Time of the possible delivery time |
free | bool | false |
If false , it means that there is already a delivery order at that time |
valid | bool | false |
If false , this time slot is not bookable |
cause | string | true |
If the valid field is false , the cause of the check is specified in this field. Available values are: not_in_range reserved reached_limit_order status_not_in_waiting over_tolerance generic_error |
Meaning of the errors specified in the cause field:
not_in_range
The total delivery time is not included in the shift start and end timesreserved
The time slot is reserved temporarily when creating another orderreached_limit_order
The maximum limit of orders for a single delivery has been reachedstatus_not_in_waiting
Another delivery is present in this slot and the orders have already been in the preparation phaseover_tolerance
Another delivery is present in this slot and the time shift caused by entering a new order is greater than the maximum tolerance timegeneric_error
Unhandled error
Errors
Status code: 404
Invalid workshift or address identifier
Status code: 401
Invalid bearer token
Take away times
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/workshift/{WORKSHIFT_ID}/take-away/times",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/workshift/{WORKSHIFT_ID}/take-away/times \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/workshift/{WORKSHIFT_ID}/take-away/times", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow, theWORKSHIFT_ID
with the workshift identifier.
This endpoint will return the list of the available take away times for the workshift
HTTP Request
GET https://pubapi.deliverart.it/workshift/{WORKSHIFT_ID}/take-away/times
Available user types
ALL
Available auth scopes
take_away_time_read
workshifts_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"takeAwayTimes": [
{
"time": "2021-03-09 13:10:00",
"free": true,
"cause": null,
"valid": true
},
{
"time": "2021-03-09 13:15:00",
"free": true,
"cause": null,
"valid": true
},
...
]
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
takeAwayTimes | object | false |
An object that contains the Take away time information |
Take away time
Parameter | Type | Nullable | Description |
---|---|---|---|
time | string | false |
Date/Time of the possible delivery time |
free | bool | false |
If false , it means that there is already a delivery order at that time |
valid | bool | false |
If false , this time slot is not bookable |
cause | string | true |
If the valid field is false , the cause of the check is specified in this field. Available values are: not_in_range reserved reached_limit_order status_not_in_waiting over_tolerance generic_error |
Meaning of the errors specified in the cause field:
not_in_range
The total delivery time is not included in the shift start and end timesreserved
The time slot is reserved temporarily when creating another orderreached_limit_order
The maximum limit of orders for a single delivery has been reachedstatus_not_in_waiting
Another delivery is present in this slot and the orders have already been in the preparation phaseover_tolerance
Another delivery is present in this slot and the time shift caused by entering a new order is greater than the maximum tolerance timegeneric_error
Unhandled error
Errors
Status code: 404
Invalid workshift
Status code: 401
Invalid bearer token
Invitation / Accept
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/workshift/invitation/accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => 'CODE'
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/workshift/invitation/accept \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"code": "CODE"
}'
fetch("https://pubapi.deliverart.it/workshift/invitation/accept", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"code": "CODE"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This call accepts an invitation for a workshift
HTTP Request
POST https://pubapi.deliverart.it/workshift/invitation/accept
Available user types
courier
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"code": "CODE"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
code | string | true |
isEmpty valid alreadyUsed expired invalidScope |
Invitation code |
Success response
{}
Status code: 200
Empty json
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Invitation / Reject
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/workshift/invitation/reject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => 'CODE'
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/workshift/invitation/reject \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"code": "CODE"
}'
fetch("https://pubapi.deliverart.it/workshift/invitation/reject", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"code": "CODE"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This call rejects an invitation for a workshift
HTTP Request
POST https://pubapi.deliverart.it/workshift/invitation/reject
Available user types
courier
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"code": "CODE",
"reason": "Lorem ipsum"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
code | string | true |
isEmpty valid alreadyUsed expired invalidScope |
Invitation code |
reason | string | false |
none | Reason for refusal |
Success response
{}
Status code: 200
Empty json
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Delivery fee
Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/delivery/fee/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/delivery/fee/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/delivery/fee/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the delivery fee identifier.
This endpoint will return the delivery fee detail
HTTP Request
GET https://pubapi.deliverart.it/delivery/fee/{ID}/detail
Available user types
manager
manager_2_level
Available auth scopes
delivery_fee_read
delivery_fee_admin
delivery_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"amount": 3,
"vatAmount": 0.2727,
"netAmount": 2.7273,
"type": "amount",
"min": 4.99,
"max": 10
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Delivery fee identifier. UUID format |
amount | float | false |
Value of the delivery fee |
vatAmount | float | false |
Vat amount |
netAmount | float | false |
Price excluding taxes |
type | string | false |
Type of the delivery fee. Available values are: amount distance |
Additional data for each single type of delivery. Used to check which fee to apply.
Type: amount
Parameter | Type | Nullable | Description |
---|---|---|---|
min | float | false |
Min value of the order |
max | float | true |
Max value of the order. If null the control will have only the min limit |
Type: distance
Parameter | Type | Nullable | Description |
---|---|---|---|
min | int | false |
Min value of the distance expressed in meters |
max | int | true |
Max value of the distance expressed in meters. If null the control will have only the min limit |
Errors
Status code: 404
Invalid delivery fee id
Status code: 401
Invalid bearer token
Create
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/delivery/fee/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pointOfSale' => 'UUID',
'type' => 'amount',
'vat' => 10,
'amount' => 3,
'min' => 4.99,
'max' => 10,
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/delivery/fee/create \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"pointOfSale": "UUID",
"type": "amount",
"vat": 10,
"amount": 3,
"min": 4.99,
"max": 10
}'
fetch("https://pubapi.deliverart.it/delivery/fee/create", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"pointOfSale": "UUID",
"type": "amount",
"vat": 10,
"amount": 3,
"min": 4.99,
"max": 10
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This call will create a delivery fee
HTTP Request
POST https://pubapi.deliverart.it/delivery/fee/create
Available user types
manager
manager_2_level
Available auth scopes
delivery_fee_admin
delivery_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"pointOfSale": "UUID",
"type": "amount",
"vat": 10,
"amount": 3,
"min": 4.99,
"max": 10
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
pointOfSale | string | true |
isEmpty inactiveCompany companyProfileIncomplete noManager |
Point of sale identifier |
type | string | true |
isEmpty invalid |
Type of the delivery fee. Available values: distance amount |
vat | int | true |
isEmpty |
VAT |
amount | value | true |
isEmpty min |
VAT |
Other values based on the type
Type: distance
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
min | int | true |
isEmpty min |
Minimum distance expressed in meters |
max | int | false |
greatherThanMin |
Maximum distance expressed in meters. If empty there are not limits |
Type: amount
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
min | float | true |
isEmpty min |
Minimum order value |
max | float | false |
greatherThanMin |
Maximum order value. If empty there are not limits |
Success response
{
"id": "UUID"
}
Status code: 201
Return the identifier of the new delivery fee
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Delete
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/delivery/fee/{ID}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/delivery/fee/{ID}/delete \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/delivery/fee/{ID}/delete", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the delivery fee identifier.
This endpoint will delete a delivery fee
HTTP Request
POST https://pubapi.deliverart.it/delivery/fee/{ID}/delete
Available user types
manager
manager_2_level
Available auth scopes
menu_admin
menu_item_category_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
No body response returned
Status code: 200
Errors
Status code: 404
Invalid delivery fee identifier
Status code: 403
You cannot access this delivery fee
Status code: 401
Invalid bearer token
Orders
Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer ACCESS_TOKEN",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/order/{ID}/detail \
--header 'authorization: Bearer ACCESS_TOKEN' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/order/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer ACCESS_TOKEN"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint will return the order detail
HTTP Request
GET https://pubapi.deliverart.it/order/{ID}/detail
Available user types
ALL
Available auth scopes
order_admin
order_read
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"source": "customer",
"code": "A1000",
"externalCode": null,
"amount": 48,
"vatAmount": 4.8,
"netAmount": 43.2,
"type": "managed",
"status": "valid",
"preparationStatus": "done",
"payment": {
"method": "cash",
"status": "paid"
},
"costs": [
{
"id": "36523859-a745-488f-ba7a-5ce9349ba5f3",
"code": "coupon",
"label": "Coupon",
"type": "SUB",
"amount": 5,
"vatAmount": 0,
"netAmount": 5,
"realAmount": -5,
"realNetAmount": -5,
"realVatAmount": 0,
"meta": {
"code": "ACME5EURO"
}
}
],
"meta": [],
"times": {
"created": "2020-08-09 17:00:28",
"estimatedPreparationEnd": "2020-08-09 17:38:03",
"preparationStart": "2020-07-22 20:53:57",
"preparationEnd": null
},
"delivery": {
"id": "ee41495d-839a-4e7b-a0b4-8909713f9314",
"status": "waiting_for_orders",
"delivered": false,
"deliveryTime": {
"estimated": "2021-05-19 16:55:00",
"real": null
}
},
"note": null,
"referenceMenu": {
"id": "ae32a0b2-c8ec-412b-8690-16104ce56ee0",
"name": "Lorem ipsum"
},
"pointOfSale": {
"id": "UUID",
"name": "Acme srl",
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
"customer": {
"id": "UUID",
"totalOrders": 1,
"phoneNumber": "+390000000000",
"firstName": "Mario",
"lastName": "Rossi",
"fullName": "Mario Rossi",
"email": "mario.rossi@email.com"
},
"customerAddress": {
"id": "UUID",
"main": false,
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": null,
"internal": null,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
"customerBusinessProfile": {
"id": "UUID",
"businessCountry": "IT",
"businessName": "Acme",
"vat": "xxxxxxxxxx",
"pec": "mario.rossi@pec.it",
"sdi": null,
"fiscalCode": "xxxxxxxxxx",
"main": true,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
"items": [
{
"id": "UUID",
"amount": 14,
"vatAmount": 1.4,
"netAmount": 12.6,
"originAmount": 14,
"originVatAmount": 1.4,
"originNetAmount": 12.6,
"note": "Lorem ipsum dolor sit amet",
"variants": [],
"menuItem": {
"id": "UUID",
"name": "Lorem ipsum",
"description": "Lorem ipsum dolor sit amet",
"price": 14,
"vatAmount": 1.4,
"netPrice": 12.6,
"vat": 10,
"meta": [],
"category": {
"id": "UUID",
"sorting": 0,
"name": "Lorem ipsum",
"meta": []
}
}
},
{
"id": "UUID",
"amount": 9,
"vatAmount": 0.8182,
"netAmount": 8.1818,
"originAmount": 5,
"originVatAmount": 0.4546,
"originNetAmount": 4.5454,
"note": null,
"variants": [
{
"id": "UUID",
"action": "add",
"ingredient": {
"id": "UUID",
"name": "Lorem ipsum"
},
"priceImpact": 2,
"vatAmount": 0.1818,
"netPriceImpact": 1.8182
}
],
"menuItem": {
"id": "UUID",
"name": "Lorem ipsum",
"description": null,
"price": 7,
"vatAmount": 0.6364,
"netPrice": 6.3636,
"vat": 10,
"meta": [],
"category": {
"id": "UUID",
"sorting": 31,
"name": "Lorem ipsum",
"meta": []
}
}
},
...
]
}
Status code: 200
Parameter | Type | Nullable | Type | Description |
---|---|---|---|---|
id | string | false |
managed take_away unmanaged |
Order identifier. UUID format |
source | string | false |
managed take_away unmanaged |
Source of the order. Example deliverart or customer |
code | string | false |
managed take_away unmanaged |
Code of the order |
externalCode | string | true |
managed take_away unmanaged |
Possible reference for an external order code. Eg: UberEats order number |
amount | float | false |
managed take_away unmanaged |
Total order amount |
vatAmount | float | false |
managed take_away unmanaged |
Only vat amount |
netAmount | float | false |
managed take_away unmanaged |
Amount without vat |
type | string | false |
managed take_away unmanaged |
Order type. Available values: managed unmanaged take_away |
status | string | false |
managed take_away unmanaged |
Order status. Available values: to_be_defined aborted valid canceled |
preparationStatus | string | false |
managed take_away unmanaged |
Preparation status. Available values: to_prepare in_preparation done |
takeAwayStatus | string | false |
managed take_away unmanaged |
Take away status. Available values: waiting_for_preparation waiting_to_be_withdrawn withdrawn not_withdrawn . Available for only take away orders. |
note | string | true |
managed take_away unmanaged |
Additional note |
meta | array or object | false |
managed take_away unmanaged |
Additional metadata for the order |
bundle | string | true |
managed take_away unmanaged |
If the order is within a bundle, this field displays the bundle identifier. UUID format |
referenceMenu | object | true |
managed take_away unmanaged |
Object that contains the referenceMenu information |
payment | object | false |
managed take_away unmanaged |
Object that contains the payment information |
costs | array | false |
managed take_away unmanaged |
An array object that contains a list of cost objects. Can be empty |
times | object | false |
managed take_away unmanaged |
Object that contains the times information |
pointOfSale | object | false |
managed take_away unmanaged |
Object that contains the point of sale information |
customer | object | false |
managed take_away unmanaged |
Object that contains the customer information |
customerAddress | object | false |
managed unmanaged |
Object that contains the customer address information |
customerBusinessProfile | object | true |
managed take_away unmanaged |
Object that contains the customer business profile information |
items | object | false |
managed take_away unmanaged |
List of the order menu items |
delivery | object | true |
managed |
Object that contains the delivery information. If the order has not passed into a valid status this field will not be filled in |
takeAway | object | true |
take_away |
Object that contains the takeAway information. If the order has not passed into a valid status this field will not be filled in |
Reference menu
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Menu identifier. UUID format |
name | string | false |
Menu name |
Payment
Parameter | Type | Nullable | Description |
---|---|---|---|
method | string | false |
Payment method. Available values: undefined cash credit_card paypal satispay nexi transfer |
status | string | false |
Payment status. Available values: waiting paid canceled refunded |
Cost
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Cost identifier. UUID format |
code | string | false |
Code identifier. Available values are: coupon discount shipping_cost |
label | string | false |
Code translation |
type | string | false |
Action type for the variant. Available values: ADD SUB |
amount | float | false |
Total for the cost, including taxes |
vatAmount | float | false |
Vat amount |
netAmount | float | false |
Total excluding taxes |
realAmount | float | false |
Total for the cost, including taxes. Can be negative if the typeis SUB |
realVatAmount | float | false |
Vat amount. Can be negative if the typeis SUB |
realNetAmount | float | false |
Total excluding taxes. Can be negative if the typeis SUB |
meta | array or object | false |
Additional metadata of the cost |
Times
Parameter | Type | Nullable | Description |
---|---|---|---|
created | string | false |
Creation time. Format: YYYY-MM-DD HH:mm:ss |
estimatedPreparationEnd | string | false |
Estimated end preparation time. Format: YYYY-MM-DD HH:mm:ss |
preparationStart | string | true |
Preparation start time. Format: YYYY-MM-DD HH:mm:ss |
preparationEnd | string | true |
End preparation time. Format: YYYY-MM-DD HH:mm:ss |
Item
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Order menu item identifier. UUID format |
amount | float | false |
Total for the quantity you select, including taxes. It can be overwritten |
vatAmount | float | false |
Vat amount for the quantity you select. It can be overwritten |
netAmount | float | false |
Total for the quantity you select, excluding taxes. It can be overwritten |
originAmount | float | false |
Total for the quantity you select, including taxes |
originVatAmount | float | false |
Vat amount for the quantity you select |
originNetAmount | float | false |
Total for the quantity you select, excluding taxes |
note | string | true |
Additional note for the item |
variants | object | false |
List of the variants for the menu item |
menuItem | object | false |
An object that contains the address information |
Item - Variant
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Menu item variant identifier. UUID format |
action | string | false |
Action type for the variant. Available values: add sub |
priceImpact | float | false |
Impact on item price |
vatAmount | float | false |
Vat amount |
netPriceImpact | float | false |
Impact on item price excluding taxes |
ingredient | object | false |
An object that contains the ingredient information |
Item - Variant - ingredient
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Menu item variant identifier. UUID format |
name | string | false |
Ingredient name |
Item - Menu item
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Menu item identifier. UUID format |
name | string | false |
Product name |
description | string | true |
Product description |
price | float | false |
Item price |
vatAmount | float | false |
Vat amount |
netPrice | float | false |
Price excluding taxes |
vat | int | false |
Vat percentage |
meta | array or object | false |
Additional metadata |
category | object | false |
An object that contains the category information |
Delivery
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Delivery order identifier. UUID format |
status | string | false |
Delivery status. Available values are: canceled waiting_for_orders ready_to_take_charge taken_over delivery_started delivery_finished |
delivered | bool | false |
Flag indicating whether the order has been delivered |
deliveryTime | object | false |
An object that contains the Estimated and real time information for the delivery time |
Take away
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Take away identifier. UUID format |
status | string | false |
Take away status. Available values are: waiting_for_preparation waiting_to_be_withdrawn withdrawn not_withdrawn |
withdrawn | bool | false |
Flag indicating whether the order has been withdrawn |
takeAwayTime | string | false |
Take away time. Format: YYYY-MM-DD HH:mm:ss |
Errors
Status code: 404
Invalid order id
Status code: 401
Invalid bearer token
Detail / Delivery
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/delivery/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer ACCESS_TOKEN",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/order/{ID}/delivery/detail \
--header 'authorization: Bearer ACCESS_TOKEN' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/order/{ID}/delivery/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer ACCESS_TOKEN"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint will return the delivery detail for the order
HTTP Request
GET https://pubapi.deliverart.it/order/{ID}/delivery/detail
Available user types
ALL
Available auth scopes
order_admin
order_read
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"delivered": true,
"sorting": 3,
"deliveryTime": {
"estimated": "2021-05-17 14:04:05",
"real": "2021-05-17 13:24:11"
},
"deliveryId": "UUID",
"exitTime": {
"estimated": "2021-05-17 13:48:31",
"accurate": "2021-05-17 13:48:31",
"real": "2021-05-17 13:23:09"
},
"returnTime": {
"estimated": "2021-05-17 14:10:05",
"real": "2021-05-17 13:24:21"
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Delivery order identifier. UUID format |
deliveryId | string | false |
Delivery identifier. UUID format |
delivered | bool | false |
Flag indicating whether the order has been delivered |
sorting | int | false |
Value indicating the order in which the order will be delivered in the case of a multiple delivery |
exitTime | object | false |
An object that contains the Estimated and real time information for the exit of the courier from the point of sale |
deliveryTime | object | false |
An object that contains the Estimated and real time information for the delivery time |
returnTime | object | false |
An object that contains the Estimated and real time information for the return of the courier to the point of sale |
Exit time
Parameter | Type | Nullable | Description |
---|---|---|---|
estimated | string | false |
Estimated exit time |
accurate | string | false |
Accurate exit time based on end preparation time |
real | string | false |
Real exit time |
Errors
Status code: 404
Invalid order id
Status code: 401
Invalid bearer token
Detail / Take away
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/take-away/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer ACCESS_TOKEN",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/order/{ID}/take-away/detail \
--header 'authorization: Bearer ACCESS_TOKEN' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/order/{ID}/take-away/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer ACCESS_TOKEN"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint will return the take-away detail for the order
HTTP Request
GET https://pubapi.deliverart.it/order/{ID}/take-away/detail
Available user types
ALL
Available auth scopes
order_admin
order_read
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"status": "waiting_to_be_withdrawn",
"takeAwayTime": "2021-05-12 18:00:00",
"withdrawalTime": null
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Take away identifier. UUID format |
status | string | false |
Take away status. Available values are: waiting_for_preparation waiting_to_be_withdrawn withdrawn not_withdrawn |
takeAwayTime | string | false |
Take away time. Format: YYYY-MM-DD HH:mm:ss |
withdrawalTime | string | true |
Withdrawal time. Format: YYYY-MM-DD HH:mm:ss |
Errors
Status code: 404
Invalid order id
Status code: 401
Invalid bearer token
Init
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/pos/{ID}/order/init",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"type" => "managed"
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/pos/{ID}/order/init \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"type": "managed"
}'
fetch("https://pubapi.deliverart.it/pos/{ID}/order/init", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"type": "managed"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the point of sale identifier.
This endpoint initialize a new empty order by returning the identifier. If the type is not specified, a new order will be created for home delivery.
HTTP Request
POST https://pubapi.deliverart.it/pos/{ID}/order/init
Available user types
ALL
Available auth scopes
order_create
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"type": "managed"
}
Format: JSON
Parameter | Type | Required | Default | Validation | Description |
---|---|---|---|---|---|
type | string | false |
managed |
isEmpty inList |
Order type. Available values are: managed unmanaged take_away |
Success response
{
"id": "UUID"
}
Status code: 201
Return the identifier of the new order
Abort
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/abort",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/abort \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/order/{ID}/abort", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint will cancel the order during the composing phase
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/abort
Available user types
ALL
Available auth scopes
order_admin
order_abort
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
Status code: 200
No body response returned
Update / Note
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/update/note",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"note" => "Lorem ipsum dolor sit amet"
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/update/note \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"note": "Lorem ipsum dolor sit amet"
}'
fetch("https://pubapi.deliverart.it/order/{ID}/update/note", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"note": "Lorem ipsum dolor sit amet"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint updates the order note
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/update/note
Available user types
ALL
Available auth scopes
order_update
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"note": "Lorem ipsum dolor sit amet"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
note | string | false |
none | The order note. If you need to remove the order note, leave this field blank |
Success response
Status code: 200
No body response returned
Update / Payment
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/update/payment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"method" => "cash",
"status" => "paid"
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/update/payment \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"method": "cash",
"status": "paid"
}'
fetch("https://pubapi.deliverart.it/order/{ID}/update/payment", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"method": "cash",
"status": "paid"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint updates the order payment info
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/update/payment
Available user types
ALL
Available auth scopes
order_update
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"method": "cash",
"status": "paid"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
method | string | false |
valid | Available values: undefined cash credit_card nexi paypal satispay transfer ticket_restaurant |
status | string | false |
valid | Available values: waiting paid canceled refunded |
Note
If your account has an active PayPal or Nexi integration, you will be able to generate payment links for each of these payment methods and the customer will be able to carry out the payment flow independently so that the order is flagged as paid
only upon completion of the operation.
Success response
Status code: 200
No body response returned
Update / Customer
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/update/customer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"customer" => "CUSTOMER_ID"
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/update/customer \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"customer": "CUSTOMER_ID"
}'
fetch("https://pubapi.deliverart.it/order/{ID}/update/customer", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"customer": "CUSTOMER_ID"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow, theID
with the order identifier and theCUSTOMER_ID
with the customer identifier.
This endpoint updates the order customer reference
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/update/customer
Available user types
ALL
Available auth scopes
order_update
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"customer": "CUSTOMER_ID"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
customer | string | true |
isEmpty invalid differentPointOfSale |
The customer identifier |
Success response
Status code: 200
No body response returned
Update / Customer address
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/update/customer-address",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"customerAddress" => "CUSTOMER_ADDRESS_ID"
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/update/customer-address \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"customerAddress": "CUSTOMER_ADDRESS_ID"
}'
fetch("https://pubapi.deliverart.it/order/{ID}/update/customer-address", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"customerAddress": "CUSTOMER_ADDRESS_ID"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow, theID
with the order identifier and theCUSTOMER_ADDRESS_ID
with the customer address identifier.
This endpoint updates the order customer address reference
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/update/customer-address
Available user types
ALL
Available auth scopes
order_update
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"customerAddress": "CUSTOMER_ADDRESS_ID"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
customerAddress | string | true |
isEmpty invalid differentCustomer differentPointOfSale |
The customer address identifier |
Success response
Status code: 200
No body response returned
Update / Customer business profile
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/update/customer-business-profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"customerBusinessProfile" => "CUSTOMER_BUSINESS_PROFILE_ID"
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/update/customer-business-profile \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"customerBusinessProfile": "CUSTOMER_BUSINESS_PROFILE_ID"
}'
fetch("https://pubapi.deliverart.it/order/{ID}/update/customer-business-profile", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"customerBusinessProfile": "CUSTOMER_BUSINESS_PROFILE_ID"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow, theID
with the order identifier and theCUSTOMER_BUSINESS_PROFILE_ID
with the customer business profile identifier.
This endpoint updates the order customer business profile reference
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/update/customer-business-profile
Available user types
ALL
Available auth scopes
order_update
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"customerBusinessProfile": "CUSTOMER_BUSINESS_PROFILE_ID"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
customerBusinessProfile | string | true |
isEmpty invalid customerNotSet customerMismatch |
The customer business profile identifier |
Success response
Status code: 200
No body response returned
Update / Items
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/update/menu/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'menuItem' => 'MENU_ITEM_ID',
'note' => 'Lorem ipsum dolor sit amet',
'variants' => [
[
'ingredient' => 'INGREDIENT_ID',
'actionType' => 'sub',
],
[
'ingredient' => 'INGREDIENT_ID',
'actionType' => 'add',
'rule' => 'RULE_ID'
],
],
],
[
'menuItem' => 'MENU_ITEM_ID',
'note' => null,
'priceOverride' => 5.50,
'variants' => [],
],
],
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/update/menu/items \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"items": [
{
"menuItem": "MENU_ITEM_ID",
"note": "Lorem ipsum dolor sit amet",
"variants": [
{
"ingredient": "INGREDIENT_ID",
"actionType": "sub"
},
{
"ingredient": "INGREDIENT_ID",
"actionType": "add",
"rule": "RULE_ID"
}
]
},
{
"menuItem": "MENU_ITEM_ID",
"note": null,
"priceOverride": 5.50,
"variants": []
}
]
}'
fetch("https://pubapi.deliverart.it/order/{ID}/update/menu/items", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"items": [
{
"menuItem": "MENU_ITEM_ID",
"note": "Lorem ipsum dolor sit amet",
"variants": [
{
"ingredient": "INGREDIENT_ID",
"actionType": "sub"
},
{
"ingredient": "INGREDIENT_ID",
"actionType": "add",
"rule": "RULE_ID"
}
]
},
{
"menuItem": "MENU_ITEM_ID",
"note": null,
"priceOverride": 5.50,
"variants": []
}
]
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow, theID
with the order identifier, theMENU_ITEM_ID
with the menu item identifier and theINGREDIENT_ID
with the menu item ingredient identifier.
This call updates all items within the order. All items must be specified individually. For each of them it is possible to add notes and set the variants foreseen by the menu configuration.
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/update/menu/items
Available user types
ALL
Available auth scopes
order_update
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"items": [
{
"menuItem": "MENU_ITEM_ID",
"note": "Lorem ipsum dolor sit amet",
"variants": [
{
"ingredient": "INGREDIENT_ID",
"actionType": "sub"
},
{
"ingredient": "INGREDIENT_ID",
"actionType": "add",
"rule": "RULE_ID"
}
]
},
{
"menuItem": "MENU_ITEM_ID",
"note": null,
"priceOverride": 5.50,
"variants": []
}
]
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
items | object | false |
none | List of the item |
Item
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
menuItem | string | true |
isEmpty isEnabled isUsable |
Identifier of the menu item |
note | string | false |
none | Additional note for the order menu items |
priceOverride | float | false |
isEmpty invalid tooLowValue |
Value to override the price |
variants | object | false |
isAllIngredientsAvailable isAllAllowedAction |
List of the variant. If you don't need to add variants, you can pass an empty array |
Variant
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
ingredient | string | true |
exists |
Identifier of the ingredient |
actionType | string | true |
allowedValue |
Type of the action. Available values are: add sub |
rule | string | false |
valid |
Identifier of the rule |
Success response
Status code: 200
No body response returned
Cost / Create
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/cost/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vat' => 0,
'code' => 'coupon',
'type' => 'SUB',
'amount' => 5.00,
'meta' => [
'code' => 'CODE',
],
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/cost/create \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"vat": 0,
"code": "coupon",
"type": "SUB",
"amount": 5.00,
"meta": {
"code": "CODE"
}
}'
fetch("https://pubapi.deliverart.it/order/{ID}/cost/create", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"vat": 0,
"code": "coupon",
"type": "SUB",
"amount": 5.00,
"meta": {
"code": "CODE"
}
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow, theID
with the order identifier.
This call creates a new cost for the order.
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/cost/create
Available user types
manager
manager_2_level
Available auth scopes
order_update
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"vat": 0,
"code": "coupon",
"type": "SUB",
"amount": 5.00,
"meta": {
"code": "CODE"
}
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
vat | int | true |
isEmpty |
Vat value. Example: passing 10 to indicates 10% |
code | string | true |
isEmpty notInArray |
Code identifier. Available values are: coupon discount shipping_cost |
type | string | true |
isEmpty notInArray |
Action type for the variant. Available values: ADD SUB |
amount | float | true |
isEmpty floatInvalid tooLowValue |
Total for the cost, including taxes. Min value is zero |
meta | array or object | false |
variables based on the code | Additional metadata of the cost |
Success response
{
"id": "COST_UUID"
}
Status code: 201
The new cost identifier
Errors
Status code: 422
Validation fail
Status code: 404
Invalid order id
Status code: 403
You cannot access this order
Status code: 401
Invalid bearer token
Cost / Delete
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/cost/{ID}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/cost/{ID}/delete \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/order/cost/{ID}/delete", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow, theID
with the cost identifier.
This call deletes a cost for an order.
HTTP Request
POST https://pubapi.deliverart.it/order/cost/{ID}/delete
Available user types
manager
manager_2_level
Available auth scopes
order_update
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
Status code: 200
No body response returned
Errors
Status code: 404
Invalid order id
Status code: 403
You cannot access this order
Status code: 401
Invalid bearer token
Unset / Customer
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/unset/customer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/unset/customer \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/order/{ID}/unset/customer", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint will remove the customer, and the related references (customer address and customer business profile), from the order.
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/unset/customer
Available user types
ALL
Available auth scopes
order_admin
order_update
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
Status code: 200
No body response returned
Unset / Customer address
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/unset/customer-address",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: Bearer ACCESS_TOKEN",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/unset/customer-address \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/order/{ID}/unset/customer-address", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer ACCESS_TOKEN"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint will remove the customer address from the order.
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/unset/customer-address
Available user types
ALL
Available auth scopes
order_admin
order_update
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
Status code: 200
No body response returned
Unset / Customer business profile
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/unset/customer-business-profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: Bearer ACCESS_TOKEN",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/unset/customer-business-profile \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/order/{ID}/unset/customer-business-profile", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer ACCESS_TOKEN"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint will remove the customer business profile from the order.
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/unset/customer-business-profile
Available user types
ALL
Available auth scopes
order_admin
order_update
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
Status code: 200
No body response returned
Delete
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/delete \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/order/{ID}/delete", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint will permanently delete an order after setting it as valid
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/delete
Available user types
ALL
Available auth scopes
order_admin
order_cancel
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
Status code: 200
No body response returned
Reservation
Reserve delivery time
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/workshift/{ID}/delivery/time/reserve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mode' => 'order',
'order' => 'UUID', // or address
'joinExistingDelivery' => 'UUID',
'deliveryOrderPreference' => 'prefer_free_courier',
'deliveryTime' => '2021-03-09 20:35:00',
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/workshift/{ID}/delivery/time/reserve \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data "{
"mode": "order",
"order": "UUID",
"joinExistingDelivery": "UUID",
"deliveryOrderPreference": "prefer_free_courier",
"deliveryTime": "2021-03-09 20:35:00"
}'
fetch("https://pubapi.deliverart.it/workshift/{ID}/delivery/time/reserve", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"mode": "order",
"order": "UUID",
"joinExistingDelivery": "UUID",
"deliveryOrderPreference": "prefer_free_courier",
"deliveryTime": "2021-03-09 20:35:00"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the workshift identifier.
This call reserve a delivery time for a specific order
HTTP Request
POST https://pubapi.deliverart.it/workshift/{ID}/delivery/time/reserve
Available user types
ALL
Available auth scopes
order_create
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"order": "UUID",
"address": "UUID",
"mode": "order",
"deliveryOrderPreference": "prefer_free_courier",
"joinExistingDelivery": "UUID",
"deliveryTime": "2021-03-09 20:35:00"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
deliveryTime | string | true |
isEmpty validDateTime |
Delivery time to reserve |
mode | string | false |
invalid |
How to reserve a time. It is possible to reserve a time for an order being defined or by using only the address (new mode). Available values: order address . Default value: order |
order | string | false |
isEmpty validStatus validOrderType hasCustomerAddress noReservedDeliveryTime |
Order identifier. Use this field if the mode is order otherwise it must be omitted. |
address | string | false |
isEmpty |
Address identifier. Use this field if the mode is address otherwise it must be omitted. |
joinExistingDelivery | string | false |
invalid unauthorized |
Delivery identifier. If specified, it indicates the delivery already existing to which to add the current order |
deliveryOrderPreference | string | false |
invalid |
Indicates the mode of aggregation of the delivery. Available values: prefer_free_courier prefer_aggregation . |
Success response
{
"id": "UUID",
"orderId": "UUID",
"sorting": 0,
"exitAt": "2021-03-09 20:49:09",
"returnAt": "2021-03-09 21:12:08",
"reservedUntilAt": "2021-03-09 10:35:49",
"deliveryTime": "2021-03-09 21:00:00",
"workshift": {
"id": "c856cc58-80bf-42c8-976a-bfde2d3c0594",
"duration": 480,
"start": "2021-03-09 13:00:00",
"end": "2021-03-09 21:00:00"
},
"address": {
"id": "08652d86-4deb-47b0-aa26-5c1fc393f37a",
"placeId": "ChIJGc-Qb6FhLxMR8fpnf_c116A",
"text": "Via Marsala, 29H, 00185 Roma RM, Italy",
"point": {
"lat": 41.901489,
"lng": 12.5031044
}
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Reserved delivery time identifier. UUID format |
orderId | string | true |
Order identifier. UUID format. If the reservation was created in address mode this value will be null . |
sorting | int | false |
Priority of the order within the delivery |
exitAt | string | false |
Time when the delivery start |
returnAt | string | false |
Time when the delivery end |
reservedUntilAt | string | false |
Time in which the reservation will no longer be valid |
deliveryTime | string | false |
Order delivery time based calculated based on the desired delivery time, order priority and optimal route calculation |
workshift | object | false |
An object that contains the workshift information |
address | object | false |
An object that contains the address information |
Errors
Status code: 422
Validation fail
Status code: 404
Invalid workshift identifier
Status code: 401
Invalid bearer token
Reserve take-away time
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/workshift/{ID}/take-away/time/reserve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'order' => 'UUID',
'mode' => 'order',
'takeAwayTime' => '2021-03-09 20:35:00',
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/workshift/{ID}/take-away/time/reserve \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"order": "UUID",
"mode": "order",
"takeAwayTime": "2021-03-09 20:35:00"
}'
fetch("https://pubapi.deliverart.it/workshift/{ID}/take-away/time/reserve", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"order": "UUID",
"mode": "order",
"takeAwayTime": "2021-03-09 20:35:00"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the workshift identifier.
This call reserve a delivery time for a specific order
HTTP Request
POST https://pubapi.deliverart.it/workshift/{ID}/take-away/time/reserve
Available user types
ALL
Available auth scopes
order_create
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"order": "UUID",
"mode": "order",
"takeAwayTime": "2021-03-09 20:35:00"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
order | string | false |
isEmpty validStatus validOrderType hasCustomer noReservedTakeAwayTime |
Order identifier |
mode | string | false |
invalid |
How to reserve a time. It is possible to reserve a time for an order being defined or without any order (new mode). Available values: order without_order . Default value: order |
takeAwayTime | string | true |
isEmpty validDateTime |
Take away time to reserve |
Success response
{
"id": "UUID",
"orderId": "UUID",
"takeAwayTime": "2021-03-09 13:00:00",
"reservedUntilAt": "2021-03-09 10:55:24",
"workshift": {
"id": "c856cc58-80bf-42c8-976a-bfde2d3c0594",
"duration": 480,
"start": "2021-03-09 13:00:00",
"end": "2021-03-09 21:00:00"
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Reserved delivery time identifier. UUID format |
orderId | string | true |
Order identifier. UUID format. If the reservation was created in order mode this value will be null . |
takeAwayTime | string | false |
Desired take away time |
reservedUntilAt | string | false |
Time in which the reservation will no longer be valid |
workshift | object | false |
An object that contains the workshift information |
Errors
Status code: 422
Validation fail
Status code: 404
Invalid workshift identifier
Status code: 401
Invalid bearer token
Delivery time / Detail / By order
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/reserved/delivery/time",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/order/{ID}/reserved/delivery/time \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/order/{ID}/reserved/delivery/time", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint will return the delivery time reservation info
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/reserved/delivery/time
Available user types
ALL
Available auth scopes
order_create
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"orderId": "UUID",
"sorting": 0,
"exitAt": "2021-03-09 20:49:09",
"returnAt": "2021-03-09 21:12:08",
"reservedUntilAt": "2021-03-09 10:35:49",
"deliveryTime": "2021-03-09 21:00:00",
"workshift": {
"id": "c856cc58-80bf-42c8-976a-bfde2d3c0594",
"duration": 480,
"start": "2021-03-09 13:00:00",
"end": "2021-03-09 21:00:00"
},
"address": {
"id": "08652d86-4deb-47b0-aa26-5c1fc393f37a",
"placeId": "ChIJGc-Qb6FhLxMR8fpnf_c116A",
"text": "Via Marsala, 29H, 00185 Roma RM, Italy",
"point": {
"lat": 41.901489,
"lng": 12.5031044
}
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Reserved delivery time identifier. UUID format |
order | string | true |
Order identifier. UUID format. If the reservation was created in address mode this value will be null . |
sorting | int | false |
Priority of the order within the delivery |
exitAt | string | false |
Time when the delivery start |
returnAt | string | false |
Time when the delivery end |
reservedUntilAt | string | false |
Time in which the reservation will no longer be valid |
deliveryTime | string | false |
Order delivery time based calculated based on the desired delivery time, order priority and optimal route calculation |
workshift | object | false |
An object that contains the workshift information |
address | object | false |
An object that contains the address information |
Errors
Status code: 404
Invalid order id or no reserved delivery time
Status code: 401
Invalid bearer token
Delivery time / Detail / By identifier
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/reserved/delivery/time/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/reserved/delivery/time/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/reserved/delivery/time/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint will return the delivery time reservation info
HTTP Request
POST https://pubapi.deliverart.it/reserved/delivery/time/{ID}/detail
Available user types
ALL
Available auth scopes
order_create
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"orderId": null,
"sorting": 0,
"exitAt": "2021-03-09 20:49:09",
"returnAt": "2021-03-09 21:12:08",
"reservedUntilAt": "2021-03-09 10:35:49",
"deliveryTime": "2021-03-09 21:00:00",
"workshift": {
"id": "c856cc58-80bf-42c8-976a-bfde2d3c0594",
"duration": 480,
"start": "2021-03-09 13:00:00",
"end": "2021-03-09 21:00:00"
},
"address": {
"id": "08652d86-4deb-47b0-aa26-5c1fc393f37a",
"placeId": "ChIJGc-Qb6FhLxMR8fpnf_c116A",
"text": "Via Marsala, 29H, 00185 Roma RM, Italy",
"point": {
"lat": 41.901489,
"lng": 12.5031044
}
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Reserved delivery time identifier. UUID format |
order | string | true |
Order identifier. UUID format. If the reservation was created in address mode this value will be null . |
sorting | int | false |
Priority of the order within the delivery |
exitAt | string | false |
Time when the delivery start |
returnAt | string | false |
Time when the delivery end |
reservedUntilAt | string | false |
Time in which the reservation will no longer be valid |
deliveryTime | string | false |
Order delivery time based calculated based on the desired delivery time, order priority and optimal route calculation |
workshift | object | false |
An object that contains the workshift information |
address | object | false |
An object that contains the address information |
Errors
Status code: 404
Invalid order id or no reserved delivery time
Status code: 401
Invalid bearer token
Delivery time / Delete / By order
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/reserved/delivery/time/remove",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/reserved/delivery/time/remove \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/order/{ID}/reserved/delivery/time/remove", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint will cancel the delivery time reservation
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/reserved/delivery/time/remove
Available user types
ALL
Available auth scopes
order_create
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
Status code: 200
No body response returned
Delivery time / Delete / By identifier
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/reserved/delivery/time/{ID}/remove",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/reserved/delivery/time/{ID}/remove \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/reserved/delivery/time/{ID}/remove", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the reserved delivery time identifier.
This endpoint will cancel the delivery time reservation
HTTP Request
POST https://pubapi.deliverart.it/reserved/delivery/time/{ID}/remove
Available user types
ALL
Available auth scopes
order_create
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
Status code: 200
No body response returned
Take-away time / Detail / By order
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/reserved/take-away/time",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/order/{ID}/reserved/take-away/time \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/order/{ID}/reserved/take-away/time", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint will return the take away time reservation info
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/reserved/take-away/time
Available user types
ALL
Available auth scopes
order_create
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"orderId": "UUID",
"takeAwayTime": "2021-03-09 13:00:00",
"reservedUntilAt": "2021-03-09 10:55:24",
"workshift": {
"id": "c856cc58-80bf-42c8-976a-bfde2d3c0594",
"duration": 480,
"start": "2021-03-09 13:00:00",
"end": "2021-03-09 21:00:00"
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Reserved delivery time identifier. UUID format |
orderId | string | true |
Order identifier. UUID format. If the reservation was created in order mode this value will be null . |
takeAwayTime | string | false |
Desired take away time |
reservedUntilAt | string | false |
Time in which the reservation will no longer be valid |
workshift | object | false |
An object that contains the workshift information |
Errors
Status code: 404
Invalid order id or no reserved take away time
Status code: 401
Invalid bearer token
Take-away time / Detail / By identifier
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/reserved/take-away/time/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/reserved/take-away/time/{ID}/detail \
--header 'authorization: Bearer {ACCESS_TOKEN}' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/reserved/take-away/time/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the reservation take-away time identifier.
This endpoint will return the take away time reservation info
HTTP Request
POST https://pubapi.deliverart.it/reserved/take-away/time/{ID}/detail
Available user types
ALL
Available auth scopes
order_create
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"orderId": "UUID",
"takeAwayTime": "2021-03-09 13:00:00",
"reservedUntilAt": "2021-03-09 10:55:24",
"workshift": {
"id": "c856cc58-80bf-42c8-976a-bfde2d3c0594",
"duration": 480,
"start": "2021-03-09 13:00:00",
"end": "2021-03-09 21:00:00"
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Reserved delivery time identifier. UUID format |
orderId | string | true |
Order identifier. UUID format. If the reservation was created in order mode this value will be null . |
takeAwayTime | string | false |
Desired take away time |
reservedUntilAt | string | false |
Time in which the reservation will no longer be valid |
workshift | object | false |
An object that contains the workshift information |
Errors
Status code: 404
Invalid order id or no reserved take away time
Status code: 401
Invalid bearer token
Take-away time / Delete / By order
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/order/{ID}/reserved/take-away/time/remove",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/order/{ID}/reserved/take-away/time/remove \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/order/{ID}/reserved/take-away/time/remove", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the order identifier.
This endpoint will cancel the take away time reservation
HTTP Request
POST https://pubapi.deliverart.it/order/{ID}/reserved/take-away/time/remove
Available user types
ALL
Available auth scopes
order_create
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
Status code: 200
No body response returned
Take-away time / Delete / By identifier
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/reserved/take-away/time/{ID}/remove",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/reserved/take-away/time/{ID}/remove \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/reserved/take-away/time/{ID}/remove", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the reservation take-away time identifier.
This endpoint will cancel the take away time reservation
HTTP Request
POST https://pubapi.deliverart.it/reserved/take-away/time/{ID}/remove
Available user types
ALL
Available auth scopes
order_create
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
Status code: 200
No body response returned
Deliveries
Create
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/delivery/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reservedDeliveryTime' => 'UUID',
'applyDeliveryFee' => false,
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/delivery/create \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"reservedDeliveryTime": "UUID",
"applyDeliveryFee": false
}'
fetch("https://pubapi.deliverart.it/delivery/create", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"reservedDeliveryTime": "UUID",
"applyDeliveryFee": false
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This call will complete the order and create a new delivery using the delivery time reservation
HTTP Request
POST https://pubapi.deliverart.it/delivery/create
Available user types
ALL
Available auth scopes
order_create
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"reservedDeliveryTime": "UUID",
"applyDeliveryFee": false
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
reservedDeliveryTime | string | true |
isEmpty valid |
Order identifier to retrieve the reserved delivery time |
applyDeliveryFee | bool | false |
Use this flag to override the delivery fee calculation |
Success response
{
"id": "UUID",
"status": "waiting_for_orders",
"exitTime": {
"estimated": "2021-03-09 20:14:09",
"accurate": "2021-03-09 20:14:09",
"real": null
},
"returnTime": {
"estimated": "2021-03-09 20:37:08",
"real": null
},
"deliveries": [
{
"id": "UUID",
"sorting": 1,
"deliveryTime": {
"estimated": "2021-03-09 20:25:00",
"real": null
},
"order": {
"id": "UUID",
"source": "deliverart",
"code": null,
"amount": 6,
"vatAmount": 0.5455,
"netAmount": 5.4545,
"type": "managed",
"status": "valid",
"preparationStatus": "in_preparation",
"payment": {
"method": "undefined",
"status": "waiting"
},
"meta": [],
"bundle": null,
"times": {
"created": "2021-03-09 13:49:40",
"estimatedPreparationEnd": "2021-03-09 20:12:09"
}
}
}
]
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Delivery identifier. UUID format |
status | string | false |
Delivery status. Available values are: canceled waiting_for_orders ready_to_take_charge taken_over delivery_started delivery_finished |
exitTime | object | false |
An object that contains the Estimated and real time information for the exit of the courier from the point of sale |
returnTime | object | false |
An object that contains the Estimated and real time information for the return of the courier to the point of sale |
deliveries | array | false |
An array object that contains a list of Delivery order objects |
Exit
Parameter | Type | Nullable | Description |
---|---|---|---|
estimated | string | false |
Estimated exit time |
accurate | string | false |
Accurate exit time based on end preparation time |
real | string | false |
Real exit time |
Delivery order
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Delivery order identifier. UUID format |
sorting | int | false |
Priority of the order within the delivery |
deliveryTime | object | false |
An object that contains the Estimated and real time information for delivery time |
order | object | false |
An object that contains a subset of the Order information |
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/delivery/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer ACCESS_TOKEN",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/delivery/{ID}/detail \
--header 'authorization: Bearer ACCESS_TOKEN' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/delivery/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer ACCESS_TOKEN"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the delivery identifier.
This endpoint will return the delivery detail
HTTP Request
GET https://pubapi.deliverart.it/delivery/{ID}/detail
Available user types
manager
manager_2_level
courier
Available auth scopes
delivery_read
delivery_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"status": "delivery_finished",
"courier": {
"id": "UUID",
"firstName": "Mario",
"lastName": "Ferreri",
"fullName": "Mario Ferreri",
"mobilePhoneNumber": "+393345948369"
},
"exitTime": {
"estimated": "2019-02-25 15:10:27",
"accurate": "2019-02-25 15:10:27",
"real": "2019-02-25 15:45:28"
},
"returnTime": {
"estimated": "2019-02-25 15:20:48",
"real": "2019-02-25 15:45:36"
},
"deliveryOrders": [
{
"id": "UUID",
"orderId": "UUID",
"delivered": true,
"sorting": 1,
"deliveryTime": {
"estimated": "2019-02-25 15:15:00",
"real": "2019-02-25 15:45:32"
},
"customer": {
"id": "UUID",
"totalOrders": 94,
"phoneNumber": "+39xxxxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi",
"fullName": "Mario Rossi",
"email": "mario.rossi@email.com"
},
"customerAddress": {
"id": "UUID",
"main": false,
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": null,
"internal": null,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
"order": {
"id": "UUID",
"source": "customer",
"code": "A1000",
"externalCode": null,
"amount": 48,
"vatAmount": 4.8,
"netAmount": 43.2,
"type": "managed",
"status": "valid",
"preparationStatus": "done",
"payment": {
"method": "cash",
"status": "paid"
},
"costs": [
{
"id": "36523859-a745-488f-ba7a-5ce9349ba5f3",
"code": "coupon",
"label": "Coupon",
"type": "SUB",
"amount": 5,
"vatAmount": 0,
"netAmount": 5,
"realAmount": -5,
"realNetAmount": -5,
"realVatAmount": 0,
"meta": {
"code": "ACME5EURO"
}
}
],
"meta": [],
"times": {
"created": "2020-08-09 17:00:28",
"estimatedPreparationEnd": "2020-08-09 17:38:03",
"preparationStart": "2020-07-22 20:53:57",
"preparationEnd": null
},
"note": null,
"referenceMenu": {
"id": "ae32a0b2-c8ec-412b-8690-16104ce56ee0",
"name": "Lorem ipsum"
},
"customer": {
"id": "UUID",
"totalOrders": 1,
"phoneNumber": "+390000000000",
"firstName": "Mario",
"lastName": "Rossi",
"fullName": "Mario Rossi",
"email": "mario.rossi@email.com"
},
"customerAddress": {
"id": "UUID",
"main": false,
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": null,
"internal": null,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
"customerBusinessProfile": {
"id": "UUID",
"businessCountry": "IT",
"businessName": "Acme",
"vat": "xxxxxxxxxx",
"pec": "mario.rossi@pec.it",
"sdi": null,
"fiscalCode": "xxxxxxxxxx",
"main": true,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
},
"items": [
{
"id": "UUID",
"amount": 14,
"vatAmount": 1.4,
"netAmount": 12.6,
"note": "Lorem ipsum dolor sit amet",
"variants": [],
"menuItem": {
"id": "UUID",
"name": "Lorem ipsum",
"description": "Lorem ipsum dolor sit amet",
"price": 14,
"vatAmount": 1.4,
"netPrice": 12.6,
"vat": 10,
"category": {
"id": "UUID",
"sorting": 0,
"name": "Lorem ipsum"
}
}
},
{
"id": "UUID",
"amount": 9,
"vatAmount": 0.8182,
"netAmount": 8.1818,
"note": null,
"variants": [
{
"id": "UUID",
"action": "add",
"ingredient": {
"id": "UUID",
"name": "Lorem ipsum"
},
"priceImpact": 2,
"vatAmount": 0.1818,
"netPriceImpact": 1.8182
}
],
"menuItem": {
"id": "UUID",
"name": "Lorem ipsum",
"description": null,
"price": 7,
"vatAmount": 0.6364,
"netPrice": 6.3636,
"vat": 10,
"category": {
"id": "UUID",
"sorting": 31,
"name": "Lorem ipsum"
}
}
},
...
]
},
"tracking": {
"scope": "TRACKING",
"method": "POST",
"endpoint": "https://courier-geolocation.deliverart.it/tracking",
"token": "XXXXXXX"
}
},
...
],
"tracking": {
"scope": "READ",
"method": "GET",
"endpoint": "https://courier-geolocation.deliverart.it/tracking",
"token": "XXXXXXX"
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Delivery identifier. UUID format |
status | string | false |
Delivery status. Available values are: canceled waiting_for_orders ready_to_take_charge taken_over delivery_started delivery_finished |
courier | object | true |
An object that contains the Courier information |
exitTime | object | false |
An object that contains the Estimated and real time information for the exit of the courier from the point of sale |
returnTime | object | false |
An object that contains the Estimated and real time information for the return of the courier to the point of sale |
deliveryOrders | array | false |
An array object that contains a list of Delivery order objects |
tracking | object | true |
An object that contains the Tracking reference. Only the manager and manager_2_level can access this field |
Courier
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Courier identifier. UUID format |
firstName | string | false |
First name |
lastName | string | false |
Last name |
fullName | string | false |
The full name |
mobilePhoneNumber | string | false |
Telephone contact of the courier |
Exit time
Parameter | Type | Nullable | Description |
---|---|---|---|
estimated | string | false |
Estimated exit time |
accurate | string | false |
Accurate exit time based on end preparation time |
real | string | false |
Real exit time |
Delivery order
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Delivery order identifier. UUID format |
orderId | string | false |
Order identifier. UUID format |
delivered | bool | false |
Flag indicating whether the order has been delivered |
sorting | int | false |
Priority of the order within the delivery |
deliveryTime | object | false |
An object that contains the Estimated and real time information for the delivery time |
customer | object | false |
Object that contains the customer information |
customerAddress | array | false |
An object that contains the Customer address information |
tracking | object | true |
An object that contains the Tracking reference. Only the courier can access this field |
order | object | true |
An object that contains the Order reference |
Delivery order - Customer address
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Customer address identifier. UUID format |
main | bool | false |
Flag indicating whether it is the default address |
intercom | string | false |
Intercom |
building | string | true |
Building |
ladder | string | true |
Ladder |
floor | string | true |
Floor |
internal | string | true |
Internal |
address | object | false |
An object that contains the address information |
Order
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Order identifier. UUID format |
source | string | false |
Source of the order. Example deliverart or customer |
code | string | false |
Code of the order |
externalCode | string | true |
Possible reference for an external order code. Eg: UberEats order number |
amount | float | false |
Total order amount |
vatAmount | float | false |
Only vat amount |
netAmount | float | false |
Amount without vat |
type | string | false |
Order type. Available values: managed unmanaged take_away |
status | string | false |
Order status. Available values: to_be_defined aborted valid canceled |
preparationStatus | string | false |
Preparation status. Available values: to_prepare in_preparation done |
note | string | true |
Additional note |
meta | array or object | false |
Additional metadata for the order |
bundle | string | true |
If the order is within a bundle, this field displays the bundle identifier. UUID format |
referenceMenu | object | true |
Object that contains the referenceMenu information |
payment | object | false |
Object that contains the payment information |
costs | array | false |
An array object that contains a list of cost objects. Can be empty |
times | object | false |
Object that contains the times information |
customer | object | false |
Object that contains the customer information |
customerAddress | object | false |
Object that contains the customer address information |
customerBusinessProfile | object | true |
Object that contains the customer business profile information |
items | object | false |
List of the order menu items |
Reference menu
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Menu identifier. UUID format |
name | string | false |
Menu name |
Payment
Parameter | Type | Nullable | Description |
---|---|---|---|
method | string | false |
Payment method. Available values: undefined cash credit_card paypal satispay transfer |
status | string | false |
Payment status. Available values: waiting paid canceled refunded |
Cost
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Cost identifier. UUID format |
code | string | false |
Code identifier. Available values are: coupon discount shipping_cost |
label | string | false |
Code translation |
type | string | false |
Action type for the variant. Available values: ADD SUB |
amount | float | false |
Total for the cost, including taxes |
vatAmount | float | false |
Vat amount |
netAmount | float | false |
Total excluding taxes |
realAmount | float | false |
Total for the cost, including taxes. Can be negative if the typeis SUB |
realVatAmount | float | false |
Vat amount. Can be negative if the typeis SUB |
realNetAmount | float | false |
Total excluding taxes. Can be negative if the typeis SUB |
meta | array or object | false |
Additional metadata of the cost |
Times
Parameter | Type | Nullable | Description |
---|---|---|---|
created | string | false |
Creation time. Format: YYYY-MM-DD HH:mm:ss |
estimatedPreparationEnd | string | false |
Estimated end preparation time. Format: YYYY-MM-DD HH:mm:ss |
preparationStart | string | true |
Preparation start time. Format: YYYY-MM-DD HH:mm:ss |
preparationEnd | string | true |
End preparation time. Format: YYYY-MM-DD HH:mm:ss |
Item
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Order menu item identifier. UUID format |
amount | float | false |
Total for the quantity you select, including taxes |
vatAmount | float | false |
Vat amount for the quantity you select |
netAmount | float | false |
Total for the quantity you select, excluding taxes |
note | string | true |
Additional note for the item |
variants | object | false |
List of the variants for the menu item |
menuItem | object | false |
An object that contains the address information |
Item - Variant
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Menu item variant identifier. UUID format |
action | string | false |
Action type for the variant. Available values: add sub |
priceImpact | float | false |
Impact on item price |
vatAmount | float | false |
Vat amount |
netPriceImpact | float | false |
Impact on item price excluding taxes |
ingredient | object | false |
An object that contains the ingredient information |
Item - Variant - ingredient
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Menu item variant identifier. UUID format |
name | string | false |
Ingredient name |
Item - Menu item
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Menu item identifier. UUID format |
name | string | false |
Product name |
description | string | true |
Product description |
price | float | false |
Item price |
vatAmount | float | false |
Vat amount |
netPrice | float | false |
Price excluding taxes |
vat | int | false |
Vat percentage |
category | object | false |
An object that contains the category information |
Errors
Status code: 404
Invalid delivery id
Status code: 403
You cannot access this delivery
Status code: 401
Invalid bearer token
Take charge
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/delivery/{ID}/take",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/delivery/{ID}/take \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/delivery/{ID}/take", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the delivery identifier.
This call will take charge the delivery by the courier
HTTP Request
POST https://pubapi.deliverart.it/delivery/{ID}/take
Available user types
courier
Available auth scopes
ALL
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
No body parameters
Success response
No body response returned
Status code: 200
Errors
Status code: 403
You cannot access this delivery
Status code: 401
Invalid bearer token
Start
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/delivery/{ID}/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/delivery/{ID}/start \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/delivery/{ID}/start", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the delivery identifier.
This call will start a delivery
HTTP Request
POST https://pubapi.deliverart.it/delivery/{ID}/start
Available user types
manager
manager_2_level
courier
Available auth scopes
delivery_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
No body parameters
Success response
No body response returned
Status code: 200
Errors
Status code: 403
You cannot access this delivery
Status code: 401
Invalid bearer token
Order delivered
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/delivery/order/{ID}/delivered",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/delivery/order/{ID}/delivered \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/delivery/order/{ID}/delivered", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the delivery order identifier.
This call will set an order as delivered
HTTP Request
POST https://pubapi.deliverart.it/delivery/order/{ID}/delivered
Available user types
manager
manager_2_level
courier
Available auth scopes
delivery_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
No body parameters
Success response
No body response returned
Status code: 200
Errors
Status code: 403
You cannot access this delivery
Status code: 401
Invalid bearer token
End
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/delivery/{ID}/end",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/delivery/{ID}/end \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
fetch("https://pubapi.deliverart.it/delivery/{ID}/end", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the delivery identifier.
This call will end a delivery
HTTP Request
POST https://pubapi.deliverart.it/delivery/{ID}/end
Available user types
manager
manager_2_level
courier
Available auth scopes
delivery_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
No body parameters
Success response
No body response returned
Status code: 200
Errors
Status code: 403
You cannot access this delivery
Status code: 401
Invalid bearer token
Take away
Create
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/take-away/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reservedTakeAwayTime' => 'UUID',
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {ACCESS_TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url https://pubapi.deliverart.it/take-away/create \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data '{
"reservedTakeAwayTime": "UUID"
}'
fetch("https://pubapi.deliverart.it/take-away/create", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {ACCESS_TOKEN}"
},
"body": {
"reservedTakeAwayTime": "UUID"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow.
This call will complete the order and create a new take away using the reservation time
HTTP Request
POST https://pubapi.deliverart.it/take-away/create
Available user types
ALL
Available auth scopes
order_create
order_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"reservedTakeAwayTime": "UUID"
}
Format: JSON
Parameter | Type | Required | Validation | Description |
---|---|---|---|---|
reservedTakeAwayTime | string | true |
isEmpty valid |
Order identifier to retrieve the reserved take away time |
Success response
{
"id": "610f619e-1030-4a95-b721-0965fb125b4a",
"status": "waiting_for_preparation",
"times": {
"takeAway": "2021-03-09 14:35:00",
"withdrawal": null
},
"order": {
"id": "a93ef221-0455-4b79-bf10-130d8d625f18",
"source": "deliverart",
"code": null,
"amount": 6,
"vatAmount": 0.5455,
"netAmount": 5.4545,
"type": "take_away",
"status": "valid",
"preparationStatus": "in_preparation",
"takeAwayStatus": "waiting_for_preparation",
"meta": [],
"bundle": null,
"times": {
"created": "2021-03-09 13:47:54",
"estimatedPreparationEnd": null
}
},
"workshift": {
"id": "c856cc58-80bf-42c8-976a-bfde2d3c0594",
"duration": 480,
"start": "2021-03-09 13:00:00",
"end": "2021-03-09 21:00:00"
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Delivery identifier. UUID format |
status | string | false |
Take away status. Available values are: waiting_for_preparation waiting_to_be_withdrawn withdrawn not_withdrawn |
times | object | false |
An object that contains the Times information |
order | object | false |
An object that contains a subset of the Order information |
workshift | object | false |
An object that contains the Workshift information |
Times
Parameter | Type | Nullable | Description |
---|---|---|---|
takeAway | string | false |
Desired time to collect the order |
withdrawal | string | true |
Real time of order pickup |
Errors
Status code: 422
Validation fail
Status code: 401
Invalid bearer token
Detail
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pubapi.deliverart.it/take-away/{ID}/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"authorization: Bearer ACCESS_TOKEN",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url https://pubapi.deliverart.it/take-away/{ID}/detail \
--header 'authorization: Bearer ACCESS_TOKEN' \
--header 'content-type: application/json'
fetch("https://pubapi.deliverart.it/take-away/{ID}/detail", {
"method": "GET",
"headers": {
"content-type": "application/json",
"authorization": "Bearer ACCESS_TOKEN"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ACCESS_TOKEN
with the token obtained from the authentication flow and theID
with the take-away identifier.
This endpoint will return the take-away detail
HTTP Request
GET https://pubapi.deliverart.it/take-away/{ID}/detail
Available user types
manager
manager_2_level
Available auth scopes
take_away_read
take_away_admin
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer ACCESS_TOKEN |
content-type | string | true |
Accepted only the application/json value |
Success response
{
"id": "UUID",
"status": "waiting_to_be_withdrawn",
"takeAwayTime": "2021-05-12 18:00:00",
"withdrawalTime": null,
"orderId": "UUID",
"customer": {
"id": "UUID",
"totalOrders": 94,
"phoneNumber": "+39xxxxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi",
"fullName": "Mario Rossi",
"email": "mario.rossi@email.com"
}
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Take away identifier. UUID format |
status | string | false |
Take away status. Available values are: waiting_for_preparation waiting_to_be_withdrawn withdrawn not_withdrawn |
takeAwayTime | string | false |
Desired time to collect the order |
withdrawalTime | string | true |
Real time of order pickup |
orderId | string | false |
Order identifier. UUID format |
customer | object | false |
Object that contains the customer information |
Errors
Status code: 404
Invalid take-away id
Status code: 403
You cannot access this take-away
Status code: 401
Invalid bearer token
Tracking
Send the courier position
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "{ENDPOINT}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"lat" => 41.9109,
"lng" => 12.4818,
]),
CURLOPT_HTTPHEADER => [
"authorization: Bearer {TOKEN}",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request POST \
--url {ENDPOINT} \
--header 'authorization: Bearer {TOKEN}' \
--header 'content-type: application/json' \
--data '{
"lat": 41.9109,
"lng": 12.4818
}'
fetch("{ENDPOINT}", {
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {TOKEN}"
},
"body": {
"lat": 41.9109,
"lng": 12.4818
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
Make sure to replace
ENDPOINT
withtracking.endpoint
value andTOKEN
withtracking.token
. See the delivery detail
To send the courier's position during the delivery of one or more orders, it is necessary to retrieve the tracking references in the tracking
object within each Delivery Order. Only the courier authorized to delivery will have access to this information.
See the delivery detail
HTTP Request
POST {ENDPOINT}
Header Parameters
Parameter | Type | Required | Description |
---|---|---|---|
authorization | string | true |
You provide the access_token as Token authentication. Use this syntax: Authorization: Bearer TOKEN |
content-type | string | true |
Accepted only the application/json value |
Body Parameters
{
"lat": 41.9109,
"lng": 12.4818
}
Format: JSON
Parameter | Type | Required | Description |
---|---|---|---|
lat | float | true |
Latitude |
lng | float | true |
Longitude |
Success response
{
"id": "UUID",
"courierId": "UUID",
"orderId": "UUID",
"deliveryId": "UUID",
"posId": "UUID",
"companyId": "UUID",
"lat": 41.9109,
"lng": 12.4818,
"createdAt": 1624441958
}
Status code: 200
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Unique tracking identifier. UUID format |
courierId | string | false |
Courier identifier. UUID format |
orderId | string | false |
Order identifier. UUID format |
deliveryId | string | false |
Delivery identifier. UUID format |
posId | string | false |
Point of sale identifier. UUID format |
companyId | string | false |
Company identifier. UUID format |
lat | float | false |
Latitude |
lng | float | false |
Longitude |
createdAt | int | false |
Creation timestamp |
Common objects
Menu / Category
{
"id": "UUID",
"sorting": 0,
"name": "Category name",
"description": "Category description",
"meta": []
}
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Category identifier. UUID format |
sorting | int | false |
Sorting of the category. Useful for building a menu list |
name | string | false |
Category name |
meta | array or object | false |
Additional metadata for the category |
Estimated and real times
{
"estimated": "2021-03-09 19:54:09",
"real": null
}
Parameter | Type | Nullable | Description |
---|---|---|---|
estimated | string | false |
Estimated time |
real | string | false |
Real time |
Point
{
"lat": 41,
"lng": 12
}
Parameter | Type | Nullable | Description |
---|---|---|---|
lat | float | false |
Latitude |
lng | float | false |
Longitude |
Address
{
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Address identifier |
placeId | float | false |
Google place ID |
text | float | false |
Google formatted address |
point | object | false |
Address coordinates |
Customer address
{
"id": "UUID",
"main": false,
"intercom": "Mario Rossi",
"building": null,
"ladder": null,
"floor": 3,
"internal": null,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
}
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Customer address identifier. UUID format |
main | bool | false |
Flag indicating whether it is the default address |
intercom | string | false |
Intercom |
building | string | true |
Building |
ladder | string | true |
Ladder |
floor | string | true |
Floor |
internal | string | true |
Internal |
address | object | false |
An object that contains the address information |
Customer
{
"id": "UUID",
"totalOrders": 1,
"phoneNumber": "+39xxxxxxxxxx",
"firstName": "Mario",
"lastName": "Rossi",
"fullName": "Mario Rossi",
"email": "mario.rossi@email.com"
}
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Customer identifier. UUID format |
totalOrders | int | false |
Number of orders |
phoneNumber | string | false |
Telephone contact of the user |
firstName | string | true |
First name |
lastName | string | true |
Last name |
fullName | string | true |
The full name |
string | true |
The email contact |
Customer business profile
{
"id": "UUID",
"businessCountry": "IT",
"businessName": "Acme",
"vat": "xxxxxxxxxx",
"pec": "mario.rossi@pec.it",
"sdi": null,
"fiscalCode": "xxxxxxxxxx",
"main": true,
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
}
Parameter | Type | Nullable | Only for country | Description |
---|---|---|---|---|
id | string | false |
ALL | Allergen identifier. UUID format |
businessCountry | string | false |
ALL | Business profile country. Eg: IT |
businessName | string | false |
ALL | Business name |
vat | int | false |
ALL | VAT |
main | bool | false |
ALL | Flag indicating whether the profile is the default company profile |
fiscalCode | string | false |
IT |
The italian fiscal code fo the customer |
pec | string | true |
IT |
Certified email address |
sdi | string | true |
IT |
SDI code for the electronic invoice |
address | object | false |
ALL | An object that contains the address information |
Company
{
"id": "UUID",
"name": "NAME OF COMPANY"
}
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Company identifier. UUID format |
name | string | false |
Name of the company |
Point of sale
{
"id": "UUID",
"name": "NAME OF POS",
"address": {
"id": "UUID",
"placeId": "GOOGLE_PLACE_ID",
"text": "ADDRESS",
"point": {
"lat": 41,
"lng": 12
}
}
}
Parameter | Type | Nullable | Description |
---|---|---|---|
id | string | false |
Point of sale identifier. UUID format |
name | string | false |
Name of the point of sale |
address | object | false |
An object that contains the address information |
Pagination
{
"page": 1,
"totalItems": 30,
"pageSize": 30,
"pageCount": 1
}
Parameter | Type | Nullable | Description |
---|---|---|---|
page | int | false |
Current page number |
totalItems | int | false |
Total items found |
pageSize | int | false |
Number of items for each request |
pageCount | int | false |
Max number of the pages |
Tracking
{
"scope": "READ",
"method": "GET",
"endpoint": "https://courier-geolocation.deliverart.it/tracking",
"token": "XXXXXXX"
}
Parameter | Type | Nullable | Description |
---|---|---|---|
scope | string | false |
Tracking scope. Available values are: READ TRACKING |
method | string | false |
HTTP method to call the endpoint. Available values are: GET for the READ scope. POST for the TRACKING scope |
endpoint | string | false |
Endpoint to call |
token | string | false |
Token to be passed in the request header. Eg: Authorization: Bearer XXXX |
Errors
Code | Title | Meaning |
---|---|---|
401 | Unauthorized | Your API key is wrong. |
403 | Forbidden | You requested an inaccessible resource. |
404 | Not Found | The specified kitten could not be found. |
405 | Method Not Allowed | You tried to access a kitten with an invalid method. |
422 | Unprocessable Entity | There is some data validation error. |
500 | Internal Server Error | We had a problem with our server. Try again later. |
{
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "invalid_grant",
"status": 401,
"detail": "Invalid username and password combination"
}
This above is an example of the 401 error response
Parameter | Type | Nullable | Description |
---|---|---|---|
type | string | false |
Reference to the rfc protocol |
title | string | false |
Code of the error |
status | int | false |
Http code of the error |
detail | string | false |
Description of the error |
{
"validation_messages": {
"mobilePhoneNumber": {
"isEmpty": "mobile_phone_number.required"
}
},
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "Unprocessable Entity",
"status": 422,
"detail": "Failed Validation"
}
This above is an example of the 401 error response
Parameter | Type | Nullable | Description |
---|---|---|---|
type | string | false |
Reference to the rfc protocol |
title | string | false |
Code of the error |
status | int | false |
Http code of the error |
detail | string | false |
Description of the error |
validation_messages | object | false |
Object with the wrong fields. The first level of the keys are the field names. Inside are the error keys and their descriptive code |
Guides
In this section you can view useful guides for integration with our systems
Menu
Deliverart is able to manage simple menus, with ingredients and variations or the latter through selection rules.
You can create different menus to be used for example in direct order taking or specific menus for mini-site or external additions such as JustEat.
Preliminary steps
Simple product
To define a simple product you just need to indicate in the bees the category, the VAT department, the final price (including VAT) and define the name and description for the translation language that best suits your needs.
Produced with basic ingredients and / or variants
A product with basic ingredients and/or variants has the same characteristics as a simple product with the addition of the compositions
field specifying an array of objects that contain: ingredient identifier, type (if it is a basic ingredient or a variant), and any price change (valid only for variants).
Produced with the rules
This type of product is very similar to the product with ingredients and/or variants. The peculiarity is that you can add a series of rules that force you to select and/or limit the selection of variants.
Each rule has its own translation and the ordering is given by the order within the array in the rules
field. To insert the variants within the rules, you will need to define a unique identifier for each rule and specify it in the rule
field of the variant.
Things to know
Each product can be suspended from sale and subsequently restored. The same can be said for the ingredients.
Any modification, cancellation or suspension operation will be instantly reported in the additions linked to the menu.
Customer
Deliverart offers the ability to manage a customer database by collecting information from all sources of entry such as: management, ecommerce, integrations.
The customer database allows you to manage personal and contact information, the addresses used when taking an order and billing information.
The customer is uniquely identified by his telephone number which is a fundamental condition for the creation of a new registry.
Address
To create an address card for the customer, it is necessary to create a simple address and retrieve his identifier. To do this Deliverart provides two APIs:
After carrying out this procedure, simply follow the instructions given in this chapter
Business profile
The management of a business profile requires, as for the address section, the identification of a simple address. The peculiarity lies in the choice of country as the parameters to be specified in the businessInfo field change depending on the country.
Order
The creation of an order is divided into two distinct strands but with characteristics in common. The two strands can be identified in the two methods of order taking: takeaway or delivery. The difference between the two lies in the management of the address and the retrieval of available times based on the calculation system that Deliverart makes available. Everything else is common to both types of orders.
We suggest a stack of actions that do not necessarily need to be performed in this sequence.
1 - Selection of items
The first thing we suggest is to identify all the items that need to be added to the order. They will have to be organized in an array of objects and each object identifies the single product within the cart. For example, if two or more identical items are to be entered, as many objects as there are items to be added must be created. For each item it is possible to specify a note which will then be read by the manager and the kitchen. If an item has variations or mandatory rules, they must be specified in the manner described in this section.
Once this is done, we recommend setting this array aside to move on to the next step without making any api calls at the moment other than those necessary to retrieve the correct menu.
2 - Customer selection
The customer can be searched through his mobile number (which as we have indicated is the unique factor of the personal data) or the complete list of customers can be downloaded via an api call by retrieving the url in the meta of the retail store meta.cache.customers
. If the customer is not present, a new card must be created.
In both cases it will be necessary to set aside the customer identification.
If the customer needs an invoice, his billing master data (present in the customer detail API) will have to be retrieved or a new billing master must be created.
In both cases, it will be necessary to set aside the billing identification identifier.
In the case of home delivery, it will be necessary to retrieve the customer's address (present in the customer detail API) or create a new registry in the event of a new address.
In both cases it will be necessary to set aside the identification of the customer's address.
3 - Time selection
The time selection is made by retrieving the list of work shifts and subsequently, based on the type of order (takeaway or delivery), you will have to query the specific API, where in the case of home delivery it will be essential to use the identifier of the address (not that of the customer database but the identifier that identifies the address within the database).
After identifying the time, you will have to proceed with your reservation. This procedure will block the timetable for a certain period of time so that it cannot be occupied by any other order.
We recommend making a time reservation without using the address mode in the case of a delivery, or with the without_order mode in the case of a take-out. Refer to the documentation here (takeaway / delivery).
In both cases it will be necessary to set aside the identification of the hourly reservation.
4 - Final phase
The final part will be identified by a stack of calls to be made in sequence, passing all the data set aside by the various steps of composing the order.
- Order initialization
- Add any notes
- Adding items
- Adding the customer
- Add business profile (if any)
- Adding the address (if order is delivery)
- Creation of delivery or take away based on the type of order
- Removal of the reservation (delivery / takeaway)
Updates
October 2022
03 Mon - Added delete customer API
It has been added the Customers / Delete
03 Mon - Added customer list API
It has been added the Point of sale / Customers / List
August 2022
12 Fri - Added delivery fee flag during delivery creation
We have added an option during delivery creation that allows you not to apply delivery costs. You can find the documentation here
12 Fri - Added delivery fee management
We have added delivery cost management. You can now add, retrieve and delete delivery costs for your orders
It has been added the Delivery fee / Detail api.
It has been added the Delivery fee / Create api.
It has been added the Delivery fee / Delete api.
It has been added the Point of sale / Delivery fees / List api.
12 Fri - Added apikey authentication
We have added a new way to interact with our APIs. You can find the documentation here
11 Thu - Added more options for the delivery and take-away time reservation flow
The ability to reserve a delivery time without having to initialize an order has been added. Follow the doc api
The ability to reserve a take-away time without having to initialize an order has been added. Follow the doc api
11 Thu - Added API for detail and delete flow for delivery and take-away objects
It has been added the Delivery time / Detail / By identifier api.
It has been added the Delivery time / Delete / By identifier api.
It has been added the Take-away time / Detail / By identifier api.
It has been added the Take-away time / Delete / By identifier api.
April 2022
01 Mon - Added "rules" logic for the menu item
In the API of the detail, creation and updating of menu items, the logic for managing the composition rules of a product has been added.
These rules will have an impact when taking an order where, if a product has rules set, it will be necessary to satisfy them in order to update the list of selected products.
It has been added the Menu / Detail api.
It has been added the Menu / Items / Detail api.
It has been added the Menu / Items / Create api.
It has been added the Menu / Items / Update api.
It has been added the Orders / Update / Items api.
March 2022
24 Thu - Fields exposed for the detail of the menu item
The fields were exposed: editable
deletable
acl
category.meta
category.acl
.
22 Tue - Add allergens field for the ingredient creation API
The fields allergens
has been added in the body payload. Menu / Ingredients / Create api.
21 Mon - Add 3 APIs for menu management
It has been added the Menu / Categories / Update api.
It has been added the Menu / Allergens / Update api.
It has been added the Menu / Ingredients / Resume api.
07 Mon - Fields exposed for the detail of the menu
The fields were exposed: default
acl
.
January 2022
02 Sun - Added the menu item suspension option
In the detail of the menu and of a product, the suspended
field has been added.
It has been added the Menu / Items / Suspend api.
It has been added the Menu / Items / Resume api.
December 2021
07 Tue - Added Point of sale / Settings apis
It has been added the Point of sale / Settings / Detail api.
It has been added the Point of sale / Settings / Update api.
06 Mon - Added Orders / Delete api
It has been added the Orders / Delete api.
November 2021
22 Mon - Added Create / From coordinates api
It has been added the Create / From coordinates api.
21 Sun - Added timezone
field to user profile
It has been added the timezone
field in the profile info and update API. By updating this information you can locate the output date value
06 Sat - Added exit.accurate
field to the delivery
It has been added the exit.accurate
field in the delivery detail to expose the precise moment when a courier should leave the point of sale. This value based on the preparation time: if the order has not yet been executed, this value will have the same value as exit.estimated
, otherwise the value will be calculated from the end of the preparation time.
October 2021
30 Sat - Added the ability to override the price the order menu items
The possibility to overwrite the price of the order menu items by passing the priceOverride
field in the body of the request has been added in the update section of the order items.
The fields originAmount
originVatAmount
originNetAmount
has been added in the body response for the detail sections.