Get started

                API Endpoint

                Production: https://api.alfred24.it/wd/
            

The Alfred24 API provides programmatic access to read and write shipments data and orders. API response always returns a JSON.

To use this API, you need an account and an API Token.
Once you create an account on our platform, your login email will be your user parameter.
You can find your API Token in your Profile page. You can activate your API Token by navigating the left menu Integrazioni -> Plugin .

Get Points

                
                    #PHP-CURL full parameters example
                    $curl = curl_init();

                    curl_setopt_array($curl, array(
                        CURLOPT_URL => 'https://api.alfred24.it/wd/GetPoints',
                        CURLOPT_RETURNTRANSFER => true,
                        CURLOPT_ENCODING => '',
                        CURLOPT_MAXREDIRS => 10,
                        CURLOPT_TIMEOUT => 0,
                        CURLOPT_FOLLOWLOCATION => true,
                        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                        CURLOPT_CUSTOMREQUEST => 'POST',
                        CURLOPT_POSTFIELDS => array(
                            'api_token' => 'your_alfred24_apitoken',
                            'country' => 'IT',
                            'address' => '41.89044855096006,12.491060229550026',
                            'services' => '{
                                        "shipment":1,
                                        "delivery": 0,
                                        "return": 0,
                                        "ucraina": 0,
                                        "7daw": 0
                                    }',
                            'distance' => '7',
                        ),
                    ));

                    $response = curl_exec($curl);

                    curl_close($curl);
                    echo $response;
                
            

To get the list of available points for the Alfred24 Delivery service, you need to make a POST request to: GetPoints.


                Success response:
                
                    {
                        "response": 200,
                        "count": 1,
                        "items": [
                            {
                                "idPoint": "1234",
                                "pointName": "(Point Partner) DITTA INDIVIDUALE",
                                "pointLabel": "ditta individuale",
                                "pointNetwork": "Point Partner",
                                "pointRole": 16,
                                "pointAddress": "Via Celimontana, 5",
                                "pointCity": "Roma",
                                "pointProvince": "RM",
                                "pointZip": "00184",
                                "email": "pointpartner@alfred24.it",
                                "phone": "123456789",
                                "latitude": "41.8892095",
                                "longitude": "12.496593",
                                "distance": 0.4638864238842373,
                                "logo": "https://app.alfred24.it/alfred2/user/assets/img/avatars/profiles/avatar.png"
                            }
                        ]
                    }
                
                Error response:              
                
                    {
                        "response": 400,
                        "error": "error_code",
                        "message": "error_description"
                    }
                  
            

QUERY PARAMETERS

Field Type Required Description
api_token String Yes Your Alfred24 API Token.
country String Yes The country short name in English as in ISO 3166. Allowed countries: IT
address String Yes The address to use to search Points around. It can be in the address format or coordinates format (latitute and longitude separated by comma).
services String Yes Filter Points by service. It has to be in JSON format.
distance Float Yes Distance radius from address, in Km.


RESPONSE PARAMETERS

Field Response Description
response 200 if success, 400 if error
count 200 number of Points found
items 200 Points list container
idPoint 200 Point ID.
pointName 200 Point business name
pointLabel 200 Point signboard on the street
pointNetwork 200 Point network
pointRole 200 Internal Alfred24 parameter
pointAddress 200 Complete Point address
pointCity 200 Point city
pointProvince 200 Point province
pointZip 200 Point zip code
email 200 Point email
phone 200 Point phone number
latitute 200 Point coordinate: latitude
longitude 200 Point coordinate. longitude
distance 200 Point distance from the searched address
logo 200 Point profile logo
error 400 Error code. Check Errors for more details.

Tracking

                
                    #PHP-CURL full parameters example
                    $curl = curl_init();

                    curl_setopt_array($curl, array(
                        CURLOPT_URL => 'https://api.alfred24.it/wd/GetTracking.php?barcode=barcode_here',
                        CURLOPT_RETURNTRANSFER => true,
                        CURLOPT_ENCODING => '',
                        CURLOPT_MAXREDIRS => 10,
                        CURLOPT_TIMEOUT => 0,
                        CURLOPT_FOLLOWLOCATION => true,
                        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                    ));

                    $response = curl_exec($curl);

                    curl_close($curl);
                    echo $response;
                
            

To get the label tracking you need to make a GET request to : GetTracking.
If success, the response returns statuses ordered by descending date.


                Success response:
                
                    {
                        "status": 200,
                        "courier": "SDA",
                        "deatails": {
                          "package": 1,
                          "origin": "Parma",
                          "origin_district": "PR",
                          "destination": "Fermo",
                          "destination_district": "FM",
                          "destination_nation": "ITA",
                          "pickup_date": "2022-10-25 14:00:00"
                        },
                        "track": {
                          "tracking": [
                            {
                              "data": "25/10/2022 09:56:00",
                              "posizione": "Civitanova",
                              "stato": "LA SPEDIZIONE E' STATA CONSEGNATA",
                              "firma": "Mario Rossi",
                              "AlfredStatus": "CONSEGNATA"
                            },
                            {
                              "data": "25/10/2022 09:01:00",
                              "posizione": "Civitanova",
                              "stato": "IN CONSEGNA",
                              "firma": "Mario Rossi",
                              "AlfredStatus": "IN CONSEGNA"
                            },
                            {
                              "data": "24/10/2022 22:42:00",
                              "posizione": "Hub Espresso Bologna",
                              "stato": "LA SPEDIZIONE E' PARTITA",
                              "firma": "Mario Rossi",
                              "AlfredStatus": "PARTITA"
                            },
                            {
                              "data": "24/10/2022 18:02:00",
                              "posizione": "Parma",
                              "stato": "LA SPEDIZIONE E' PARTITA",
                              "firma": "Mario Rossi",
                              "AlfredStatus": "PARTITA"
                            },
                            {
                              "data": "24/10/2022 14:48:00",
                              "posizione": "Parma",
                              "stato": "LA SPEDIZIONE E' STATA RITIRATA PRESSO IL MITTENTE",
                              "firma": "Mario Rossi",
                              "AlfredStatus": "RITIRATA"
                            }
                          ]
                        }
                      }

                
                Error response:              
                
                {
                    "response": 400,
                    "error": "error_code",
                    "message": "error_description"
                }
                  
            

QUERY PARAMETERS

Field Type Required Description
barcode String Yes The barcode associated to the label you want to track


RESPONSE PARAMETERS

Field Description
response 200 if success, 400 if error
status 200 Status code. Check Tracking Statuses for more details.
courier 200 Courier name for selected shipment
details 200 Details for selected shipment
package: number of packages for the shipment
origin/destination: other informations
tracking 200 Tracking info ordered by datetime
data: datetime related to current status
posizione: position related to current status
stato: info related to current status
firma: signature of receiver
error 400 Error code. Check Errors for more details.