Skip to content

International Time in Transit - FedexAvailabilityCommitmentRequest #113

Open

Description

@Helix31522

Hi all,

Thanks in advance for your help. What am I missing here? I can return time in transit for ground shipments, but I am having no luck with International time in transit.

            avc_request = FedexAvailabilityCommitmentRequest(CONFIG_OBJ)
            avc_request.Origin.PostalCode = sender_postal
            avc_request.Origin.CountryCode = sender_country
            avc_request.Destination.PostalCode = receiver_postal
            avc_request.Destination.CountryCode = receiver_country
            avc_request.CarrierCode = 'FDXE'
            avc_request.ShipDate = shipment_date

            avc_request.send_request()
            print(avc_request.response)
            print('----start------')
            for option in avc_request.response.Options:
                if hasattr(option, 'TransitTime'):
                    print(option.Service)
                    print(option.TransitTime)
            print('----end------')

avc_request.response prints the following, but there is no transit time to pull for each service:

(reply){
   HighestSeverity = "SUCCESS"
   Notifications[] = 
      (Notification){
         Severity = "SUCCESS"
         Source = "vacs"
         Code = "000"
         Message = "SUCCESS"
         LocalizedMessage = "SUCCESS"
      },
   Version = 
      (VersionId){
         ServiceId = "vacs"
         Major = 4
         Intermediate = 0
         Minor = 0
      }
   Options[] = 
      (ServiceAvailabilityOption){
         Service = "INTERNATIONAL_PRIORITY"
         DestinationStationId = "MNLA "
         DestinationAirportId = "MNL"
      },
      (ServiceAvailabilityOption){
         Service = "INTERNATIONAL_ECONOMY"
         DestinationStationId = "MNLA "
         DestinationAirportId = "MNL"
      },
      (ServiceAvailabilityOption){
         Service = "INTERNATIONAL_PRIORITY_FREIGHT"
         DestinationStationId = "MNLA "
         DestinationAirportId = "MNL"
      },
      (ServiceAvailabilityOption){
         Service = "INTERNATIONAL_ECONOMY_FREIGHT"
         DestinationStationId = "MNLA "
         DestinationAirportId = "MNL"
      },
      (ServiceAvailabilityOption){
         Service = "INTERNATIONAL_PRIORITY_DISTRIBUTION"
      },
      (ServiceAvailabilityOption){
         Service = "INTERNATIONAL_DISTRIBUTION_FREIGHT"
      },
 }

Activity

  1. jeenal-gajjar commented on Jul 16, 2019

    @jeenal-gajjar

    I am also getting the same Issue.
    I also got issue during international shipment for the commodities.
    error: fedex.base_service.FedexError: Commodities are required (Error code: 6065)
    Can you help me into this issue?

  2. radzhome commented on Feb 20, 2020

    @radzhome
    Member

    If you get it working please add an example for international shipment. Thanks.

  3. skiv23 commented on Nov 16, 2020

    @skiv23

    I am also getting the same Issue.
    I also got issue during international shipment for the commodities.
    error: fedex.base_service.FedexError: Commodities are required (Error code: 6065)
    Can you help me into this issue?

    If anyone else comes here with this question, here's the code sample for commodities

    commodity = shipment.create_wsdl_object_of_type('Commodity')
    commodity.NumberOfPieces = 1
    commodity.Description = '123'
    commodity.CountryOfManufacture = 'US'
    commodity.Quantity = 1
    commodity.QuantityUnits = 'EA'
    commodity.Weight.Units = 'LB'
    commodity.Weight.Value = 1.0
    commodity.UnitPrice.Currency = 'USD'
    commodity.UnitPrice.Amount = 1.0
    commodity.CustomsValue.Currency = 'USD'
    commodity.CustomsValue.Amount = 1.0
    
    shipment.RequestedShipment.CustomsClearanceDetail.Commodities = [commodity]
    shipment.RequestedShipment.CustomsClearanceDetail.CustomsValue.Currency = "USD"
    shipment.RequestedShipment.CustomsClearanceDetail.CustomsValue.Amount = 1.0
    shipment.RequestedShipment.CustomsClearanceDetail.DutiesPayment.PaymentType = 'SENDER'
    shipment.RequestedShipment.CustomsClearanceDetail.DutiesPayment.Payor.ResponsibleParty.AccountNumber = self.CONFIG_OBJ.account_number
    

    More info about these fields can be found in their PDF.

    Regarding Time in transit - Issue still exists, but I believe it's in the API itself. Developer PDF has a US->BR ServiceAvailabilityRequest example in xml, it doesn't have any extra data, but it doesn't show transit time anyway. Tried both ways - this library and postman.

  4. radzhome commented on Mar 31, 2021

    @radzhome
    Member

    You want to add the example as a PR?

  5. MatinF commented on Mar 31, 2021

    @MatinF

    The new international shipment example may also be useful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions