PHP code example of flavienbwk / colissimo-api

1. Go to this page and download the library: Download flavienbwk/colissimo-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

flavienbwk / colissimo-api example snippets




$colissimo = new \flavienbwk\ColissimoApi\ColissimoApi();

try {
    $result = $colissimo->get('your_colissimo_id_here');
} catch (\flavienbwk\ColissimoApi\ColissimoApiException $e) {
    // ...
}
`
array(5) {
  [0] =>
  array(3) {
    'date' =>
    string(10) "30/05/2018"
    'label' =>
    string(23) "Votre colis est livré."
    'location' =>
    string(18) "Centre Courrier 75"
  }
  [1] =>
  array(3) {
    'date' =>
    string(10) "30/05/2018"
    'label' =>
    string(50) "Votre colis est en préparation pour la livraison."
    'location' =>
    string(18) "Centre Courrier 75"
  }
  [2] =>
  array(3) {
    'date' =>
    string(10) "30/05/2018"
    'label' =>
    string(52) "Votre colis est arrivé sur son site de distribution"
    'location' =>
    string(18) "Centre Courrier 75"
  }
  [3] =>
  array(3) {
    'date' =>
    string(10) "29/05/2018"
    'label' =>
    string(40) "Votre colis est en cours d'acheminement."
    'location' =>
    string(16) "Plateforme Colis"
  }
  [4] =>
  array(3) {
    'date' =>
    string(10) "28/05/2018"
    'label' =>
    string(110) "Votre colis a été déposé après l'heure limite de dépôt. Il sera expédié dès le prochain jour ouvré."
    'location' =>
    string(28) "Bureau de Poste Les estables"
  }
}