From ab012d23aee920d1346726d450083ef8625acda8 Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Thu, 30 Jul 2026 11:30:25 +0100 Subject: [PATCH 1/8] Migrated the FedEx carrier from SOAP to the REST API Replaces the three SOAP services (RateService_v10, ShipService_v10, TrackService_v5) and their shipped WSDLs with FedEx's REST API, following the USPS REST carrier: a thin OAuthClient plus RestClient on Symfony HttpClient, with no new Composer dependency. Credentials move from meter number / key / password to an OAuth2 client id and secret, both encrypted. The upgrade script deletes the obsolete rows so no stale encrypted SOAP secret is left behind. Config values that REST renamed are migrated rather than aliased at read time: the five SOAP dropoff types map onto REST pickup types, and INTERNATIONAL_PRIORITY becomes FEDEX_INTERNATIONAL_PRIORITY in allowed_methods and free_method. Aliasing would have collapsed FEDEX_INTERNATIONAL_PRIORITY and FEDEX_INTERNATIONAL_PRIORITY_EXPRESS onto one code, letting one differently-priced service overwrite the other. Adds a rate_endpoint setting because FedEx exposes two rate products: the standard Rates and Transit Times API, and the Comprehensive one that registered Integrator Providers are required to use and which answers 403 on the other path. Both take the same payload and return the same shape, so one builder and one parser serve both. Defaults to standard. Also fixes unit_of_measure having no default at all, which sent weight.units as null and made an unsaved FedEx config unquotable. --- .env.testing.dist | 12 +- .github/workflows/pest.yml | 8 + .phpstan.dist.baseline.neon | 26 +- .../Mage/Usa/Model/Shipping/Carrier/Fedex.php | 1058 ++-- .../Shipping/Carrier/Fedex/OAuthClient.php | 81 + .../Shipping/Carrier/Fedex/RestClient.php | 142 + .../Carrier/Fedex/Source/Rateendpoint.php | 20 + app/code/core/Mage/Usa/etc/config.xml | 13 +- app/code/core/Mage/Usa/etc/system.xml | 37 +- .../Usa/etc/wsdl/FedEx/RateService_v10.wsdl | 4870 --------------- .../Usa/etc/wsdl/FedEx/RateService_v9.wsdl | 4756 -------------- .../Usa/etc/wsdl/FedEx/ShipService_v10.wsdl | 5472 ----------------- .../Usa/etc/wsdl/FedEx/ShipService_v9.wsdl | 5472 ----------------- .../Usa/etc/wsdl/FedEx/TrackService_v5.wsdl | 1510 ----- .../Usa/sql/usa_setup/upgrade-2.0.0-2.0.1.php | 73 + app/locale/en_US/Mage_Usa.csv | 31 +- .../Integration/Usa/FedexSandboxTest.php | 175 + .../Model/Email/PathValidatorTest.php | 2 +- .../Model/Shipping/Carrier/FedexRestTest.php | 646 ++ .../Carrier/_fixtures/rate-response.json | 1282 ++++ .../Carrier/_fixtures/track-response.json | 455 ++ tests/FedexSandbox.php | 52 + tests/PaypalSandbox.php | 31 +- tests/TestEnv.php | 54 + 24 files changed, 3495 insertions(+), 22783 deletions(-) create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/OAuthClient.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/RestClient.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/Source/Rateendpoint.php delete mode 100644 app/code/core/Mage/Usa/etc/wsdl/FedEx/RateService_v10.wsdl delete mode 100644 app/code/core/Mage/Usa/etc/wsdl/FedEx/RateService_v9.wsdl delete mode 100644 app/code/core/Mage/Usa/etc/wsdl/FedEx/ShipService_v10.wsdl delete mode 100644 app/code/core/Mage/Usa/etc/wsdl/FedEx/ShipService_v9.wsdl delete mode 100644 app/code/core/Mage/Usa/etc/wsdl/FedEx/TrackService_v5.wsdl create mode 100644 app/code/core/Mage/Usa/sql/usa_setup/upgrade-2.0.0-2.0.1.php create mode 100644 tests/Backend/Integration/Usa/FedexSandboxTest.php create mode 100644 tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php create mode 100644 tests/Backend/Unit/Usa/Model/Shipping/Carrier/_fixtures/rate-response.json create mode 100644 tests/Backend/Unit/Usa/Model/Shipping/Carrier/_fixtures/track-response.json create mode 100644 tests/FedexSandbox.php create mode 100644 tests/TestEnv.php diff --git a/.env.testing.dist b/.env.testing.dist index ca6e02b861..e738063d4f 100644 --- a/.env.testing.dist +++ b/.env.testing.dist @@ -1,5 +1,11 @@ -# PayPal sandbox credentials for the browser/integration test suites. -# Copy this file to .env.testing and fill in your sandbox app credentials. -# .env.testing is gitignored; CI provides these as secrets instead. +# Sandbox credentials for the browser/integration test suites. +# Copy this file to .env.testing and fill in your own sandbox credentials. +# .env.testing is gitignored; CI provides these as organization secrets instead. PAYPAL_SANDBOX_CLIENT_ID= PAYPAL_SANDBOX_CLIENT_SECRET= +FEDEX_SANDBOX_CLIENT_ID= +FEDEX_SANDBOX_CLIENT_SECRET= +FEDEX_SANDBOX_ACCOUNT= +# Leave empty for the standard Rate API; set to "comprehensive" only if your FedEx +# project is registered as an Integrator Provider. +FEDEX_SANDBOX_RATE_ENDPOINT= diff --git a/.github/workflows/pest.yml b/.github/workflows/pest.yml index 52438505a2..c6ca6b088c 100644 --- a/.github/workflows/pest.yml +++ b/.github/workflows/pest.yml @@ -200,6 +200,10 @@ jobs: API_BASE_URL: http://127.0.0.1:8080 PAYPAL_SANDBOX_CLIENT_ID: ${{ secrets.PAYPAL_SANDBOX_CLIENT_ID }} PAYPAL_SANDBOX_CLIENT_SECRET: ${{ secrets.PAYPAL_SANDBOX_CLIENT_SECRET }} + FEDEX_SANDBOX_CLIENT_ID: ${{ secrets.FEDEX_SANDBOX_CLIENT_ID }} + FEDEX_SANDBOX_CLIENT_SECRET: ${{ secrets.FEDEX_SANDBOX_CLIENT_SECRET }} + FEDEX_SANDBOX_ACCOUNT: ${{ secrets.FEDEX_SANDBOX_ACCOUNT }} + FEDEX_SANDBOX_RATE_ENDPOINT: ${{ secrets.FEDEX_SANDBOX_RATE_ENDPOINT }} run: ./vendor/bin/pest --display-errors --display-warnings - name: Upload browser test failure diagnostics @@ -323,6 +327,10 @@ jobs: API_BASE_URL: http://127.0.0.1:8080 PAYPAL_SANDBOX_CLIENT_ID: ${{ secrets.PAYPAL_SANDBOX_CLIENT_ID }} PAYPAL_SANDBOX_CLIENT_SECRET: ${{ secrets.PAYPAL_SANDBOX_CLIENT_SECRET }} + FEDEX_SANDBOX_CLIENT_ID: ${{ secrets.FEDEX_SANDBOX_CLIENT_ID }} + FEDEX_SANDBOX_CLIENT_SECRET: ${{ secrets.FEDEX_SANDBOX_CLIENT_SECRET }} + FEDEX_SANDBOX_ACCOUNT: ${{ secrets.FEDEX_SANDBOX_ACCOUNT }} + FEDEX_SANDBOX_RATE_ENDPOINT: ${{ secrets.FEDEX_SANDBOX_RATE_ENDPOINT }} run: ./vendor/bin/pest --display-errors --display-warnings - name: Upload browser test failure diagnostics diff --git a/.phpstan.dist.baseline.neon b/.phpstan.dist.baseline.neon index a15c195fb5..d0d7454f0b 100644 --- a/.phpstan.dist.baseline.neon +++ b/.phpstan.dist.baseline.neon @@ -21093,24 +21093,6 @@ parameters: count: 1 path: app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php - - - rawMessage: Access to an undefined property Mage_Usa_Model_Shipping_Carrier_Fedex::$_rawTrackingRequest. - identifier: property.notFound - count: 1 - path: app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php - - - - rawMessage: 'Method Mage_Usa_Model_Shipping_Carrier_Fedex::_getXMLTracking() has no return type specified.' - identifier: missingType.return - count: 1 - path: app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php - - - - rawMessage: 'Method Mage_Usa_Model_Shipping_Carrier_Fedex::_parseTrackingResponse() has no return type specified.' - identifier: missingType.return - count: 1 - path: app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php - - rawMessage: 'Method Mage_Usa_Model_Shipping_Carrier_Fedex::_setFreeMethodRequest() has no return type specified.' identifier: missingType.return @@ -21129,16 +21111,10 @@ parameters: count: 1 path: app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php - - - rawMessage: 'Parameter #1 $value of method Mage_Shipping_Model_Rate_Result_Method::setCost() expects float, string given.' - identifier: argument.type - count: 1 - path: app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php - - rawMessage: 'Parameter #1 $value of method Mage_Shipping_Model_Rate_Result_Method::setMethodTitle() expects string, array|bool given.' identifier: argument.type - count: 2 + count: 1 path: app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php - diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php index 0567d7c244..7b14ff426e 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php @@ -31,6 +31,35 @@ class Mage_Usa_Model_Shipping_Carrier_Fedex extends Mage_Usa_Model_Shipping_Carr */ public const RATE_REQUEST_SMARTPOST = 'SMART_POST'; + /** + * Legacy SOAP DropoffType values mapped onto their REST pickupType equivalent. + * + * None of the SOAP names survive into REST. Stores migrated by + * upgrade-2.0.0-2.0.1.php already hold REST values, so this only covers config + * written before the migration or by third-party code. + */ + protected const PICKUP_TYPE_ALIASES = [ + 'REGULAR_PICKUP' => 'USE_SCHEDULED_PICKUP', + 'REQUEST_COURIER' => 'CONTACT_FEDEX_TO_SCHEDULE', + 'DROP_BOX' => 'DROPOFF_AT_FEDEX_LOCATION', + 'BUSINESS_SERVICE_CENTER' => 'DROPOFF_AT_FEDEX_LOCATION', + 'STATION' => 'DROPOFF_AT_FEDEX_LOCATION', + ]; + + /** + * Rate endpoints. The standard one suits a normal shipping account; FedEx requires + * registered Integrator Providers to use the comprehensive one instead, and answers + * 403 on the other. Both take the same payload and return the same response shape. + */ + public const RATE_ENDPOINT_STANDARD = 'standard'; + public const RATE_ENDPOINT_COMPREHENSIVE = 'comprehensive'; + + /** + * Preference order for the rate flavours FedEx returns per service, best first. + * ACCOUNT is the negotiated rate, LIST the published one. + */ + protected const RATE_TYPE_PREFERENCE = ['ACCOUNT', 'PREFERRED', 'INCENTIVE', 'LIST']; + /** * Code of the carrier * @@ -59,27 +88,6 @@ class Mage_Usa_Model_Shipping_Carrier_Fedex extends Mage_Usa_Model_Shipping_Carr */ protected $_result = null; - /** - * Path to wsdl file of rate service - * - * @var string - */ - protected $_rateServiceWsdl; - - /** - * Path to wsdl file of ship service - * - * @var string - */ - protected $_shipServiceWsdl = null; - - /** - * Path to wsdl file of track service - * - * @var string - */ - protected $_trackServiceWsdl = null; - /** * Container types that could be customized for FedEx carrier * @@ -87,63 +95,12 @@ class Mage_Usa_Model_Shipping_Carrier_Fedex extends Mage_Usa_Model_Shipping_Carr */ protected $_customizableContainerTypes = ['YOUR_PACKAGING']; - public function __construct() - { - parent::__construct(); - $wsdlBasePath = Mage::getModuleDir('etc', 'Mage_Usa') . DS . 'wsdl' . DS . 'FedEx' . DS; - $this->_shipServiceWsdl = $wsdlBasePath . 'ShipService_v10.wsdl'; - $this->_rateServiceWsdl = $wsdlBasePath . 'RateService_v10.wsdl'; - $this->_trackServiceWsdl = $wsdlBasePath . 'TrackService_v5.wsdl'; - } - - /** - * Create soap client with selected wsdl - * - * @param string $wsdl - * @param bool|int $trace - * @return SoapClient - */ - protected function _createSoapClient($wsdl, $trace = false) - { - $client = new SoapClient($wsdl, ['trace' => $trace]); - $client->__setLocation( - $this->getConfigFlag('sandbox_mode') - ? 'https://wsbeta.fedex.com:443/web-services' - : 'https://ws.fedex.com:443/web-services', - ); - - return $client; - } - /** - * Create rate soap client - * - * @return SoapClient + * Raw tracking request data */ - protected function _createRateSoapClient() - { - return $this->_createSoapClient($this->_rateServiceWsdl); - } - - /** - * Create ship soap client - * - * @return SoapClient - */ - protected function _createShipSoapClient() - { - return $this->_createSoapClient($this->_shipServiceWsdl, 1); - } + protected ?\Maho\DataObject $_rawTrackingRequest = null; - /** - * Create track soap client - * - * @return SoapClient - */ - protected function _createTrackSoapClient() - { - return $this->_createSoapClient($this->_trackServiceWsdl, 1); - } + protected ?Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient $_restClient = null; /** * Collect and get rates @@ -156,6 +113,12 @@ public function collectRates(Mage_Shipping_Model_Rate_Request $request) if (!$this->getConfigFlag($this->_activeFlag)) { return false; } + // Without credentials every quote would pay for a doomed OAuth round trip, so bail + // out here instead of rendering the generic carrier error on each cart. + if (!$this->getConfigData('client_id') || !$this->getConfigData('client_secret')) { + Mage::log('FedEx is enabled but has no Client ID/Secret configured; skipping rates.', Mage::LOG_WARNING); + return false; + } $this->setRequest($request); $this->_getQuotes(); @@ -240,10 +203,6 @@ public function setRequest(Mage_Shipping_Model_Rate_Request $request) $r->setValue($request->getPackagePhysicalValue()); $r->setValueWithDiscount($request->getPackageValueWithDiscount()); - $r->setMeterNumber($this->getConfigData('meter_number')); - $r->setKey($this->getConfigData('key')); - $r->setPassword($this->getConfigData('password')); - $r->setIsReturn($request->getIsReturn()); $r->setBaseSubtotalInclTax($request->getBaseSubtotalInclTax()); @@ -264,18 +223,36 @@ public function getResult() } /** - * Get version of rates request - * - * @return array + * Get a REST client bound to the configured credentials and environment */ - public function getVersionInfo() + protected function _getRestClient(): Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient { - return [ - 'ServiceId' => 'crs', - 'Major' => '10', - 'Intermediate' => '0', - 'Minor' => '0', - ]; + if ($this->_restClient === null) { + $sandbox = (bool) $this->getConfigFlag('sandbox_mode'); + $oauthClient = new Mage_Usa_Model_Shipping_Carrier_Fedex_OAuthClient( + (string) $this->getConfigData('client_id'), + (string) $this->getConfigData('client_secret'), + Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient::getBaseUrl($sandbox), + ); + $this->_restClient = new Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient( + $oauthClient, + $sandbox, + (bool) $this->getConfigFlag('debug'), + (string) ($this->getConfigData('rate_endpoint') ?: self::RATE_ENDPOINT_STANDARD), + ); + } + + return $this->_restClient; + } + + /** + * Resolve the REST pickupType for a configured dropoff value + */ + protected function _getPickupType(?string $dropoffType): string + { + $dropoffType = (string) $dropoffType; + + return self::PICKUP_TYPE_ALIASES[$dropoffType] ?? ($dropoffType ?: 'USE_SCHEDULED_PICKUP'); } /** @@ -287,110 +264,101 @@ public function getVersionInfo() protected function _formRateRequest($purpose) { $r = $this->_rawRequest; - $ratesRequest = [ - 'WebAuthenticationDetail' => [ - 'UserCredential' => [ - 'Key' => $r->getKey(), - 'Password' => $r->getPassword(), + $currencyCode = $this->getCurrencyCode(); + $weight = (float) $r->getWeight(); + $value = (float) $r->getValue(); + + $requestedShipment = [ + 'shipper' => [ + 'address' => [ + 'postalCode' => $r->getOrigPostal(), + 'countryCode' => $r->getOrigCountry(), ], ], - 'ClientDetail' => [ - 'AccountNumber' => $r->getAccount(), - 'MeterNumber' => $r->getMeterNumber(), - ], - 'Version' => $this->getVersionInfo(), - 'RequestedShipment' => [ - 'DropoffType' => $r->getDropoffType(), - 'ShipTimestamp' => date('c'), - 'PackagingType' => $r->getPackaging(), - 'TotalInsuredValue' => [ - 'Amount' => $r->getValue(), - 'Currency' => $this->getCurrencyCode(), - ], - 'Shipper' => [ - 'Address' => [ - 'PostalCode' => $r->getOrigPostal(), - 'CountryCode' => $r->getOrigCountry(), - ], + 'recipient' => [ + 'address' => [ + 'postalCode' => $r->getDestPostal(), + 'countryCode' => $r->getDestCountry(), + 'residential' => (bool) $this->getConfigData('residence_delivery'), ], - 'Recipient' => [ - 'Address' => [ - 'PostalCode' => $r->getDestPostal(), - 'CountryCode' => $r->getDestCountry(), - 'Residential' => (bool) $this->getConfigData('residence_delivery'), - ], - ], - 'ShippingChargesPayment' => [ - 'PaymentType' => 'SENDER', - 'Payor' => [ - 'AccountNumber' => $r->getAccount(), - 'CountryCode' => $r->getOrigCountry(), - ], - ], - 'CustomsClearanceDetail' => [ - 'CustomsValue' => [ - 'Amount' => $r->getValue(), - 'Currency' => $this->getCurrencyCode(), + ], + 'shipDateStamp' => Mage_Core_Model_Locale::todayUtc(), + 'pickupType' => $this->_getPickupType($r->getDropoffType()), + 'packagingType' => $r->getPackaging(), + 'rateRequestType' => ['ACCOUNT', 'LIST'], + 'totalPackageCount' => 1, + 'requestedPackageLineItems' => [ + [ + 'groupPackageCount' => 1, + 'weight' => [ + 'units' => $this->getConfigData('unit_of_measure'), + 'value' => $weight, ], ], - 'RateRequestTypes' => 'LIST', - 'PackageCount' => '1', - 'PackageDetail' => 'INDIVIDUAL_PACKAGES', - 'RequestedPackageLineItems' => [ - '0' => [ - 'Weight' => [ - 'Value' => (float) $r->getWeight(), - 'Units' => $this->getConfigData('unit_of_measure'), + ], + ]; + + if ($r->getOrigCountry() !== $r->getDestCountry()) { + $requestedShipment['customsClearanceDetail'] = [ + 'commodities' => [ + [ + 'customsValue' => [ + 'amount' => $value, + 'currency' => $currencyCode, ], - 'GroupPackageCount' => 1, ], ], - ], - ]; + ]; + } if ($purpose == self::RATE_REQUEST_GENERAL) { - $ratesRequest['RequestedShipment']['RequestedPackageLineItems'][0]['InsuredValue'] = [ - 'Amount' => $r->getValue(), - 'Currency' => $this->getCurrencyCode(), + $requestedShipment['requestedPackageLineItems'][0]['declaredValue'] = [ + 'amount' => $value, + 'currency' => $currencyCode, ]; } elseif ($purpose == self::RATE_REQUEST_SMARTPOST) { - $ratesRequest['RequestedShipment']['ServiceType'] = self::RATE_REQUEST_SMARTPOST; - $ratesRequest['RequestedShipment']['SmartPostDetail'] = [ - 'Indicia' => ((float) $r->getWeight() >= 1) ? 'PARCEL_SELECT' : 'PRESORTED_STANDARD', - 'HubId' => $this->getConfigData('smartpost_hubid'), + $requestedShipment['serviceType'] = self::RATE_REQUEST_SMARTPOST; + $requestedShipment['smartPostInfoDetail'] = [ + 'indicia' => $weight >= 1 ? 'PARCEL_SELECT' : 'PRESORTED_STANDARD', + 'hubId' => $this->getConfigData('smartpost_hubid'), ]; } - return $ratesRequest; + return [ + 'accountNumber' => ['value' => $r->getAccount()], + 'rateRequestControlParameters' => ['returnTransitTimes' => false], + 'requestedShipment' => $requestedShipment, + ]; } /** * Makes remote request to the carrier and returns a response * * @param string $purpose - * @return mixed + * @return array */ protected function _doRatesRequest($purpose) { $ratesRequest = $this->_formRateRequest($purpose); $requestString = serialize($ratesRequest); - $response = $this->_getCachedQuotes($requestString); + $cached = $this->_getCachedQuotes($requestString); $debugData = ['request' => $ratesRequest]; - if ($response === null) { - try { - $client = $this->_createRateSoapClient(); - $response = $client->getRates($ratesRequest); + + if ($cached === null) { + $response = $this->_getRestClient()->getRates($ratesRequest); + if (!isset($response['errors'])) { $this->_setCachedQuotes($requestString, serialize($response)); - $debugData['result'] = $response; - } catch (Exception $e) { - $debugData['result'] = ['error' => $e->getMessage(), 'code' => $e->getCode()]; - Mage::logException($e); } } else { - $response = unserialize($response, ['allowed_classes' => false]); - $debugData['result'] = $response; + $response = unserialize($cached, ['allowed_classes' => false]); + if (!is_array($response)) { + $response = []; + } } + + $debugData['result'] = $response; $this->_debug($debugData); + return $response; } @@ -449,46 +417,33 @@ protected function _removeErrorsIfRateExist() /** * Prepare shipping rate result based on response * - * @param mixed $response + * @param array $response * @return Mage_Shipping_Model_Rate_Result */ protected function _prepareRateResponse($response) { $costArr = []; $priceArr = []; - $errorTitle = 'Unable to retrieve tracking'; - - if (is_object($response)) { - if ($response->HighestSeverity == 'FAILURE' || $response->HighestSeverity == 'ERROR') { - if (is_array($response->Notifications)) { - $notification = array_pop($response->Notifications); - $errorTitle = (string) $notification->Message; - } else { - $errorTitle = (string) $response->Notifications->Message; + + if (is_array($response) && !isset($response['errors'])) { + $allowedMethods = explode(',', (string) $this->getConfigData('allowed_methods')); + + foreach ($response['output']['rateReplyDetails'] ?? [] as $rate) { + if (!is_array($rate) || empty($rate['serviceType'])) { + continue; } - } elseif (isset($response->RateReplyDetails)) { - $allowedMethods = explode(',', $this->getConfigData('allowed_methods')); - - if (is_array($response->RateReplyDetails)) { - foreach ($response->RateReplyDetails as $rate) { - $serviceName = (string) $rate->ServiceType; - if (in_array($serviceName, $allowedMethods)) { - $amount = $this->_getRateAmountOriginBased($rate); - $costArr[$serviceName] = $amount; - $priceArr[$serviceName] = $this->getMethodPrice($amount, $serviceName); - } - } - asort($priceArr); - } else { - $rate = $response->RateReplyDetails; - $serviceName = (string) $rate->ServiceType; - if (in_array($serviceName, $allowedMethods)) { - $amount = $this->_getRateAmountOriginBased($rate); - $costArr[$serviceName] = $amount; - $priceArr[$serviceName] = $this->getMethodPrice($amount, $serviceName); - } + $serviceName = (string) $rate['serviceType']; + if (!in_array($serviceName, $allowedMethods)) { + continue; + } + $amount = $this->_getRateAmountOriginBased($rate); + if ($amount === null) { + continue; } + $costArr[$serviceName] = $amount; + $priceArr[$serviceName] = $this->getMethodPrice($amount, $serviceName); } + asort($priceArr); } $result = Mage::getModel('shipping/rate_result'); @@ -496,7 +451,6 @@ protected function _prepareRateResponse($response) $error = Mage::getModel('shipping/rate_result_error'); $error->setCarrier($this->_code); $error->setCarrierTitle($this->getConfigData('title')); - $error->setErrorMessage($errorTitle); $error->setErrorMessage($this->getConfigData('specificerrmsg')); $result->append($error); } else { @@ -517,46 +471,37 @@ protected function _prepareRateResponse($response) /** * Get origin based amount form response of rate estimation * - * @param stdClass $rate + * @param array $rate * @return null|float */ protected function _getRateAmountOriginBased($rate) { - $amount = null; $rateTypeAmounts = []; - if (is_object($rate)) { - // The "RATED..." rates are expressed in the currency of the origin country - foreach ($rate->RatedShipmentDetails as $ratedShipmentDetail) { - $netAmount = (string) $ratedShipmentDetail->ShipmentRateDetail->TotalNetCharge->Amount; - $rateType = (string) $ratedShipmentDetail->ShipmentRateDetail->RateType; - $rateTypeAmounts[$rateType] = $netAmount; + foreach ($rate['ratedShipmentDetails'] ?? [] as $ratedShipmentDetail) { + if (!is_array($ratedShipmentDetail)) { + continue; } - - // Order is important - $ratesOrder = [ - 'RATED_ACCOUNT_PACKAGE', - 'PAYOR_ACCOUNT_PACKAGE', - 'RATED_ACCOUNT_SHIPMENT', - 'PAYOR_ACCOUNT_SHIPMENT', - 'RATED_LIST_PACKAGE', - 'PAYOR_LIST_PACKAGE', - 'RATED_LIST_SHIPMENT', - 'PAYOR_LIST_SHIPMENT', - ]; - foreach ($ratesOrder as $rateType) { - if (!empty($rateTypeAmounts[$rateType])) { - $amount = $rateTypeAmounts[$rateType]; - break; - } + $netAmount = $ratedShipmentDetail['totalNetCharge'] + ?? $ratedShipmentDetail['shipmentRateDetail']['totalNetCharge'] + ?? null; + if ($netAmount === null) { + continue; } + $rateTypeAmounts[(string) ($ratedShipmentDetail['rateType'] ?? '')] = (float) $netAmount; + } - if (is_null($amount)) { - $amount = (string) $rate->RatedShipmentDetails[0]->ShipmentRateDetail->TotalNetCharge->Amount; + if ($rateTypeAmounts === []) { + return null; + } + + foreach (self::RATE_TYPE_PREFERENCE as $rateType) { + if (isset($rateTypeAmounts[$rateType])) { + return $rateTypeAmounts[$rateType]; } } - return (float) $amount; + return reset($rateTypeAmounts); } /** @@ -572,90 +517,6 @@ protected function _setFreeMethodRequest($freeMethod) $r->setService($freeMethod); } - /** - * Prepare shipping rate result based on response - * - * @param mixed $response - * @return Mage_Shipping_Model_Rate_Result - */ - protected function _parseXmlResponse($response) - { - $costArr = []; - $priceArr = []; - - if (trim($response) !== '') { - if ($xml = $this->_parseXml($response)) { - if (is_object($xml->Error) && is_object($xml->Error->Message)) { - $errorTitle = (string) $xml->Error->Message; - } elseif (is_object($xml->SoftError) && is_object($xml->SoftError->Message)) { - $errorTitle = (string) $xml->SoftError->Message; - } else { - $errorTitle = 'Unknown error'; - } - - $allowedMethods = explode(',', $this->getConfigData('allowed_methods')); - - foreach ($xml->Entry as $entry) { - if (in_array((string) $entry->Service, $allowedMethods)) { - $costArr[(string) $entry->Service] = - (string) $entry->EstimatedCharges->DiscountedCharges->NetCharge; - $priceArr[(string) $entry->Service] = $this->getMethodPrice( - (float) $entry->EstimatedCharges->DiscountedCharges->NetCharge, - (string) $entry->Service, - ); - } - } - - asort($priceArr); - } else { - $errorTitle = 'Response is in the wrong format.'; - } - } else { - $errorTitle = 'Unable to retrieve tracking'; - } - - $result = Mage::getModel('shipping/rate_result'); - if (empty($priceArr)) { - $error = Mage::getModel('shipping/rate_result_error'); - $error->setCarrier('fedex'); - $error->setCarrierTitle($this->getConfigData('title')); - $error->setErrorMessage($this->getConfigData('specificerrmsg')); - $result->append($error); - } else { - foreach ($priceArr as $method => $price) { - $rate = Mage::getModel('shipping/rate_result_method'); - $rate->setCarrier('fedex'); - $rate->setCarrierTitle($this->getConfigData('title')); - $rate->setMethod($method); - $rate->setMethodTitle($this->getCode('method', $method)); - $rate->setCost($costArr[$method]); - $rate->setPrice($price); - $result->append($rate); - } - } - return $result; - } - - /** - * Parse XML string and return XML document object or false - * - * @param string $xmlContent - * @return SimpleXMLElement|bool - */ - protected function _parseXml($xmlContent) - { - try { - try { - return simplexml_load_string($xmlContent); - } catch (Exception $e) { - throw new Exception(Mage::helper('usa')->__('Failed to parse xml document: %s', $xmlContent)); - } - } catch (Exception $e) { - Mage::logException($e); - return false; - } - } - /** * Get configuration data of carrier * @@ -681,20 +542,33 @@ public function getCode($type, $code = '') 'INTERNATIONAL_ECONOMY_FREIGHT' => Mage::helper('usa')->__('Intl Economy Freight'), 'INTERNATIONAL_FIRST' => Mage::helper('usa')->__('International First'), 'INTERNATIONAL_GROUND' => Mage::helper('usa')->__('International Ground'), - 'INTERNATIONAL_PRIORITY' => Mage::helper('usa')->__('International Priority'), + 'FEDEX_INTERNATIONAL_PRIORITY' => Mage::helper('usa')->__('International Priority'), + 'FEDEX_INTERNATIONAL_PRIORITY_EXPRESS' => Mage::helper('usa')->__('International Priority Express'), + 'FEDEX_FIRST' => Mage::helper('usa')->__('First'), + 'FEDEX_PRIORITY' => Mage::helper('usa')->__('Priority'), + 'FEDEX_PRIORITY_EXPRESS' => Mage::helper('usa')->__('Priority Express'), + 'FEDEX_PRIORITY_EXPRESS_FREIGHT' => Mage::helper('usa')->__('Priority Express Freight'), + 'FEDEX_PRIORITY_FREIGHT' => Mage::helper('usa')->__('Priority Freight'), + 'FEDEX_ECONOMY_SELECT' => Mage::helper('usa')->__('Economy Select'), 'INTERNATIONAL_PRIORITY_FREIGHT' => Mage::helper('usa')->__('Intl Priority Freight'), 'PRIORITY_OVERNIGHT' => Mage::helper('usa')->__('Priority Overnight'), - 'SMART_POST' => Mage::helper('usa')->__('Smart Post'), + 'SMART_POST' => Mage::helper('usa')->__('Ground Economy'), 'STANDARD_OVERNIGHT' => Mage::helper('usa')->__('Standard Overnight'), 'FEDEX_FREIGHT' => Mage::helper('usa')->__('Freight'), 'FEDEX_NATIONAL_FREIGHT' => Mage::helper('usa')->__('National Freight'), ], 'dropoff' => [ - 'REGULAR_PICKUP' => Mage::helper('usa')->__('Regular Pickup'), - 'REQUEST_COURIER' => Mage::helper('usa')->__('Request Courier'), - 'DROP_BOX' => Mage::helper('usa')->__('Drop Box'), - 'BUSINESS_SERVICE_CENTER' => Mage::helper('usa')->__('Business Service Center'), - 'STATION' => Mage::helper('usa')->__('Station'), + 'USE_SCHEDULED_PICKUP' => Mage::helper('usa')->__('Use Scheduled Pickup'), + 'CONTACT_FEDEX_TO_SCHEDULE' => Mage::helper('usa')->__('Contact FedEx to Schedule'), + 'DROPOFF_AT_FEDEX_LOCATION' => Mage::helper('usa')->__('Dropoff at FedEx Location'), + 'ON_CALL' => Mage::helper('usa')->__('On Call'), + 'PACKAGE_RETURN_PROGRAM' => Mage::helper('usa')->__('Package Return Program'), + 'REGULAR_STOP' => Mage::helper('usa')->__('Regular Stop'), + 'TAG' => Mage::helper('usa')->__('Tag'), + ], + 'rate_endpoint' => [ + self::RATE_ENDPOINT_STANDARD => Mage::helper('usa')->__('Rates and Transit Times'), + self::RATE_ENDPOINT_COMPREHENSIVE => Mage::helper('usa')->__('Comprehensive Rates and Transit Times'), ], 'packaging' => [ 'FEDEX_ENVELOPE' => Mage::helper('usa')->__('FedEx Envelope'), @@ -723,7 +597,7 @@ public function getCode($type, $code = '') 'method' => [ 'INTERNATIONAL_FIRST', 'INTERNATIONAL_ECONOMY', - 'INTERNATIONAL_PRIORITY', + 'FEDEX_INTERNATIONAL_PRIORITY', ], ], ], @@ -749,7 +623,7 @@ public function getCode($type, $code = '') 'method' => [ 'INTERNATIONAL_FIRST', 'INTERNATIONAL_ECONOMY', - 'INTERNATIONAL_PRIORITY', + 'FEDEX_INTERNATIONAL_PRIORITY', ], ], ], @@ -758,7 +632,7 @@ public function getCode($type, $code = '') 'containers' => ['FEDEX_10KG_BOX', 'FEDEX_25KG_BOX'], 'filters' => [ 'within_us' => [], - 'from_us' => ['method' => ['INTERNATIONAL_PRIORITY']], + 'from_us' => ['method' => ['FEDEX_INTERNATIONAL_PRIORITY']], ], ], [ @@ -786,7 +660,7 @@ public function getCode($type, $code = '') 'method' => [ 'INTERNATIONAL_FIRST', 'INTERNATIONAL_ECONOMY', - 'INTERNATIONAL_PRIORITY', + 'FEDEX_INTERNATIONAL_PRIORITY', 'INTERNATIONAL_GROUND', 'FEDEX_FREIGHT', 'FEDEX_1_DAY_FREIGHT', @@ -867,7 +741,7 @@ public function getTracking($trackings) } foreach ($trackings as $tracking) { - $this->_getXMLTracking($tracking); + $this->_doTrackingRequest((string) $tracking); } return $this->_result; @@ -888,55 +762,26 @@ protected function setTrackingReqeust() /** * Send request for tracking - * - * @param array $tracking */ - protected function _getXMLTracking($tracking) + protected function _doTrackingRequest(string $tracking): void { - $trackRequest = [ - 'WebAuthenticationDetail' => [ - 'UserCredential' => [ - 'Key' => $this->getConfigData('key'), - 'Password' => $this->getConfigData('password'), - ], - ], - 'ClientDetail' => [ - 'AccountNumber' => $this->getConfigData('account'), - 'MeterNumber' => $this->getConfigData('meter_number'), - ], - 'Version' => [ - 'ServiceId' => 'trck', - 'Major' => '5', - 'Intermediate' => '0', - 'Minor' => '0', - ], - 'PackageIdentifier' => [ - 'Type' => 'TRACKING_NUMBER_OR_DOORTAG', - 'Value' => $tracking, - ], - /* - * 0 = summary data, one single scan structure with the most recent scan - * 1 = multiple scan activity for each package - */ - 'IncludeDetailedScans' => 1, - ]; - $requestString = serialize($trackRequest); - $response = $this->_getCachedQuotes($requestString); - $debugData = ['request' => $trackRequest]; - if ($response === null) { - try { - $client = $this->_createTrackSoapClient(); - $response = $client->track($trackRequest); + $requestString = serialize(['track' => $tracking]); + $cached = $this->_getCachedQuotes($requestString); + $debugData = ['request' => ['trackingNumber' => $tracking]]; + + if ($cached === null) { + $response = $this->_getRestClient()->track((string) $tracking); + if (!isset($response['errors'])) { $this->_setCachedQuotes($requestString, serialize($response)); - $debugData['result'] = $response; - } catch (Exception $e) { - $debugData['result'] = ['error' => $e->getMessage(), 'code' => $e->getCode()]; - Mage::logException($e); } } else { - $response = unserialize($response, ['allowed_classes' => false]); - $debugData['result'] = $response; + $response = unserialize($cached, ['allowed_classes' => false]); + if (!is_array($response)) { + $response = []; + } } + + $debugData['result'] = $response; $this->_debug($debugData); $this->_parseTrackingResponse($tracking, $response); @@ -944,86 +789,18 @@ protected function _getXMLTracking($tracking) /** * Parse tracking response - * - * @param array $trackingValue - * @param stdClass $response */ - protected function _parseTrackingResponse($trackingValue, $response) + protected function _parseTrackingResponse(string $trackingValue, array $response): void { - $errorTitle = ''; - - if (is_object($response)) { - if ($response->HighestSeverity == 'FAILURE' || $response->HighestSeverity == 'ERROR') { - $errorTitle = (string) $response->Notifications->Message; - } elseif (isset($response->TrackDetails)) { - $trackInfo = $response->TrackDetails; - $resultArray['status'] = (string) $trackInfo->StatusDescription; - $resultArray['service'] = (string) $trackInfo->ServiceInfo; - $timestamp = $trackInfo->EstimatedDeliveryTimestamp ?? $trackInfo->ActualDeliveryTimestamp; - $timestamp = strtotime((string) $timestamp); - if ($timestamp) { - $resultArray['deliverydate'] = date(Mage_Core_Model_Locale::DATE_FORMAT, $timestamp); - $resultArray['deliverytime'] = date('H:i:s', $timestamp); - } - - $deliveryLocation = $trackInfo->EstimatedDeliveryAddress ?? $trackInfo->ActualDeliveryAddress; - $deliveryLocationArray = []; - if (isset($deliveryLocation->City)) { - $deliveryLocationArray[] = (string) $deliveryLocation->City; - } - if (isset($deliveryLocation->StateOrProvinceCode)) { - $deliveryLocationArray[] = (string) $deliveryLocation->StateOrProvinceCode; - } - if (isset($deliveryLocation->CountryCode)) { - $deliveryLocationArray[] = (string) $deliveryLocation->CountryCode; - } - if ($deliveryLocationArray) { - $resultArray['deliverylocation'] = implode(', ', $deliveryLocationArray); - } - - $resultArray['signedby'] = (string) $trackInfo->DeliverySignatureName; - $resultArray['shippeddate'] = date(Mage_Core_Model_Locale::DATE_FORMAT, (int) $trackInfo->ShipTimestamp); - if (isset($trackInfo->PackageWeight) && isset($trackInfo->Units)) { - $weight = (string) $trackInfo->PackageWeight; - $unit = (string) $trackInfo->Units; - $resultArray['weight'] = "{$weight} {$unit}"; - } - - $packageProgress = []; - if (isset($trackInfo->Events)) { - $events = $trackInfo->Events; - if (isset($events->Address)) { - $events = [$events]; - } - foreach ($events as $event) { - $tempArray = []; - $tempArray['activity'] = (string) $event->EventDescription; - $timestamp = strtotime((string) $event->Timestamp); - if ($timestamp) { - $tempArray['deliverydate'] = date(Mage_Core_Model_Locale::DATE_FORMAT, $timestamp); - $tempArray['deliverytime'] = date('H:i:s', $timestamp); - } - if (isset($event->Address)) { - $addressArray = []; - $address = $event->Address; - if (isset($address->City)) { - $addressArray[] = (string) $address->City; - } - if (isset($address->StateOrProvinceCode)) { - $addressArray[] = (string) $address->StateOrProvinceCode; - } - if (isset($address->CountryCode)) { - $addressArray[] = (string) $address->CountryCode; - } - if ($addressArray) { - $tempArray['deliverylocation'] = implode(', ', $addressArray); - } - } - $packageProgress[] = $tempArray; - } - } + $errorTitle = Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient::extractErrorMessage($response); + $resultArray = null; - $resultArray['progressdetail'] = $packageProgress; + $trackInfo = $response['output']['completeTrackResults'][0]['trackResults'][0] ?? null; + if (is_array($trackInfo)) { + if (isset($trackInfo['error'])) { + $errorTitle = $trackInfo['error']['message'] ?? $trackInfo['error']['code'] ?? null; + } else { + $resultArray = $this->_extractTrackingData($trackInfo); } } @@ -1031,16 +808,16 @@ protected function _parseTrackingResponse($trackingValue, $response) $this->_result = Mage::getModel('shipping/tracking_result'); } - if (isset($resultArray)) { + if ($resultArray !== null) { $tracking = Mage::getModel('shipping/tracking_result_status'); - $tracking->setCarrier('fedex'); + $tracking->setCarrier($this->_code); $tracking->setCarrierTitle($this->getConfigData('title')); $tracking->setTracking($trackingValue); $tracking->addData($resultArray); $this->_result->append($tracking); } else { $error = Mage::getModel('shipping/tracking_result_error'); - $error->setCarrier('fedex'); + $error->setCarrier($this->_code); $error->setCarrierTitle($this->getConfigData('title')); $error->setTracking($trackingValue); $error->setErrorMessage($errorTitle ?: Mage::helper('usa')->__('Unable to retrieve tracking')); @@ -1048,6 +825,95 @@ protected function _parseTrackingResponse($trackingValue, $response) } } + /** + * Flatten a REST trackResults entry into the shipping/tracking_result_status shape + */ + protected function _extractTrackingData(array $trackInfo): array + { + $resultArray = [ + 'status' => (string) ($trackInfo['latestStatusDetail']['statusByLocale'] + ?? $trackInfo['latestStatusDetail']['description'] ?? ''), + 'service' => (string) ($trackInfo['serviceDetail']['description'] + ?? $trackInfo['serviceDetail']['type'] ?? ''), + ]; + + $dateAndTimes = []; + foreach ($trackInfo['dateAndTimes'] ?? [] as $entry) { + if (isset($entry['type'], $entry['dateTime'])) { + $dateAndTimes[(string) $entry['type']] = (string) $entry['dateTime']; + } + } + + $deliveryTimestamp = strtotime( + $dateAndTimes['ACTUAL_DELIVERY'] + ?? $dateAndTimes['ESTIMATED_DELIVERY'] + ?? $trackInfo['estimatedDeliveryTimeWindow']['window']['ends'] ?? '', + ); + if ($deliveryTimestamp) { + $resultArray['deliverydate'] = date(Mage_Core_Model_Locale::DATE_FORMAT, $deliveryTimestamp); + $resultArray['deliverytime'] = date('H:i:s', $deliveryTimestamp); + } + + $shipTimestamp = strtotime($dateAndTimes['SHIP'] ?? $dateAndTimes['ACTUAL_PICKUP'] ?? ''); + if ($shipTimestamp) { + $resultArray['shippeddate'] = date(Mage_Core_Model_Locale::DATE_FORMAT, $shipTimestamp); + } + + $deliveryLocation = $this->_formatTrackingAddress( + $trackInfo['deliveryDetails']['actualDeliveryAddress'] + ?? $trackInfo['lastUpdatedDestinationAddress'] + ?? [], + ); + if ($deliveryLocation !== '') { + $resultArray['deliverylocation'] = $deliveryLocation; + } + + if (!empty($trackInfo['deliveryDetails']['receivedByName'])) { + $resultArray['signedby'] = (string) $trackInfo['deliveryDetails']['receivedByName']; + } + + $weight = $trackInfo['packageDetails']['weightAndDimensions']['weight'][0] ?? null; + if (isset($weight['value'], $weight['unit'])) { + $resultArray['weight'] = "{$weight['value']} {$weight['unit']}"; + } + + $packageProgress = []; + foreach ($trackInfo['scanEvents'] ?? [] as $event) { + if (!is_array($event)) { + continue; + } + $tempArray = ['activity' => (string) ($event['eventDescription'] ?? '')]; + $timestamp = strtotime((string) ($event['date'] ?? '')); + if ($timestamp) { + $tempArray['deliverydate'] = date(Mage_Core_Model_Locale::DATE_FORMAT, $timestamp); + $tempArray['deliverytime'] = date('H:i:s', $timestamp); + } + $location = $this->_formatTrackingAddress($event['scanLocation'] ?? []); + if ($location !== '') { + $tempArray['deliverylocation'] = $location; + } + $packageProgress[] = $tempArray; + } + $resultArray['progressdetail'] = $packageProgress; + + return $resultArray; + } + + /** + * Render a REST address object as "City, State, Country" + */ + protected function _formatTrackingAddress(array $address): string + { + $parts = []; + foreach (['city', 'stateOrProvinceCode', 'countryCode'] as $key) { + if (!empty($address[$key])) { + $parts[] = (string) $address[$key]; + } + } + + return implode(', ', $parts); + } + /** * Get tracking response * @@ -1091,36 +957,6 @@ public function getAllowedMethods() return $arr; } - /** - * Return array of authenticated information - * - * @return array - */ - protected function _getAuthDetails() - { - return [ - 'WebAuthenticationDetail' => [ - 'UserCredential' => [ - 'Key' => $this->getConfigData('key'), - 'Password' => $this->getConfigData('password'), - ], - ], - 'ClientDetail' => [ - 'AccountNumber' => $this->getConfigData('account'), - 'MeterNumber' => $this->getConfigData('meter_number'), - ], - 'TransactionDetail' => [ - 'CustomerTransactionId' => '*** Express Domestic Shipping Request v9 using PHP ***', - ], - 'Version' => [ - 'ServiceId' => 'ship', - 'Major' => '10', - 'Intermediate' => '0', - 'Minor' => '0', - ], - ]; - } - /** * Form array with appropriate structure for shipment request * @@ -1170,138 +1006,148 @@ protected function _formShipmentRequest(\Maho\DataObject $request) } $paymentType = $request->getIsReturn() ? 'RECIPIENT' : 'SENDER'; - $requestClient = [ - 'RequestedShipment' => [ - 'ShipTimestamp' => time(), - 'DropoffType' => $this->getConfigData('dropoff'), - 'PackagingType' => $request->getPackagingType(), - 'ServiceType' => $request->getShippingMethod(), - 'Shipper' => [ - 'Contact' => [ - 'PersonName' => $request->getShipperContactPersonName(), - 'CompanyName' => $request->getShipperContactCompanyName(), - 'PhoneNumber' => $request->getShipperContactPhoneNumber(), - ], - 'Address' => [ - 'StreetLines' => [ - $request->getShipperAddressStreet1(), - $request->getShipperAddressStreet2(), - ], - 'City' => $request->getShipperAddressCity(), - 'StateOrProvinceCode' => $request->getShipperAddressStateOrProvinceCode(), - 'PostalCode' => $request->getShipperAddressPostalCode(), - 'CountryCode' => $request->getShipperAddressCountryCode(), - ], + $originCountry = Mage::getStoreConfig( + Mage_Shipping_Model_Shipping::XML_PATH_STORE_COUNTRY_ID, + $request->getStoreId(), + ); + + $packageLineItem = [ + 'sequenceNumber' => 1, + 'weight' => [ + 'units' => $weightUnits, + 'value' => (float) $request->getPackageWeight(), + ], + 'customerReferences' => [ + [ + 'customerReferenceType' => 'CUSTOMER_REFERENCE', + 'value' => $referenceData, ], - 'Recipient' => [ - 'Contact' => [ - 'PersonName' => $request->getRecipientContactPersonName(), - 'CompanyName' => $request->getRecipientContactCompanyName(), - 'PhoneNumber' => $request->getRecipientContactPhoneNumber(), + ], + ]; + + if ($packageParams->getDeliveryConfirmation()) { + $packageLineItem['packageSpecialServices'] = [ + 'specialServiceTypes' => ['SIGNATURE_OPTION'], + 'signatureOptionType' => $packageParams->getDeliveryConfirmation(), + ]; + } + + if ($length || $width || $height) { + $packageLineItem['dimensions'] = [ + 'length' => $length, + 'width' => $width, + 'height' => $height, + 'units' => $dimensionsUnits, + ]; + } + + $requestedShipment = [ + // Not a typo: the Ship API spells it shipDatestamp while Rate uses shipDateStamp. + 'shipDatestamp' => Mage_Core_Model_Locale::todayUtc(), + 'pickupType' => $this->_getPickupType($this->getConfigData('dropoff')), + 'packagingType' => $request->getPackagingType(), + 'serviceType' => $request->getShippingMethod(), + 'shipper' => [ + 'contact' => [ + 'personName' => $request->getShipperContactPersonName(), + 'companyName' => $request->getShipperContactCompanyName(), + 'phoneNumber' => $request->getShipperContactPhoneNumber(), + ], + 'address' => [ + 'streetLines' => array_values(array_filter([ + $request->getShipperAddressStreet1(), + $request->getShipperAddressStreet2(), + ])), + 'city' => $request->getShipperAddressCity(), + 'stateOrProvinceCode' => $request->getShipperAddressStateOrProvinceCode(), + 'postalCode' => $request->getShipperAddressPostalCode(), + 'countryCode' => $request->getShipperAddressCountryCode(), + ], + ], + 'recipients' => [ + [ + 'contact' => [ + 'personName' => $request->getRecipientContactPersonName(), + 'companyName' => $request->getRecipientContactCompanyName(), + 'phoneNumber' => $request->getRecipientContactPhoneNumber(), ], - 'Address' => [ - 'StreetLines' => [ + 'address' => [ + 'streetLines' => array_values(array_filter([ $request->getRecipientAddressStreet1(), $request->getRecipientAddressStreet2(), - ], - 'City' => $request->getRecipientAddressCity(), - 'StateOrProvinceCode' => $request->getRecipientAddressStateOrProvinceCode(), - 'PostalCode' => $request->getRecipientAddressPostalCode(), - 'CountryCode' => $request->getRecipientAddressCountryCode(), - 'Residential' => (bool) $this->getConfigData('residence_delivery'), - ], - ], - 'ShippingChargesPayment' => [ - 'PaymentType' => $paymentType, - 'Payor' => [ - 'AccountNumber' => $this->getConfigData('account'), - 'CountryCode' => Mage::getStoreConfig( - Mage_Shipping_Model_Shipping::XML_PATH_STORE_COUNTRY_ID, - $request->getStoreId(), - ), + ])), + 'city' => $request->getRecipientAddressCity(), + 'stateOrProvinceCode' => $request->getRecipientAddressStateOrProvinceCode(), + 'postalCode' => $request->getRecipientAddressPostalCode(), + 'countryCode' => $request->getRecipientAddressCountryCode(), + 'residential' => (bool) $this->getConfigData('residence_delivery'), ], ], - 'LabelSpecification' => [ - 'LabelFormatType' => 'COMMON2D', - 'ImageType' => 'PNG', - 'LabelStockType' => 'PAPER_8.5X11_TOP_HALF_LABEL', - ], - 'RateRequestTypes' => ['ACCOUNT'], - 'PackageCount' => 1, - 'RequestedPackageLineItems' => [ - 'SequenceNumber' => '1', - 'Weight' => [ - 'Units' => $weightUnits, - 'Value' => $request->getPackageWeight(), - ], - 'CustomerReferences' => [ - 'CustomerReferenceType' => 'CUSTOMER_REFERENCE', - 'Value' => $referenceData, - ], - 'SpecialServicesRequested' => [ - 'SpecialServiceTypes' => 'SIGNATURE_OPTION', - 'SignatureOptionDetail' => ['OptionType' => $packageParams->getDeliveryConfirmation()], + ], + 'shippingChargesPayment' => [ + 'paymentType' => $paymentType, + 'payor' => [ + 'responsibleParty' => [ + 'accountNumber' => ['value' => $this->getConfigData('account')], + 'address' => ['countryCode' => $originCountry], ], ], ], + 'labelSpecification' => [ + 'labelFormatType' => 'COMMON2D', + 'imageType' => 'PDF', + 'labelStockType' => 'PAPER_85X11_TOP_HALF_LABEL', + ], + 'rateRequestType' => ['ACCOUNT'], + 'totalPackageCount' => 1, + 'requestedPackageLineItems' => [$packageLineItem], ]; // for international shipping if ($request->getShipperAddressCountryCode() != $request->getRecipientAddressCountryCode()) { - $requestClient['RequestedShipment']['CustomsClearanceDetail'] = - [ - 'CustomsValue' => - [ - 'Currency' => $request->getBaseCurrencyCode(), - 'Amount' => $customsValue, - ], - 'DutiesPayment' => [ - 'PaymentType' => $paymentType, - 'Payor' => [ - 'AccountNumber' => $this->getConfigData('account'), - 'CountryCode' => Mage::getStoreConfig( - Mage_Shipping_Model_Shipping::XML_PATH_STORE_COUNTRY_ID, - $request->getStoreId(), - ), + $requestedShipment['customsClearanceDetail'] = [ + 'dutiesPayment' => [ + 'paymentType' => $paymentType, + 'payor' => [ + 'responsibleParty' => [ + 'accountNumber' => ['value' => $this->getConfigData('account')], + 'address' => ['countryCode' => $originCountry], ], ], - 'Commodities' => [ - 'Weight' => [ - 'Units' => $weightUnits, - 'Value' => $request->getPackageWeight(), + ], + 'commodities' => [ + [ + 'weight' => [ + 'units' => $weightUnits, + 'value' => (float) $request->getPackageWeight(), ], - 'NumberOfPieces' => 1, - 'CountryOfManufacture' => implode(',', array_unique($countriesOfManufacture)), - 'Description' => implode(', ', $itemsDesc), - 'Quantity' => ceil($itemsQty), - 'QuantityUnits' => 'pcs', - 'UnitPrice' => [ - 'Currency' => $request->getBaseCurrencyCode(), - 'Amount' => $unitPrice, + 'numberOfPieces' => 1, + 'countryOfManufacture' => implode(',', array_unique($countriesOfManufacture)), + 'description' => implode(', ', $itemsDesc), + 'quantity' => (int) ceil($itemsQty), + 'quantityUnits' => 'pcs', + 'unitPrice' => [ + 'currency' => $request->getBaseCurrencyCode(), + 'amount' => $unitPrice, ], - 'CustomsValue' => [ - 'Currency' => $request->getBaseCurrencyCode(), - 'Amount' => $customsValue, + 'customsValue' => [ + 'currency' => $request->getBaseCurrencyCode(), + 'amount' => $customsValue, ], ], - ]; + ], + ]; } if ($request->getMasterTrackingId()) { - $requestClient['RequestedShipment']['MasterTrackingId'] = $request->getMasterTrackingId(); + $requestedShipment['masterTrackingId'] = ['trackingNumber' => $request->getMasterTrackingId()]; } - // set dimensions - if ($length || $width || $height) { - $requestClient['RequestedShipment']['RequestedPackageLineItems']['Dimensions'] = []; - $dimenssions = &$requestClient['RequestedShipment']['RequestedPackageLineItems']['Dimensions']; - $dimenssions['Length'] = $length; - $dimenssions['Width'] = $width; - $dimenssions['Height'] = $height; - $dimenssions['Units'] = $dimensionsUnits; - } - - return $this->_getAuthDetails() + $requestClient; + return [ + 'labelResponseOptions' => 'LABEL', + 'accountNumber' => ['value' => $this->getConfigData('account')], + 'requestedShipment' => $requestedShipment, + ]; } /** @@ -1314,39 +1160,23 @@ protected function _doShipmentRequest(\Maho\DataObject $request) { $this->_prepareShipmentRequest($request); $result = new \Maho\DataObject(); - $client = $this->_createShipSoapClient(); $requestClient = $this->_formShipmentRequest($request); - $response = $client->processShipment($requestClient); - - if ($response->HighestSeverity != 'FAILURE' && $response->HighestSeverity != 'ERROR') { - $shippingLabelContent = $response->CompletedShipmentDetail->CompletedPackageDetails->Label->Parts->Image; - $trackingNumber = $response->CompletedShipmentDetail->CompletedPackageDetails->TrackingIds->TrackingNumber; - $result->setShippingLabelContent($shippingLabelContent); - $result->setTrackingNumber($trackingNumber); - $debugData = ['request' => $client->__getLastRequest(), 'result' => $client->__getLastResponse()]; - $this->_debug($debugData); + $response = $this->_getRestClient()->createShipment($requestClient); + + $error = Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient::extractErrorMessage($response); + if ($error === null) { + $shipment = $response['output']['transactionShipments'][0] ?? []; + $pieceResponse = $shipment['pieceResponses'][0] ?? []; + $encodedLabel = $pieceResponse['packageDocuments'][0]['encodedLabel'] ?? null; + + $result->setShippingLabelContent($encodedLabel !== null ? base64_decode($encodedLabel) : null); + $result->setTrackingNumber( + $shipment['masterTrackingNumber'] ?? $pieceResponse['trackingNumber'] ?? null, + ); } else { - $debugData = [ - 'request' => $client->__getLastRequest(), - 'result' => [ - 'error' => '', - 'code' => '', - 'xml' => $client->__getLastResponse(), - ], - ]; - if (is_array($response->Notifications)) { - foreach ($response->Notifications as $notification) { - $debugData['result']['code'] .= $notification->Code . '; '; - $debugData['result']['error'] .= $notification->Message . '; '; - } - } else { - $debugData['result']['code'] = $response->Notifications->Code . ' '; - $debugData['result']['error'] = $response->Notifications->Message . ' '; - } - $this->_debug($debugData); - $result->setErrors($debugData['result']['error']); + $result->setErrors($error); } - $result->setGatewayResponse($client->__getLastResponse()); + $result->setGatewayResponse(Mage::helper('core')->jsonEncode($response)); return $result; } @@ -1361,12 +1191,12 @@ protected function _doShipmentRequest(\Maho\DataObject $request) #[\Override] public function rollBack($data) { - $requestData = $this->_getAuthDetails(); - $requestData['DeletionControl'] = 'DELETE_ONE_PACKAGE'; - foreach ($data as &$item) { - $requestData['TrackingId'] = $item['tracking_number']; - $client = $this->_createShipSoapClient(); - $client->deleteShipment($requestData); + foreach ($data as $item) { + $this->_getRestClient()->cancelShipment([ + 'accountNumber' => ['value' => $this->getConfigData('account')], + 'trackingNumber' => $item['tracking_number'], + 'deletionControl' => 'DELETE_ONE_PACKAGE', + ]); } return true; } diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/OAuthClient.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/OAuthClient.php new file mode 100644 index 0000000000..054855ac09 --- /dev/null +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/OAuthClient.php @@ -0,0 +1,81 @@ + + * SPDX-License-Identifier: OSL-3.0 + * @package Mage_Usa + */ + +declare(strict_types=1); + +class Mage_Usa_Model_Shipping_Carrier_Fedex_OAuthClient +{ + private const TOKEN_CACHE_KEY_PREFIX = 'fedex_oauth_token_'; + + public const CACHE_TAG = 'fedex_oauth'; + + private string $clientId; + private string $clientSecret; + private string $tokenEndpoint; + private Mage_Core_Model_Cache $cache; + + public function __construct(string $clientId, string $clientSecret, string $baseUrl) + { + $this->clientId = $clientId; + $this->clientSecret = $clientSecret; + $this->tokenEndpoint = $baseUrl . '/oauth/token'; + $this->cache = Mage::app()->getCache(); + } + + /** + * Get valid access token (from cache or fetch new) + */ + public function getAccessToken(): string + { + $cachedToken = $this->cache->load($this->getCacheKey()); + + if ($cachedToken) { + return $cachedToken; + } + + return $this->fetchNewToken(); + } + + /** + * Fetch new OAuth token using client credentials flow. + * + * FedEx serves its token endpoint as application/x-www-form-urlencoded; a JSON + * body is rejected, unlike the USPS equivalent. + */ + private function fetchNewToken(): string + { + $client = \Symfony\Component\HttpClient\HttpClient::create([ + 'timeout' => 10, + ]); + $response = $client->request('POST', $this->tokenEndpoint, [ + 'body' => [ + 'grant_type' => 'client_credentials', + 'client_id' => $this->clientId, + 'client_secret' => $this->clientSecret, + ], + ]); + + $data = Mage::helper('core')->jsonDecode($response->getContent()); + $accessToken = $data['access_token']; + $expiresIn = (int) ($data['expires_in'] ?? 3600); + + $this->cache->save( + $accessToken, + $this->getCacheKey(), + [self::CACHE_TAG], + max(60, $expiresIn - 300), + ); + + return $accessToken; + } + + private function getCacheKey(): string + { + return self::TOKEN_CACHE_KEY_PREFIX . md5($this->clientId . $this->tokenEndpoint); + } +} diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/RestClient.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/RestClient.php new file mode 100644 index 0000000000..ed91f8dbbe --- /dev/null +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/RestClient.php @@ -0,0 +1,142 @@ + + * SPDX-License-Identifier: OSL-3.0 + * @package Mage_Usa + */ + +declare(strict_types=1); + +class Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient +{ + public const BASE_URL_PRODUCTION = 'https://apis.fedex.com'; + public const BASE_URL_SANDBOX = 'https://apis-sandbox.fedex.com'; + + public const ENDPOINT_RATES = '/rate/v1/rates/quotes'; + public const ENDPOINT_RATES_COMPREHENSIVE = '/rate/v1/comprehensiverates/quotes'; + + private const ENDPOINT_TRACK = '/track/v1/trackingnumbers'; + private const ENDPOINT_SHIP = '/ship/v1/shipments'; + private const ENDPOINT_SHIP_CANCEL = '/ship/v1/shipments/cancel'; + + private Mage_Usa_Model_Shipping_Carrier_Fedex_OAuthClient $oauthClient; + private string $baseUrl; + private bool $debugMode; + private string $rateEndpoint; + + public static function getBaseUrl(bool $sandbox): string + { + return $sandbox ? self::BASE_URL_SANDBOX : self::BASE_URL_PRODUCTION; + } + + public function __construct( + Mage_Usa_Model_Shipping_Carrier_Fedex_OAuthClient $oauthClient, + bool $sandbox = false, + bool $debugMode = false, + string $rateEndpoint = Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_ENDPOINT_STANDARD, + ) { + $this->oauthClient = $oauthClient; + $this->baseUrl = self::getBaseUrl($sandbox); + $this->debugMode = $debugMode; + $this->rateEndpoint = $rateEndpoint === Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_ENDPOINT_COMPREHENSIVE + ? self::ENDPOINT_RATES_COMPREHENSIVE + : self::ENDPOINT_RATES; + } + + public function getRateEndpoint(): string + { + return $this->rateEndpoint; + } + + public function getRates(array $requestData): array + { + return $this->makeRequest('POST', $this->rateEndpoint, $requestData); + } + + public function track(string $trackingNumber): array + { + return $this->makeRequest('POST', self::ENDPOINT_TRACK, [ + 'includeDetailedScans' => true, + 'trackingInfo' => [ + ['trackingNumberInfo' => ['trackingNumber' => $trackingNumber]], + ], + ]); + } + + public function createShipment(array $requestData): array + { + return $this->makeRequest('POST', self::ENDPOINT_SHIP, $requestData); + } + + public function cancelShipment(array $requestData): array + { + return $this->makeRequest('PUT', self::ENDPOINT_SHIP_CANCEL, $requestData); + } + + /** + * Flatten a FedEx REST error payload into a single message. + * + * FedEx answers both HTTP-error and HTTP-200 failures with a top-level + * errors[] of {code, message}, so one extractor covers every path. + */ + public static function extractErrorMessage(array $data): ?string + { + if (empty($data['errors']) || !is_array($data['errors'])) { + return null; + } + + $messages = []; + foreach ($data['errors'] as $error) { + if (!empty($error['message'])) { + $messages[] = $error['message']; + } elseif (!empty($error['code'])) { + $messages[] = $error['code']; + } + } + + return $messages === [] ? null : implode('; ', $messages); + } + + /** + * Make an HTTP request to the FedEx REST API. + * + * Error payloads are returned rather than thrown so callers can surface them + * through the carrier's own rate/tracking error results. + */ + private function makeRequest(string $method, string $endpoint, array $data): array + { + $client = \Symfony\Component\HttpClient\HttpClient::create([ + 'timeout' => 30, + ]); + + $url = $this->baseUrl . $endpoint; + $debugData = ['request' => ['method' => $method, 'url' => $url, 'data' => $data]]; + + try { + $response = $client->request($method, $url, [ + 'headers' => [ + 'Authorization' => 'Bearer ' . $this->oauthClient->getAccessToken(), + 'Content-Type' => 'application/json', + 'X-locale' => 'en_US', + ], + 'json' => $data, + ]); + + // getContent(false) keeps 4xx/5xx bodies readable: FedEx puts the actionable + // message in the body of an error response, not in the status line. + $responseData = Mage::helper('core')->jsonDecode($response->getContent(false)); + $debugData['result'] = $responseData; + } catch (Exception $e) { + $responseData = ['errors' => [['code' => (string) $e->getCode(), 'message' => $e->getMessage()]]]; + $debugData['result'] = $responseData; + Mage::logException($e); + } + + if ($this->debugMode) { + Mage::log($debugData, Mage::LOG_DEBUG, 'fedex_rest_api.log'); + } + + return is_array($responseData) ? $responseData : []; + } +} diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/Source/Rateendpoint.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/Source/Rateendpoint.php new file mode 100644 index 0000000000..82608c55c3 --- /dev/null +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/Source/Rateendpoint.php @@ -0,0 +1,20 @@ + + * SPDX-License-Identifier: OSL-3.0 + * @package Mage_Usa + */ + +class Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Rateendpoint +{ + public function toOptionArray(): array + { + $fedex = Mage::getSingleton('usa/shipping_carrier_fedex'); + $arr = []; + foreach ($fedex->getCode('rate_endpoint') as $k => $v) { + $arr[] = ['value' => $k, 'label' => $v]; + } + return $arr; + } +} diff --git a/app/code/core/Mage/Usa/etc/config.xml b/app/code/core/Mage/Usa/etc/config.xml index dedb959d6e..9184481427 100644 --- a/app/code/core/Mage/Usa/etc/config.xml +++ b/app/code/core/Mage/Usa/etc/config.xml @@ -7,7 +7,7 @@ SPDX-License-Identifier: AFL-3.0 - 2.0.0 + 2.0.1 @@ -74,21 +74,22 @@ SPDX-License-Identifier: AFL-3.0 - - - + + 0 + standard 0 0 0 - EUROPE_FIRST_INTERNATIONAL_PRIORITY,FEDEX_1_DAY_FREIGHT,FEDEX_2_DAY_FREIGHT,FEDEX_2_DAY,FEDEX_2_DAY_AM,FEDEX_3_DAY_FREIGHT,FEDEX_EXPRESS_SAVER,FEDEX_GROUND,FIRST_OVERNIGHT,GROUND_HOME_DELIVERY,INTERNATIONAL_ECONOMY,INTERNATIONAL_ECONOMY_FREIGHT,INTERNATIONAL_FIRST,INTERNATIONAL_GROUND,INTERNATIONAL_PRIORITY,INTERNATIONAL_PRIORITY_FREIGHT,PRIORITY_OVERNIGHT,SMART_POST,STANDARD_OVERNIGHT,FEDEX_FREIGHT,FEDEX_NATIONAL_FREIGHT + EUROPE_FIRST_INTERNATIONAL_PRIORITY,FEDEX_1_DAY_FREIGHT,FEDEX_2_DAY_FREIGHT,FEDEX_2_DAY,FEDEX_2_DAY_AM,FEDEX_3_DAY_FREIGHT,FEDEX_EXPRESS_SAVER,FEDEX_GROUND,FIRST_OVERNIGHT,GROUND_HOME_DELIVERY,INTERNATIONAL_ECONOMY,INTERNATIONAL_ECONOMY_FREIGHT,INTERNATIONAL_FIRST,INTERNATIONAL_GROUND,FEDEX_INTERNATIONAL_PRIORITY,FEDEX_INTERNATIONAL_PRIORITY_EXPRESS,FEDEX_FIRST,FEDEX_PRIORITY,FEDEX_PRIORITY_EXPRESS,FEDEX_PRIORITY_EXPRESS_FREIGHT,FEDEX_PRIORITY_FREIGHT,FEDEX_ECONOMY_SELECT,INTERNATIONAL_PRIORITY_FREIGHT,PRIORITY_OVERNIGHT,SMART_POST,STANDARD_OVERNIGHT - REGULAR_PICKUP + USE_SCHEDULED_PICKUP FEDEX_GROUND 0 usa/shipping_carrier_fedex YOUR_PACKAGING Federal Express + LB This shipping method is currently unavailable. 150 F diff --git a/app/code/core/Mage/Usa/etc/system.xml b/app/code/core/Mage/Usa/etc/system.xml index 51313364a9..11ab55725e 100644 --- a/app/code/core/Mage/Usa/etc/system.xml +++ b/app/code/core/Mage/Usa/etc/system.xml @@ -43,36 +43,28 @@ SPDX-License-Identifier: AFL-3.0 Please make sure to use only digits here. No dashes are allowed. 1 - - + + obscure adminhtml/system_config_backend_encrypted 50 1 1 0 + The API Key of your project on the FedEx Developer Portal. 1 - - - + + + obscure adminhtml/system_config_backend_encrypted 60 1 1 0 + The Secret Key of your project on the FedEx Developer Portal. 1 - - - - obscure - adminhtml/system_config_backend_encrypted - 70 - 1 - 1 - 0 - 1 - + boolean @@ -82,6 +74,17 @@ SPDX-License-Identifier: AFL-3.0 0 1 + + + select + usa/shipping_carrier_fedex_source_rateendpoint + 76 + 1 + 1 + 0 + Match the rate product enabled on your FedEx project. Registered FedEx Integrator Providers must select Comprehensive Rates and Transit Times; everyone else should keep Rates and Transit Times. + 1 + select @@ -186,7 +189,7 @@ SPDX-License-Identifier: AFL-3.0 1 1 0 - The field is applicable if the Smart Post method is selected. + The field is applicable if the Ground Economy method is selected. 1 diff --git a/app/code/core/Mage/Usa/etc/wsdl/FedEx/RateService_v10.wsdl b/app/code/core/Mage/Usa/etc/wsdl/FedEx/RateService_v10.wsdl deleted file mode 100644 index d7e635a525..0000000000 --- a/app/code/core/Mage/Usa/etc/wsdl/FedEx/RateService_v10.wsdl +++ /dev/null @@ -1,4870 +0,0 @@ - - - - - - - - Specifies additional labels to be produced. All required labels for shipments will be produced without the need to request additional labels. These are only available as thermal labels. - - - - - The type of additional labels to return. - - - - - The number of this type label to return - - - - - - - Identifies the type of additional labels. - - - - - - - - - - - - - - - Descriptive data for a physical location. May be used as an actual physical address (place to which one could go), or as a container of "address parts" which should be handled as a unit (such as a city-state-ZIP combination within the US). - - - - - Combination of number, street name, etc. At least one line is required for a valid physical address; empty lines should not be included. - - - - - Name of city, town, etc. - - - - - Identifying abbreviation for US state, Canada province, etc. Format and presence of this field will vary, depending on country. - - - - - Identification of a region (usually small) for mail/package delivery. Format and presence of this field will vary, depending on country. - - - - - Relevant only to addresses in Puerto Rico. - - - - - The two-letter code used to identify a country. - - - - - Indicates whether this address residential (as opposed to commercial). - - - - - - - - Specifies which filing option is being exercised by the customer. - Required for non-document shipments originating in Canada destined for any country other than Canada, the United States, Puerto Rico or the U.S. Virgin Islands. - - - - - - - - - - - - Identification of the type of barcode (symbology) used on FedEx documents and labels. - - - - - - - - - - - - - - - - - - Identification of a FedEx operating company (transportation). - - - - - - - - - - - - - The instructions indicating how to print the Certificate of Origin ( e.g. whether or not to include the instructions, image type, etc ...) - - - - - Specifies characteristics of a shipping document to be produced. - - - - - Specifies the usage and identification of customer supplied images to be used on this document. - - - - - - - - - - - - - Specifies the type of brokerage to be applied to a shipment. - - - - - - - - - - - - Descriptive data for the client submitting a transaction. - - - - - The FedEx account number associated with this transaction. - - - - - This number is assigned by FedEx and identifies the unique device from which the request is originating - - - - - Only used in transactions which require identification of the Fed Ex Office integrator. - - - - - Indicates the region from which the transaction is submitted. - - - - - The language to be used for human-readable Notification.localizedMessages in responses to the request containing this ClientDetail object. Different requests from the same client may contain different Localization data. (Contrast with TransactionDetail.localization, which governs data payload language/translation.) - - - - - - - - - - - - - - - - - - - - - - Identifies the type of funds FedEx should collect upon shipment delivery. - - - - - - - - - - Descriptive data required for a FedEx COD (Collect-On-Delivery) shipment. - - - - - - Specifies the details of the charges are to be added to the COD collect amount. - - - - - Identifies the type of funds FedEx should collect upon package delivery - - - - - For Express this is the descriptive data that is used for the recipient of the FedEx Letter containing the COD payment. For Ground this is the descriptive data for the party to receive the payment that prints the COD receipt. - - - - - Indicates which type of reference information to include on the COD return shipping label. - - - - - - - Indicates which type of reference information to include on the COD return shipping label. - - - - - - - - - - - CommercialInvoice element is required for electronic upload of CI data. It will serve to create/transmit an Electronic Commercial Invoice through the FedEx Systems. Customers are responsible for printing their own Commercial Invoice.If you would likeFedEx to generate a Commercial Invoice and transmit it to Customs. for clearance purposes, you need to specify that in the ShippingDocumentSpecification element. If you would like a copy of the Commercial Invoice that FedEx generated returned to you in reply it needs to be specified in the ETDDetail/RequestedDocumentCopies element. Commercial Invoice support consists of maximum of 99 commodity line items. - - - - - Any comments that need to be communicated about this shipment. - - - - - Any freight charges that are associated with this shipment. - - - - - Any taxes or miscellaneous charges(other than Freight charges or Insurance charges) that are associated with this shipment. - - - - - Specifies which kind of charge is being recorded in the preceding field. - - - - - Any packing costs that are associated with this shipment. - - - - - Any handling costs that are associated with this shipment. - - - - - Free-form text. - - - - - Free-form text. - - - - - Free-form text. - - - - - The reason for the shipment. Note: SOLD is not a valid purpose for a Proforma Invoice. - - - - - Customer assigned Invoice number - - - - - Name of the International Expert that completed the Commercial Invoice different from Sender. - - - - - Required for dutiable international Express or Ground shipment. This field is not applicable to an international PIB(document) or a non-document which does not require a Commercial Invoice - - - - - - - The instructions indicating how to print the Commercial Invoice( e.g. image type) Specifies characteristics of a shipping document to be produced. - - - - - - Specifies the usage and identification of a customer supplied image to be used on this document. - - - - - - - Information about the transit time and delivery commitment date and time. - - - - - The Commodity applicable to this commitment. - - - - - The FedEx service type applicable to this commitment. - - - - - Shows the specific combination of service options combined with the service type that produced this committment in the set returned to the caller. - - - - - Supporting detail for applied options identified in preceding field. - - - - - THe delivery commitment date/time. Express Only. - - - - - The delivery commitment day of the week. - - - - - The number of transit days; applies to Ground and LTL Freight; indicates minimum transit time for SmartPost. - - - - - Maximum number of transit days, for SmartPost shipments. - - - - - The service area code for the destination of this shipment. Express only. - - - - - The address of the broker to be used for this shipment. - - - - - The FedEx location identifier for the broker. - - - - - The delivery commitment date/time the shipment will arrive at the border. - - - - - The delivery commitment day of the week the shipment will arrive at the border. - - - - - The number of days it will take for the shipment to make it from broker to destination - - - - - The delivery commitment date for shipment served by GSP (Global Service Provider) - - - - - The delivery commitment day of the week for the shipment served by GSP (Global Service Provider) - - - - - Messages concerning the ability to provide an accurate delivery commitment on an International commit quote. These could be messages providing information about why a commitment could not be returned or a successful message such as "REQUEST COMPLETED" - - - - - Messages concerning the delivery commitment on an International commit quote such as "0:00 A.M. IF NO CUSTOMS DELAY" - - - - - Information about why a shipment delivery is delayed and at what level (country/service etc.). - - - - - - Required documentation for this shipment. - - - - - Freight origin and destination city center information and total distance between origin and destination city centers. - - - - - - - The type of delay this shipment will encounter. - - - - - - - - - - - - - - - - - - - For international multiple piece shipments, commodity information must be passed in the Master and on each child transaction. - If this shipment cotains more than four commodities line items, the four highest valued should be included in the first 4 occurances for this request. - - - - - - total number of pieces of this commodity - - - - - total number of pieces of this commodity - - - - - Complete and accurate description of this commodity. - - 450 - - - - - - Country code where commodity contents were produced or manufactured in their final form. - - 2 - - - - - - - Unique alpha/numeric representing commodity item. - At least one occurrence is required for US Export shipments if the Customs Value is greater than $2500 or if a valid US Export license is required. - - - 14 - - - - - - Total weight of this commodity. 1 explicit decimal position. Max length 11 including decimal. - - - - - Number of units of a commodity in total number of pieces for this line item. Max length is 9 - - - - - Unit of measure used to express the quantity of this commodity line item. - - 3 - - - - - - Contains only additional quantitative information other than weight and quantity to calculate duties and taxes. - - - - - Value of each unit in Quantity. Six explicit decimal positions, Max length 18 including decimal. - - - - - - Total customs value for this line item. - It should equal the commodity unit quantity times commodity unit value. - Six explicit decimal positions, max length 18 including decimal. - - - - - - Defines additional characteristic of commodity used to calculate duties and taxes - - - - - Applicable to US export shipping only. - - 12 - - - - - - - - An identifying mark or number used on the packaging of a shipment to help customers identify a particular shipment. - - - 15 - - - - - - All data required for this commodity in NAFTA Certificate of Origin. - - - - - - - Defines additional data to print in the Configurable portion of the label, this allows you to print the same type information on the label that can also be printed on the doc tab. - - - - - 1 of 12 possible zones to position data. - - - - - The identifiying text for the data in this zone. - - - - - A reference to a field in either the request or reply to print in this zone following the header. - - - - - A literal value to print after the header in this zone. - - - - - - - The descriptive data for a point-of-contact person. - - - - - Client provided identifier corresponding to this contact information. - - - - - Identifies the contact person's name. - - - - - Identifies the contact person's title. - - - - - Identifies the company this contact is associated with. - - - - - Identifies the phone number associated with this contact. - - - - - Identifies the phone extension associated with this contact. - - - - - Identifies the pager number associated with this contact. - - - - - Identifies the fax number associated with this contact. - - - - - Identifies the email address associated with this contact. - - - - - - - - - - - - - - - - - - - - - Specifies the currency exchange performed on financial amounts for this rate. - - - - - The currency code for the original (converted FROM) currency. - - - - - The currency code for the final (converted INTO) currency. - - - - - Multiplier used to convert fromCurrency units to intoCurrency units. - - - - - - - - - Indicates the type of custom delivery being requested. - - - - - Time by which delivery is requested. - - - - - Range of dates for custom delivery request; only used if type is BETWEEN. - - - - - Date for custom delivery request; only used for types of ON, BETWEEN, or AFTER. - - - - - - - - - - - - - - - Data required to produce a custom-specified document, either at shipment or package level. - - - - - Common information controlling document production. - - - - - Applicable only to documents produced on thermal printers with roll stock. - - - - - Applicable only to documents produced on thermal printers with roll stock. - - - - - Identifies the formatting specification used to construct this custom document. - - - - - - - Constructed string, based on format and zero or more data fields, printed in specified barcode symbology. - - - - - - - - - Width of thinnest bar/space element in the barcode. - - - - - - - - Solid (filled) rectangular area on label. - - - - - - - - - - - - - - - - - - - - - - - - Image to be included from printer's memory, or from a local file for offline clients. - - - - - - Printer-specific index of graphic image to be printed. - - - - - Fully-qualified path and file name for graphic image to be printed. - - - - - - - - - Horizontal position, relative to left edge of custom area. - - - - - Vertical position, relative to top edge of custom area. - - - - - - - Constructed string, based on format and zero or more data fields, printed in specified printer font (for thermal labels) or generic font/size (for plain paper labels). - - - - - - - - Printer-specific font name for use with thermal printer labels. - - - - - Generic font name for use with plain paper labels. - - - - - Generic font size for use with plain paper labels. - - - - - - - - - - - - - - - - - - - Reference information to be associated with this package. - - - - - - - - - - - - - - - - - - - - - - - Allows customer-specified control of label content. - - - - - If omitted, no doc tab will be produced (i.e. default = former NONE type). - - - - - Defines any custom content to print on the label. - - - - - Defines additional data to print in the Configurable portion of the label, this allows you to print the same type information on the label that can also be printed on the doc tab. - - - - - Controls which data/sections will be suppressed. - - - - - For customers producing their own Ground labels, this field specifies which secondary barcode will be printed on the label; so that the primary barcode produced by FedEx has the corect SCNC. - - - - - The language to use when printing the terms and conditions on the label. - - - - - Controls the number of additional copies of supplemental labels. - - - - - This value reduces the default quantity of destination/consignee air waybill labels. A value of zero indicates no change to default. A minimum of one copy will always be produced. - - - - - - - - - - Descriptive data identifying the Broker responsible for the shipmet. - Required if BROKER_SELECT_OPTION is requested in Special Services. - - - - - - Interacts both with properties of the shipment and contractual relationship with the shipper. - - - - - - Applicable only for Commercial Invoice. If the consignee and importer are not the same, the Following importer fields are required. - Importer/Contact/PersonName - Importer/Contact/CompanyName - Importer/Contact/PhoneNumber - Importer/Address/StreetLine[0] - Importer/Address/City - Importer/Address/StateOrProvinceCode - if Importer Country Code is US or CA - Importer/Address/PostalCode - if Importer Country Code is US or CA - Importer/Address/CountryCode - - - - - - Specifies how the recipient is identified for customs purposes; the requirements on this information vary with destination country. - - - - - Indicates how payment of duties for the shipment will be made. - - - - - Indicates whether this shipment contains documents only or non-documents. - - - - - The total customs value for the shipment. This total will rrepresent th esum of the values of all commodities, and may include freight, miscellaneous, and insurance charges. Must contain 2 explicit decimal positions with a max length of 17 including the decimal. For Express International MPS, the Total Customs Value is in the master transaction and all child transactions - - - - - Identifies responsibilities with respect to loss, damage, etc. - - - - - Documents amount paid to third party for coverage of shipment content. - - - - - - CommercialInvoice element is required for electronic upload of CI data. It will serve to create/transmit an Electronic Commercial Invoice through FedEx System. Customers are responsible for printing their own Commercial Invoice. Commercial Invoice support consists of a maximum of 20 commodity line items. - - - - - - For international multiple piece shipments, commodity information must be passed in the Master and on each child transaction. - If this shipment cotains more than four commodities line items, the four highest valued should be included in the first 4 occurances for this request. - - - - - - Country specific details of an International shipment. - - - - - FOOD_OR_PERISHABLE is required by FDA/BTA; must be true for food/perishable items coming to US or PR from non-US/non-PR origin. - - - - - - - Identifies whether or not the products being shipped are required to be accessible during delivery. - - - - - - - - - The descriptive data required for a FedEx shipment containing dangerous goods (hazardous materials). - - - - - Identifies whether or not the products being shipped are required to be accessible during delivery. - - - - - Shipment is packaged/documented for movement ONLY on cargo aircraft. - - - - - Indicates which kinds of hazardous content are in the current package. - - - - - Documents the kinds and quantities of all hazardous commodities in the current package. - - - - - Description of the packaging of this commodity, suitable for use on OP-900 and OP-950 forms. - - - - - Telephone number to use for contact in the event of an emergency. - - - - - Offeror's name or contract number, per DOT regulation. - - - - - - - - - - - - - - - - - - - - - - - - Information about why a shipment delivery is delayed and at what level( country/service etc.). - - - - - The date of the delay - - - - - - The attribute of the shipment that caused the delay(e.g. Country, City, LocationId, Zip, service area, special handling ) - - - - - The point where the delay is occurring (e.g. Origin, Destination, Broker location) - - - - - The reason for the delay (e.g. holiday, weekend, etc.). - - - - - The name of the holiday in that country that is causing the delay. - - - - - - - The attribute of the shipment that caused the delay(e.g. Country, City, LocationId, Zip, service area, special handling ) - - - - - - - - - - - - - - The point where the delay is occurring ( e.g. Origin, Destination, Broker location). - - - - - - - - - - - - Data required to complete the Destionation Control Statement for US exports. - - - - - - Comma-separated list of up to four country codes, required for DEPARTMENT_OF_STATE statement. - - - - - Name of end user, required for DEPARTMENT_OF_STATE statement. - - - - - - - Used to indicate whether the Destination Control Statement is of type Department of Commerce, Department of State or both. - - - - - - - - - The dimensions of this package and the unit type used for the measurements. - - - - - - - - - - - Driving or other transportation distances, distinct from dimension measurements. - - - - - Identifies the distance quantity. - - - - - Identifies the unit of measure for the distance value. - - - - - - - - - - - - - - - The DocTabContentType options available. - - - - - The DocTabContentType should be set to ZONE001 to specify additional Zone details. - - - - - The DocTabContentType should be set to BARCODED to specify additional BarCoded details. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Zone number can be between 1 and 12. - - - - - Header value on this zone. - - - - - Reference path to the element in the request/reply whose value should be printed on this zone. - - - - - Free form-text to be printed in this zone. - - - - - Justification for the text printed on this zone. - - - - - - - Identifies the method by which the package is to be tendered to FedEx. This element does not dispatch a courier for package pickup. - - - - - - - - - - - - Specific information about the delivery of the email and options for the shipment. - - - - - Email address to send the URL to. - - - - - A message to be inserted into the email. - - - - - - - Information describing email notifications that will be sent in relation to events that occur during package movement - - - - - A message that will be included in the email notifications - - - - - Information describing the destination of the email, format of the email and events to be notified on - - - - - - - - - - - - - - - The format of the email - - - - - - - - - - The descriptive data for a FedEx email notification recipient. - - - - - Identifies the relationship this email recipient has to the shipment. - - - - - The email address to send the notification to - - - - - The types of email notifications being requested for this recipient. - - - - - The format of the email notification. - - - - - The language/locale to be used in this email notification. - - - - - - - Identifies the set of valid email notification recipient types. For SHIPPER, RECIPIENT and BROKER the email address asssociated with their definitions will be used, any email address sent with the email notification for these three email notification recipient types will be ignored. - - - - - - - - - - - - - - - - - - - - Customer-declared value, with data type and legal values depending on excise condition, used in defining the taxable value of the item. - - - - - - - Specifies the types of Estimated Duties and Taxes to be included in a rate quotation for an international shipment. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Electronic Trade document references used with the ETD special service. - - - - - Indicates the types of shipping documents produced for the shipper by FedEx (see ShippingDocumentSpecification) which should be copied back to the shipper in the shipment result data. - - - - - Currently not supported. - - - - - - - - Country specific details of an International shipment. - - - - - - Specifies which filing option is being exercised by the customer. - Required for non-document shipments originating in Canada destined for any country other than Canada, the United States, Puerto Rico or the U.S. Virgin Islands. - - - - - - General field for exporting-country-specific export data (e.g. B13A for CA, FTSR Exemption or AES Citation for US). - - - - - This field is applicable only to Canada export non-document shipments of any value to any destination. No special characters allowed. - - 10 - - - - - - Department of Commerce/Department of State information about this shipment. - - - - - - - Details specific to an Express freight shipment. - - - - - Indicates whether or nor a packing list is enclosed. - - - - - - Total shipment pieces. - ie. 3 boxes and 3 pallets of 100 pieces each = Shippers Load and Count of 303. - Applicable to International Priority Freight and International Economy Freight. - Values must be in the range of 1 - 99999 - - - - - - Required for International Freight shipping. Values must be 8- 12 characters in length. - - 12 - - - - - - Currently not supported. - - - - - Currently not supported. - - - - - Currently not supported. - - - - - - - Currently not supported. Delivery contact information for an Express freight shipment. - - - - - - - - - Indicates a FedEx Express operating region. - - - - - - - - - - - - Identifies a kind of FedEx facility. - - - - - - - - - - Specifies the optional features/characteristics requested for a Freight shipment utilizing a flatbed trailer. - - - - - - - - - - - - - - - - - - - - Individual charge which contributes to the total base charge for the shipment. - - - - - Freight class for this line item. - - - - - Effective freight class used for rating this line item. - - - - - NMFC Code for commodity. - - - - - Customer-provided description for this commodity or class line. - - - - - Weight for this commodity or class line. - - - - - Rate or factor applied to this line item. - - - - - Identifies the manner in which the chargeRate for this line item was applied. - - - - - The net or extended charge for this line item. - - - - - - - Specifies the way in which base charges for a Freight shipment or shipment leg are calculated. - - - - - - - - - - - - - - - - These values represent the industry-standard freight classes used for FedEx Freight and FedEx National Freight shipment description. (Note: The alphabetic prefixes are required to distinguish these values from decimal numbers on some client platforms.) - - - - - - - - - - - - - - - - - - - - - - - - - Information about the Freight Service Centers associated with this shipment. - - - - - Information about the origin Freight Service Center. - - - - - Information about the destination Freight Service Center. - - - - - The distance between the origin and destination FreightService Centers - - - - - - - - - - Date for all Freight guarantee types. - - - - - - - - - - - - - Identifies responsibilities with respect to loss, damage, etc. - - - - - - - - - Rate data specific to FedEx Freight or FedEx National Freight services. - - - - - A unique identifier for a specific rate quotation. - - - - - Specifies how total base charge is determined. - - - - - Freight charges which accumulate to the total base charge for the shipment. - - - - - Human-readable descriptions of additional information on this shipment rating. - - - - - - - Additional non-monetary data returned with Freight rates. - - - - - Unique identifier for notation. - - - - - Human-readable explanation of notation. - - - - - - - This class describes the relationship between a customer-specified address and the FedEx Freight / FedEx National Freight Service Center that supports that address. - - - - - Freight Industry standard non-FedEx carrier identification - - - - - The name of the Interline carrier. - - - - - Additional time it might take at the origin or destination to pickup or deliver the freight. This is usually due to the remoteness of the location. This time is included in the total transit time. - - - - - Service branding which may be used for local pickup or delivery, distinct from service used for line-haul of customer's shipment. - - - - - Distance between customer address (pickup or delivery) and the supporting Freight / National Freight service center. - - - - - Time to travel between customer address (pickup or delivery) and the supporting Freight / National Freight service center. - - - - - Specifies when/how the customer can arrange for pickup or delivery. - - - - - Specifies days of operation if localServiceScheduling is LIMITED. - - - - - Freight service center that is a gateway on the border of Canada or Mexico. - - - - - Alphabetical code identifying a Freight Service Center - - - - - Freight service center Contact and Address - - - - - - - Specifies the type of service scheduling offered from a Freight or National Freight Service Center to a customer-supplied address. - - - - - - - - - - Data applicable to shipments using FEDEX_FREIGHT and FEDEX_NATIONAL_FREIGHT services. - - - - - Account number used with FEDEX_FREIGHT service. - - - - - Used for validating FedEx Freight account number and (optionally) identifying third party payment on the bill of lading. - - - - - Account number used with FEDEX_NATIONAL_FREIGHT service. - - - - - Used for validating FedEx National Freight account number and (optionally) identifying third party payment on the bill of lading. - - - - - Indicates the role of the party submitting the transaction. - - - - - Designates which of the requester's tariffs will be used for rating. - - - - - Identifies the declared value for the shipment - - - - - Identifies the declared value units corresponding to the above defined declared value - - - - - - Identifiers for promotional discounts offered to customers. - - - - - Total number of individual handling units in the entire shipment (for unit pricing). - - - - - Estimated discount rate provided by client for unsecured rate quote. - - - - - Total weight of pallets used in shipment. - - - - - Overall shipment dimensions. - - - - - Description for the shipment. - - - - - Specifies which party will pay surcharges for any special services which support split billing. - - - - - Details of the commodities in the shipment. - - - - - - - Description of an individual commodity or class of content in a shipment. - - - - - Freight class for this line item. - - - - - Specification of handling-unit packaging for this commodity or class line. - - - - - Customer-provided description for this commodity or class line. - - - - - Weight for this commodity or class line. - - - - - FED EX INTERNAL USE ONLY - Individual line item dimensions. - - - - - Volume (cubic measure) for this commodity or class line. - - - - - - - Indicates the role of the party submitting the transaction. - - - - - - - - - - Specifies which party will be responsible for payment of any surcharges for Freight special services for which split billing is allowed. - - - - - Identifies the special service. - - - - - Indicates who will pay for the special service. - - - - - - - Data required to produce a General Agency Agreement document. Remaining content (business data) to be defined once requirements have been completed. - - - - - - - - Documents the kind and quantity of an individual hazardous commodity in a package. - - - - - Identifies and describes an individual hazardous commodity. - - - - - Specifies the amount of the commodity in alternate units. - - - - - Customer-provided specifications for handling individual commodities. - - - - - - - Identifies and describes an individual hazardous commodity. For 201001 load, this is based on data from the FedEx Ground Hazardous Materials Shipping Guide. - - - - - Regulatory identifier for a commodity (e.g. "UN ID" value). - - - - - - - - - - - - - Specifies how the commodity is to be labeled. - - - - - - - - - - Customer-provided specifications for handling individual commodities. - - - - - Specifies how the customer wishes the label text to be handled for this commodity in this package. - - - - - Text used in labeling the commodity under control of the labelTextOption field. - - - - - - - Indicates which kind of hazardous content (as defined by DOT) is being reported. - - - - - - - - - - - - Identifies number and type of packaging units for hazardous commodities. - - - - - Number of units of the type below. - - - - - Units in which the hazardous commodity is packaged. - - - - - - - Identifies DOT packing group for a hazardous commodity. - - - - - - - - - - Identifies amount and units for quantity of hazardous commodities. - - - - - Number of units of the type below. - - - - - Units by which the hazardous commodity is measured. - - - - - - - Descriptive data required for a FedEx shipment that is to be held at the destination FedEx location for pickup by the recipient. - - - - - Contact phone number for recipient of shipment. - - - - - Contact and address of FedEx facility at which shipment is to be held. - - - - - Type of facility at which package/shipment is to be held. - - - - - Location identification (for facilities identified by an alphanumeric location code). - - - - - Location identification (for facilities identified by an numeric location code). - - - - - - - The descriptive data required by FedEx for home delivery services. - - - - - - Required for Date Certain Home Delivery. - - - - - Required for Date Certain and Appointment Home Delivery. - - 15 - - - - - - - - - - - - - - - - - - - - - - - - The type of International shipment. - - - - - - - - - Specifies the type of label to be returned. - - - - - - - - - - - - - Names for data elements / areas which may be suppressed from printing on labels. - - - - - - - - - - - - - - - - - This indicates if the top or bottom of the label comes out of the printer first. - - - - - - - - - Relative to normal orientation for the printer. - - - - - - - - - - - Description of shipping label to be returned in the reply - - - - - Specify type of label to be returned - - - - - - The type of image or printer commands the label is to be formatted in. - DPL = Unimark thermal printer language - EPL2 = Eltron thermal printer language - PDF = a label returned as a pdf image - PNG = a label returned as a png image - ZPLII = Zebra thermal printer language - - - - - - For thermal printer lables this indicates the size of the label and the location of the doc tab if present. - - - - - This indicates if the top or bottom of the label comes out of the printer first. - - - - - Relative to normal orientation for the printer. RIGHT=90 degrees clockwise, UPSIDE_DOWN=180 degrees, LEFT=90 degrees counterclockwise. - - - - - If present, this contact and address information will replace the return address information on the label. - - - - - Allows customer-specified control of label content. - - - - - - - For thermal printer labels this indicates the size of the label and the location of the doc tab if present. - - - - - - - - - - - - - - - - - - - - - - Identifies the Liability Coverage Amount. For Jan 2010 this value represents coverage amount per pound - - - - - - - - - - - - - Represents a one-dimensional measurement in small units (e.g. suitable for measuring a package or document), contrasted with Distance, which represents a large one-dimensional measurement (e.g. distance between cities). - - - - - The numerical quantity of this measurement. - - - - - The units for this measurement. - - - - - - - CM = centimeters, IN = inches - - - - - - - - - Identifies the representation of human-readable text. - - - - - Two-letter code for language (e.g. EN, FR, etc.) - - - - - Two-letter code for the region (e.g. us, ca, etc..). - - - - - - - - - - - - - Internal FedEx use only. - - - - - - - - - - - - - - - - - - Data required to produce a Certificate of Origin document. Remaining content (business data) to be defined once requirements have been completed. - - - - - - - Indicates which Party (if any) from the shipment is to be used as the source of importer data on the NAFTA COO form. - - - - - Contact information for "Authorized Signature" area of form. - - - - - - - - - - - - Defined by NAFTA regulations. - - - - - Defined by NAFTA regulations. - - - - - Identification of which producer is associated with this commodity (if multiple producers are used in a single shipment). - - - - - - Date range over which RVC net cost was calculated. - - - - - - - - - - - - - - - - Net cost method used. - - - - - - - - - - See instructions for NAFTA Certificate of Origin for code definitions. - - - - - - - - - - - - - - - - - - - See instructions for NAFTA Certificate of Origin for code definitions. - - - - - - - - - - - - - - - - - - - - The descriptive data regarding the result of the submitted transaction. - - - - - The severity of this notification. This can indicate success or failure or some other information about the request. The values that can be returned are SUCCESS - Your transaction succeeded with no other applicable information. NOTE - Additional information that may be of interest to you about your transaction. WARNING - Additional information that you need to know about your transaction that you may need to take action on. ERROR - Information about an error that occurred while processing your transaction. FAILURE - FedEx was unable to process your transaction at this time due to a system failure. Please try again later - - - - - Indicates the source of this notification. Combined with the Code it uniquely identifies this notification - - - - - A code that represents this notification. Combined with the Source it uniquely identifies this notification. - - - - - Human-readable text that explains this notification. - - - - - The translated message. The language and locale specified in the ClientDetail. Localization are used to determine the representation. Currently only supported in a TrackReply. - - - - - A collection of name/value pairs that provide specific data to help the client determine the nature of an error (or warning, etc.) witout having to parse the message string. - - - - - - - - - Identifies the type of data contained in Value (e.g. SERVICE_TYPE, PACKAGE_SEQUENCE, etc..). - - - - - The value of the parameter (e.g. PRIORITY_OVERNIGHT, 2, etc..). - - - - - - - Identifies the set of severity values for a Notification. - - - - - - - - - - - - The instructions indicating how to print the OP-900 form for hazardous materials packages. - - - - - Specifies characteristics of a shipping document to be produced. - - - - - Identifies which reference type (from the package's customer references) is to be used as the source for the reference on this OP-900. - - - - - Specifies the usage and identification of customer supplied images to be used on this document. - - - - - Data field to be used when a name is to be printed in the document instead of (or in addition to) a signature image. - - - - - - - The Oversize classification for a package. - - - - - - - - - - Data for a package's rates, as calculated per a specific rate type. - - - - - Type used for this specific set of rate data. - - - - - Indicates which weight was used. - - - - - INTERNAL FEDEX USE ONLY. - - - - - The weight that was used to calculate the rate. - - - - - The dimensional weight of this package (if greater than actual). - - - - - The oversize weight of this package (if the package is oversize). - - - - - The transportation charge only (prior to any discounts applied) for this package. - - - - - The sum of all discounts on this package. - - - - - This package's baseCharge - totalFreightDiscounts. - - - - - The sum of all surcharges on this package. - - - - - This package's netFreight + totalSurcharges (not including totalTaxes). - - - - - The sum of all taxes on this package. - - - - - This package's netFreight + totalSurcharges + totalTaxes. - - - - - The total sum of all rebates applied to this package. - - - - - All rate discounts that apply to this package. - - - - - All rebates that apply to this package. - - - - - All surcharges that apply to this package (either because of characteristics of the package itself, or because it is carrying per-shipment surcharges for the shipment of which it is a part). - - - - - All taxes applicable (or distributed to) this package. - - - - - The variable handling charges calculated based on the type variable handling charges requested. - - - - - - - Identifies the collection of special services offered by FedEx. - - - - - - - - - - - - - - - These special services are available at the package level for some or all service types. If the shipper is requesting a special service which requires additional data, the package special service type must be present in the specialServiceTypes collection, and the supporting detail must be provided in the appropriate sub-object below. - - - - - The types of all special services requested for the enclosing shipment or package. - - - - - For use with FedEx Ground services only; COD must be present in shipment's special services. - - - - - Descriptive data required for a FedEx shipment containing dangerous materials. This element is required when SpecialServiceType.DANGEROUS_GOODS or HAZARDOUS_MATERIAL is present in the SpecialServiceTypes collection. - - - - - Descriptive data required for a FedEx shipment containing dry ice. This element is required when SpecialServiceType.DRY_ICE is present in the SpecialServiceTypes collection. - - - - - The descriptive data required for FedEx signature services. This element is required when SpecialServiceType.SIGNATURE_OPTION is present in the SpecialServiceTypes collection. - - - - - To be filled. - - - - - - - Identifies the packaging used by the requestor for the package. See PackagingType for list of valid enumerated values. - - - - - - - - - - - - - - The descriptive data for a person or company entitiy doing business with FedEx. - - - - - Identifies the FedEx account number assigned to the customer. - - 12 - - - - - - Descriptive data for taxpayer identification information. - - - - - Descriptive data identifying the point-of-contact person. - - - - - The descriptive data for a physical location. - - - - - - - The descriptive data for the monetary compensation given to FedEx for services rendered to the customer. - - - - - Identifies the method of payment for a service. See PaymentType for list of valid enumerated values. - - - - - Descriptive data identifying the party responsible for payment for a service. - - - - - - - Identifies the method of payment for a service. - - - - - - - - Descriptive data identifying the party responsible for payment for a service. - - - - - Identifies the FedEx account number assigned to the payor. - - 12 - - - - - - Identifies the country of the payor. - - - - - - - This information describes the kind of pending shipment being requested. - - - - - - Date after which the pending shipment will no longer be available for completion. - - - - - Only used with type of EMAIL. - - - - - - - - - - - - This enumeration rationalizes the former FedEx Express international "admissibility package" types (based on ANSI X.12) and the FedEx Freight packaging types. The values represented are those common to both carriers. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This class describes the pickup characteristics of a shipment (e.g. for use in a tag request). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Currently not supported. - - - - - - - - - - - - - - - - - - Indicates the reason that a dim divisor value was chose. - - - - - - - - - - - - Identifies a discount applied to the shipment. - - - - - Identifies the type of discount applied to the shipment. - - - - - - The amount of the discount applied to the shipment. - - - - - The percentage of the discount applied to the shipment. - - - - - - - Identifies the type of discount applied to the shipment. - - - - - - - - - - - - Selects the value from a set of rate data to which the percentage is applied. - - - - - - - - - - - The response to a RateRequest. The Notifications indicate whether the request was successful or not. - - - - - This indicates the highest level of severity of all the notifications returned in this reply. - - - - - The descriptive data regarding the results of the submitted transaction. - - - - - Contains the CustomerTransactionId that was sent in the request. - - - - - The version of this reply. - - - - - Each element contains all rate data for a single service. If service was specified in the request, there will be a single entry in this array; if service was omitted in the request, there will be a separate entry in this array for each service being compared. - - - - - - - - - Identifies the FedEx service to use in shipping the package. See ServiceType for list of valid enumerated values. - - - - - Identifies the packaging used by the requestor for the package. See PackagingType for list of valid enumerated values. - - - - - Shows the specific combination of service options combined with the service type that produced this committment in the set returned to the caller. - - - - - Supporting detail for applied options identified in preceding field. - - - - - - - - - Identification of an airport, using standard three-letter abbreviations. - - - - - Indicates whether or not this shipment is eligible for a money back guarantee. - - - - - Commitment code for the origin. - - - - - Commitment code for the destination. - - - - - Time in transit from pickup to delivery. - - - - - Maximum expected transit time - - - - - The signature option for this package. - - - - - The actual rate type of the charges for this package. - - - - - Each element contains all rate data for a single rate type. - - - - - - - Descriptive data sent to FedEx by a customer in order to rate a package/shipment. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Allows the caller to specify that the transit time and commit data are to be returned in the reply. - - - - - Candidate carriers for rate-shopping use case. This field is only considered if requestedShipment/serviceType is omitted. - - - - - Contains zero or more service options whose combinations are to be considered when replying with available services. - - - - - The shipment for which a rate quote (or rate-shopping comparison) is desired. - - - - - - - Indicates the type of rates to be returned. - - - - - - - - - Select the type of rate from which the element is to be selected. - - - - - - - - - If requesting rates using the PackageDetails element (one package at a time) in the request, the rates for each package will be returned in this element. Currently total piece total weight rates are also retuned in this element. - - - - - Echoed from the corresponding package in the rate request (if provided). - - - - - Used with request containing PACKAGE_GROUPS, to identify which group of identical packages was used to produce a reply item. - - - - - The difference between "list" and "account" net charge. - - - - - Ground COD is shipment level. - - - - - - Rate data that are tied to a specific package and rate type combination. - - - - - - - This class groups the shipment and package rating data for a specific rate type for use in a rating reply, which groups result data by rate type. - - - - - The difference between "list" and "account" total net charge. - - - - - Express COD is shipment level. - - - - - The shipment-level totals for this rate type. - - - - - The package-level data for this rate type. - - - - - - - The method used to calculate the weight to be used in rating the package.. - - - - - - - - - - - - - - - - - - - Identifies a discount applied to the shipment. - - - - - - - The amount of the discount applied to the shipment. - - - - - The percentage of the discount applied to the shipment. - - - - - - - Identifies the type of discount applied to the shipment. - - - - - - - - - - Specifies how the recipient is identified for customs purposes; the requirements on this information vary with destination country. - - - - - Specifies the kind of identification being used. - - - - - Contains the actual ID value, of the type specified above. - - - - - - - Type of Brazilian taxpayer identifier provided in Recipient/TaxPayerIdentification/Number. For shipments bound for Brazil this overrides the value in Recipient/TaxPayerIdentification/TinType - - - - - - - - - - FOOD_OR_PERISHABLE is required by FDA/BTA; must be true for food/perishable items coming to US or PR from non-US/non-PR origin - - - - - - - - - - This class rationalizes RequestedPackage and RequestedPackageSummary from previous interfaces. The way in which it is uses within a RequestedShipment depends on the RequestedPackageDetailType value specified for that shipment. - - - - - Used only with INDIVIDUAL_PACKAGE, as a unique identifier of each requested package. - - - - - Used only with PACKAGE_GROUPS, as a unique identifier of each group of identical packages. - - - - - Used only with PACKAGE_GROUPS, as a count of packages within a group of identical packages. - - - - - - Only used for INDIVIDUAL_PACKAGES and PACKAGE_GROUPS. Ignored for PACKAGE_SUMMARY, in which case totalInsuredValue and packageCount on the shipment will be used to determine this value. - - - - - Only used for INDIVIDUAL_PACKAGES and PACKAGE_GROUPS. Ignored for PACKAGE_SUMMARY, in which case totalweight and packageCount on the shipment will be used to determine this value. - - - - - - Provides additional detail on how the customer has physically packaged this item. As of June 2009, required for packages moving under international and SmartPost services. - - - - - Human-readable text describing the package. - - - - - - - Only used for INDIVIDUAL_PACKAGES and PACKAGE_GROUPS. - - - - - - - The descriptive data for the shipment being tendered to FedEx. - - - - - Identifies the date and time the package is tendered to FedEx. Both the date and time portions of the string are expected to be used. The date should not be a past date or a date more than 10 days in the future. The time is the local time of the shipment based on the shipper's time zone. The date component must be in the format: YYYY-MM-DD (e.g. 2006-06-26). The time component must be in the format: HH:MM:SS using a 24 hour clock (e.g. 11:00 a.m. is 11:00:00, whereas 5:00 p.m. is 17:00:00). The date and time parts are separated by the letter T (e.g. 2006-06-26T17:00:00). There is also a UTC offset component indicating the number of hours/mainutes from UTC (e.g 2006-06-26T17:00:00-0400 is defined form June 26, 2006 5:00 pm Eastern Time). - - - - - Identifies the method by which the package is to be tendered to FedEx. This element does not dispatch a courier for package pickup. See DropoffType for list of valid enumerated values. - - - - - Identifies the FedEx service to use in shipping the package. See ServiceType for list of valid enumerated values. - - - - - Identifies the packaging used by the requestor for the package. See PackagingType for list of valid enumerated values. - - - - - Identifies the total weight of the shipment being conveyed to FedEx.This is only applicable to International shipments and should only be used on the first package of a mutiple piece shipment.This value contains 1 explicit decimal position - - - - - Total insured amount. - - - - - Descriptive data identifying the party responsible for shipping the package. Shipper and Origin should have the same address. - - - - - Descriptive data identifying the party receiving the package. - - - - - A unique identifier for a recipient location - - 10 - - - - - - Physical starting address for the shipment, if different from shipper's address. - - - - - Descriptive data indicating the method and means of payment to FedEx for providing shipping services. - - - - - Descriptive data regarding special services requested by the shipper for this shipment. If the shipper is requesting a special service which requires additional data (e.g. COD), the special service type must be present in the specialServiceTypes collection, and the supporting detail must be provided in the appropriate sub-object. For example, to request COD, "COD" must be included in the SpecialServiceTypes collection and the CodDetail object must contain the required data. - - - - - Details specific to an Express freight shipment. - - - - - Data applicable to shipments using FEDEX_FREIGHT and FEDEX_NATIONAL_FREIGHT services. - - - - - Used with Ground Home Delivery and Freight. - - - - - Details about how to calculate variable handling charges at the shipment level. - - - - - Customs clearance data, used for both international and intra-country shipping. - - - - - For use in "process tag" transaction. - - - - - Specifies the characteristics of a shipment pertaining to SmartPost services. - - - - - If true, only the shipper/payor will have visibility of this shipment. - - - - - Details about the image format and printer type the label is to returned in. - - - - - Contains data used to create additional (non-label) shipping documents. - - - - - Specifies whether and what kind of rates the customer wishes to have quoted on this shipment. The reply will also be constrained by other data on the shipment and customer. - - - - - Specifies whether the customer wishes to have Estimated Duties and Taxes provided with the rate quotation on this shipment. Only applies with shipments moving under international services. - - - - - The total number of packages in the entire shipment (even when the shipment spans multiple transactions.) - - - - - Specifies which package-level data values are provided at the shipment-level only. The package-level data values types specified here will not be provided at the package-level. - - - - - One or more package-attribute descriptions, each of which describes an individual package, a group of identical packages, or (for the total-piece-total-weight case) common characteristics all packages in the shipment. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - These values are used to control the availability of certain special services at the time when a customer uses the e-mail label link to create a return shipment. - - - - - - - - - - - - Identifies the allowed (merchant-authorized) special services which may be selected when the subsequent shipment is created. Only services represented in EMailLabelAllowedSpecialServiceType will be controlled by this list. - - - - - - - Information relating to a return shipment. - - - - - The type of return shipment that is being requested. At present the only type of retrun shipment that is supported is PRINT_RETURN_LABEL. With this option you can print a return label to insert into the box of an outbound shipment. This option can not be used to print an outbound label. - - - - - Return Merchant Authorization - - - - - Specific information about the delivery of the email and options for the shipment. - - - - - - - The type of return shipment that is being requested. - - - - - - - - - - The "PAYOR..." rates are expressed in the currency identified in the payor's rate table(s). The "RATED..." rates are expressed in the currency of the origin country. Former "...COUNTER..." values have become "...RETAIL..." values, except for PAYOR_COUNTER and RATED_COUNTER, which have been removed. - - - - - - - - - - - - - - - Return Merchant Authorization - - - - - Return Merchant Authorization Number - - 20 - - - - - - The reason for the return. - - 60 - - - - - - - - - - - - - - - - These values control the optional features of service that may be combined in a commitment/rate comparision transaction. - - - - - - - - - - - Supporting detail for applied options identified in a rate quote. - - - - - Identifies the type of Freight Guarantee applied, if FREIGHT_GUARANTEE is applied to the rate quote. - - - - - Identifies the smartPostHubId used during rate quote, if SMART_POST_HUB_ID is a variable option on the rate request. - - - - - Identifies the indicia used during rate quote, if SMART_POST_ALLOWED_INDICIA is a variable option on the rate request. - - - - - - - Identifies the FedEx service to use in shipping the package. See ServiceType for list of valid enumerated values. - - - - - - - - - - - - - - - - - - - - - - - - - - - - Shipment-level totals of dry ice data across all packages. - - - - - Total number of packages in the shipment that contain dry ice. - - - - - Total shipment dry ice weight for all packages. - - - - - - - Data for a single leg of a shipment's total/summary rates, as calculated per a specific rate type. - - - - - Human-readable text describing the shipment leg. - - - - - Origin for this leg. - - - - - Destination for this leg. - - - - - Type used for this specific set of rate data. - - - - - Indicates the rate scale used. - - - - - Indicates the rate zone used (based on origin and destination). - - - - - - Indicates which weight was used. - - - - - INTERNAL FEDEX USE ONLY. - - - - - Specifies the currency exchange performed on financial amounts for this rate. - - - - - Indicates which special rating cases applied to this shipment. - - - - - - Identifies the type of dim divisor that was applied. - - - - - - - Sum of dimensional weights for all packages. - - - - - - - - - This shipment's totalNetFreight + totalSurcharges (not including totalTaxes). - - - - - Total of the transportation-based taxes. - - - - - - - Total of all values under this shipment's dutiesAndTaxes; only provided if estimated duties and taxes were calculated for this shipment. - - - - - This shipment's totalNetCharge + totalDutiesAndTaxes; only provided if estimated duties and taxes were calculated for this shipment AND duties, taxes and transportation charges are all paid by the same sender's account. - - - - - Rate data specific to FedEx Freight and FedEx National Freight services. - - - - - All rate discounts that apply to this shipment. - - - - - All rebates that apply to this shipment. - - - - - All surcharges that apply to this shipment. - - - - - All transportation-based taxes applicable to this shipment. - - - - - All commodity-based duties and taxes applicable to this shipment. - - - - - The "order level" variable handling charges. - - - - - The total of all variable handling charges at both shipment (order) and package level. - - - - - - - These values identify which package-level data values will be provided at the shipment-level. - - - - - - - - - - Data for a shipment's total/summary rates, as calculated per a specific rate type. The "total..." fields may differ from the sum of corresponding package data for Multiweight or Express MPS. - - - - - Type used for this specific set of rate data. - - - - - Indicates the rate scale used. - - - - - Indicates the rate zone used (based on origin and destination). - - - - - Indicates the type of pricing used for this shipment. - - - - - Indicates which weight was used. - - - - - INTERNAL FEDEX USE ONLY. - - - - - Specifies the currency exchange performed on financial amounts for this rate. - - - - - Indicates which special rating cases applied to this shipment. - - - - - The value used to calculate the weight based on the dimensions. - - - - - Identifies the type of dim divisor that was applied. - - - - - - The weight used to calculate these rates. - - - - - Sum of dimensional weights for all packages. - - - - - - The total discounts used in the rate calculation. - - - - - The freight charge minus discounts. - - - - - The total amount of all surcharges applied to this shipment. - - - - - This shipment's totalNetFreight + totalSurcharges (not including totalTaxes). - - - - - Total of the transportation-based taxes. - - - - - The net charge after applying all discounts and surcharges. - - - - - The total sum of all rebates applied to this shipment. - - - - - Total of all values under this shipment's dutiesAndTaxes; only provided if estimated duties and taxes were calculated for this shipment. - - - - - This shipment's totalNetCharge + totalDutiesAndTaxes; only provided if estimated duties and taxes were calculated for this shipment AND duties, taxes and transportation charges are all paid by the same sender's account. - - - - - Identifies the Rate Details per each leg in a Freight Shipment - - - - - Rate data specific to FedEx Freight and FedEx National Freight services. - - - - - All rate discounts that apply to this shipment. - - - - - All rebates that apply to this shipment. - - - - - All surcharges that apply to this shipment. - - - - - All transportation-based taxes applicable to this shipment. - - - - - All commodity-based duties and taxes applicable to this shipment. - - - - - The "order level" variable handling charges. - - - - - The total of all variable handling charges at both shipment (order) and package level. - - - - - - - Identifies the collection of special service offered by FedEx. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - These special services are available at the shipment level for some or all service types. If the shipper is requesting a special service which requires additional data (such as the COD amount), the shipment special service type must be present in the specialServiceTypes collection, and the supporting detail must be provided in the appropriate sub-object below. - - - - - The types of all special services requested for the enclosing shipment (or other shipment-level transaction). - - - - - Descriptive data required for a FedEx COD (Collect-On-Delivery) shipment. This element is required when SpecialServiceType.COD is present in the SpecialServiceTypes collection. - - - - - Descriptive data required for a FedEx shipment that is to be held at the destination FedEx location for pickup by the recipient. This element is required when SpecialServiceType.HOLD_AT_LOCATION is present in the SpecialServiceTypes collection. - - - - - Descriptive data required for FedEx to provide email notification to the customer regarding the shipment. This element is required when SpecialServiceType.EMAIL_NOTIFICATION is present in the SpecialServiceTypes collection. - - - - - The descriptive data required for FedEx Printed Return Label. This element is required when SpecialServiceType.PRINTED_RETURN_LABEL is present in the SpecialServiceTypes collection - - - - - This field should be populated for pending shipments (e.g. e-mail label) It is required by a PENDING_SHIPMENT special service type. - - - - - The number of packages with dry ice and the total weight of the dry ice. - - - - - The descriptive data required for FedEx Home Delivery options. This element is required when SpecialServiceType.HOME_DELIVERY_PREMIUM is present in the SpecialServiceTypes collection - - - - - - - Electronic Trade document references. - - - - - Specification for date or range of dates on which delivery is to be attempted. - - - - - - - Each occurrence of this class specifies a particular way in which a kind of shipping document is to be produced and provided. - - - - - Values in this field specify how to create and return the document. - - - - - Specifies how to organize all documents of this type. - - - - - Specifies how to e-mail document images. - - - - - Specifies how a queued document is to be printed. - - - - - - - Specifies how to return a shipping document to the caller. - - - - - - - - - - - - - - Specifies how to e-mail shipping documents. - - - - - Provides the roles and email addresses for e-mail recipients. - - - - - Identifies the convention by which documents are to be grouped as e-mail attachments. - - - - - - - - - - - - - Specifies an individual recipient of e-mailed shipping document(s). - - - - - Identifies the relationship of this recipient in the shipment. - - - - - Address to which the document is to be sent. - - - - - - - Specifies characteristics of a shipping document to be produced. - - - - - Specifies how to create, organize, and return the document. - - - - - Specifies how far down the page to move the beginning of the image; allows for printing on letterhead and other pre-printed stock. - - - - - - - For those shipping document types which have both a "form" and "instructions" component (e.g. NAFTA Certificate of Origin and General Agency Agreement), this field indicates whether to provide the instructions. - - - - - Governs the language to be used for this individual document, independently from other content returned for the same shipment. - - - - - - - Specifies how to organize all shipping documents of the same type. - - - - - - - - - Specifies the image format used for a shipping document. - - - - - - - - - - - - Specifies printing options for a shipping document. - - - - - Provides environment-specific printer identification. - - - - - - - Contains all data required for additional (non-label) shipping documents to be produced in conjunction with a specific shipment. - - - - - Indicates the types of shipping documents requested by the shipper. - - - - - - - Specifies the production of each package-level custom document (the same specification is used for all packages). - - - - - Specifies the production of a shipment-level custom document. - - - - - Details pertaining to the GAA. - - - - - Details pertaining to NAFTA COO. - - - - - Specifies the production of the OP-900 document for hazardous materials packages. - - - - - - - Specifies the type of paper (stock) on which a document will be printed. - - - - - - - - - - - - - - - - - The descriptive data required for FedEx delivery signature services. - - - - - Identifies the delivery signature services option selected by the customer for this shipment. See OptionType for the list of valid values. - - - - - Identifies the delivery signature release authorization number. - - 10 - - - - - - - - Identifies the delivery signature services options offered by FedEx. - - - - - - - - - - - - These values are mutually exclusive; at most one of them can be attached to a SmartPost shipment. - - - - - - - - - - - - - - - - - - - - - Data required for shipments handled under the SMART_POST and GROUND_SMART_POST service types. - - - - - - - - - - - Indicates which special rating cases applied to this shipment. - - - - - - - - - Identifies each surcharge applied to the shipment. - - - - - The type of surcharge applied to the shipment. - - - - - - - The amount of the surcharge applied to the shipment. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Identifies each tax applied to the shipment. - - - - - - - - - - - - - - - - - - - - - Specifice the kind of tax or miscellaneous charge being reported on a Commercial Invoice. - - - - - - - - - - - - - The descriptive data for taxpayer identification information. - - - - - Identifies the category of the taxpayer identification number. See TinType for the list of values. - - - - - Identifies the taxpayer identification number. - - 18 - - - - - - Identifies the usage of Tax Identification Number in Shipment processing - - - - - - - - Required for dutiable international express or ground shipment. This field is not applicable to an international PIB (document) or a non-document which does not require a commercial invoice express shipment. - CFR_OR_CPT (Cost and Freight/Carriage Paid TO) - CIF_OR_CIP (Cost Insurance and Freight/Carraige Insurance Paid) - DDP (Delivered Duty Paid) - DDU (Delivered Duty Unpaid) - EXW (Ex Works) - FOB_OR_FCA (Free On Board/Free Carrier) - - - - - - - - - - - - - - Identifies the category of the taxpayer identification number. - - - - - - - - - - - - - - - - - - - - - - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Free form text to be echoed back in the reply. Used to match requests and replies. - - - - - Governs data payload language/translations (contrasted with ClientDetail.localization, which governs Notification.localizedMessage language selection). - - - - - - - Time in transit from pickup to delivery. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This definition of variable handling charge detail is intended for use in Jan 2011 corp load. - - - - - Used with Variable handling charge type of FIXED_VALUE. Contains the amount to be added to the freight charge. Contains 2 explicit decimal positions with a total max length of 10 including the decimal. - - - - - Actual percentage (10 means 10%, which is a mutiplier of 0.1) - - - - - Select the value from a set of rate data to which the percentage is applied. - - - - - Select the type of rate from which the element is to be selected. - - - - - - - The variable handling charges calculated based on the type variable handling charges requested. - - - - - The variable handling charge amount calculated based on the requested variable handling charge detail. - - - - - The calculated varibale handling charge plus the net charge. - - - - - - - Three-dimensional volume/cubic measurement. - - - - - - - - - Units of three-dimensional volume/cubic measure. - - - - - - - - - The descriptive data for the heaviness of an object. - - - - - Identifies the unit of measure associated with a weight value. - - - - - Identifies the weight value of a package/shipment. - - - - - - - Identifies the unit of measure associated with a weight value. See WeightUnits for the list of valid enumerated values. - - - - - - - - - Used in authentication of the sender's identity. - - - - - Credential used to authenticate a specific software application. This value is provided by FedEx after registration. - - - - - - - Two part authentication string used for the sender's identity - - - - - Identifying part of authentication credential. This value is provided by FedEx after registration - - - - - Secret part of authentication key. This value is provided by FedEx after registration. - - - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Identifies a system or sub-system which performs an operation. - - - - - Identifies the service business level. - - - - - Identifies the service interface level. - - - - - Identifies the service code level. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/code/core/Mage/Usa/etc/wsdl/FedEx/RateService_v9.wsdl b/app/code/core/Mage/Usa/etc/wsdl/FedEx/RateService_v9.wsdl deleted file mode 100644 index bc35b1dcb4..0000000000 --- a/app/code/core/Mage/Usa/etc/wsdl/FedEx/RateService_v9.wsdl +++ /dev/null @@ -1,4756 +0,0 @@ - - - - - - - - - Specifies additional labels to be produced. All required labels for shipments will be produced without the need to request additional labels. These are only available as thermal labels. - - - - - The type of additional labels to return. - - - - - The number of this type label to return - - - - - - - Identifies the type of additional labels. - - - - - - - - - - - - - - - Descriptive data for a physical location. May be used as an actual physical address (place to which one could go), or as a container of "address parts" which should be handled as a unit (such as a city-state-ZIP combination within the US). - - - - - Combination of number, street name, etc. At least one line is required for a valid physical address; empty lines should not be included. - - - - - Name of city, town, etc. - - - - - Identifying abbreviation for US state, Canada province, etc. Format and presence of this field will vary, depending on country. - - - - - Identification of a region (usually small) for mail/package delivery. Format and presence of this field will vary, depending on country. - - - - - Relevant only to addresses in Puerto Rico. - - - - - The two-letter code used to identify a country. - - - - - Indicates whether this address is residential (as opposed to commercial). - - - - - - - - Specifies which filing option is being exercised by the customer. - Required for non-document shipments originating in Canada destined for any country other than Canada, the United States, Puerto Rico or the U.S. Virgin Islands. - - - - - - - - - - - - Identification of the type of barcode (symbology) used on FedEx documents and labels. - - - - - - - - - - - - - - - - - - Identification of a FedEx operating company (transportation). - - - - - - - - - - - - - The instructions indicating how to print the Certificate of Origin ( e.g. whether or not to include the instructions, image type, etc ...) - - - - - Specifies characteristics of a shipping document to be produced. - - - - - Specifies the usage and identification of customer supplied images to be used on this document. - - - - - - - Specifies the type of brokerage to be applied to a shipment. - - - - - - - - - - - - Descriptive data for the client submitting a transaction. - - - - - The FedEx account number associated with this transaction. - - - - - This number is assigned by FedEx and identifies the unique device from which the request is originating. - - - - - Only used in transactions which require identification of the Fed Ex Office integrator. - - - - - Indicates the region from which the transaction is submitted. - - - - - The language to be used for human-readable Notification.localizedMessages in responses to the request containing this ClientDetail object. Different requests from the same client may contain different Localization data. (Contrast with TransactionDetail.localization, which governs data payload language/translation.) - - - - - - - Identifies what freight charges should be added to the COD collect amount. - - - - - - - - - - - - - - - - - - - Identifies the type of funds FedEx should collect upon shipment delivery. - - - - - - - - - - Descriptive data required for a FedEx COD (Collect-On-Delivery) shipment. - - - - - - Identifies if freight charges are to be added to the COD amount. This element determines which freight charges should be added to the COD collect amount. See CodAddTransportationChargesType for a list of valid enumerated values. - - - - - Identifies the type of funds FedEx should collect upon package delivery - - - - - For Express this is the descriptive data that is used for the recipient of the FedEx Letter containing the COD payment. For Ground this is the descriptive data for the party to receive the payment that prints the COD receipt. - - - - - Indicates which type of reference information to include on the COD return shipping label. - - - - - - - Indicates which type of reference information to include on the COD return shipping label. - - - - - - - - - - - CommercialInvoice element is required for electronic upload of CI data. It will serve to create/transmit an Electronic Commercial Invoice through the FedEx Systems. Customers are responsible for printing their own Commercial Invoice.If you would likeFedEx to generate a Commercial Invoice and transmit it to Customs. for clearance purposes, you need to specify that in the ShippingDocumentSpecification element. If you would like a copy of the Commercial Invoice that FedEx generated returned to you in reply it needs to be specified in the ETDDetail/RequestedDocumentCopies element. Commercial Invoice support consists of maximum of 99 commodity line items. - - - - - Any comments that need to be communicated about this shipment. - - - - - Any freight charges that are associated with this shipment. - - - - - Any taxes or miscellaneous charges(other than Freight charges or Insurance charges) that are associated with this shipment. - - - - - Any packing costs that are associated with this shipment. - - - - - Any handling costs that are associated with this shipment. - - - - - Free-form text. - - - - - Free-form text. - - - - - Free-form text. - - - - - The reason for the shipment. Note: SOLD is not a valid purpose for a Proforma Invoice. - - - - - Descriptive text for the purpose of the shipment. - - - - - Customer assigned invoice number. - - - - - Name of the International Expert that completed the Commercial Invoice different from Sender. - - - - - Required for dutiable international Express or Ground shipment. This field is not applicable to an international PIB(document) or a non-document which does not require a Commercial Invoice. - - - - - - - The instructions indicating how to print the Commercial Invoice( e.g. image type) Specifies characteristics of a shipping document to be produced. - - - - - - Specifies the usage and identification of a customer supplied image to be used on this document. - - - - - - - Information about the transit time and delivery commitment date and time. - - - - - The Commodity applicable to this commitment. - - - - - The FedEx service type applicable to this commitment. - - - - - Shows the specific combination of service options combined with the service type that produced this committment in the set returned to the caller. - - - - - Supporting detail for applied options identified in preceding field. - - - - - THe delivery commitment date/time. Express Only. - - - - - The delivery commitment day of the week. - - - - - The number of transit days; applies to Ground and LTL Freight; indicates minimum transit time for SmartPost. - - - - - Maximum number of transit days, for SmartPost shipments. - - - - - The service area code for the destination of this shipment. Express only. - - - - - The address of the broker to be used for this shipment. - - - - - The FedEx location identifier for the broker. - - - - - The delivery commitment date/time the shipment will arrive at the border. - - - - - The delivery commitment day of the week the shipment will arrive at the border. - - - - - The number of days it will take for the shipment to make it from broker to destination - - - - - The delivery commitment date for shipment served by GSP (Global Service Provider) - - - - - The delivery commitment day of the week for the shipment served by GSP (Global Service Provider) - - - - - Messages concerning the ability to provide an accurate delivery commitment on an International commit quote. These could be messages providing information about why a commitment could not be returned or a successful message such as "REQUEST COMPLETED" - - - - - Messages concerning the delivery commitment on an International commit quote such as "0:00 A.M. IF NO CUSTOMS DELAY" - - - - - Information about why a shipment delivery is delayed and at what level (country/service etc.). - - - - - - Required documentation for this shipment. - - - - - Freight origin and destination city center information and total distance between origin and destination city centers. - - - - - - - The type of delay this shipment will encounter. - - - - - - - - - - - - - - - - - - - For international multiple piece shipments, commodity information must be passed in the Master and on each child transaction. - If this shipment cotains more than four commodities line items, the four highest valued should be included in the first 4 occurances for this request. - - - - - - total number of pieces of this commodity - - - - - total number of pieces of this commodity - - - - - Complete and accurate description of this commodity. - - 450 - - - - - - Country code where commodity contents were produced or manufactured in their final form. - - 2 - - - - - - - Unique alpha/numeric representing commodity item. - At least one occurrence is required for US Export shipments if the Customs Value is greater than $2500 or if a valid US Export license is required. - - - 14 - - - - - - Total weight of this commodity. 1 explicit decimal position. Max length 11 including decimal. - - - - - Number of units of a commodity in total number of pieces for this line item. Max length is 9 - - - - - Unit of measure used to express the quantity of this commodity line item. - - 3 - - - - - - Contains only additional quantitative information other than weight and quantity to calculate duties and taxes. - - - - - Value of each unit in Quantity. Six explicit decimal positions, Max length 18 including decimal. - - - - - - Total customs value for this line item. - It should equal the commodity unit quantity times commodity unit value. - Six explicit decimal positions, max length 18 including decimal. - - - - - - Defines additional characteristic of commodity used to calculate duties and taxes - - - - - Applicable to US export shipping only. - - 12 - - - - - - - - An identifying mark or number used on the packaging of a shipment to help customers identify a particular shipment. - - - 15 - - - - - - All data required for this commodity in NAFTA Certificate of Origin. - - - - - - - Defines additional data to print in the Configurable portion of the label, this allows you to print the same type information on the label that can also be printed on the doc tab. - - - - - 1 of 12 possible zones to position data. - - - - - The identifiying text for the data in this zone. - - - - - A reference to a field in either the request or reply to print in this zone following the header. - - - - - A literal value to print after the header in this zone. - - - - - - - The descriptive data for a point-of-contact person. - - - - - Client provided identifier corresponding to this contact information. - - - - - Identifies the contact person's name. - - - - - Identifies the contact person's title. - - - - - Identifies the company this contact is associated with. - - - - - Identifies the phone number associated with this contact. - - - - - Identifies the phone extension associated with this contact. - - - - - Identifies the pager number associated with this contact. - - - - - Identifies the fax number associated with this contact. - - - - - Identifies the email address associated with this contact. - - - 120 - 35 - - - - - - - - - - - - - - - - - - - - - - - Specifies the currency exchange performed on financial amounts for this rate. - - - - - The currency code for the original (converted FROM) currency. - - - - - The currency code for the final (converted INTO) currency. - - - - - Multiplier used to convert fromCurrency units to intoCurrency units. - - - - - - - - - Indicates the type of custom delivery being requested. - - - - - Time by which delivery is requested. - - - - - Range of dates for custom delivery request; only used if type is BETWEEN. - - - - - Date for custom delivery request; only used for types of ON, BETWEEN, or AFTER. - - - - - - - - - - - - - - - Data required to produce a custom-specified document, either at shipment or package level. - - - - - Common information controlling document production. - - - - - Applicable only to documents produced on thermal printers with roll stock. - - - - - Applicable only to documents produced on thermal printers with roll stock. - - - - - Identifies the formatting specification used to construct this custom document. - - - - - - - Constructed string, based on format and zero or more data fields, printed in specified barcode symbology. - - - - - - - - - Width of thinnest bar/space element in the barcode. - - - - - - - - Solid (filled) rectangular area on label. - - - - - - - - - - - - - - - - - - - - - - - - Image to be included from printer's memory, or from a local file for offline clients. - - - - - - Printer-specific index of graphic image to be printed. - - - - - Fully-qualified path and file name for graphic image to be printed. - - - - - - - - - Horizontal position, relative to left edge of custom area. - - - - - Vertical position, relative to top edge of custom area. - - - - - - - Constructed string, based on format and zero or more data fields, printed in specified printer font (for thermal labels) or generic font/size (for plain paper labels). - - - - - - - - Printer-specific font name for use with thermal printer labels. - - - - - Generic font name for use with plain paper labels. - - - - - Generic font size for use with plain paper labels. - - - - - - - - - - - - - - - - - - - Reference information to be associated with this package. - - - - - - - - - - - - - - - - - - - - - - - Allows customer-specified control of label content. - - - - - If omitted, no doc tab will be produced (i.e. default = former NONE type). - - - - - Defines any custom content to print on the label. - - - - - Defines additional data to print in the Configurable portion of the label, this allows you to print the same type information on the label that can also be printed on the doc tab. - - - - - Controls which data/sections will be suppressed. - - - - - The language to use when printing the terms and conditions on the label. - - - - - Controls the number of additional copies of supplemental labels. - - - - - This value reduces the default quantity of destination/consignee air waybill labels. A value of zero indicates no change to default. A minimum of one copy will always be produced. - - - - - - - - - - Descriptive data identifying the Broker responsible for the shipmet. - Required if BROKER_SELECT_OPTION is requested in Special Services. - - - - - - Interacts both with properties of the shipment and contractual relationship with the shipper. - - - - - - Applicable only for Commercial Invoice. If the consignee and importer are not the same, the Following importer fields are required. - Importer/Contact/PersonName - Importer/Contact/CompanyName - Importer/Contact/PhoneNumber - Importer/Address/StreetLine[0] - Importer/Address/City - Importer/Address/StateOrProvinceCode - if Importer Country Code is US or CA - Importer/Address/PostalCode - if Importer Country Code is US or CA - Importer/Address/CountryCode - - - - - - Specifies how the recipient is identified for customs purposes; the requirements on this information vary with destination country. - - - - - Indicates how payment of duties for the shipment will be made. - - - - - Indicates whether this shipment contains documents only or non-documents. - - - - - The total customs value for the shipment. This total will rrepresent th esum of the values of all commodities, and may include freight, miscellaneous, and insurance charges. Must contain 2 explicit decimal positions with a max length of 17 including the decimal. For Express International MPS, the Total Customs Value is in the master transaction and all child transactions - - - - - Identifies responsibilities with respect to loss, damage, etc. - - - - - Documents amount paid to third party for coverage of shipment content. - - - - - - CommercialInvoice element is required for electronic upload of CI data. It will serve to create/transmit an Electronic Commercial Invoice through FedEx System. Customers are responsible for printing their own Commercial Invoice. Commercial Invoice support consists of a maximum of 20 commodity line items. - - - - - - For international multiple piece shipments, commodity information must be passed in the Master and on each child transaction. - If this shipment cotains more than four commodities line items, the four highest valued should be included in the first 4 occurances for this request. - - - - - - Country specific details of an International shipment. - - - - - FOOD_OR_PERISHABLE is required by FDA/BTA; must be true for food/perishable items coming to US or PR from non-US/non-PR origin. - - - - - - - Identifies whether or not the products being shipped are required to be accessible during delivery. - - - - - - - - - The descriptive data required for a FedEx shipment containing dangerous goods (hazardous materials). - - - - - Identifies whether or not the products being shipped are required to be accessible during delivery. - - - - - Shipment is packaged/documented for movement ONLY on cargo aircraft. - - - - - Indicates which kinds of hazardous content are in the current package. - - - - - Documents the kinds and quantities of all hazardous commodities in the current package. - - - - - Description of the packaging of this commodity, suitable for use on OP-900 and OP-950 forms. - - - - - Telephone number to use for contact in the event of an emergency. - - - - - - - - - - - - - - - - - - - - - - - - - - Information about why a shipment delivery is delayed and at what level( country/service etc.). - - - - - The date of the delay - - - - - - The attribute of the shipment that caused the delay(e.g. Country, City, LocationId, Zip, service area, special handling ) - - - - - The point where the delay is occurring (e.g. Origin, Destination, Broker location) - - - - - The reason for the delay (e.g. holiday, weekend, etc.). - - - - - The name of the holiday in that country that is causing the delay. - - - - - - - The attribute of the shipment that caused the delay(e.g. Country, City, LocationId, Zip, service area, special handling ) - - - - - - - - - - - - - - The point where the delay is occurring ( e.g. Origin, Destination, Broker location). - - - - - - - - - - - - Data required to complete the Destionation Control Statement for US exports. - - - - - - Comma-separated list of up to four country codes, required for DEPARTMENT_OF_STATE statement. - - - - - Name of end user, required for DEPARTMENT_OF_STATE statement. - - - - - - - Used to indicate whether the Destination Control Statement is of type Department of Commerce, Department of State or both. - - - - - - - - - The dimensions of this package and the unit type used for the measurements. - - - - - - - - - - - - - - - - - - - - - - - Driving or other transportation distances, distinct from dimension measurements. - - - - - Identifies the distance quantity. - - - - - Identifies the unit of measure for the distance value. - - - - - - - - - - - - - - - The DocTabContentType options available. - - - - - The DocTabContentType should be set to ZONE001 to specify additional Zone details. - - - - - The DocTabContentType should be set to BARCODED to specify additional BarCoded details. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Zone number can be between 1 and 12. - - - - - Header value on this zone. - - - - - Reference path to the element in the request/reply whose value should be printed on this zone. - - - - - Free form-text to be printed in this zone. - - - - - Justification for the text printed on this zone. - - - - - - - Identifies the method by which the package is to be tendered to FedEx. This element does not dispatch a courier for package pickup. - - - - - - - - - - - - Specific information about the delivery of the email and options for the shipment. - - - - - Email address to send the URL to. - - - - - A message to be inserted into the email. - - - - - - - Information describing email notifications that will be sent in relation to events that occur during package movement - - - - - A message that will be included in the email notifications - - 120 - - - - - - Information describing the destination of the email, format of the email and events to be notified on - - - - - - - The format of the email. - - - - - - - - - - The descriptive data for a FedEx email notification recipient. - - - - - Identifies the relationship this email recipient has to the shipment. - - - - - The email address to send the notification to - - - 120 - 35 - - - - - - - Notify the email recipient when this shipment has been shipped. - - - - - Notify the email recipient if this shipment encounters a problem while in route - - - - - Notify the email recipient when this shipment has been delivered. - - - - - The format of the email notification. - - - - - The language/locale to be used in this email notification. - - - - - - - Identifies the set of valid email notification recipient types. For SHIPPER, RECIPIENT and BROKER the email address asssociated with their definitions will be used, any email address sent with the email notification for these three email notification recipient types will be ignored. - - - - - - - - - - - - - - - - - - - - Customer-declared value, with data type and legal values depending on excise condition, used in defining the taxable value of the item. - - - - - - - Specifies the types of Estimated Duties and Taxes to be included in a rate quotation for an international shipment. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Electronic Trade document references used with the ETD special service. - - - - - Indicates the types of shipping documents produced for the shipper by FedEx (see ShippingDocumentSpecification) which should be copied back to the shipper in the shipment result data. - - - - - Currently not supported. - - - - - - - - Country specific details of an International shipment. - - - - - - Specifies which filing option is being exercised by the customer. - Required for non-document shipments originating in Canada destined for any country other than Canada, the United States, Puerto Rico or the U.S. Virgin Islands. - - - - - - - Required only if B13AFilingOption is one of the following: - FILED_ELECTRONICALLY - MANUALLY_ATTACHED - SUMMARY_REPORTING - If B13AFilingOption = NOT_REQUIRED, this field should contain a valid B13A Exception Number. - - - 50 - - - - - - This field is applicable only to Canada export non-document shipments of any value to any destination. No special characters allowed. - - 10 - - - - - - Department of Commerce/Department of State information about this shipment. - - - - - - - Details specific to an Express freight shipment. - - - - - Indicates whether or nor a packing list is enclosed. - - - - - - Total shipment pieces. - ie. 3 boxes and 3 pallets of 100 pieces each = Shippers Load and Count of 303. - Applicable to International Priority Freight and International Economy Freight. - Values must be in the range of 1 - 99999 - - - - - - Required for International Freight shipping. Values must be 8- 12 characters in length. - - 12 - - - - - - Currently not supported. - - - - - Currently not supported. - - - - - Currently not supported. - - - - - - - Currently not supported. Delivery contact information for an Express freight shipment. - - - - - - - - - Indicates a FedEx Express operating region. - - - - - - - - - - - - Identifies a kind of FedEx facility. - - - - - - - - - - Specifies the optional features/characteristics requested for a Freight shipment utilizing a flatbed trailer. - - - - - - - - - - - - - - - - - - - - Individual charge which contributes to the total base charge for the shipment. - - - - - Freight class for this line item. - - - - - Effective freight class used for rating this line item. - - - - - NMFC Code for commodity. - - - - - Customer-provided description for this commodity or class line. - - - - - Weight for this commodity or class line. - - - - - Rate or factor applied to this line item. - - - - - Identifies the manner in which the chargeRate for this line item was applied. - - - - - The net or extended charge for this line item. - - - - - - - - - - - - - - - - - - - - These values represent the industry-standard freight classes used for FedEx Freight and FedEx National Freight shipment description. (Note: The alphabetic prefixes are required to distinguish these values from decimal numbers on some client platforms.) - - - - - - - - - - - - - - - - - - - - - - - - - Information about the Freight Service Centers associated with this shipment. - - - - - Information about the origin Freight Service Center. - - - - - Information about the destination Freight Service Center. - - - - - The distance between the origin and destination FreightService Centers - - - - - - - - - - Date for all Freight guarantee types. - - - - - Time for GUARANTEED_TIME only. - - - - - - - - - - - - - - Identifies responsibilities with respect to loss, damage, etc. - - - - - - - - - Rate data specific to FedEx Freight or FedEx National Freight services. - - - - - A unique identifier for a specific rate quotation. - - - - - Specifies the way in which base charges for a Freight shipment are calculated. - - - - - Freight charges which accumulate to the total base charge for the shipment. - - - - - Human-readable descriptions of additional information on this shipment rating. - - - - - - - Additional non-monetary data returned with Freight rates. - - - - - Unique identifier for notation. - - - - - Human-readable explanation of notation. - - - - - - - This class describes the relationship between a customer-specified address and the FedEx Freight / FedEx National Freight Service Center that supports that address. - - - - - Freight Industry standard non-FedEx carrier identification - - - - - The name of the Interline carrier. - - - - - Additional time it might take at the origin or destination to pickup or deliver the freight. This is usually due to the remoteness of the location. This time is included in the total transit time. - - - - - Service branding which may be used for local pickup or delivery, distinct from service used for line-haul of customer's shipment. - - - - - Distance between customer address (pickup or delivery) and the supporting Freight / National Freight service center. - - - - - Time to travel between customer address (pickup or delivery) and the supporting Freight / National Freight service center. - - - - - Specifies when/how the customer can arrange for pickup or delivery. - - - - - Specifies days of operation if localServiceScheduling is LIMITED. - - - - - Freight service center that is a gateway on the border of Canada or Mexico. - - - - - Alphabetical code identifying a Freight Service Center - - - - - Freight service center Contact and Address - - - - - - - Specifies the type of service scheduling offered from a Freight or National Freight Service Center to a customer-supplied address. - - - - - - - - - - Data applicable to shipments using FEDEX_FREIGHT and FEDEX_NATIONAL_FREIGHT services. - - - - - Account number used with FEDEX_FREIGHT service. - - - - - Used for validating FedEx Freight account number and (optionally) identifying third party payment on the bill of lading. - - - - - Account number used with FEDEX_NATIONAL_FREIGHT service. - - - - - Used for validating FedEx National Freight account number and (optionally) identifying third party payment on the bill of lading. - - - - - Indicates the role of the party submitting the transaction. - - - - - Designates which of the requester's tariffs will be used for rating. - - - - - Identifies the declared value for the shipment - - - - - Identifies the declared value units corresponding to the above defined declared value - - - - - - Identifiers for promotional discounts offered to customers. - - - - - Total number of individual handling units in the entire shipment (for unit pricing). - - - - - Estimated discount rate provided by client for unsecured rate quote. - - - - - Total weight of pallets used in shipment. - - - - - Overall shipment dimensions. - - - - - Description for the shipment. - - - - - Specifies which party will pay surcharges for any special services which support split billing. - - - - - Details of the commodities in the shipment. - - - - - - - Description of an individual commodity or class of content in a shipment. - - - - - Freight class for this line item. - - - - - Specification of handling-unit packaging for this commodity or class line. - - - - - Customer-provided description for this commodity or class line. - - - - - Weight for this commodity or class line. - - - - - FED EX INTERNAL USE ONLY - Individual line item dimensions. - - - - - Volume (cubic measure) for this commodity or class line. - - - - - - - Indicates the role of the party submitting the transaction. - - - - - - - - - - Specifies which party will be responsible for payment of any surcharges for Freight special services for which split billing is allowed. - - - - - Identifies the special service. - - - - - Indicates who will pay for the special service. - - - - - - - Data required to produce a General Agency Agreement document. Remaining content (business data) to be defined once requirements have been completed. - - - - - - - - Documents the kind and quantity of an individual hazardous commodity in a package. - - - - - Identifies and describes an individual hazardous commodity. - - - - - Specifies the amount of the commodity in alternate units. - - - - - Customer-provided specifications for handling individual commodities. - - - - - - - Identifies and describes an individual hazardous commodity. For 201001 load, this is based on data from the FedEx Ground Hazardous Materials Shipping Guide. - - - - - Regulatory identifier for a commodity (e.g. "UN ID" value). - - - - - - - - - - - - - Specifies how the commodity is to be labeled. - - - - - - - - - - Customer-provided specifications for handling individual commodities. - - - - - Specifies how the customer wishes the label text to be handled for this commodity in this package. - - - - - Text used in labeling the commodity under control of the labelTextOption field. - - - - - - - Indicates which kind of hazardous content (as defined by DOT) is being reported. - - - - - - - - - - - - Identifies number and type of packaging units for hazardous commodities. - - - - - Number of units of the type below. - - - - - Units in which the hazardous commodity is packaged. - - - - - - - Identifies DOT packing group for a hazardous commodity. - - - - - - - - - - Identifies amount and units for quantity of hazardous commodities. - - - - - Number of units of the type below. - - - - - Units by which the hazardous commodity is measured. - - - - - - - Descriptive data required for a FedEx shipment that is to be held at the destination FedEx location for pickup by the recipient. - - - - - Contact phone number for recipient of shipment. - - 15 - - - - - - Contact and address of FedEx facility at which shipment is to be held. - - - - - Type of facility at which package/shipment is to be held. - - - - - Location identification (for facilities identified by an alphanumeric location code). - - - - - Location identification (for facilities identified by an numeric location code). - - - - - - - The descriptive data required by FedEx for home delivery services. - - - - - - - Required for Date Certain Home Delivery. - - - - - Required for Date Certain and Appointment Home Delivery. - - 15 - - - - - - - - - - - - - - - - - - - - - - - - The type of International shipment. - - - - - - - - - Specifies the type of label to be returned. - - - - - - - - - - - - Names for data elements / areas which may be suppressed from printing on labels. - - - - - - - - - - - - - - - - - This indicates if the top or bottom of the label comes out of the printer first. - - - - - - - - - Relative to normal orientation for the printer. RIGHT=90 degrees clockwise, UPSIDE_DOWN=180 degrees, LEFT=90 degrees counterclockwise. - - - - - - - - - - - Description of shipping label to be returned in the reply - - - - - Specify type of label to be returned - - - - - - The type of image or printer commands the label is to be formatted in. - DPL = Unimark thermal printer language - EPL2 = Eltron thermal printer language - PDF = a label returned as a pdf image - PNG = a label returned as a png image - ZPLII = Zebra thermal printer language - - - - - - For thermal printer lables this indicates the size of the label and the location of the doc tab if present. - - - - - This indicates if the top or bottom of the label comes out of the printer first. - - - - - Relative to normal orientation for the printer. RIGHT=90 degrees clockwise, UPSIDE_DOWN=180 degrees, LEFT=90 degrees counterclockwise. - - - - - If present, this contact and address information will replace the return address information on the label. - - - - - Allows customer-specified control of label content. - - - - - - - For thermal printer labels this indicates the size of the label and the location of the doc tab if present. - - - - - - - - - - - - - - - - - - - - - - Identifies the Liability Coverage Amount. For Jan 2010 this value represents coverage amount per pound - - - - - - - - - - - - - Represents a one-dimensional measurement in small units (e.g. suitable for measuring a package or document), contrasted with Distance, which represents a large one-dimensional measurement (e.g. distance between cities). - - - - - The numerical quantity of this measurement. - - - - - The units for this measurement. - - - - - - - CM = centimeters, IN = inches - - - - - - - - - Identifies the representation of human-readable text. - - - - - Two-letter code for language (e.g. EN, FR, etc.) - - - - - Two-letter code for the region (e.g. us, ca, etc..). - - - - - - - - - - - - - Internal FedEx use only. - - - - - - - - - - - - - - - - - - Data required to produce a Certificate of Origin document. - - - - - - - Indicates which Party (if any) from the shipment is to be used as the source of importer data on the NAFTA COO form. - - - - - Contact information for "Authorized Signature" area of form. - - - - - - - - - - - - Defined by NAFTA regulations. - - - - - Defined by NAFTA regulations. - - - - - Identification of which producer is associated with this commodity (if multiple producers are used in a single shipment). - - - - - - Date range over which RVC net cost was calculated. - - - - - - - - - - - - - - - - Net cost method used. - - - - - - - - - - See instructions for NAFTA Certificate of Origin for code definitions. - - - - - - - - - - - - - - - - - - - See instructions for NAFTA Certificate of Origin for code definitions. - - - - - - - - - - - - - - - - - - - - The descriptive data regarding the result of the submitted transaction. - - - - - The severity of this notification. This can indicate success or failure or some other information about the request. The values that can be returned are SUCCESS - Your transaction succeeded with no other applicable information. NOTE - Additional information that may be of interest to you about your transaction. WARNING - Additional information that you need to know about your transaction that you may need to take action on. ERROR - Information about an error that occurred while processing your transaction. FAILURE - FedEx was unable to process your transaction at this time due to a system failure. Please try again later - - - - - Indicates the source of this notification. Combined with the Code it uniquely identifies this notification - - - - - A code that represents this notification. Combined with the Source it uniquely identifies this notification. - - 8 - - - - - - Human-readable text that explains this notification. - - 255 - - - - - - The translated message. The language and locale specified in the ClientDetail. Localization are used to determine the representation. Currently only supported in a TrackReply. - - - - - A collection of name/value pairs that provide specific data to help the client determine the nature of an error (or warning, etc.) witout having to parse the message string. - - - - - - - - - Identifies the type of data contained in Value (e.g. SERVICE_TYPE, PACKAGE_SEQUENCE, etc..). - - - - - The value of the parameter (e.g. PRIORITY_OVERNIGHT, 2, etc..). - - - - - - - Identifies the set of severity values for a Notification. - - - - - - - - - - - - The instructions indicating how to print the OP-900 form for hazardous materials packages. - - - - - Specifies characteristics of a shipping document to be produced. - - - - - Identifies which reference type (from the package's customer references) is to be used as the source for the reference on this OP-900. - - - - - Specifies the usage and identification of customer supplied images to be used on this document. - - - - - Data field to be used when a name is to be printed in the document instead of (or in addition to) a signature image. - - - - - - - The Oversize classification for a package. - - - - - - - - - - Data for a package's rates, as calculated per a specific rate type. - - - - - Type used for this specific set of rate data. - - - - - Indicates which weight was used. - - - - - Internal FedEx use only. - - - - - The weight that was used to calculate the rate. - - - - - The dimensional weight of this package (if greater than actual). - - - - - The oversize weight of this package (if the package is oversize). - - - - - The transportation charge only (prior to any discounts applied) for this package. - - - - - The sum of all discounts on this package. - - - - - This package's baseCharge - totalFreightDiscounts. - - - - - The sum of all surcharges on this package. - - - - - This package's netFreight + totalSurcharges (not including totalTaxes). - - - - - The sum of all taxes on this package. - - - - - This package's netFreight + totalSurcharges + totalTaxes. - - - - - The total sum of all rebates applied to this package. - - - - - All rate discounts that apply to this package. - - - - - All rebates that apply to this package. - - - - - All surcharges that apply to this package (either because of characteristics of the package itself, or because it is carrying per-shipment surcharges for the shipment of which it is a part). - - - - - All taxes applicable (or distributed to) this package. - - - - - The variable handling charges calculated based on the type variable handling charges requested. - - - - - - - Identifies the collection of special services offered by FedEx. - - - - - - - - - - - - - - These special services are available at the package level for some or all service types. If the shipper is requesting a special service which requires additional data, the package special service type must be present in the specialServiceTypes collection, and the supporting detail must be provided in the appropriate sub-object below. - - - - - The types of all special services requested for the enclosing shipment or package. - - - - - For use with FedEx Ground services only; COD must be present in shipment's special services. - - - - - Descriptive data required for a FedEx shipment containing dangerous materials. This element is required when SpecialServiceType.DANGEROUS_GOODS or HAZARDOUS_MATERIAL is present in the SpecialServiceTypes collection. - - - - - Descriptive data required for a FedEx shipment containing dry ice. This element is required when SpecialServiceType.DRY_ICE is present in the SpecialServiceTypes collection. - - - - - The descriptive data required for FedEx signature services. This element is required when SpecialServiceType.SIGNATURE_OPTION is present in the SpecialServiceTypes collection. - - - - - To be filled. - - - - - - - Identifies the packaging used by the requestor for the package. See PackagingType for list of valid enumerated values. - - - - - - - - - - - - - - The descriptive data for a person or company entitiy doing business with FedEx. - - - - - Identifies the FedEx account number assigned to the customer. - - 12 - - - - - - Descriptive data for taxpayer identification information. - - - - - Descriptive data identifying the point-of-contact person. - - - - - The descriptive data for a physical location. - - - - - - - The descriptive data for the monetary compensation given to FedEx for services rendered to the customer. - - - - - Identifies the method of payment for a service. See PaymentType for list of valid enumerated values. - - - - - Descriptive data identifying the party responsible for payment for a service. - - - - - - - Identifies the method of payment for a service. - - - - - - - - Descriptive data identifying the party responsible for payment for a service. - - - - - Identifies the FedEx account number assigned to the payor. - - 12 - - - - - - Identifies the country of the payor. - - - - - - - This information describes the kind of pending shipment being requested. - - - - - - - Date after which the pending shipment will no longer be available for completion. - - - - - Only used with type of EMAIL. - - - - - - - - - - - - This enumeration rationalizes the former FedEx Express international "admissibility package" types (based on ANSI X.12) and the FedEx Freight packaging types. The values represented are those common to both carriers. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This class describes the pickup characteristics of a shipment (e.g. for use in a tag request). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Currently not supported. - - - - - - - - - - - - - - - - - - Identifies the type of dim divisor that was applied. - - - - - - - - - - - - Identifies a discount applied to the shipment. - - - - - Identifies the type of discount applied to the shipment. - - - - - - The amount of the discount applied to the shipment. - - - - - The percentage of the discount applied to the shipment. - - - - - - - Identifies the type of discount applied to the shipment. - - - - - - - - - - - - The response to a RateRequest. The Notifications indicate whether the request was successful or not. - - - - - This indicates the highest level of severity of all the notifications returned in this reply. - - - - - The descriptive data regarding the results of the submitted transaction. - - - - - Contains the CustomerTransactionId that was sent in the request. - - - - - The version of this reply. - - - - - Each element contains all rate data for a single service. If service was specified in the request, there will be a single entry in this array; if service was omitted in the request, there will be a separate entry in this array for each service being compared. - - - - - - - - - Identifies the FedEx service to use in shipping the package. See ServiceType for list of valid enumerated values. - - - - - Identifies the packaging used by the requestor for the package. See PackagingType for list of valid enumerated values. - - - - - Shows the specific combination of service options combined with the service type that produced this committment in the set returned to the caller. - - - - - Supporting detail for applied options identified in preceding field. - - - - - - - - - Identification of an airport, using standard three-letter abbreviations. - - - - - Indicates whether or not this shipment is eligible for a money back guarantee. - - - - - Commitment code for the origin. - - - - - Commitment code for the destination. - - - - - Time in transit from pickup to delivery. - - - - - Maximum expected transit time. - - - - - The signature option for this package. - - - - - The actual rate type of the charges for this package. - - - - - Each element contains all rate data for a single rate type. - - - - - - - Descriptive data sent to FedEx by a customer in order to rate a package/shipment. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Allows the caller to specify that the transit time and commit data are to be returned in the reply. - - - - - Candidate carriers for rate-shopping use case. This field is only considered if requestedShipment/serviceType is omitted. - - - - - Contains zero or more service options whose combinations are to be considered when replying with available services. - - - - - The shipment for which a rate quote (or rate-shopping comparison) is desired. - - - - - - - Indicates the type of rates to be returned. - - - - - - - - - If requesting rates using the PackageDetails element (one package at a time) in the request, the rates for each package will be returned in this element. Currently total piece total weight rates are also retuned in this element. - - - - - Echoed from the corresponding package in the rate request (if provided). - - - - - Used with request containing PACKAGE_GROUPS, to identify which group of identical packages was used to produce a reply item. - - - - - The difference between "list" and "account" net charge. - - - - - Ground COD is package level. - - - - - - Rate data that are tied to a specific package and rate type combination. - - - - - - - This class groups the shipment and package rating data for a specific rate type for use in a rating reply, which groups result data by rate type. - - - - - The difference between "list" and "account" total net charge. - - - - - Ground COD is package level. - - - - - The shipment-level totals for this rate type. - - - - - The package-level data for this rate type. - - - - - - - The method used to calculate the weight to be used in rating the package.. - - - - - - - - - - - - - - - - - - - Identifies a discount applied to the shipment. - - - - - - - The amount of the discount applied to the shipment. - - - - - The percentage of the discount applied to the shipment. - - - - - - - Identifies the type of discount applied to the shipment. - - - - - - - - - - Specifies how the recipient is identified for customs purposes; the requirements on this information vary with destination country. - - - - - Specifies the kind of identification being used. - - - - - Contains the actual ID value, of the type specified above. - - - - - - - Type of Brazilian taxpayer identifier provided in Recipient/TaxPayerIdentification/Number. For shipments bound for Brazil this overrides the value in Recipient/TaxPayerIdentification/TinType - - - - - - - - - - FOOD_OR_PERISHABLE is required by FDA/BTA; must be true for food/perishable items coming to US or PR from non-US/non-PR origin - - - - - - - - - - - - - - - - - This class rationalizes RequestedPackage and RequestedPackageSummary from previous interfaces. The way in which it is uses within a RequestedShipment depends on the RequestedPackageDetailType value specified for that shipment. - - - - - Used only with INDIVIDUAL_PACKAGE, as a unique identifier of each requested package. - - - - - Used only with PACKAGE_GROUPS, as a unique identifier of each group of identical packages. - - - - - Used only with PACKAGE_GROUPS, as a count of packages within a group of identical packages. - - - - - - Only used for INDIVIDUAL_PACKAGES and PACKAGE_GROUPS. Ignored for PACKAGE_SUMMARY, in which case totalInsuredValue and packageCount on the shipment will be used to determine this value. - - - - - Only used for INDIVIDUAL_PACKAGES and PACKAGE_GROUPS. Ignored for PACKAGE_SUMMARY, in which case totalweight and packageCount on the shipment will be used to determine this value. - - - - - - Provides additional detail on how the customer has physically packaged this item. As of June 2009, required for packages moving under international and SmartPost services. - - - - - Human-readable text describing the package. - - - - - - - Only used for INDIVIDUAL_PACKAGES and PACKAGE_GROUPS. - - - - - - - The descriptive data for the shipment being tendered to FedEx. - - - - - Identifies the date and time the package is tendered to FedEx. Both the date and time portions of the string are expected to be used. The date should not be a past date or a date more than 10 days in the future. The time is the local time of the shipment based on the shipper's time zone. The date component must be in the format: YYYY-MM-DD (e.g. 2006-06-26). The time component must be in the format: HH:MM:SS using a 24 hour clock (e.g. 11:00 a.m. is 11:00:00, whereas 5:00 p.m. is 17:00:00). The date and time parts are separated by the letter T (e.g. 2006-06-26T17:00:00). There is also a UTC offset component indicating the number of hours/mainutes from UTC (e.g 2006-06-26T17:00:00-0400 is defined form June 26, 2006 5:00 pm Eastern Time). - - - - - Identifies the method by which the package is to be tendered to FedEx. This element does not dispatch a courier for package pickup. See DropoffType for list of valid enumerated values. - - - - - Identifies the FedEx service to use in shipping the package. See ServiceType for list of valid enumerated values. - - - - - Identifies the packaging used by the requestor for the package. See PackagingType for list of valid enumerated values. - - - - - Identifies the total weight of the shipment being conveyed to FedEx.This is only applicable to International shipments and should only be used on the first package of a mutiple piece shipment.This value contains 1 explicit decimal position - - - - - Total insured amount. - - - - - Descriptive data identifying the party responsible for shipping the package. Shipper and Origin should have the same address. - - - - - Descriptive data identifying the party receiving the package. - - - - - A unique identifier for a recipient location - - 10 - - - - - - Physical starting address for the shipment, if different from shipper's address. - - - - - Descriptive data indicating the method and means of payment to FedEx for providing shipping services. - - - - - Descriptive data regarding special services requested by the shipper for this shipment. If the shipper is requesting a special service which requires additional data (e.g. COD), the special service type must be present in the specialServiceTypes collection, and the supporting detail must be provided in the appropriate sub-object. For example, to request COD, "COD" must be included in the SpecialServiceTypes collection and the CodDetail object must contain the required data. - - - - - Details specific to an Express freight shipment. - - - - - Data applicable to shipments using FEDEX_FREIGHT and FEDEX_NATIONAL_FREIGHT services. - - - - - Used with Ground Home Delivery and Freight. - - - - - Details about how to calculate variable handling charges at the shipment level. - - - - - Customs clearance data, used for both international and intra-country shipping. - - - - - For use in "process tag" transaction. - - - - - - If true, only the shipper/payor will have visibility of this shipment. - - - - - Details about the image format and printer type the label is to returned in. - - - - - Details such as shipping document types, NAFTA information, CI information, and GAA information. - - - - - Specifies whether and what kind of rates the customer wishes to have quoted on this shipment. The reply will also be constrained by other data on the shipment and customer. - - - - - Specifies whether the customer wishes to have Estimated Duties and Taxes provided with the rate quotation on this shipment. Only applies with shipments moving under international services. - - - - - For a multiple piece shipment this is the total number of packages in the shipment. - - - - - Specifies whether packages are described individually, in groups, or summarized in a single description for total-piece-total-weight. This field controls which fields of the RequestedPackageLineItem will be used, and how many occurrences are expected. - - - - - One or more package-attribute descriptions, each of which describes an individual package, a group of identical packages, or (for the total-piece-total-weight case) common characteristics all packages in the shipment. - - - - - - - - - Currently not supported. - - - - - Currently not supported. - - - - - - - - Currently not supported. - - - - - Currently not supported. - - - - - - - - - - - - - - - - - - These values are used to control the availability of certain special services at the time when a customer uses the e-mail label link to create a return shipment. - - - - - - - - - - - - Identifies the allowed (merchant-authorized) special services which may be selected when the subsequent shipment is created. Only services represented in EMailLabelAllowedSpecialServiceType will be controlled by this list. - - - - - - - Information relating to a return shipment. - - - - - The type of return shipment that is being requested. At present the only type of retrun shipment that is supported is PRINT_RETURN_LABEL. With this option you can print a return label to insert into the box of an outbound shipment. This option can not be used to print an outbound label. - - - - - Return Merchant Authorization - - - - - Specific information about the delivery of the email and options for the shipment. - - - - - - - The type of return shipment that is being requested. - - - - - - - - - - The "PAYOR..." rates are expressed in the currency identified in the payor's rate table(s). The "RATED..." rates are expressed in the currency of the origin country. - - - - - - - - - - - - - - - Return Merchant Authorization - - - - - Return Merchant Authorization Number - - 20 - - - - - - The reason for the return. - - 60 - - - - - - - - These values control the optional features of service that may be combined in a commitment/rate comparision transaction. - - - - - - - - - - - Supporting detail for applied options identified in a rate quote. - - - - - Identifies the type of Freight Guarantee applied, if FREIGHT_GUARANTEE is applied to the rate quote. - - - - - Identifies the smartPostHubId used during rate quote, if SMART_POST_HUB_ID is a variable option on the rate request. - - - - - Identifies the indicia used during rate quote, if SMART_POST_ALLOWED_INDICIA is a variable option on the rate request. - - - - - - - Identifies the FedEx service to use in shipping the package. See ServiceType for list of valid enumerated values. - - - - - - - - - - - - - - - - - - - - - - - - - - - Shipment-level totals of dry ice data across all packages. - - - - - Total number of packages in the shipment that contain dry ice. - - - - - Total shipment dry ice weight for all packages. - - - - - - - Data for a shipment's total/summary rates, as calculated per a specific rate type. The "total..." fields may differ from the sum of corresponding package data for Multiweight or Express MPS. - - - - - Type used for this specific set of rate data. - - - - - Indicates the rate scale used. - - 5 - - - - - - Indicates the rate zone used (based on origin and destination). - - 1 - - - - - - Indicates the type of pricing used for this shipment. - - - - - Indicates which weight was used. - - - - - INTERNAL FEDEX USE ONLY. - - - - - Specifies the currency exchange performed on financial amounts for this rate. - - - - - Indicates which special rating cases applied to this shipment. - - - - - The value used to calculate the weight based on the dimensions. - - - - - Identifies the type of dim divisor that was applied. - - - - - - The weight used to calculate these rates. - - - - - Sum of dimensional weights for all packages. - - - - - - The total discounts used in the rate calculation. - - - - - The freight charge minus discounts. - - - - - The total amount of all surcharges applied to this shipment. - - - - - This shipment's totalNetFreight + totalSurcharges (not including totalTaxes). - - - - - Total of the transportation-based taxes. - - - - - The net charge after applying all discounts and surcharges. - - - - - The total sum of all rebates applied to this shipment. - - - - - Total of all values under this shipment's dutiesAndTaxes; only provided if estimated duties and taxes were calculated for this shipment. - - - - - This shipment's totalNetCharge + totalDutiesAndTaxes; only provided if estimated duties and taxes were calculated for this shipment AND duties, taxes and transportation charges are all paid by the same sender's account. - - - - - Rate data specific to FedEx Freight and FedEx National Freight services. - - - - - All rate discounts that apply to this shipment. - - - - - All rebates that apply to this shipment. - - - - - All surcharges that apply to this shipment. - - - - - All transportation-based taxes applicable to this shipment. - - - - - All commodity-based duties and taxes applicable to this shipment. - - - - - The "order level" variable handling charges. - - - - - The total of all variable handling charges at both shipment (order) and package level. - - - - - - - Identifies the collection of special service offered by FedEx. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - These special services are available at the shipment level for some or all service types. If the shipper is requesting a special service which requires additional data (such as the COD amount), the shipment special service type must be present in the specialServiceTypes collection, and the supporting detail must be provided in the appropriate sub-object below. - - - - - The types of all special services requested for the enclosing shipment (or other shipment-level transaction). - - - - - Descriptive data required for a FedEx COD (Collect-On-Delivery) shipment. This element is required when SpecialServiceType.COD is present in the SpecialServiceTypes collection. - - - - - Descriptive data required for a FedEx shipment that is to be held at the destination FedEx location for pickup by the recipient. This element is required when SpecialServiceType.HOLD_AT_LOCATION is present in the SpecialServiceTypes collection. - - - - - Descriptive data required for FedEx to provide email notification to the customer regarding the shipment. This element is required when SpecialServiceType.EMAIL_NOTIFICATION is present in the SpecialServiceTypes collection. - - - - - The descriptive data required for FedEx Printed Return Label. This element is required when SpecialServiceType.PRINTED_RETURN_LABEL is present in the SpecialServiceTypes collection - - - - - This field should be populated for pending shipments (e.g. e-mail label) It is required by a PENDING_SHIPMENT special service type. - - - - - The number of packages with dry ice and the total weight of the dry ice. - - - - - The descriptive data required for FedEx Home Delivery options. This element is required when SpecialServiceType.HOME_DELIVERY_PREMIUM is present in the SpecialServiceTypes collection - - - - - - - Electronic Trade document references. - - - - - Specification for date or range of dates on which delivery is to be attempted. - - - - - - - Each occurrence of this class specifies a particular way in which a kind of shipping document is to be produced and provided. - - - - - Values in this field specify how to create and return the document. - - - - - Specifies how to organize all documents of this type. - - - - - Specifies how to e-mail document images. - - - - - Specifies how a queued document is to be printed. - - - - - - - Specifies how to return a shipping document to the caller. - - - - - - - - - - - - - - Specifies how to e-mail shipping documents. - - - - - Provides the roles and email addresses for e-mail recipients. - - - - - Identifies the convention by which documents are to be grouped as e-mail attachments. - - - - - - - - - - - - - Specifies an individual recipient of e-mailed shipping document(s). - - - - - Identifies the relationship of this recipient in the shipment. - - - - - Address to which the document is to be sent. - - - - - - - Specifies characteristics of a shipping document to be produced. - - - - - Specifies how to create, organize, and return the document. - - - - - Specifies how far down the page to move the beginning of the image; allows for printing on letterhead and other pre-printed stock. - - - - - - - For those shipping document types which have both a "form" and "instructions" component (e.g. NAFTA Certificate of Origin and General Agency Agreement), this field indicates whether to provide the instructions. - - - - - Governs the language to be used for this individual document, independently from other content returned for the same shipment. - - - - - - - Specifies how to organize all shipping documents of the same type. - - - - - - - - - Specifies the image format used for a shipping document. - - - - - - - - - - - - Specifies printing options for a shipping document. - - - - - Provides environment-specific printer identification. - - - - - - - Contains all data required for additional (non-label) shipping documents to be produced in conjunction with a specific shipment. - - - - - Indicates the types of shipping documents requested by the shipper. - - - - - - - Specifies the production of each package-level custom document (the same specification is used for all packages). - - - - - Specifies the production of a shipment-level custom document. - - - - - Details pertaining to the GAA. - - - - - Details pertaining to NAFTA COO. - - - - - Specifies the production of the OP-900 document for hazardous materials packages. - - - - - - - Specifies the type of paper (stock) on which a document will be printed. - - - - - - - - - - - - - - - - - The descriptive data required for FedEx delivery signature services. - - - - - Identifies the delivery signature services option selected by the customer for this shipment. See OptionType for the list of valid values. - - - - - Identifies the delivery signature release authorization number. - - 10 - - - - - - - - Identifies the delivery signature services options offered by FedEx. - - - - - - - - - - - - These values are mutually exclusive; at most one of them can be attached to a SmartPost shipment. - - - - - - - - - - - - - - - - - - - - - Data required for shipments handled under the SMART_POST and GROUND_SMART_POST service types. - - - - - - - - - - - Indicates which special rating cases applied to this shipment. - - - - - - - - - Identifies each surcharge applied to the shipment. - - - - - The type of surcharge applied to the shipment. - - - - - - - The amount of the surcharge applied to the shipment. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Identifies each tax applied to the shipment. - - - - - - - - - - - - - - - - - - - - - The descriptive data for taxpayer identification information. - - - - - Identifies the category of the taxpayer identification number. See TinType for the list of values. - - - - - Identifies the taxpayer identification number. - - 18 - - - - - - Identifies the usage of Tax Identification Number in Shipment processing - - - - - - - - Required for dutiable international express or ground shipment. This field is not applicable to an international PIB (document) or a non-document which does not require a commercial invoice express shipment. - CFR_OR_CPT (Cost and Freight/Carriage Paid TO) - CIF_OR_CIP (Cost Insurance and Freight/Carraige Insurance Paid) - DDP (Delivered Duty Paid) - DDU (Delivered Duty Unpaid) - EXW (Ex Works) - FOB_OR_FCA (Free On Board/Free Carrier) - - - - - - - - - - - - - - Identifies the category of the taxpayer identification number. - - - - - - - - - - - - - - - - - - - - - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Free form text to be echoed back in the reply. Used to match requests and replies. - - 40 - - - - - - Governs data payload language/translations (contrasted with ClientDetail.localization, which governs Notification.localizedMessage language selection). - - - - - - - Time in transit from pickup to delivery. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Details about how to calculate variable handling charges at the shipment level. - - - - - The type of handling charge to be calculated and returned in the reply. - - - - - Used with Variable handling charge type of FIXED_VALUE. Contains the amount to be added to the freight charge. Contains 2 explicit decimal positions with a total max length of 10 including the decimal. - - - - - Used with Variable handling charge types PERCENTAGE_OF_BASE, PERCENTAGE_OF_NET or PERCETAGE_OF_NET_EXCL_TAXES. Used to calculate the amount to be added to the freight charge. Contains 2 explicit decimal positions. - - - - - - - The type of handling charge to be calculated and returned in the reply. - - - - - - - - - - - The variable handling charges calculated based on the type variable handling charges requested. - - - - - The variable handling charge amount calculated based on the requested variable handling charge detail. - - - - - The calculated varibale handling charge plus the net charge. - - - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Identifies a system or sub-system which performs an operation. - - - - - Identifies the service business level. - - - - - Identifies the service interface level. - - - - - Identifies the service code level. - - - - - - - Three-dimensional volume/cubic measurement. - - - - - - - - - Units of three-dimensional volume/cubic measure. - - - - - - - - - Two part authentication string used for the sender's identity - - - - - Identifying part of authentication credential. This value is provided by FedEx after registration - - 16 - - - - - - Secret part of authentication key. This value is provided by FedEx after registration. - - 25 - - - - - - - - Used in authentication of the sender's identity. - - - - - Credential used to authenticate a specific software application. This value is provided by FedEx after registration. - - - - - - - The descriptive data for the heaviness of an object. - - - - - Identifies the unit of measure associated with a weight value. See WeightUnits for the list of valid enumerated values. - - - - - Identifies the weight value of the package/shipment. Contains 1 explicit decimal position - - - - - - - Identifies the unit of measure associated with a weight value. See WeightUnits for the list of valid enumerated values. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/code/core/Mage/Usa/etc/wsdl/FedEx/ShipService_v10.wsdl b/app/code/core/Mage/Usa/etc/wsdl/FedEx/ShipService_v10.wsdl deleted file mode 100644 index 6a35329685..0000000000 --- a/app/code/core/Mage/Usa/etc/wsdl/FedEx/ShipService_v10.wsdl +++ /dev/null @@ -1,5472 +0,0 @@ - - - - - - - - - - - - - - - - - - Specifies additional labels to be produced. All required labels for shipments will be produced without the need to request additional labels. These are only available as thermal labels. - - - - - The type of additional labels to return. - - - - - The number of this type label to return - - - - - - - Identifies the type of additional labels. - - - - - - - - - - - - - - - - Descriptive data for a physical location. May be used as an actual physical address (place to which one could go), or as a container of "address parts" which should be handled as a unit (such as a city-state-ZIP combination within the US). - - - - - Combination of number, street name, etc. At least one line is required for a valid physical address; empty lines should not be included. - - - - - Name of city, town, etc. - - - - - Identifying abbreviation for US state, Canada province, etc. Format and presence of this field will vary, depending on country. - - - - - Identification of a region (usually small) for mail/package delivery. Format and presence of this field will vary, depending on country. - - - - - Relevant only to addresses in Puerto Rico. - - - - - The two-letter code used to identify a country. - - - - - Indicates whether this address residential (as opposed to commercial). - - - - - - - - - Position of Astra element - - - - - Content corresponding to the Astra Element - - - - - - - - Specifies which filing option is being exercised by the customer. - Required for non-document shipments originating in Canada destined for any country other than Canada, the United States, Puerto Rico or the U.S. Virgin Islands. - - - - - - - - - - - - Identification of the type of barcode (symbology) used on FedEx documents and labels. - - - - - - - - - - Each instance of this data type represents a barcode whose content must be represented as binary data (i.e. not ASCII text). - - - - - The kind of barcode data in this instance. - - - - - The data content of this instance. - - - - - - - - - - - - - - - - - - - - Descriptive data sent to FedEx by a customer in order to Cancel a Pending shipment. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - - - - Identification of a FedEx operating company (transportation). - - - - - - - - - - - - - The instructions indicating how to print the Certificate of Origin ( e.g. whether or not to include the instructions, image type, etc ...) - - - - - Specifies characteristics of a shipping document to be produced. - - - - - Specifies the usage and identification of customer supplied images to be used on this document. - - - - - - - Specifies the type of brokerage to be applied to a shipment. - - - - - - - - - - - - Descriptive data for the client submitting a transaction. - - - - - The FedEx account number associated with this transaction. - - - - - This number is assigned by FedEx and identifies the unique device from which the request is originating - - - - - Only used in transactions which require identification of the Fed Ex Office integrator. - - - - - The language to be used for human-readable Notification.localizedMessages in responses to the request containing this ClientDetail object. Different requests from the same client may contain different Localization data. (Contrast with TransactionDetail.localization, which governs data payload language/translation.) - - - - - - - Identifies what freight charges should be added to the COD collect amount. - - - - - - - - - - - - - - - - - - - Identifies the type of funds FedEx should collect upon shipment delivery. - - - - - - - - - - - - Descriptive data required for a FedEx COD (Collect-On-Delivery) shipment. - - - - - - Identifies if freight charges are to be added to the COD amount. This element determines which freight charges should be added to the COD collect amount. See CodAddTransportationChargesType for a list of valid enumerated values. - - - - - Identifies the type of funds FedEx should collect upon package delivery - - - - - For Express this is the descriptive data that is used for the recipient of the FedEx Letter containing the COD payment. For Ground this is the descriptive data for the party to receive the payment that prints the COD receipt. - - - - - Indicates which type of reference information to include on the COD return shipping label. - - - - - - - - - The COD amount (after any accumulations) that must be collected upon delivery of a package shipped using the COD special service. - - - - - - Contains the data which form the Astra and 2DCommon barcodes that print on the COD return label. - - - - - The label image or printer commands to print the label. - - - - - - - Indicates which type of reference information to include on the COD return shipping label. - - - - - - - - - - - - - The COD amount (after any accumulations) that must be collected upon delivery of a package shipped using the COD special service. - - - - - Currently not supported. - - TBD - - - - - - The description of the FedEx service type used for the COD return shipment. Currently not supported. - - 70 - - - - - - The description of the packaging used for the COD return shipment. - - 40 - - - - - - Currently not supported. - - TBD - - - - - - Currently not supported. - - - - - Currently not supported. - - - - - - The CodRoutingDetail element will contain the COD return tracking number and form id. In the case of a COD multiple piece shipment these will need to be inserted in the request for the last piece of the multiple piece shipment. - The service commitment is the only other element of the RoutingDetail that is used for a CodRoutingDetail. - - - - - - Contains the data which form the Astra and 2DCommon barcodes that print on the COD return label. - - - - - The label image or printer commands to print the label. - - - - - - - CommercialInvoice element is required for electronic upload of CI data. It will serve to create/transmit an Electronic Commercial Invoice through the FedEx Systems. Customers are responsible for printing their own Commercial Invoice.If you would likeFedEx to generate a Commercial Invoice and transmit it to Customs. for clearance purposes, you need to specify that in the ShippingDocumentSpecification element. If you would like a copy of the Commercial Invoice that FedEx generated returned to you in reply it needs to be specified in the ETDDetail/RequestedDocumentCopies element. Commercial Invoice support consists of maximum of 99 commodity line items. - - - - - Any comments that need to be communicated about this shipment. - - - - - Any freight charges that are associated with this shipment. - - - - - Any taxes or miscellaneous charges(other than Freight charges or Insurance charges) that are associated with this shipment. - - - - - Any packing costs that are associated with this shipment. - - - - - Any handling costs that are associated with this shipment. - - - - - Free-form text. - - - - - Free-form text. - - - - - Free-form text. - - - - - The reason for the shipment. Note: SOLD is not a valid purpose for a Proforma Invoice. - - - - - Customer assigned Invoice number - - - - - Name of the International Expert that completed the Commercial Invoice different from Sender. - - - - - Required for dutiable international Express or Ground shipment. This field is not applicable to an international PIB(document) or a non-document which does not require a Commercial Invoice - - - - - - - The instructions indicating how to print the Commercial Invoice( e.g. image type) Specifies characteristics of a shipping document to be produced. - - - - - - Specifies the usage and identification of a customer supplied image to be used on this document. - - - - - - - - For international multiple piece shipments, commodity information must be passed in the Master and on each child transaction. - If this shipment cotains more than four commodities line items, the four highest valued should be included in the first 4 occurances for this request. - - - - - - Name of this commodity. - - - - - Total number of pieces of this commodity - - - - - Complete and accurate description of this commodity. - - 450 - - - - - - Country code where commodity contents were produced or manufactured in their final form. - - 2 - - - - - - - Unique alpha/numeric representing commodity item. - At least one occurrence is required for US Export shipments if the Customs Value is greater than $2500 or if a valid US Export license is required. - - - 14 - - - - - - Total weight of this commodity. 1 explicit decimal position. Max length 11 including decimal. - - - - - Number of units of a commodity in total number of pieces for this line item. Max length is 9 - - - - - Unit of measure used to express the quantity of this commodity line item. - - 3 - - - - - - Contains only additional quantitative information other than weight and quantity to calculate duties and taxes. - - - - - Value of each unit in Quantity. Six explicit decimal positions, Max length 18 including decimal. - - - - - - Total customs value for this line item. - It should equal the commodity unit quantity times commodity unit value. - Six explicit decimal positions, max length 18 including decimal. - - - - - - Defines additional characteristic of commodity used to calculate duties and taxes - - - - - Applicable to US export shipping only. - - 12 - - - - - - - Date of expiration. Must be at least 1 day into future. - The date that the Commerce Export License expires. Export License commodities may not be exported from the U.S. on an expired license. - Applicable to US Export shipping only. - Required only if commodity is shipped on commerce export license, and Export License Number is supplied. - - - - - - - An identifying mark or number used on the packaging of a shipment to help customers identify a particular shipment. - - - 15 - - - - - - All data required for this commodity in NAFTA Certificate of Origin. - - - - - - - - - The identifier for all clearance documents associated with this shipment. - - - - - - - - - - Identifies the branded location name, the hold at location phone number and the address of the location. - - - - - Identifies the type of FedEx location. - - - - - - - - - The package sequence number of this package in a multiple piece shipment. - - - - - The Tracking number and form id for this package. - - - - - Used with request containing PACKAGE_GROUPS, to identify which group of identical packages was used to produce a reply item. - - - - - Oversize class for this package. - - - - - All package-level rating data for this package, which may include data for multiple rate types. - - - - - Associated with package, due to interaction with per-package hazardous materials presence/absence. - - - - - The data that is used to from the Astra and 2DCommon barcodes for the label.. - - - - - The textual description of the special service applied to the package. - - - - - - The label image or printer commands to print the label. - - - - - All package-level shipping documents (other than labels and barcodes). For use in loads after January, 2008. - - - - - Information about the COD return shipment. - - - - - Actual signature option applied, to allow for cases in which the original value conflicted with other service features in the shipment. - - - - - Documents the kinds and quantities of all hazardous commodities in the current package, using updated hazardous commodity description data. - - - - - - - - - Indicates whether or not this is a US Domestic shipment. - - - - - Indicates the carrier that will be used to deliver this shipment. - - - - - The master tracking number and form id of this multiple piece shipment. This information is to be provided for each subsequent of a multiple piece shipment. - - - - - Description of the FedEx service used for this shipment. Currently not supported. - - 70 - - - - - - Description of the packaging used for this shipment. Currently not supported. - - 40 - - - - - - Information about the routing, origin, destination and delivery of a shipment. - - - - - Only used with pending shipments. - - - - - Only used in the reply to tag requests. - - - - - Provides reply information specific to SmartPost shipments. - - - - - All shipment-level rating data for this shipment, which may include data for multiple rate types. - - - - - Information about the COD return shipment. - - - - - Returns the default holding location information when HOLD_AT_LOCATION special service is requested and the client does not specify the hold location address. - - - - - Indicates whether or not this shipment is eligible for a money back guarantee. - - - - - Returns any defaults or updates applied to RequestedShipment.exportDetail.exportComplianceStatement. - - - - - - All shipment-level shipping documents (other than labels and barcodes). - - - - - Package level details about this package. - - - - - - - Provides reply information specific to SmartPost shipments. - - - - - Identifies the carrier that will pick up the SmartPost shipment. - - - - - Indicates whether the shipment is deemed to be machineable, based on dimensions, weight, and packaging. - - - - - - - Provides reply information specific to a tag request. - - - - - . - - - - - As of June 2007, returned only for FedEx Express services. - - - - - As of June 2007, returned only for FedEx Express services. - - - - - As of June 2007, returned only for FedEx Express services. - - - - - As of June 2007, returned only for FedEx Express services. - - - - - FEDEX INTERNAL USE ONLY: for use by INET. - - - - - - - Defines additional data to print in the Configurable portion of the label, this allows you to print the same type information on the label that can also be printed on the doc tab. - - - - - 1 of 12 possible zones to position data. - - - - - The identifiying text for the data in this zone. - - - - - A reference to a field in either the request or reply to print in this zone following the header. - - - - - A literal value to print after the header in this zone. - - - - - - - The descriptive data for a point-of-contact person. - - - - - Client provided identifier corresponding to this contact information. - - - - - Identifies the contact person's name. - - - - - Identifies the contact person's title. - - - - - Identifies the company this contact is associated with. - - - - - Identifies the phone number associated with this contact. - - - - - Identifies the phone extension associated with this contact. - - - - - Identifies the pager number associated with this contact. - - - - - Identifies the fax number associated with this contact. - - - - - Identifies the email address associated with this contact. - - - - - - - - - - - - - Content Record. - - - - - Part Number. - - - - - Item Number. - - - - - Received Quantity. - - - - - Description. - - - - - - - Reply to the Close Request transaction. The Close Reply bring back the ASCII data buffer which will be used to print the Close Manifest. The Manifest is essential at the time of pickup. - - - - - Identifies the highest severity encountered when executing the request; in order from high to low: FAILURE, ERROR, WARNING, NOTE, SUCCESS. - - - - - The descriptive data detailing the status of a sumbitted transaction. - - - - - Descriptive data that governs data payload language/translations. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - The reply payload. All of the returned information about this shipment/package. - - - - - - - Create Pending Shipment Request - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - The descriptive data identifying the client submitting the transaction. - - - - - The descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Descriptive data about the shipment being sent by the requestor. - - - - - - - Currency exchange rate information. - - - - - The currency code for the original (converted FROM) currency. - - - - - The currency code for the final (converted INTO) currency. - - - - - Multiplier used to convert fromCurrency units to intoCurrency units. - - - - - - - - - Indicates the type of custom delivery being requested. - - - - - Time by which delivery is requested. - - - - - Range of dates for custom delivery request; only used if type is BETWEEN. - - - - - Date for custom delivery request; only used for types of ON, BETWEEN, or AFTER. - - - - - - - - - - - - - - - Data required to produce a custom-specified document, either at shipment or package level. - - - - - Common information controlling document production. - - - - - Applicable only to documents produced on thermal printers with roll stock. - - - - - Applicable only to documents produced on thermal printers with roll stock. - - - - - Identifies the formatting specification used to construct this custom document. - - - - - Identifies the individual document specified by the client. - - - - - If provided, thermal documents will include specified doc tab content. If omitted, document will be produced without doc tab content. - - - - - - - Constructed string, based on format and zero or more data fields, printed in specified barcode symbology. - - - - - - - - - Width of thinnest bar/space element in the barcode. - - - - - - - - Solid (filled) rectangular area on label. - - - - - - - - - Valid values for CustomLabelCoordinateUnits - - - - - - - - - - - - - - - - - - Image to be included from printer's memory, or from a local file for offline clients. - - - - - - Printer-specific index of graphic image to be printed. - - - - - Fully-qualified path and file name for graphic image to be printed. - - - - - - - - - Horizontal position, relative to left edge of custom area. - - - - - Vertical position, relative to top edge of custom area. - - - - - - - Constructed string, based on format and zero or more data fields, printed in specified printer font (for thermal labels) or generic font/size (for plain paper labels). - - - - - - - - Printer-specific font name for use with thermal printer labels. - - - - - Generic font name for use with plain paper labels. - - - - - Generic font size for use with plain paper labels. - - - - - - - - - - - - - - - - - - - Reference information to be associated with this package. - - - - - The reference type to be associated with this reference data. - - - - - - - - The types of references available for use. - - - - - - - - - - - - - - - - Allows customer-specified control of label content. - - - - - If omitted, no doc tab will be produced (i.e. default = former NONE type). - - - - - Defines any custom content to print on the label. - - - - - Defines additional data to print in the Configurable portion of the label, this allows you to print the same type information on the label that can also be printed on the doc tab. - - - - - Controls which data/sections will be suppressed. - - - - - Customer-provided SCNC for use with label-data-only processing of FedEx Ground shipments. - - - - - - Controls the number of additional copies of supplemental labels. - - - - - This value reduces the default quantity of destination/consignee air waybill labels. A value of zero indicates no change to default. A minimum of one copy will always be produced. - - - - - - - - - - Interacts both with properties of the shipment and contractual relationship with the shipper. - - - - - - Specifies how the recipient is identified for customs purposes; the requirements on this information vary with destination country. - - - - - - - - Identifies responsibilities with respect to loss, damage, etc. - - - - - Documents amount paid to third party for coverage of shipment content. - - - - - - - - - - - - - - - - - - The descriptive data required for a FedEx shipment containing dangerous goods (hazardous materials). - - - - - Identifies whether or not the products being shipped are required to be accessible during delivery. - - - - - Shipment is packaged/documented for movement ONLY on cargo aircraft. - - - - - Indicates which kinds of hazardous content are in the current package. - - - - - Documents the kinds and quantities of all hazardous commodities in the current package. - - - - - Description of the packaging of this commodity, suitable for use on OP-900 and OP-950 forms. - - - - - Telephone number to use for contact in the event of an emergency. - - - - - Offeror's name or contract number, per DOT regulation. - - - - - - - - - The beginning date in a date range. - - - - - The end date in a date range. - - - - - - - Valid values for DayofWeekType - - - - - - - - - - - - - - Descriptive data sent to FedEx by a customer in order to delete a package. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - The timestamp of the shipment request. - - - - - Identifies the FedEx tracking number of the package being cancelled. - - - - - Determines the type of deletion to be performed in relation to package level vs shipment level. - - - - - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Only used for tags which had FedEx Express services. - - - - - Only used for tags which had FedEx Express services. - - - - - If the original ProcessTagRequest specified third-party payment, then the delete request must contain the same pay type and payor account number for security purposes. - - - - - Also known as Pickup Confirmation Number or Dispatch Number - - - - - - - Specifies the type of deletion to be performed on a shipment. - - - - - - - - - - Data required to complete the Destionation Control Statement for US exports. - - - - - List of applicable Statment types. - - - - - Comma-separated list of up to four country codes, required for DEPARTMENT_OF_STATE statement. - - - - - Name of end user, required for DEPARTMENT_OF_STATE statement. - - - - - - - Used to indicate whether the Destination Control Statement is of type Department of Commerce, Department of State or both. - - - - - - - - - The dimensions of this package and the unit type used for the measurements. - - - - - - - - - - - - - The DocTabContentType options available. - - - - - The DocTabContentType should be set to ZONE001 to specify additional Zone details. - - - - - The DocTabContentType should be set to BARCODED to specify additional BarCoded details. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Zone number can be between 1 and 12. - - - - - Header value on this zone. - - - - - Reference path to the element in the request/reply whose value should be printed on this zone. - - - - - Free form-text to be printed in this zone. - - - - - Justification for the text printed on this zone. - - - - - - - Identifies the method by which the package is to be tendered to FedEx. This element does not dispatch a courier for package pickup. - - - - - - - - - - - - Describes specific information about the email label shipment. - - - - - Notification email will be sent to this email address - - - - - Message to be sent in the notification email - - - - - - - - - - - - - Information describing email notifications that will be sent in relation to events that occur during package movement - - - - - Specifies whether/how email notifications are grouped. - - - - - A message that will be included in the email notifications - - - - - Information describing the destination of the email, format of the email and events to be notified on - - - - - - - The format of the email - - - - - - - - - - The descriptive data for a FedEx email notification recipient. - - - - - Identifies the relationship this email recipient has to the shipment. - - - - - The email address to send the notification to - - - - - Notify the email recipient when this shipment has been shipped. - - - - - Notify the email recipient if this shipment encounters a problem while in route - - - - - Notify the email recipient when this shipment has been delivered. - - - - - The format of the email notification. - - - - - The language/locale to be used in this email notification. - - - - - - - Identifies the set of valid email notification recipient types. For SHIPPER, RECIPIENT and BROKER the email address asssociated with their definitions will be used, any email address sent with the email notification for these three email notification recipient types will be ignored. - - - - - - - - - - - - - - - - - - - - - Customer-declared value, with data type and legal values depending on excise condition, used in defining the taxable value of the item. - - - - - - - Specifies the types of Estimated Duties and Taxes to be included in a rate quotation for an international shipment. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Specifies the client-requested response in the event of errors within shipment. - PACKAGE_ERROR_LABELS : Return per-package error label in addition to error Notifications. - STANDARD : Return error Notifications only. - - - - - - - - - - Electronic Trade document references used with the ETD special service. - - - - - Indicates the types of shipping documents produced for the shipper by FedEx (see ShippingDocumentSpecification) which should be copied back to the shipper in the shipment result data. - - - - - - - - Country specific details of an International shipment. - - - - - - Specifies which filing option is being exercised by the customer. - Required for non-document shipments originating in Canada destined for any country other than Canada, the United States, Puerto Rico or the U.S. Virgin Islands. - - - - - - General field for exporting-country-specific export data (e.g. B13A for CA, FTSR Exemption or AES Citation for US). - - - - - This field is applicable only to Canada export non-document shipments of any value to any destination. No special characters allowed. - - 10 - - - - - - Department of Commerce/Department of State information about this shipment. - - - - - - - Details specific to an Express freight shipment. - - - - - Indicates whether or nor a packing list is enclosed. - - - - - - Total shipment pieces. - e.g. 3 boxes and 3 pallets of 100 pieces each = Shippers Load and Count of 303. - Applicable to International Priority Freight and International Economy Freight. - Values must be in the range of 1 - 99999 - - - - - - Required for International Freight shipping. Values must be 8- 12 characters in length. - - 12 - - - - - - - - Identifies a kind of FedEx facility. - - - - - - - - - - - - - - - - Data required to produce the Freight handling-unit-level address labels. Note that the number of UNIQUE labels (the N as in 1 of N, 2 of N, etc.) is determined by total handling units. - - - - - - Indicates the number of copies to be produced for each unique label. - - - - - If omitted, no doc tab will be produced (i.e. default = former NONE type). - - - - - - - Individual charge which contributes to the total base charge for the shipment. - - - - - Freight class for this line item. - - - - - Effective freight class used for rating this line item. - - - - - NMFC Code for commodity. - - - - - Customer-provided description for this commodity or class line. - - - - - Weight for this commodity or class line. - - - - - Rate or factor applied to this line item. - - - - - Identifies the manner in which the chargeRate for this line item was applied. - - - - - The net or extended charge for this line item. - - - - - - - - - - - - - - These values represent the industry-standard freight classes used for FedEx Freight and FedEx National Freight shipment description. (Note: The alphabetic prefixes are required to distinguish these values from decimal numbers on some client platforms.) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Identifies responsibilities with respect to loss, damage, etc. - - - - - - - - - Rate data specific to FedEx Freight or FedEx National Freight services. - - - - - A unique identifier for a specific rate quotation. - - - - - Freight charges which accumulate to the total base charge for the shipment. - - - - - Human-readable descriptions of additional information on this shipment rating. - - - - - - - Additional non-monetary data returned with Freight rates. - - - - - Unique identifier for notation. - - - - - Human-readable explanation of notation. - - - - - - - Data applicable to shipments using FEDEX_FREIGHT and FEDEX_NATIONAL_FREIGHT services. - - - - - Account number used with FEDEX_FREIGHT service. - - - - - Used for validating FedEx Freight account number and (optionally) identifying third party payment on the bill of lading. - - - - - Identification values to be printed during creation of a Freight bill of lading. - - - - - Indicates the role of the party submitting the transaction. - - - - - Designates which of the requester's tariffs will be used for rating. - - - - - Designates the terms of the "collect" payment for a Freight Shipment. - - - - - Identifies the declared value for the shipment - - - - - Identifies the declared value units corresponding to the above defined declared value - - - - - - Identifiers for promotional discounts offered to customers. - - - - - Total number of individual handling units in the entire shipment (for unit pricing). - - - - - Estimated discount rate provided by client for unsecured rate quote. - - - - - Total weight of pallets used in shipment. - - - - - Overall shipment dimensions. - - - - - Description for the shipment. - - - - - Specifies which party will pay surcharges for any special services which support split billing. - - - - - Must be populated if any line items contain hazardous materials. - - - - - Details of the commodities in the shipment. - - - - - - - Description of an individual commodity or class of content in a shipment. - - - - - Freight class for this line item. - - - - - FEDEX INTERNAL USE ONLY: for FedEx system that estimate freight class from customer-provided dimensions and weight. - - - - - Number of individual handling units to which this line applies. (NOTE: Total of line-item-level handling units may not balance to shipment-level total handling units.) - - - - - Specification of handling-unit packaging for this commodity or class line. - - - - - Number of pieces for this commodity or class line. - - - - - NMFC Code for commodity. - - - - - Indicates the kind of hazardous material content in this line item. - - - - - For printed reference per line item. - - - - - For printed reference per line item. - - - - - Customer-provided description for this commodity or class line. - - - - - Weight for this commodity or class line. - - - - - FED EX INTERNAL USE ONLY - Individual line item dimensions. - - - - - Volume (cubic measure) for this commodity or class line. - - - - - - - Indicates the role of the party submitting the transaction. - - - - - - - - - - Specifies which party will be responsible for payment of any surcharges for Freight special services for which split billing is allowed. - - - - - Identifies the special service. - - - - - Indicates who will pay for the special service. - - - - - - - Data required to produce a General Agency Agreement document. Remaining content (business data) to be defined once requirements have been completed. - - - - - - - - Documents the kind and quantity of an individual hazardous commodity in a package. - - - - - Identifies and describes an individual hazardous commodity. - - - - - Specifies the amount of the commodity in alternate units. - - - - - Customer-provided specifications for handling individual commodities. - - - - - - - Identifies and describes an individual hazardous commodity. For 201001 load, this is based on data from the FedEx Ground Hazardous Materials Shipping Guide. - - - - - Regulatory identifier for a commodity (e.g. "UN ID" value). - - - - - - - - - - - - - Specifies how the commodity is to be labeled. - - - - - - - - - - Customer-provided specifications for handling individual commodities. - - - - - Specifies how the customer wishes the label text to be handled for this commodity in this package. - - - - - Text used in labeling the commodity under control of the labelTextOption field. - - - - - - - Indicates which kind of hazardous content (as defined by DOT) is being reported. - - - - - - - - - - - - Identifies number and type of packaging units for hazardous commodities. - - - - - Number of units of the type below. - - - - - Units in which the hazardous commodity is packaged. - - - - - - - Identifies DOT packing group for a hazardous commodity. - - - - - - - - - - Identifies amount and units for quantity of hazardous commodities. - - - - - Number of units of the type below. - - - - - Units by which the hazardous commodity is measured. - - - - - - - Descriptive data required for a FedEx shipment that is to be held at the destination FedEx location for pickup by the recipient. - - - - - Contact phone number for recipient of shipment. - - - - - Contact and address of FedEx facility at which shipment is to be held. - - - - - Type of facility at which package/shipment is to be held. - - - - - - - The descriptive data required by FedEx for home delivery services. - - - - - The type of Home Delivery Premium service being requested. - - - - - Required for Date Certain Home Delivery. - - - - - Required for Date Certain and Appointment Home Delivery. - - 15 - - - - - - - - The type of Home Delivery Premium service being requested. - - - - - - - - - - - - - - - - - - - The type of International shipment. - - - - - - - - - - Specifies the type of label to be returned. - - - - - - - - - - - Names for data elements / areas which may be suppressed from printing on labels. - - - - - - - - - - - - This indicates if the top or bottom of the label comes out of the printer first. - - - - - - - - - Relative to normal orientation for the printer. - - - - - - - - - - - Description of shipping label to be returned in the reply - - - - - Specifies how to create, organize, and return the document. - - - - - Specify type of label to be returned - - - - - Specifies the image format used for a shipping document. - - - - - For thermal printer lables this indicates the size of the label and the location of the doc tab if present. - - - - - This indicates if the top or bottom of the label comes out of the printer first. - - - - - If present, this contact and address information will replace the return address information on the label. - - - - - Allows customer-specified control of label content. - - - - - - - For thermal printer labels this indicates the size of the label and the location of the doc tab if present. - - - - - - - - - - - - - - - - - - - - - - - Identifies the Liability Coverage Amount. For Jan 2010 this value represents coverage amount per pound - - - - - - - - - - - - - Represents a one-dimensional measurement in small units (e.g. suitable for measuring a package or document), contrasted with Distance, which represents a large one-dimensional measurement (e.g. distance between cities). - - - - - The numerical quantity of this measurement. - - - - - The units for this measurement. - - - - - - - CM = centimeters, IN = inches - - - - - - - - - Identifies the representation of human-readable text. - - - - - Two-letter code for language (e.g. EN, FR, etc.) - - - - - Two-letter code for the region (e.g. us, ca, etc..). - - - - - - - - - - - - - Identifies which type minimum charge was applied. - - - - - - - - - - - - The descriptive data for the medium of exchange for FedEx services. - - - - - Identifies the currency of the monetary amount. - - 3 - - - - - - Identifies the monetary amount. - - - - - - - Data required to produce a Certificate of Origin document. Remaining content (business data) to be defined once requirements have been completed. - - - - - - - Indicates which Party (if any) from the shipment is to be used as the source of importer data on the NAFTA COO form. - - - - - Contact information for "Authorized Signature" area of form. - - - - - - - - - - This element is currently not supported and is for the future use. - - - - - Defined by NAFTA regulations. - - - - - Defined by NAFTA regulations. - - - - - Identification of which producer is associated with this commodity (if multiple producers are used in a single shipment). - - - - - - Date range over which RVC net cost was calculated. - - - - - - - - - - - - - - - Net cost method used. - - - - - - - - - See instructions for NAFTA Certificate of Origin for code definitions. - - - - - - - - - - - - - This element is currently not supported and is for the future use. - - - - - - - - - See instructions for NAFTA Certificate of Origin for code definitions. - - - - - - - - - - - This element is currently not supported and is for the future use. - - - - - - - - - - - - The descriptive data regarding the result of the submitted transaction. - - - - - The severity of this notification. This can indicate success or failure or some other information about the request. The values that can be returned are SUCCESS - Your transaction succeeded with no other applicable information. NOTE - Additional information that may be of interest to you about your transaction. WARNING - Additional information that you need to know about your transaction that you may need to take action on. ERROR - Information about an error that occurred while processing your transaction. FAILURE - FedEx was unable to process your transaction at this time due to a system failure. Please try again later - - - - - Indicates the source of this notification. Combined with the Code it uniquely identifies this notification - - - - - A code that represents this notification. Combined with the Source it uniquely identifies this notification. - - - - - Human-readable text that explains this notification. - - - - - The translated message. The language and locale specified in the ClientDetail. Localization are used to determine the representation. Currently only supported in a TrackReply. - - - - - A collection of name/value pairs that provide specific data to help the client determine the nature of an error (or warning, etc.) witout having to parse the message string. - - - - - - - - - Identifies the type of data contained in Value (e.g. SERVICE_TYPE, PACKAGE_SEQUENCE, etc..). - - - - - The value of the parameter (e.g. PRIORITY_OVERNIGHT, 2, etc..). - - - - - - - Identifies the set of severity values for a Notification. - - - - - - - - - - - - The instructions indicating how to print the OP-900 form for hazardous materials packages. - - - - - Specifies characteristics of a shipping document to be produced. - - - - - Identifies which reference type (from the package's customer references) is to be used as the source for the reference on this OP-900. - - - - - Specifies the usage and identification of customer supplied images to be used on this document. - - - - - Data field to be used when a name is to be printed in the document instead of (or in addition to) a signature image. - - - - - - - The oversize class types. - - - - - - - - - - Each instance of this data type represents the set of barcodes (of all types) which are associated with a specific package. - - - - - Binary-style barcodes for this package. - - - - - String-style barcodes for this package. - - - - - - - Data for a package's rates, as calculated per a specific rate type. - - - - - Type used for this specific set of rate data. - - - - - Indicates which weight was used. - - - - - INTERNAL FEDEX USE ONLY. - - - - - The weight that was used to calculate the rate. - - - - - The dimensional weight of this package (if greater than actual). - - - - - The oversize weight of this package (if the package is oversize). - - - - - The transportation charge only (prior to any discounts applied) for this package. - - - - - The sum of all discounts on this package. - - - - - This package's baseCharge - totalFreightDiscounts. - - - - - The sum of all surcharges on this package. - - - - - This package's netFreight + totalSurcharges (not including totalTaxes). - - - - - The sum of all taxes on this package. - - - - - This package's netFreight + totalSurcharges + totalTaxes. - - - - - The total sum of all rebates applied to this package. - - - - - All rate discounts that apply to this package. - - - - - All rebates that apply to this package. - - - - - All surcharges that apply to this package (either because of characteristics of the package itself, or because it is carrying per-shipment surcharges for the shipment of which it is a part). - - - - - All taxes applicable (or distributed to) this package. - - - - - The variable handling charges calculated based on the type variable handling charges requested. - - - - - - - This class groups together for a single package all package-level rate data (across all rate types) as part of the response to a shipping request, which groups shipment-level data together and groups package-level data by package. - - - - - This rate type identifies which entry in the following array is considered as presenting the "actual" rates for the package. - - - - - The "list" net charge minus "actual" net charge. - - - - - Each element of this field provides package-level rate data for a specific rate type. - - - - - - - Identifies the collection of special service offered by FedEx. BROKER_SELECT_OPTION should be used for Ground shipments only. - - - - - - - - - - - - - - These special services are available at the package level for some or all service types. If the shipper is requesting a special service which requires additional data, the package special service type must be present in the specialServiceTypes collection, and the supporting detail must be provided in the appropriate sub-object below. - - - - - The types of all special services requested for the enclosing shipment or package. - - - - - For use with FedEx Ground services only; COD must be present in shipment's special services. - - - - - Descriptive data required for a FedEx shipment containing dangerous materials. This element is required when SpecialServiceType.DANGEROUS_GOODS or HAZARDOUS_MATERIAL is present in the SpecialServiceTypes collection. - - - - - Descriptive data required for a FedEx shipment containing dry ice. This element is required when SpecialServiceType.DRY_ICE is present in the SpecialServiceTypes collection. - - - - - The descriptive data required for FedEx signature services. This element is required when SpecialServiceType.SIGNATURE_OPTION is present in the SpecialServiceTypes collection. - - - - - The descriptive data required for FedEx Priority Alert service. This element is required when SpecialServiceType.PRIORITY_ALERT is present in the SpecialServiceTypes collection. - - - - - - - Identifies the collection of available FedEx or customer packaging options. - - - - - - - - - - - - - - The descriptive data for a person or company entitiy doing business with FedEx. - - - - - Identifies the FedEx account number assigned to the customer. - - 12 - - - - - - - Descriptive data identifying the point-of-contact person. - - - - - The descriptive data for a physical location. - - - - - - - The descriptive data for the monetary compensation given to FedEx for services rendered to the customer. - - - - - Identifies the method of payment for a service. See PaymentType for list of valid enumerated values. - - - - - Descriptive data identifying the party responsible for payment for a service. - - - - - - - Identifies the method of payment for a service. - - - - - - - - - - - The descriptive data identifying the party responsible for payment for a service. - - - - - Identifies the FedEx account number assigned to the payor. - - 12 - - - - - - Identifies the country of the payor. - - 2 - - - - - - - - This information describes how and when a pending shipment may be accessed for completion. - - - - - Only for pending shipment type of "EMAIL" - - - - - Only for pending shipment type of "EMAIL" - - - - - Only for pending shipment type of "EMAIL" - - - - - This element is currently not supported and is for the future use. - - - - - - - This information describes the kind of pending shipment being requested. - - - - - Identifies the type of FedEx pending shipment - - - - - Date after which the pending shipment will no longer be available for completion. - - - - - Only used with type of EMAIL. - - - - - - - Identifies the type of service for a pending shipment. - - - - - - - - This enumeration rationalizes the former FedEx Express international "admissibility package" types (based on ANSI X.12) and the FedEx Freight packaging types. The values represented are those common to both carriers. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This class describes the pickup characteristics of a shipment (e.g. for use in a tag request). - - - - - - - - Identifies the type of Pickup request - - - - - Identifies the type of source for Pickup request - - - - - - - Identifies the type of source for pickup request service. - - - - - - - - - Identifies the type of pickup request service. - - - - - - - - - Identifies the type of pricing used for this shipment. - - - - - - - - - - - - - - - - - - - - Represents a reference identifier printed on Freight bills of lading - - - - - - - - - Identifies a particular reference identifier printed on a Freight bill of lading. - - - - - - - - - - - - - - - - This indicates the highest level of severity of all the notifications returned in this reply - - - - - The descriptive data regarding the results of the submitted transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - The reply payload. All of the returned information about this shipment/package. - - - - - Empty unless error label behavior is PACKAGE_ERROR_LABELS and one or more errors occured during transaction processing. - - - - - - - Descriptive data sent to FedEx by a customer in order to ship a package. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Descriptive data about the shipment being sent by the requestor. - - - - - - - - - - - - - - - - Descriptive data sent to FedEx by a customer in order to ship a package. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Descriptive data about the shipment being sent by the requestor. - - - - - - - Test for the Commercial Invoice. Note that Sold is not a valid Purpose for a Proforma Invoice. - - - - - - - - - - - - - Indicates the reason that a dim divisor value was chose. - - - - - - - - - - - - Identifies a discount applied to the shipment. - - - - - Identifies the type of discount applied to the shipment. - - - - - - The amount of the discount applied to the shipment. - - - - - The percentage of the discount applied to the shipment. - - - - - - - The type of the discount. - - - - - - - - - - - - - Identifies the type(s) of rates to be returned in the reply. - - - - - - - - - - The weight method used to calculate the rate. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Specifies how the recipient is identified for customs purposes; the requirements on this information vary with destination country. - - - - - Specifies the kind of identification being used. - - - - - Contains the actual ID value, of the type specified above. - - - - - - - Type of Brazilian taxpayer identifier provided in Recipient/TaxPayerIdentification/Number. For shipments bound for Brazil this overrides the value in Recipient/TaxPayerIdentification/TinType - - - - - - - - - - FOOD_OR_PERISHABLE is required by FDA/BTA; must be true for food/perishable items coming to US or PR from non-US/non-PR origin - - - - - - - - - - - - - - - - - This class rationalizes RequestedPackage and RequestedPackageSummary from previous interfaces. The way in which it is uses within a RequestedShipment depends on the RequestedPackageDetailType value specified for that shipment. - - - - - Used only with INDIVIDUAL_PACKAGE, as a unique identifier of each requested package. - - - - - Used only with PACKAGE_GROUPS, as a unique identifier of each group of identical packages. - - - - - Used only with PACKAGE_GROUPS, as a count of packages within a group of identical packages. - - - - - - Only used for INDIVIDUAL_PACKAGES and PACKAGE_GROUPS. Ignored for PACKAGE_SUMMARY, in which case totalInsuredValue and packageCount on the shipment will be used to determine this value. - - - - - Only used for INDIVIDUAL_PACKAGES and PACKAGE_GROUPS. Ignored for PACKAGE_SUMMARY, in which case totalweight and packageCount on the shipment will be used to determine this value. - - - - - - Provides additional detail on how the customer has physically packaged this item. As of June 2009, required for packages moving under international and SmartPost services. - - - - - Human-readable text describing the package. - - - - - - - Only used for INDIVIDUAL_PACKAGES and PACKAGE_GROUPS. - - - - - - - The descriptive data for the shipment being tendered to FedEx. - - - - - Identifies the date and time the package is tendered to FedEx. Both the date and time portions of the string are expected to be used. The date should not be a past date or a date more than 10 days in the future. The time is the local time of the shipment based on the shipper's time zone. The date component must be in the format: YYYY-MM-DD (e.g. 2006-06-26). The time component must be in the format: HH:MM:SS using a 24 hour clock (e.g. 11:00 a.m. is 11:00:00, whereas 5:00 p.m. is 17:00:00). The date and time parts are separated by the letter T (e.g. 2006-06-26T17:00:00). There is also a UTC offset component indicating the number of hours/mainutes from UTC (e.g 2006-06-26T17:00:00-0400 is defined form June 26, 2006 5:00 pm Eastern Time). - - - - - Identifies the method by which the package is to be tendered to FedEx. This element does not dispatch a courier for package pickup. See DropoffType for list of valid enumerated values. - - - - - Identifies the FedEx service to use in shipping the package. See ServiceType for list of valid enumerated values. - - - - - Identifies the packaging used by the requestor for the package. See PackagingType for list of valid enumerated values. - - - - - Identifies the total weight of the shipment being conveyed to FedEx.This is only applicable to International shipments and should only be used on the first package of a mutiple piece shipment.This value contains 1 explicit decimal position - - - - - Total insured amount. - - - - - - Descriptive data identifying the party responsible for shipping the package. Shipper and Origin should have the same address. - - - - - Descriptive data identifying the party receiving the package. - - - - - A unique identifier for a recipient location - - 10 - - - - - - Physical starting address for the shipment, if different from shipper's address. - - - - - Descriptive data indicating the method and means of payment to FedEx for providing shipping services. - - - - - Descriptive data regarding special services requested by the shipper for this shipment. If the shipper is requesting a special service which requires additional data (e.g. COD), the special service type must be present in the specialServiceTypes collection, and the supporting detail must be provided in the appropriate sub-object. For example, to request COD, "COD" must be included in the SpecialServiceTypes collection and the CodDetail object must contain the required data. - - - - - Details specific to an Express freight shipment. - - - - - Data applicable to shipments using FEDEX_FREIGHT and FEDEX_NATIONAL_FREIGHT services. - - - - - Used with Ground Home Delivery and Freight. - - - - - Details about how to calculate variable handling charges at the shipment level. - - - - - Customs clearance data, used for both international and intra-country shipping. - - - - - For use in "process tag" transaction. - - - - - - If true, only the shipper/payor will have visibility of this shipment. - - - - - Specifies the client-requested response in the event of errors within shipment. - - - - - Details about the image format and printer type the label is to returned in. - - - - - Contains data used to create additional (non-label) shipping documents. - - - - - Specifies whether and what kind of rates the customer wishes to have quoted on this shipment. The reply will also be constrained by other data on the shipment and customer. - - - - - Specifies the type of rate the customer wishes to have used as the actual rate type. - - - - - Specifies whether the customer wishes to have Estimated Duties and Taxes provided with the rate quotation on this shipment. Only applies with shipments moving under international services. - - - - - Only used with multiple-transaction shipments. - - - - - Only used with multi-piece COD shipments sent in multiple transactions. Required on last transaction only. - - - - - The total number of packages in the entire shipment (even when the shipment spans multiple transactions.) - - - - - Specifies whether packages are described individually, in groups, or summarized in a single description for total-piece-total-weight. This field controls which fields of the RequestedPackageLineItem will be used, and how many occurrences are expected. - - - - - One or more package-attribute descriptions, each of which describes an individual package, a group of identical packages, or (for the total-piece-total-weight case) common characteristics all packages in the shipment. - - - - - - - - - - - - - - - - - - - - - - - These values are used to control the availability of certain special services at the time when a customer uses the e-mail label link to create a return shipment. - - - - - - - - - Return Email Details - - - - - Phone number of the merchant - - - - - Identifies the allowed (merchant-authorized) special services which may be selected when the subsequent shipment is created. Only services represented in EMailLabelAllowedSpecialServiceType will be controlled by this list. - - - - - - - Information relating to a return shipment. - - - - - The type of return shipment that is being requested. - - - - - Return Merchant Authorization - - - - - Describes specific information about the email label for return shipment. - - - - - - - The type of return shipment that is being requested. - - - - - - - - - - The "PAYOR..." rates are expressed in the currency identified in the payor's rate table(s). The "RATED..." rates are expressed in the currency of the origin country. Former "...COUNTER..." values have become "...RETAIL..." values, except for PAYOR_COUNTER and RATED_COUNTER, which have been removed. - - - - - - - - - - - - - - - - Shipping document type. - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return Merchant Authorization - - - - - The RMA number. - - 20 - - - - - - The reason for the return. - - 60 - - - - - - - - The tracking number information and the data to form the Astra barcode for the label. - - - - - The tracking number information for the shipment. - - - - - - The textual description of the special service applied to the package. - - - - - - - - Information about the routing, origin, destination and delivery of a shipment. - - - - - The routing information detail for this shipment. - - - - - The tracking number information and the data to form the Astra barcode for the label. - - - - - - - Identifies the collection of available FedEx service options. - - - - - - - - - - - - - - - - - - - - - - - - - Shipment-level totals of dry ice data across all packages. - - - - - Total number of packages in the shipment that contain dry ice. - - - - - Total shipment dry ice weight for all packages. - - - - - - - Data for a shipment's total/summary rates, as calculated per a specific rate type. The "total..." fields may differ from the sum of corresponding package data for Multiweight or Express MPS. - - - - - Type used for this specific set of rate data. - - - - - Indicates the rate scale used. - - - - - Indicates the rate zone used (based on origin and destination). - - - - - Identifies the type of pricing used for this shipment. - - - - - Indicates which weight was used. - - - - - INTERNAL FEDEX USE ONLY. - - - - - Specifies the currency exchange performed on financial amounts for this rate. - - - - - Indicates which special rating cases applied to this shipment. - - - - - The value used to calculate the weight based on the dimensions. - - - - - Identifies the type of dim divisor that was applied. - - - - - Specifies a fuel surcharge percentage. - - - - - The weight used to calculate these rates. - - - - - Sum of dimensional weights for all packages. - - - - - The total freight charge that was calculated for this package before surcharges, discounts and taxes. - - - - - The total discounts used in the rate calculation. - - - - - The freight charge minus discounts. - - - - - The total amount of all surcharges applied to this shipment. - - - - - This shipment's totalNetFreight + totalSurcharges (not including totalTaxes). - - - - - Total of the transportation-based taxes. - - - - - The net charge after applying all discounts and surcharges. - - - - - The total sum of all rebates applied to this shipment. - - - - - Total of all values under this shipment's dutiesAndTaxes; only provided if estimated duties and taxes were calculated for this shipment. - - - - - This shipment's totalNetCharge + totalDutiesAndTaxes; only provided if estimated duties and taxes were calculated for this shipment AND duties, taxes and transportation charges are all paid by the same sender's account. - - - - - Rate data specific to FedEx Freight and FedEx National Freight services. - - - - - All rate discounts that apply to this shipment. - - - - - All rebates that apply to this shipment. - - - - - All surcharges that apply to this shipment. - - - - - All transportation-based taxes applicable to this shipment. - - - - - All commodity-based duties and taxes applicable to this shipment. - - - - - The "order level" variable handling charges. - - - - - The total of all variable handling charges at both shipment (order) and package level. - - - - - - - This class groups together all shipment-level rate data (across all rate types) as part of the response to a shipping request, which groups shipment-level data together and groups package-level data by package. - - - - - This rate type identifies which entry in the following array is considered as presenting the "actual" rates for the shipment. - - - - - The "list" total net charge minus "actual" total net charge. - - - - - Each element of this field provides shipment-level rate totals for a specific rate type. - - - - - - - - - This indicates the highest level of severity of all the notifications returned in this reply - - - - - The descriptive data regarding the results of the submitted transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - - - Information about the routing, origin, destination and delivery of a shipment. - - - - - The prefix portion of the URSA (Universal Routing and Sort Aid) code. - - 2 - - - - - - The suffix portion of the URSA code. - - 5 - - - - - - The identifier of the origin location of the shipment. Express only. - - 5 - - - - - - - The identifier of the destination location of the shipment. Express only. - - 5 - - - - - - - This is the state of the destination location ID, and is not necessarily the same as the postal state. - - - - - Expected/estimated date of delivery. - - - - - Expected/estimated day of week of delivery. - - - - - Committed date of delivery. - - - - - Committed day of week of delivery. - - - - - Standard transit time per origin, destination, and service. - - - - - Maximum expected transit time - - - - - Text describing planned delivery. - - - - - Currently not supported. - - TBD - - - - - - The postal code of the destination of the shipment. - - 16 - - - - - - The state or province code of the destination of the shipment. - - 14 - - - - - - The country code of the destination of the shipment. - - 2 - - - - - - The identifier for the airport of the destination of the shipment. - - 4 - - - - - - - - Identifies the collection of special service offered by FedEx. BROKER_SELECT_OPTION should be used for Express shipments only. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - These special services are available at the shipment level for some or all service types. If the shipper is requesting a special service which requires additional data (such as the COD amount), the shipment special service type must be present in the specialServiceTypes collection, and the supporting detail must be provided in the appropriate sub-object below. - - - - - The types of all special services requested for the enclosing shipment (or other shipment-level transaction). - - - - - Descriptive data required for a FedEx COD (Collect-On-Delivery) shipment. This element is required when SpecialServiceType.COD is present in the SpecialServiceTypes collection. - - - - - Descriptive data required for a FedEx shipment that is to be held at the destination FedEx location for pickup by the recipient. This element is required when SpecialServiceType.HOLD_AT_LOCATION is present in the SpecialServiceTypes collection. - - - - - Descriptive data required for FedEx to provide email notification to the customer regarding the shipment. This element is required when SpecialServiceType.EMAIL_NOTIFICATION is present in the SpecialServiceTypes collection. - - - - - The descriptive data required for FedEx Printed Return Label. This element is required when SpecialServiceType.PRINTED_RETURN_LABEL is present in the SpecialServiceTypes collection - - - - - This field should be populated for pending shipments (e.g. e-mail label) It is required by a PENDING_SHIPMENT special service type. - - - - - Number of packages in this shipment which contain dry ice and the total weight of the dry ice for this shipment. - - - - - The descriptive data required for FedEx Home Delivery options. This element is required when SpecialServiceType.HOME_DELIVERY_PREMIUM is present in the SpecialServiceTypes collection - - - - - Electronic Trade document references. - - - - - Specification for date or range of dates on which delivery is to be attempted. - - - - - - - All package-level shipping documents (other than labels and barcodes). - - - - - Shipping Document Type - - - - - Specifies how this document image/file is organized. - - - - - - The name under which a STORED or DEFERRED document is written. - - - - - Specifies the image resolution in DPI (dots per inch). - - - - - Can be zero for documents whose disposition implies that no content is included. - - - - - One or more document parts which make up a single logical document, such as multiple pages of a single form. - - - - - - - Each occurrence of this class specifies a particular way in which a kind of shipping document is to be produced and provided. - - - - - Values in this field specify how to create and return the document. - - - - - Specifies how to organize all documents of this type. - - - - - Specifies how to e-mail document images. - - - - - Specifies how a queued document is to be printed. - - - - - - - Specifies how to return a shipping document to the caller. - - - - - - - - - - - - - - Specifies how to e-mail shipping documents. - - - - - Provides the roles and email addresses for e-mail recipients. - - - - - Identifies the convention by which documents are to be grouped as e-mail attachments. - - - - - - - - - - - - - Specifies an individual recipient of e-mailed shipping document(s). - - - - - Identifies the relationship of this recipient in the shipment. - - - - - Address to which the document is to be sent. - - - - - - - Specifies characteristics of a shipping document to be produced. - - - - - Specifies how to create, organize, and return the document. - - - - - Specifies how far down the page to move the beginning of the image; allows for printing on letterhead and other pre-printed stock. - - - - - - - For those shipping document types which have both a "form" and "instructions" component (e.g. NAFTA Certificate of Origin and General Agency Agreement), this field indicates whether to provide the instructions. - - - - - Governs the language to be used for this individual document, independently from other content returned for the same shipment. - - - - - Identifies the individual document specified by the client. - - - - - - - Specifies how to organize all shipping documents of the same type. - - - - - - - - - Specifies the image format used for a shipping document. - - - - - - - - - - - - - - - A single part of a shipping document, such as one page of a multiple-page document whose format requires a separate image per page. - - - - - The one-origin position of this part within a document. - - - - - Graphic or printer commands for this image within a document. - - - - - - - Specifies printing options for a shipping document. - - - - - Provides environment-specific printer identification. - - - - - - - Contains all data required for additional (non-label) shipping documents to be produced in conjunction with a specific shipment. - - - - - Indicates the types of shipping documents requested by the shipper. - - - - - - - Specifies the production of each package-level custom document (the same specification is used for all packages). - - - - - Specifies the production of a shipment-level custom document. - - - - - This element is currently not supported and is for the future use. (Details pertaining to the GAA.) - - - - - - Specifies the production of the OP-900 document for hazardous materials packages. - - - - - Specifies the production of the OP-900 document for hazardous materials. - - - - - - - Specifies the type of paper (stock) on which a document will be printed. - - - - - - - - - - - - - - - - - - The descriptive data required for FedEx delivery signature services. - - - - - Identifies the delivery signature services option selected by the customer for this shipment. See OptionType for the list of valid values. - - - - - Identifies the delivery signature release authorization number. - - 10 - - - - - - - - Identifies the delivery signature services options offered by FedEx. - - - - - - - - - - - - These values are mutually exclusive; at most one of them can be attached to a SmartPost shipment. - - - - - - - - - - - - - - - - - - - - - Data required for shipments handled under the SMART_POST and GROUND_SMART_POST service types. - - - - - - - - - The CustomerManifestId is used to group Smart Post packages onto a manifest for each trailer that is being prepared. If you do not have multiple trailers this field can be omitted. If you have multiple trailers, you - must assign the same Manifest Id to each SmartPost package as determined by its trailer. In other words, all packages on a trailer must have the same Customer Manifest Id. The manifest Id must be unique to your account number for a minimum of 6 months - and cannot exceed 8 characters in length. We recommend you use the day of year + the trailer id (this could simply be a sequential number for that trailer). So if you had 3 trailers that you started loading on Feb 10 - the 3 manifest ids would be 041001, 041002, 041003 (in this case we used leading zeros on the trailer numbers). - - - - - - - - Special circumstance rating used for this shipment. - - - - - - - - - Each instance of this data type represents a barcode whose content must be represented as ASCII text (i.e. not binary data). - - - - - The kind of barcode data in this instance. - - - - - The data content of this instance. - - - - - - - - - - - - - - - - - Identifies each surcharge applied to the shipment. - - - - - The type of surcharge applied to the shipment. - - - - - - - The amount of the surcharge applied to the shipment. - - - - - - - - - - - - - The type of the surcharge. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Identifies each tax applied to the shipment. - - - - - The type of tax applied to the shipment. - - - - - - The amount of the tax applied to the shipment. - - - - - - - The type of the tax. - - - - - - - - - - - - - - The descriptive data for taxpayer identification information. - - - - - Identifies the category of the taxpayer identification number. See TinType for the list of values. - - - - - Identifies the taxpayer identification number. - - 15 - - - - - - Identifies the usage of Tax Identification Number in Shipment processing - - - - - - - - Required for dutiable international express or ground shipment. This field is not applicable to an international PIB (document) or a non-document which does not require a commercial invoice express shipment. - CFR_OR_CPT (Cost and Freight/Carriage Paid TO) - CIF_OR_CIP (Cost Insurance and Freight/Carraige Insurance Paid) - DDP (Delivered Duty Paid) - DDU (Delivered Duty Unpaid) - EXW (Ex Works) - FOB_OR_FCA (Free On Board/Free Carrier) - - - - - - - - - - - - - - Identifies the category of the taxpayer identification number. - - - - - - - - - - - - - - - For use with SmartPost tracking IDs only - - - - - - - - TrackingIdType - - - - - - - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Free form text to be echoed back in the reply. Used to match requests and replies. - - - - - Governs data payload language/translations (contrasted with ClientDetail.localization, which governs Notification.localizedMessage language selection). - - - - - - - Identifies the set of valid shipment transit time values. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Descriptive data sent to FedEx by a customer in order to validate a shipment. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Descriptive data about the shipment being sent by the requestor. - - - - - - - Documents the kind and quantity of an individual hazardous commodity in a package. - - - - - Identifies and describes an individual hazardous commodity. - - - - - Specifies the amount of the commodity in alternate units. - - - - - Customer-provided specifications for handling individual commodities. - - - - - - - Identifies and describes an individual hazardous commodity. For 201001 load, this is based on data from the FedEx Ground Hazardous Materials Shipping Guide. - - - - - Regulatory identifier for a commodity (e.g. "UN ID" value). - - - - - - - Fully-expanded descriptive text for a hazardous commodity. - - - - - - - - Coded indications for special requirements or constraints. - - - - - - - - Details about how to calculate variable handling charges at the shipment level. - - - - - The type of handling charge to be calculated and returned in the reply. - - - - - - Used with Variable handling charge type of FIXED_VALUE. - Contains the amount to be added to the freight charge. - Contains 2 explicit decimal positions with a total max length of 10 including the decimal. - - - - - - Actual percentage (10 means 10%, which is a mutiplier of 0.1) - - - - - - - The type of handling charge to be calculated and returned in the reply. - - - - - - - - - - - The variable handling charges calculated based on the type variable handling charges requested. - - - - - The variable handling charge amount calculated based on the requested variable handling charge detail. - - - - - The calculated varibale handling charge plus the net charge. - - - - - - - Three-dimensional volume/cubic measurement. - - - - - - - - - Units of three-dimensional volume/cubic measure. - - - - - - - - - The descriptive data for the heaviness of an object. - - - - - Identifies the unit of measure associated with a weight value. - - - - - Identifies the weight value of a package/shipment. - - - - - - - Identifies the unit of measure associated with a weight value. See the list of enumerated types for valid values. - - - - - - - - - Used in authentication of the sender's identity. - - - - - Credential used to authenticate a specific software application. This value is provided by FedEx after registration. - - - - - - - Two part authentication string used for the sender's identity - - - - - Identifying part of authentication credential. This value is provided by FedEx after registration - - - - - Secret part of authentication key. This value is provided by FedEx after registration. - - - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Identifies a system or sub-system which performs an operation. - - - - - Identifies the service business level. - - - - - Identifies the service interface level. - - - - - Identifies the service code level. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/code/core/Mage/Usa/etc/wsdl/FedEx/ShipService_v9.wsdl b/app/code/core/Mage/Usa/etc/wsdl/FedEx/ShipService_v9.wsdl deleted file mode 100644 index b32e571c08..0000000000 --- a/app/code/core/Mage/Usa/etc/wsdl/FedEx/ShipService_v9.wsdl +++ /dev/null @@ -1,5472 +0,0 @@ - - - - - - - - - - - - - - - - - - Specifies additional labels to be produced. All required labels for shipments will be produced without the need to request additional labels. These are only available as thermal labels. - - - - - The type of additional labels to return. - - - - - The number of this type label to return - - - - - - - Identifies the type of additional labels. - - - - - - - - - - - - - - - - Descriptive data for a physical location. May be used as an actual physical address (place to which one could go), or as a container of "address parts" which should be handled as a unit (such as a city-state-ZIP combination within the US). - - - - - Combination of number, street name, etc. At least one line is required for a valid physical address; empty lines should not be included. - - - - - Name of city, town, etc. - - - - - Identifying abbreviation for US state, Canada province, etc. Format and presence of this field will vary, depending on country. - - - - - Identification of a region (usually small) for mail/package delivery. Format and presence of this field will vary, depending on country. - - - - - Relevant only to addresses in Puerto Rico. - - - - - The two-letter code used to identify a country. - - - - - Indicates whether this address residential (as opposed to commercial). - - - - - - - - - Position of Astra element - - - - - Content corresponding to the Astra Element - - - - - - - - Specifies which filing option is being exercised by the customer. - Required for non-document shipments originating in Canada destined for any country other than Canada, the United States, Puerto Rico or the U.S. Virgin Islands. - - - - - - - - - - - - Identification of the type of barcode (symbology) used on FedEx documents and labels. - - - - - - - - - - Each instance of this data type represents a barcode whose content must be represented as binary data (i.e. not ASCII text). - - - - - The kind of barcode data in this instance. - - - - - The data content of this instance. - - - - - - - - - - - - - - - - - - - - Descriptive data sent to FedEx by a customer in order to Cancel a Pending shipment. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - - - - Identification of a FedEx operating company (transportation). - - - - - - - - - - - - - The instructions indicating how to print the Certificate of Origin ( e.g. whether or not to include the instructions, image type, etc ...) - - - - - Specifies characteristics of a shipping document to be produced. - - - - - Specifies the usage and identification of customer supplied images to be used on this document. - - - - - - - Specifies the type of brokerage to be applied to a shipment. - - - - - - - - - - - - Descriptive data for the client submitting a transaction. - - - - - The FedEx account number associated with this transaction. - - - - - This number is assigned by FedEx and identifies the unique device from which the request is originating - - - - - Only used in transactions which require identification of the Fed Ex Office integrator. - - - - - The language to be used for human-readable Notification.localizedMessages in responses to the request containing this ClientDetail object. Different requests from the same client may contain different Localization data. (Contrast with TransactionDetail.localization, which governs data payload language/translation.) - - - - - - - Identifies what freight charges should be added to the COD collect amount. - - - - - - - - - - - - - - - - - - - Identifies the type of funds FedEx should collect upon shipment delivery. - - - - - - - - - - - - Descriptive data required for a FedEx COD (Collect-On-Delivery) shipment. - - - - - - Identifies if freight charges are to be added to the COD amount. This element determines which freight charges should be added to the COD collect amount. See CodAddTransportationChargesType for a list of valid enumerated values. - - - - - Identifies the type of funds FedEx should collect upon package delivery - - - - - For Express this is the descriptive data that is used for the recipient of the FedEx Letter containing the COD payment. For Ground this is the descriptive data for the party to receive the payment that prints the COD receipt. - - - - - Indicates which type of reference information to include on the COD return shipping label. - - - - - - - - - The COD amount (after any accumulations) that must be collected upon delivery of a package shipped using the COD special service. - - - - - - Contains the data which form the Astra and 2DCommon barcodes that print on the COD return label. - - - - - The label image or printer commands to print the label. - - - - - - - Indicates which type of reference information to include on the COD return shipping label. - - - - - - - - - - - - - The COD amount (after any accumulations) that must be collected upon delivery of a package shipped using the COD special service. - - - - - Currently not supported. - - TBD - - - - - - The description of the FedEx service type used for the COD return shipment. Currently not supported. - - 70 - - - - - - The description of the packaging used for the COD return shipment. - - 40 - - - - - - Currently not supported. - - TBD - - - - - - Currently not supported. - - - - - Currently not supported. - - - - - - The CodRoutingDetail element will contain the COD return tracking number and form id. In the case of a COD multiple piece shipment these will need to be inserted in the request for the last piece of the multiple piece shipment. - The service commitment is the only other element of the RoutingDetail that is used for a CodRoutingDetail. - - - - - - Contains the data which form the Astra and 2DCommon barcodes that print on the COD return label. - - - - - The label image or printer commands to print the label. - - - - - - - CommercialInvoice element is required for electronic upload of CI data. It will serve to create/transmit an Electronic Commercial Invoice through the FedEx Systems. Customers are responsible for printing their own Commercial Invoice.If you would likeFedEx to generate a Commercial Invoice and transmit it to Customs. for clearance purposes, you need to specify that in the ShippingDocumentSpecification element. If you would like a copy of the Commercial Invoice that FedEx generated returned to you in reply it needs to be specified in the ETDDetail/RequestedDocumentCopies element. Commercial Invoice support consists of maximum of 99 commodity line items. - - - - - Any comments that need to be communicated about this shipment. - - - - - Any freight charges that are associated with this shipment. - - - - - Any taxes or miscellaneous charges(other than Freight charges or Insurance charges) that are associated with this shipment. - - - - - Any packing costs that are associated with this shipment. - - - - - Any handling costs that are associated with this shipment. - - - - - Free-form text. - - - - - Free-form text. - - - - - Free-form text. - - - - - The reason for the shipment. Note: SOLD is not a valid purpose for a Proforma Invoice. - - - - - Customer assigned Invoice number - - - - - Name of the International Expert that completed the Commercial Invoice different from Sender. - - - - - Required for dutiable international Express or Ground shipment. This field is not applicable to an international PIB(document) or a non-document which does not require a Commercial Invoice - - - - - - - The instructions indicating how to print the Commercial Invoice( e.g. image type) Specifies characteristics of a shipping document to be produced. - - - - - - Specifies the usage and identification of a customer supplied image to be used on this document. - - - - - - - - For international multiple piece shipments, commodity information must be passed in the Master and on each child transaction. - If this shipment cotains more than four commodities line items, the four highest valued should be included in the first 4 occurances for this request. - - - - - - Name of this commodity. - - - - - Total number of pieces of this commodity - - - - - Complete and accurate description of this commodity. - - 450 - - - - - - Country code where commodity contents were produced or manufactured in their final form. - - 2 - - - - - - - Unique alpha/numeric representing commodity item. - At least one occurrence is required for US Export shipments if the Customs Value is greater than $2500 or if a valid US Export license is required. - - - 14 - - - - - - Total weight of this commodity. 1 explicit decimal position. Max length 11 including decimal. - - - - - Number of units of a commodity in total number of pieces for this line item. Max length is 9 - - - - - Unit of measure used to express the quantity of this commodity line item. - - 3 - - - - - - Contains only additional quantitative information other than weight and quantity to calculate duties and taxes. - - - - - Value of each unit in Quantity. Six explicit decimal positions, Max length 18 including decimal. - - - - - - Total customs value for this line item. - It should equal the commodity unit quantity times commodity unit value. - Six explicit decimal positions, max length 18 including decimal. - - - - - - Defines additional characteristic of commodity used to calculate duties and taxes - - - - - Applicable to US export shipping only. - - 12 - - - - - - - Date of expiration. Must be at least 1 day into future. - The date that the Commerce Export License expires. Export License commodities may not be exported from the U.S. on an expired license. - Applicable to US Export shipping only. - Required only if commodity is shipped on commerce export license, and Export License Number is supplied. - - - - - - - An identifying mark or number used on the packaging of a shipment to help customers identify a particular shipment. - - - 15 - - - - - - All data required for this commodity in NAFTA Certificate of Origin. - - - - - - - - - The identifier for all clearance documents associated with this shipment. - - - - - - - - - - Identifies the branded location name, the hold at location phone number and the address of the location. - - - - - Identifies the type of FedEx location. - - - - - - - - - The package sequence number of this package in a multiple piece shipment. - - - - - The Tracking number and form id for this package. - - - - - Used with request containing PACKAGE_GROUPS, to identify which group of identical packages was used to produce a reply item. - - - - - Oversize class for this package. - - - - - All package-level rating data for this package, which may include data for multiple rate types. - - - - - Associated with package, due to interaction with per-package hazardous materials presence/absence. - - - - - The data that is used to from the Astra and 2DCommon barcodes for the label.. - - - - - The textual description of the special service applied to the package. - - - - - - The label image or printer commands to print the label. - - - - - All package-level shipping documents (other than labels and barcodes). For use in loads after January, 2008. - - - - - Information about the COD return shipment. - - - - - Actual signature option applied, to allow for cases in which the original value conflicted with other service features in the shipment. - - - - - Documents the kinds and quantities of all hazardous commodities in the current package, using updated hazardous commodity description data. - - - - - - - - - Indicates whether or not this is a US Domestic shipment. - - - - - Indicates the carrier that will be used to deliver this shipment. - - - - - The master tracking number and form id of this multiple piece shipment. This information is to be provided for each subsequent of a multiple piece shipment. - - - - - Description of the FedEx service used for this shipment. Currently not supported. - - 70 - - - - - - Description of the packaging used for this shipment. Currently not supported. - - 40 - - - - - - Information about the routing, origin, destination and delivery of a shipment. - - - - - Only used with pending shipments. - - - - - Only used in the reply to tag requests. - - - - - Provides reply information specific to SmartPost shipments. - - - - - All shipment-level rating data for this shipment, which may include data for multiple rate types. - - - - - Information about the COD return shipment. - - - - - Returns the default holding location information when HOLD_AT_LOCATION special service is requested and the client does not specify the hold location address. - - - - - Indicates whether or not this shipment is eligible for a money back guarantee. - - - - - Returns any defaults or updates applied to RequestedShipment.exportDetail.exportComplianceStatement. - - - - - - All shipment-level shipping documents (other than labels and barcodes). - - - - - Package level details about this package. - - - - - - - Provides reply information specific to SmartPost shipments. - - - - - Identifies the carrier that will pick up the SmartPost shipment. - - - - - Indicates whether the shipment is deemed to be machineable, based on dimensions, weight, and packaging. - - - - - - - Provides reply information specific to a tag request. - - - - - . - - - - - As of June 2007, returned only for FedEx Express services. - - - - - As of June 2007, returned only for FedEx Express services. - - - - - As of June 2007, returned only for FedEx Express services. - - - - - As of June 2007, returned only for FedEx Express services. - - - - - FEDEX INTERNAL USE ONLY: for use by INET. - - - - - - - Defines additional data to print in the Configurable portion of the label, this allows you to print the same type information on the label that can also be printed on the doc tab. - - - - - 1 of 12 possible zones to position data. - - - - - The identifiying text for the data in this zone. - - - - - A reference to a field in either the request or reply to print in this zone following the header. - - - - - A literal value to print after the header in this zone. - - - - - - - The descriptive data for a point-of-contact person. - - - - - Client provided identifier corresponding to this contact information. - - - - - Identifies the contact person's name. - - - - - Identifies the contact person's title. - - - - - Identifies the company this contact is associated with. - - - - - Identifies the phone number associated with this contact. - - - - - Identifies the phone extension associated with this contact. - - - - - Identifies the pager number associated with this contact. - - - - - Identifies the fax number associated with this contact. - - - - - Identifies the email address associated with this contact. - - - - - - - - - - - - - Content Record. - - - - - Part Number. - - - - - Item Number. - - - - - Received Quantity. - - - - - Description. - - - - - - - Reply to the Close Request transaction. The Close Reply bring back the ASCII data buffer which will be used to print the Close Manifest. The Manifest is essential at the time of pickup. - - - - - Identifies the highest severity encountered when executing the request; in order from high to low: FAILURE, ERROR, WARNING, NOTE, SUCCESS. - - - - - The descriptive data detailing the status of a sumbitted transaction. - - - - - Descriptive data that governs data payload language/translations. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - The reply payload. All of the returned information about this shipment/package. - - - - - - - Create Pending Shipment Request - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - The descriptive data identifying the client submitting the transaction. - - - - - The descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Descriptive data about the shipment being sent by the requestor. - - - - - - - Currency exchange rate information. - - - - - The currency code for the original (converted FROM) currency. - - - - - The currency code for the final (converted INTO) currency. - - - - - Multiplier used to convert fromCurrency units to intoCurrency units. - - - - - - - - - Indicates the type of custom delivery being requested. - - - - - Time by which delivery is requested. - - - - - Range of dates for custom delivery request; only used if type is BETWEEN. - - - - - Date for custom delivery request; only used for types of ON, BETWEEN, or AFTER. - - - - - - - - - - - - - - - Data required to produce a custom-specified document, either at shipment or package level. - - - - - Common information controlling document production. - - - - - Applicable only to documents produced on thermal printers with roll stock. - - - - - Applicable only to documents produced on thermal printers with roll stock. - - - - - Identifies the formatting specification used to construct this custom document. - - - - - Identifies the individual document specified by the client. - - - - - If provided, thermal documents will include specified doc tab content. If omitted, document will be produced without doc tab content. - - - - - - - Constructed string, based on format and zero or more data fields, printed in specified barcode symbology. - - - - - - - - - Width of thinnest bar/space element in the barcode. - - - - - - - - Solid (filled) rectangular area on label. - - - - - - - - - Valid values for CustomLabelCoordinateUnits - - - - - - - - - - - - - - - - - - Image to be included from printer's memory, or from a local file for offline clients. - - - - - - Printer-specific index of graphic image to be printed. - - - - - Fully-qualified path and file name for graphic image to be printed. - - - - - - - - - Horizontal position, relative to left edge of custom area. - - - - - Vertical position, relative to top edge of custom area. - - - - - - - Constructed string, based on format and zero or more data fields, printed in specified printer font (for thermal labels) or generic font/size (for plain paper labels). - - - - - - - - Printer-specific font name for use with thermal printer labels. - - - - - Generic font name for use with plain paper labels. - - - - - Generic font size for use with plain paper labels. - - - - - - - - - - - - - - - - - - - Reference information to be associated with this package. - - - - - The reference type to be associated with this reference data. - - - - - - - - The types of references available for use. - - - - - - - - - - - - - - - - Allows customer-specified control of label content. - - - - - If omitted, no doc tab will be produced (i.e. default = former NONE type). - - - - - Defines any custom content to print on the label. - - - - - Defines additional data to print in the Configurable portion of the label, this allows you to print the same type information on the label that can also be printed on the doc tab. - - - - - Controls which data/sections will be suppressed. - - - - - Customer-provided SCNC for use with label-data-only processing of FedEx Ground shipments. - - - - - - Controls the number of additional copies of supplemental labels. - - - - - This value reduces the default quantity of destination/consignee air waybill labels. A value of zero indicates no change to default. A minimum of one copy will always be produced. - - - - - - - - - - Interacts both with properties of the shipment and contractual relationship with the shipper. - - - - - - Specifies how the recipient is identified for customs purposes; the requirements on this information vary with destination country. - - - - - - - - Identifies responsibilities with respect to loss, damage, etc. - - - - - Documents amount paid to third party for coverage of shipment content. - - - - - - - - - - - - - - - - - - The descriptive data required for a FedEx shipment containing dangerous goods (hazardous materials). - - - - - Identifies whether or not the products being shipped are required to be accessible during delivery. - - - - - Shipment is packaged/documented for movement ONLY on cargo aircraft. - - - - - Indicates which kinds of hazardous content are in the current package. - - - - - Documents the kinds and quantities of all hazardous commodities in the current package. - - - - - Description of the packaging of this commodity, suitable for use on OP-900 and OP-950 forms. - - - - - Telephone number to use for contact in the event of an emergency. - - - - - Offeror's name or contract number, per DOT regulation. - - - - - - - - - The beginning date in a date range. - - - - - The end date in a date range. - - - - - - - Valid values for DayofWeekType - - - - - - - - - - - - - - Descriptive data sent to FedEx by a customer in order to delete a package. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - The timestamp of the shipment request. - - - - - Identifies the FedEx tracking number of the package being cancelled. - - - - - Determines the type of deletion to be performed in relation to package level vs shipment level. - - - - - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Only used for tags which had FedEx Express services. - - - - - Only used for tags which had FedEx Express services. - - - - - If the original ProcessTagRequest specified third-party payment, then the delete request must contain the same pay type and payor account number for security purposes. - - - - - Also known as Pickup Confirmation Number or Dispatch Number - - - - - - - Specifies the type of deletion to be performed on a shipment. - - - - - - - - - - Data required to complete the Destionation Control Statement for US exports. - - - - - List of applicable Statment types. - - - - - Comma-separated list of up to four country codes, required for DEPARTMENT_OF_STATE statement. - - - - - Name of end user, required for DEPARTMENT_OF_STATE statement. - - - - - - - Used to indicate whether the Destination Control Statement is of type Department of Commerce, Department of State or both. - - - - - - - - - The dimensions of this package and the unit type used for the measurements. - - - - - - - - - - - - - The DocTabContentType options available. - - - - - The DocTabContentType should be set to ZONE001 to specify additional Zone details. - - - - - The DocTabContentType should be set to BARCODED to specify additional BarCoded details. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Zone number can be between 1 and 12. - - - - - Header value on this zone. - - - - - Reference path to the element in the request/reply whose value should be printed on this zone. - - - - - Free form-text to be printed in this zone. - - - - - Justification for the text printed on this zone. - - - - - - - Identifies the method by which the package is to be tendered to FedEx. This element does not dispatch a courier for package pickup. - - - - - - - - - - - - Describes specific information about the email label shipment. - - - - - Notification email will be sent to this email address - - - - - Message to be sent in the notification email - - - - - - - - - - - - - Information describing email notifications that will be sent in relation to events that occur during package movement - - - - - Specifies whether/how email notifications are grouped. - - - - - A message that will be included in the email notifications - - - - - Information describing the destination of the email, format of the email and events to be notified on - - - - - - - The format of the email - - - - - - - - - - The descriptive data for a FedEx email notification recipient. - - - - - Identifies the relationship this email recipient has to the shipment. - - - - - The email address to send the notification to - - - - - Notify the email recipient when this shipment has been shipped. - - - - - Notify the email recipient if this shipment encounters a problem while in route - - - - - Notify the email recipient when this shipment has been delivered. - - - - - The format of the email notification. - - - - - The language/locale to be used in this email notification. - - - - - - - Identifies the set of valid email notification recipient types. For SHIPPER, RECIPIENT and BROKER the email address asssociated with their definitions will be used, any email address sent with the email notification for these three email notification recipient types will be ignored. - - - - - - - - - - - - - - - - - - - - - Customer-declared value, with data type and legal values depending on excise condition, used in defining the taxable value of the item. - - - - - - - Specifies the types of Estimated Duties and Taxes to be included in a rate quotation for an international shipment. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Specifies the client-requested response in the event of errors within shipment. - PACKAGE_ERROR_LABELS : Return per-package error label in addition to error Notifications. - STANDARD : Return error Notifications only. - - - - - - - - - - Electronic Trade document references used with the ETD special service. - - - - - Indicates the types of shipping documents produced for the shipper by FedEx (see ShippingDocumentSpecification) which should be copied back to the shipper in the shipment result data. - - - - - - - - Country specific details of an International shipment. - - - - - - Specifies which filing option is being exercised by the customer. - Required for non-document shipments originating in Canada destined for any country other than Canada, the United States, Puerto Rico or the U.S. Virgin Islands. - - - - - - General field for exporting-country-specific export data (e.g. B13A for CA, FTSR Exemption or AES Citation for US). - - - - - This field is applicable only to Canada export non-document shipments of any value to any destination. No special characters allowed. - - 10 - - - - - - Department of Commerce/Department of State information about this shipment. - - - - - - - Details specific to an Express freight shipment. - - - - - Indicates whether or nor a packing list is enclosed. - - - - - - Total shipment pieces. - e.g. 3 boxes and 3 pallets of 100 pieces each = Shippers Load and Count of 303. - Applicable to International Priority Freight and International Economy Freight. - Values must be in the range of 1 - 99999 - - - - - - Required for International Freight shipping. Values must be 8- 12 characters in length. - - 12 - - - - - - - - Identifies a kind of FedEx facility. - - - - - - - - - - - - - - - - Data required to produce the Freight handling-unit-level address labels. Note that the number of UNIQUE labels (the N as in 1 of N, 2 of N, etc.) is determined by total handling units. - - - - - - Indicates the number of copies to be produced for each unique label. - - - - - If omitted, no doc tab will be produced (i.e. default = former NONE type). - - - - - - - Individual charge which contributes to the total base charge for the shipment. - - - - - Freight class for this line item. - - - - - Effective freight class used for rating this line item. - - - - - NMFC Code for commodity. - - - - - Customer-provided description for this commodity or class line. - - - - - Weight for this commodity or class line. - - - - - Rate or factor applied to this line item. - - - - - Identifies the manner in which the chargeRate for this line item was applied. - - - - - The net or extended charge for this line item. - - - - - - - - - - - - - - These values represent the industry-standard freight classes used for FedEx Freight and FedEx National Freight shipment description. (Note: The alphabetic prefixes are required to distinguish these values from decimal numbers on some client platforms.) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Identifies responsibilities with respect to loss, damage, etc. - - - - - - - - - Rate data specific to FedEx Freight or FedEx National Freight services. - - - - - A unique identifier for a specific rate quotation. - - - - - Freight charges which accumulate to the total base charge for the shipment. - - - - - Human-readable descriptions of additional information on this shipment rating. - - - - - - - Additional non-monetary data returned with Freight rates. - - - - - Unique identifier for notation. - - - - - Human-readable explanation of notation. - - - - - - - Data applicable to shipments using FEDEX_FREIGHT and FEDEX_NATIONAL_FREIGHT services. - - - - - Account number used with FEDEX_FREIGHT service. - - - - - Used for validating FedEx Freight account number and (optionally) identifying third party payment on the bill of lading. - - - - - Identification values to be printed during creation of a Freight bill of lading. - - - - - Indicates the role of the party submitting the transaction. - - - - - Designates which of the requester's tariffs will be used for rating. - - - - - Designates the terms of the "collect" payment for a Freight Shipment. - - - - - Identifies the declared value for the shipment - - - - - Identifies the declared value units corresponding to the above defined declared value - - - - - - Identifiers for promotional discounts offered to customers. - - - - - Total number of individual handling units in the entire shipment (for unit pricing). - - - - - Estimated discount rate provided by client for unsecured rate quote. - - - - - Total weight of pallets used in shipment. - - - - - Overall shipment dimensions. - - - - - Description for the shipment. - - - - - Specifies which party will pay surcharges for any special services which support split billing. - - - - - Must be populated if any line items contain hazardous materials. - - - - - Details of the commodities in the shipment. - - - - - - - Description of an individual commodity or class of content in a shipment. - - - - - Freight class for this line item. - - - - - FEDEX INTERNAL USE ONLY: for FedEx system that estimate freight class from customer-provided dimensions and weight. - - - - - Number of individual handling units to which this line applies. (NOTE: Total of line-item-level handling units may not balance to shipment-level total handling units.) - - - - - Specification of handling-unit packaging for this commodity or class line. - - - - - Number of pieces for this commodity or class line. - - - - - NMFC Code for commodity. - - - - - Indicates the kind of hazardous material content in this line item. - - - - - For printed reference per line item. - - - - - For printed reference per line item. - - - - - Customer-provided description for this commodity or class line. - - - - - Weight for this commodity or class line. - - - - - FED EX INTERNAL USE ONLY - Individual line item dimensions. - - - - - Volume (cubic measure) for this commodity or class line. - - - - - - - Indicates the role of the party submitting the transaction. - - - - - - - - - - Specifies which party will be responsible for payment of any surcharges for Freight special services for which split billing is allowed. - - - - - Identifies the special service. - - - - - Indicates who will pay for the special service. - - - - - - - Data required to produce a General Agency Agreement document. Remaining content (business data) to be defined once requirements have been completed. - - - - - - - - Documents the kind and quantity of an individual hazardous commodity in a package. - - - - - Identifies and describes an individual hazardous commodity. - - - - - Specifies the amount of the commodity in alternate units. - - - - - Customer-provided specifications for handling individual commodities. - - - - - - - Identifies and describes an individual hazardous commodity. For 201001 load, this is based on data from the FedEx Ground Hazardous Materials Shipping Guide. - - - - - Regulatory identifier for a commodity (e.g. "UN ID" value). - - - - - - - - - - - - - Specifies how the commodity is to be labeled. - - - - - - - - - - Customer-provided specifications for handling individual commodities. - - - - - Specifies how the customer wishes the label text to be handled for this commodity in this package. - - - - - Text used in labeling the commodity under control of the labelTextOption field. - - - - - - - Indicates which kind of hazardous content (as defined by DOT) is being reported. - - - - - - - - - - - - Identifies number and type of packaging units for hazardous commodities. - - - - - Number of units of the type below. - - - - - Units in which the hazardous commodity is packaged. - - - - - - - Identifies DOT packing group for a hazardous commodity. - - - - - - - - - - Identifies amount and units for quantity of hazardous commodities. - - - - - Number of units of the type below. - - - - - Units by which the hazardous commodity is measured. - - - - - - - Descriptive data required for a FedEx shipment that is to be held at the destination FedEx location for pickup by the recipient. - - - - - Contact phone number for recipient of shipment. - - - - - Contact and address of FedEx facility at which shipment is to be held. - - - - - Type of facility at which package/shipment is to be held. - - - - - - - The descriptive data required by FedEx for home delivery services. - - - - - The type of Home Delivery Premium service being requested. - - - - - Required for Date Certain Home Delivery. - - - - - Required for Date Certain and Appointment Home Delivery. - - 15 - - - - - - - - The type of Home Delivery Premium service being requested. - - - - - - - - - - - - - - - - - - - The type of International shipment. - - - - - - - - - - Specifies the type of label to be returned. - - - - - - - - - - - Names for data elements / areas which may be suppressed from printing on labels. - - - - - - - - - - - - This indicates if the top or bottom of the label comes out of the printer first. - - - - - - - - - Relative to normal orientation for the printer. - - - - - - - - - - - Description of shipping label to be returned in the reply - - - - - Specifies how to create, organize, and return the document. - - - - - Specify type of label to be returned - - - - - Specifies the image format used for a shipping document. - - - - - For thermal printer lables this indicates the size of the label and the location of the doc tab if present. - - - - - This indicates if the top or bottom of the label comes out of the printer first. - - - - - If present, this contact and address information will replace the return address information on the label. - - - - - Allows customer-specified control of label content. - - - - - - - For thermal printer labels this indicates the size of the label and the location of the doc tab if present. - - - - - - - - - - - - - - - - - - - - - - - Identifies the Liability Coverage Amount. For Jan 2010 this value represents coverage amount per pound - - - - - - - - - - - - - Represents a one-dimensional measurement in small units (e.g. suitable for measuring a package or document), contrasted with Distance, which represents a large one-dimensional measurement (e.g. distance between cities). - - - - - The numerical quantity of this measurement. - - - - - The units for this measurement. - - - - - - - CM = centimeters, IN = inches - - - - - - - - - Identifies the representation of human-readable text. - - - - - Two-letter code for language (e.g. EN, FR, etc.) - - - - - Two-letter code for the region (e.g. us, ca, etc..). - - - - - - - - - - - - - Identifies which type minimum charge was applied. - - - - - - - - - - - - The descriptive data for the medium of exchange for FedEx services. - - - - - Identifies the currency of the monetary amount. - - 3 - - - - - - Identifies the monetary amount. - - - - - - - Data required to produce a Certificate of Origin document. Remaining content (business data) to be defined once requirements have been completed. - - - - - - - Indicates which Party (if any) from the shipment is to be used as the source of importer data on the NAFTA COO form. - - - - - Contact information for "Authorized Signature" area of form. - - - - - - - - - - This element is currently not supported and is for the future use. - - - - - Defined by NAFTA regulations. - - - - - Defined by NAFTA regulations. - - - - - Identification of which producer is associated with this commodity (if multiple producers are used in a single shipment). - - - - - - Date range over which RVC net cost was calculated. - - - - - - - - - - - - - - - Net cost method used. - - - - - - - - - See instructions for NAFTA Certificate of Origin for code definitions. - - - - - - - - - - - - - This element is currently not supported and is for the future use. - - - - - - - - - See instructions for NAFTA Certificate of Origin for code definitions. - - - - - - - - - - - This element is currently not supported and is for the future use. - - - - - - - - - - - - The descriptive data regarding the result of the submitted transaction. - - - - - The severity of this notification. This can indicate success or failure or some other information about the request. The values that can be returned are SUCCESS - Your transaction succeeded with no other applicable information. NOTE - Additional information that may be of interest to you about your transaction. WARNING - Additional information that you need to know about your transaction that you may need to take action on. ERROR - Information about an error that occurred while processing your transaction. FAILURE - FedEx was unable to process your transaction at this time due to a system failure. Please try again later - - - - - Indicates the source of this notification. Combined with the Code it uniquely identifies this notification - - - - - A code that represents this notification. Combined with the Source it uniquely identifies this notification. - - - - - Human-readable text that explains this notification. - - - - - The translated message. The language and locale specified in the ClientDetail. Localization are used to determine the representation. Currently only supported in a TrackReply. - - - - - A collection of name/value pairs that provide specific data to help the client determine the nature of an error (or warning, etc.) witout having to parse the message string. - - - - - - - - - Identifies the type of data contained in Value (e.g. SERVICE_TYPE, PACKAGE_SEQUENCE, etc..). - - - - - The value of the parameter (e.g. PRIORITY_OVERNIGHT, 2, etc..). - - - - - - - Identifies the set of severity values for a Notification. - - - - - - - - - - - - The instructions indicating how to print the OP-900 form for hazardous materials packages. - - - - - Specifies characteristics of a shipping document to be produced. - - - - - Identifies which reference type (from the package's customer references) is to be used as the source for the reference on this OP-900. - - - - - Specifies the usage and identification of customer supplied images to be used on this document. - - - - - Data field to be used when a name is to be printed in the document instead of (or in addition to) a signature image. - - - - - - - The oversize class types. - - - - - - - - - - Each instance of this data type represents the set of barcodes (of all types) which are associated with a specific package. - - - - - Binary-style barcodes for this package. - - - - - String-style barcodes for this package. - - - - - - - Data for a package's rates, as calculated per a specific rate type. - - - - - Type used for this specific set of rate data. - - - - - Indicates which weight was used. - - - - - INTERNAL FEDEX USE ONLY. - - - - - The weight that was used to calculate the rate. - - - - - The dimensional weight of this package (if greater than actual). - - - - - The oversize weight of this package (if the package is oversize). - - - - - The transportation charge only (prior to any discounts applied) for this package. - - - - - The sum of all discounts on this package. - - - - - This package's baseCharge - totalFreightDiscounts. - - - - - The sum of all surcharges on this package. - - - - - This package's netFreight + totalSurcharges (not including totalTaxes). - - - - - The sum of all taxes on this package. - - - - - This package's netFreight + totalSurcharges + totalTaxes. - - - - - The total sum of all rebates applied to this package. - - - - - All rate discounts that apply to this package. - - - - - All rebates that apply to this package. - - - - - All surcharges that apply to this package (either because of characteristics of the package itself, or because it is carrying per-shipment surcharges for the shipment of which it is a part). - - - - - All taxes applicable (or distributed to) this package. - - - - - The variable handling charges calculated based on the type variable handling charges requested. - - - - - - - This class groups together for a single package all package-level rate data (across all rate types) as part of the response to a shipping request, which groups shipment-level data together and groups package-level data by package. - - - - - This rate type identifies which entry in the following array is considered as presenting the "actual" rates for the package. - - - - - The "list" net charge minus "actual" net charge. - - - - - Each element of this field provides package-level rate data for a specific rate type. - - - - - - - Identifies the collection of special service offered by FedEx. BROKER_SELECT_OPTION should be used for Ground shipments only. - - - - - - - - - - - - - - These special services are available at the package level for some or all service types. If the shipper is requesting a special service which requires additional data, the package special service type must be present in the specialServiceTypes collection, and the supporting detail must be provided in the appropriate sub-object below. - - - - - The types of all special services requested for the enclosing shipment or package. - - - - - For use with FedEx Ground services only; COD must be present in shipment's special services. - - - - - Descriptive data required for a FedEx shipment containing dangerous materials. This element is required when SpecialServiceType.DANGEROUS_GOODS or HAZARDOUS_MATERIAL is present in the SpecialServiceTypes collection. - - - - - Descriptive data required for a FedEx shipment containing dry ice. This element is required when SpecialServiceType.DRY_ICE is present in the SpecialServiceTypes collection. - - - - - The descriptive data required for FedEx signature services. This element is required when SpecialServiceType.SIGNATURE_OPTION is present in the SpecialServiceTypes collection. - - - - - The descriptive data required for FedEx Priority Alert service. This element is required when SpecialServiceType.PRIORITY_ALERT is present in the SpecialServiceTypes collection. - - - - - - - Identifies the collection of available FedEx or customer packaging options. - - - - - - - - - - - - - - The descriptive data for a person or company entitiy doing business with FedEx. - - - - - Identifies the FedEx account number assigned to the customer. - - 12 - - - - - - - Descriptive data identifying the point-of-contact person. - - - - - The descriptive data for a physical location. - - - - - - - The descriptive data for the monetary compensation given to FedEx for services rendered to the customer. - - - - - Identifies the method of payment for a service. See PaymentType for list of valid enumerated values. - - - - - Descriptive data identifying the party responsible for payment for a service. - - - - - - - Identifies the method of payment for a service. - - - - - - - - - - - The descriptive data identifying the party responsible for payment for a service. - - - - - Identifies the FedEx account number assigned to the payor. - - 12 - - - - - - Identifies the country of the payor. - - 2 - - - - - - - - This information describes how and when a pending shipment may be accessed for completion. - - - - - Only for pending shipment type of "EMAIL" - - - - - Only for pending shipment type of "EMAIL" - - - - - Only for pending shipment type of "EMAIL" - - - - - This element is currently not supported and is for the future use. - - - - - - - This information describes the kind of pending shipment being requested. - - - - - Identifies the type of FedEx pending shipment - - - - - Date after which the pending shipment will no longer be available for completion. - - - - - Only used with type of EMAIL. - - - - - - - Identifies the type of service for a pending shipment. - - - - - - - - This enumeration rationalizes the former FedEx Express international "admissibility package" types (based on ANSI X.12) and the FedEx Freight packaging types. The values represented are those common to both carriers. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This class describes the pickup characteristics of a shipment (e.g. for use in a tag request). - - - - - - - - Identifies the type of Pickup request - - - - - Identifies the type of source for Pickup request - - - - - - - Identifies the type of source for pickup request service. - - - - - - - - - Identifies the type of pickup request service. - - - - - - - - - Identifies the type of pricing used for this shipment. - - - - - - - - - - - - - - - - - - - - Represents a reference identifier printed on Freight bills of lading - - - - - - - - - Identifies a particular reference identifier printed on a Freight bill of lading. - - - - - - - - - - - - - - - - This indicates the highest level of severity of all the notifications returned in this reply - - - - - The descriptive data regarding the results of the submitted transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - The reply payload. All of the returned information about this shipment/package. - - - - - Empty unless error label behavior is PACKAGE_ERROR_LABELS and one or more errors occured during transaction processing. - - - - - - - Descriptive data sent to FedEx by a customer in order to ship a package. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Descriptive data about the shipment being sent by the requestor. - - - - - - - - - - - - - - - - Descriptive data sent to FedEx by a customer in order to ship a package. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Descriptive data about the shipment being sent by the requestor. - - - - - - - Test for the Commercial Invoice. Note that Sold is not a valid Purpose for a Proforma Invoice. - - - - - - - - - - - - - Indicates the reason that a dim divisor value was chose. - - - - - - - - - - - - Identifies a discount applied to the shipment. - - - - - Identifies the type of discount applied to the shipment. - - - - - - The amount of the discount applied to the shipment. - - - - - The percentage of the discount applied to the shipment. - - - - - - - The type of the discount. - - - - - - - - - - - - - Identifies the type(s) of rates to be returned in the reply. - - - - - - - - - - The weight method used to calculate the rate. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Specifies how the recipient is identified for customs purposes; the requirements on this information vary with destination country. - - - - - Specifies the kind of identification being used. - - - - - Contains the actual ID value, of the type specified above. - - - - - - - Type of Brazilian taxpayer identifier provided in Recipient/TaxPayerIdentification/Number. For shipments bound for Brazil this overrides the value in Recipient/TaxPayerIdentification/TinType - - - - - - - - - - FOOD_OR_PERISHABLE is required by FDA/BTA; must be true for food/perishable items coming to US or PR from non-US/non-PR origin - - - - - - - - - - - - - - - - - This class rationalizes RequestedPackage and RequestedPackageSummary from previous interfaces. The way in which it is uses within a RequestedShipment depends on the RequestedPackageDetailType value specified for that shipment. - - - - - Used only with INDIVIDUAL_PACKAGE, as a unique identifier of each requested package. - - - - - Used only with PACKAGE_GROUPS, as a unique identifier of each group of identical packages. - - - - - Used only with PACKAGE_GROUPS, as a count of packages within a group of identical packages. - - - - - - Only used for INDIVIDUAL_PACKAGES and PACKAGE_GROUPS. Ignored for PACKAGE_SUMMARY, in which case totalInsuredValue and packageCount on the shipment will be used to determine this value. - - - - - Only used for INDIVIDUAL_PACKAGES and PACKAGE_GROUPS. Ignored for PACKAGE_SUMMARY, in which case totalweight and packageCount on the shipment will be used to determine this value. - - - - - - Provides additional detail on how the customer has physically packaged this item. As of June 2009, required for packages moving under international and SmartPost services. - - - - - Human-readable text describing the package. - - - - - - - Only used for INDIVIDUAL_PACKAGES and PACKAGE_GROUPS. - - - - - - - The descriptive data for the shipment being tendered to FedEx. - - - - - Identifies the date and time the package is tendered to FedEx. Both the date and time portions of the string are expected to be used. The date should not be a past date or a date more than 10 days in the future. The time is the local time of the shipment based on the shipper's time zone. The date component must be in the format: YYYY-MM-DD (e.g. 2006-06-26). The time component must be in the format: HH:MM:SS using a 24 hour clock (e.g. 11:00 a.m. is 11:00:00, whereas 5:00 p.m. is 17:00:00). The date and time parts are separated by the letter T (e.g. 2006-06-26T17:00:00). There is also a UTC offset component indicating the number of hours/mainutes from UTC (e.g 2006-06-26T17:00:00-0400 is defined form June 26, 2006 5:00 pm Eastern Time). - - - - - Identifies the method by which the package is to be tendered to FedEx. This element does not dispatch a courier for package pickup. See DropoffType for list of valid enumerated values. - - - - - Identifies the FedEx service to use in shipping the package. See ServiceType for list of valid enumerated values. - - - - - Identifies the packaging used by the requestor for the package. See PackagingType for list of valid enumerated values. - - - - - Identifies the total weight of the shipment being conveyed to FedEx.This is only applicable to International shipments and should only be used on the first package of a mutiple piece shipment.This value contains 1 explicit decimal position - - - - - Total insured amount. - - - - - - Descriptive data identifying the party responsible for shipping the package. Shipper and Origin should have the same address. - - - - - Descriptive data identifying the party receiving the package. - - - - - A unique identifier for a recipient location - - 10 - - - - - - Physical starting address for the shipment, if different from shipper's address. - - - - - Descriptive data indicating the method and means of payment to FedEx for providing shipping services. - - - - - Descriptive data regarding special services requested by the shipper for this shipment. If the shipper is requesting a special service which requires additional data (e.g. COD), the special service type must be present in the specialServiceTypes collection, and the supporting detail must be provided in the appropriate sub-object. For example, to request COD, "COD" must be included in the SpecialServiceTypes collection and the CodDetail object must contain the required data. - - - - - Details specific to an Express freight shipment. - - - - - Data applicable to shipments using FEDEX_FREIGHT and FEDEX_NATIONAL_FREIGHT services. - - - - - Used with Ground Home Delivery and Freight. - - - - - Details about how to calculate variable handling charges at the shipment level. - - - - - Customs clearance data, used for both international and intra-country shipping. - - - - - For use in "process tag" transaction. - - - - - - If true, only the shipper/payor will have visibility of this shipment. - - - - - Specifies the client-requested response in the event of errors within shipment. - - - - - Details about the image format and printer type the label is to returned in. - - - - - Contains data used to create additional (non-label) shipping documents. - - - - - Specifies whether and what kind of rates the customer wishes to have quoted on this shipment. The reply will also be constrained by other data on the shipment and customer. - - - - - Specifies the type of rate the customer wishes to have used as the actual rate type. - - - - - Specifies whether the customer wishes to have Estimated Duties and Taxes provided with the rate quotation on this shipment. Only applies with shipments moving under international services. - - - - - Only used with multiple-transaction shipments. - - - - - Only used with multi-piece COD shipments sent in multiple transactions. Required on last transaction only. - - - - - The total number of packages in the entire shipment (even when the shipment spans multiple transactions.) - - - - - Specifies whether packages are described individually, in groups, or summarized in a single description for total-piece-total-weight. This field controls which fields of the RequestedPackageLineItem will be used, and how many occurrences are expected. - - - - - One or more package-attribute descriptions, each of which describes an individual package, a group of identical packages, or (for the total-piece-total-weight case) common characteristics all packages in the shipment. - - - - - - - - - - - - - - - - - - - - - - - These values are used to control the availability of certain special services at the time when a customer uses the e-mail label link to create a return shipment. - - - - - - - - - Return Email Details - - - - - Phone number of the merchant - - - - - Identifies the allowed (merchant-authorized) special services which may be selected when the subsequent shipment is created. Only services represented in EMailLabelAllowedSpecialServiceType will be controlled by this list. - - - - - - - Information relating to a return shipment. - - - - - The type of return shipment that is being requested. - - - - - Return Merchant Authorization - - - - - Describes specific information about the email label for return shipment. - - - - - - - The type of return shipment that is being requested. - - - - - - - - - - The "PAYOR..." rates are expressed in the currency identified in the payor's rate table(s). The "RATED..." rates are expressed in the currency of the origin country. Former "...COUNTER..." values have become "...RETAIL..." values, except for PAYOR_COUNTER and RATED_COUNTER, which have been removed. - - - - - - - - - - - - - - - - Shipping document type. - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return Merchant Authorization - - - - - The RMA number. - - 20 - - - - - - The reason for the return. - - 60 - - - - - - - - The tracking number information and the data to form the Astra barcode for the label. - - - - - The tracking number information for the shipment. - - - - - - The textual description of the special service applied to the package. - - - - - - - - Information about the routing, origin, destination and delivery of a shipment. - - - - - The routing information detail for this shipment. - - - - - The tracking number information and the data to form the Astra barcode for the label. - - - - - - - Identifies the collection of available FedEx service options. - - - - - - - - - - - - - - - - - - - - - - - - - Shipment-level totals of dry ice data across all packages. - - - - - Total number of packages in the shipment that contain dry ice. - - - - - Total shipment dry ice weight for all packages. - - - - - - - Data for a shipment's total/summary rates, as calculated per a specific rate type. The "total..." fields may differ from the sum of corresponding package data for Multiweight or Express MPS. - - - - - Type used for this specific set of rate data. - - - - - Indicates the rate scale used. - - - - - Indicates the rate zone used (based on origin and destination). - - - - - Identifies the type of pricing used for this shipment. - - - - - Indicates which weight was used. - - - - - INTERNAL FEDEX USE ONLY. - - - - - Specifies the currency exchange performed on financial amounts for this rate. - - - - - Indicates which special rating cases applied to this shipment. - - - - - The value used to calculate the weight based on the dimensions. - - - - - Identifies the type of dim divisor that was applied. - - - - - Specifies a fuel surcharge percentage. - - - - - The weight used to calculate these rates. - - - - - Sum of dimensional weights for all packages. - - - - - The total freight charge that was calculated for this package before surcharges, discounts and taxes. - - - - - The total discounts used in the rate calculation. - - - - - The freight charge minus discounts. - - - - - The total amount of all surcharges applied to this shipment. - - - - - This shipment's totalNetFreight + totalSurcharges (not including totalTaxes). - - - - - Total of the transportation-based taxes. - - - - - The net charge after applying all discounts and surcharges. - - - - - The total sum of all rebates applied to this shipment. - - - - - Total of all values under this shipment's dutiesAndTaxes; only provided if estimated duties and taxes were calculated for this shipment. - - - - - This shipment's totalNetCharge + totalDutiesAndTaxes; only provided if estimated duties and taxes were calculated for this shipment AND duties, taxes and transportation charges are all paid by the same sender's account. - - - - - Rate data specific to FedEx Freight and FedEx National Freight services. - - - - - All rate discounts that apply to this shipment. - - - - - All rebates that apply to this shipment. - - - - - All surcharges that apply to this shipment. - - - - - All transportation-based taxes applicable to this shipment. - - - - - All commodity-based duties and taxes applicable to this shipment. - - - - - The "order level" variable handling charges. - - - - - The total of all variable handling charges at both shipment (order) and package level. - - - - - - - This class groups together all shipment-level rate data (across all rate types) as part of the response to a shipping request, which groups shipment-level data together and groups package-level data by package. - - - - - This rate type identifies which entry in the following array is considered as presenting the "actual" rates for the shipment. - - - - - The "list" total net charge minus "actual" total net charge. - - - - - Each element of this field provides shipment-level rate totals for a specific rate type. - - - - - - - - - This indicates the highest level of severity of all the notifications returned in this reply - - - - - The descriptive data regarding the results of the submitted transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - - - Information about the routing, origin, destination and delivery of a shipment. - - - - - The prefix portion of the URSA (Universal Routing and Sort Aid) code. - - 2 - - - - - - The suffix portion of the URSA code. - - 5 - - - - - - The identifier of the origin location of the shipment. Express only. - - 5 - - - - - - - The identifier of the destination location of the shipment. Express only. - - 5 - - - - - - - This is the state of the destination location ID, and is not necessarily the same as the postal state. - - - - - Expected/estimated date of delivery. - - - - - Expected/estimated day of week of delivery. - - - - - Committed date of delivery. - - - - - Committed day of week of delivery. - - - - - Standard transit time per origin, destination, and service. - - - - - Maximum expected transit time - - - - - Text describing planned delivery. - - - - - Currently not supported. - - TBD - - - - - - The postal code of the destination of the shipment. - - 16 - - - - - - The state or province code of the destination of the shipment. - - 14 - - - - - - The country code of the destination of the shipment. - - 2 - - - - - - The identifier for the airport of the destination of the shipment. - - 4 - - - - - - - - Identifies the collection of special service offered by FedEx. BROKER_SELECT_OPTION should be used for Express shipments only. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - These special services are available at the shipment level for some or all service types. If the shipper is requesting a special service which requires additional data (such as the COD amount), the shipment special service type must be present in the specialServiceTypes collection, and the supporting detail must be provided in the appropriate sub-object below. - - - - - The types of all special services requested for the enclosing shipment (or other shipment-level transaction). - - - - - Descriptive data required for a FedEx COD (Collect-On-Delivery) shipment. This element is required when SpecialServiceType.COD is present in the SpecialServiceTypes collection. - - - - - Descriptive data required for a FedEx shipment that is to be held at the destination FedEx location for pickup by the recipient. This element is required when SpecialServiceType.HOLD_AT_LOCATION is present in the SpecialServiceTypes collection. - - - - - Descriptive data required for FedEx to provide email notification to the customer regarding the shipment. This element is required when SpecialServiceType.EMAIL_NOTIFICATION is present in the SpecialServiceTypes collection. - - - - - The descriptive data required for FedEx Printed Return Label. This element is required when SpecialServiceType.PRINTED_RETURN_LABEL is present in the SpecialServiceTypes collection - - - - - This field should be populated for pending shipments (e.g. e-mail label) It is required by a PENDING_SHIPMENT special service type. - - - - - Number of packages in this shipment which contain dry ice and the total weight of the dry ice for this shipment. - - - - - The descriptive data required for FedEx Home Delivery options. This element is required when SpecialServiceType.HOME_DELIVERY_PREMIUM is present in the SpecialServiceTypes collection - - - - - Electronic Trade document references. - - - - - Specification for date or range of dates on which delivery is to be attempted. - - - - - - - All package-level shipping documents (other than labels and barcodes). - - - - - Shipping Document Type - - - - - Specifies how this document image/file is organized. - - - - - - The name under which a STORED or DEFERRED document is written. - - - - - Specifies the image resolution in DPI (dots per inch). - - - - - Can be zero for documents whose disposition implies that no content is included. - - - - - One or more document parts which make up a single logical document, such as multiple pages of a single form. - - - - - - - Each occurrence of this class specifies a particular way in which a kind of shipping document is to be produced and provided. - - - - - Values in this field specify how to create and return the document. - - - - - Specifies how to organize all documents of this type. - - - - - Specifies how to e-mail document images. - - - - - Specifies how a queued document is to be printed. - - - - - - - Specifies how to return a shipping document to the caller. - - - - - - - - - - - - - - Specifies how to e-mail shipping documents. - - - - - Provides the roles and email addresses for e-mail recipients. - - - - - Identifies the convention by which documents are to be grouped as e-mail attachments. - - - - - - - - - - - - - Specifies an individual recipient of e-mailed shipping document(s). - - - - - Identifies the relationship of this recipient in the shipment. - - - - - Address to which the document is to be sent. - - - - - - - Specifies characteristics of a shipping document to be produced. - - - - - Specifies how to create, organize, and return the document. - - - - - Specifies how far down the page to move the beginning of the image; allows for printing on letterhead and other pre-printed stock. - - - - - - - For those shipping document types which have both a "form" and "instructions" component (e.g. NAFTA Certificate of Origin and General Agency Agreement), this field indicates whether to provide the instructions. - - - - - Governs the language to be used for this individual document, independently from other content returned for the same shipment. - - - - - Identifies the individual document specified by the client. - - - - - - - Specifies how to organize all shipping documents of the same type. - - - - - - - - - Specifies the image format used for a shipping document. - - - - - - - - - - - - - - - A single part of a shipping document, such as one page of a multiple-page document whose format requires a separate image per page. - - - - - The one-origin position of this part within a document. - - - - - Graphic or printer commands for this image within a document. - - - - - - - Specifies printing options for a shipping document. - - - - - Provides environment-specific printer identification. - - - - - - - Contains all data required for additional (non-label) shipping documents to be produced in conjunction with a specific shipment. - - - - - Indicates the types of shipping documents requested by the shipper. - - - - - - - Specifies the production of each package-level custom document (the same specification is used for all packages). - - - - - Specifies the production of a shipment-level custom document. - - - - - This element is currently not supported and is for the future use. (Details pertaining to the GAA.) - - - - - - Specifies the production of the OP-900 document for hazardous materials packages. - - - - - Specifies the production of the OP-900 document for hazardous materials. - - - - - - - Specifies the type of paper (stock) on which a document will be printed. - - - - - - - - - - - - - - - - - - The descriptive data required for FedEx delivery signature services. - - - - - Identifies the delivery signature services option selected by the customer for this shipment. See OptionType for the list of valid values. - - - - - Identifies the delivery signature release authorization number. - - 10 - - - - - - - - Identifies the delivery signature services options offered by FedEx. - - - - - - - - - - - - These values are mutually exclusive; at most one of them can be attached to a SmartPost shipment. - - - - - - - - - - - - - - - - - - - - - Data required for shipments handled under the SMART_POST and GROUND_SMART_POST service types. - - - - - - - - - The CustomerManifestId is used to group Smart Post packages onto a manifest for each trailer that is being prepared. If you do not have multiple trailers this field can be omitted. If you have multiple trailers, you - must assign the same Manifest Id to each SmartPost package as determined by its trailer. In other words, all packages on a trailer must have the same Customer Manifest Id. The manifest Id must be unique to your account number for a minimum of 6 months - and cannot exceed 8 characters in length. We recommend you use the day of year + the trailer id (this could simply be a sequential number for that trailer). So if you had 3 trailers that you started loading on Feb 10 - the 3 manifest ids would be 041001, 041002, 041003 (in this case we used leading zeros on the trailer numbers). - - - - - - - - Special circumstance rating used for this shipment. - - - - - - - - - Each instance of this data type represents a barcode whose content must be represented as ASCII text (i.e. not binary data). - - - - - The kind of barcode data in this instance. - - - - - The data content of this instance. - - - - - - - - - - - - - - - - - Identifies each surcharge applied to the shipment. - - - - - The type of surcharge applied to the shipment. - - - - - - - The amount of the surcharge applied to the shipment. - - - - - - - - - - - - - The type of the surcharge. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Identifies each tax applied to the shipment. - - - - - The type of tax applied to the shipment. - - - - - - The amount of the tax applied to the shipment. - - - - - - - The type of the tax. - - - - - - - - - - - - - - The descriptive data for taxpayer identification information. - - - - - Identifies the category of the taxpayer identification number. See TinType for the list of values. - - - - - Identifies the taxpayer identification number. - - 15 - - - - - - Identifies the usage of Tax Identification Number in Shipment processing - - - - - - - - Required for dutiable international express or ground shipment. This field is not applicable to an international PIB (document) or a non-document which does not require a commercial invoice express shipment. - CFR_OR_CPT (Cost and Freight/Carriage Paid TO) - CIF_OR_CIP (Cost Insurance and Freight/Carraige Insurance Paid) - DDP (Delivered Duty Paid) - DDU (Delivered Duty Unpaid) - EXW (Ex Works) - FOB_OR_FCA (Free On Board/Free Carrier) - - - - - - - - - - - - - - Identifies the category of the taxpayer identification number. - - - - - - - - - - - - - - - For use with SmartPost tracking IDs only - - - - - - - - TrackingIdType - - - - - - - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Free form text to be echoed back in the reply. Used to match requests and replies. - - - - - Governs data payload language/translations (contrasted with ClientDetail.localization, which governs Notification.localizedMessage language selection). - - - - - - - Identifies the set of valid shipment transit time values. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Descriptive data sent to FedEx by a customer in order to validate a shipment. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Descriptive data for this customer transaction. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Descriptive data about the shipment being sent by the requestor. - - - - - - - Documents the kind and quantity of an individual hazardous commodity in a package. - - - - - Identifies and describes an individual hazardous commodity. - - - - - Specifies the amount of the commodity in alternate units. - - - - - Customer-provided specifications for handling individual commodities. - - - - - - - Identifies and describes an individual hazardous commodity. For 201001 load, this is based on data from the FedEx Ground Hazardous Materials Shipping Guide. - - - - - Regulatory identifier for a commodity (e.g. "UN ID" value). - - - - - - - Fully-expanded descriptive text for a hazardous commodity. - - - - - - - - Coded indications for special requirements or constraints. - - - - - - - - Details about how to calculate variable handling charges at the shipment level. - - - - - The type of handling charge to be calculated and returned in the reply. - - - - - - Used with Variable handling charge type of FIXED_VALUE. - Contains the amount to be added to the freight charge. - Contains 2 explicit decimal positions with a total max length of 10 including the decimal. - - - - - - Actual percentage (10 means 10%, which is a mutiplier of 0.1) - - - - - - - The type of handling charge to be calculated and returned in the reply. - - - - - - - - - - - The variable handling charges calculated based on the type variable handling charges requested. - - - - - The variable handling charge amount calculated based on the requested variable handling charge detail. - - - - - The calculated varibale handling charge plus the net charge. - - - - - - - Three-dimensional volume/cubic measurement. - - - - - - - - - Units of three-dimensional volume/cubic measure. - - - - - - - - - The descriptive data for the heaviness of an object. - - - - - Identifies the unit of measure associated with a weight value. - - - - - Identifies the weight value of a package/shipment. - - - - - - - Identifies the unit of measure associated with a weight value. See the list of enumerated types for valid values. - - - - - - - - - Used in authentication of the sender's identity. - - - - - Credential used to authenticate a specific software application. This value is provided by FedEx after registration. - - - - - - - Two part authentication string used for the sender's identity - - - - - Identifying part of authentication credential. This value is provided by FedEx after registration - - - - - Secret part of authentication key. This value is provided by FedEx after registration. - - - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Identifies a system or sub-system which performs an operation. - - - - - Identifies the service business level. - - - - - Identifies the service interface level. - - - - - Identifies the service code level. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/code/core/Mage/Usa/etc/wsdl/FedEx/TrackService_v5.wsdl b/app/code/core/Mage/Usa/etc/wsdl/FedEx/TrackService_v5.wsdl deleted file mode 100644 index f3ceaf5056..0000000000 --- a/app/code/core/Mage/Usa/etc/wsdl/FedEx/TrackService_v5.wsdl +++ /dev/null @@ -1,1510 +0,0 @@ - - - - - - - - - - - - - - Descriptive data for a physical location. May be used as an actual physical address (place to which one could go), or as a container of "address parts" which should be handled as a unit (such as a city-state-ZIP combination within the US). - - - - - Combination of number, street name, etc. At least one line is required for a valid physical address; empty lines should not be included. - - - - - Name of city, town, etc. - - - - - Identifying abbreviation for US state, Canada province, etc. Format and presence of this field will vary, depending on country. - - - - - Identification of a region (usually small) for mail/package delivery. Format and presence of this field will vary, depending on country. - - - - - Relevant only to addresses in Puerto Rico. - - - - - The two-letter code used to identify a country. - - - - - Indicates whether this address residential (as opposed to commercial). - - - - - - - Identifies where a tracking event occurs. - - - - - - - - - - - - - - - - - - - - - - - - - - - Identification of a FedEx operating company (transportation). - - - - - - - - - - - - - Descriptive data for the client submitting a transaction. - - - - - The FedEx account number associated with this transaction. - - - - - This number is assigned by FedEx and identifies the unique device from which the request is originating - - - - - Only used in transactions which require identification of the Fed Ex Office integrator. - - - - - The language to be used for human-readable Notification.localizedMessages in responses to the request containing this ClientDetail object. Different requests from the same client may contain different Localization data. (Contrast with TransactionDetail.localization, which governs data payload language/translation.) - - - - - - - The descriptive data for a point-of-contact person. - - - - - Identifies the contact person's name. - - - - - Identifies the contact person's title. - - - - - Identifies the company this contact is associated with. - - - - - Identifies the phone number associated with this contact. - - - - - Identifies the phone extension associated with this contact. - - - - - Identifies the pager number associated with this contact. - - - - - Identifies the fax number associated with this contact. - - - - - Identifies the email address associated with this contact. - - - - - - - - - - - - - The dimensions of this package and the unit type used for the measurements. - - - - - - - - - - - Driving or other transportation distances, distinct from dimension measurements. - - - - - Identifies the distance quantity. - - - - - Identifies the unit of measure for the distance value. - - - - - - - Identifies the collection of units of measure that can be associated with a distance value. - - - - - - - - - Information describing email notifications that will be sent in relation to events that occur during package movement - - - - - A message that will be included in the email notifications - - - - - Information describing the destination of the email, format of the email and events to be notified on - - - - - - - - - - - - - - - The format of the email - - - - - - - - - - - - Identifies the relationship this email recipient has to the shipment. - - - - - The email address to send the notification to - - - - - The types of email notifications being requested for this recipient. - - - - - The format of the email notification. - - - - - The language/locale to be used in this email notification. - - - - - - - - - - - - - - - CM = centimeters, IN = inches - - - - - - - - - Identifies the representation of human-readable text. - - - - - Two-letter code for language (e.g. EN, FR, etc.) - - - - - Two-letter code for the region (e.g. us, ca, etc..). - - - - - - - The descriptive data regarding the result of the submitted transaction. - - - - - The severity of this notification. This can indicate success or failure or some other information about the request. The values that can be returned are SUCCESS - Your transaction succeeded with no other applicable information. NOTE - Additional information that may be of interest to you about your transaction. WARNING - Additional information that you need to know about your transaction that you may need to take action on. ERROR - Information about an error that occurred while processing your transaction. FAILURE - FedEx was unable to process your transaction at this time due to a system failure. Please try again later - - - - - Indicates the source of this notification. Combined with the Code it uniquely identifies this notification - - - - - A code that represents this notification. Combined with the Source it uniquely identifies this notification. - - - - - Human-readable text that explains this notification. - - - - - The translated message. The language and locale specified in the ClientDetail. Localization are used to determine the representation. Currently only supported in a TrackReply. - - - - - A collection of name/value pairs that provide specific data to help the client determine the nature of an error (or warning, etc.) witout having to parse the message string. - - - - - - - - - Identifies the type of data contained in Value (e.g. SERVICE_TYPE, PACKAGE_SEQUENCE, etc..). - - - - - The value of the parameter (e.g. PRIORITY_OVERNIGHT, 2, etc..). - - - - - - - Identifies the set of severity values for a Notification. - - - - - - - - - - - - - - - - - - - - Identification for a FedEx operating company (transportation and non-transportation). - - - - - - - - The enumerated packaging type used for this package. - - - - - - - - - - - - - - Tracking number and additional shipment data used to identify a unique shipment for proof of delivery. - - - - - FedEx assigned identifier for a package/shipment. - - - - - The date the package was shipped. - - - - - If the account number used to ship the package is provided in the request the shipper and recipient information is included on the letter or fax. - - - - - FedEx operating company that delivered the package. - - - - - Only country is used for elimination of duplicate tracking numbers. - - - - - - - - - - - - - - The service type of the package/shipment. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FedEx Signature Proof Of Delivery Fax reply. - - - - - This contains the severity type of the most severe Notification in the Notifications array. - - - - - Information about the request/reply such was the transaction successful or not, and any additional information relevant to the request and/or reply. There may be multiple Notifications in a reply. - - - - - Contains the CustomerTransactionDetail that is echoed back to the caller for matching requests and replies and a Localization element for defining the language/translation used in the reply data. - - - - - Contains the version of the reply being used. - - - - - Confirmation of fax transmission. - - - - - - - FedEx Signature Proof Of Delivery Fax request. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Contains a free form field that is echoed back in the reply to match requests with replies and data that governs the data payload language/translations. - - - - - The version of the request being used. - - - - - Tracking number and additional shipment data used to identify a unique shipment for proof of delivery. - - - - - Additional customer-supplied text to be added to the body of the letter. - - - - - Contact and address information about the person requesting the fax to be sent. - - - - - Contact and address information, including the fax number, about the person to receive the fax. - - - - - - - Identifies the set of SPOD image types. - - - - - - - - FedEx Signature Proof Of Delivery Letter reply. - - - - - This contains the severity type of the most severe Notification in the Notifications array. - - - - - Information about the request/reply such was the transaction successful or not, and any additional information relevant to the request and/or reply. There may be multiple Notifications in a reply. - - - - - Contains the CustomerTransactionDetail that is echoed back to the caller for matching requests and replies and a Localization element for defining the language/translation used in the reply data. - - - - - Image of letter encoded in Base64 format. - - - - - Image of letter encoded in Base64 format. - - - - - - - FedEx Signature Proof Of Delivery Letter request. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Contains a free form field that is echoed back in the reply to match requests with replies and data that governs the data payload language/translations. - - - - - The version of the request being used. - - - - - Tracking number and additional shipment data used to identify a unique shipment for proof of delivery. - - - - - Additional customer-supplied text to be added to the body of the letter. - - - - - Identifies the set of SPOD image types. - - - - - If provided this information will be print on the letter. - - - - - - - Each instance of this data type represents a barcode whose content must be represented as ASCII text (i.e. not binary data). - - - - - The kind of barcode data in this instance. - - - - - The data content of this instance. - - - - - - - - - - - - - - - - - The delivery location at the delivered to address. - - - - - - - - - - - - - - - - Detailed tracking information about a particular package. - - - - - To report soft error on an individual track detail. - - - - - The FedEx package identifier. - - - - - - When duplicate tracking numbers exist this data is returned with summary information for each of the duplicates. The summary information is used to determine which of the duplicates the intended tracking number is. This identifier is used on a subsequent track request to retrieve the tracking data for the desired tracking number. - - - - - A code that identifies this type of status. This is the most recent status. - - - - - A human-readable description of this status. - - - - - Used to report the status of a piece of a multiple piece shipment which is no longer traveling with the rest of the packages in the shipment or has not been accounted for. - - - - - Used to convey information such as. 1. FedEx has received information about a package but has not yet taken possession of it. 2. FedEx has handed the package off to a third party for final delivery. 3. The package delivery has been cancelled - - - - - Identifies a FedEx operating company (transportation). - - - - - Identifies operating transportation company that is the specific to the carrier code. - - - - - Specifies the FXO production centre contact and address. - - - - - Other related identifiers for this package such as reference numbers. - - - - - Retained for legacy compatibility only. User/screen friendly description of the Service type (e.g. Priority Overnight). - - - - - Strict representation of the Service type (e.g. PRIORITY_OVERNIGHT). - - - - - The weight of this package. - - - - - Physical dimensions of the package. - - - - - The dimensional weight of the package. - - - - - The weight of the entire shipment. - - - - - Retained for legacy compatibility only. - - - - - Strict representation of the Packaging type (e.g. FEDEX_BOX, YOUR_PACKAGING). - - - - - The sequence number of this package in a shipment. This would be 2 if it was package number 2 of 4. - - - - - The number of packages in this shipment. - - - - - - - The address information for the shipper. - - - - - The address of the FedEx pickup location/facility. - - - - - Estimated package pickup time for shipments that haven't been picked up. - - - - - Time package was shipped/tendered over to FedEx. Time portion will be populated if available, otherwise will be set to midnight. - - - - - The distance from the origin to the destination. Returned for Custom Critical shipments. - - - - - Total distance package still has to travel. Returned for Custom Critical shipments. - - - - - The address this package is to be (or has been) delivered. - - - - - The address of the FedEx delivery location/facility. - - - - - Projected package delivery time based on ship time stamp, service and destination. Not populated if delivery has already occurred. - - - - - The time the package was actually delivered. - - - - - Actual address where package was delivered. Differs from destinationAddress, which indicates where the package was to be delivered; This field tells where delivery actually occurred (next door, at station, etc.) - - - - - Identifies the method of office order delivery. - - - - - Strict text indicating the delivery location at the delivered to address. - - - - - User/screen friendly representation of the DeliveryLocationType (delivery location at the delivered to address). Can be returned in localized text. - - - - - This is either the name of the person that signed for the package or "Signature not requested" or "Signature on file". - - - - - True if signed for by signature image is available. - - - - - The types of email notifications that are available for the package. - - - - - Returned for cargo shipments only when they are currently split across vehicles. - - - - - Indicates redirection eligibility as determined by tracking service, subject to refinement/override by redirect-to-hold service. - - - - - Event information for a tracking number. - - - - - - - FedEx scanning information about a package. - - - - - The time this event occurred. - - - - - Carrier's scan code. Pairs with EventDescription. - - - - - Literal description that pairs with the EventType. - - - - - Further defines the Scan Type code's specific type (e.g., DEX08 business closed). Pairs with StatusExceptionDescription. - - - - - Literal description that pairs with the StatusExceptionCode. - - - - - Address information of the station that is responsible for the scan. - - - - - Indicates where the arrival actually occurred. - - - - - - - The type of track to be performed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FedEx assigned identifier for a package/shipment. - - - - - When duplicate tracking numbers exist this data is returned with summary information for each of the duplicates. The summary information is used to determine which of the duplicates the intended tracking number is. This identifier is used on a subsequent track request to retrieve the tracking data for the desired tracking number. - - - - - Identification of a FedEx operating company (transportation). - - - - - The date the package was shipped (tendered to FedEx). - - - - - The destination address of this package. Only city, state/province, and country are returned. - - - - - Options available for a tracking notification recipient. - - - - - - - Options available for a tracking notification recipient. - - - - - The types of email notifications available for this recipient. - - - - - - - FedEx Track Notification reply. - - - - - This contains the severity type of the most severe Notification in the Notifications array. - - - - - Information about the request/reply such was the transaction successful or not, and any additional information relevant to the request and/or reply. There may be multiple Notifications in a reply. - - - - - Contains the CustomerTransactionDetail that is echoed back to the caller for matching requests and replies and a Localization element for defining the language/translation used in the reply data. - - - - - Contains the version of the reply being used. - - - - - True if duplicate packages (more than one package with the same tracking number) have been found, the packages array contains information about each duplicate. Use this information to determine which of the tracking numbers is the one you need and resend your request using the tracking number and TrackingNumberUniqueIdentifier for that package. - - - - - True if additional packages remain to be retrieved. - - - - - Value that must be passed in a TrackNotification request to retrieve the next set of packages (when MoreDataAvailable = true). - - - - - Information about the notifications that are available for this tracking number. If there are duplicates the ship date and destination address information is returned for determining which TrackingNumberUniqueIdentifier to use on a subsequent request. - - - - - - - FedEx Track Notification request. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Contains a free form field that is echoed back in the reply to match requests with replies and data that governs the data payload language/translations - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - The tracking number to which the notifications will be triggered from. - - - - - Indicates whether to return tracking information for all associated packages. - - - - - When the MoreDataAvailable field is true in a TrackNotificationReply the PagingToken must be sent in the subsequent TrackNotificationRequest to retrieve the next page of data. - - - - - Use this field when your original request informs you that there are duplicates of this tracking number. If you get duplicates you will also receive some information about each of the duplicate tracking numbers to enable you to chose one and resend that number along with the TrackingNumberUniqueId to get notifications for that tracking number. - - - - - To narrow the search to a period in time the ShipDateRangeBegin and ShipDateRangeEnd can be used to help eliminate duplicates. - - - - - To narrow the search to a period in time the ShipDateRangeBegin and ShipDateRangeEnd can be used to help eliminate duplicates. - - - - - Included in the email notification identifying the requester of this notification. - - - - - Included in the email notification identifying the requester of this notification. - - - - - Who to send the email notifications to and for which events. The notificationRecipientType and NotifyOnShipment fields are not used in this request. - - - - - - - The type and value of the package identifier that is to be used to retrieve the tracking information for a package. - - - - - The value to be used to retrieve tracking information for a package. - - - - - The type of the Value to be used to retrieve tracking information for a package (e.g. SHIPPER_REFERENCE, PURCHASE_ORDER, TRACKING_NUMBER_OR_DOORTAG, etc..) . - - - - - - - Used to report the status of a piece of a multiple piece shipment which is no longer traveling with the rest of the packages in the shipment or has not been accounted for. - - - - - An identifier for this type of status. - - - - - A human-readable description of this status. - - - - - - - The descriptive data returned from a FedEx package tracking request. - - - - - This contains the severity type of the most severe Notification in the Notifications array. - - - - - Information about the request/reply such was the transaction successful or not, and any additional information relevant to the request and/or reply. There may be multiple Notifications in a reply. - - - - - Contains the CustomerTransactionDetail that is echoed back to the caller for matching requests and replies and a Localization element for defining the language/translation used in the reply data. - - - - - Contains the version of the reply being used. - - - - - True if duplicate packages (more than one package with the same tracking number) have been found, and only limited data will be provided for each one. - - - - - True if additional packages remain to be retrieved. - - - - - Value that must be passed in a TrackNotification request to retrieve the next set of packages (when MoreDataAvailable = true). - - - - - Contains detailed tracking information for the requested packages(s). - - - - - - - The descriptive data sent by a client to track a FedEx package. - - - - - Descriptive data to be used in authentication of the sender's identity (and right to use FedEx web services). - - - - - Descriptive data identifying the client submitting the transaction. - - - - - Contains a free form field that is echoed back in the reply to match requests with replies and data that governs the data payload language/translations. - - - - - The version of the request being used. - - - - - The FedEx operating company (transportation) used for this package's delivery. - - - - - Identifies operating transportation company that is the specific to the carrier code. - - - - - The type and value of the package identifier that is to be used to retrieve the tracking information for a package or group of packages. - - - - - Used to distinguish duplicate FedEx tracking numbers. - - - - - To narrow the search to a period in time the ShipDateRangeBegin and ShipDateRangeEnd can be used to help eliminate duplicates. - - - - - To narrow the search to a period in time the ShipDateRangeBegin and ShipDateRangeEnd can be used to help eliminate duplicates. - - - - - For tracking by references information either the account number or destination postal code and country must be provided. - - - - - For tracking by references information either the account number or destination postal code and country must be provided. - - - - - If false the reply will contain summary/profile data including current status. If true the reply contains profile + detailed scan activity for each package. - - - - - When the MoreData field = true in a TrackReply the PagingToken must be sent in the subsequent TrackRequest to retrieve the next page of data. - - - - - - - - - - - - - Used when a cargo shipment is split across vehicles. This is used to give the status of each part of the shipment. - - - - - The number of pieces in this part. - - - - - The date and time this status began. - - - - - A code that identifies this type of status. - - - - - A human-readable description of this status. - - - - - - - Descriptive data that governs data payload language/translations. The TransactionDetail from the request is echoed back to the caller in the corresponding reply. - - - - - Free form text to be echoed back in the reply. Used to match requests and replies. - - - - - Governs data payload language/translations (contrasted with ClientDetail.localization, which governs Notification.localizedMessage language selection). - - - - - - - The descriptive data for the heaviness of an object. - - - - - Identifies the unit of measure associated with a weight value. - - - - - Identifies the weight value of a package/shipment. - - - - - - - Identifies the collection of units of measure that can be associated with a weight value. - - - - - - - - - Used in authentication of the sender's identity. - - - - - Credential used to authenticate a specific software application. This value is provided by FedEx after registration. - - - - - - - Two part authentication string used for the sender's identity - - - - - Identifying part of authentication credential. This value is provided by FedEx after registration - - - - - Secret part of authentication key. This value is provided by FedEx after registration. - - - - - - - Identifies the version/level of a service operation expected by a caller (in each request) and performed by the callee (in each reply). - - - - - Identifies a system or sub-system which performs an operation. - - - - - Identifies the service business level. - - - - - Identifies the service interface level. - - - - - Identifies the service code level. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/code/core/Mage/Usa/sql/usa_setup/upgrade-2.0.0-2.0.1.php b/app/code/core/Mage/Usa/sql/usa_setup/upgrade-2.0.0-2.0.1.php new file mode 100644 index 0000000000..b3235a4329 --- /dev/null +++ b/app/code/core/Mage/Usa/sql/usa_setup/upgrade-2.0.0-2.0.1.php @@ -0,0 +1,73 @@ + + * SPDX-License-Identifier: OSL-3.0 + * @package Mage_Usa + */ + +declare(strict_types=1); + +/** @var Mage_Core_Model_Resource_Setup $this */ +$installer = $this; +$installer->startSetup(); + +$connection = $installer->getConnection(); +$configTable = $installer->getTable('core/config_data'); + +// The SOAP web service credentials have no REST equivalent: the meter number is gone +// entirely and the key/password pair is replaced by an OAuth2 client id/secret. Drop +// the rows so no stale encrypted SOAP secret lingers in the database. +$connection->delete($configTable, [ + 'path IN (?)' => [ + 'carriers/fedex/meter_number', + 'carriers/fedex/key', + 'carriers/fedex/password', + ], +]); + +// REST collapses the five SOAP DropoffType values into three pickupType values. +$dropoffMap = [ + 'REGULAR_PICKUP' => 'USE_SCHEDULED_PICKUP', + 'REQUEST_COURIER' => 'CONTACT_FEDEX_TO_SCHEDULE', + 'DROP_BOX' => 'DROPOFF_AT_FEDEX_LOCATION', + 'BUSINESS_SERVICE_CENTER' => 'DROPOFF_AT_FEDEX_LOCATION', + 'STATION' => 'DROPOFF_AT_FEDEX_LOCATION', +]; + +foreach ($dropoffMap as $legacy => $rest) { + $connection->update( + $configTable, + ['value' => $rest], + ['path = ?' => 'carriers/fedex/dropoff', 'value = ?' => $legacy], + ); +} + +// REST renamed INTERNATIONAL_PRIORITY to FEDEX_INTERNATIONAL_PRIORITY and added a distinct +// FEDEX_INTERNATIONAL_PRIORITY_EXPRESS service. Rewriting the stored codes keeps the two +// apart; aliasing them at read time would collapse two differently-priced services into one. +$select = $connection->select() + ->from($configTable, ['config_id', 'path', 'value']) + ->where('path IN (?)', ['carriers/fedex/allowed_methods', 'carriers/fedex/free_method']); + +foreach ($connection->fetchAll($select) as $row) { + $codes = explode(',', (string) $row['value']); + $updated = false; + foreach ($codes as &$code) { + if (trim($code) === 'INTERNATIONAL_PRIORITY') { + $code = 'FEDEX_INTERNATIONAL_PRIORITY'; + $updated = true; + } + } + unset($code); + + if ($updated) { + $connection->update( + $configTable, + ['value' => implode(',', $codes)], + ['config_id = ?' => $row['config_id']], + ); + } +} + +$installer->endSetup(); diff --git a/app/locale/en_US/Mage_Usa.csv b/app/locale/en_US/Mage_Usa.csv index b4f2c058d6..e5c604e77b 100644 --- a/app/locale/en_US/Mage_Usa.csv +++ b/app/locale/en_US/Mage_Usa.csv @@ -23,7 +23,6 @@ "Authentication error","Authentication error" "Break bulk economy","Break bulk economy" "Break bulk express","Break bulk express" -"Business Service Center","Business Service Center" "Calculate Handling Fee","Calculate Handling Fee" "Canada Standard","Canada Standard" "Cannot identify measure unit for %s","Cannot identify measure unit for %s" @@ -35,7 +34,9 @@ "Client Secret (Consumer Secret)","Client Secret (Consumer Secret)" "cm","cm" "Commercial","Commercial" +"Comprehensive Rates and Transit Times","Comprehensive Rates and Transit Times" "Configuration","Configuration" +"Contact FedEx to Schedule","Contact FedEx to Schedule" "Container","Container" "Content Type","Content Type" "CRID (Customer Registration ID)","CRID (Customer Registration ID)" @@ -55,10 +56,11 @@ "Documents","Documents" "Domestic economy select","Domestic economy select" "Domestic express","Domestic express" -"Drop Box","Drop Box" "Dropoff","Dropoff" +"Dropoff at FedEx Location","Dropoff at FedEx Location" "Easy shop","Easy shop" "Economy select","Economy select" +"Economy Select","Economy Select" "Empty response","Empty response" "Enabled for Checkout","Enabled for Checkout" "Enable Negotiated Rates","Enable Negotiated Rates" @@ -87,6 +89,7 @@ "FedEx Pak","FedEx Pak" "FedEx Tube","FedEx Tube" "Field ""%s"" has wrong value.","Field ""%s"" has wrong value." +"First","First" "First-Class Mail International Large Envelope","First-Class Mail International Large Envelope" "First-Class Mail International Letter","First-Class Mail International Letter" "First-Class Mail International Postcard","First-Class Mail International Postcard" @@ -117,6 +120,7 @@ "Globalmail business","Globalmail business" "Ground","Ground" "Ground Commercial","Ground Commercial" +"Ground Economy","Ground Economy" "Ground Residential","Ground Residential" "Handling Applied","Handling Applied" "Handling Fee","Handling Fee" @@ -131,11 +135,11 @@ "International First","International First" "International Ground","International Ground" "International Priority","International Priority" +"International Priority Express","International Priority Express" "Intl Economy Freight","Intl Economy Freight" "Intl Priority Freight","Intl Priority Freight" "Jetline","Jetline" "Jumbo box","Jumbo box" -"Key","Key" "Kilograms","Kilograms" "Large","Large" "Large Express Box","Large Express Box" @@ -144,12 +148,12 @@ "Library Mail Parcel","Library Mail Parcel" "Live","Live" "Machinable","Machinable" +"Match the rate product enabled on your FedEx project. Registered FedEx Integrator Providers must select Comprehensive Rates and Transit Times; everyone else should keep Rates and Transit Times.","Match the rate product enabled on your FedEx project. Registered FedEx Integrator Providers must select Comprehensive Rates and Transit Times; everyone else should keep Rates and Transit Times." "Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)","Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)" "Media Mail Parcel","Media Mail Parcel" "Medical express","Medical express" "Medium Express Box","Medium Express Box" "Merchandise","Merchandise" -"Meter Number","Meter Number" "Method toOptionArray not found in source model.","Method toOptionArray not found in source model." "MID (Mailer ID)","MID (Mailer ID)" "Minimum Order Amount for Free Shipping","Minimum Order Amount for Free Shipping" @@ -171,12 +175,14 @@ "None","None" "No packages for request","No packages for request" "Not Required","Not Required" +"On Call","On Call" "Order","Order" "Order #%s","Order #%s" "Origin of the Shipment","Origin of the Shipment" "Other","Other" "Others","Others" "Package","Package" +"Package Return Program","Package Return Program" "Packages Request Type","Packages Request Type" "Packaging","Packaging" "PAK","PAK" @@ -192,6 +198,10 @@ "Please, specify origin country","Please, specify origin country" "Please make sure to use only digits here. No dashes are allowed.","Please make sure to use only digits here. No dashes are allowed." "Pounds","Pounds" +"Priority","Priority" +"Priority Express","Priority Express" +"Priority Express Freight","Priority Express Freight" +"Priority Freight","Priority Freight" "Priority Mail","Priority Mail" "Priority Mail Express","Priority Mail Express" "Priority Mail Express Flat Rate Envelope","Priority Mail Express Flat Rate Envelope" @@ -249,11 +259,12 @@ "Priority Mail Window Flat Rate Envelope Hold For Pickup","Priority Mail Window Flat Rate Envelope Hold For Pickup" "Priority Overnight","Priority Overnight" "Production","Production" +"Rate API","Rate API" +"Rates and Transit Times","Rates and Transit Times" "Rectangular","Rectangular" "Register your application at developers.usps.com to obtain OAuth credentials. Copy the Consumer Key as your Client ID and the Consumer Secret as your Client Secret. Use the same credentials for both test and production environments.","Register your application at developers.usps.com to obtain OAuth credentials. Copy the Consumer Key as your Client ID and the Consumer Secret as your Client Secret. Use the same credentials for both test and production environments." "Regular","Regular" -"Regular Pickup","Regular Pickup" -"Request Courier","Request Courier" +"Regular Stop","Regular Stop" "Required","Required" "Required for negotiated rates; 6-character UPS.","Required for negotiated rates; 6-character UPS." "Required for shipping label generation. EPS (Enterprise Payment System) or PERMIT.","Required for shipping label generation. EPS (Enterprise Payment System) or PERMIT." @@ -276,15 +287,16 @@ "Signature Required","Signature Required" "Size","Size" "Small Express Box","Small Express Box" -"Smart Post","Smart Post" "Sort Order","Sort Order" "Specific","Specific" "Sprintline","Sprintline" "Standard Overnight","Standard Overnight" -"Station","Station" "Subtotal","Subtotal" +"Tag","Tag" "Test (TEM)","Test (TEM)" -"The field is applicable if the Smart Post method is selected.","The field is applicable if the Smart Post method is selected." +"The API Key of your project on the FedEx Developer Portal.","The API Key of your project on the FedEx Developer Portal." +"The field is applicable if the Ground Economy method is selected.","The field is applicable if the Ground Economy method is selected." +"The Secret Key of your project on the FedEx Developer Portal.","The Secret Key of your project on the FedEx Developer Portal." "There is no items in this order","There is no items in this order" "The response is in wrong format.","The response is in wrong format." "Title","Title" @@ -323,6 +335,7 @@ "UPS Worldwide Express PlusSM","UPS Worldwide Express PlusSM" "UPS Worldwide Saver","UPS Worldwide Saver" "Use Commercial Pricing","Use Commercial Pricing" +"Use Scheduled Pickup","Use Scheduled Pickup" "User ID","User ID" "Use Test (TEM) environment for testing with the same credentials. Test labels will be watermarked and not processed for payment.","Use Test (TEM) environment for testing with the same credentials. Test labels will be watermarked and not processed for payment." "USPS","USPS" diff --git a/tests/Backend/Integration/Usa/FedexSandboxTest.php b/tests/Backend/Integration/Usa/FedexSandboxTest.php new file mode 100644 index 0000000000..41203efc04 --- /dev/null +++ b/tests/Backend/Integration/Usa/FedexSandboxTest.php @@ -0,0 +1,175 @@ + + * SPDX-License-Identifier: OSL-3.0 + * @package Mage_Usa + */ + +declare(strict_types=1); + +use Tests\FedexSandbox; + +uses(Tests\MahoBackendTestCase::class)->group('backend', 'fedex', 'sandbox'); + +/** + * FedEx sandbox codes that come back at random for byte-identical payloads. Observed + * roughly one call in three, on both the rate and comprehensive-rate endpoints. + */ +const FEDEX_TRANSIENT_ERROR_CODES = ['SERVICE.UNAVAILABLE.ERROR', 'SYSTEM.UNEXPECTED.ERROR']; + +/** + * Retry a sandbox call past those transients so the suite does not flake. + * + * Every other error still surfaces on the first attempt, and if the sandbox is genuinely + * down the retries run out and the assertion fails as it should. + */ +function fedexRetryTransient(callable $call, callable $errorCodeOf, int $attempts = 8): mixed +{ + for ($attempt = 1; ; $attempt++) { + $result = $call(); + if (!in_array($errorCodeOf($result), FEDEX_TRANSIENT_ERROR_CODES, true) || $attempt >= $attempts) { + return $result; + } + // Back off a little; hammering the sandbox instantly tends to return the same fault. + usleep(500_000 * $attempt); + } +} + +beforeEach(function () { + if (!FedexSandbox::isConfigured()) { + test()->markTestSkipped('FedEx sandbox credentials not set (FEDEX_SANDBOX_CLIENT_ID/SECRET)'); + } + + $this->oauth = new Mage_Usa_Model_Shipping_Carrier_Fedex_OAuthClient( + FedexSandbox::clientId(), + FedexSandbox::clientSecret(), + Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient::BASE_URL_SANDBOX, + ); + $this->client = new Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient( + $this->oauth, + true, + false, + FedexSandbox::rateEndpoint(), + ); +}); + +it('exchanges the client credentials for a bearer token', function () { + $token = $this->oauth->getAccessToken(); + + expect($token)->toBeString()->not->toBeEmpty(); + // FedEx issues a JWT; asserting the shape catches an endpoint that answers 200 with junk. + expect(substr_count($token, '.'))->toBe(2); +}); + +it('serves the second token request from the cache', function () { + Mage::app()->getCache()->clean('matchingAnyTag', [Mage_Usa_Model_Shipping_Carrier_Fedex_OAuthClient::CACHE_TAG]); + + $first = $this->oauth->getAccessToken(); + $second = $this->oauth->getAccessToken(); + + expect($second)->toBe($first); +}); + +it('tracks a known sandbox tracking number', function () { + $response = $this->client->track('122816215025810'); + + expect(Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient::extractErrorMessage($response))->toBeNull(); + + $trackResult = $response['output']['completeTrackResults'][0]['trackResults'][0]; + + expect($trackResult['latestStatusDetail']['statusByLocale'])->toBeString()->not->toBeEmpty(); + expect($trackResult['scanEvents'])->toBeArray()->not->toBeEmpty(); +}); + +it('renders a sandbox track response through the carrier', function () { + $carrier = Mage::getModel('usa/shipping_carrier_fedex'); + Mage::app()->getStore()->setConfig('carriers/fedex/client_id', FedexSandbox::clientId()); + Mage::app()->getStore()->setConfig('carriers/fedex/client_secret', FedexSandbox::clientSecret()); + Mage::app()->getStore()->setConfig('carriers/fedex/account', FedexSandbox::account()); + Mage::app()->getStore()->setConfig('carriers/fedex/sandbox_mode', '1'); + + $result = $carrier->getTracking('122816215025810'); + $tracking = $result->getAllTrackings()[0]; + + expect($tracking)->not->toBeInstanceOf(Mage_Shipping_Model_Tracking_Result_Error::class); + expect($tracking->getAllData()['status'])->toBeString()->not->toBeEmpty(); + expect($tracking->getAllData()['progressdetail'])->toBeArray()->not->toBeEmpty(); +}); + +it('quotes domestic rates for a US shipment', function () { + $payload = [ + 'accountNumber' => ['value' => FedexSandbox::account()], + 'rateRequestControlParameters' => ['returnTransitTimes' => false], + 'requestedShipment' => [ + 'shipper' => ['address' => ['postalCode' => '38017', 'countryCode' => 'US']], + 'recipient' => ['address' => ['postalCode' => '90210', 'countryCode' => 'US']], + 'shipDateStamp' => Mage_Core_Model_Locale::todayUtc(), + 'pickupType' => 'USE_SCHEDULED_PICKUP', + 'packagingType' => 'YOUR_PACKAGING', + 'rateRequestType' => ['ACCOUNT', 'LIST'], + 'totalPackageCount' => 1, + 'requestedPackageLineItems' => [ + ['groupPackageCount' => 1, 'weight' => ['units' => 'LB', 'value' => 10]], + ], + ], + ]; + + $response = fedexRetryTransient( + fn() => $this->client->getRates($payload), + fn(array $r) => $r['errors'][0]['code'] ?? null, + ); + + expect(Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient::extractErrorMessage($response))->toBeNull(); + expect($response['output']['rateReplyDetails'])->toBeArray()->not->toBeEmpty(); + + $reply = $response['output']['rateReplyDetails'][0]; + + expect($reply)->toHaveKey('serviceType'); + expect($reply['ratedShipmentDetails'][0])->toHaveKey('rateType'); +}); + +it('collects priced rates through the carrier, as checkout does', function () { + $store = Mage::app()->getStore(); + $store->setConfig('carriers/fedex/active', '1'); + $store->setConfig('carriers/fedex/client_id', FedexSandbox::clientId()); + $store->setConfig('carriers/fedex/client_secret', FedexSandbox::clientSecret()); + $store->setConfig('carriers/fedex/account', FedexSandbox::account()); + $store->setConfig('carriers/fedex/sandbox_mode', '1'); + $store->setConfig('carriers/fedex/rate_endpoint', FedexSandbox::rateEndpoint()); + $store->setConfig('shipping/origin/country_id', 'US'); + $store->setConfig('shipping/origin/postcode', '38017'); + $store->setConfig( + 'carriers/fedex/allowed_methods', + 'FEDEX_GROUND,FEDEX_EXPRESS_SAVER,FEDEX_2_DAY,FEDEX_2_DAY_AM,' + . 'STANDARD_OVERNIGHT,PRIORITY_OVERNIGHT,FIRST_OVERNIGHT', + ); + + $request = new Mage_Shipping_Model_Rate_Request(); + $request->setStoreId(1); + $request->setDestCountryId('US'); + $request->setDestPostcode('90210'); + $request->setPackageWeight(10); + $request->setFreeMethodWeight(10); + $request->setPackageValue(100); + $request->setPackagePhysicalValue(100); + $request->setPackageValueWithDiscount(100); + $request->setPackageQty(1); + + // Rate results carry no FedEx error code, so retry while every rate is an error object. + $rates = fedexRetryTransient( + fn() => Mage::getModel('usa/shipping_carrier_fedex')->collectRates($request)->getAllRates(), + fn(array $rates) => array_filter($rates, fn($r) => !$r instanceof Mage_Shipping_Model_Rate_Result_Error) + ? null + : FEDEX_TRANSIENT_ERROR_CODES[0], + ); + + expect($rates)->not->toBeEmpty(); + // An error result here means the quote failed; the storefront would silently show + // no FedEx option, so this must fail the suite rather than pass with zero rates. + foreach ($rates as $rate) { + expect($rate)->not->toBeInstanceOf(Mage_Shipping_Model_Rate_Result_Error::class); + } + expect($rates[0]->getMethod())->toBeString()->not->toBeEmpty(); + expect((float) $rates[0]->getPrice())->toBeGreaterThan(0.0); +}); diff --git a/tests/Backend/Unit/Adminhtml/Model/Email/PathValidatorTest.php b/tests/Backend/Unit/Adminhtml/Model/Email/PathValidatorTest.php index f2e09e94ab..a405287a81 100644 --- a/tests/Backend/Unit/Adminhtml/Model/Email/PathValidatorTest.php +++ b/tests/Backend/Unit/Adminhtml/Model/Email/PathValidatorTest.php @@ -75,7 +75,7 @@ 'smtp/configuration/password', 'system/smtp/password', 'carriers/ups/password', - 'carriers/fedex/key', + 'carriers/fedex/client_secret', 'carriers/dhl/password', ]; diff --git a/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php new file mode 100644 index 0000000000..40f4aeed88 --- /dev/null +++ b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php @@ -0,0 +1,646 @@ + + * SPDX-License-Identifier: OSL-3.0 + * @package Mage_Usa + */ + +declare(strict_types=1); + +uses(Tests\MahoBackendTestCase::class); + +/** + * Exposes the carrier's protected REST plumbing so payload building and response + * parsing can be asserted without touching the network, and lets a test pin + * carrier config without writing to core_config_data. + */ +final class FedexRestProbe extends Mage_Usa_Model_Shipping_Carrier_Fedex +{ + /** @var array */ + public array $config = []; + + #[\Override] + public function getConfigData($field) + { + return array_key_exists($field, $this->config) ? $this->config[$field] : parent::getConfigData($field); + } + + #[\Override] + public function getConfigFlag($field) + { + return array_key_exists($field, $this->config) ? (bool) $this->config[$field] : parent::getConfigFlag($field); + } + + public function formRateRequest(string $purpose): array + { + return $this->_formRateRequest($purpose); + } + + public function prepareRateResponse(array $response): Mage_Shipping_Model_Rate_Result + { + return $this->_prepareRateResponse($response); + } + + public function parseTrackingResponse(string $trackingValue, array $response): Mage_Shipping_Model_Tracking_Result + { + $this->_parseTrackingResponse($trackingValue, $response); + return $this->_result; + } + + public function formShipmentRequest(\Maho\DataObject $request): array + { + return $this->_formShipmentRequest($request); + } + + public function setRawRequest(\Maho\DataObject $request): void + { + $this->_rawRequest = $request; + } +} + +function fedexProbe(array $config = []): FedexRestProbe +{ + $probe = new FedexRestProbe(); + $probe->config = array_merge([ + 'account' => '510087020', + 'client_id' => 'test-client-id', + 'client_secret' => 'test-client-secret', + 'sandbox_mode' => 1, + 'dropoff' => 'USE_SCHEDULED_PICKUP', + 'packaging' => 'YOUR_PACKAGING', + 'unit_of_measure' => 'LB', + 'residence_delivery' => 0, + 'smartpost_hubid' => '5531', + 'title' => 'Federal Express', + 'specificerrmsg' => 'This shipping method is currently unavailable.', + 'allowed_methods' => 'FEDEX_GROUND,FEDEX_2_DAY,PRIORITY_OVERNIGHT,FEDEX_INTERNATIONAL_PRIORITY,SMART_POST', + ], $config); + + return $probe; +} + +function fedexRawRateRequest(array $overrides = []): \Maho\DataObject +{ + $r = new \Maho\DataObject(); + $r->addData(array_merge([ + 'account' => '510087020', + 'dropoff_type' => 'USE_SCHEDULED_PICKUP', + 'packaging' => 'YOUR_PACKAGING', + 'orig_country' => 'US', + 'orig_postal' => '38017', + 'dest_country' => 'US', + 'dest_postal' => '90210', + 'weight' => 10.0, + 'value' => 100.0, + ], $overrides)); + + return $r; +} + +function fedexFixture(string $name): array +{ + $json = file_get_contents(__DIR__ . '/_fixtures/' . $name . '.json'); + + return Mage::helper('core')->jsonDecode($json); +} + +function fedexTrackFixture(): array +{ + return fedexFixture('track-response'); +} + +/** + * The FedEx defaults as shipped in Mage_Usa's config.xml. + * + * Read from the file rather than Mage::getConfig(), which merges core_config_data over the + * XML: a store with FedEx configured would otherwise make these assertions read back its + * own saved values instead of the shipped defaults. + */ +function fedexShippedDefaults(): SimpleXMLElement +{ + $xml = simplexml_load_file(Mage::getModuleDir('etc', 'Mage_Usa') . DS . 'config.xml'); + + return $xml->default->carriers->fedex; +} + +describe('FedEx REST rate request payload', function () { + it('builds the REST envelope and drops every SOAP-only block', function () { + $probe = fedexProbe(); + $probe->setRawRequest(fedexRawRateRequest()); + + $payload = $probe->formRateRequest(Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_GENERAL); + + expect($payload) + ->toHaveKey('accountNumber') + ->toHaveKey('requestedShipment') + ->and($payload)->not->toHaveKey('WebAuthenticationDetail') + ->and($payload)->not->toHaveKey('ClientDetail') + ->and($payload)->not->toHaveKey('Version') + ->and($payload)->not->toHaveKey('RequestedShipment'); + + expect($payload['accountNumber']['value'])->toBe('510087020'); + }); + + it('maps origin and destination onto the REST shipper/recipient addresses', function () { + $probe = fedexProbe(); + $probe->setRawRequest(fedexRawRateRequest()); + + $shipment = $probe->formRateRequest( + Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_GENERAL, + )['requestedShipment']; + + expect($shipment['shipper']['address'])->toBe(['postalCode' => '38017', 'countryCode' => 'US']); + expect($shipment['recipient']['address'])->toBe([ + 'postalCode' => '90210', + 'countryCode' => 'US', + 'residential' => false, + ]); + }); + + it('sends pickupType, packagingType and a single weighted package line item', function () { + $probe = fedexProbe(); + $probe->setRawRequest(fedexRawRateRequest()); + + $shipment = $probe->formRateRequest( + Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_GENERAL, + )['requestedShipment']; + + expect($shipment['pickupType'])->toBe('USE_SCHEDULED_PICKUP'); + expect($shipment['packagingType'])->toBe('YOUR_PACKAGING'); + expect($shipment['rateRequestType'])->toBe(['ACCOUNT', 'LIST']); + expect($shipment['totalPackageCount'])->toBe(1); + expect($shipment['requestedPackageLineItems'])->toHaveCount(1); + expect($shipment['requestedPackageLineItems'][0]['weight'])->toBe(['units' => 'LB', 'value' => 10.0]); + expect($shipment['requestedPackageLineItems'][0]['groupPackageCount'])->toBe(1); + }); + + it('translates a legacy dropoff code to its REST pickupType', function () { + $probe = fedexProbe(); + $probe->setRawRequest(fedexRawRateRequest(['dropoff_type' => 'DROP_BOX'])); + + $shipment = $probe->formRateRequest( + Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_GENERAL, + )['requestedShipment']; + + expect($shipment['pickupType'])->toBe('DROPOFF_AT_FEDEX_LOCATION'); + }); + + it('ships a shipDateStamp as a plain date, not a SOAP timestamp', function () { + $probe = fedexProbe(); + $probe->setRawRequest(fedexRawRateRequest()); + + $shipment = $probe->formRateRequest( + Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_GENERAL, + )['requestedShipment']; + + expect($shipment['shipDateStamp'])->toMatch('/^\d{4}-\d{2}-\d{2}$/'); + }); + + it('adds customs clearance detail only when the shipment crosses a border', function () { + $domestic = fedexProbe(); + $domestic->setRawRequest(fedexRawRateRequest()); + $domesticShipment = $domestic->formRateRequest( + Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_GENERAL, + )['requestedShipment']; + + expect($domesticShipment)->not->toHaveKey('customsClearanceDetail'); + + $international = fedexProbe(); + $international->setRawRequest(fedexRawRateRequest(['dest_country' => 'CA', 'dest_postal' => 'M5H 2N2'])); + $internationalShipment = $international->formRateRequest( + Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_GENERAL, + )['requestedShipment']; + + expect($internationalShipment['customsClearanceDetail']['commodities'][0]['customsValue'])->toBe([ + 'amount' => 100.0, + 'currency' => $international->getCurrencyCode(), + ]); + }); + + it('switches to the SmartPost service with a weight-derived indicia', function () { + $light = fedexProbe(); + $light->setRawRequest(fedexRawRateRequest(['weight' => 0.5])); + $lightShipment = $light->formRateRequest( + Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_SMARTPOST, + )['requestedShipment']; + + expect($lightShipment['serviceType'])->toBe('SMART_POST'); + expect($lightShipment['smartPostInfoDetail'])->toBe([ + 'indicia' => 'PRESORTED_STANDARD', + 'hubId' => '5531', + ]); + + $heavy = fedexProbe(); + $heavy->setRawRequest(fedexRawRateRequest(['weight' => 4.0])); + $heavyShipment = $heavy->formRateRequest( + Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_SMARTPOST, + )['requestedShipment']; + + expect($heavyShipment['smartPostInfoDetail']['indicia'])->toBe('PARCEL_SELECT'); + }); + + it('leaves serviceType unset for a general quote so FedEx returns every service', function () { + $probe = fedexProbe(); + $probe->setRawRequest(fedexRawRateRequest()); + + $shipment = $probe->formRateRequest( + Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_GENERAL, + )['requestedShipment']; + + expect($shipment)->not->toHaveKey('serviceType'); + }); +}); + +describe('FedEx REST rate response parsing', function () { + $reply = function (string $serviceType, array $ratedShipmentDetails): array { + return ['serviceType' => $serviceType, 'ratedShipmentDetails' => $ratedShipmentDetails]; + }; + + it('reads rates out of output.rateReplyDetails and filters to the allowed methods', function () use ($reply) { + $response = ['output' => ['rateReplyDetails' => [ + $reply('FEDEX_GROUND', [['rateType' => 'ACCOUNT', 'totalNetCharge' => 12.50, 'currency' => 'USD']]), + $reply('FEDEX_2_DAY', [['rateType' => 'ACCOUNT', 'totalNetCharge' => 30.00, 'currency' => 'USD']]), + $reply('FEDEX_EXPRESS_SAVER', [['rateType' => 'ACCOUNT', 'totalNetCharge' => 20.00, 'currency' => 'USD']]), + ]]]; + + $result = fedexProbe()->prepareRateResponse($response); + $methods = array_map(fn($rate) => $rate->getMethod(), $result->getAllRates()); + + expect($methods)->toBe(['FEDEX_GROUND', 'FEDEX_2_DAY']); + expect($result->getAllRates()[0]->getCost())->toBe(12.50); + }); + + it('sorts the returned rates by price', function () use ($reply) { + $response = ['output' => ['rateReplyDetails' => [ + $reply('PRIORITY_OVERNIGHT', [['rateType' => 'ACCOUNT', 'totalNetCharge' => 55.00]]), + $reply('FEDEX_GROUND', [['rateType' => 'ACCOUNT', 'totalNetCharge' => 12.50]]), + $reply('FEDEX_2_DAY', [['rateType' => 'ACCOUNT', 'totalNetCharge' => 30.00]]), + ]]]; + + $result = fedexProbe()->prepareRateResponse($response); + $methods = array_map(fn($rate) => $rate->getMethod(), $result->getAllRates()); + + expect($methods)->toBe(['FEDEX_GROUND', 'FEDEX_2_DAY', 'PRIORITY_OVERNIGHT']); + }); + + it('prefers the negotiated ACCOUNT rate over the published LIST rate', function () use ($reply) { + $response = ['output' => ['rateReplyDetails' => [ + $reply('FEDEX_GROUND', [ + ['rateType' => 'LIST', 'totalNetCharge' => 20.00], + ['rateType' => 'ACCOUNT', 'totalNetCharge' => 12.50], + ]), + ]]]; + + $result = fedexProbe()->prepareRateResponse($response); + + expect($result->getAllRates()[0]->getCost())->toBe(12.50); + }); + + it('falls back to shipmentRateDetail.totalNetCharge when the top-level charge is absent', function () use ($reply) { + $response = ['output' => ['rateReplyDetails' => [ + $reply('FEDEX_GROUND', [ + ['rateType' => 'ACCOUNT', 'shipmentRateDetail' => ['totalNetCharge' => 17.25, 'currency' => 'USD']], + ]), + ]]]; + + $result = fedexProbe()->prepareRateResponse($response); + + expect($result->getAllRates()[0]->getCost())->toBe(17.25); + }); + + it('keeps the two international priority services apart rather than collapsing them', function () use ($reply) { + $probe = fedexProbe([ + 'allowed_methods' => 'FEDEX_INTERNATIONAL_PRIORITY,FEDEX_INTERNATIONAL_PRIORITY_EXPRESS', + ]); + $response = ['output' => ['rateReplyDetails' => [ + $reply('FEDEX_INTERNATIONAL_PRIORITY', [['rateType' => 'ACCOUNT', 'totalNetCharge' => 88.00]]), + $reply('FEDEX_INTERNATIONAL_PRIORITY_EXPRESS', [['rateType' => 'ACCOUNT', 'totalNetCharge' => 129.00]]), + ]]]; + + $rates = $probe->prepareRateResponse($response)->getAllRates(); + + expect(array_map(fn($rate) => $rate->getMethod(), $rates)) + ->toBe(['FEDEX_INTERNATIONAL_PRIORITY', 'FEDEX_INTERNATIONAL_PRIORITY_EXPRESS']); + expect(array_map(fn($rate) => $rate->getCost(), $rates))->toBe([88.00, 129.00]); + }); + + it('returns the configured error message when FedEx replies with errors', function () { + $response = ['errors' => [['code' => 'RATE.PACKAGE.WEIGHT.INVALID', 'message' => 'Weight is invalid.']]]; + + $result = fedexProbe()->prepareRateResponse($response); + $rates = $result->getAllRates(); + + expect($rates)->toHaveCount(1); + expect($rates[0])->toBeInstanceOf(Mage_Shipping_Model_Rate_Result_Error::class); + expect($rates[0]->getErrorMessage())->toBe('This shipping method is currently unavailable.'); + }); + + it('returns an error result for an empty or malformed response', function () { + expect(fedexProbe()->prepareRateResponse([])->getAllRates()[0]) + ->toBeInstanceOf(Mage_Shipping_Model_Rate_Result_Error::class); + }); + + it('parses a real sandbox rate response end to end', function () { + $probe = fedexProbe([ + 'allowed_methods' => 'FEDEX_GROUND,FEDEX_EXPRESS_SAVER,FEDEX_2_DAY,FEDEX_2_DAY_AM,' + . 'STANDARD_OVERNIGHT,PRIORITY_OVERNIGHT,FIRST_OVERNIGHT', + ]); + + $rates = $probe->prepareRateResponse(fedexFixture('rate-response'))->getAllRates(); + + expect($rates)->toHaveCount(7); + foreach ($rates as $rate) { + expect($rate)->toBeInstanceOf(Mage_Shipping_Model_Rate_Result_Method::class); + } + + // Cheapest first, and the amounts are the ACCOUNT charges FedEx actually returned. + expect(array_map(fn($rate) => $rate->getMethod(), $rates))->toBe([ + 'FEDEX_GROUND', + 'FEDEX_EXPRESS_SAVER', + 'FEDEX_2_DAY', + 'FEDEX_2_DAY_AM', + 'STANDARD_OVERNIGHT', + 'PRIORITY_OVERNIGHT', + 'FIRST_OVERNIGHT', + ]); + expect(array_map(fn($rate) => $rate->getCost(), $rates))->toBe([ + 25.18, 100.71, 133.78, 150.43, 193.26, 204.19, 236.74, + ]); + expect($rates[0]->getMethodTitle())->toBe('Ground'); + }); + + it('drops services missing from allowed_methods when parsing the real response', function () { + $probe = fedexProbe(['allowed_methods' => 'FEDEX_GROUND']); + + $rates = $probe->prepareRateResponse(fedexFixture('rate-response'))->getAllRates(); + + expect($rates)->toHaveCount(1); + expect($rates[0]->getMethod())->toBe('FEDEX_GROUND'); + }); +}); + +describe('FedEx REST rate endpoint selection', function () { + $client = function (string $rateEndpoint): Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient { + $oauth = new Mage_Usa_Model_Shipping_Carrier_Fedex_OAuthClient('id', 'secret', 'https://example.test'); + + return new Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient($oauth, true, false, $rateEndpoint); + }; + + it('uses the standard Rate endpoint by default, matching other platforms', function () use ($client) { + expect($client(Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_ENDPOINT_STANDARD)->getRateEndpoint()) + ->toBe('/rate/v1/rates/quotes'); + }); + + it('switches to the comprehensive endpoint for Integrator Provider accounts', function () use ($client) { + expect($client(Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_ENDPOINT_COMPREHENSIVE)->getRateEndpoint()) + ->toBe('/rate/v1/comprehensiverates/quotes'); + }); + + it('falls back to the standard endpoint for an unrecognised config value', function () use ($client) { + expect($client('')->getRateEndpoint())->toBe('/rate/v1/rates/quotes'); + }); + + it('resolves the sandbox and production hosts', function () { + expect(Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient::getBaseUrl(true)) + ->toBe('https://apis-sandbox.fedex.com'); + expect(Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient::getBaseUrl(false)) + ->toBe('https://apis.fedex.com'); + }); +}); + +describe('FedEx REST tracking response parsing', function () { + it('maps a real sandbox track response onto the tracking result', function () { + $result = fedexProbe()->parseTrackingResponse('122816215025810', fedexTrackFixture()); + $trackings = $result->getAllTrackings(); + + expect($trackings)->toHaveCount(1); + + $data = $trackings[0]->getAllData(); + + expect($data['status'])->toBe('Delivered'); + expect($data['service'])->toBe('FedEx Ground'); + expect($data['signedby'])->toBe('ROLLINS'); + expect($data['weight'])->toBe('21.5 LB'); + expect($data['deliverylocation'])->toBe('Norton, VA, US'); + // FedEx stamps scan times with the local offset (13:31:00-05:00); like every other + // carrier the parser renders them in the process timezone, which Maho forces to UTC. + expect($data['deliverydate'])->toBe('2014-01-09'); + expect($data['deliverytime'])->toBe('18:31:00'); + expect($data['shippeddate'])->toBe('2020-08-15'); + }); + + it('turns every scan event into a progress detail row', function () { + $result = fedexProbe()->parseTrackingResponse('122816215025810', fedexTrackFixture()); + $progress = $result->getAllTrackings()[0]->getAllData()['progressdetail']; + + expect($progress)->toHaveCount(11); + expect($progress[0]['activity'])->toBe('Delivered'); + expect($progress[0]['deliverydate'])->toBe('2014-01-09'); + expect($progress[0]['deliverytime'])->toBe('18:31:00'); + expect($progress[0]['deliverylocation'])->toBe('Norton, VA, US'); + expect($progress[1]['activity'])->toBe('On FedEx vehicle for delivery'); + expect($progress[1]['deliverylocation'])->toBe('KINGSPORT, TN, US'); + }); + + it('appends a tracking error when FedEx reports one for the number', function () { + $response = ['output' => ['completeTrackResults' => [[ + 'trackingNumber' => '999999999999', + 'trackResults' => [[ + 'error' => ['code' => 'TRACKING.TRACKINGNUMBER.NOTFOUND', 'message' => 'Tracking number not found'], + ]], + ]]]]; + + $result = fedexProbe()->parseTrackingResponse('999999999999', $response); + $errors = $result->getAllTrackings(); + + expect($errors[0])->toBeInstanceOf(Mage_Shipping_Model_Tracking_Result_Error::class); + // getErrorMessage() on the error model is hardcoded to a generic storefront string, + // so the carrier-specific reason is only observable in the raw data. + expect($errors[0]->getData('error_message'))->toBe('Tracking number not found'); + }); + + it('appends a tracking error for a top-level REST error payload', function () { + $response = ['errors' => [['code' => 'FORBIDDEN.ERROR', 'message' => 'We could not authorize your credentials.']]]; + + $result = fedexProbe()->parseTrackingResponse('122816215025810', $response); + + expect($result->getAllTrackings()[0])->toBeInstanceOf(Mage_Shipping_Model_Tracking_Result_Error::class); + expect($result->getAllTrackings()[0]->getData('error_message')) + ->toBe('We could not authorize your credentials.'); + }); +}); + +describe('FedEx REST shipment request payload', function () { + $shipmentRequest = function (array $overrides = []): \Maho\DataObject { + $request = new \Maho\DataObject(); + $request->addData(array_merge([ + 'store_id' => 1, + 'package_id' => 1, + 'reference_data' => 'Order #100000001 P1', + 'packaging_type' => 'YOUR_PACKAGING', + 'shipping_method' => 'FEDEX_GROUND', + 'package_weight' => 10.0, + 'base_currency_code' => 'USD', + 'shipper_contact_person_name' => 'Jane Shipper', + 'shipper_contact_company_name' => 'Maho', + 'shipper_contact_phone_number' => '9012638716', + 'shipper_address_street1' => '10 FedEx Parkway', + 'shipper_address_street2' => '', + 'shipper_address_city' => 'Collierville', + 'shipper_address_state_or_province_code' => 'TN', + 'shipper_address_postal_code' => '38017', + 'shipper_address_country_code' => 'US', + 'recipient_contact_person_name' => 'John Recipient', + 'recipient_contact_company_name' => 'Acme', + 'recipient_contact_phone_number' => '9012637890', + 'recipient_address_street1' => '20 Rodeo Drive', + 'recipient_address_street2' => '', + 'recipient_address_city' => 'Beverly Hills', + 'recipient_address_state_or_province_code' => 'CA', + 'recipient_address_postal_code' => '90210', + 'recipient_address_country_code' => 'US', + 'package_items' => [], + 'package_params' => new \Maho\DataObject([ + 'weight_units' => Mage_Core_Model_Locale::WEIGHT_POUND, + 'dimension_units' => Mage_Core_Model_Locale::LENGTH_INCH, + 'customs_value' => 100.0, + 'delivery_confirmation' => 'ADULT', + 'length' => 12, + 'width' => 10, + 'height' => 8, + ]), + ], $overrides)); + + return $request; + }; + + it('builds the REST ship envelope with no SOAP auth block', function () use ($shipmentRequest) { + $payload = fedexProbe()->formShipmentRequest($shipmentRequest()); + + expect($payload)->toHaveKey('accountNumber') + ->and($payload)->toHaveKey('requestedShipment') + ->and($payload)->not->toHaveKey('WebAuthenticationDetail') + ->and($payload)->not->toHaveKey('TransactionDetail'); + + expect($payload['accountNumber']['value'])->toBe('510087020'); + expect($payload['labelResponseOptions'])->toBe('LABEL'); + }); + + it('maps shipper and recipient onto REST contact/address objects', function () use ($shipmentRequest) { + $shipment = fedexProbe()->formShipmentRequest($shipmentRequest())['requestedShipment']; + + expect($shipment['shipper']['contact']['personName'])->toBe('Jane Shipper'); + expect($shipment['shipper']['address']['city'])->toBe('Collierville'); + expect($shipment['recipients'])->toHaveCount(1); + expect($shipment['recipients'][0]['contact']['personName'])->toBe('John Recipient'); + expect($shipment['recipients'][0]['address']['postalCode'])->toBe('90210'); + }); + + it('requests a label and carries the package weight, dimensions and signature option', function () use ($shipmentRequest) { + $shipment = fedexProbe()->formShipmentRequest($shipmentRequest())['requestedShipment']; + $lineItem = $shipment['requestedPackageLineItems'][0]; + + expect($shipment['serviceType'])->toBe('FEDEX_GROUND'); + expect($shipment['pickupType'])->toBe('USE_SCHEDULED_PICKUP'); + expect($shipment['shippingChargesPayment']['paymentType'])->toBe('SENDER'); + expect($shipment['labelSpecification']['imageType'])->toBe('PDF'); + expect($lineItem['weight'])->toBe(['units' => 'LB', 'value' => 10.0]); + expect($lineItem['dimensions'])->toBe(['length' => 12, 'width' => 10, 'height' => 8, 'units' => 'IN']); + expect($lineItem['packageSpecialServices']['signatureOptionType'])->toBe('ADULT'); + }); + + it('bills the recipient for a return shipment', function () use ($shipmentRequest) { + $shipment = fedexProbe()->formShipmentRequest($shipmentRequest(['is_return' => true]))['requestedShipment']; + + expect($shipment['shippingChargesPayment']['paymentType'])->toBe('RECIPIENT'); + }); +}); + +describe('FedEx REST credential guard', function () { + it('collects no rates while the carrier is inactive', function () { + $probe = fedexProbe(['active' => 0]); + + expect($probe->collectRates(new Mage_Shipping_Model_Rate_Request()))->toBeFalse(); + }); + + it('collects no rates when enabled without OAuth credentials', function () { + $probe = fedexProbe(['active' => 1, 'client_id' => '', 'client_secret' => '']); + + expect($probe->collectRates(new Mage_Shipping_Model_Rate_Request()))->toBeFalse(); + }); +}); + +describe('FedEx REST configuration', function () { + it('replaces the SOAP credentials with encrypted OAuth credentials', function () { + $fedex = fedexShippedDefaults(); + + expect($fedex->meter_number)->toBeEmpty(); + expect($fedex->key)->toBeEmpty(); + expect($fedex->password)->toBeEmpty(); + + foreach (['client_id', 'client_secret'] as $field) { + expect((string) $fedex->{$field}['backend_model']) + ->toBe('adminhtml/system_config_backend_encrypted'); + } + }); + + it('exposes Client ID and Client Secret as obscured admin fields', function () { + $fields = Mage::getConfig() + ->loadModulesConfiguration('system.xml') + ->getNode('sections/carriers/groups/fedex/fields'); + + expect((string) $fields->client_id->frontend_type)->toBe('obscure'); + expect((string) $fields->client_secret->frontend_type)->toBe('obscure'); + expect($fields->meter_number)->toBeEmpty(); + expect($fields->key)->toBeEmpty(); + expect($fields->password)->toBeEmpty(); + }); + + it('defaults dropoff to a REST pickup type and offers only REST pickup types', function () { + expect((string) fedexShippedDefaults()->dropoff)->toBe('USE_SCHEDULED_PICKUP'); + + expect(array_keys(Mage::getModel('usa/shipping_carrier_fedex')->getCode('dropoff'))) + ->toBe([ + 'USE_SCHEDULED_PICKUP', 'CONTACT_FEDEX_TO_SCHEDULE', 'DROPOFF_AT_FEDEX_LOCATION', + 'ON_CALL', 'PACKAGE_RETURN_PROGRAM', 'REGULAR_STOP', 'TAG', + ]); + }); + + it('ships canonical REST service codes in the default allowed_methods', function () { + $allowed = explode(',', (string) fedexShippedDefaults()->allowed_methods); + + expect($allowed)->toContain('FEDEX_INTERNATIONAL_PRIORITY'); + expect($allowed)->toContain('FEDEX_INTERNATIONAL_PRIORITY_EXPRESS'); + expect($allowed)->not->toContain('INTERNATIONAL_PRIORITY'); + // Rate API does not quote freight, and FedEx Freight is a separate company since 2026. + expect($allowed)->not->toContain('FEDEX_FREIGHT'); + expect($allowed)->not->toContain('FEDEX_NATIONAL_FREIGHT'); + }); + + it('defaults to the standard rate endpoint and offers the comprehensive one', function () { + expect((string) fedexShippedDefaults()->rate_endpoint) + ->toBe(Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_ENDPOINT_STANDARD); + + expect(array_keys(Mage::getModel('usa/shipping_carrier_fedex')->getCode('rate_endpoint'))) + ->toBe(['standard', 'comprehensive']); + }); + + it('defaults the weight unit so the rate payload never sends a null unit', function () { + // FedEx rejects weight.units: null outright, and this node had no default at all, + // so an unsaved FedEx config produced an unquotable request. + expect((string) fedexShippedDefaults()->unit_of_measure)->toBe('LB'); + + $probe = fedexProbe(['unit_of_measure' => (string) fedexShippedDefaults()->unit_of_measure]); + $probe->setRawRequest(fedexRawRateRequest()); + $shipment = $probe->formRateRequest( + Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_GENERAL, + )['requestedShipment']; + + expect($shipment['requestedPackageLineItems'][0]['weight']['units'])->toBe('LB'); + }); + + it('no longer ships the SOAP WSDL files', function () { + expect(is_dir(Mage::getModuleDir('etc', 'Mage_Usa') . DS . 'wsdl' . DS . 'FedEx'))->toBeFalse(); + }); +}); diff --git a/tests/Backend/Unit/Usa/Model/Shipping/Carrier/_fixtures/rate-response.json b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/_fixtures/rate-response.json new file mode 100644 index 0000000000..a8887cdc7f --- /dev/null +++ b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/_fixtures/rate-response.json @@ -0,0 +1,1282 @@ +{ + "transactionId": "ef30dfb0-061d-42f7-a09e-d5f6334c2007", + "output": { + "alerts": [ + { + "code": "ORIGIN.STATEORPROVINCECODE.CHANGED", + "message": "The origin state/province code has been changed.", + "alertType": "NOTE" + }, + { + "code": "DESTINATION.STATEORPROVINCECODE.CHANGED", + "message": "The destination state/province code has been changed.", + "alertType": "NOTE" + } + ], + "rateReplyDetails": [ + { + "serviceType": "FIRST_OVERNIGHT", + "serviceName": "FedEx First Overnight\u00ae", + "packagingType": "YOUR_PACKAGING", + "ratedShipmentDetails": [ + { + "rateType": "ACCOUNT", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 225.47, + "totalNetCharge": 236.74, + "totalNetFedExCharge": 236.74, + "shipmentRateDetail": { + "rateZone": "07", + "dimDivisor": 0, + "fuelSurchargePercent": 5.0, + "totalSurcharges": 11.27, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 11.27 + } + ], + "pricingCode": "PACKAGE", + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "currency": "USD", + "rateScale": "16" + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_ACCOUNT_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 225.47, + "netFreight": 225.47, + "totalSurcharges": 11.27, + "netFedExCharge": 236.74, + "totalTaxes": 0.0, + "netCharge": 236.74, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 11.27 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + }, + { + "rateType": "LIST", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 225.47, + "totalNetCharge": 236.74, + "totalNetFedExCharge": 236.74, + "shipmentRateDetail": { + "rateZone": "07", + "dimDivisor": 0, + "fuelSurchargePercent": 5.0, + "totalSurcharges": 11.27, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 11.27 + } + ], + "pricingCode": "PACKAGE", + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "currency": "USD", + "rateScale": "16" + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_LIST_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 225.47, + "netFreight": 225.47, + "totalSurcharges": 11.27, + "netFedExCharge": 236.74, + "totalTaxes": 0.0, + "netCharge": 236.74, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 11.27 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + } + ], + "operationalDetail": { + "ineligibleForMoneyBackGuarantee": false, + "astraDescription": "1ST OVR", + "airportId": "LAX", + "serviceCode": "06" + }, + "signatureOptionType": "SERVICE_DEFAULT", + "serviceDescription": { + "serviceId": "EP1000000006", + "serviceType": "FIRST_OVERNIGHT", + "code": "06", + "names": [ + { + "type": "long", + "encoding": "utf-8", + "value": "FedEx First Overnight\u00ae" + }, + { + "type": "long", + "encoding": "ascii", + "value": "FedEx First Overnight" + }, + { + "type": "medium", + "encoding": "utf-8", + "value": "FedEx First Overnight\u00ae" + }, + { + "type": "medium", + "encoding": "ascii", + "value": "FedEx First Overnight" + }, + { + "type": "short", + "encoding": "utf-8", + "value": "FO" + }, + { + "type": "short", + "encoding": "ascii", + "value": "FO" + }, + { + "type": "abbrv", + "encoding": "ascii", + "value": "FO" + } + ], + "serviceCategory": "parcel", + "description": "First Overnight", + "astraDescription": "1ST OVR" + } + }, + { + "serviceType": "PRIORITY_OVERNIGHT", + "serviceName": "FedEx Priority Overnight\u00ae", + "packagingType": "YOUR_PACKAGING", + "ratedShipmentDetails": [ + { + "rateType": "ACCOUNT", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 194.47, + "totalNetCharge": 204.19, + "totalNetFedExCharge": 204.19, + "shipmentRateDetail": { + "rateZone": "07", + "dimDivisor": 0, + "fuelSurchargePercent": 5.0, + "totalSurcharges": 9.72, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 9.72 + } + ], + "pricingCode": "PACKAGE", + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "currency": "USD", + "rateScale": "1596" + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_ACCOUNT_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 194.47, + "netFreight": 194.47, + "totalSurcharges": 9.72, + "netFedExCharge": 204.19, + "totalTaxes": 0.0, + "netCharge": 204.19, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 9.72 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + }, + { + "rateType": "LIST", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 194.47, + "totalNetCharge": 204.19, + "totalNetFedExCharge": 204.19, + "shipmentRateDetail": { + "rateZone": "07", + "dimDivisor": 0, + "fuelSurchargePercent": 5.0, + "totalSurcharges": 9.72, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 9.72 + } + ], + "pricingCode": "PACKAGE", + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "currency": "USD", + "rateScale": "1596" + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_LIST_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 194.47, + "netFreight": 194.47, + "totalSurcharges": 9.72, + "netFedExCharge": 204.19, + "totalTaxes": 0.0, + "netCharge": 204.19, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 9.72 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + } + ], + "operationalDetail": { + "ineligibleForMoneyBackGuarantee": false, + "astraDescription": "P1", + "airportId": "LAX", + "serviceCode": "01" + }, + "signatureOptionType": "SERVICE_DEFAULT", + "serviceDescription": { + "serviceId": "EP1000000002", + "serviceType": "PRIORITY_OVERNIGHT", + "code": "01", + "names": [ + { + "type": "long", + "encoding": "utf-8", + "value": "FedEx Priority Overnight\u00ae" + }, + { + "type": "long", + "encoding": "ascii", + "value": "FedEx Priority Overnight" + }, + { + "type": "medium", + "encoding": "utf-8", + "value": "FedEx Priority Overnight\u00ae" + }, + { + "type": "medium", + "encoding": "ascii", + "value": "FedEx Priority Overnight" + }, + { + "type": "short", + "encoding": "utf-8", + "value": "P-1" + }, + { + "type": "short", + "encoding": "ascii", + "value": "P-1" + }, + { + "type": "abbrv", + "encoding": "ascii", + "value": "PO" + } + ], + "serviceCategory": "parcel", + "description": "Priority Overnight", + "astraDescription": "P1" + } + }, + { + "serviceType": "STANDARD_OVERNIGHT", + "serviceName": "FedEx Standard Overnight\u00ae", + "packagingType": "YOUR_PACKAGING", + "ratedShipmentDetails": [ + { + "rateType": "ACCOUNT", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 184.06, + "totalNetCharge": 193.26, + "totalNetFedExCharge": 193.26, + "shipmentRateDetail": { + "rateZone": "07", + "dimDivisor": 0, + "fuelSurchargePercent": 5.0, + "totalSurcharges": 9.2, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 9.2 + } + ], + "pricingCode": "PACKAGE", + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "currency": "USD", + "rateScale": "1393" + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_ACCOUNT_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 184.06, + "netFreight": 184.06, + "totalSurcharges": 9.2, + "netFedExCharge": 193.26, + "totalTaxes": 0.0, + "netCharge": 193.26, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 9.2 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + }, + { + "rateType": "LIST", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 184.06, + "totalNetCharge": 193.26, + "totalNetFedExCharge": 193.26, + "shipmentRateDetail": { + "rateZone": "07", + "dimDivisor": 0, + "fuelSurchargePercent": 5.0, + "totalSurcharges": 9.2, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 9.2 + } + ], + "pricingCode": "PACKAGE", + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "currency": "USD", + "rateScale": "1393" + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_LIST_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 184.06, + "netFreight": 184.06, + "totalSurcharges": 9.2, + "netFedExCharge": 193.26, + "totalTaxes": 0.0, + "netCharge": 193.26, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 9.2 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + } + ], + "operationalDetail": { + "ineligibleForMoneyBackGuarantee": false, + "astraDescription": "STD OVR", + "airportId": "LAX", + "serviceCode": "05" + }, + "signatureOptionType": "SERVICE_DEFAULT", + "serviceDescription": { + "serviceId": "EP1000000005", + "serviceType": "STANDARD_OVERNIGHT", + "code": "05", + "names": [ + { + "type": "long", + "encoding": "utf-8", + "value": "FedEx Standard Overnight\u00ae" + }, + { + "type": "long", + "encoding": "ascii", + "value": "FedEx Standard Overnight" + }, + { + "type": "medium", + "encoding": "utf-8", + "value": "FedEx Standard Overnight\u00ae" + }, + { + "type": "medium", + "encoding": "ascii", + "value": "FedEx Standard Overnight" + }, + { + "type": "short", + "encoding": "utf-8", + "value": "SOS" + }, + { + "type": "short", + "encoding": "ascii", + "value": "SOS" + }, + { + "type": "abbrv", + "encoding": "ascii", + "value": "SO" + } + ], + "serviceCategory": "parcel", + "description": "Standard Overnight", + "astraDescription": "STD OVR" + } + }, + { + "serviceType": "FEDEX_2_DAY_AM", + "serviceName": "FedEx 2Day\u00ae AM", + "packagingType": "YOUR_PACKAGING", + "ratedShipmentDetails": [ + { + "rateType": "ACCOUNT", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 143.27, + "totalNetCharge": 150.43, + "totalNetFedExCharge": 150.43, + "shipmentRateDetail": { + "rateZone": "07", + "dimDivisor": 0, + "fuelSurchargePercent": 5.0, + "totalSurcharges": 7.16, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 7.16 + } + ], + "pricingCode": "PACKAGE", + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "currency": "USD", + "rateScale": "14" + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_ACCOUNT_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 143.27, + "netFreight": 143.27, + "totalSurcharges": 7.16, + "netFedExCharge": 150.43, + "totalTaxes": 0.0, + "netCharge": 150.43, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 7.16 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + }, + { + "rateType": "LIST", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 143.27, + "totalNetCharge": 150.43, + "totalNetFedExCharge": 150.43, + "shipmentRateDetail": { + "rateZone": "07", + "dimDivisor": 0, + "fuelSurchargePercent": 5.0, + "totalSurcharges": 7.16, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 7.16 + } + ], + "pricingCode": "PACKAGE", + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "currency": "USD", + "rateScale": "14" + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_LIST_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 143.27, + "netFreight": 143.27, + "totalSurcharges": 7.16, + "netFedExCharge": 150.43, + "totalTaxes": 0.0, + "netCharge": 150.43, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 7.16 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + } + ], + "operationalDetail": { + "ineligibleForMoneyBackGuarantee": false, + "astraDescription": "2DAY AM", + "airportId": "LAX", + "serviceCode": "49" + }, + "signatureOptionType": "SERVICE_DEFAULT", + "serviceDescription": { + "serviceId": "EP1000000023", + "serviceType": "FEDEX_2_DAY_AM", + "code": "49", + "names": [ + { + "type": "long", + "encoding": "utf-8", + "value": "FedEx 2Day\u00ae AM" + }, + { + "type": "long", + "encoding": "ascii", + "value": "FedEx 2Day AM" + }, + { + "type": "medium", + "encoding": "utf-8", + "value": "FedEx 2Day\u00ae AM" + }, + { + "type": "medium", + "encoding": "ascii", + "value": "FedEx 2Day AM" + }, + { + "type": "short", + "encoding": "utf-8", + "value": "E2AM" + }, + { + "type": "short", + "encoding": "ascii", + "value": "E2AM" + }, + { + "type": "abbrv", + "encoding": "ascii", + "value": "TA" + } + ], + "serviceCategory": "parcel", + "description": "2DAY AM", + "astraDescription": "2DAY AM" + } + }, + { + "serviceType": "FEDEX_2_DAY", + "serviceName": "FedEx 2Day\u00ae", + "packagingType": "YOUR_PACKAGING", + "ratedShipmentDetails": [ + { + "rateType": "ACCOUNT", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 127.41, + "totalNetCharge": 133.78, + "totalNetFedExCharge": 133.78, + "shipmentRateDetail": { + "rateZone": "07", + "dimDivisor": 0, + "fuelSurchargePercent": 5.0, + "totalSurcharges": 6.37, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 6.37 + } + ], + "pricingCode": "PACKAGE", + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "currency": "USD", + "rateScale": "6090" + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_ACCOUNT_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 127.41, + "netFreight": 127.41, + "totalSurcharges": 6.37, + "netFedExCharge": 133.78, + "totalTaxes": 0.0, + "netCharge": 133.78, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 6.37 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + }, + { + "rateType": "LIST", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 127.41, + "totalNetCharge": 133.78, + "totalNetFedExCharge": 133.78, + "shipmentRateDetail": { + "rateZone": "07", + "dimDivisor": 0, + "fuelSurchargePercent": 5.0, + "totalSurcharges": 6.37, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 6.37 + } + ], + "pricingCode": "PACKAGE", + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "currency": "USD", + "rateScale": "6090" + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_LIST_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 127.41, + "netFreight": 127.41, + "totalSurcharges": 6.37, + "netFedExCharge": 133.78, + "totalTaxes": 0.0, + "netCharge": 133.78, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 6.37 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + } + ], + "operationalDetail": { + "ineligibleForMoneyBackGuarantee": false, + "astraDescription": "E2", + "airportId": "LAX", + "serviceCode": "03" + }, + "signatureOptionType": "SERVICE_DEFAULT", + "serviceDescription": { + "serviceId": "EP1000000003", + "serviceType": "FEDEX_2_DAY", + "code": "03", + "names": [ + { + "type": "long", + "encoding": "utf-8", + "value": "FedEx 2Day\u00ae" + }, + { + "type": "long", + "encoding": "ascii", + "value": "FedEx 2Day" + }, + { + "type": "medium", + "encoding": "utf-8", + "value": "FedEx 2Day\u00ae" + }, + { + "type": "medium", + "encoding": "ascii", + "value": "FedEx 2Day" + }, + { + "type": "short", + "encoding": "utf-8", + "value": "P-2" + }, + { + "type": "short", + "encoding": "ascii", + "value": "P-2" + }, + { + "type": "abbrv", + "encoding": "ascii", + "value": "ES" + } + ], + "serviceCategory": "parcel", + "description": "2Day", + "astraDescription": "E2" + } + }, + { + "serviceType": "FEDEX_EXPRESS_SAVER", + "serviceName": "FedEx Express Saver\u00ae", + "packagingType": "YOUR_PACKAGING", + "ratedShipmentDetails": [ + { + "rateType": "ACCOUNT", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 95.91, + "totalNetCharge": 100.71, + "totalNetFedExCharge": 100.71, + "shipmentRateDetail": { + "rateZone": "07", + "dimDivisor": 0, + "fuelSurchargePercent": 5.0, + "totalSurcharges": 4.8, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 4.8 + } + ], + "pricingCode": "PACKAGE", + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "currency": "USD", + "rateScale": "7177" + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_ACCOUNT_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 95.91, + "netFreight": 95.91, + "totalSurcharges": 4.8, + "netFedExCharge": 100.71, + "totalTaxes": 0.0, + "netCharge": 100.71, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 4.8 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + }, + { + "rateType": "LIST", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 95.91, + "totalNetCharge": 100.71, + "totalNetFedExCharge": 100.71, + "shipmentRateDetail": { + "rateZone": "07", + "dimDivisor": 0, + "fuelSurchargePercent": 5.0, + "totalSurcharges": 4.8, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 4.8 + } + ], + "pricingCode": "PACKAGE", + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "currency": "USD", + "rateScale": "7177" + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_LIST_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 95.91, + "netFreight": 95.91, + "totalSurcharges": 4.8, + "netFedExCharge": 100.71, + "totalTaxes": 0.0, + "netCharge": 100.71, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "amount": 4.8 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + } + ], + "operationalDetail": { + "ineligibleForMoneyBackGuarantee": false, + "astraDescription": "XS", + "airportId": "LAX", + "serviceCode": "20" + }, + "signatureOptionType": "SERVICE_DEFAULT", + "serviceDescription": { + "serviceId": "EP1000000013", + "serviceType": "FEDEX_EXPRESS_SAVER", + "code": "20", + "names": [ + { + "type": "long", + "encoding": "utf-8", + "value": "FedEx Express Saver\u00ae" + }, + { + "type": "long", + "encoding": "ascii", + "value": "FedEx Express Saver" + }, + { + "type": "medium", + "encoding": "utf-8", + "value": "FedEx Express Saver\u00ae" + }, + { + "type": "medium", + "encoding": "ascii", + "value": "FedEx Express Saver" + } + ], + "serviceCategory": "parcel", + "description": "Express Saver", + "astraDescription": "XS" + } + }, + { + "serviceType": "FEDEX_GROUND", + "serviceName": "FedEx Ground\u00ae", + "packagingType": "YOUR_PACKAGING", + "ratedShipmentDetails": [ + { + "rateType": "ACCOUNT", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 23.87, + "totalNetCharge": 25.18, + "totalNetFedExCharge": 25.18, + "shipmentRateDetail": { + "rateZone": "7", + "dimDivisor": 139, + "fuelSurchargePercent": 5.5, + "totalSurcharges": 1.31, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "level": "PACKAGE", + "amount": 1.31 + } + ], + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "dimDivisorType": "COUNTRY", + "currency": "USD", + "totalRateScaleWeight": { + "units": "LB", + "value": 10.0 + } + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_ACCOUNT_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 23.87, + "netFreight": 23.87, + "totalSurcharges": 1.31, + "netFedExCharge": 25.18, + "totalTaxes": 0.0, + "netCharge": 25.18, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "level": "PACKAGE", + "amount": 1.31 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + }, + { + "rateType": "LIST", + "ratedWeightMethod": "ACTUAL", + "totalDiscounts": 0.0, + "totalBaseCharge": 23.87, + "totalNetCharge": 25.18, + "totalNetFedExCharge": 25.18, + "shipmentRateDetail": { + "rateZone": "7", + "dimDivisor": 139, + "fuelSurchargePercent": 5.5, + "totalSurcharges": 1.31, + "totalFreightDiscount": 0.0, + "surCharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "level": "PACKAGE", + "amount": 1.31 + } + ], + "totalBillingWeight": { + "units": "LB", + "value": 10.0 + }, + "dimDivisorType": "COUNTRY", + "currency": "USD", + "totalRateScaleWeight": { + "units": "LB", + "value": 10.0 + } + }, + "ratedPackages": [ + { + "groupNumber": 0, + "effectiveNetDiscount": 0.0, + "packageRateDetail": { + "rateType": "PAYOR_LIST_PACKAGE", + "ratedWeightMethod": "ACTUAL", + "baseCharge": 23.87, + "netFreight": 23.87, + "totalSurcharges": 1.31, + "netFedExCharge": 25.18, + "totalTaxes": 0.0, + "netCharge": 25.18, + "totalRebates": 0.0, + "billingWeight": { + "units": "LB", + "value": 10.0 + }, + "totalFreightDiscounts": 0.0, + "surcharges": [ + { + "type": "FUEL", + "description": "Fuel Surcharge", + "level": "PACKAGE", + "amount": 1.31 + } + ], + "currency": "USD" + }, + "sequenceNumber": 1 + } + ], + "currency": "USD" + } + ], + "operationalDetail": { + "ineligibleForMoneyBackGuarantee": false, + "astraDescription": "FXG", + "airportId": "LAX", + "serviceCode": "92" + }, + "signatureOptionType": "SERVICE_DEFAULT", + "serviceDescription": { + "serviceId": "EP1000000134", + "serviceType": "FEDEX_GROUND", + "code": "92", + "names": [ + { + "type": "long", + "encoding": "utf-8", + "value": "FedEx Ground\u00ae" + }, + { + "type": "long", + "encoding": "ascii", + "value": "FedEx Ground" + }, + { + "type": "medium", + "encoding": "utf-8", + "value": "Ground\u00ae" + }, + { + "type": "medium", + "encoding": "ascii", + "value": "Ground" + }, + { + "type": "short", + "encoding": "utf-8", + "value": "FG" + }, + { + "type": "short", + "encoding": "ascii", + "value": "FG" + }, + { + "type": "abbrv", + "encoding": "ascii", + "value": "SG" + } + ], + "description": "FedEx Ground", + "astraDescription": "FXG" + } + } + ], + "quoteDate": "2026-07-30", + "encoded": false + } +} diff --git a/tests/Backend/Unit/Usa/Model/Shipping/Carrier/_fixtures/track-response.json b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/_fixtures/track-response.json new file mode 100644 index 0000000000..eb1b65e9c5 --- /dev/null +++ b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/_fixtures/track-response.json @@ -0,0 +1,455 @@ +{ + "transactionId": "APIF_SV_TRKC_TxID0bcdf013-e4fd-490f-9fd5-4c5247c8699a", + "customertransactionId": "APIF_SV_TRKC_TxIDcustomer test", + "output": { + "alerts": [ + { + "code": "VIRTUAL.RESPONSE", + "message": "This is a Virtual Response." + } + ], + "completeTrackResults": [ + { + "trackingNumber": "122816215025810", + "trackResults": [ + { + "trackingNumberInfo": { + "trackingNumber": "122816215025810", + "trackingNumberUniqueId": "12013~122816215025810~FDEG", + "carrierCode": "FDXG" + }, + "additionalTrackingInfo": { + "nickname": "", + "packageIdentifiers": [ + { + "type": "CUSTOMER_REFERENCE", + "values": [ + "PO#174724" + ], + "trackingNumberUniqueId": "", + "carrierCode": "" + } + ], + "hasAssociatedShipments": false + }, + "shipperInformation": { + "address": { + "city": "POST FALLS", + "stateOrProvinceCode": "ID", + "countryCode": "US", + "residential": false, + "countryName": "United States" + } + }, + "recipientInformation": { + "address": { + "city": "NORTON", + "stateOrProvinceCode": "VA", + "countryCode": "US", + "residential": false, + "countryName": "United States" + } + }, + "latestStatusDetail": { + "code": "DL", + "derivedCode": "DL", + "statusByLocale": "Delivered", + "description": "Delivered", + "scanLocation": { + "city": "Norton", + "stateOrProvinceCode": "VA", + "countryCode": "US", + "residential": false, + "countryName": "United States" + } + }, + "dateAndTimes": [ + { + "type": "ACTUAL_DELIVERY", + "dateTime": "2014-01-09T13:31:00-05:00" + }, + { + "type": "ACTUAL_PICKUP", + "dateTime": "2016-08-01T00:00:00-06:00" + }, + { + "type": "SHIP", + "dateTime": "2020-08-15T00:00:00-06:00" + } + ], + "availableImages": [ + { + "type": "SIGNATURE_PROOF_OF_DELIVERY" + } + ], + "specialHandlings": [ + { + "type": "DIRECT_SIGNATURE_REQUIRED", + "description": "Direct Signature Required", + "paymentType": "OTHER" + } + ], + "packageDetails": { + "packagingDescription": { + "type": "YOUR_PACKAGING", + "description": "Package" + }, + "physicalPackagingType": "PACKAGE", + "sequenceNumber": "1", + "count": "1", + "weightAndDimensions": { + "weight": [ + { + "value": "21.5", + "unit": "LB" + }, + { + "value": "9.75", + "unit": "KG" + } + ], + "dimensions": [ + { + "length": 22, + "width": 17, + "height": 10, + "units": "IN" + }, + { + "length": 55, + "width": 43, + "height": 25, + "units": "CM" + } + ] + }, + "packageContent": [] + }, + "shipmentDetails": { + "possessionStatus": true + }, + "scanEvents": [ + { + "date": "2014-01-09T13:31:00-05:00", + "eventType": "DL", + "eventDescription": "Delivered", + "exceptionCode": "", + "exceptionDescription": "", + "scanLocation": { + "streetLines": [ + "" + ], + "city": "Norton", + "stateOrProvinceCode": "VA", + "postalCode": "24273", + "countryCode": "US", + "residential": false, + "countryName": "United States" + }, + "locationType": "DELIVERY_LOCATION", + "derivedStatusCode": "DL", + "derivedStatus": "Delivered" + }, + { + "date": "2014-01-09T04:18:00-05:00", + "eventType": "OD", + "eventDescription": "On FedEx vehicle for delivery", + "exceptionCode": "", + "exceptionDescription": "", + "scanLocation": { + "streetLines": [ + "" + ], + "city": "KINGSPORT", + "stateOrProvinceCode": "TN", + "postalCode": "37663", + "countryCode": "US", + "residential": false, + "countryName": "United States" + }, + "locationId": "0376", + "locationType": "VEHICLE", + "derivedStatusCode": "IT", + "derivedStatus": "In transit" + }, + { + "date": "2014-01-09T04:09:00-05:00", + "eventType": "AR", + "eventDescription": "At local FedEx facility", + "exceptionCode": "", + "exceptionDescription": "", + "scanLocation": { + "streetLines": [ + "" + ], + "city": "KINGSPORT", + "stateOrProvinceCode": "TN", + "postalCode": "37663", + "countryCode": "US", + "residential": false, + "countryName": "United States" + }, + "locationId": "0376", + "locationType": "DESTINATION_FEDEX_FACILITY", + "derivedStatusCode": "IT", + "derivedStatus": "In transit" + }, + { + "date": "2014-01-08T23:26:00-05:00", + "eventType": "IT", + "eventDescription": "In transit", + "exceptionCode": "", + "exceptionDescription": "", + "scanLocation": { + "streetLines": [ + "" + ], + "city": "KNOXVILLE", + "stateOrProvinceCode": "TN", + "postalCode": "37921", + "countryCode": "US", + "residential": false, + "countryName": "United States" + }, + "locationId": "0379", + "locationType": "FEDEX_FACILITY", + "derivedStatusCode": "IT", + "derivedStatus": "In transit" + }, + { + "date": "2014-01-08T18:14:07-06:00", + "eventType": "DP", + "eventDescription": "Departed FedEx location", + "exceptionCode": "", + "exceptionDescription": "", + "scanLocation": { + "streetLines": [ + "" + ], + "city": "NASHVILLE", + "stateOrProvinceCode": "TN", + "postalCode": "37207", + "countryCode": "US", + "residential": false, + "countryName": "United States" + }, + "locationId": "0371", + "locationType": "FEDEX_FACILITY", + "derivedStatusCode": "IT", + "derivedStatus": "In transit" + }, + { + "date": "2014-01-08T15:16:00-06:00", + "eventType": "AR", + "eventDescription": "Arrived at FedEx location", + "exceptionCode": "", + "exceptionDescription": "", + "scanLocation": { + "streetLines": [ + "" + ], + "city": "NASHVILLE", + "stateOrProvinceCode": "TN", + "postalCode": "37207", + "countryCode": "US", + "residential": false, + "countryName": "United States" + }, + "locationId": "0371", + "locationType": "FEDEX_FACILITY", + "derivedStatusCode": "IT", + "derivedStatus": "In transit" + }, + { + "date": "2014-01-07T00:29:00-06:00", + "eventType": "AR", + "eventDescription": "Arrived at FedEx location", + "exceptionCode": "", + "exceptionDescription": "", + "scanLocation": { + "streetLines": [ + "" + ], + "city": "CHICAGO", + "stateOrProvinceCode": "IL", + "postalCode": "60638", + "countryCode": "US", + "residential": false, + "countryName": "United States" + }, + "locationId": "0604", + "locationType": "FEDEX_FACILITY", + "derivedStatusCode": "IT", + "derivedStatus": "In transit" + }, + { + "date": "2014-01-03T19:12:30-08:00", + "eventType": "DP", + "eventDescription": "Left FedEx origin facility", + "exceptionCode": "", + "exceptionDescription": "", + "scanLocation": { + "streetLines": [ + "" + ], + "city": "SPOKANE", + "stateOrProvinceCode": "WA", + "postalCode": "99216", + "countryCode": "US", + "residential": false, + "countryName": "United States" + }, + "locationId": "0992", + "locationType": "ORIGIN_FEDEX_FACILITY", + "derivedStatusCode": "IT", + "derivedStatus": "In transit" + }, + { + "date": "2014-01-03T18:33:00-08:00", + "eventType": "AR", + "eventDescription": "Arrived at FedEx location", + "exceptionCode": "", + "exceptionDescription": "", + "scanLocation": { + "streetLines": [ + "" + ], + "city": "SPOKANE", + "stateOrProvinceCode": "WA", + "postalCode": "99216", + "countryCode": "US", + "residential": false, + "countryName": "United States" + }, + "locationId": "0992", + "locationType": "FEDEX_FACILITY", + "derivedStatusCode": "IT", + "derivedStatus": "In transit" + }, + { + "date": "2014-01-03T15:00:00-08:00", + "eventType": "PU", + "eventDescription": "Picked up", + "exceptionCode": "", + "exceptionDescription": "", + "scanLocation": { + "streetLines": [ + "" + ], + "city": "SPOKANE", + "stateOrProvinceCode": "WA", + "postalCode": "99216", + "countryCode": "US", + "residential": false, + "countryName": "United States" + }, + "locationId": "0992", + "locationType": "PICKUP_LOCATION", + "derivedStatusCode": "PU", + "derivedStatus": "Picked up" + }, + { + "date": "2014-01-03T14:31:00-08:00", + "eventType": "OC", + "eventDescription": "Shipment information sent to FedEx", + "exceptionCode": "", + "exceptionDescription": "", + "scanLocation": { + "streetLines": [ + "" + ], + "postalCode": "83854", + "countryCode": "US", + "residential": false, + "countryName": "United States" + }, + "locationType": "CUSTOMER", + "derivedStatusCode": "IN", + "derivedStatus": "Initiated" + } + ], + "availableNotifications": [ + "ON_DELIVERY" + ], + "deliveryDetails": { + "actualDeliveryAddress": { + "city": "Norton", + "stateOrProvinceCode": "VA", + "countryCode": "US", + "residential": false, + "countryName": "United States" + }, + "locationType": "SHIPPING_RECEIVING", + "locationDescription": "Shipping/Receiving", + "deliveryAttempts": "0", + "receivedByName": "ROLLINS", + "deliveryOptionEligibilityDetails": [ + { + "option": "INDIRECT_SIGNATURE_RELEASE", + "eligibility": "INELIGIBLE" + }, + { + "option": "REDIRECT_TO_HOLD_AT_LOCATION", + "eligibility": "INELIGIBLE" + }, + { + "option": "REROUTE", + "eligibility": "INELIGIBLE" + }, + { + "option": "RESCHEDULE", + "eligibility": "INELIGIBLE" + }, + { + "option": "RETURN_TO_SHIPPER", + "eligibility": "INELIGIBLE" + }, + { + "option": "DISPUTE_DELIVERY", + "eligibility": "INELIGIBLE" + }, + { + "option": "SUPPLEMENT_ADDRESS", + "eligibility": "INELIGIBLE" + } + ] + }, + "originLocation": { + "locationContactAndAddress": { + "address": { + "city": "SPOKANE", + "stateOrProvinceCode": "WA", + "countryCode": "US", + "residential": false, + "countryName": "United States" + } + } + }, + "lastUpdatedDestinationAddress": { + "city": "Norton", + "stateOrProvinceCode": "VA", + "countryCode": "US", + "residential": false, + "countryName": "United States" + }, + "serviceDetail": { + "type": "FEDEX_GROUND", + "description": "FedEx Ground", + "shortDescription": "FG" + }, + "standardTransitTimeWindow": { + "window": { + "ends": "2016-08-01T00:00:00-06:00" + } + }, + "estimatedDeliveryTimeWindow": { + "window": {} + }, + "goodsClassificationCode": "", + "returnDetail": {} + } + ] + } + ] + } +} diff --git a/tests/FedexSandbox.php b/tests/FedexSandbox.php new file mode 100644 index 0000000000..e9632bad03 --- /dev/null +++ b/tests/FedexSandbox.php @@ -0,0 +1,52 @@ + + * SPDX-License-Identifier: OSL-3.0 + */ + +declare(strict_types=1); + +namespace Tests; + +/** + * Loads FedEx sandbox credentials for E2E tests. + * + * Source of truth is the environment (CI secrets); locally a gitignored .env.testing + * is read as a fallback so an already-set env var (CI) always wins. + */ +final class FedexSandbox +{ + public static function clientId(): string + { + return TestEnv::get('FEDEX_SANDBOX_CLIENT_ID'); + } + + public static function clientSecret(): string + { + return TestEnv::get('FEDEX_SANDBOX_CLIENT_SECRET'); + } + + public static function account(): string + { + return TestEnv::get('FEDEX_SANDBOX_ACCOUNT'); + } + + /** + * Which rate product the sandbox project is entitled to. + * + * The Maho default is the standard Rate API, but a FedEx project registered as an + * Integrator Provider is only allowed the comprehensive one, so the environment + * picks rather than the test hardcoding it. + */ + public static function rateEndpoint(): string + { + return TestEnv::get('FEDEX_SANDBOX_RATE_ENDPOINT') + ?: \Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_ENDPOINT_STANDARD; + } + + public static function isConfigured(): bool + { + return self::clientId() !== '' && self::clientSecret() !== ''; + } +} diff --git a/tests/PaypalSandbox.php b/tests/PaypalSandbox.php index d24afd241d..e370d9335f 100644 --- a/tests/PaypalSandbox.php +++ b/tests/PaypalSandbox.php @@ -17,44 +17,19 @@ */ final class PaypalSandbox { - private static bool $envLoaded = false; - public static function loadEnv(): void { - if (self::$envLoaded) { - return; - } - self::$envLoaded = true; - - $file = dirname(__DIR__) . '/.env.testing'; - if (!is_file($file)) { - return; - } - foreach (file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) as $line) { - $line = trim($line); - if ($line === '' || $line[0] === '#' || !str_contains($line, '=')) { - continue; - } - [$key, $value] = explode('=', $line, 2); - $key = trim($key); - $value = trim($value); - if ($key !== '' && getenv($key) === false) { - putenv("{$key}={$value}"); - $_ENV[$key] = $value; - } - } + TestEnv::load(); } public static function clientId(): string { - self::loadEnv(); - return (string) getenv('PAYPAL_SANDBOX_CLIENT_ID'); + return TestEnv::get('PAYPAL_SANDBOX_CLIENT_ID'); } public static function clientSecret(): string { - self::loadEnv(); - return (string) getenv('PAYPAL_SANDBOX_CLIENT_SECRET'); + return TestEnv::get('PAYPAL_SANDBOX_CLIENT_SECRET'); } public static function isConfigured(): bool diff --git a/tests/TestEnv.php b/tests/TestEnv.php new file mode 100644 index 0000000000..0763a2636b --- /dev/null +++ b/tests/TestEnv.php @@ -0,0 +1,54 @@ + + * SPDX-License-Identifier: OSL-3.0 + */ + +declare(strict_types=1); + +namespace Tests; + +/** + * Loads the gitignored .env.testing file used to supply E2E sandbox credentials locally. + * + * The environment is the source of truth (CI secrets), so an already-set variable + * always wins over the file. + */ +final class TestEnv +{ + private static bool $loaded = false; + + public static function load(): void + { + if (self::$loaded) { + return; + } + self::$loaded = true; + + $file = dirname(__DIR__) . '/.env.testing'; + if (!is_file($file)) { + return; + } + foreach (file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) as $line) { + $line = trim($line); + if ($line === '' || $line[0] === '#' || !str_contains($line, '=')) { + continue; + } + [$key, $value] = explode('=', $line, 2); + $key = trim($key); + $value = trim($value); + if ($key !== '' && getenv($key) === false) { + putenv("{$key}={$value}"); + $_ENV[$key] = $value; + } + } + } + + public static function get(string $key): string + { + self::load(); + + return (string) getenv($key); + } +} From 71104351683563526fcf8e28aa418c0a3da403ec Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Thu, 30 Jul 2026 11:32:27 +0100 Subject: [PATCH 2/8] lint --- app/locale/en_US/Mage_Usa.csv | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/locale/en_US/Mage_Usa.csv b/app/locale/en_US/Mage_Usa.csv index e5c604e77b..65b67eaefa 100644 --- a/app/locale/en_US/Mage_Usa.csv +++ b/app/locale/en_US/Mage_Usa.csv @@ -80,7 +80,6 @@ "Express envelope","Express envelope" "Express Saver","Express Saver" "Express worldwide","Express worldwide" -"Failed to parse xml document: %s","Failed to parse xml document: %s" "FedEx","FedEx" "FedEx 10kg Box","FedEx 10kg Box" "FedEx 25kg Box","FedEx 25kg Box" @@ -296,9 +295,9 @@ "Test (TEM)","Test (TEM)" "The API Key of your project on the FedEx Developer Portal.","The API Key of your project on the FedEx Developer Portal." "The field is applicable if the Ground Economy method is selected.","The field is applicable if the Ground Economy method is selected." -"The Secret Key of your project on the FedEx Developer Portal.","The Secret Key of your project on the FedEx Developer Portal." "There is no items in this order","There is no items in this order" "The response is in wrong format.","The response is in wrong format." +"The Secret Key of your project on the FedEx Developer Portal.","The Secret Key of your project on the FedEx Developer Portal." "Title","Title" "To obtain your Client ID/Secret you have to:
- Register to https://developer.ups.com
- Go to My Apps -> Add Apps and fill all data
- Add Rating, Authorization, Shipping, TimeInTransit, Tracking products to the app","To obtain your Client ID/Secret you have to:
- Register to https://developer.ups.com
- Go to My Apps -> Add Apps and fill all data
- Add Rating, Authorization, Shipping, TimeInTransit, Tracking products to the app" "Tracking REST URL","Tracking REST URL" @@ -335,8 +334,8 @@ "UPS Worldwide Express PlusSM","UPS Worldwide Express PlusSM" "UPS Worldwide Saver","UPS Worldwide Saver" "Use Commercial Pricing","Use Commercial Pricing" -"Use Scheduled Pickup","Use Scheduled Pickup" "User ID","User ID" +"Use Scheduled Pickup","Use Scheduled Pickup" "Use Test (TEM) environment for testing with the same credentials. Test labels will be watermarked and not processed for payment.","Use Test (TEM) environment for testing with the same credentials. Test labels will be watermarked and not processed for payment." "USPS","USPS" "USPS Ground Advantage","USPS Ground Advantage" From 57010b64eaf76dc4cde1ab534f56ea2e381ee5df Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Thu, 30 Jul 2026 12:37:22 +0100 Subject: [PATCH 3/8] Verified FedEx label creation and made a refused rollback report failure The shipment and cancel endpoints work against the sandbox once the request carries an account authorised for shipping, so both paths now have live coverage: a real label is created, asserted to be a PDF, and cancelled again. Testing that surfaced a bug in rollBack(). FedEx refuses a cancel with HTTP 200, no errors[], and output.cancelledShipment false, but rollBack() ignored the response and returned true unconditionally, so a label left live during a multi-package failure was silently reported as rolled back. It now checks the flag per package, logs the reason FedEx gave, and still attempts the remaining packages before returning false. --- .../Mage/Usa/Model/Shipping/Carrier/Fedex.php | 23 +++++- .../Integration/Usa/FedexSandboxTest.php | 76 ++++++++++++++++++ .../Model/Shipping/Carrier/FedexRestTest.php | 77 +++++++++++++++++++ 3 files changed, 174 insertions(+), 2 deletions(-) diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php index 7b14ff426e..8225463831 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php @@ -1191,14 +1191,33 @@ protected function _doShipmentRequest(\Maho\DataObject $request) #[\Override] public function rollBack($data) { + $rolledBack = true; + foreach ($data as $item) { - $this->_getRestClient()->cancelShipment([ + $response = $this->_getRestClient()->cancelShipment([ 'accountNumber' => ['value' => $this->getConfigData('account')], 'trackingNumber' => $item['tracking_number'], 'deletionControl' => 'DELETE_ONE_PACKAGE', ]); + + // A refused cancel answers HTTP 200 with cancelledShipment false and no errors[], + // so the flag is the only signal that the label is still live. + if (empty($response['output']['cancelledShipment'])) { + $rolledBack = false; + Mage::log( + sprintf( + 'FedEx did not cancel shipment %s: %s', + $item['tracking_number'], + $response['output']['message'] + ?? Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient::extractErrorMessage($response) + ?? 'no reason given', + ), + Mage::LOG_ERROR, + ); + } } - return true; + + return $rolledBack; } /** diff --git a/tests/Backend/Integration/Usa/FedexSandboxTest.php b/tests/Backend/Integration/Usa/FedexSandboxTest.php index 41203efc04..76922d01f5 100644 --- a/tests/Backend/Integration/Usa/FedexSandboxTest.php +++ b/tests/Backend/Integration/Usa/FedexSandboxTest.php @@ -129,6 +129,82 @@ function fedexRetryTransient(callable $call, callable $errorCodeOf, int $attempt expect($reply['ratedShipmentDetails'][0])->toHaveKey('rateType'); }); +it('creates a real shipping label and cancels it again', function () { + $payload = [ + 'labelResponseOptions' => 'LABEL', + 'accountNumber' => ['value' => FedexSandbox::account()], + 'requestedShipment' => [ + 'shipper' => [ + 'contact' => ['personName' => 'Maho Test', 'phoneNumber' => '9012638716'], + 'address' => [ + 'streetLines' => ['10 FedEx Parkway'], + 'city' => 'Collierville', + 'stateOrProvinceCode' => 'TN', + 'postalCode' => '38017', + 'countryCode' => 'US', + ], + ], + 'recipients' => [[ + 'contact' => ['personName' => 'Maho Recipient', 'phoneNumber' => '9012637890'], + 'address' => [ + 'streetLines' => ['20 Rodeo Drive'], + 'city' => 'Beverly Hills', + 'stateOrProvinceCode' => 'CA', + 'postalCode' => '90210', + 'countryCode' => 'US', + ], + ]], + 'shipDatestamp' => Mage_Core_Model_Locale::todayUtc(), + 'serviceType' => 'FEDEX_GROUND', + 'packagingType' => 'YOUR_PACKAGING', + 'pickupType' => 'USE_SCHEDULED_PICKUP', + 'shippingChargesPayment' => ['paymentType' => 'SENDER'], + 'labelSpecification' => ['imageType' => 'PDF', 'labelStockType' => 'PAPER_85X11_TOP_HALF_LABEL'], + 'requestedPackageLineItems' => [['weight' => ['units' => 'LB', 'value' => 10]]], + ], + ]; + + $response = fedexRetryTransient( + fn() => $this->client->createShipment($payload), + fn(array $r) => $r['errors'][0]['code'] ?? null, + ); + + expect(Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient::extractErrorMessage($response))->toBeNull(); + + $shipment = $response['output']['transactionShipments'][0]; + $piece = $shipment['pieceResponses'][0]; + $trackingNumber = $shipment['masterTrackingNumber']; + + expect($trackingNumber)->toBeString()->not->toBeEmpty(); + + // The carrier base64-decodes this into setShippingLabelContent, so it has to be a real PDF. + $label = base64_decode($piece['packageDocuments'][0]['encodedLabel'], true); + expect($label)->toBeString(); + expect(strlen($label))->toBeGreaterThan(1000); + expect(substr($label, 0, 4))->toBe('%PDF'); + + // Clean up after ourselves, and prove the cancel path works while we hold a live label. + $cancelled = $this->client->cancelShipment([ + 'accountNumber' => ['value' => FedexSandbox::account()], + 'trackingNumber' => $trackingNumber, + 'deletionControl' => 'DELETE_ONE_PACKAGE', + ]); + + expect($cancelled['output']['cancelledShipment'])->toBeTrue(); +}); + +it('reports a refused cancellation instead of claiming success', function () { + // An unknown tracking number is refused with HTTP 200 and cancelledShipment false, which + // is exactly the shape rollBack() has to notice rather than returning true regardless. + $response = $this->client->cancelShipment([ + 'accountNumber' => ['value' => FedexSandbox::account()], + 'trackingNumber' => '999999999999', + 'deletionControl' => 'DELETE_ONE_PACKAGE', + ]); + + expect($response['output']['cancelledShipment'] ?? false)->toBeFalse(); +}); + it('collects priced rates through the carrier, as checkout does', function () { $store = Mage::app()->getStore(); $store->setConfig('carriers/fedex/active', '1'); diff --git a/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php index 40f4aeed88..fd3373471e 100644 --- a/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php +++ b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php @@ -57,6 +57,33 @@ public function setRawRequest(\Maho\DataObject $request): void { $this->_rawRequest = $request; } + + /** Canned cancel responses, popped one per cancelShipment() call. */ + public array $cancelResponses = []; + + /** @var list */ + public array $cancelRequests = []; + + #[\Override] + protected function _getRestClient(): Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient + { + $probe = $this; + + return new class ($probe) extends Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient { + public function __construct(private FedexRestProbe $probe) + { + // Deliberately not calling parent::__construct: nothing here touches the network. + } + + #[\Override] + public function cancelShipment(array $requestData): array + { + $this->probe->cancelRequests[] = $requestData; + + return array_shift($this->probe->cancelResponses) ?? []; + } + }; + } } function fedexProbe(array $config = []): FedexRestProbe @@ -557,6 +584,56 @@ function fedexShippedDefaults(): SimpleXMLElement }); }); +describe('FedEx REST shipment rollback', function () { + $ok = ['output' => ['cancelledShipment' => true, 'message' => 'Shipment is successfully cancelled']]; + $refused = ['output' => ['cancelledShipment' => false, 'message' => 'We are unable to process this request.']]; + + it('cancels every package it is handed', function () use ($ok) { + $probe = fedexProbe(['account' => '510087020']); + $probe->cancelResponses = [$ok, $ok]; + + expect($probe->rollBack([ + ['tracking_number' => '794846961014'], + ['tracking_number' => '794846963407'], + ]))->toBeTrue(); + + expect($probe->cancelRequests)->toHaveCount(2); + expect($probe->cancelRequests[0])->toBe([ + 'accountNumber' => ['value' => '510087020'], + 'trackingNumber' => '794846961014', + 'deletionControl' => 'DELETE_ONE_PACKAGE', + ]); + expect($probe->cancelRequests[1]['trackingNumber'])->toBe('794846963407'); + }); + + it('reports failure when FedEx refuses a cancel despite answering HTTP 200', function () use ($refused) { + $probe = fedexProbe(); + $probe->cancelResponses = [$refused]; + + expect($probe->rollBack([['tracking_number' => '794846961014']]))->toBeFalse(); + }); + + it('still attempts the remaining packages after one is refused', function () use ($ok, $refused) { + $probe = fedexProbe(); + $probe->cancelResponses = [$refused, $ok]; + + expect($probe->rollBack([ + ['tracking_number' => '111111111111'], + ['tracking_number' => '222222222222'], + ]))->toBeFalse(); + + // A label left live because we gave up early is a label the merchant gets billed for. + expect($probe->cancelRequests)->toHaveCount(2); + }); + + it('treats an empty or error response as a failed cancel', function () { + $probe = fedexProbe(); + $probe->cancelResponses = [['errors' => [['code' => 'FORBIDDEN.ERROR', 'message' => 'nope']]]]; + + expect($probe->rollBack([['tracking_number' => '794846961014']]))->toBeFalse(); + }); +}); + describe('FedEx REST credential guard', function () { it('collects no rates while the carrier is inactive', function () { $probe = fedexProbe(['active' => 0]); From d2f8c7364f9cd8df96b77e7463617ecb4d3ea7ac Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Tue, 11 Aug 2026 15:46:46 +0100 Subject: [PATCH 4/8] Fixed review findings: OAuth token handling, error reporting, per-package tracking, zero-rate fallback, store-local ship dates; simplified legacy aliases to the order shipping_method path only --- .../Mage/Usa/Model/Shipping/Carrier/Fedex.php | 55 ++++++----- .../Shipping/Carrier/Fedex/OAuthClient.php | 14 ++- .../Shipping/Carrier/Fedex/RestClient.php | 48 ++++++++-- .../Carrier/Fedex/Source/Rateendpoint.php | 2 + app/locale/en_US/Mage_Usa.csv | 1 + .../Model/Shipping/Carrier/FedexRestTest.php | 94 ++++++++++++++++--- 6 files changed, 165 insertions(+), 49 deletions(-) diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php index 8225463831..0b336cdb06 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php @@ -32,18 +32,11 @@ class Mage_Usa_Model_Shipping_Carrier_Fedex extends Mage_Usa_Model_Shipping_Carr public const RATE_REQUEST_SMARTPOST = 'SMART_POST'; /** - * Legacy SOAP DropoffType values mapped onto their REST pickupType equivalent. - * - * None of the SOAP names survive into REST. Stores migrated by - * upgrade-2.0.0-2.0.1.php already hold REST values, so this only covers config - * written before the migration or by third-party code. + * REST renamed this SOAP service code; pre-migration orders still hold the + * old one in shipping_method, and order rows are never rewritten. */ - protected const PICKUP_TYPE_ALIASES = [ - 'REGULAR_PICKUP' => 'USE_SCHEDULED_PICKUP', - 'REQUEST_COURIER' => 'CONTACT_FEDEX_TO_SCHEDULE', - 'DROP_BOX' => 'DROPOFF_AT_FEDEX_LOCATION', - 'BUSINESS_SERVICE_CENTER' => 'DROPOFF_AT_FEDEX_LOCATION', - 'STATION' => 'DROPOFF_AT_FEDEX_LOCATION', + protected const SERVICE_TYPE_ALIASES = [ + 'INTERNATIONAL_PRIORITY' => 'FEDEX_INTERNATIONAL_PRIORITY', ]; /** @@ -250,9 +243,7 @@ protected function _getRestClient(): Mage_Usa_Model_Shipping_Carrier_Fedex_RestC */ protected function _getPickupType(?string $dropoffType): string { - $dropoffType = (string) $dropoffType; - - return self::PICKUP_TYPE_ALIASES[$dropoffType] ?? ($dropoffType ?: 'USE_SCHEDULED_PICKUP'); + return $dropoffType ?: 'USE_SCHEDULED_PICKUP'; } /** @@ -282,7 +273,9 @@ protected function _formRateRequest($purpose) 'residential' => (bool) $this->getConfigData('residence_delivery'), ], ], - 'shipDateStamp' => Mage_Core_Model_Locale::todayUtc(), + // FedEx reads the ship date in the shipper's timezone, not UTC + 'shipDateStamp' => Mage::app()->getLocale()->utcToStore() + ->format(Mage_Core_Model_Locale::DATE_FORMAT), 'pickupType' => $this->_getPickupType($r->getDropoffType()), 'packagingType' => $r->getPackaging(), 'rateRequestType' => ['ACCOUNT', 'LIST'], @@ -346,7 +339,7 @@ protected function _doRatesRequest($purpose) if ($cached === null) { $response = $this->_getRestClient()->getRates($ratesRequest); - if (!isset($response['errors'])) { + if ($response !== [] && !isset($response['errors'])) { $this->_setCachedQuotes($requestString, serialize($response)); } } else { @@ -495,8 +488,9 @@ protected function _getRateAmountOriginBased($rate) return null; } + // A zero amount is an unpriced flavour, not free shipping; fall through foreach (self::RATE_TYPE_PREFERENCE as $rateType) { - if (isset($rateTypeAmounts[$rateType])) { + if (!empty($rateTypeAmounts[$rateType])) { return $rateTypeAmounts[$rateType]; } } @@ -770,8 +764,8 @@ protected function _doTrackingRequest(string $tracking): void $debugData = ['request' => ['trackingNumber' => $tracking]]; if ($cached === null) { - $response = $this->_getRestClient()->track((string) $tracking); - if (!isset($response['errors'])) { + $response = $this->_getRestClient()->track($tracking); + if ($response !== [] && !isset($response['errors'])) { $this->_setCachedQuotes($requestString, serialize($response)); } } else { @@ -1043,10 +1037,13 @@ protected function _formShipmentRequest(\Maho\DataObject $request) $requestedShipment = [ // Not a typo: the Ship API spells it shipDatestamp while Rate uses shipDateStamp. - 'shipDatestamp' => Mage_Core_Model_Locale::todayUtc(), + // Store-local date: FedEx reads it in the shipper's timezone. + 'shipDatestamp' => Mage::app()->getLocale()->utcToStore($request->getStoreId()) + ->format(Mage_Core_Model_Locale::DATE_FORMAT), 'pickupType' => $this->_getPickupType($this->getConfigData('dropoff')), 'packagingType' => $request->getPackagingType(), - 'serviceType' => $request->getShippingMethod(), + 'serviceType' => self::SERVICE_TYPE_ALIASES[$request->getShippingMethod()] + ?? $request->getShippingMethod(), 'shipper' => [ 'contact' => [ 'personName' => $request->getShipperContactPersonName(), @@ -1168,12 +1165,18 @@ protected function _doShipmentRequest(\Maho\DataObject $request) $shipment = $response['output']['transactionShipments'][0] ?? []; $pieceResponse = $shipment['pieceResponses'][0] ?? []; $encodedLabel = $pieceResponse['packageDocuments'][0]['encodedLabel'] ?? null; + // Piece number first: multi-package child responses repeat the master number + $trackingNumber = $pieceResponse['trackingNumber'] ?? $shipment['masterTrackingNumber'] ?? null; - $result->setShippingLabelContent($encodedLabel !== null ? base64_decode($encodedLabel) : null); - $result->setTrackingNumber( - $shipment['masterTrackingNumber'] ?? $pieceResponse['trackingNumber'] ?? null, - ); - } else { + if ($encodedLabel === null || $trackingNumber === null) { + // A 200 without errors[] but without a label is still a failure + $error = Mage::helper('usa')->__('FedEx did not return a shipping label'); + } else { + $result->setShippingLabelContent(base64_decode($encodedLabel)); + $result->setTrackingNumber($trackingNumber); + } + } + if ($error !== null) { $result->setErrors($error); } $result->setGatewayResponse(Mage::helper('core')->jsonEncode($response)); diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/OAuthClient.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/OAuthClient.php index 054855ac09..ee9e42e1cb 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/OAuthClient.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/OAuthClient.php @@ -61,7 +61,10 @@ private function fetchNewToken(): string ]); $data = Mage::helper('core')->jsonDecode($response->getContent()); - $accessToken = $data['access_token']; + $accessToken = $data['access_token'] ?? null; + if (!is_string($accessToken) || $accessToken === '') { + throw new RuntimeException('FedEx OAuth response contains no access token'); + } $expiresIn = (int) ($data['expires_in'] ?? 3600); $this->cache->save( @@ -74,8 +77,15 @@ private function fetchNewToken(): string return $accessToken; } + public function invalidateToken(): void + { + $this->cache->remove($this->getCacheKey()); + } + private function getCacheKey(): string { - return self::TOKEN_CACHE_KEY_PREFIX . md5($this->clientId . $this->tokenEndpoint); + // The secret is part of the key so saving a corrected secret stops serving + // the token minted with the old one + return self::TOKEN_CACHE_KEY_PREFIX . md5($this->clientId . $this->clientSecret . $this->tokenEndpoint); } } diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/RestClient.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/RestClient.php index ed91f8dbbe..8d901e2b92 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/RestClient.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/RestClient.php @@ -114,29 +114,57 @@ private function makeRequest(string $method, string $endpoint, array $data): arr $debugData = ['request' => ['method' => $method, 'url' => $url, 'data' => $data]]; try { - $response = $client->request($method, $url, [ - 'headers' => [ - 'Authorization' => 'Bearer ' . $this->oauthClient->getAccessToken(), - 'Content-Type' => 'application/json', - 'X-locale' => 'en_US', - ], - 'json' => $data, - ]); + $response = $this->send($client, $method, $url, $data); + + // FedEx revokes outstanding tokens on credential rotation; retry once fresh + if ($response->getStatusCode() === 401) { + $this->oauthClient->invalidateToken(); + $response = $this->send($client, $method, $url, $data); + } // getContent(false) keeps 4xx/5xx bodies readable: FedEx puts the actionable // message in the body of an error response, not in the status line. $responseData = Mage::helper('core')->jsonDecode($response->getContent(false)); + if (!is_array($responseData)) { + // Error-shaped, so callers never mistake a malformed body for a success + $responseData = ['errors' => [[ + 'code' => 'MALFORMED.RESPONSE', + 'message' => 'FedEx returned a malformed response', + ]]]; + } $debugData['result'] = $responseData; - } catch (Exception $e) { + } catch (Throwable $e) { $responseData = ['errors' => [['code' => (string) $e->getCode(), 'message' => $e->getMessage()]]]; $debugData['result'] = $responseData; Mage::logException($e); } + // FedEx-reported failures do not throw, so log them even with debug off + $error = self::extractErrorMessage($responseData); + if ($error !== null) { + Mage::log(sprintf('FedEx API error on %s: %s', $endpoint, $error), Mage::LOG_WARNING); + } + if ($this->debugMode) { Mage::log($debugData, Mage::LOG_DEBUG, 'fedex_rest_api.log'); } - return is_array($responseData) ? $responseData : []; + return $responseData; + } + + private function send( + \Symfony\Contracts\HttpClient\HttpClientInterface $client, + string $method, + string $url, + array $data, + ): \Symfony\Contracts\HttpClient\ResponseInterface { + return $client->request($method, $url, [ + 'headers' => [ + 'Authorization' => 'Bearer ' . $this->oauthClient->getAccessToken(), + 'Content-Type' => 'application/json', + 'X-locale' => 'en_US', + ], + 'json' => $data, + ]); } } diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/Source/Rateendpoint.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/Source/Rateendpoint.php index 82608c55c3..23d771968d 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/Source/Rateendpoint.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/Source/Rateendpoint.php @@ -6,6 +6,8 @@ * @package Mage_Usa */ +declare(strict_types=1); + class Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Rateendpoint { public function toOptionArray(): array diff --git a/app/locale/en_US/Mage_Usa.csv b/app/locale/en_US/Mage_Usa.csv index 65b67eaefa..9d344a371c 100644 --- a/app/locale/en_US/Mage_Usa.csv +++ b/app/locale/en_US/Mage_Usa.csv @@ -84,6 +84,7 @@ "FedEx 10kg Box","FedEx 10kg Box" "FedEx 25kg Box","FedEx 25kg Box" "FedEx Box","FedEx Box" +"FedEx did not return a shipping label","FedEx did not return a shipping label" "FedEx Envelope","FedEx Envelope" "FedEx Pak","FedEx Pak" "FedEx Tube","FedEx Tube" diff --git a/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php index fd3373471e..55846a2ffd 100644 --- a/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php +++ b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php @@ -64,6 +64,14 @@ public function setRawRequest(\Maho\DataObject $request): void /** @var list */ public array $cancelRequests = []; + /** Canned ship responses, popped one per createShipment() call. */ + public array $shipmentResponses = []; + + public function doShipmentRequest(\Maho\DataObject $request): \Maho\DataObject + { + return $this->_doShipmentRequest($request); + } + #[\Override] protected function _getRestClient(): Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient { @@ -82,6 +90,12 @@ public function cancelShipment(array $requestData): array return array_shift($this->probe->cancelResponses) ?? []; } + + #[\Override] + public function createShipment(array $requestData): array + { + return array_shift($this->probe->shipmentResponses) ?? []; + } }; } } @@ -202,17 +216,6 @@ function fedexShippedDefaults(): SimpleXMLElement expect($shipment['requestedPackageLineItems'][0]['groupPackageCount'])->toBe(1); }); - it('translates a legacy dropoff code to its REST pickupType', function () { - $probe = fedexProbe(); - $probe->setRawRequest(fedexRawRateRequest(['dropoff_type' => 'DROP_BOX'])); - - $shipment = $probe->formRateRequest( - Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_GENERAL, - )['requestedShipment']; - - expect($shipment['pickupType'])->toBe('DROPOFF_AT_FEDEX_LOCATION'); - }); - it('ships a shipDateStamp as a plain date, not a SOAP timestamp', function () { $probe = fedexProbe(); $probe->setRawRequest(fedexRawRateRequest()); @@ -311,6 +314,17 @@ function fedexShippedDefaults(): SimpleXMLElement expect($methods)->toBe(['FEDEX_GROUND', 'FEDEX_2_DAY', 'PRIORITY_OVERNIGHT']); }); + it('skips a zero negotiated amount instead of quoting free shipping', function () use ($reply) { + $response = ['output' => ['rateReplyDetails' => [ + $reply('FEDEX_GROUND', [ + ['rateType' => 'ACCOUNT', 'totalNetCharge' => 0], + ['rateType' => 'LIST', 'totalNetCharge' => 20.00], + ]), + ]]]; + + expect(fedexProbe()->prepareRateResponse($response)->getAllRates()[0]->getCost())->toBe(20.00); + }); + it('prefers the negotiated ACCOUNT rate over the published LIST rate', function () use ($reply) { $response = ['output' => ['rateReplyDetails' => [ $reply('FEDEX_GROUND', [ @@ -582,6 +596,64 @@ function fedexShippedDefaults(): SimpleXMLElement expect($shipment['shippingChargesPayment']['paymentType'])->toBe('RECIPIENT'); }); + + it('maps a pre-migration SOAP service code onto its REST serviceType', function () use ($shipmentRequest) { + $shipment = fedexProbe()->formShipmentRequest( + $shipmentRequest(['shipping_method' => 'INTERNATIONAL_PRIORITY']), + )['requestedShipment']; + + expect($shipment['serviceType'])->toBe('FEDEX_INTERNATIONAL_PRIORITY'); + }); +}); + +describe('FedEx REST shipment response parsing', function () { + $shipmentRequest = function (): \Maho\DataObject { + return new \Maho\DataObject([ + 'store_id' => 1, + 'packaging_type' => 'YOUR_PACKAGING', + 'shipping_method' => 'FEDEX_GROUND', + 'package_weight' => 10.0, + 'base_currency_code' => 'USD', + 'shipper_contact_phone_number' => '9012638716', + 'recipient_contact_phone_number' => '9012637890', + 'shipper_address_country_code' => 'US', + 'recipient_address_country_code' => 'US', + 'package_items' => [], + 'package_params' => new \Maho\DataObject([ + 'weight_units' => Mage_Core_Model_Locale::WEIGHT_POUND, + 'dimension_units' => Mage_Core_Model_Locale::LENGTH_INCH, + ]), + ]); + }; + + it('stores the package tracking number, not the repeated master number', function () use ($shipmentRequest) { + $probe = fedexProbe(); + $probe->shipmentResponses = [[ + 'output' => ['transactionShipments' => [[ + 'masterTrackingNumber' => '794846961014', + 'pieceResponses' => [[ + 'trackingNumber' => '794846963407', + 'packageDocuments' => [['encodedLabel' => base64_encode('%PDF-label')]], + ]], + ]]], + ]]; + + $result = $probe->doShipmentRequest($shipmentRequest()); + + expect($result->getErrors())->toBeNull(); + expect($result->getTrackingNumber())->toBe('794846963407'); + expect($result->getShippingLabelContent())->toBe('%PDF-label'); + }); + + it('reports an error when FedEx answers success without a label', function () use ($shipmentRequest) { + $probe = fedexProbe(); + $probe->shipmentResponses = [['output' => ['transactionShipments' => []]]]; + + $result = $probe->doShipmentRequest($shipmentRequest()); + + expect($result->getErrors())->not->toBeNull(); + expect($result->getTrackingNumber())->toBeNull(); + }); }); describe('FedEx REST shipment rollback', function () { From 5b8c6e93eddc75b1d2789d2b25d74e8d4825aa0a Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Tue, 11 Aug 2026 15:55:30 +0100 Subject: [PATCH 5/8] Restored the declared value on SmartPost rate requests, capped at the Ground Economy $100 limit --- .../Mage/Usa/Model/Shipping/Carrier/Fedex.php | 5 +++++ .../Model/Shipping/Carrier/FedexRestTest.php | 21 +++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php index 0b336cdb06..f31cbb111b 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php @@ -315,6 +315,11 @@ protected function _formRateRequest($purpose) 'indicia' => $weight >= 1 ? 'PARCEL_SELECT' : 'PRESORTED_STANDARD', 'hubId' => $this->getConfigData('smartpost_hubid'), ]; + // Ground Economy caps declared value at $100; a higher amount fails the request + $requestedShipment['requestedPackageLineItems'][0]['declaredValue'] = [ + 'amount' => min($value, 100.0), + 'currency' => $currencyCode, + ]; } return [ diff --git a/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php index 55846a2ffd..314c3b6261 100644 --- a/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php +++ b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php @@ -270,6 +270,27 @@ function fedexShippedDefaults(): SimpleXMLElement expect($heavyShipment['smartPostInfoDetail']['indicia'])->toBe('PARCEL_SELECT'); }); + it('declares the package value on SmartPost quotes, capped at the $100 limit', function () { + $cheap = fedexProbe(); + $cheap->setRawRequest(fedexRawRateRequest(['value' => 40.0])); + $cheapShipment = $cheap->formRateRequest( + Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_SMARTPOST, + )['requestedShipment']; + + expect($cheapShipment['requestedPackageLineItems'][0]['declaredValue'])->toBe([ + 'amount' => 40.0, + 'currency' => $cheap->getCurrencyCode(), + ]); + + $pricey = fedexProbe(); + $pricey->setRawRequest(fedexRawRateRequest(['value' => 500.0])); + $priceyShipment = $pricey->formRateRequest( + Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_SMARTPOST, + )['requestedShipment']; + + expect($priceyShipment['requestedPackageLineItems'][0]['declaredValue']['amount'])->toBe(100.0); + }); + it('leaves serviceType unset for a general quote so FedEx returns every service', function () { $probe = fedexProbe(); $probe->setRawRequest(fedexRawRateRequest()); From 993e67625ccd57e80a771510b65f89c798d46576 Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Tue, 11 Aug 2026 15:58:29 +0100 Subject: [PATCH 6/8] Revert "Restored the declared value on SmartPost rate requests, capped at the Ground Economy $100 limit" This reverts commit 5b8c6e93eddc75b1d2789d2b25d74e8d4825aa0a. --- .../Mage/Usa/Model/Shipping/Carrier/Fedex.php | 5 ----- .../Model/Shipping/Carrier/FedexRestTest.php | 21 ------------------- 2 files changed, 26 deletions(-) diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php index f31cbb111b..0b336cdb06 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php @@ -315,11 +315,6 @@ protected function _formRateRequest($purpose) 'indicia' => $weight >= 1 ? 'PARCEL_SELECT' : 'PRESORTED_STANDARD', 'hubId' => $this->getConfigData('smartpost_hubid'), ]; - // Ground Economy caps declared value at $100; a higher amount fails the request - $requestedShipment['requestedPackageLineItems'][0]['declaredValue'] = [ - 'amount' => min($value, 100.0), - 'currency' => $currencyCode, - ]; } return [ diff --git a/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php index 314c3b6261..55846a2ffd 100644 --- a/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php +++ b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php @@ -270,27 +270,6 @@ function fedexShippedDefaults(): SimpleXMLElement expect($heavyShipment['smartPostInfoDetail']['indicia'])->toBe('PARCEL_SELECT'); }); - it('declares the package value on SmartPost quotes, capped at the $100 limit', function () { - $cheap = fedexProbe(); - $cheap->setRawRequest(fedexRawRateRequest(['value' => 40.0])); - $cheapShipment = $cheap->formRateRequest( - Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_SMARTPOST, - )['requestedShipment']; - - expect($cheapShipment['requestedPackageLineItems'][0]['declaredValue'])->toBe([ - 'amount' => 40.0, - 'currency' => $cheap->getCurrencyCode(), - ]); - - $pricey = fedexProbe(); - $pricey->setRawRequest(fedexRawRateRequest(['value' => 500.0])); - $priceyShipment = $pricey->formRateRequest( - Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_REQUEST_SMARTPOST, - )['requestedShipment']; - - expect($priceyShipment['requestedPackageLineItems'][0]['declaredValue']['amount'])->toBe(100.0); - }); - it('leaves serviceType unset for a general quote so FedEx returns every service', function () { $probe = fedexProbe(); $probe->setRawRequest(fedexRawRateRequest()); From 1eb16bcbb9745df3ca94586c6280fb1dd0ff745f Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Tue, 11 Aug 2026 16:04:31 +0100 Subject: [PATCH 7/8] Removed dead tracking request state, duplicate debug logging, and per-call HTTP client creation --- .phpstan.dist.baseline.neon | 6 ---- .../Mage/Usa/Model/Shipping/Carrier/Fedex.php | 28 ------------------- .../Shipping/Carrier/Fedex/RestClient.php | 13 ++++----- tests/FedexSandbox.php | 2 +- 4 files changed, 6 insertions(+), 43 deletions(-) diff --git a/.phpstan.dist.baseline.neon b/.phpstan.dist.baseline.neon index d3527f6714..93a2ca8df1 100644 --- a/.phpstan.dist.baseline.neon +++ b/.phpstan.dist.baseline.neon @@ -21039,12 +21039,6 @@ parameters: count: 1 path: app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php - - - rawMessage: 'Method Mage_Usa_Model_Shipping_Carrier_Fedex::setTrackingReqeust() has no return type specified.' - identifier: missingType.return - count: 1 - path: app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php - - rawMessage: 'Parameter #1 $value of method Mage_Shipping_Model_Rate_Result_Method::setMethodTitle() expects string, array|bool given.' identifier: argument.type diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php index 0b336cdb06..7e39ed8dd2 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php @@ -88,11 +88,6 @@ class Mage_Usa_Model_Shipping_Carrier_Fedex extends Mage_Usa_Model_Shipping_Carr */ protected $_customizableContainerTypes = ['YOUR_PACKAGING']; - /** - * Raw tracking request data - */ - protected ?\Maho\DataObject $_rawTrackingRequest = null; - protected ?Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient $_restClient = null; /** @@ -335,7 +330,6 @@ protected function _doRatesRequest($purpose) $ratesRequest = $this->_formRateRequest($purpose); $requestString = serialize($ratesRequest); $cached = $this->_getCachedQuotes($requestString); - $debugData = ['request' => $ratesRequest]; if ($cached === null) { $response = $this->_getRestClient()->getRates($ratesRequest); @@ -349,9 +343,6 @@ protected function _doRatesRequest($purpose) } } - $debugData['result'] = $response; - $this->_debug($debugData); - return $response; } @@ -728,8 +719,6 @@ public function getCurrencyCode() */ public function getTracking($trackings) { - $this->setTrackingReqeust(); - if (!is_array($trackings)) { $trackings = [$trackings]; } @@ -741,19 +730,6 @@ public function getTracking($trackings) return $this->_result; } - /** - * Set tracking request - */ - protected function setTrackingReqeust() - { - $r = new \Maho\DataObject(); - - $account = $this->getConfigData('account'); - $r->setAccount($account); - - $this->_rawTrackingRequest = $r; - } - /** * Send request for tracking */ @@ -761,7 +737,6 @@ protected function _doTrackingRequest(string $tracking): void { $requestString = serialize(['track' => $tracking]); $cached = $this->_getCachedQuotes($requestString); - $debugData = ['request' => ['trackingNumber' => $tracking]]; if ($cached === null) { $response = $this->_getRestClient()->track($tracking); @@ -775,9 +750,6 @@ protected function _doTrackingRequest(string $tracking): void } } - $debugData['result'] = $response; - $this->_debug($debugData); - $this->_parseTrackingResponse($tracking, $response); } diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/RestClient.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/RestClient.php index 8d901e2b92..5c0b3a11de 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/RestClient.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex/RestClient.php @@ -24,6 +24,7 @@ class Mage_Usa_Model_Shipping_Carrier_Fedex_RestClient private string $baseUrl; private bool $debugMode; private string $rateEndpoint; + private \Symfony\Contracts\HttpClient\HttpClientInterface $client; public static function getBaseUrl(bool $sandbox): string { @@ -42,6 +43,7 @@ public function __construct( $this->rateEndpoint = $rateEndpoint === Mage_Usa_Model_Shipping_Carrier_Fedex::RATE_ENDPOINT_COMPREHENSIVE ? self::ENDPOINT_RATES_COMPREHENSIVE : self::ENDPOINT_RATES; + $this->client = \Symfony\Component\HttpClient\HttpClient::create(['timeout' => 30]); } public function getRateEndpoint(): string @@ -106,20 +108,16 @@ public static function extractErrorMessage(array $data): ?string */ private function makeRequest(string $method, string $endpoint, array $data): array { - $client = \Symfony\Component\HttpClient\HttpClient::create([ - 'timeout' => 30, - ]); - $url = $this->baseUrl . $endpoint; $debugData = ['request' => ['method' => $method, 'url' => $url, 'data' => $data]]; try { - $response = $this->send($client, $method, $url, $data); + $response = $this->send($method, $url, $data); // FedEx revokes outstanding tokens on credential rotation; retry once fresh if ($response->getStatusCode() === 401) { $this->oauthClient->invalidateToken(); - $response = $this->send($client, $method, $url, $data); + $response = $this->send($method, $url, $data); } // getContent(false) keeps 4xx/5xx bodies readable: FedEx puts the actionable @@ -153,12 +151,11 @@ private function makeRequest(string $method, string $endpoint, array $data): arr } private function send( - \Symfony\Contracts\HttpClient\HttpClientInterface $client, string $method, string $url, array $data, ): \Symfony\Contracts\HttpClient\ResponseInterface { - return $client->request($method, $url, [ + return $this->client->request($method, $url, [ 'headers' => [ 'Authorization' => 'Bearer ' . $this->oauthClient->getAccessToken(), 'Content-Type' => 'application/json', diff --git a/tests/FedexSandbox.php b/tests/FedexSandbox.php index e9632bad03..1cf08f3b79 100644 --- a/tests/FedexSandbox.php +++ b/tests/FedexSandbox.php @@ -47,6 +47,6 @@ public static function rateEndpoint(): string public static function isConfigured(): bool { - return self::clientId() !== '' && self::clientSecret() !== ''; + return TestEnv::has('FEDEX_SANDBOX_CLIENT_ID', 'FEDEX_SANDBOX_CLIENT_SECRET'); } } From bc940602717751313cdf2716cd9b737e0ec5b4ac Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Tue, 11 Aug 2026 16:22:21 +0100 Subject: [PATCH 8/8] Fixed shipment response parsing tests to carry a package reference instead of loading an order --- tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php index 55846a2ffd..e8f671a9e6 100644 --- a/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php +++ b/tests/Backend/Unit/Usa/Model/Shipping/Carrier/FedexRestTest.php @@ -610,6 +610,8 @@ function fedexShippedDefaults(): SimpleXMLElement $shipmentRequest = function (): \Maho\DataObject { return new \Maho\DataObject([ 'store_id' => 1, + 'package_id' => 1, + 'reference_data' => 'Order #100000001 P1', 'packaging_type' => 'YOUR_PACKAGING', 'shipping_method' => 'FEDEX_GROUND', 'package_weight' => 10.0,