Skip to content

Latest commit

 

History

History
73 lines (54 loc) · 1.64 KB

README.md

File metadata and controls

73 lines (54 loc) · 1.64 KB

Morocco Post API

Poste Maroc · Aaman · Barid Al Maghrib

Logo

Usage

from api import Tracker

Tracker.LastStatus('TRACKING_CODE')
Tracker.PackageInfo('TRACKING_CODE')

}

Examples

Shipment last status

  Tracker.LastStatus('TRACKING_CODE')

Get all the information about the parcel as JSON

  Tracker.PackageInfo('TRACKING_CODE')
        {
            "code_bordereau": "LD8******25MA",
            "libelle_produit": "Express - PRN",
            "date_depot": "10-02-2021",
            "destination": "TAZA",
            "date_livraison": "13-02-2022",
            "poids": "5.787",
            "destinataire": "h4fide",
            "dernier_statut": "Envoi livré",
            "lieu_depot": "RABAT AL MADINA CD",
            "id_statut": "liv",
            "mtt_crbt": "2070.00",
        }

Example to get price of the package use this command

  Tracker.PackageInfo('TRACKING_CODE')['mtt_crbt']

Output

  2070.00

API Reference

GET

  GET http://bam.magnetomedia.de/trackinghistory.php
KEY VALUAE Required Description
lastOperation false or true No Show its current status and hide other informations
trackingNumber TRACKING_CODE Yes Package tracking number

Contributing

Contributions are always welcome! Feel free :)