Avatar of sdugar
sdugar asked on

Fedex Shipping Service Error Mesages -- Plz Help Me Understand

Dear Experts,

I am developing  an application using FEDEX SHIPPING SERVICE for shipping from my eCommerce website in ASP.NET .

While developing for some of the SERVICES i am getting ERROR MESSAGES and i couldn't  figure out the problem.

Following are the SERVICE TYPE and ERROR MESSAGES :

Error:Invalid Shipper load and count

Error:Invalid Shipper load and count

Error:Service type not valid with commitment

Error:Service type not valid with commitment

Error:Shipments for home delivery service must be designated as residential delivery also.

Please help me to resolve the problem.

(FEDEX have provided VB.NET samples also.)

E-CommerceWeb ApplicationsASP.NET

Avatar of undefined
Last Comment

8/22/2022 - Mon

For the FedEx Ground Home Delivery, you must set the residential flag to true when sending this service type.  For the other errors, can you post the XML files that you are sending to FedEx and I can take a look at it to see if I can find where the error is coming from?

(You can put XXXX in place of your developer ID, password, meter and account - I can put mine in it's place and see what I get).


Dear ltlbearand3

i have uploaded the files .

these are the sample files in VB.net provided by fedex developer solution.

In the folder vb\ShipWebService\Ground\Domestic\ShipWebServiceClient

i added the line for enabling residential status true :

request.RequestedShipment.Recipient.Address.Residential = True

Below is the piece of code attached.


Sub Main()
        Dim request As ProcessShipmentRequest = New ProcessShipmentRequest() ' Build a request object
        request.WebAuthenticationDetail = New WebAuthenticationDetail()
        request.WebAuthenticationDetail.UserCredential = New WebAuthenticationCredential()
        request.WebAuthenticationDetail.UserCredential.Key = "XXX" ' Replace "XXX" with the Key
        request.WebAuthenticationDetail.UserCredential.Password = "XXX" ' Replace "XXX" with the Password
        request.ClientDetail = New ClientDetail()
        request.ClientDetail.AccountNumber = "XXX" ' Replace "XXX" with clients account number
        request.ClientDetail.MeterNumber = "XXX" ' Replace "XXX" with clients meter number
        request.TransactionDetail = New TransactionDetail()
        request.TransactionDetail.CustomerTransactionId = "***Domestic Ground Shipment v3 Request using VB.NET***" ' The client will get the same value back in the response
        request.Version = New VersionId() ' WSDL version information, value is automatically set from wsdl
        request.RequestedShipment = New RequestedShipment()
        'request.RequestedShipment.ShipTimestamp = DateTime.Now ' Ship date and time
        'request.RequestedShipment.ShipTimestamp = DateAdd("d", 3, Today) ' Ship date and time
        request.RequestedShipment.ShipTimestamp = DateAdd("d", 2, Today)  ' Ship date and time
        request.RequestedShipment.ServiceType = ServiceType.GROUND_HOME_DELIVERY  ' Service types are STANDARD_OVERNIGHT, PRIORITY_OVERNIGHT, FEDEX_GROUND ...
        request.RequestedShipment.PackagingType = PackagingType.YOUR_PACKAGING ' Packaging type FEDEX_BOK, FEDEX_PAK, FEDEX_TUBE, YOUR_PACKAGING, ...
        request.RequestedShipment.Shipper = New Party() ' Sender information
        request.RequestedShipment.Shipper.Contact = New Contact()
        request.RequestedShipment.Shipper.Contact.CompanyName = "Sender Company Name"
        request.RequestedShipment.Shipper.Contact.PhoneNumber = "0805522713"
        request.RequestedShipment.Shipper.Address = New Address()
        request.RequestedShipment.Shipper.Address.StreetLines = New String(0) {"Address Line 1"}
        request.RequestedShipment.Shipper.Address.City = "Collierville"
        request.RequestedShipment.Shipper.Address.StateOrProvinceCode = "TN"
        request.RequestedShipment.Shipper.Address.PostalCode = "38017"
        request.RequestedShipment.Shipper.Address.CountryCode = "US"
        ' request.RequestedShipment.Shipper.Address.ResidentialSpecified = True
        request.RequestedShipment.Recipient = New Party() ' Recipient information
        request.RequestedShipment.Recipient.Contact = New Contact()
        request.RequestedShipment.Recipient.Contact.CompanyName = "Sea2Sky Rentals"
        request.RequestedShipment.Recipient.Contact.PhoneNumber = "9012637906"
        request.RequestedShipment.Recipient.Address = New Address()
        request.RequestedShipment.Recipient.Address.StreetLines = New String(0) {"249 South Highway 101 #565"}
        request.RequestedShipment.Recipient.Address.City = "Solana Beach"
        request.RequestedShipment.Recipient.Address.StateOrProvinceCode = "CA"
        request.RequestedShipment.Recipient.Address.PostalCode = "92075"
        request.RequestedShipment.Recipient.Address.CountryCode = "US"
        request.RequestedShipment.Recipient.Address.Residential = True
        request.RequestedShipment.ShippingChargesPayment = New Payment() ' Payment information
        request.RequestedShipment.ShippingChargesPayment.PaymentType = PaymentType.SENDER
        request.RequestedShipment.ShippingChargesPayment.Payor = New Payor()
        request.RequestedShipment.ShippingChargesPayment.Payor.AccountNumber = "XXX" ' Replace "XXX" with payors account number
        request.RequestedShipment.ShippingChargesPayment.Payor.CountryCode = "US"
        request.RequestedShipment.LabelSpecification = New LabelSpecification() ' Label specification
        request.RequestedShipment.LabelSpecification.ImageType = LabelSpecificationImageType.PDF ' Image types PDF, PNG, DPL, ...
        request.RequestedShipment.LabelSpecification.ImageTypeSpecified = True
        request.RequestedShipment.LabelSpecification.LabelFormatType = LabelFormatType.COMMON2D
        request.RequestedShipment.LabelSpecification.LabelFormatTypeSpecified = True
        request.RequestedShipment.RateRequestTypes = New RateRequestType(0) {RateRequestType.ACCOUNT} ' Rate types requested LIST, MULTIWEIGHT, ...
        request.RequestedShipment.PackageCount = 1        
        request.RequestedShipment.RequestedPackages = New RequestedPackage(0) {New RequestedPackage()}
        request.RequestedShipment.RequestedPackages(0).Weight = New Weight() ' Package weight information
        request.RequestedShipment.RequestedPackages(0).Weight.Value = 50.0
        request.RequestedShipment.RequestedPackages(0).Weight.Units = WeightUnits.LB
        request.RequestedShipment.RequestedPackages(0).Dimensions = New Dimensions()
        'request.RequestedShipment.RequestedPackages(0).Dimensions.Length = 108
        'request.RequestedShipment.RequestedPackages(0).Dimensions.Width = 5
        'request.RequestedShipment.RequestedPackages(0).Dimensions.Height = 5
        request.RequestedShipment.RequestedPackages(0).Dimensions.Length = 5
        request.RequestedShipment.RequestedPackages(0).Dimensions.Width = 5
        request.RequestedShipment.RequestedPackages(0).Dimensions.Height = 2
        request.RequestedShipment.RequestedPackages(0).Dimensions.Units = LinearUnits.IN
        Dim bCodShipment As Boolean
        bCodShipment = False ' set to true to request COD shipment and print COD return label
        If (bCodShipment) Then
            request.RequestedShipment.RequestedPackages(0).SpecialServicesRequested = New PackageSpecialServicesRequested() ' Special service requested
            request.RequestedShipment.RequestedPackages(0).SpecialServicesRequested.SpecialServiceTypes = New PackageSpecialServiceType(0) {PackageSpecialServiceType.APPOINTMENT_DELIVERY} ' Special Services types COD, HOLD_AT_LOCATION, RESIDENTIAL DELIVERY, ...
            request.RequestedShipment.RequestedPackages(0).SpecialServicesRequested.CodCollectionAmount = New Money()
            request.RequestedShipment.RequestedPackages(0).SpecialServicesRequested.CodCollectionAmount.Amount = 150
            request.RequestedShipment.RequestedPackages(0).SpecialServicesRequested.CodCollectionAmount.Currency = "USD"
        End If
        'Dim bResidentialDelivery As Boolean
        'bResidentialDelivery = False ' set to true to request COD shipment and print COD return label
        'If (bResidentialDelivery) Then
        '    'request.RequestedShipment.SpecialServicesRequested = New Surcharge() ' Special service requested
        '    request.RequestedShipment.SpecialServicesRequested.SpecialServiceTypes = New SurchargeType(0) {SurchargeType.RESIDENTIAL_DELIVERY} ' Special Services types COD, HOLD_AT_LOCATION, RESIDENTIAL DELIVERY, ...
        '    'request.RequestedShipment.RequestedPackages(0).SpecialServicesRequested.CodCollectionAmount = New Money()
        '    'request.RequestedShipment.RequestedPackages(0).SpecialServicesRequested.CodCollectionAmount.Amount = 150
        '    'request.RequestedShipment.RequestedPackages(0).SpecialServicesRequested.CodCollectionAmount.Currency = "USD"
        'End If
        request.RequestedShipment.RequestedPackages(0).CustomerReferences = New CustomerReference(2) {New CustomerReference(), New CustomerReference(), New CustomerReference()} ' Reference details
        request.RequestedShipment.RequestedPackages(0).CustomerReferences(0).CustomerReferenceType = CustomerReferenceType.CUSTOMER_REFERENCE
        request.RequestedShipment.RequestedPackages(0).CustomerReferences(0).Value = "GR4567892"
        request.RequestedShipment.RequestedPackages(0).CustomerReferences(1).CustomerReferenceType = CustomerReferenceType.INVOICE_NUMBER
        request.RequestedShipment.RequestedPackages(0).CustomerReferences(1).Value = "INV4567892"
        request.RequestedShipment.RequestedPackages(0).CustomerReferences(2).CustomerReferenceType = CustomerReferenceType.P_O_NUMBER
        request.RequestedShipment.RequestedPackages(0).CustomerReferences(2).Value = "PO4567892"
        Dim shipService As ShipService = New ShipService() ' Initialize the service
            Dim reply As ProcessShipmentReply = shipService.processShipment(request) ' This is the call to the ship web service passing in a request object and returning a reply object
            If (reply.HighestSeverity = NotificationSeverityType.SUCCESS) Then ' check if the call was successful
                Console.WriteLine("--- Package details ---")
                For Each packageDetail As CompletedPackageDetail In reply.CompletedShipmentDetail.CompletedPackageDetails ' Package details / Rating information for each package
                    Console.WriteLine("Tracking # {0}", packageDetail.TrackingId.TrackingNumber)
                    Console.WriteLine("--- Rate details ---")
                    For Each packageRateDetail As PackageRateDetail In packageDetail.PackageRating.PackageRateDetails
                        If (Not packageRateDetail.BillingWeight Is Nothing) Then
                            Console.WriteLine(" Billing weight {0} {1}", packageRateDetail.BillingWeight.Value, packageRateDetail.BillingWeight.Units)
                        End If
                        If (Not packageRateDetail.BaseCharge Is Nothing) Then
                            Console.WriteLine("    Base charge {0} {1}", packageRateDetail.BaseCharge.Amount, packageRateDetail.BaseCharge.Currency)
                        End If
                        If (Not packageRateDetail.NetCharge Is Nothing) Then
                            Console.WriteLine("     Net charge {0} {1}", packageRateDetail.NetCharge.Amount, packageRateDetail.NetCharge.Currency)
                        End If
                        For Each surcharge As Surcharge In packageRateDetail.Surcharges ' Individual surcharge for each package
                            Console.WriteLine("{0} surcharge {1} {2}", surcharge.SurchargeType, surcharge.Amount.Amount, surcharge.Amount.Currency)
                        If (Not packageRateDetail.TotalSurcharges Is Nothing) Then
                            Console.WriteLine("Total surcharge {0} {1}", packageRateDetail.TotalSurcharges.Amount, packageRateDetail.TotalSurcharges.Currency)
                        End If
                    If (Not packageDetail.Label.Parts(0).Image Is Nothing) Then
                        'Save Label Buffer 
                        Dim FileName As String
                        FileName = "c:\" + packageDetail.TrackingId.TrackingNumber + ".pdf"
                        Dim LabelFile As New FileStream(FileName, FileMode.Create)
                        LabelFile.Write(packageDetail.Label.Parts(0).Image, 0, packageDetail.Label.Parts(0).Image.Length)
                        'Display Label in Acrobat
                        Dim info As New System.Diagnostics.ProcessStartInfo(FileName)
                        info.Verb = "open"
                        info.UseShellExecute = True
                        If (bCodShipment) Then
                            ' Save label buffer to file
                            FileName = "c:\" + packageDetail.TrackingId.TrackingNumber + "CR.pdf"
                            LabelFile = New FileStream(FileName, FileMode.Create)
                            LabelFile.Write(reply.CompletedShipmentDetail.CodReturnDetail.Label.Parts(0).Image, 0, reply.CompletedShipmentDetail.CodReturnDetail.Label.Parts(0).Image.Length)
                            ' Display label in Acrobat 
                            info = New System.Diagnostics.ProcessStartInfo(FileName)
                            info.UseShellExecute = True
                            info.Verb = "open"
                        End If
                    End If
                For Each notification As Notification In reply.Notifications
            End If
        catch e as SoapException
        Catch e As Exception
        End Try
        Console.WriteLine("Press any key to quit !")
    End Sub

Open in new window


Ran out of time to look at this today.  I will try to take a look at them and let you know what I find out or someone else may jump in and find a solution also.
Your help has saved me hundreds of hours of internet surfing.

Dear Bear

I am looking forward to ur answer !

And the FedEx Ground Home Delivery
worked !!


A few things:

On the Freight options - will you really use those.  I believe those are for shipments over 150 lbs per box.

On the other two international options I am not getting the errors you have.

I suggest making sure the Weights all add up (i.e. the total package weight must equal the sum of weight for the commodities.  For example if you have 3 books a 1 lb each, you total weight must be 3 lbs.)
Also make sure the unit qty times the unit price equals the total customs value.  

I will try to do some more checking later to see if I can find anything else.

FYI - You can also try calling the FedEx Hotline at 877-339-2774.

HI Bear,

Thanks for your help.May be any problem in data entry at my end.If you can send me the set of enterd data for these service FEDEX hotline and it won't help much.

As they said it not technical error it must be realted to data entry probs or may be service available or not.Please check on fedex website.

Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

Dear Bear,

Can you send me the data for any of the :INTERNATIONAL service type which was runing fine at you end. I think i can test same data at my end to resolve problem.


Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

hi ltlbearand3

Can you help me regarding the special service.I am working on the special service like "EMAIL NOTIFICATION DETAIL "

i added the pesonal message.But for notification there are 2 more parameters RECEIPIENTS AND RECEIPIENTS TYPE .I am tring to assing data to both but could not able to figure out how to set.

here is the code for the EMAIL NOTIFICATION DETAIL part.

please help me in this regard.


Dim bEmailNotification As Boolean
        bEmailNotification = True
        If (bEmailNotification) Then
            request.RequestedShipment.SpecialServicesRequested = New ShipmentSpecialServicesRequested() ' Special service requested
            request.RequestedShipment.SpecialServicesRequested.SpecialServiceTypes = New ShipmentSpecialServiceType(0) {ShipmentSpecialServiceType.EMAIL_NOTIFICATION} ' Special Services types COD, HOLD_AT_LOCATION, RESIDENTIAL DELIVERY, ...
            request.RequestedShipment.SpecialServicesRequested.EMailNotificationDetail = New EMailNotificationDetail()
            request.RequestedShipment.SpecialServicesRequested.EMailNotificationDetail.PersonalMessage = "aaa"
            'Dim a As New EMailNotificationRecipient
            'a.EMailAddress = "dugarsaurabh@hotmail.com"
            request.RequestedShipment.SpecialServicesRequested.EMailNotificationDetail.Recipients = New EMailNotificationRecipient(0)
            request.RequestedShipment.SpecialServicesRequested.EMailNotificationDetail.Recipients = New EMailNotificationRecipient()
        End If

Open in new window


Glad to help.  

Recipient Type describes the address type (BROKER, OTHER, RECIPIENT, SHIPPER)

Try the following code:

FYI something like this is usually entered as a new question.  That way If I can't get to it, another expert will see the question and might be able to help.
If (bEmailNotification) Then
  request.RequestedShipment.SpecialServicesRequested = New ShipmentSpecialServicesRequested() ' Special Service requested
  request.RequestedShipment.SpecialServicesRequested.SpecialServiceTypes = New ShipmentSpecialServiceType(0) {ShipmentSpecialServiceType.EMAIL_NOTIFICATION} ' Special Services types COD, HOLD_AT_LOCATION, RESIDENTIAL DELIVERY, ...
  request.RequestedShipment.SpecialServicesRequested.EMailNotificationDetail = New EMailNotificationDetail()
  request.RequestedShipment.SpecialServicesRequested.EMailNotificationDetail.PersonalMessage = "aaa"
  request.RequestedShipment.SpecialServicesRequested.EMailNotificationDetail.Recipients = New EMailNotificationRecipient(0) {New EMailNotificationRecipient()}
  request.RequestedShipment.SpecialServicesRequested.EMailNotificationDetail.Recipients(0).EMailAddress = "dugarsaurabh@hotmail.com"
  request.RequestedShipment.SpecialServicesRequested.EMailNotificationDetail.Recipients(0).EMailNotificationRecipientType = EMailNotificationRecipientType.RECIPIENT
End If

Open in new window

Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy

Hi ltlbearand3,

I have posted this for fedex please help me



hi ltlbearand3,

I have posted new question on Fedex Email notification problem.Please can you help me in this regards.