EasyPost / easypost-php

PHP client for EasyPost API

Home Page:https://easypost.com/docs/api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prepopulate all the carrier services

orso081980 opened this issue · comments

commented

Is there any way to pre-populate all the carrier services, as soon as you lunch the app, before doing any purchases or initiate the process?

For example:

->carrier::services

will return an array of all the shipment available after the API call

That is currently not possible and is quite difficult for a variety of carriers that have dynamic or temporal service levels. Is there a specific carrier you are interested in?

commented

Canada post and purolator

commented

It could be a super cool feature by the way.. what about adding a fake shipment? I developed a backend interface where you can add your API key and it will auto-populate the service for you

I agree it would be a nice feature, but it would be a ton of work for us to maintain. Its definitely something we have thought about doing for a long time.

CanadaPost service levels are,

"DeliveredTonight", "RegularParcel", "ExpeditedParcel", "Xpresspost", "XpresspostCertified", "Priority", "LibraryBooks", "ExpeditedParcelUSA", "PriorityWorldwideEnvelopeUSA", "PriorityWorldwidePakUSA", "PriorityWorldwideParcelUSA", "SmallPacketUSAAir", "TrackedPacketUSA", "TrackedPacketUSALVM", "XpresspostUSA", "XpresspostInternational", "InternationalParcelAir", "InternationalParcelSurface", "PriorityWorldwideEnvelopeIntl", "PriorityWorldwidePakIntl", "PriorityWorldwideParcelIntl", "SmallPacketInternationalAir", "SmallPacketInternationalSurface", "TrackedPacketInternational"

However these services are based on a combination of weight, destination and options. So I'm not sure how useful the full list is.

Purolator service levels are,

"PurolatorExpress", "PurolatorExpress12PM", "PurolatorExpressPack12PM", "PurolatorExpressBox12PM", "PurolatorExpressEnvelope12PM", "PurolatorExpress1030AM", "PurolatorExpress9AM", "PurolatorExpressBox", "PurolatorExpressBox1030AM", "PurolatorExpressBox9AM", "PurolatorExpressBoxEvening", "PurolatorExpressBoxInternational", "PurolatorExpressBoxUS", "PurolatorExpressEnvelope", "PurolatorExpressEnvelope1030AM", "PurolatorExpressEnvelope9AM", "PurolatorExpressEnvelopeEvening", "PurolatorExpressEnvelopeInternational", "PurolatorExpressEnvelopeUS", "PurolatorExpressEvening", "PurolatorExpressInternational", "PurolatorExpressInternational1030AM", "PurolatorExpressInternational1200", "PurolatorExpressInternational9AM", "PurolatorExpressBoxInternational1030AM", "PurolatorExpressBoxInternational1200", "PurolatorExpressBoxInternational9AM", "PurolatorExpressEnvelopeInternational1030AM", "PurolatorExpressEnvelopeInternational1200", "PurolatorExpressEnvelopeInternational9AM", "PurolatorExpressPackInternational1030AM", "PurolatorExpressPackInternational1200", "PurolatorExpressPackInternational9AM", "PurolatorExpressPack", "PurolatorExpressPack1030AM", "PurolatorExpressPack9AM", "PurolatorExpressPackEvening", "PurolatorExpressPackInternational", "PurolatorExpressPackUS", "PurolatorExpressUS", "PurolatorExpressUS1030AM", "PurolatorExpressUS1200", "PurolatorExpressUS9AM", "PurolatorExpressBoxUS1030AM", "PurolatorExpressBoxUS1200", "PurolatorExpressBoxUS9AM", "PurolatorExpressEnvelopeUS1030AM", "PurolatorExpressEnvelopeUS1200", "PurolatorExpressEnvelopeUS9AM", "PurolatorExpressPackUS1030AM", "PurolatorExpressPackUS1200", "PurolatorExpressPackUS9AM", "PurolatorGround", "PurolatorGround1030AM", "PurolatorGround9AM", "PurolatorGround12PM", "PurolatorGroundDistribution", "PurolatorGroundEvening", "PurolatorGroundRegional", "PurolatorGroundUS"

This is an example of the service levels that are based on the time of day, there are cutoffs that you can hit these service levels for the label_date.

In general it is quite difficult to know ahead of time which service levels are available and thats where our rating api comes in.