NAV Navbar
PHP
  • Introduction
  • Authentication
  • General Rules
  • Orders
  • Tracking
  • Pickup
  • Carriers
  • Manifests
  • Webhooks
  • Utility
  • Introduction

    Welcome to the ShippyPro API! You can use our API to access all the functionalities ShippyPro provides

    Authentication

    You need to use basic authentication for every request you make

    Username = Your API Key

    Password = empty

    APIKEY

    General Rules

    The default endpoint for every API request is the following

    https://www.shippypro.com/api

    You need to send a well formed JSON POST request containing Method and Params parameters

    Orders

    Get Rates

    <?php
    $arr = array(
        "Method" => "GetRates",
        "Params" => 
        array(
            "to_address" => array(
                "name" => "John Doe",
                "company" => "",
                "street1" => "123 Main St",
                "street2" => "",
                "city" => "Park City",
                "state" => "UT",
                "zip" => "84060",
                "country" => "US",
                "phone" => "5551231234",
                "email" => "johndoe@gmail.com"
            ),
            "from_address" => array(
                "name" => "John Doe",
                "company" => "",
                "street1" => "123 Main St",
                "street2" => "",
                "city" => "Park City",
                "state" => "UT",
                "zip" => "84060",
                "country" => "US",
                "phone" => "5551231234",
                "email" => "johndoe@gmail.com"
            ),
            "parcels" => array(
                array("length" => 5, "width" => 5, "height" => 5, "weight" => 10)
            ),
            "CashOnDelivery" => 0,
            "CashOnDeliveryCurrency" => "EUR",
            "ContentDescription" => "Shoes",
            "TotalValue" => 50.25,
            "ShippingService" => "Standard"
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
      "Rates": [
        {
          "carrier": "USPS",
          "carrier_id": "50",
          "carrier_label": "USPS Test",
          "rate": "5.60",
          "rate_id": "rate_25984529822",
          "order_id": "order_987521861",
          "delivery_days": 2,
          "service": "First"
        },
        {
          "carrier": "UPS",
          "carrier_id": "51",
          "carrier_label": "UPS Test",
          "rate": "8.40",
          "rate_id": "rate_25952284529822",
          "order_id": "order_987766521861",
          "delivery_days": "1-2",
          "service": "UPSSaver"
        },
        {
          "carrier": "UPS",
          "carrier_id": "51",
          "carrier_label": "UPS Test",
          "rate": "7.50",
          "rate_id": "rate_2598452484822",
          "order_id": "order_98759921861",
          "delivery_days": "3-5",
          "service": "Expedited"
        }
      ]
    }
    

    This method retrieve the rates for a specific shipment

    Method

    GetRates

    Params

    Parameter Type Required Description
    - to_address Array true Containing Recipient Address Informations
    -- name string true Recipient Name
    -- company string true Recipient Company
    -- street1 string true Recipient Street1
    -- street2 string true Recipient Street2
    -- city string true Recipient City
    -- state string true Recipient State
    -- zip string true Recipient Zip
    -- country string true Recipient Country
    -- phone string true Recipient Phone
    -- email string true Recipient Email
    - from_address Array true Containing Sender Address Informations
    -- name string true Sender Name
    -- company string true Sender Company
    -- street1 string true Sender Street1
    -- street2 string true Sender Street2
    -- city string true Sender City
    -- state string true Sender State
    -- zip string true Sender Zip
    -- country string true Sender Country
    -- phone string true Sender Phone
    -- email string true Sender Email
    - parcels Array true Containing Parcels Informations
    -- (Array) Array true (Min. 1) Containing Parcel Informations - Repeatable
    --- length float true Parcel Length
    --- width float true Parcel Width
    --- height float true Parcel Height
    --- weight float true Parcel Weight
    -- CashOnDelivery float true Cash on Delivery value
    -- CashOnDeliveryCurrency string true Cash on Delivery currency ex. "EU$
    -- ContentDescription string true Description of the content
    -- TotalValue float true Value of the order
    -- ShippingService string true Buyer selected shipping serviced
    - RateCarriers Array false Rate only specific carriers

    Ship

    <?php
    $arr = array(
        "Method" => "Ship",
        "Params" => 
        array(
            "to_address" => array(
                "name" => "John Doe",
                "company" => "",
                "street1" => "123 Main St",
                "street2" => "",
                "city" => "Park City",
                "state" => "UT",
                "zip" => "84060",
                "country" => "US",
                "phone" => "5551231234",
                "email" => "johndoe@gmail.com"
            ),
            "from_address" => array(
                "name" => "John Doe",
                "company" => "",
                "street1" => "123 Main St",
                "street2" => "",
                "city" => "Park City",
                "state" => "UT",
                "zip" => "84060",
                "country" => "US",
                "phone" => "5551231234",
                "email" => "johndoe@gmail.com"
            ),
            "parcels" => array(
                array("length" => 5, "width" => 5, "height" => 5, "weight" => 10)
            ),
            "TotalValue" => "123 EUR",
            "TransactionID" => "ORDER2365",
            "ContentDescription" => "Milk",
            "Insurance" => 0,
            "InsuranceCurrency" => "EUR",
            "CashOnDelivery" => 0,
            "CashOnDeliveryCurrency" => "EUR",
            "CashOnDeliveryType" => 0,
            "CarrierName" => "DHLExpress",
            "CarrierService" => "EXPRESS DOMESTIC",
            "CarrierID" => 23,
            "OrderID" => "",
            "RateID" => "14922625303744",
            "Incoterm" => "DAP",
            "BillAccountNumber" => "",
            "Note" => "Ship by 25/06/2018"
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
      "Result": "OK",
      "NewOrderID": "184844887"
    }
    

    This method gives you the possibility to ship orders using all the ShippyPro functionalities

    Method

    Ship

    Params

    Parameter Type Required Description
    - to_address Array true Containing Recipient Address Informations
    -- name string true Recipient Name
    -- company string true Recipient Company
    -- street1 string true Recipient Street1
    -- street2 string true Recipient Street2
    -- city string true Recipient City
    -- state string true Recipient State
    -- zip string true Recipient Zip
    -- country string true Recipient Country (2 digit ISO 3166)
    -- phone string true Recipient Phone
    -- email string true Recipient Email
    - from_address Array true Containing Sender Address Informations
    -- name string true Sender Name
    -- company string true Sender Company
    -- street1 string true Sender Street1
    -- street2 string true Sender Street2
    -- city string true Sender City
    -- state string true Sender State
    -- zip string true Sender Zip
    -- country string true Sender Country (2 digit ISO 3166)
    -- phone string true Sender Phone
    -- email string true Sender Email
    - parcels Array true Containing Parcels Informations
    -- (Array) Array true (Min. 1) Containing Parcel Informations - Repeatable
    --- length float true Parcel Length
    --- width float true Parcel Width
    --- height float true Parcel Height
    --- weight float true Parcel Weight
    - TotalValue string true Value of the order including the currency
    - TransactionID string true Order number
    - ContentDescription string true Description of contents
    - Insurance float true Insurance value
    - InsuranceCurrency string true Insurance currency
    - CashOnDelivery float true Cash on delivery value
    - CashOnDeliveryCurrency string true Cash on delivery currency
    - CashOnDeliveryType integer true Cash on delivery type, 0 = Cash, 1 = Cashier's check, 2 = Check
    - ShipmentCost float false Selected rate value
    - ShipmentCostCurrency string false Selected rate currency
    - CarrierName string true Selected rate CarrierName
    - CarrierService string true Selected rate Service
    - CarrierID int true Selected rate CarrierID
    - OrderID string true Selected rate OrderID
    - RateID string true Selected rate RateID
    - Incoterm string true Shipment incoterm
    - BillAccountNumber string true Bill the shipment to third party account number
    - Note string true Note
    - CarrierNote string false Carrier Note
    - Async string false Process the request async

    Edit

    This method gives you the possibility to edit an

    The structure is the same as the Ship method, the OrderID must match the ShippyPro order id received in the ORDER_ERROR webhook

    Method

    Edit

    Get Order

    <?php
    $arr = array(
        "Method" => "GetOrder",
        "Params" => 
        array(
            "OrderID" => 612648,
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
        "Result": "OK",
        "OrderID": "1757968",
        "TransactionID": "",
        "CarrierID": "3",
        "TrackingCarrier": "DHL",
        "TrackingNumber": "8599848451",
        "MarketplacePlatform": "Amazon",
        "Status": "1",
        "LabelURL": [
            "https://cdn.shippypro.com/labels/label.pdf"
        ]
    }
    

    This method gives you the possibility to read an order data and the output tracking number and labels

    Method

    GetOrder

    Params

    Parameter Type Required Description
    - OrderID int true ShippyPro order id

    Archive Orders

    <?php
    $arr = array(
        "Method" => "ArchiveOrders",
        "Params" => 
        array(
            "OrderIDS" => array(
                1234
            )
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
        "Result": "OK"
    }
    

    This method gives you the possibility to archive shipped orders

    Update Orders

    <?php
    $arr = array(
        "Method" => "UpdateOrders",
        "Params" => 
        array(
            "OrderIDS" => array(
                1234
            )
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
        "Result": "OK"
    }
    

    This method gives you the possibility to send shipment info to the marketplaces and mark the order as shipped

    Method

    GetOrder

    Params

    Parameter Type Required Description
    - OrderIDS Array true Containing ShippyPro Order Numbers

    Put Order

    <?php
    $arr = array(
        "Method" => "PutOrder",
        "Params" => 
        array(
            "to_address" => array(
                "name" => "John Doe",
                "company" => "",
                "street1" => "123 Main St",
                "street2" => "",
                "city" => "Park City",
                "state" => "UT",
                "zip" => "84060",
                "country" => "US",
                "phone" => "5551231234",
                "email" => "johndoe@gmail.com"
            ),
            "parcels" => array(
                array("length" => 5, "width" => 5, "height" => 5, "weight" => 10)
            ),
            "items" => array(
                array("title" => "Milk", "imageurl" => "http://www.shippypro.com/milk.png", "quantity" => 5, "price" => 5.99, "sku" => "milk")
            ),
            "TransactionID" => "ORDER2365",
            "Date" => 1492528071,
            "Currency" => "EUR",
            "ItemsCount" => 1,
            "ContentDescription" => "Milk",
            "Total" => 23.5,
            "Status" => "Paid",
            "APIOrdersID" => 30,
            "ShipmentAmountPaid" => 23.5,
            "Incoterm" => "DAP",        
            "BillAccountNumber" => "",
            "PaymentMethod" => "PayPal",
            "ShippingService" => "Expedited",
            "Note" => "Ship by 25/06/2018"
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
      "Result": "OK"
    }
    

    This method gives you the possibility to add orders inside a ShippyPro special folder and ship them

    Method

    PutOrder

    Params

    Parameter Type Required Description
    - to_address Array true Containing Recipient Address Informations
    -- name string true Recipient Name
    -- company string true Recipient Company
    -- street1 string true Recipient Street1
    -- street2 string true Recipient Street2
    -- city string true Recipient City
    -- state string true Recipient State
    -- zip string true Recipient Zip
    -- country string true Recipient Country (2 digit ISO 3166)
    -- phone string true Recipient Phone
    -- email string true Recipient Email
    - parcels Array true Containing Parcels Informations
    -- (Array) Array true (Min. 1) Containing Parcel Informations - Repeatable
    - Items Array true Containing Items Informations
    -- (Array) Array true (Min. 1) Containing Item Informations - Repeatable
    - TransactionID string true Order number
    - Date int true Order timestamp
    - Currency string true Order currency
    - ItemsCount int true Items count
    - ContentDescription string true Description of content
    - Total float true Order value
    - Status string true Order status
    - ShipmentAmountPaid float true Amount paid for the shipment
    - APIOrdersID int true APIOrders Marketplace ID
    - Incoterm string true Shipment incoterm
    - BillAccountNumber string true Bill the shipment to third party account number
    - PaymentMethod string true Order payment method
    - ShippingService string true Customer selected shipping service type
    - Note string true Note
    <?php
    $arr = array(
        "Method" => "PrintOrder",
        "Params" => 
        array(
            "OrderID" => "123456",
            "Force" => true
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
      "Result": "OK",
      "OrderID": "123456"
    }
    

    This method gives you the possibility to print orders to your carrier associated printer

    Method

    PrintOrder

    Params

    Parameter Type Required Description
    - OrderID string true ShippyPro Order Number
    - Force bool true Force the printing even if the order was already printed
    <?php
    $arr = array(
        "Method" => "PrintOrderBySKU",
        "Params" => 
        array(
            "SKU" => "SHOES1",
            "PickingListID" => 1
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
      "Result": "OK",
      "PrintResponses": [
        {
          "Result": "OK",
          "OrderID": "123456"
        }
      ],
      "MissingItems" => ...,
      "AcknowledgedItem" => ...
    }
    

    This method gives you the possibility to print orders to your carrier associated printer by scanning the item SKU

    Method

    PrintOrderBySKU

    Params

    Parameter Type Required Description
    - SKU string true Scanned item SKU
    - PickingListID int true The Picking List number

    Get Label Url

    <?php
    $arr = array(
        "Method" => "GetLabelUrl",
        "Params" => 
        array(
            "OrderID" => "123456"
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
      "LabelURL": "https://cdn.shippypro.com/labels/label-1.pdf",
      "PDF": [],
      "ZPL": [],
      "TrackingCarrier": "DHLExpress";
      "TrackingNumber": "12346",
      "Status": 1,
      "ErrorMessage": ""
    }
    

    This method gives you the possibility to get the order labels url in either PDF/ZPL format

    Method

    GetLabelUrl

    Params

    Parameter Type Required Description
    - OrderID string true ShippyPro Order Number
    - LabelType string false Output Label Format, optional. Allowed values "PDF", "ZPL"
    - LabelWidth string false Output Label Width in CM, optional. Valid only for LabelType = "PDF"
    - LabelHeight string false Output Label Height in CM, optional. Valid only for LabelType = "PDF"

    Upload Paperless Documentation

    <?php
    $arr = array(
        "Method" => "UploadPaperlessDocumentation",
        "Params" => 
        array(
            "TransactionID" => "19269",
            "Name" => "Mark",
            "Country" => "US",
            "Document" => "..."
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
      "Result": "OK"
    }
    

    This method gives you the possibility to get the order labels url in either PDF/ZPL format

    Method

    UploadPaperlessDocumentation

    Params

    Parameter Type Required Description
    - TransactionID string true Order Number
    - Name string true Recipient Name
    - Country string true Recipient Country ISO code
    - Document string true PDF document base64 encoded file

    Tracking

    Get Tracking

    <?php
    $arr = array(
        "Method" => "GetTracking",
        "Params" => 
        array(
            "Code" => "1ZA103756899507566"
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
      "Carrier": "UPS",
      "CarrierLogo": "https://www.shippypro.com/sites/all/themes/shippypro_theme/assets_pannello/images/corrieri/Logo_UPS.png",
      "Completed": true,
      "EstimatedDeliveryDate": "1489659960",
      "Details": [
        {
          "date": "1489659960",
          "message": "DELIVERED",
          "city": "MOTRIL"
        },
        {
          "date": "1489625040",
          "message": "OUT FOR DELIVERY",
          "city": "GUARROMAN - JAEN"
        },
        {
          "date": "1489618800",
          "message": "ARRIVAL SCAN",
          "city": "GUARROMAN - JAEN"
        },
        {
          "date": "1489600800",
          "message": "DEPARTURE SCAN",
          "city": "BENAVENTE"
        },
        {
          "date": "1489572000",
          "message": "ARRIVAL SCAN",
          "city": "BENAVENTE"
        },
        {
          "date": "1489543200",
          "message": "DEPARTURE SCAN",
          "city": "ZARAGOZA"
        },
        {
          "date": "1489536060",
          "message": "ARRIVAL SCAN",
          "city": "ZARAGOZA"
        },
        {
          "date": "1489530180",
          "message": "DEPARTURE SCAN",
          "city": "BARCELONA"
        },
        {
          "date": "1489527000",
          "message": "DEPARTURE SCAN",
          "city": "BARCELONA"
        },
        {
          "date": "1489443180",
          "message": "EXPORT SCAN",
          "city": "BOLOGNA"
        },
        {
          "date": "1489439520",
          "message": "ARRIVAL SCAN",
          "city": "BOLOGNA"
        },
        {
          "date": "1489432500",
          "message": "DEPARTURE SCAN",
          "city": "PARMA"
        },
        {
          "date": "1489429260",
          "message": "ORIGIN SCAN",
          "city": "PARMA"
        },
        {
          "date": "1489419660",
          "message": "PICKUP SCAN",
          "city": "PARMA"
        },
        {
          "date": "1489227611",
          "message": "BILLING INFORMATION RECEIVED",
          "city": ""
        }
      ]
    }
    

    This method gives you the possibility to track your parcels

    Method

    GetTracking

    Params

    Parameter Type Required Description
    - Code string true Tracking Number

    Pickup

    Book Pickup

    <?php
    $arr = array(
        "Method" => "BookPickup",
        "Params" => array(
            "to_address" => array(),
            "from_address" => array(
                "name" => "John Doe",
                "company" => "",
                "street1" => "123 Main St",
                "street2" => "",
                "city" => "Park City",
                "state" => "UT",
                "zip" => "84060",
                "country" => "US",
                "phone" => "5551231234",
                "email" => "johndoe@gmail.com"
            ),
            "parcels" => array(
                array("length" => 5, "width" => 5, "height" => 5, "weight" => 10)
            ),
            "CarrierName" => "DHLExpress",
            "CarrierID" => 20,
            "PickupTime" => 1517564402,
            "PickupNote" => "Urgent",
            "PickupMorningMintime" => "09:00",
            "PickupMorningMaxtime" => "12:00",
            "PickupAfternoonMintime" => "14:00",
            "PickupAfternoonMaxtime" => "18:00"
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
        "Result": "OK",
        "Message": "Booked",
        "ConfirmationID": "1598"
    }
    

    This method gives you the possibility to book a pickup

    Method

    BookPickup

    Params

    Parameter Type Required Description
    - to_address Array true Containing Recipient Address Informations
    - from_address Array true Containing Sender Address Informations
    -- name string true Sender Name
    -- company string true Sender Company
    -- street1 string true Sender Street1
    -- street2 string true Sender Street2
    -- city string true Sender City
    -- state string true Sender State
    -- zip string true Sender Zip
    -- country string true Sender Country
    -- phone string true Sender Phone
    -- email string true Sender Email
    - parcels Array true Containing Parcels Informations
    -- (Array) Array true (Min. 1) Containing Parcel Informations - Repeatable
    --- length float true Parcel Length
    --- width float true Parcel Width
    --- height float true Parcel Height
    --- weight float true Parcel Weight
    -- CarrierName string true Carrier Name
    -- CarrierID int true Carrier ID
    -- PickupTime int true Pickup time timestamp
    -- PickupNote string true Pickup note
    -- PickupMorningMintime string true Minimum pickup time - morning
    -- PickupMorningMaxtime string true Maximum pickup time - afternoon
    -- PickupAfternoonMintime string true Minimum pickup time - morning
    -- PickupAfternoonMaxtime string true Maximum pickup time - afternoon

    Cancel Pickup

    <?php
    $arr = array(
        "Method" => "CancelPickup",
        "Params" => array(
            "CarrierName" => "UPS",
            "CarrierID" => 1,
            "ConfirmationNumber" => "1598",
            "PickupTime" => 1517564402
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
        "Result": "OK"
    }
    

    This method gives you the possibility to cancel a pickup

    Method

    CancelPickup

    Params

    Parameter Type Required Description
    - CarrierName string true Pickup carrier name
    - CarrierID int true Pickup carrier id
    - ConfirmationNumber string true Pickup confirmation number
    - PickupTime int true Pickup time timestamp

    Carriers

    Get Carriers

    <?php
    $arr = array(
        "Method" => "GetCarriers",
        "Params" => array()
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
        "Carriers": {
            "DHLExpress": [
                {
                    "CarrierID": "15",
                    "CarrierService": "EXPRESS WORLDWIDE",
                    "Label": "Test Carrier"
                }
            ],
            "UPS": [
                {
                    "CarrierID": "10",
                    "CarrierService": "Standard",
                    "Label": "UPS"
                }
            ]
        }
    }
    

    This method gives you the possibility to get all the carrier ids connected to your ShippyPro account

    Method

    GetCarriers

    Get Carrier Options

    <?php
    $arr = array(
        "Method" => "GetCarrierOptions",
        "Params" => array(
            "CarrierName" => "SDA",
            "CarrierID" => 34,
            "to_address" => array(
                "city" => "Florence",
                "zip" => 50122,
                "country" => "IT"
            )
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
        "Result": "OK",
        "Options": {
            "sdafloordelivery": {
                "label": "Floor Delivery",
                "parameters": {
                    "sdafloordelivery": "1"
                }
            }
        }
    }
    

    This method gives you the possibility to get the available carrier options

    Method

    GetCarrierOptions

    Params

    Parameter Type Required Description
    - CarrierName string true Carrier Name
    - CarrierID int true Carrier ID
    - to_address Array true Containing Recipient Address Informations
    -- city string true Recipient City
    -- zip string true Recipient Zip
    -- country string true Recipient Country (2 digit ISO 3166)

    Close Shipments

    <?php
    $arr = array(
        "Method" => "CloseShipments",
        "Params" => array(
            "CarrierName" => "Spring",
            "OrderIDS" => array(
                1234
            )
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
        "Result": "OK"
    }
    

    This method gives you the possibility to confirm the shipments

    Method

    CloseShipments

    Params

    Parameter Type Required Description
    - OrderIDS Array true Containing ShippyPro Order Numbers
    - CarrierName string true Carrier Name

    Get UPS Access Points

    <?php
    $arr = array(
        "Method" => "GetUPSAccessPoints",
        "Params" => array(
            "city" => "New York",
            "zip" => "10011",
            "country" => "US",
            "max_distance" => 50
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
        "Result": "OK",
        "AccessPoints": [
            {
                "LocationID": "133208",
                "IVR": {
                    "PhraseID": "0"
                },
                "Geocode": {
                    "Latitude": "40.74862670",
                    "Longitude": "-74.0031356"
                },
                "AddressKeyFormat": {
                    "ConsigneeName": "LONDON GROCERY CORP.",
                    "AddressLine": "252 10TH AVE",
                    "PoliticalDivision2": "NEW YORK",
                    "PoliticalDivision1": "NY",
                    "PostcodePrimaryLow": "10001",
                    "PostcodeExtendedLow": "7012",
                    "CountryCode": "US"
                },
                "LocationAttribute": {
                    "OptionType": {
                        "Code": "01",
                        "Description": "Location"
                    },
                    "OptionCode": {
                        "Code": "018",
                        "Description": "UPS Access Point&trade;"
                    }
                },
                "Distance": {
                    "Value": "0.6",
                    "UnitOfMeasurement": {
                        "Code": "KM",
                        "Description": "KILOMETERS"
                    }
                },
                "SpecialInstructions": {
                    "Segment": "Between W 25th Street and W 24th Street"
                },
                "LatestGroundDropOffTime": "Mon-Sat: 4:00pm; Sun: No Pickup",
                "LatestAirDropOffTime": "Mon-Sat: 4:00pm; Sun: No Pickup",
                "AdditionalChargeIndicator": {},
                "StandardHoursOfOperation": "Mon-Sun: 9:00am-8:00pm",
                "OperatingHours": {
                    "StandardHours": {
                        "HoursType": "10",
                        "DayOfWeek": [
                            {
                                "Day": "1",
                                "OpenHours": "900",
                                "CloseHours": "2000"
                            },
                            {
                                "Day": "2",
                                "OpenHours": "900",
                                "CloseHours": "2000"
                            },
                            {
                                "Day": "3",
                                "OpenHours": "900",
                                "CloseHours": "2000"
                            },
                            {
                                "Day": "4",
                                "OpenHours": "900",
                                "CloseHours": "2000"
                            },
                            {
                                "Day": "5",
                                "OpenHours": "900",
                                "CloseHours": "2000"
                            },
                            {
                                "Day": "6",
                                "OpenHours": "900",
                                "CloseHours": "2000"
                            },
                            {
                                "Day": "7",
                                "OpenHours": "900",
                                "CloseHours": "2000"
                            }
                        ]
                    }
                },
                "SLIC": "1004",
                "ServiceOfferingList": {
                    "ServiceOffering": [
                        {
                            "Code": "001",
                            "Description": "Direct To Retail"
                        },
                        {
                            "Code": "002",
                            "Description": "Not In One ADL"
                        },
                        {
                            "Code": "004",
                            "Description": "Retail to Retail"
                        },
                        {
                            "Code": "007",
                            "Description": "PUDO"
                        },
                        {
                            "Code": "008",
                            "Description": "Early Pickup Delivery Time"
                        },
                        {
                            "Code": "010",
                            "Description": "DCO DCR intercept accepted"
                        }
                    ]
                },
                "DisplayPhoneNumberIndicator": "0",
                "AccessPointInformation": {
                    "PublicAccessPointID": "U97610274",
                    "ImageURL": "https:\/\/www.ups.com\/rms\/image?id=8F91000D-1DE3-4197-95A0-F3206CC9CC40",
                    "BusinessClassificationList": {
                        "BusinessClassification": {
                            "Code": "011",
                            "Description": "FOOD_SHOP"
                        }
                    },
                    "AccessPointStatus": {
                        "Code": "01",
                        "Description": "ACTIVE"
                    }
                },
                "LocationNewIndicator": "N",
                "WillCallLocationIndicator": "N"
            }
        ]
    }
    

    This method gives you the possibility to get all the nearest UPS access points

    Method

    GetUPSAccessPoints

    Params

    Parameter Type Required Description
    - city string true Recipient City
    - zip string true Recipient Zip
    - country string true Recipient Country
    - max_distance integer true Maximum access point distance (in kilometers)

    Manifests

    Create Manifest

    <?php
    $arr = array(
        "Method" => "CreateManifest",
        "Params" => array(
            "OrderIDS" => array(
                1234
            )
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
        "ManifestNumber": "23",
        "ManifestURL": "https:\/\/cdn.shippypro.com\/manifests\/manifest-u11n23-15332055452.pdf"
    }
    

    This method gives you the possibility to create manifest file for the specified order numbers

    Method

    CreateManifest

    Params

    Parameter Type Required Description
    - OrderIDS Array true Containing ShippyPro Order Numbers

    GetManifest

    <?php
    $arr = array(
        "Method" => "GetManifest",
        "Params" => array(
            "ManifestNumber" => 10
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
        "ManifestNumber": "23",
        "ManifestURL": "https:\/\/cdn.shippypro.com\/manifests\/manifest-u11n23-15332055452.pdf"
        "OrderIDS": [
            "1234"
        ]
    }
    

    This method gives you the possibility to get an already created manifest

    Method

    GetManifest

    Params

    Parameter Type Required Description
    - ManifestNumber string true Manifest Number

    DeleteManifest

    <?php
    $arr = array(
        "Method" => "DeleteManifest",
        "Params" => array(
            "ManifestNumber" => 10
        )
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    {
        "Result": "OK"
    }
    

    This method gives you the possibility to delete an existing manifest

    Method

    DeleteManifest

    Params

    Parameter Type Required Description
    - ManifestNumber string true Manifest Number

    Webhooks

    You can setup an endpoint where you want to receive API calls result

    The request type is in POST and the content type is application/json

    Tracking

    Your endpoint will receive a JSON structured like this:

    {
      "tracking" : "1ZA103756899507566",
      "date": "1489659960",
      "message": "DELIVERED",
      "city": "MOTRIL",
      "est_delivery_date": "1489659960",
      "code" => 1
    }
    

    Receive the tracking status' updates for your shipments in real time

    Params

    Parameter Type Description
    - tracking string Tracking Number
    - date string Date of the event
    - message string Event text
    - city string City where the event happened
    - est_delivery_date int Estimated delivery date
    - code int Internal state code

    Order

    Your endpoint will receive a JSON structured like this:

    {
      "LabelURL": ["https://www.shippypro.com/ldv/ldv-1.pdf", "https://www.shippypro.com/ldv/ldv-1.pdf"],
      "OrderID": 191252,
      "TransactionID": "ORDER2365",
      "CarrierID": 50,
      "TrackingCarrier": "UPS",
      "TrackingNumber": "1ZA103756899507566",
      "MarketplacePlatform": "Amazon"
    }
    

    Receive the label for the order you have just created

    Params

    Parameter Type Description
    - LabelUrl array Array containing labels url
    - OrderID int ShippyPro Order ID
    - TransactionID string Order ID
    - CarrierID int ID of the carrier
    - TrackingCarrier string Tracking Carrier
    - TrackingNumber string Tracking number
    - MarketplacePlatform string Order Marketplace platform

    Order Error

    Your endpoint will receive a JSON structured like this:

    {
      "OrderID": 191252,
      "TransactionID": "ORDER2365",
      "ErrorMessage": "Street too long"
    }
    

    Receive the error message of the order

    Params

    Parameter Type Description
    - OrderID int ShippyPro Order ID
    - TransactionID string Order ID
    - ErrorMessage string Error message text

    Utility

    Get Printers

    <?php
    $arr = array(
        "Method" => "GetPrinters",
        "Params" => array()
    );
    
    $data = json_encode($arr);
    
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data))
    );                
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);    
    curl_setopt($curl, CURLOPT_USERPWD, "APIKEY:");
    curl_setopt($curl, CURLOPT_URL, "https://www.shippypro.com/api");
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($curl);          
    curl_close($curl);
    echo $result;
    ?>
    

    The above request returns JSON structured like this:

    [
        {
            "PrinterID": "1489600800",
            "ComputerHostname": "Main Computer",
            "Name": "Zebra 500"
        },
        {
            "PrinterID": "1489572000",
            "ComputerHostname": "Michael Computer",
            "Name": "EPL Printer"
        },
            {
            "PrinterID": "1489543200",
            "ComputerHostname": "Warehouse Computer",
            "Name": "A4 Printer"
        }
    ]
    

    This method gives you the possibility to see the connected printer inside ShippyPro

    Method

    GetPrinters

    PHP