Skip to content

Get delivery tracking informations from Colissimo, Chronopost, Lettre Recommandée

Notifications You must be signed in to change notification settings

3z3qu13l/laposte-tracking-fr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

La Poste Tracking

Install size npm version Known Vulnerabilities

Get package delivery tracking informations from la Poste (Lettre Recommandée, Colissimo, Chronopost)

Lettre Recommandée Colissimo Chronopost
laposte Colissimo Chronopost

Installation

ApiKey from LaPoste is required to use the API.
Please visit https://developer.laposte.fr/products/suivi/2 to create one.

In your application root directory, enter this command to install the connector:

npm install laposte-tracking --save

This installs the module from npm and adds it as a dependency to the application's package.json file.

Method available

getTracking

Returns everything in one object

const laposteTracking = require('laposte-tracking');
const trackingAPI = laposteTracking({ apiKey: 'secretApiKey' });

// Using Promise
await trackingAPI.getTracking('6A24796812345').then(tracking => {
    console.log(tracking);
});

// Using async/await
console.log(await trackingAPI.getTracking('6A24796812345'));
/*
{
    trackingId: '6A24796812345',
    type: 'colissimo',
    currentStatus: "Votre colis a été livré",
    duration: 4,
    isComplete: true,
    lastDate: "2022-06-03T16:23:00.000Z",
    startDate: "2022-05-31T03:08:00.000Z",
    history: [{
        datetime: "2022-05-31T03:08:00.000Z",
        text: "Votre Colissimo va bientôt nous être confié ! Il est en cours de préparation chez votre expéditeur."
    }, {
        datetime: "2022-06-03T09:45:00.000Z",
        text: 'Votre colis est en transit sur nos plateformes logistiques.'
    }, {
        datetime: "2022-06-03T05:05:00.000Z",
        text: "Votre colis est pris en charge",
    }, {
        datetime: "2022-06-03T09:42:00.000Z",
        text: 'Votre colis est dans le site de livraison qui dessert votre adresse. Nous le préparons pour le mettre en livraison.'
    }, {
        datetime: "2022-06-03T16:23:00.000Z",
        text: "Votre colis a été livré"
    }]
}
*/

About

Get delivery tracking informations from Colissimo, Chronopost, Lettre Recommandée

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published