From b93382c2e538d1085300aa41f1cd698a79f78e09 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Tue, 9 Jul 2024 15:35:25 -0600 Subject: [PATCH 1/2] feat: adds new recommend_ship_date and estimate_delivery_date functions --- CHANGELOG.md | 1 + easypost/easypost_client.py | 2 + easypost/services/__init__.py | 1 + easypost/services/shipment_service.py | 10 + easypost/services/smartrate_service.py | 38 + ...test_retrieve_estimated_delivery_date.yaml | 792 ++++++++++++++--- .../test_shipment_recommend_ship_date.yaml | 801 ++++++++++++++++++ ...test_smartrate_estimate_delivery_date.yaml | 87 ++ .../test_smartrate_recommend_ship_date.yaml | 90 ++ tests/conftest.py | 7 +- tests/test_shipment.py | 10 + tests/test_smartrate.py | 45 + 12 files changed, 1747 insertions(+), 137 deletions(-) create mode 100644 easypost/services/smartrate_service.py create mode 100644 tests/cassettes/test_shipment_recommend_ship_date.yaml create mode 100644 tests/cassettes/test_smartrate_estimate_delivery_date.yaml create mode 100644 tests/cassettes/test_smartrate_recommend_ship_date.yaml create mode 100644 tests/test_smartrate.py diff --git a/CHANGELOG.md b/CHANGELOG.md index ac03144..8ed9a0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Next Release +- Adds new `shipment.recommend_ship_date`, `smartrate.recommend_ship_date`, and `smartrate.estimate_delivery_date` functions - Routes `UpsAccount`, `UpsMailInnovationsAccount`, and `UpsSurepostAccount` create/update requests to the new `/ups_oauth_registrations` endpoint - Starting `2024-08-05`, UPS accounts will require a new payload to register or update. See [UPS OAuth 2.0 Update](https://support.easypost.com/hc/en-us/articles/26635027512717-UPS-OAuth-2-0-Update?utm_medium=email&_hsenc=p2ANqtz-96MmFtWICOzy9sKRbbcZSiMovZSrY3MSX1_bgY9N3f9yLVfWQdLhjAGq-SmNcOnDIS6GYhZ0OApjDBrGkKyLLMx1z6_TFOVp6-wllhEFQINrkuRuc&_hsmi=313130292&utm_content=313130292&utm_source=hs_email) for more details diff --git a/easypost/easypost_client.py b/easypost/easypost_client.py index c7ab75d..23159d5 100644 --- a/easypost/easypost_client.py +++ b/easypost/easypost_client.py @@ -32,6 +32,7 @@ ReportService, ScanFormService, ShipmentService, + SmartRateService, TrackerService, UserService, WebhookService, @@ -75,6 +76,7 @@ def __init__( self.report = ReportService(self) self.scan_form = ScanFormService(self) self.shipment = ShipmentService(self) + self.smartrate = SmartRateService(self) self.tracker = TrackerService(self) self.user = UserService(self) self.webhook = WebhookService(self) diff --git a/easypost/services/__init__.py b/easypost/services/__init__.py index d8a5f88..66e8346 100644 --- a/easypost/services/__init__.py +++ b/easypost/services/__init__.py @@ -21,6 +21,7 @@ from easypost.services.report_service import ReportService from easypost.services.scan_form_service import ScanFormService from easypost.services.shipment_service import ShipmentService +from easypost.services.smartrate_service import SmartRateService from easypost.services.tracker_service import TrackerService from easypost.services.user_service import UserService from easypost.services.webhook_service import WebhookService diff --git a/easypost/services/shipment_service.py b/easypost/services/shipment_service.py index 409eb7b..21bf8cc 100644 --- a/easypost/services/shipment_service.py +++ b/easypost/services/shipment_service.py @@ -153,3 +153,13 @@ def retrieve_estimated_delivery_date(self, id: str, planned_ship_date: str) -> L response = Requestor(self._client).request(method=RequestMethod.GET, url=url, params=wrapped_params) return convert_to_easypost_object(response=response.get("rates", [])) + + def recommend_ship_date(self, id: str, **params) -> List[Dict[str, Any]]: + """Retrieve a recommended ship date for an existing Shipment via the Precision Shipping API, + based on a specific desired delivery date. + """ + url = f"{self._instance_url(self._model_class, id)}/smartrate/precision_shipping" + + response = Requestor(self._client).request(method=RequestMethod.GET, url=url, params=params) + + return convert_to_easypost_object(response=response.get("rates", [])) diff --git a/easypost/services/smartrate_service.py b/easypost/services/smartrate_service.py new file mode 100644 index 0000000..3425452 --- /dev/null +++ b/easypost/services/smartrate_service.py @@ -0,0 +1,38 @@ +from typing import ( + Any, + Dict, + List, +) + +from easypost.easypost_object import convert_to_easypost_object +from easypost.requestor import ( + RequestMethod, + Requestor, +) +from easypost.services.base_service import BaseService + + +class SmartRateService(BaseService): + def __init__(self, client): + self._client = client + self._model_class = "Smartrate" + + def estimate_delivery_date(self, **params) -> List[Dict[str, Any]]: + """Retrieve the estimated delivery date of each carrier-service level combination via the + Smart Deliver By API, based on a specific ship date and origin-destination postal code pair. + """ + url = "/smartrate/deliver_by" + + response = Requestor(self._client).request(method=RequestMethod.POST, url=url, params=params) + + return convert_to_easypost_object(response=response) + + def recommend_ship_date(self, **params) -> List[Dict[str, Any]]: + """Retrieve a recommended ship date for each carrier-service level combination via the + Smart Deliver On API, based on a specific ship date and origin-destination postal code pair. + """ + url = "/smartrate/deliver_on" + + response = Requestor(self._client).request(method=RequestMethod.POST, url=url, params=params) + + return convert_to_easypost_object(response=response) diff --git a/tests/cassettes/test_retrieve_estimated_delivery_date.yaml b/tests/cassettes/test_retrieve_estimated_delivery_date.yaml index 29181c9..2efe99e 100644 --- a/tests/cassettes/test_retrieve_estimated_delivery_date.yaml +++ b/tests/cassettes/test_retrieve_estimated_delivery_date.yaml @@ -26,100 +26,346 @@ interactions: uri: https://api.easypost.com/v2/shipments response: body: - string: '{"created_at": "2023-11-28T22:10:30Z", "is_return": false, "messages": - [{"carrier": "DhlEcs", "carrier_account_id": "ca_b1a0a1bc45844159812e0224d53948ea", - "type": "rate_error", "message": "Unauthorized. Please check credentials and - try again"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c7b4cfaf671b4984b84023d77561394a", - "type": "rate_error", "message": "Unauthorized. Please check credentials and - try again"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_c3cbbd21bc97400bbbaed6d030909476", - "type": "rate_error", "message": "Unauthorized. Please check credentials and - try again"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0d64fd488c1444cf9bc16f858703e28f", - "type": "rate_error", "message": "Unauthorized. Please check credentials and - try again"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_711d8c4f9be54801b984e5dc9f2b5a7c", - "type": "rate_error", "message": "Unauthorized. Please check credentials and - try again"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_99007e1aeb66421faf82676f1199481e", - "type": "rate_error", "message": "Unauthorized. Please check credentials and - try again"}], "mode": "test", "options": {"currency": "USD", "payment": {"type": - "SENDER"}, "date_advance": 0}, "reference": null, "status": "unknown", "tracking_code": - null, "updated_at": "2023-11-28T22:10:31Z", "batch_id": null, "batch_status": - null, "batch_message": null, "customs_info": null, "from_address": {"id": - "adr_f169d0918e3a11eea0813cecef1b359e", "object": "Address", "created_at": - "2023-11-28T22:10:30+00:00", "updated_at": "2023-11-28T22:10:30+00:00", "name": - "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": - "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": - "US", "phone": "", "email": "", "mode": "test", "carrier_facility": - null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "insurance": null, "order_id": null, "parcel": {"id": "prcl_be4399c1a66940a0bdb3181dd1dc351b", - "object": "Parcel", "created_at": "2023-11-28T22:10:30Z", "updated_at": "2023-11-28T22:10:30Z", + string: '{"created_at": "2024-07-09T21:12:46Z", "is_return": false, "messages": + [{"carrier": "DHLExpress", "carrier_account_id": "ca_2b428229ad214147a2ec13c4faf18934", + "type": "rate_error", "message": "Unable to retrieve DHLExpress rates for + US domestic shipments."}, {"carrier": "AustraliaPost", "carrier_account_id": + "ca_3b84ac568d7444759b77d1f2f2c05d7a", "type": "rate_error", "message": "Unable + to retrieve AustraliaPost rates for non-AU origin address."}, {"carrier": + "ParcelForce", "carrier_account_id": "ca_a32ed104ca784c25b25f19d7c28191c3", + "type": "rate_error", "message": "Unable to retrieve ParcelForce rates for + non-GB origin address."}, {"carrier": "Canpar", "carrier_account_id": "ca_32c1bc2cb75e45f19cff9fd047204f6e", + "type": "rate_error", "message": "Unable to retrieve Canpar rates for non-CA + origin shipments."}, {"carrier": "LoomisExpress", "carrier_account_id": "ca_63fb7c3dd56c410085454c5a79bc545f", + "type": "rate_error", "message": "Unable to retrieve LoomisExpress rates for + non-CA origin address."}, {"carrier": "RoyalMail", "carrier_account_id": "ca_f80ce1217c0b4f9b82d566b88dc1a6bd", + "type": "rate_error", "message": "Unable to retrieve RoyalMail rates for non-GB + origin address."}, {"type": "rate_error", "carrier": "OnTrac", "message": + "credentials.account_number: Required"}, {"type": "rate_error", "carrier": + "LSO", "message": "credentials.username: Required"}, {"type": "rate_error", + "carrier": "LSO", "message": "credentials.password: Required"}, {"type": "rate_error", + "carrier": "Purolator", "message": "shipment.from_address.country: All shipments + must originate in Canada (CA)."}, {"type": "rate_error", "carrier": "Purolator", + "message": "shipment.return_address.country: All shipments must originate + in Canada (CA)."}, {"carrier": "CouriersPlease", "carrier_account_id": "ca_6c70860c1edd46c69394beee4e02765f", + "type": "rate_error", "message": "credentials.username: field required and + credentials.password: field required"}, {"carrier": "AmazonMws", "carrier_account_id": + "ca_96d47560a4e748149f7ecc9bbbbe69b4", "type": "rate_error", "message": "shipment.options.fulfiller_order_id: + Required and shipment.options.fulfiller_order_items: Required"}, {"carrier": + "CanadaPost", "carrier_account_id": "ca_c4d49f6f47c94dfcba93f761f79ad2d8", + "type": "rate_error", "message": "[''Unable to get rates for shipments originating + outside of Canada.'']"}, {"carrier": "LaserShipV2", "carrier_account_id": + "ca_6e70924a6c6248c2b73bc7c8949e8849", "type": "rate_error", "message": "shipment.options.dropoff_max_datetime: + field required"}, {"carrier": "LaserShip", "carrier_account_id": "ca_6d2f96c3dfce4c75bd13ee030410ae4d", + "type": "rate_error", "message": "No rates found. The shipment may be outside + of the service area, or you may need to provide your sort codes and rates + to EasyPost."}, {"carrier": "Veho", "carrier_account_id": "ca_e683eaf9405643a8823ef18b4e5f3742", + "type": "rate_error", "message": "shipment.to_address.zip: Can only ship/pickup + within Denver, Dallas-Fort Worth, or Chicago."}, {"carrier": "CourierExpress", + "carrier_account_id": "ca_f18d04c61d2546a68d7cd171960cb0b8", "type": "rate_error", + "message": "shipment.to_address: Courier Express only services the following + states: [''AL'', ''FL'', ''GA'', ''KY'', ''MS'', ''NC'', ''SC'', ''TN'', ''VA'']."}, + {"carrier": "ColumbusLastMile", "carrier_account_id": "ca_a4524802c56348d1a274f879bbaf8f78", + "type": "rate_error", "message": "Not a valid destination postal code"}, {"carrier": + "Estafeta", "carrier_account_id": "ca_38a0fca99c294d4d9d789b3a4b660a4b", "type": + "rate_error", "message": "shipment.from_address.street1: street1 must have + the format '' '', shipment.from_address.street2: + street2 must have the format ''[] Col. '', shipment.from_address.country: Only domestic shipments are supported + for Estafeta, shipment.to_address.street1: street1 must have the format '' '', shipment.to_address.street2: field + required, and shipment.to_address.country: Only domestic shipments are supported + for Estafeta"}, {"carrier": "UPS", "carrier_account_id": "ca_10677005f7e444c299088666025e3cdc", + "type": "rate_error", "message": "Invalid Credentials. Ups Account Number + is required"}, {"carrier": "DhlEcs", "carrier_account_id": "ca_0b612c9b7014401b9989db19953a24f9", + "type": "rate_error", "message": "credentials.pickup_id: value is not a valid + integer"}, {"type": "rate_error", "carrier": "GSO", "message": "the carrier + rejected the request as invalid"}, {"carrier": "Newgistics", "carrier_account_id": + "ca_3a1b3046cb7943898bea6428237e1e33", "type": "rate_error", "message": "No + rates found. The shipment may be outside of the service area, or you may need + to provide your rates to support."}, {"carrier": "AxlehireV3", "carrier_account_id": + "ca_a381c1bace794c158d59a58b0a94a2e2", "type": "rate_error", "message": "Forbidden. + Please check credentials and try again"}, {"carrier": "UPS", "carrier_account_id": + "ca_db930d5251ee4d2d8560a477b3bb1796", "type": "rate_error", "message": "Invalid + Access License number"}, {"carrier": "DHLeCommerce", "carrier_account_id": + "ca_bc906eccfedc4e46952feacf2d69d3dc", "type": "rate_error", "message": "the + carrier rejected the request as invalid"}, {"carrier": "FedExSmartPost", "carrier_account_id": + "ca_7d73446c9ded4b8fa67dee03f9f379b6", "type": "rate_error", "message": "FedEx + returned error: Authentication Failed"}, {"carrier": "DPDUK", "carrier_account_id": + "ca_fd242ecb9ce74e6ea771f25b800055b1", "type": "rate_error", "message": "Unauthorized"}, + {"carrier": "OmniParcel", "carrier_account_id": "ca_2c5768cc85c5420cba30b3b1dd545fbb", + "type": "rate_error", "message": "No rates available."}], "mode": "production", + "options": {"currency": "USD", "payment": {"type": "SENDER"}, "date_advance": + 0}, "reference": null, "status": "unknown", "tracking_code": null, "updated_at": + "2024-07-09T21:12:50Z", "batch_id": null, "batch_status": null, "batch_message": + null, "customs_info": null, "from_address": {"id": "adr_fd4f3f1d3e3711efbd243cecef1b359e", + "object": "Address", "created_at": "2024-07-09T21:12:46+00:00", "updated_at": + "2024-07-09T21:12:46+00:00", "name": "Jack Sparrow", "company": null, "street1": + "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": + "CA", "zip": "94107", "country": "US", "phone": "", "email": "", + "mode": "production", "carrier_facility": null, "residential": null, "federal_tax_id": + null, "state_tax_id": null, "verifications": {}}, "insurance": null, "order_id": + null, "parcel": {"id": "prcl_2d03f3027b1047ffbf47420ae2575344", "object": + "Parcel", "created_at": "2024-07-09T21:12:46Z", "updated_at": "2024-07-09T21:12:46Z", "length": 10.0, "width": 8.0, "height": 4.0, "predefined_package": null, "weight": - 15.4, "mode": "test"}, "postage_label": null, "rates": [{"id": "rate_fccd2abdf2324cf9bbf43299c9d005f9", - "object": "Rate", "created_at": "2023-11-28T22:10:31Z", "updated_at": "2023-11-28T22:10:31Z", - "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.93", - "currency": "USD", "retail_rate": "8.00", "retail_currency": "USD", "list_rate": - "6.07", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 15.4, "mode": "production"}, "postage_label": null, "rates": [{"id": "rate_ba5762bf0ea04dc6bb716301630d06cb", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "Priority", "carrier": "UPSMailInnovations", + "rate": "0.01", "currency": "USD", "retail_rate": null, "retail_currency": + null, "list_rate": null, "list_currency": null, "billing_type": "carrier", + "delivery_days": null, "delivery_date": null, "delivery_date_guaranteed": + null, "est_delivery_days": null, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_942b62c9d6ea45578a344b365d7aa062"}, {"id": "rate_84bb9cf461084033ace344a1347f740f", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "ExpeditedMailInnovations", "carrier": "UPSMailInnovations", + "rate": "0.01", "currency": "USD", "retail_rate": null, "retail_currency": + null, "list_rate": null, "list_currency": null, "billing_type": "carrier", + "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": null, + "est_delivery_days": 3, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_942b62c9d6ea45578a344b365d7aa062"}, {"id": "rate_5d31010a6be340e78db7fdbf72c46f61", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "DPD10:00", "carrier": "DPD", "rate": "0.01", + "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_9a52fb4c641e4753bdfb08e5dd0c40ae", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "DPD12:00", "carrier": "DPD", "rate": "0.01", + "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_1633e0e299b7446099bfd6a2b3e18a54", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "DPD18:00", "carrier": "DPD", "rate": "0.01", + "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_79deb10aee744ecdb2baf96aed0f606b", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "DPD8:30", "carrier": "DPD", "rate": "0.01", + "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_344b50e92a3d4bd98cc52c9952ea8b8d", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "DPDCLASSIC", "carrier": "DPD", "rate": "0.01", + "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_6a11ea4ac9764eb49825b3cd39b6314d", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "DPDEXPRESS", "carrier": "DPD", "rate": "0.01", + "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_8bd6ecea78854136851a8a644e21274f", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "DPDINTERNATIONALMAIL", "carrier": "DPD", + "rate": "0.01", "currency": "EUR", "retail_rate": null, "retail_currency": + null, "list_rate": null, "list_currency": null, "billing_type": "carrier", + "delivery_days": null, "delivery_date": null, "delivery_date_guaranteed": + null, "est_delivery_days": null, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_9fd0885297924bf2b26dbe7daf7feba1", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "DPDPARCELLETTER", "carrier": "DPD", "rate": + "0.01", "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_2a79544c415c4d00a1af2a96a72df878", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "DPDPARCELLETTERPLUS", "carrier": "DPD", + "rate": "0.01", "currency": "EUR", "retail_rate": null, "retail_currency": + null, "list_rate": null, "list_currency": null, "billing_type": "carrier", + "delivery_days": null, "delivery_date": null, "delivery_date_guaranteed": + null, "est_delivery_days": null, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_1d7bd3576e1344a3848510ff9a18a101", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "carrier_account_id": + "ca_4fcd9a658b494a979793bb899a40c5b5"}, {"id": "rate_dccbd26d62cc4d0ca639684bab520e4d", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "GroundAdvantage", "carrier": "USPS", "rate": + "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", + "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "carrier_account_id": + "ca_4fcd9a658b494a979793bb899a40c5b5"}, {"id": "rate_f82d3cf02557475bb24077c59da86306", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "First", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": - 3, "shipment_id": "shp_d7e364778ec44a6da37e617e5285aaf7", "carrier_account_id": - "ca_b25657e9896e4d63ac8151ac346ac41e"}, {"id": "rate_392b84979edf44fe9702cabd1a19f4d0", - "object": "Rate", "created_at": "2023-11-28T22:10:31Z", "updated_at": "2023-11-28T22:10:31Z", - "mode": "test", "service": "First", "carrier": "USPS", "rate": "5.93", "currency": - "USD", "retail_rate": "8.00", "retail_currency": "USD", "list_rate": "6.07", - "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": - null, "delivery_date_guaranteed": false, "est_delivery_days": 3, "shipment_id": - "shp_d7e364778ec44a6da37e617e5285aaf7", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}, - {"id": "rate_b232baab37914941b0f3314a780aba4e", "object": "Rate", "created_at": - "2023-11-28T22:10:31Z", "updated_at": "2023-11-28T22:10:31Z", "mode": "test", - "service": "ParcelSelect", "carrier": "USPS", "rate": "5.93", "currency": - "USD", "retail_rate": "8.00", "retail_currency": "USD", "list_rate": "6.07", - "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": - null, "delivery_date_guaranteed": false, "est_delivery_days": 3, "shipment_id": - "shp_d7e364778ec44a6da37e617e5285aaf7", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}, - {"id": "rate_c01a1fbe51e9462da3d91a5f5c96ac97", "object": "Rate", "created_at": - "2023-11-28T22:10:31Z", "updated_at": "2023-11-28T22:10:31Z", "mode": "test", - "service": "Express", "carrier": "USPS", "rate": "31.25", "currency": "USD", - "retail_rate": "35.80", "retail_currency": "USD", "list_rate": "31.25", "list_currency": - "USD", "billing_type": "easypost", "delivery_days": null, "delivery_date": - null, "delivery_date_guaranteed": false, "est_delivery_days": null, "shipment_id": - "shp_d7e364778ec44a6da37e617e5285aaf7", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}, - {"id": "rate_5021b4da9be645e49a72190327e4247e", "object": "Rate", "created_at": - "2023-11-28T22:10:31Z", "updated_at": "2023-11-28T22:10:31Z", "mode": "test", - "service": "Priority", "carrier": "USPS", "rate": "6.95", "currency": "USD", - "retail_rate": "10.20", "retail_currency": "USD", "list_rate": "8.24", "list_currency": - "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, - "delivery_date_guaranteed": false, "est_delivery_days": 2, "shipment_id": - "shp_d7e364778ec44a6da37e617e5285aaf7", "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e"}], - "refund_status": null, "scan_form": null, "selected_rate": null, "tracker": - null, "to_address": {"id": "adr_f16734208e3a11eeaf20ac1f6bc53342", "object": - "Address", "created_at": "2023-11-28T22:10:30+00:00", "updated_at": "2023-11-28T22:10:30+00:00", - "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": + 3, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "carrier_account_id": + "ca_4fcd9a658b494a979793bb899a40c5b5"}, {"id": "rate_3186cac8184f471bb480031dc1f3d91f", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "ParcelSelect", "carrier": "USPS", "rate": + "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", + "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "carrier_account_id": + "ca_4fcd9a658b494a979793bb899a40c5b5"}, {"id": "rate_e50d56d7c99b4dc891cdc7f734b51518", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "carrier_account_id": + "ca_4fcd9a658b494a979793bb899a40c5b5"}, {"id": "rate_a9f2e062cda94213bc8376da3b799e5b", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "DHLParcelExpedited", "carrier": "DhlEcs", + "rate": "6.63", "currency": "USD", "retail_rate": null, "retail_currency": + null, "list_rate": null, "list_currency": null, "billing_type": "carrier", + "delivery_days": 5, "delivery_date": "2024-07-15T00:00:00Z", "delivery_date_guaranteed": + false, "est_delivery_days": 5, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_77415c3fbd754d65bb9298e9a69d7084"}, {"id": "rate_56bbfa74195f4ab18ca2c8166907e0c2", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "DHLParcelGround", "carrier": "DhlEcs", "rate": + "6.50", "currency": "USD", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": 6, + "delivery_date": "2024-07-15T00:00:00Z", "delivery_date_guaranteed": false, + "est_delivery_days": 6, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_77415c3fbd754d65bb9298e9a69d7084"}, {"id": "rate_03eb6ee92bad42389f1764087abef25a", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "FIRST_OVERNIGHT", "carrier": "FedEx", "rate": + "144.42", "currency": "USD", "retail_rate": null, "retail_currency": null, + "list_rate": "144.42", "list_currency": "USD", "billing_type": "carrier", + "delivery_days": 1, "delivery_date": "2024-07-10T08:30:00Z", "delivery_date_guaranteed": + true, "est_delivery_days": 1, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_9ef05b4ccc984e29941df09487cfdf4f", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "PRIORITY_OVERNIGHT", "carrier": "FedEx", + "rate": "108.07", "currency": "USD", "retail_rate": null, "retail_currency": + null, "list_rate": "108.07", "list_currency": "USD", "billing_type": "carrier", + "delivery_days": 1, "delivery_date": "2024-07-10T10:30:00Z", "delivery_date_guaranteed": + true, "est_delivery_days": 1, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_c83e4f1b89cb49d8b8d332763b566436", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "STANDARD_OVERNIGHT", "carrier": "FedEx", + "rate": "98.79", "currency": "USD", "retail_rate": null, "retail_currency": + null, "list_rate": "98.79", "list_currency": "USD", "billing_type": "carrier", + "delivery_days": 1, "delivery_date": "2024-07-10T17:00:00Z", "delivery_date_guaranteed": + true, "est_delivery_days": 1, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_1325891633c24c4793c68d75ca95d357", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "FEDEX_2_DAY_AM", "carrier": "FedEx", "rate": + "39.63", "currency": "USD", "retail_rate": null, "retail_currency": null, + "list_rate": "39.63", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 2, "delivery_date": "2024-07-11T10:30:00Z", "delivery_date_guaranteed": true, + "est_delivery_days": 2, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_84783b3078f9409185933d6d875eddb5", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "FEDEX_2_DAY", "carrier": "FedEx", "rate": + "33.39", "currency": "USD", "retail_rate": null, "retail_currency": null, + "list_rate": "33.39", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 2, "delivery_date": "2024-07-11T17:00:00Z", "delivery_date_guaranteed": true, + "est_delivery_days": 2, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_b42d417795ab40a4ab236ab3c84a852d", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "FEDEX_GROUND", "carrier": "FedEx", "rate": + "14.47", "currency": "USD", "retail_rate": null, "retail_currency": null, + "list_rate": "16.67", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 2, "delivery_date": "2024-07-11T23:59:00Z", "delivery_date_guaranteed": true, + "est_delivery_days": 2, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_004a106ea5f843758726f60efe2e53d5", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "FEDEX_EXPRESS_SAVER", "carrier": "FedEx", + "rate": "30.32", "currency": "USD", "retail_rate": null, "retail_currency": + null, "list_rate": "30.32", "list_currency": "USD", "billing_type": "carrier", + "delivery_days": 3, "delivery_date": "2024-07-12T17:00:00Z", "delivery_date_guaranteed": + true, "est_delivery_days": 3, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_22350a8640904c209d922092328f37d0", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "NextDayAir", "carrier": "UPS", "rate": "89.07", + "currency": "USD", "retail_rate": "89.07", "retail_currency": "USD", "list_rate": + "102.19", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 1, "delivery_date": "2024-07-10T10:30:00Z", "delivery_date_guaranteed": true, + "est_delivery_days": 1, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}, {"id": "rate_c7a1a85bbc5e404ca1fd25cc016140b5", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "2ndDayAir", "carrier": "UPS", "rate": "29.64", + "currency": "USD", "retail_rate": "29.64", "retail_currency": "USD", "list_rate": + "31.84", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 2, "delivery_date": "2024-07-11T23:00:00Z", "delivery_date_guaranteed": false, + "est_delivery_days": 2, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}, {"id": "rate_31bbe38959144adc9fa413edb95a3f89", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "Ground", "carrier": "UPS", "rate": "14.88", + "currency": "USD", "retail_rate": "14.88", "retail_currency": "USD", "list_rate": + "15.85", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 2, "delivery_date": "2024-07-11T23:00:00Z", "delivery_date_guaranteed": false, + "est_delivery_days": 2, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}, {"id": "rate_665b60c99e6b497999c041ffc56ef77b", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "3DaySelect", "carrier": "UPS", "rate": "22.60", + "currency": "USD", "retail_rate": "22.60", "retail_currency": "USD", "list_rate": + "25.10", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 3, "delivery_date": "2024-07-12T23:00:00Z", "delivery_date_guaranteed": false, + "est_delivery_days": 3, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}, {"id": "rate_7eb346c3de754d30969679dda6fb7baf", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "NextDayAirSaver", "carrier": "UPS", "rate": + "83.84", "currency": "USD", "retail_rate": "83.84", "retail_currency": "USD", + "list_rate": "93.40", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 1, "delivery_date": "2024-07-10T23:00:00Z", "delivery_date_guaranteed": true, + "est_delivery_days": 1, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}, {"id": "rate_fca3e79823304153b68a3cbaec5b6a4f", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "NextDayAirEarlyAM", "carrier": "UPS", "rate": + "124.09", "currency": "USD", "retail_rate": "124.09", "retail_currency": "USD", + "list_rate": "137.22", "list_currency": "USD", "billing_type": "carrier", + "delivery_days": 1, "delivery_date": "2024-07-10T08:00:00Z", "delivery_date_guaranteed": + true, "est_delivery_days": 1, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}, {"id": "rate_35d8410979014ded951649449d6f856a", + "object": "Rate", "created_at": "2024-07-09T21:12:50Z", "updated_at": "2024-07-09T21:12:50Z", + "mode": "production", "service": "2ndDayAirAM", "carrier": "UPS", "rate": + "33.57", "currency": "USD", "retail_rate": "33.57", "retail_currency": "USD", + "list_rate": "35.84", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 2, "delivery_date": "2024-07-11T10:30:00Z", "delivery_date_guaranteed": true, + "est_delivery_days": 2, "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}], "refund_status": + null, "scan_form": null, "selected_rate": null, "tracker": null, "to_address": + {"id": "adr_fd4a8fa23e3711ef82cfac1f6bc539aa", "object": "Address", "created_at": + "2024-07-09T21:12:46+00:00", "updated_at": "2024-07-09T21:12:46+00:00", "name": + "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", - "phone": "", "email": "", "mode": "test", "carrier_facility": + "phone": "", "email": "", "mode": "production", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "usps_zone": 4, "return_address": {"id": "adr_f169d0918e3a11eea0813cecef1b359e", - "object": "Address", "created_at": "2023-11-28T22:10:30+00:00", "updated_at": - "2023-11-28T22:10:30+00:00", "name": "Jack Sparrow", "company": null, "street1": + {}}, "usps_zone": 4, "return_address": {"id": "adr_fd4f3f1d3e3711efbd243cecef1b359e", + "object": "Address", "created_at": "2024-07-09T21:12:46+00:00", "updated_at": + "2024-07-09T21:12:46+00:00", "name": "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": "US", "phone": "", "email": "", - "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": + "mode": "production", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {}}, "buyer_address": {"id": - "adr_f16734208e3a11eeaf20ac1f6bc53342", "object": "Address", "created_at": - "2023-11-28T22:10:30+00:00", "updated_at": "2023-11-28T22:10:30+00:00", "name": + "adr_fd4a8fa23e3711ef82cfac1f6bc539aa", "object": "Address", "created_at": + "2024-07-09T21:12:46+00:00", "updated_at": "2024-07-09T21:12:46+00:00", "name": "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", - "phone": "", "email": "", "mode": "test", "carrier_facility": + "phone": "", "email": "", "mode": "production", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": - {}}, "forms": [], "fees": [], "id": "shp_d7e364778ec44a6da37e617e5285aaf7", + {}}, "forms": [], "fees": [], "id": "shp_29740ab2a50d45f2be97c7bae93d6852", "object": "Shipment"}' headers: cache-control: - private, no-cache, no-store content-length: - - '6394' + - '25921' content-type: - application/json; charset=utf-8 expires: - '0' location: - - /api/v2/shipments/shp_d7e364778ec44a6da37e617e5285aaf7 + - /api/v2/shipments/shp_29740ab2a50d45f2be97c7bae93d6852 pragma: - no-cache referrer-policy: @@ -135,20 +381,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - 88ad7b9265666556e78a9fab003fca20 + - 1f7ff67a668da7cee2b9901200294bc0 x-frame-options: - SAMEORIGIN x-node: - - bigweb36nuq + - bigweb41nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb1nuq b3de2c47ef - - extlb1nuq 003ad9bca0 + - intlb3nuq fa152d4755 + - extlb2nuq fa152d4755 x-runtime: - - '0.752599' + - '4.074006' x-version-label: - - easypost-202311250013-a0f06fbc2c-master + - easypost-202407092027-324ee50b5a-master x-xss-protection: - 1; mode=block status: @@ -168,64 +414,338 @@ interactions: user-agent: - method: GET - uri: https://api.easypost.com/v2/shipments/shp_d7e364778ec44a6da37e617e5285aaf7/smartrate/delivery_date?planned_ship_date=2023-12-28 + uri: https://api.easypost.com/v2/shipments/shp_29740ab2a50d45f2be97c7bae93d6852/smartrate/delivery_date?planned_ship_date=2024-07-11 response: body: string: '{"rates": [{"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": - 2, "percentile_75": 5, "percentile_85": 5, "percentile_90": 5, "percentile_95": - 5, "percentile_97": 5, "percentile_99": 7}, "easypost_estimated_delivery_date": - "2023-12-30", "planned_ship_date": "2023-12-28"}, "rate": {"carrier": "USPS", - "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e", "created_at": - "2023-11-28T22:10:31Z", "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": - false, "delivery_days": 3, "est_delivery_days": 3, "id": "rate_fccd2abdf2324cf9bbf43299c9d005f9", - "list_currency": "USD", "list_rate": 6.07, "mode": "test", "object": "Rate", - "rate": 5.93, "retail_currency": "USD", "retail_rate": 8.0, "service": "GroundAdvantage", - "shipment_id": "shp_d7e364778ec44a6da37e617e5285aaf7", "updated_at": "2023-11-28T22:10:31Z"}}, - {"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": 2, - "percentile_75": 5, "percentile_85": 5, "percentile_90": 5, "percentile_95": - 5, "percentile_97": 5, "percentile_99": 7}, "easypost_estimated_delivery_date": - "2023-12-30", "planned_ship_date": "2023-12-28"}, "rate": {"carrier": "USPS", - "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e", "created_at": - "2023-11-28T22:10:31Z", "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": - false, "delivery_days": 3, "est_delivery_days": 3, "id": "rate_392b84979edf44fe9702cabd1a19f4d0", - "list_currency": "USD", "list_rate": 6.07, "mode": "test", "object": "Rate", - "rate": 5.93, "retail_currency": "USD", "retail_rate": 8.0, "service": "First", - "shipment_id": "shp_d7e364778ec44a6da37e617e5285aaf7", "updated_at": "2023-11-28T22:10:31Z"}}, - {"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": 2, - "percentile_75": 5, "percentile_85": 5, "percentile_90": 5, "percentile_95": - 5, "percentile_97": 5, "percentile_99": 7}, "easypost_estimated_delivery_date": - "2023-12-30", "planned_ship_date": "2023-12-28"}, "rate": {"carrier": "USPS", - "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e", "created_at": - "2023-11-28T22:10:31Z", "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": - false, "delivery_days": 3, "est_delivery_days": 3, "id": "rate_b232baab37914941b0f3314a780aba4e", - "list_currency": "USD", "list_rate": 6.07, "mode": "test", "object": "Rate", - "rate": 5.93, "retail_currency": "USD", "retail_rate": 8.0, "service": "ParcelSelect", - "shipment_id": "shp_d7e364778ec44a6da37e617e5285aaf7", "updated_at": "2023-11-28T22:10:31Z"}}, + 4, "percentile_75": 4, "percentile_85": 5, "percentile_90": 5, "percentile_95": + 6, "percentile_97": 6, "percentile_99": 7}, "easypost_estimated_delivery_date": + "2024-07-15", "planned_ship_date": "2024-07-11"}, "rate": {"carrier": "UPSMailInnovations", + "carrier_account_id": "ca_942b62c9d6ea45578a344b365d7aa062", "created_at": + "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": + false, "delivery_days": null, "est_delivery_days": null, "id": "rate_ba5762bf0ea04dc6bb716301630d06cb", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "Priority", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "updated_at": + "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": + {"percentile_50": 4, "percentile_75": 5, "percentile_85": 5, "percentile_90": + 6, "percentile_95": 6, "percentile_97": 7, "percentile_99": 8}, "easypost_estimated_delivery_date": + "2024-07-15", "planned_ship_date": "2024-07-11"}, "rate": {"carrier": "UPSMailInnovations", + "carrier_account_id": "ca_942b62c9d6ea45578a344b365d7aa062", "created_at": + "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": + false, "delivery_days": 3, "est_delivery_days": 3, "id": "rate_84bb9cf461084033ace344a1347f740f", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "ExpeditedMailInnovations", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"error": "Carrier DPD and service DPD10:00 combination is not supported by + the Easypost Smartrate AI"}, "rate": {"carrier": "DPD", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", "created_at": "2024-07-09T21:12:50Z", + "currency": "EUR", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": null, "est_delivery_days": null, "id": "rate_5d31010a6be340e78db7fdbf72c46f61", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "DPD10:00", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "updated_at": + "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": {"error": "Carrier + DPD and service DPD12:00 combination is not supported by the Easypost Smartrate + AI"}, "rate": {"carrier": "DPD", "carrier_account_id": "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", + "created_at": "2024-07-09T21:12:50Z", "currency": "EUR", "delivery_date": + null, "delivery_date_guaranteed": false, "delivery_days": null, "est_delivery_days": + null, "id": "rate_9a52fb4c641e4753bdfb08e5dd0c40ae", "list_currency": null, + "list_rate": null, "mode": "production", "object": "Rate", "rate": 0.01, "retail_currency": + null, "retail_rate": null, "service": "DPD12:00", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"error": "Carrier DPD and service DPD18:00 combination is not supported by + the Easypost Smartrate AI"}, "rate": {"carrier": "DPD", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", "created_at": "2024-07-09T21:12:50Z", + "currency": "EUR", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": null, "est_delivery_days": null, "id": "rate_1633e0e299b7446099bfd6a2b3e18a54", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "DPD18:00", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "updated_at": + "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": {"error": "Carrier + DPD and service DPD8:30 combination is not supported by the Easypost Smartrate + AI"}, "rate": {"carrier": "DPD", "carrier_account_id": "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", + "created_at": "2024-07-09T21:12:50Z", "currency": "EUR", "delivery_date": + null, "delivery_date_guaranteed": false, "delivery_days": null, "est_delivery_days": + null, "id": "rate_79deb10aee744ecdb2baf96aed0f606b", "list_currency": null, + "list_rate": null, "mode": "production", "object": "Rate", "rate": 0.01, "retail_currency": + null, "retail_rate": null, "service": "DPD8:30", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"error": "Carrier DPD and service DPDCLASSIC combination is not supported + by the Easypost Smartrate AI"}, "rate": {"carrier": "DPD", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", "created_at": "2024-07-09T21:12:50Z", + "currency": "EUR", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": null, "est_delivery_days": null, "id": "rate_344b50e92a3d4bd98cc52c9952ea8b8d", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "DPDCLASSIC", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "updated_at": + "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": {"error": "Carrier + DPD and service DPDEXPRESS combination is not supported by the Easypost Smartrate + AI"}, "rate": {"carrier": "DPD", "carrier_account_id": "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", + "created_at": "2024-07-09T21:12:50Z", "currency": "EUR", "delivery_date": + null, "delivery_date_guaranteed": false, "delivery_days": null, "est_delivery_days": + null, "id": "rate_6a11ea4ac9764eb49825b3cd39b6314d", "list_currency": null, + "list_rate": null, "mode": "production", "object": "Rate", "rate": 0.01, "retail_currency": + null, "retail_rate": null, "service": "DPDEXPRESS", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"error": "Carrier DPD and service DPDINTERNATIONALMAIL combination is not + supported by the Easypost Smartrate AI"}, "rate": {"carrier": "DPD", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", "created_at": "2024-07-09T21:12:50Z", + "currency": "EUR", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": null, "est_delivery_days": null, "id": "rate_8bd6ecea78854136851a8a644e21274f", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "DPDINTERNATIONALMAIL", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"error": "Carrier DPD and service DPDPARCELLETTER combination is not supported + by the Easypost Smartrate AI"}, "rate": {"carrier": "DPD", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", "created_at": "2024-07-09T21:12:50Z", + "currency": "EUR", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": null, "est_delivery_days": null, "id": "rate_9fd0885297924bf2b26dbe7daf7feba1", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "DPDPARCELLETTER", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"error": "Carrier DPD and service DPDPARCELLETTERPLUS combination is not + supported by the Easypost Smartrate AI"}, "rate": {"carrier": "DPD", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", "created_at": "2024-07-09T21:12:50Z", + "currency": "EUR", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": null, "est_delivery_days": null, "id": "rate_2a79544c415c4d00a1af2a96a72df878", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "DPDPARCELLETTERPLUS", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 4, "percentile_75": 4, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": + 7}, "easypost_estimated_delivery_date": "2024-07-15", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "USPS", "carrier_account_id": "ca_4fcd9a658b494a979793bb899a40c5b5", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + null, "delivery_date_guaranteed": false, "delivery_days": 2, "est_delivery_days": + 2, "id": "rate_1d7bd3576e1344a3848510ff9a18a101", "list_currency": "USD", + "list_rate": 8.25, "mode": "production", "object": "Rate", "rate": 6.9, "retail_currency": + "USD", "retail_rate": 9.8, "service": "Priority", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 4, "percentile_75": 4, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": + 8}, "easypost_estimated_delivery_date": "2024-07-15", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "USPS", "carrier_account_id": "ca_4fcd9a658b494a979793bb899a40c5b5", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + null, "delivery_date_guaranteed": false, "delivery_days": 3, "est_delivery_days": + 3, "id": "rate_dccbd26d62cc4d0ca639684bab520e4d", "list_currency": "USD", + "list_rate": 6.4, "mode": "production", "object": "Rate", "rate": 5.93, "retail_currency": + "USD", "retail_rate": 8.45, "service": "GroundAdvantage", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 4, "percentile_75": 4, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": + 8}, "easypost_estimated_delivery_date": "2024-07-15", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "USPS", "carrier_account_id": "ca_4fcd9a658b494a979793bb899a40c5b5", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + null, "delivery_date_guaranteed": false, "delivery_days": 3, "est_delivery_days": + 3, "id": "rate_f82d3cf02557475bb24077c59da86306", "list_currency": "USD", + "list_rate": 6.4, "mode": "production", "object": "Rate", "rate": 5.93, "retail_currency": + "USD", "retail_rate": 8.45, "service": "First", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 4, "percentile_75": 4, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": + 8}, "easypost_estimated_delivery_date": "2024-07-15", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "USPS", "carrier_account_id": "ca_4fcd9a658b494a979793bb899a40c5b5", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + null, "delivery_date_guaranteed": false, "delivery_days": 3, "est_delivery_days": + 3, "id": "rate_3186cac8184f471bb480031dc1f3d91f", "list_currency": "USD", + "list_rate": 6.4, "mode": "production", "object": "Rate", "rate": 5.93, "retail_currency": + "USD", "retail_rate": 8.45, "service": "ParcelSelect", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 1, "percentile_75": 2, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 4, "percentile_97": 5, "percentile_99": + 6}, "easypost_estimated_delivery_date": "2024-07-12", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "USPS", "carrier_account_id": "ca_4fcd9a658b494a979793bb899a40c5b5", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + null, "delivery_date_guaranteed": false, "delivery_days": 2, "est_delivery_days": + 2, "id": "rate_e50d56d7c99b4dc891cdc7f734b51518", "list_currency": "USD", + "list_rate": 33.1, "mode": "production", "object": "Rate", "rate": 33.1, "retail_currency": + "USD", "retail_rate": 37.9, "service": "Express", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 4, "percentile_75": 4, "percentile_85": + 5, "percentile_90": 5, "percentile_95": 5, "percentile_97": 6, "percentile_99": + 7}, "easypost_estimated_delivery_date": "2024-07-15", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "DhlEcs", "carrier_account_id": "ca_77415c3fbd754d65bb9298e9a69d7084", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + "2024-07-15T00:00:00Z", "delivery_date_guaranteed": false, "delivery_days": + 5, "est_delivery_days": 5, "id": "rate_a9f2e062cda94213bc8376da3b799e5b", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 6.63, "retail_currency": null, "retail_rate": null, "service": + "DHLParcelExpedited", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 4, "percentile_75": 5, "percentile_85": + 5, "percentile_90": 5, "percentile_95": 6, "percentile_97": 6, "percentile_99": + 7}, "easypost_estimated_delivery_date": "2024-07-15", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "DhlEcs", "carrier_account_id": "ca_77415c3fbd754d65bb9298e9a69d7084", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + "2024-07-15T00:00:00Z", "delivery_date_guaranteed": false, "delivery_days": + 6, "est_delivery_days": 6, "id": "rate_56bbfa74195f4ab18ca2c8166907e0c2", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 6.5, "retail_currency": null, "retail_rate": null, "service": + "DHLParcelGround", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 1, "percentile_75": 1, "percentile_85": + 1, "percentile_90": 1, "percentile_95": 1, "percentile_97": 4, "percentile_99": + 4}, "easypost_estimated_delivery_date": "2024-07-12", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "FedEx", "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + "2024-07-10T08:30:00Z", "delivery_date_guaranteed": true, "delivery_days": + 1, "est_delivery_days": 1, "id": "rate_03eb6ee92bad42389f1764087abef25a", + "list_currency": "USD", "list_rate": 144.42, "mode": "production", "object": + "Rate", "rate": 144.42, "retail_currency": null, "retail_rate": null, "service": + "FIRST_OVERNIGHT", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 1, "percentile_75": 1, "percentile_85": + 1, "percentile_90": 1, "percentile_95": 4, "percentile_97": 4, "percentile_99": + 4}, "easypost_estimated_delivery_date": "2024-07-12", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "FedEx", "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + "2024-07-10T10:30:00Z", "delivery_date_guaranteed": true, "delivery_days": + 1, "est_delivery_days": 1, "id": "rate_9ef05b4ccc984e29941df09487cfdf4f", + "list_currency": "USD", "list_rate": 108.07, "mode": "production", "object": + "Rate", "rate": 108.07, "retail_currency": null, "retail_rate": null, "service": + "PRIORITY_OVERNIGHT", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 1, "percentile_75": 1, "percentile_85": + 1, "percentile_90": 1, "percentile_95": 4, "percentile_97": 4, "percentile_99": + 4}, "easypost_estimated_delivery_date": "2024-07-12", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "FedEx", "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + "2024-07-10T17:00:00Z", "delivery_date_guaranteed": true, "delivery_days": + 1, "est_delivery_days": 1, "id": "rate_c83e4f1b89cb49d8b8d332763b566436", + "list_currency": "USD", "list_rate": 98.79, "mode": "production", "object": + "Rate", "rate": 98.79, "retail_currency": null, "retail_rate": null, "service": + "STANDARD_OVERNIGHT", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 4, "percentile_75": 4, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 4, "percentile_97": 4, "percentile_99": + 5}, "easypost_estimated_delivery_date": "2024-07-15", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "FedEx", "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + "2024-07-11T10:30:00Z", "delivery_date_guaranteed": true, "delivery_days": + 2, "est_delivery_days": 2, "id": "rate_1325891633c24c4793c68d75ca95d357", + "list_currency": "USD", "list_rate": 39.63, "mode": "production", "object": + "Rate", "rate": 39.63, "retail_currency": null, "retail_rate": null, "service": + "FEDEX_2_DAY_AM", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "updated_at": + "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": + {"percentile_50": 4, "percentile_75": 4, "percentile_85": 4, "percentile_90": + 4, "percentile_95": 4, "percentile_97": 4, "percentile_99": 5}, "easypost_estimated_delivery_date": + "2024-07-15", "planned_ship_date": "2024-07-11"}, "rate": {"carrier": "FedEx", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc", "created_at": + "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": "2024-07-11T17:00:00Z", + "delivery_date_guaranteed": true, "delivery_days": 2, "est_delivery_days": + 2, "id": "rate_84783b3078f9409185933d6d875eddb5", "list_currency": "USD", + "list_rate": 33.39, "mode": "production", "object": "Rate", "rate": 33.39, + "retail_currency": null, "retail_rate": null, "service": "FEDEX_2_DAY", "shipment_id": + "shp_29740ab2a50d45f2be97c7bae93d6852", "updated_at": "2024-07-09T21:12:50Z"}}, + {"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": 4, + "percentile_75": 4, "percentile_85": 4, "percentile_90": 4, "percentile_95": + 5, "percentile_97": 5, "percentile_99": 5}, "easypost_estimated_delivery_date": + "2024-07-15", "planned_ship_date": "2024-07-11"}, "rate": {"carrier": "FedEx", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc", "created_at": + "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": "2024-07-11T23:59:00Z", + "delivery_date_guaranteed": true, "delivery_days": 2, "est_delivery_days": + 2, "id": "rate_b42d417795ab40a4ab236ab3c84a852d", "list_currency": "USD", + "list_rate": 16.67, "mode": "production", "object": "Rate", "rate": 14.47, + "retail_currency": null, "retail_rate": null, "service": "FEDEX_GROUND", "shipment_id": + "shp_29740ab2a50d45f2be97c7bae93d6852", "updated_at": "2024-07-09T21:12:50Z"}}, + {"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": 4, + "percentile_75": 4, "percentile_85": 4, "percentile_90": 4, "percentile_95": + 5, "percentile_97": 5, "percentile_99": 6}, "easypost_estimated_delivery_date": + "2024-07-15", "planned_ship_date": "2024-07-11"}, "rate": {"carrier": "FedEx", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc", "created_at": + "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": "2024-07-12T17:00:00Z", + "delivery_date_guaranteed": true, "delivery_days": 3, "est_delivery_days": + 3, "id": "rate_004a106ea5f843758726f60efe2e53d5", "list_currency": "USD", + "list_rate": 30.32, "mode": "production", "object": "Rate", "rate": 30.32, + "retail_currency": null, "retail_rate": null, "service": "FEDEX_EXPRESS_SAVER", + "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": 1, - "percentile_75": 2, "percentile_85": 5, "percentile_90": 5, "percentile_95": - 5, "percentile_97": 5, "percentile_99": 7}, "easypost_estimated_delivery_date": - "2023-12-29", "planned_ship_date": "2023-12-28"}, "rate": {"carrier": "USPS", - "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e", "created_at": - "2023-11-28T22:10:31Z", "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": - false, "delivery_days": null, "est_delivery_days": null, "id": "rate_c01a1fbe51e9462da3d91a5f5c96ac97", - "list_currency": "USD", "list_rate": 31.25, "mode": "test", "object": "Rate", - "rate": 31.25, "retail_currency": "USD", "retail_rate": 35.8, "service": "Express", - "shipment_id": "shp_d7e364778ec44a6da37e617e5285aaf7", "updated_at": "2023-11-28T22:10:31Z"}}, - {"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": 2, - "percentile_75": 5, "percentile_85": 5, "percentile_90": 5, "percentile_95": - 5, "percentile_97": 5, "percentile_99": 7}, "easypost_estimated_delivery_date": - "2023-12-30", "planned_ship_date": "2023-12-28"}, "rate": {"carrier": "USPS", - "carrier_account_id": "ca_b25657e9896e4d63ac8151ac346ac41e", "created_at": - "2023-11-28T22:10:31Z", "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": - false, "delivery_days": 2, "est_delivery_days": 2, "id": "rate_5021b4da9be645e49a72190327e4247e", - "list_currency": "USD", "list_rate": 8.24, "mode": "test", "object": "Rate", - "rate": 6.95, "retail_currency": "USD", "retail_rate": 10.2, "service": "Priority", - "shipment_id": "shp_d7e364778ec44a6da37e617e5285aaf7", "updated_at": "2023-11-28T22:10:31Z"}}]}' + "percentile_75": 1, "percentile_85": 1, "percentile_90": 1, "percentile_95": + 4, "percentile_97": 4, "percentile_99": 4}, "easypost_estimated_delivery_date": + "2024-07-12", "planned_ship_date": "2024-07-11"}, "rate": {"carrier": "UPS", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c", "created_at": + "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": "2024-07-10T10:30:00Z", + "delivery_date_guaranteed": true, "delivery_days": 1, "est_delivery_days": + 1, "id": "rate_22350a8640904c209d922092328f37d0", "list_currency": "USD", + "list_rate": 102.19, "mode": "production", "object": "Rate", "rate": 89.07, + "retail_currency": "USD", "retail_rate": 89.07, "service": "NextDayAir", "shipment_id": + "shp_29740ab2a50d45f2be97c7bae93d6852", "updated_at": "2024-07-09T21:12:50Z"}}, + {"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": 4, + "percentile_75": 4, "percentile_85": 4, "percentile_90": 4, "percentile_95": + 4, "percentile_97": 4, "percentile_99": 5}, "easypost_estimated_delivery_date": + "2024-07-15", "planned_ship_date": "2024-07-11"}, "rate": {"carrier": "UPS", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c", "created_at": + "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": "2024-07-11T23:00:00Z", + "delivery_date_guaranteed": false, "delivery_days": 2, "est_delivery_days": + 2, "id": "rate_c7a1a85bbc5e404ca1fd25cc016140b5", "list_currency": "USD", + "list_rate": 31.84, "mode": "production", "object": "Rate", "rate": 29.64, + "retail_currency": "USD", "retail_rate": 29.64, "service": "2ndDayAir", "shipment_id": + "shp_29740ab2a50d45f2be97c7bae93d6852", "updated_at": "2024-07-09T21:12:50Z"}}, + {"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": 4, + "percentile_75": 4, "percentile_85": 4, "percentile_90": 4, "percentile_95": + 5, "percentile_97": 5, "percentile_99": 5}, "easypost_estimated_delivery_date": + "2024-07-15", "planned_ship_date": "2024-07-11"}, "rate": {"carrier": "UPS", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c", "created_at": + "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": "2024-07-11T23:00:00Z", + "delivery_date_guaranteed": false, "delivery_days": 2, "est_delivery_days": + 2, "id": "rate_31bbe38959144adc9fa413edb95a3f89", "list_currency": "USD", + "list_rate": 15.85, "mode": "production", "object": "Rate", "rate": 14.88, + "retail_currency": "USD", "retail_rate": 14.88, "service": "Ground", "shipment_id": + "shp_29740ab2a50d45f2be97c7bae93d6852", "updated_at": "2024-07-09T21:12:50Z"}}, + {"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": 4, + "percentile_75": 4, "percentile_85": 4, "percentile_90": 4, "percentile_95": + 5, "percentile_97": 5, "percentile_99": 5}, "easypost_estimated_delivery_date": + "2024-07-15", "planned_ship_date": "2024-07-11"}, "rate": {"carrier": "UPS", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c", "created_at": + "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": "2024-07-12T23:00:00Z", + "delivery_date_guaranteed": false, "delivery_days": 3, "est_delivery_days": + 3, "id": "rate_665b60c99e6b497999c041ffc56ef77b", "list_currency": "USD", + "list_rate": 25.1, "mode": "production", "object": "Rate", "rate": 22.6, "retail_currency": + "USD", "retail_rate": 22.6, "service": "3DaySelect", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 1, "percentile_75": 1, "percentile_85": + 1, "percentile_90": 1, "percentile_95": 4, "percentile_97": 4, "percentile_99": + 4}, "easypost_estimated_delivery_date": "2024-07-12", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "UPS", "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + "2024-07-10T23:00:00Z", "delivery_date_guaranteed": true, "delivery_days": + 1, "est_delivery_days": 1, "id": "rate_7eb346c3de754d30969679dda6fb7baf", + "list_currency": "USD", "list_rate": 93.4, "mode": "production", "object": + "Rate", "rate": 83.84, "retail_currency": "USD", "retail_rate": 83.84, "service": + "NextDayAirSaver", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 1, "percentile_75": 1, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 4, "percentile_97": 4, "percentile_99": + 4}, "easypost_estimated_delivery_date": "2024-07-12", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "UPS", "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + "2024-07-10T08:00:00Z", "delivery_date_guaranteed": true, "delivery_days": + 1, "est_delivery_days": 1, "id": "rate_fca3e79823304153b68a3cbaec5b6a4f", + "list_currency": "USD", "list_rate": 137.22, "mode": "production", "object": + "Rate", "rate": 124.09, "retail_currency": "USD", "retail_rate": 124.09, "service": + "NextDayAirEarlyAM", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", + "updated_at": "2024-07-09T21:12:50Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 4, "percentile_75": 4, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 4, "percentile_97": 4, "percentile_99": + 5}, "easypost_estimated_delivery_date": "2024-07-15", "planned_ship_date": + "2024-07-11"}, "rate": {"carrier": "UPS", "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c", + "created_at": "2024-07-09T21:12:50Z", "currency": "USD", "delivery_date": + "2024-07-11T10:30:00Z", "delivery_date_guaranteed": true, "delivery_days": + 2, "est_delivery_days": 2, "id": "rate_35d8410979014ded951649449d6f856a", + "list_currency": "USD", "list_rate": 35.84, "mode": "production", "object": + "Rate", "rate": 33.57, "retail_currency": "USD", "retail_rate": 33.57, "service": + "2ndDayAirAM", "shipment_id": "shp_29740ab2a50d45f2be97c7bae93d6852", "updated_at": + "2024-07-09T21:12:50Z"}}]}' headers: cache-control: - private, no-cache, no-store content-length: - - '3893' + - '24376' content-type: - application/json; charset=utf-8 expires: @@ -245,20 +765,20 @@ interactions: x-download-options: - noopen x-ep-request-uuid: - - 88ad7b9265666557e78a9fab003fcb78 + - 1f7ff67a668da7d2e2b9901200294ecc x-frame-options: - SAMEORIGIN x-node: - - bigweb38nuq + - bigweb36nuq x-permitted-cross-domain-policies: - none x-proxied: - - intlb1nuq b3de2c47ef - - extlb1nuq 003ad9bca0 + - intlb3nuq fa152d4755 + - extlb2nuq fa152d4755 x-runtime: - - '0.139837' + - '0.246798' x-version-label: - - easypost-202311250013-a0f06fbc2c-master + - easypost-202407092027-324ee50b5a-master x-xss-protection: - 1; mode=block status: diff --git a/tests/cassettes/test_shipment_recommend_ship_date.yaml b/tests/cassettes/test_shipment_recommend_ship_date.yaml new file mode 100644 index 0000000..89dbae4 --- /dev/null +++ b/tests/cassettes/test_shipment_recommend_ship_date.yaml @@ -0,0 +1,801 @@ +interactions: +- request: + body: '{"shipment": {"from_address": {"name": "Jack Sparrow", "street1": "388 + Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": "CA", "zip": + "94107", "country": "US", "email": "test@example.com", "phone": "5555555555"}, + "to_address": {"name": "Elizabeth Swan", "street1": "179 N Harbor Dr", "city": + "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "email": "test@example.com", + "phone": "5555555555"}, "parcel": {"length": 10, "width": 8, "height": 4, "weight": + 15.4}}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '496' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/shipments + response: + body: + string: '{"created_at": "2024-07-09T21:30:03Z", "is_return": false, "messages": + [{"carrier": "DHLExpress", "carrier_account_id": "ca_2b428229ad214147a2ec13c4faf18934", + "type": "rate_error", "message": "Unable to retrieve DHLExpress rates for + US domestic shipments."}, {"carrier": "AustraliaPost", "carrier_account_id": + "ca_3b84ac568d7444759b77d1f2f2c05d7a", "type": "rate_error", "message": "Unable + to retrieve AustraliaPost rates for non-AU origin address."}, {"carrier": + "ParcelForce", "carrier_account_id": "ca_a32ed104ca784c25b25f19d7c28191c3", + "type": "rate_error", "message": "Unable to retrieve ParcelForce rates for + non-GB origin address."}, {"carrier": "Canpar", "carrier_account_id": "ca_32c1bc2cb75e45f19cff9fd047204f6e", + "type": "rate_error", "message": "Unable to retrieve Canpar rates for non-CA + origin shipments."}, {"carrier": "LoomisExpress", "carrier_account_id": "ca_63fb7c3dd56c410085454c5a79bc545f", + "type": "rate_error", "message": "Unable to retrieve LoomisExpress rates for + non-CA origin address."}, {"carrier": "RoyalMail", "carrier_account_id": "ca_f80ce1217c0b4f9b82d566b88dc1a6bd", + "type": "rate_error", "message": "Unable to retrieve RoyalMail rates for non-GB + origin address."}, {"type": "rate_error", "carrier": "LSO", "message": "credentials.username: + Required"}, {"type": "rate_error", "carrier": "LSO", "message": "credentials.password: + Required"}, {"carrier": "CouriersPlease", "carrier_account_id": "ca_6c70860c1edd46c69394beee4e02765f", + "type": "rate_error", "message": "credentials.username: field required and + credentials.password: field required"}, {"type": "rate_error", "carrier": + "OnTrac", "message": "credentials.account_number: Required"}, {"carrier": + "AmazonMws", "carrier_account_id": "ca_96d47560a4e748149f7ecc9bbbbe69b4", + "type": "rate_error", "message": "shipment.options.fulfiller_order_id: Required + and shipment.options.fulfiller_order_items: Required"}, {"carrier": "CourierExpress", + "carrier_account_id": "ca_f18d04c61d2546a68d7cd171960cb0b8", "type": "rate_error", + "message": "shipment.to_address: Courier Express only services the following + states: [''AL'', ''FL'', ''GA'', ''KY'', ''MS'', ''NC'', ''SC'', ''TN'', ''VA'']."}, + {"carrier": "DhlEcs", "carrier_account_id": "ca_0b612c9b7014401b9989db19953a24f9", + "type": "rate_error", "message": "credentials.pickup_id: value is not a valid + integer"}, {"type": "rate_error", "carrier": "Purolator", "message": "shipment.from_address.country: + All shipments must originate in Canada (CA)."}, {"type": "rate_error", "carrier": + "Purolator", "message": "shipment.return_address.country: All shipments must + originate in Canada (CA)."}, {"carrier": "CanadaPost", "carrier_account_id": + "ca_c4d49f6f47c94dfcba93f761f79ad2d8", "type": "rate_error", "message": "[''Unable + to get rates for shipments originating outside of Canada.'']"}, {"carrier": + "LaserShip", "carrier_account_id": "ca_6d2f96c3dfce4c75bd13ee030410ae4d", + "type": "rate_error", "message": "No rates found. The shipment may be outside + of the service area, or you may need to provide your sort codes and rates + to EasyPost."}, {"carrier": "Veho", "carrier_account_id": "ca_e683eaf9405643a8823ef18b4e5f3742", + "type": "rate_error", "message": "shipment.to_address.zip: Can only ship/pickup + within Denver, Dallas-Fort Worth, or Chicago."}, {"carrier": "ColumbusLastMile", + "carrier_account_id": "ca_a4524802c56348d1a274f879bbaf8f78", "type": "rate_error", + "message": "Not a valid destination postal code"}, {"carrier": "Estafeta", + "carrier_account_id": "ca_38a0fca99c294d4d9d789b3a4b660a4b", "type": "rate_error", + "message": "shipment.from_address.street1: street1 must have the format '' '', shipment.from_address.street2: street2 + must have the format ''[] Col. '', + shipment.from_address.country: Only domestic shipments are supported for Estafeta, + shipment.to_address.street1: street1 must have the format '' + '', shipment.to_address.street2: field required, + and shipment.to_address.country: Only domestic shipments are supported for + Estafeta"}, {"carrier": "UPS", "carrier_account_id": "ca_10677005f7e444c299088666025e3cdc", + "type": "rate_error", "message": "Invalid Credentials. Ups Account Number + is required"}, {"carrier": "Newgistics", "carrier_account_id": "ca_3a1b3046cb7943898bea6428237e1e33", + "type": "rate_error", "message": "No rates found. The shipment may be outside + of the service area, or you may need to provide your rates to support."}, + {"carrier": "AxlehireV3", "carrier_account_id": "ca_a381c1bace794c158d59a58b0a94a2e2", + "type": "rate_error", "message": "Forbidden. Please check credentials and + try again"}, {"type": "rate_error", "carrier": "GSO", "message": "the carrier + rejected the request as invalid"}, {"carrier": "FedExSmartPost", "carrier_account_id": + "ca_7d73446c9ded4b8fa67dee03f9f379b6", "type": "rate_error", "message": "FedEx + returned error: Authentication Failed"}, {"carrier": "UPS", "carrier_account_id": + "ca_db930d5251ee4d2d8560a477b3bb1796", "type": "rate_error", "message": "Invalid + Access License number"}, {"carrier": "DHLeCommerce", "carrier_account_id": + "ca_bc906eccfedc4e46952feacf2d69d3dc", "type": "rate_error", "message": "the + carrier rejected the request as invalid"}, {"carrier": "DPDUK", "carrier_account_id": + "ca_fd242ecb9ce74e6ea771f25b800055b1", "type": "rate_error", "message": "Unauthorized"}, + {"carrier": "OmniParcel", "carrier_account_id": "ca_2c5768cc85c5420cba30b3b1dd545fbb", + "type": "rate_error", "message": "No rates available."}, {"carrier": "LaserShipV2", + "carrier_account_id": "ca_6e70924a6c6248c2b73bc7c8949e8849", "type": "rate_error", + "message": "shipment.options.dropoff_max_datetime: field required"}], "mode": + "production", "options": {"currency": "USD", "payment": {"type": "SENDER"}, + "date_advance": 0}, "reference": null, "status": "unknown", "tracking_code": + null, "updated_at": "2024-07-09T21:30:06Z", "batch_id": null, "batch_status": + null, "batch_message": null, "customs_info": null, "from_address": {"id": + "adr_677cb6603e3a11efb55a3cecef1b359e", "object": "Address", "created_at": + "2024-07-09T21:30:03+00:00", "updated_at": "2024-07-09T21:30:03+00:00", "name": + "Jack Sparrow", "company": null, "street1": "388 Townsend St", "street2": + "Apt 20", "city": "San Francisco", "state": "CA", "zip": "94107", "country": + "US", "phone": "", "email": "", "mode": "production", + "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": + null, "verifications": {}}, "insurance": null, "order_id": null, "parcel": + {"id": "prcl_1a954596eb2745e3857aa8c4f7c09912", "object": "Parcel", "created_at": + "2024-07-09T21:30:03Z", "updated_at": "2024-07-09T21:30:03Z", "length": 10.0, + "width": 8.0, "height": 4.0, "predefined_package": null, "weight": 15.4, "mode": + "production"}, "postage_label": null, "rates": [{"id": "rate_447d70a0fa9048c59eff27d809da60e2", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "Priority", "carrier": "UPSMailInnovations", + "rate": "0.01", "currency": "USD", "retail_rate": null, "retail_currency": + null, "list_rate": null, "list_currency": null, "billing_type": "carrier", + "delivery_days": null, "delivery_date": null, "delivery_date_guaranteed": + null, "est_delivery_days": null, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_942b62c9d6ea45578a344b365d7aa062"}, {"id": "rate_5593dd9ec41a4d64880ecd88e50e9509", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "ExpeditedMailInnovations", "carrier": "UPSMailInnovations", + "rate": "0.01", "currency": "USD", "retail_rate": null, "retail_currency": + null, "list_rate": null, "list_currency": null, "billing_type": "carrier", + "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": null, + "est_delivery_days": 3, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_942b62c9d6ea45578a344b365d7aa062"}, {"id": "rate_c1839fd7d0664103973faa8532bdb698", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "DPD10:00", "carrier": "DPD", "rate": "0.01", + "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_a34b9ffcc7dd4b1e85703df78e9ca255", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "DPD12:00", "carrier": "DPD", "rate": "0.01", + "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_64675043324545a59a89892d77d8241a", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "DPD18:00", "carrier": "DPD", "rate": "0.01", + "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_64fbc539f0af448d971fafc53a16f716", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "DPD8:30", "carrier": "DPD", "rate": "0.01", + "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_f114519787f84718ae8b710b77ad8b4f", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "DPDCLASSIC", "carrier": "DPD", "rate": "0.01", + "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_6e8d9ea45af0451c96799732ba3f1c17", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "DPDEXPRESS", "carrier": "DPD", "rate": "0.01", + "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_18e6fef6ef1b40488b46cd1d48bad17a", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "DPDINTERNATIONALMAIL", "carrier": "DPD", + "rate": "0.01", "currency": "EUR", "retail_rate": null, "retail_currency": + null, "list_rate": null, "list_currency": null, "billing_type": "carrier", + "delivery_days": null, "delivery_date": null, "delivery_date_guaranteed": + null, "est_delivery_days": null, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_54606d57cefb46269808fbcfffec9a1c", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "DPDPARCELLETTER", "carrier": "DPD", "rate": + "0.01", "currency": "EUR", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": null, + "delivery_date": null, "delivery_date_guaranteed": null, "est_delivery_days": + null, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_242d840eec7a456abf1eabe77c33bb2c", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "DPDPARCELLETTERPLUS", "carrier": "DPD", + "rate": "0.01", "currency": "EUR", "retail_rate": null, "retail_currency": + null, "list_rate": null, "list_currency": null, "billing_type": "carrier", + "delivery_days": null, "delivery_date": null, "delivery_date_guaranteed": + null, "est_delivery_days": null, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_d8c3565dd56346d9a5e90bd56ba7c2fa"}, {"id": "rate_4fabca3f216744bcb4b1eff26c4d5214", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "Express", "carrier": "USPS", "rate": "33.10", + "currency": "USD", "retail_rate": "37.90", "retail_currency": "USD", "list_rate": + "33.10", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "carrier_account_id": + "ca_4fcd9a658b494a979793bb899a40c5b5"}, {"id": "rate_8cdd17df6ae64bcab1dc16a15201b867", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "Priority", "carrier": "USPS", "rate": "6.90", + "currency": "USD", "retail_rate": "9.80", "retail_currency": "USD", "list_rate": + "8.25", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 2, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "carrier_account_id": + "ca_4fcd9a658b494a979793bb899a40c5b5"}, {"id": "rate_003de25f33ee45d6bc5395246367d9ab", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "GroundAdvantage", "carrier": "USPS", "rate": + "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", + "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "carrier_account_id": + "ca_4fcd9a658b494a979793bb899a40c5b5"}, {"id": "rate_42cab00643ae46eaaee923f27ee4cd7b", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "First", "carrier": "USPS", "rate": "5.93", + "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", "list_rate": + "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "carrier_account_id": + "ca_4fcd9a658b494a979793bb899a40c5b5"}, {"id": "rate_c1034e8920a3451888b8390d760c90aa", + "object": "Rate", "created_at": "2024-07-09T21:30:05Z", "updated_at": "2024-07-09T21:30:05Z", + "mode": "production", "service": "ParcelSelect", "carrier": "USPS", "rate": + "5.93", "currency": "USD", "retail_rate": "8.45", "retail_currency": "USD", + "list_rate": "6.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": + 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": + 3, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "carrier_account_id": + "ca_4fcd9a658b494a979793bb899a40c5b5"}, {"id": "rate_01ef3f137c304013b1da88fec04a4f76", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "DHLParcelExpedited", "carrier": "DhlEcs", + "rate": "6.63", "currency": "USD", "retail_rate": null, "retail_currency": + null, "list_rate": null, "list_currency": null, "billing_type": "carrier", + "delivery_days": 5, "delivery_date": "2024-07-15T00:00:00Z", "delivery_date_guaranteed": + false, "est_delivery_days": 5, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_77415c3fbd754d65bb9298e9a69d7084"}, {"id": "rate_2f5ae0b0a9c34d5b8f0f7c334fac3c6f", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "DHLParcelGround", "carrier": "DhlEcs", "rate": + "6.50", "currency": "USD", "retail_rate": null, "retail_currency": null, "list_rate": + null, "list_currency": null, "billing_type": "carrier", "delivery_days": 6, + "delivery_date": "2024-07-15T00:00:00Z", "delivery_date_guaranteed": false, + "est_delivery_days": 6, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_77415c3fbd754d65bb9298e9a69d7084"}, {"id": "rate_a10edbb7a24f47d5af9cbb08052df925", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "FIRST_OVERNIGHT", "carrier": "FedEx", "rate": + "144.42", "currency": "USD", "retail_rate": null, "retail_currency": null, + "list_rate": "144.42", "list_currency": "USD", "billing_type": "carrier", + "delivery_days": 1, "delivery_date": "2024-07-10T08:30:00Z", "delivery_date_guaranteed": + true, "est_delivery_days": 1, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_c39cfb8b93d546d3bf81fe5b583f9200", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "PRIORITY_OVERNIGHT", "carrier": "FedEx", + "rate": "108.07", "currency": "USD", "retail_rate": null, "retail_currency": + null, "list_rate": "108.07", "list_currency": "USD", "billing_type": "carrier", + "delivery_days": 1, "delivery_date": "2024-07-10T10:30:00Z", "delivery_date_guaranteed": + true, "est_delivery_days": 1, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_4c5d00c1a863403a8d9e48f12d003443", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "STANDARD_OVERNIGHT", "carrier": "FedEx", + "rate": "98.79", "currency": "USD", "retail_rate": null, "retail_currency": + null, "list_rate": "98.79", "list_currency": "USD", "billing_type": "carrier", + "delivery_days": 1, "delivery_date": "2024-07-10T17:00:00Z", "delivery_date_guaranteed": + true, "est_delivery_days": 1, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_edd1b2308b724e678fe1642009ea8cab", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "FEDEX_2_DAY_AM", "carrier": "FedEx", "rate": + "39.63", "currency": "USD", "retail_rate": null, "retail_currency": null, + "list_rate": "39.63", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 2, "delivery_date": "2024-07-11T10:30:00Z", "delivery_date_guaranteed": true, + "est_delivery_days": 2, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_c4e36f128d544655a2b1bfe17e5fa978", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "FEDEX_2_DAY", "carrier": "FedEx", "rate": + "33.39", "currency": "USD", "retail_rate": null, "retail_currency": null, + "list_rate": "33.39", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 2, "delivery_date": "2024-07-11T17:00:00Z", "delivery_date_guaranteed": true, + "est_delivery_days": 2, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_efa1311c5340453da8e73a8858cf0ddf", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "FEDEX_GROUND", "carrier": "FedEx", "rate": + "14.47", "currency": "USD", "retail_rate": null, "retail_currency": null, + "list_rate": "16.67", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 2, "delivery_date": "2024-07-11T23:59:00Z", "delivery_date_guaranteed": true, + "est_delivery_days": 2, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_2b5cd536f6d241cbbfdfa90e33c70b07", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "FEDEX_EXPRESS_SAVER", "carrier": "FedEx", + "rate": "30.32", "currency": "USD", "retail_rate": null, "retail_currency": + null, "list_rate": "30.32", "list_currency": "USD", "billing_type": "carrier", + "delivery_days": 3, "delivery_date": "2024-07-12T17:00:00Z", "delivery_date_guaranteed": + true, "est_delivery_days": 3, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc"}, {"id": "rate_e2d441f20d5c48d0a3b316bc74830e55", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "NextDayAir", "carrier": "UPS", "rate": "89.07", + "currency": "USD", "retail_rate": "89.07", "retail_currency": "USD", "list_rate": + "102.19", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 1, "delivery_date": "2024-07-10T10:30:00Z", "delivery_date_guaranteed": true, + "est_delivery_days": 1, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}, {"id": "rate_9a838869057a4e7286285f0bb155d750", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "2ndDayAir", "carrier": "UPS", "rate": "29.64", + "currency": "USD", "retail_rate": "29.64", "retail_currency": "USD", "list_rate": + "31.84", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 2, "delivery_date": "2024-07-11T23:00:00Z", "delivery_date_guaranteed": false, + "est_delivery_days": 2, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}, {"id": "rate_eb3aa5a8eced4f62b8133845b7569f6a", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "Ground", "carrier": "UPS", "rate": "14.88", + "currency": "USD", "retail_rate": "14.88", "retail_currency": "USD", "list_rate": + "15.85", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 2, "delivery_date": "2024-07-11T23:00:00Z", "delivery_date_guaranteed": false, + "est_delivery_days": 2, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}, {"id": "rate_9bb3b0b10b9341fdaa602c2c655dffe4", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "3DaySelect", "carrier": "UPS", "rate": "22.60", + "currency": "USD", "retail_rate": "22.60", "retail_currency": "USD", "list_rate": + "25.10", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 3, "delivery_date": "2024-07-12T23:00:00Z", "delivery_date_guaranteed": false, + "est_delivery_days": 3, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}, {"id": "rate_3b702b8de82f439390d3d7dcb9a63711", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "NextDayAirSaver", "carrier": "UPS", "rate": + "83.84", "currency": "USD", "retail_rate": "83.84", "retail_currency": "USD", + "list_rate": "93.40", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 1, "delivery_date": "2024-07-10T23:00:00Z", "delivery_date_guaranteed": true, + "est_delivery_days": 1, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}, {"id": "rate_89b5bae791f44428bd969d46a35a018c", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "NextDayAirEarlyAM", "carrier": "UPS", "rate": + "124.09", "currency": "USD", "retail_rate": "124.09", "retail_currency": "USD", + "list_rate": "137.22", "list_currency": "USD", "billing_type": "carrier", + "delivery_days": 1, "delivery_date": "2024-07-10T08:00:00Z", "delivery_date_guaranteed": + true, "est_delivery_days": 1, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}, {"id": "rate_570d7a3c77b644e6a4a839434c80b34b", + "object": "Rate", "created_at": "2024-07-09T21:30:06Z", "updated_at": "2024-07-09T21:30:06Z", + "mode": "production", "service": "2ndDayAirAM", "carrier": "UPS", "rate": + "33.57", "currency": "USD", "retail_rate": "33.57", "retail_currency": "USD", + "list_rate": "35.84", "list_currency": "USD", "billing_type": "carrier", "delivery_days": + 2, "delivery_date": "2024-07-11T10:30:00Z", "delivery_date_guaranteed": true, + "est_delivery_days": 2, "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c"}], "refund_status": + null, "scan_form": null, "selected_rate": null, "tracker": null, "to_address": + {"id": "adr_6779b0e73e3a11efb5593cecef1b359e", "object": "Address", "created_at": + "2024-07-09T21:30:03+00:00", "updated_at": "2024-07-09T21:30:03+00:00", "name": + "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": + null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", + "phone": "", "email": "", "mode": "production", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "usps_zone": 4, "return_address": {"id": "adr_677cb6603e3a11efb55a3cecef1b359e", + "object": "Address", "created_at": "2024-07-09T21:30:03+00:00", "updated_at": + "2024-07-09T21:30:03+00:00", "name": "Jack Sparrow", "company": null, "street1": + "388 Townsend St", "street2": "Apt 20", "city": "San Francisco", "state": + "CA", "zip": "94107", "country": "US", "phone": "", "email": "", + "mode": "production", "carrier_facility": null, "residential": null, "federal_tax_id": + null, "state_tax_id": null, "verifications": {}}, "buyer_address": {"id": + "adr_6779b0e73e3a11efb5593cecef1b359e", "object": "Address", "created_at": + "2024-07-09T21:30:03+00:00", "updated_at": "2024-07-09T21:30:03+00:00", "name": + "Elizabeth Swan", "company": null, "street1": "179 N Harbor Dr", "street2": + null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", + "phone": "", "email": "", "mode": "production", "carrier_facility": + null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": + {}}, "forms": [], "fees": [], "id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "object": "Shipment"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '25921' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + location: + - /api/v2/shipments/shp_4e96ab8dccd245f1a204f699a1af02bc + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 6754031e668dabdbe2ba0375002b913b + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb42nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq fa152d4755 + - extlb1nuq fa152d4755 + x-runtime: + - '2.646610' + x-version-label: + - easypost-202407092027-324ee50b5a-master + x-xss-protection: + - 1; mode=block + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + authorization: + - + user-agent: + - + method: GET + uri: https://api.easypost.com/v2/shipments/shp_4e96ab8dccd245f1a204f699a1af02bc/smartrate/precision_shipping?desired_delivery_date=2024-07-16 + response: + body: + string: '{"rates": [{"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": + 3, "percentile_75": 4, "percentile_85": 4, "percentile_90": 5, "percentile_95": + 5, "percentile_97": 6, "percentile_99": 7}, "delivery_date_confidence": 0.57, + "desired_delivery_date": "2024-07-16", "estimated_transit_days": 3, "ship_on_date": + "2024-07-13"}, "rate": {"carrier": "UPSMailInnovations", "carrier_account_id": + "ca_942b62c9d6ea45578a344b365d7aa062", "created_at": "2024-07-09T21:30:05Z", + "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": null, "est_delivery_days": null, "id": "rate_447d70a0fa9048c59eff27d809da60e2", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "Priority", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": + {"percentile_50": 4, "percentile_75": 4, "percentile_85": 5, "percentile_90": + 5, "percentile_95": 6, "percentile_97": 6, "percentile_99": 7}, "delivery_date_confidence": + 0.31, "desired_delivery_date": "2024-07-16", "estimated_transit_days": 3, + "ship_on_date": "2024-07-13"}, "rate": {"carrier": "UPSMailInnovations", "carrier_account_id": + "ca_942b62c9d6ea45578a344b365d7aa062", "created_at": "2024-07-09T21:30:05Z", + "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": 3, "est_delivery_days": 3, "id": "rate_5593dd9ec41a4d64880ecd88e50e9509", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "ExpeditedMailInnovations", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "updated_at": "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": + {"error": "Carrier DPD and service DPD10:00 combination is not supported by + the Easypost Smartrate AI"}, "rate": {"carrier": "DPD", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", "created_at": "2024-07-09T21:30:05Z", + "currency": "EUR", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": null, "est_delivery_days": null, "id": "rate_c1839fd7d0664103973faa8532bdb698", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "DPD10:00", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": {"error": "Carrier + DPD and service DPD12:00 combination is not supported by the Easypost Smartrate + AI"}, "rate": {"carrier": "DPD", "carrier_account_id": "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", + "created_at": "2024-07-09T21:30:05Z", "currency": "EUR", "delivery_date": + null, "delivery_date_guaranteed": false, "delivery_days": null, "est_delivery_days": + null, "id": "rate_a34b9ffcc7dd4b1e85703df78e9ca255", "list_currency": null, + "list_rate": null, "mode": "production", "object": "Rate", "rate": 0.01, "retail_currency": + null, "retail_rate": null, "service": "DPD12:00", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "updated_at": "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": + {"error": "Carrier DPD and service DPD18:00 combination is not supported by + the Easypost Smartrate AI"}, "rate": {"carrier": "DPD", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", "created_at": "2024-07-09T21:30:05Z", + "currency": "EUR", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": null, "est_delivery_days": null, "id": "rate_64675043324545a59a89892d77d8241a", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "DPD18:00", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": {"error": "Carrier + DPD and service DPD8:30 combination is not supported by the Easypost Smartrate + AI"}, "rate": {"carrier": "DPD", "carrier_account_id": "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", + "created_at": "2024-07-09T21:30:05Z", "currency": "EUR", "delivery_date": + null, "delivery_date_guaranteed": false, "delivery_days": null, "est_delivery_days": + null, "id": "rate_64fbc539f0af448d971fafc53a16f716", "list_currency": null, + "list_rate": null, "mode": "production", "object": "Rate", "rate": 0.01, "retail_currency": + null, "retail_rate": null, "service": "DPD8:30", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "updated_at": "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": + {"error": "Carrier DPD and service DPDCLASSIC combination is not supported + by the Easypost Smartrate AI"}, "rate": {"carrier": "DPD", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", "created_at": "2024-07-09T21:30:05Z", + "currency": "EUR", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": null, "est_delivery_days": null, "id": "rate_f114519787f84718ae8b710b77ad8b4f", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "DPDCLASSIC", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": {"error": "Carrier + DPD and service DPDEXPRESS combination is not supported by the Easypost Smartrate + AI"}, "rate": {"carrier": "DPD", "carrier_account_id": "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", + "created_at": "2024-07-09T21:30:05Z", "currency": "EUR", "delivery_date": + null, "delivery_date_guaranteed": false, "delivery_days": null, "est_delivery_days": + null, "id": "rate_6e8d9ea45af0451c96799732ba3f1c17", "list_currency": null, + "list_rate": null, "mode": "production", "object": "Rate", "rate": 0.01, "retail_currency": + null, "retail_rate": null, "service": "DPDEXPRESS", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "updated_at": "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": + {"error": "Carrier DPD and service DPDINTERNATIONALMAIL combination is not + supported by the Easypost Smartrate AI"}, "rate": {"carrier": "DPD", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", "created_at": "2024-07-09T21:30:05Z", + "currency": "EUR", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": null, "est_delivery_days": null, "id": "rate_18e6fef6ef1b40488b46cd1d48bad17a", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "DPDINTERNATIONALMAIL", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "updated_at": "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": + {"error": "Carrier DPD and service DPDPARCELLETTER combination is not supported + by the Easypost Smartrate AI"}, "rate": {"carrier": "DPD", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", "created_at": "2024-07-09T21:30:05Z", + "currency": "EUR", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": null, "est_delivery_days": null, "id": "rate_54606d57cefb46269808fbcfffec9a1c", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "DPDPARCELLETTER", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "updated_at": "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": + {"error": "Carrier DPD and service DPDPARCELLETTERPLUS combination is not + supported by the Easypost Smartrate AI"}, "rate": {"carrier": "DPD", "carrier_account_id": + "ca_d8c3565dd56346d9a5e90bd56ba7c2fa", "created_at": "2024-07-09T21:30:05Z", + "currency": "EUR", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": null, "est_delivery_days": null, "id": "rate_242d840eec7a456abf1eabe77c33bb2c", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 0.01, "retail_currency": null, "retail_rate": null, "service": + "DPDPARCELLETTERPLUS", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "updated_at": "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 2, "percentile_75": 2, "percentile_85": + 2, "percentile_90": 3, "percentile_95": 3, "percentile_97": 4, "percentile_99": + 7}, "delivery_date_confidence": 0.47, "desired_delivery_date": "2024-07-16", + "estimated_transit_days": 1, "ship_on_date": "2024-07-15"}, "rate": {"carrier": + "USPS", "carrier_account_id": "ca_4fcd9a658b494a979793bb899a40c5b5", "created_at": + "2024-07-09T21:30:05Z", "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": + false, "delivery_days": 2, "est_delivery_days": 2, "id": "rate_4fabca3f216744bcb4b1eff26c4d5214", + "list_currency": "USD", "list_rate": 33.1, "mode": "production", "object": + "Rate", "rate": 33.1, "retail_currency": "USD", "retail_rate": 37.9, "service": + "Express", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": + {"percentile_50": 2, "percentile_75": 3, "percentile_85": 4, "percentile_90": + 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": 7}, "delivery_date_confidence": + 0.19, "desired_delivery_date": "2024-07-16", "estimated_transit_days": 3, + "ship_on_date": "2024-07-13"}, "rate": {"carrier": "USPS", "carrier_account_id": + "ca_4fcd9a658b494a979793bb899a40c5b5", "created_at": "2024-07-09T21:30:05Z", + "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": 2, "est_delivery_days": 2, "id": "rate_8cdd17df6ae64bcab1dc16a15201b867", + "list_currency": "USD", "list_rate": 8.25, "mode": "production", "object": + "Rate", "rate": 6.9, "retail_currency": "USD", "retail_rate": 9.8, "service": + "Priority", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": + {"percentile_50": 2, "percentile_75": 3, "percentile_85": 4, "percentile_90": + 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": 9}, "delivery_date_confidence": + 0.21, "desired_delivery_date": "2024-07-16", "estimated_transit_days": 3, + "ship_on_date": "2024-07-13"}, "rate": {"carrier": "USPS", "carrier_account_id": + "ca_4fcd9a658b494a979793bb899a40c5b5", "created_at": "2024-07-09T21:30:05Z", + "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": 3, "est_delivery_days": 3, "id": "rate_003de25f33ee45d6bc5395246367d9ab", + "list_currency": "USD", "list_rate": 6.4, "mode": "production", "object": + "Rate", "rate": 5.93, "retail_currency": "USD", "retail_rate": 8.45, "service": + "GroundAdvantage", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "updated_at": "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 2, "percentile_75": 3, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": + 9}, "delivery_date_confidence": 0.21, "desired_delivery_date": "2024-07-16", + "estimated_transit_days": 3, "ship_on_date": "2024-07-13"}, "rate": {"carrier": + "USPS", "carrier_account_id": "ca_4fcd9a658b494a979793bb899a40c5b5", "created_at": + "2024-07-09T21:30:05Z", "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": + false, "delivery_days": 3, "est_delivery_days": 3, "id": "rate_42cab00643ae46eaaee923f27ee4cd7b", + "list_currency": "USD", "list_rate": 6.4, "mode": "production", "object": + "Rate", "rate": 5.93, "retail_currency": "USD", "retail_rate": 8.45, "service": + "First", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": + {"percentile_50": 2, "percentile_75": 3, "percentile_85": 4, "percentile_90": + 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": 9}, "delivery_date_confidence": + 0.21, "desired_delivery_date": "2024-07-16", "estimated_transit_days": 3, + "ship_on_date": "2024-07-13"}, "rate": {"carrier": "USPS", "carrier_account_id": + "ca_4fcd9a658b494a979793bb899a40c5b5", "created_at": "2024-07-09T21:30:05Z", + "currency": "USD", "delivery_date": null, "delivery_date_guaranteed": false, + "delivery_days": 3, "est_delivery_days": 3, "id": "rate_c1034e8920a3451888b8390d760c90aa", + "list_currency": "USD", "list_rate": 6.4, "mode": "production", "object": + "Rate", "rate": 5.93, "retail_currency": "USD", "retail_rate": 8.45, "service": + "ParcelSelect", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:05Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": + {"percentile_50": 4, "percentile_75": 4, "percentile_85": 4, "percentile_90": + 4, "percentile_95": 5, "percentile_97": 6, "percentile_99": 6}, "delivery_date_confidence": + 0.82, "desired_delivery_date": "2024-07-16", "estimated_transit_days": 4, + "ship_on_date": "2024-07-12"}, "rate": {"carrier": "DhlEcs", "carrier_account_id": + "ca_77415c3fbd754d65bb9298e9a69d7084", "created_at": "2024-07-09T21:30:06Z", + "currency": "USD", "delivery_date": "2024-07-15T00:00:00Z", "delivery_date_guaranteed": + false, "delivery_days": 5, "est_delivery_days": 5, "id": "rate_01ef3f137c304013b1da88fec04a4f76", + "list_currency": null, "list_rate": null, "mode": "production", "object": + "Rate", "rate": 6.63, "retail_currency": null, "retail_rate": null, "service": + "DHLParcelExpedited", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "updated_at": "2024-07-09T21:30:06Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 4, "percentile_75": 4, "percentile_85": + 4, "percentile_90": 5, "percentile_95": 6, "percentile_97": 6, "percentile_99": + 7}, "delivery_date_confidence": 0.76, "desired_delivery_date": "2024-07-16", + "estimated_transit_days": 4, "ship_on_date": "2024-07-12"}, "rate": {"carrier": + "DhlEcs", "carrier_account_id": "ca_77415c3fbd754d65bb9298e9a69d7084", "created_at": + "2024-07-09T21:30:06Z", "currency": "USD", "delivery_date": "2024-07-15T00:00:00Z", + "delivery_date_guaranteed": false, "delivery_days": 6, "est_delivery_days": + 6, "id": "rate_2f5ae0b0a9c34d5b8f0f7c334fac3c6f", "list_currency": null, "list_rate": + null, "mode": "production", "object": "Rate", "rate": 6.5, "retail_currency": + null, "retail_rate": null, "service": "DHLParcelGround", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "updated_at": "2024-07-09T21:30:06Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 1, "percentile_75": 1, "percentile_85": + 1, "percentile_90": 1, "percentile_95": 2, "percentile_97": 2, "percentile_99": + 2}, "delivery_date_confidence": 0.94, "desired_delivery_date": "2024-07-16", + "estimated_transit_days": 1, "ship_on_date": "2024-07-15"}, "rate": {"carrier": + "FedEx", "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc", "created_at": + "2024-07-09T21:30:06Z", "currency": "USD", "delivery_date": "2024-07-10T08:30:00Z", + "delivery_date_guaranteed": true, "delivery_days": 1, "est_delivery_days": + 1, "id": "rate_a10edbb7a24f47d5af9cbb08052df925", "list_currency": "USD", + "list_rate": 144.42, "mode": "production", "object": "Rate", "rate": 144.42, + "retail_currency": null, "retail_rate": null, "service": "FIRST_OVERNIGHT", + "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": "2024-07-09T21:30:06Z"}}, + {"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": 1, + "percentile_75": 1, "percentile_85": 1, "percentile_90": 1, "percentile_95": + 2, "percentile_97": 2, "percentile_99": 2}, "delivery_date_confidence": 0.94, + "desired_delivery_date": "2024-07-16", "estimated_transit_days": 1, "ship_on_date": + "2024-07-15"}, "rate": {"carrier": "FedEx", "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc", + "created_at": "2024-07-09T21:30:06Z", "currency": "USD", "delivery_date": + "2024-07-10T10:30:00Z", "delivery_date_guaranteed": true, "delivery_days": + 1, "est_delivery_days": 1, "id": "rate_c39cfb8b93d546d3bf81fe5b583f9200", + "list_currency": "USD", "list_rate": 108.07, "mode": "production", "object": + "Rate", "rate": 108.07, "retail_currency": null, "retail_rate": null, "service": + "PRIORITY_OVERNIGHT", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "updated_at": "2024-07-09T21:30:06Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 1, "percentile_75": 1, "percentile_85": + 1, "percentile_90": 1, "percentile_95": 2, "percentile_97": 2, "percentile_99": + 2}, "delivery_date_confidence": 0.93, "desired_delivery_date": "2024-07-16", + "estimated_transit_days": 1, "ship_on_date": "2024-07-15"}, "rate": {"carrier": + "FedEx", "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc", "created_at": + "2024-07-09T21:30:06Z", "currency": "USD", "delivery_date": "2024-07-10T17:00:00Z", + "delivery_date_guaranteed": true, "delivery_days": 1, "est_delivery_days": + 1, "id": "rate_4c5d00c1a863403a8d9e48f12d003443", "list_currency": "USD", + "list_rate": 98.79, "mode": "production", "object": "Rate", "rate": 98.79, + "retail_currency": null, "retail_rate": null, "service": "STANDARD_OVERNIGHT", + "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": "2024-07-09T21:30:06Z"}}, + {"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": 4, + "percentile_75": 4, "percentile_85": 4, "percentile_90": 4, "percentile_95": + 5, "percentile_97": 5, "percentile_99": 5}, "delivery_date_confidence": 0.83, + "desired_delivery_date": "2024-07-16", "estimated_transit_days": 4, "ship_on_date": + "2024-07-12"}, "rate": {"carrier": "FedEx", "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc", + "created_at": "2024-07-09T21:30:06Z", "currency": "USD", "delivery_date": + "2024-07-11T10:30:00Z", "delivery_date_guaranteed": true, "delivery_days": + 2, "est_delivery_days": 2, "id": "rate_edd1b2308b724e678fe1642009ea8cab", + "list_currency": "USD", "list_rate": 39.63, "mode": "production", "object": + "Rate", "rate": 39.63, "retail_currency": null, "retail_rate": null, "service": + "FEDEX_2_DAY_AM", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:06Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": + {"percentile_50": 3, "percentile_75": 3, "percentile_85": 3, "percentile_90": + 3, "percentile_95": 4, "percentile_97": 4, "percentile_99": 4}, "delivery_date_confidence": + 0.64, "desired_delivery_date": "2024-07-16", "estimated_transit_days": 3, + "ship_on_date": "2024-07-13"}, "rate": {"carrier": "FedEx", "carrier_account_id": + "ca_3bd616120603457fbed9deb1e425bbdc", "created_at": "2024-07-09T21:30:06Z", + "currency": "USD", "delivery_date": "2024-07-11T17:00:00Z", "delivery_date_guaranteed": + true, "delivery_days": 2, "est_delivery_days": 2, "id": "rate_c4e36f128d544655a2b1bfe17e5fa978", + "list_currency": "USD", "list_rate": 33.39, "mode": "production", "object": + "Rate", "rate": 33.39, "retail_currency": null, "retail_rate": null, "service": + "FEDEX_2_DAY", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:06Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": + {"percentile_50": 4, "percentile_75": 4, "percentile_85": 5, "percentile_90": + 5, "percentile_95": 5, "percentile_97": 5, "percentile_99": 6}, "delivery_date_confidence": + 0.5, "desired_delivery_date": "2024-07-16", "estimated_transit_days": 4, "ship_on_date": + "2024-07-12"}, "rate": {"carrier": "FedEx", "carrier_account_id": "ca_3bd616120603457fbed9deb1e425bbdc", + "created_at": "2024-07-09T21:30:06Z", "currency": "USD", "delivery_date": + "2024-07-11T23:59:00Z", "delivery_date_guaranteed": true, "delivery_days": + 2, "est_delivery_days": 2, "id": "rate_efa1311c5340453da8e73a8858cf0ddf", + "list_currency": "USD", "list_rate": 16.67, "mode": "production", "object": + "Rate", "rate": 14.47, "retail_currency": null, "retail_rate": null, "service": + "FEDEX_GROUND", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:06Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": + {"percentile_50": 3, "percentile_75": 4, "percentile_85": 4, "percentile_90": + 4, "percentile_95": 4, "percentile_97": 5, "percentile_99": 5}, "delivery_date_confidence": + 0.62, "desired_delivery_date": "2024-07-16", "estimated_transit_days": 3, + "ship_on_date": "2024-07-13"}, "rate": {"carrier": "FedEx", "carrier_account_id": + "ca_3bd616120603457fbed9deb1e425bbdc", "created_at": "2024-07-09T21:30:06Z", + "currency": "USD", "delivery_date": "2024-07-12T17:00:00Z", "delivery_date_guaranteed": + true, "delivery_days": 3, "est_delivery_days": 3, "id": "rate_2b5cd536f6d241cbbfdfa90e33c70b07", + "list_currency": "USD", "list_rate": 30.32, "mode": "production", "object": + "Rate", "rate": 30.32, "retail_currency": null, "retail_rate": null, "service": + "FEDEX_EXPRESS_SAVER", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "updated_at": "2024-07-09T21:30:06Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 1, "percentile_75": 1, "percentile_85": + 1, "percentile_90": 1, "percentile_95": 2, "percentile_97": 2, "percentile_99": + 2}, "delivery_date_confidence": 0.93, "desired_delivery_date": "2024-07-16", + "estimated_transit_days": 1, "ship_on_date": "2024-07-15"}, "rate": {"carrier": + "UPS", "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c", "created_at": + "2024-07-09T21:30:06Z", "currency": "USD", "delivery_date": "2024-07-10T10:30:00Z", + "delivery_date_guaranteed": true, "delivery_days": 1, "est_delivery_days": + 1, "id": "rate_e2d441f20d5c48d0a3b316bc74830e55", "list_currency": "USD", + "list_rate": 102.19, "mode": "production", "object": "Rate", "rate": 89.07, + "retail_currency": "USD", "retail_rate": 89.07, "service": "NextDayAir", "shipment_id": + "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": "2024-07-09T21:30:06Z"}}, + {"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": 4, + "percentile_75": 4, "percentile_85": 4, "percentile_90": 4, "percentile_95": + 4, "percentile_97": 5, "percentile_99": 5}, "delivery_date_confidence": 0.94, + "desired_delivery_date": "2024-07-16", "estimated_transit_days": 4, "ship_on_date": + "2024-07-12"}, "rate": {"carrier": "UPS", "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c", + "created_at": "2024-07-09T21:30:06Z", "currency": "USD", "delivery_date": + "2024-07-11T23:00:00Z", "delivery_date_guaranteed": false, "delivery_days": + 2, "est_delivery_days": 2, "id": "rate_9a838869057a4e7286285f0bb155d750", + "list_currency": "USD", "list_rate": 31.84, "mode": "production", "object": + "Rate", "rate": 29.64, "retail_currency": "USD", "retail_rate": 29.64, "service": + "2ndDayAir", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:06Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": + {"percentile_50": 4, "percentile_75": 4, "percentile_85": 4, "percentile_90": + 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": 5}, "delivery_date_confidence": + 0.91, "desired_delivery_date": "2024-07-16", "estimated_transit_days": 4, + "ship_on_date": "2024-07-12"}, "rate": {"carrier": "UPS", "carrier_account_id": + "ca_754d3e2bce354edfb2e4a3fcc21bb02c", "created_at": "2024-07-09T21:30:06Z", + "currency": "USD", "delivery_date": "2024-07-11T23:00:00Z", "delivery_date_guaranteed": + false, "delivery_days": 2, "est_delivery_days": 2, "id": "rate_eb3aa5a8eced4f62b8133845b7569f6a", + "list_currency": "USD", "list_rate": 15.85, "mode": "production", "object": + "Rate", "rate": 14.88, "retail_currency": "USD", "retail_rate": 14.88, "service": + "Ground", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:06Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": + {"percentile_50": 4, "percentile_75": 5, "percentile_85": 5, "percentile_90": + 5, "percentile_95": 5, "percentile_97": 5, "percentile_99": 5}, "delivery_date_confidence": + 0.66, "desired_delivery_date": "2024-07-16", "estimated_transit_days": 4, + "ship_on_date": "2024-07-12"}, "rate": {"carrier": "UPS", "carrier_account_id": + "ca_754d3e2bce354edfb2e4a3fcc21bb02c", "created_at": "2024-07-09T21:30:06Z", + "currency": "USD", "delivery_date": "2024-07-12T23:00:00Z", "delivery_date_guaranteed": + false, "delivery_days": 3, "est_delivery_days": 3, "id": "rate_9bb3b0b10b9341fdaa602c2c655dffe4", + "list_currency": "USD", "list_rate": 25.1, "mode": "production", "object": + "Rate", "rate": 22.6, "retail_currency": "USD", "retail_rate": 22.6, "service": + "3DaySelect", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:06Z"}}, {"easypost_time_in_transit_data": {"days_in_transit": + {"percentile_50": 1, "percentile_75": 1, "percentile_85": 1, "percentile_90": + 1, "percentile_95": 2, "percentile_97": 2, "percentile_99": 2}, "delivery_date_confidence": + 0.93, "desired_delivery_date": "2024-07-16", "estimated_transit_days": 1, + "ship_on_date": "2024-07-15"}, "rate": {"carrier": "UPS", "carrier_account_id": + "ca_754d3e2bce354edfb2e4a3fcc21bb02c", "created_at": "2024-07-09T21:30:06Z", + "currency": "USD", "delivery_date": "2024-07-10T23:00:00Z", "delivery_date_guaranteed": + true, "delivery_days": 1, "est_delivery_days": 1, "id": "rate_3b702b8de82f439390d3d7dcb9a63711", + "list_currency": "USD", "list_rate": 93.4, "mode": "production", "object": + "Rate", "rate": 83.84, "retail_currency": "USD", "retail_rate": 83.84, "service": + "NextDayAirSaver", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", + "updated_at": "2024-07-09T21:30:06Z"}}, {"easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 1, "percentile_75": 1, "percentile_85": + 2, "percentile_90": 2, "percentile_95": 2, "percentile_97": 2, "percentile_99": + 2}, "delivery_date_confidence": 0.84, "desired_delivery_date": "2024-07-16", + "estimated_transit_days": 1, "ship_on_date": "2024-07-15"}, "rate": {"carrier": + "UPS", "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c", "created_at": + "2024-07-09T21:30:06Z", "currency": "USD", "delivery_date": "2024-07-10T08:00:00Z", + "delivery_date_guaranteed": true, "delivery_days": 1, "est_delivery_days": + 1, "id": "rate_89b5bae791f44428bd969d46a35a018c", "list_currency": "USD", + "list_rate": 137.22, "mode": "production", "object": "Rate", "rate": 124.09, + "retail_currency": "USD", "retail_rate": 124.09, "service": "NextDayAirEarlyAM", + "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": "2024-07-09T21:30:06Z"}}, + {"easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": 4, + "percentile_75": 4, "percentile_85": 4, "percentile_90": 4, "percentile_95": + 4, "percentile_97": 5, "percentile_99": 5}, "delivery_date_confidence": 0.92, + "desired_delivery_date": "2024-07-16", "estimated_transit_days": 4, "ship_on_date": + "2024-07-12"}, "rate": {"carrier": "UPS", "carrier_account_id": "ca_754d3e2bce354edfb2e4a3fcc21bb02c", + "created_at": "2024-07-09T21:30:06Z", "currency": "USD", "delivery_date": + "2024-07-11T10:30:00Z", "delivery_date_guaranteed": true, "delivery_days": + 2, "est_delivery_days": 2, "id": "rate_570d7a3c77b644e6a4a839434c80b34b", + "list_currency": "USD", "list_rate": 35.84, "mode": "production", "object": + "Rate", "rate": 33.57, "retail_currency": "USD", "retail_rate": 33.57, "service": + "2ndDayAirAM", "shipment_id": "shp_4e96ab8dccd245f1a204f699a1af02bc", "updated_at": + "2024-07-09T21:30:06Z"}}]}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '25364' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 6754031e668dabdee2ba0375002b94ae + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb34nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq fa152d4755 + - extlb1nuq fa152d4755 + x-runtime: + - '0.260569' + x-version-label: + - easypost-202407092027-324ee50b5a-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/test_smartrate_estimate_delivery_date.yaml b/tests/cassettes/test_smartrate_estimate_delivery_date.yaml new file mode 100644 index 0000000..879710c --- /dev/null +++ b/tests/cassettes/test_smartrate_estimate_delivery_date.yaml @@ -0,0 +1,87 @@ +interactions: +- request: + body: '{"from_zip": "94107", "to_zip": "90277", "planned_ship_date": "2024-07-11", + "carriers": ["USPS"]}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/smartrate/deliver_by + response: + body: + string: '{"carriers_without_tint_estimates": null, "from_zip": "94107", "planned_ship_date": + "2024-07-11", "results": [{"carrier": "USPS", "easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 1, "percentile_75": 2, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 4, "percentile_97": 5, "percentile_99": + 6}, "easypost_estimated_delivery_date": "2024-07-12"}, "service": "express"}, + {"carrier": "USPS", "easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": + 4, "percentile_75": 4, "percentile_85": 4, "percentile_90": 4, "percentile_95": + 5, "percentile_97": 5, "percentile_99": 8}, "easypost_estimated_delivery_date": + "2024-07-15"}, "service": "groundadvantage"}, {"carrier": "USPS", "easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 4, "percentile_75": 4, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": + 7}, "easypost_estimated_delivery_date": "2024-07-15"}, "service": "librarymail"}, + {"carrier": "USPS", "easypost_time_in_transit_data": {"days_in_transit": {"percentile_50": + 4, "percentile_75": 4, "percentile_85": 4, "percentile_90": 4, "percentile_95": + 5, "percentile_97": 5, "percentile_99": 8}, "easypost_estimated_delivery_date": + "2024-07-15"}, "service": "mediamail"}, {"carrier": "USPS", "easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 4, "percentile_75": 4, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": + 7}, "easypost_estimated_delivery_date": "2024-07-15"}, "service": "priority"}], + "saturday_delivery": null, "to_zip": "90277"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '1496' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 67540321668dac8be2ba0735002c40c8 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb40nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb3nuq fa152d4755 + - extlb1nuq fa152d4755 + x-runtime: + - '0.050522' + x-version-label: + - easypost-202407092027-324ee50b5a-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/test_smartrate_recommend_ship_date.yaml b/tests/cassettes/test_smartrate_recommend_ship_date.yaml new file mode 100644 index 0000000..f81e58c --- /dev/null +++ b/tests/cassettes/test_smartrate_recommend_ship_date.yaml @@ -0,0 +1,90 @@ +interactions: +- request: + body: '{"from_zip": "94107", "to_zip": "90277", "desired_delivery_date": "2024-07-16", + "carriers": ["USPS"]}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '101' + Content-Type: + - application/json + authorization: + - + user-agent: + - + method: POST + uri: https://api.easypost.com/v2/smartrate/deliver_on + response: + body: + string: '{"carriers_without_tint_estimates": null, "desired_delivery_date": + "2024-07-16", "from_zip": "94107", "results": [{"carrier": "USPS", "easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 2, "percentile_75": 2, "percentile_85": + 2, "percentile_90": 3, "percentile_95": 3, "percentile_97": 4, "percentile_99": + 7}, "delivery_date_confidence": 0.47, "estimated_transit_days": 1, "ship_on_date": + "2024-07-15"}, "service": "express"}, {"carrier": "USPS", "easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 2, "percentile_75": 3, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": + 9}, "delivery_date_confidence": 0.21, "estimated_transit_days": 3, "ship_on_date": + "2024-07-13"}, "service": "groundadvantage"}, {"carrier": "USPS", "easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 2, "percentile_75": 3, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 5, "percentile_97": 6, "percentile_99": + 9}, "delivery_date_confidence": 0.25, "estimated_transit_days": 3, "ship_on_date": + "2024-07-13"}, "service": "librarymail"}, {"carrier": "USPS", "easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 2, "percentile_75": 3, "percentile_85": + 3, "percentile_90": 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": + 7}, "delivery_date_confidence": 0.24, "estimated_transit_days": 3, "ship_on_date": + "2024-07-13"}, "service": "mediamail"}, {"carrier": "USPS", "easypost_time_in_transit_data": + {"days_in_transit": {"percentile_50": 2, "percentile_75": 3, "percentile_85": + 4, "percentile_90": 4, "percentile_95": 5, "percentile_97": 5, "percentile_99": + 7}, "delivery_date_confidence": 0.19, "estimated_transit_days": 3, "ship_on_date": + "2024-07-13"}, "service": "priority"}], "saturday_delivery": null, "to_zip": + "90277"}' + headers: + cache-control: + - private, no-cache, no-store + content-length: + - '1695' + content-type: + - application/json; charset=utf-8 + expires: + - '0' + pragma: + - no-cache + referrer-policy: + - strict-origin-when-cross-origin + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-backend: + - easypost + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-ep-request-uuid: + - 67540320668dabdee2ba0376002b9534 + x-frame-options: + - SAMEORIGIN + x-node: + - bigweb34nuq + x-permitted-cross-domain-policies: + - none + x-proxied: + - intlb4nuq fa152d4755 + - extlb1nuq fa152d4755 + x-runtime: + - '0.073001' + x-version-label: + - easypost-202407092027-324ee50b5a-master + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +version: 1 diff --git a/tests/conftest.py b/tests/conftest.py index ae36d7f..a5b836d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -344,4 +344,9 @@ def rma_form_options(): @pytest.fixture def planned_ship_date(): - return "2023-12-28" + return "2024-07-11" + + +@pytest.fixture +def desired_delivery_date(): + return "2024-07-16" diff --git a/tests/test_shipment.py b/tests/test_shipment.py index 396c8fa..9811dd8 100644 --- a/tests/test_shipment.py +++ b/tests/test_shipment.py @@ -319,3 +319,13 @@ def test_retrieve_estimated_delivery_date(basic_shipment, planned_ship_date, tes rates = test_client.shipment.retrieve_estimated_delivery_date(shipment.id, planned_ship_date=planned_ship_date) assert all(entry.get("easypost_time_in_transit_data") for entry in rates) + + +@pytest.mark.vcr() +def test_shipment_recommend_ship_date(basic_shipment, desired_delivery_date, test_client): + """Test that we retrieve SmartRates when providing a shipment and desired delivery date.""" + shipment = test_client.shipment.create(**basic_shipment) + + rates = test_client.shipment.recommend_ship_date(shipment.id, desired_delivery_date=desired_delivery_date) + + assert all(entry.get("easypost_time_in_transit_data") for entry in rates) diff --git a/tests/test_smartrate.py b/tests/test_smartrate.py new file mode 100644 index 0000000..c4f0ac9 --- /dev/null +++ b/tests/test_smartrate.py @@ -0,0 +1,45 @@ +import pytest + + +@pytest.mark.vcr() +def test_smartrate_estimate_delivery_date( + basic_shipment, + ca_address_1, + ca_address_2, + planned_ship_date, + usps, + test_client, +): + """Test that we retrieve SmartRates when provided a from/to zip and planned ship date.""" + params = { + "from_zip": ca_address_1["zip"], + "to_zip": ca_address_2["zip"], + "planned_ship_date": planned_ship_date, + "carriers": [usps], + } + + rates = test_client.smartrate.estimate_delivery_date(**params) + + assert all(entry.get("easypost_time_in_transit_data") for entry in rates["results"]) + + +@pytest.mark.vcr() +def test_smartrate_recommend_ship_date( + basic_shipment, + ca_address_1, + ca_address_2, + desired_delivery_date, + usps, + test_client, +): + """Test that we retrieve SmartRates when provided a from/to zip and desired delivery date.""" + params = { + "from_zip": ca_address_1["zip"], + "to_zip": ca_address_2["zip"], + "desired_delivery_date": desired_delivery_date, + "carriers": [usps], + } + + rates = test_client.smartrate.recommend_ship_date(**params) + + assert all(entry.get("easypost_time_in_transit_data") for entry in rates["results"]) From 05fb39eb104d4f21326039f4929072f19c08b4eb Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Wed, 10 Jul 2024 12:57:24 -0600 Subject: [PATCH 2/2] fix: comment --- easypost/services/smartrate_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easypost/services/smartrate_service.py b/easypost/services/smartrate_service.py index 3425452..5034231 100644 --- a/easypost/services/smartrate_service.py +++ b/easypost/services/smartrate_service.py @@ -29,7 +29,7 @@ def estimate_delivery_date(self, **params) -> List[Dict[str, Any]]: def recommend_ship_date(self, **params) -> List[Dict[str, Any]]: """Retrieve a recommended ship date for each carrier-service level combination via the - Smart Deliver On API, based on a specific ship date and origin-destination postal code pair. + Smart Deliver On API, based on a specific delivery date and origin-destination postal code pair. """ url = "/smartrate/deliver_on"