A&Delivery API reference

Welcome to the A&Delivery API!

You can use our API to access A&Delivery API endpoints, which can get information on various datasets in our database. You can view code examples in the designated area to the right.

Contact:

info@A&Delivery.nl
Habraken 2601-2605
5507 TR, Veldhoven
+31 (0)85 - 1301851

                            
                        

How to get started

To start off you will have to connect with the API.

You will be required to use an API key to retrieve any results or make any modifications
The API key can be acquired from A&Delivery.

Check out the references down bellow to see the requests.
Every request got a list with variables which belongs to that specific request.
Be sure to send these variables together with the API key.

To create a delivery you need to send a POST request to https://api.aendelivery.nl/deliveries

Here are the variables that you should send during this POST request:

  • client_id: the id of the client of the delivery
  • drivers_user_id: the id of the driver of the delivery
  • title: the name of the delivery itself
  • business: a boolean for if the delivery is a business delivery or not
  • delivery_comment: additionally you might wanna add a comment to the delivery itself

Click here to go to the full reference of the delivery.

To create a package you need to send a POST request to https://api.aendelivery.nl/packages

Here are the variables that you should send during this POST request:

  • delivery_id: the id of the delivery which you wanna connect to this new package
  • parcel_title: the name of the package itself
  • parcel_type: give 7 for standard and give 8 for direct thus priority

  • parcel_pickup_street: the name of the street of the pick up address
  • parcel_pickup_number: the number of the pick up address
  • parcel_pickup_postal_code: the number of the pick up address
  • parcel_pickup_city: the name of the city of the pick up address
  • parcel_pickup_country: the name of the country of the pick up address
  • parcel_pickup_lat: the latitude of the pick up address
  • parcel_pickup_lon: the longitude of the pick up address
  • parcel_pickup_contact: the contact name of the pick up address
  • parcel_pickup_phone: the phone number of the pick up address
  • parcel_pickup_company: the company name of the pick up address

  • parcel_delivery_street: the name of the street of the drop off address
  • parcel_delivery_number: the number of the drop off address
  • parcel_delivery_postal_code: the number of the drop off address
  • parcel_delivery_city: the name of the city of the drop off address
  • parcel_delivery_country: the name of the country of the drop off address
  • parcel_delivery_lat: the latitude of the drop off address
  • parcel_delivery_lon: the longitude of the drop off address
  • parcel_delivery_contact: the contact name of the drop off address
  • parcel_delivery_phone: the phone number of the drop off address
  • parcel_delivery_company: the company name of the drop off address
  • parcel_delivery_email: the email address of the drop off address
  • parcel_comment: additionally you might wanna add a comment to the package itself

  • length: the length of the package
  • width: the width of the package
  • height: the height of the package
  • weight: the weight of the package

Click here to go to the full reference of the package.

Additionally you can install Postman so you are be able to connect with the API and get results so you are be able to test
You can install Postman here.
                            
                                https://api.aendelivery.nl/deliveries
                                https://api.aendelivery.nl/packages
                            
                        

Authentication

A&Delivery uses API keys to allow access to the API.

You can register a new A&Delivery API key at our developer portal.

A&Delivery expects for the API key to be included in all API requests to the server in a header that looks like the following

                            
                        "request": {
                            "url": "https://api.aendelivery.nl/dataset",
                            "method": "GET",
                            "header": [
                                    {
                                        "key": "X-API-Key",
                                        "value": "alfanumeric API key",
                                        "description": ""
                                    }
                                ],
                            
                        

Create a delivery

Create a delivery

This endpoint creates a delivery.

HTTP Request

POST https://api.aendelivery.nl/deliveries

CURLOPT_POSTFIELDS

Name Value type Max
client_id int 11
drivers_user_id int 11
title varchar 120
status int 11
business tinyint 1
delivery_date datetime
delivery_comment text
updated_at datetime
completed_at datetime

curl https://api.aendelivery.nl/deliveries

The above command returns JSON structured like this:


[
    {
        "title": "bezorging",
        "inserted_id": 62
    }
]
                            

Create a package

Create a package

This endpoint creates a package.

HTTP Request

POST https://api.aendelivery.nl/packages

CURLOPT_POSTFIELDS

Name Value type Max
delivery_id int 11
hash_combined varchar 200
parcel_title varchar 120
parcel_type int 3
parcel_pickup_street varchar 120
parcel_pickup_number varchar 20
parcel_pickup_postal_code varchar 6
parcel_pickup_city varchar 120
parcel_pickup_country varchar 120
parcel_pickup_lat decimal 15
parcel_pickup_lon decimal 15
parcel_pickup_contact varchar 100
parcel_pickup_phone varchar 20
parcel_pickup_company varchar 100
length text
width text
height text
weight text
parcel_delivery_street varchar 250
parcel_delivery_number varchar 20
parcel_delivery_postal_code varchar 6
parcel_delivery_city varchar 120
parcel_delivery_country varchar 120
parcel_delivery_lat decimal 15
parcel_delivery_lon decimal 15
parcel_delivery_contact varchar 100
parcel_delivery_phone varchar 20
parcel_delivery_company varchar 100
parcel_delivery_email varchar 120
status int 11
pick_up_date datetime
drop_off_date datetime
parcel_comment text
receive_name varchar 120
receive_date datetime
receive_sign varchar 255
price float 7
income float 7
duraction varchar 22
distance varchar 22
set_date datetime

curl https://api.aendelivery.nl/deliveries

The above command returns JSON structured like this:


[
    {
        string(8) "pakketje"
    }
]
                            

Create packing slip

Create packing slip

This endpoint creates a package.

HTTP Request

PUT https://api.aendelivery.nl/parcels/packing_slip/

CURLOPT_POSTFIELDS

Parameter Default Description
id false The ID of the parcel

curl https://api.aendelivery.nl/parcels/packing_slip/

The above command returns JSON structured like this:


[
    {
        "success": "De pakbon is gegenereerd en staat klaar om geprint te worden.",
        "packing_slip": "4c1eb44e80ad1370b7b74db0f8b86a3285f11b8d",
        "delivery_id": "165"
    }
]
                            

Create packing slip

Create packing slip

This endpoint creates a package.

HTTP Request

PUT https://api.aendelivery.nl/parcels/packing_slip/

CURLOPT_POSTFIELDS

Parameter Default Description
id false The ID of the parcel

curl https://api.aendelivery.nl/parcels/packing_slip/

The above command returns JSON structured like this:


[
    {
        "success": "De pakbon is gegenereerd en staat klaar om geprint te worden.",
        "packing_slip": "4c1eb44e80ad1370b7b74db0f8b86a3285f11b8d",
        "delivery_id": "165"
    }
]
                            

Create packing label

Create packing label

This endpoint creates a package.

HTTP Request

PUT https://api.aendelivery.nl/parcels/packing_label/

CURLOPT_POSTFIELDS

Parameter Default Description
id false The ID of the parcel

curl https://api.aendelivery.nl/parcels/packing_label/

The above command returns JSON structured like this:


[
    {
        "success": "Het etiket is gegenereerd en staat klaar om geprint te worden.",
        "packing_label": "e2b3998460ceeec71f8094668b357e127b85542a",
        "delivery_id": "165"
    }
]
                            

Accept delivery

Accept delivery

This endpoint sets the delivery on accepted for a specific driver.

HTTP Request

GET https://api.aendelivery.nl/deliveries/accept?id=delivery_id

Query Parameters

Parameter Default Description
Username id The ID of the connected user

curl https://api.aendelivery.nl/deliveries/accept?id=delivery_id

The above command returns JSON structured like this:


[
    {
        "delivery_id": "50",
        "driver_id": "330770",
        "success": "Rit succesvol geaccepteerd!"
    }
]
                            

Decline delivery

Decline delivery

This endpoint sets the delivery on declined for a specific driver.

HTTP Request

GET https://api.aendelivery.nl/deliveries/decline?id=delivery_id

Query Parameters

Parameter Default Description
Username id The ID of the connected user

curl https://api.aendelivery.nl/deliveries/decline?id=delivery_id

The above command returns JSON structured like this:


[
    {
        "delivery_id": "50",
        "driver_id": "330770",
        "success": "Rit succesvol geweigerd!"
    }
]
                            

Receive delivery

Decline delivery

This endpoint sets the delivery on declined for a specific driver.

HTTP Request

POST https://api.aendelivery.nl/deliveries/decline?id=parcel_id

Query Parameters

Parameter Default Description
id id The ID of the parcel
receive_name name The name of the person who received the package
receive_sign image The signature of the person who received the package

curl https://api.aendelivery.nl/deliveries/decline?id=delivery_id

The above command returns JSON structured like this:


[
    {
        "delivery_id": "106",
        "driver_id": "330770",
        "success": "Pakket #106 is afgeleverd!"
    }
]