Skip to main content
Published: October 03 2014, 4:22:00 PMUpdated: September 02 2022, 12:03:20 AM

I am getting error-37 "Input data is invalid" for shipping. How to resolve the issue ?

There can be different reasons for this error, but most of the times the reason is that shipping service that is specified is incorrect or invalid.

Few things to check

1. Make sure that you execute GeteBayDetails api for the specific site where you are attempting to list the item, and get the Shipping Service, but do not forget to check the following  :


a) You can only use the service that supports the specific the ShippingType you intend to use, for example : if you are listing with ShippingType as Flat, choose the shipping service that shows
<ServiceType>Flat</ServiceType>

b) Make sure that shipping service that you choose also has  <ValidForSellingFlow>true</ValidForSellingFlow> . If the Shipping Service is valid for the selling flow, the ShippingServiceDetails container has the field ValidForSellingFlow as true.  If the field is not returned, you cannot use the service for listing an item in the AddItem call.



Following are a few possible cases where you may get the error and the resolution :

Case 1 : Invalid data error even though shipping service is specified from the response of GeteBayDetails

For example : Let us assume you are sending the following ShippingDetails snippet and getting error -37

<Item>
<Country>US</Country>
<Currency>USD</Currency>
<Description>description</Description>
<ListingDuration>Days_7</ListingDuration>
...
<ShippingDetails>
<ShippingServiceOptions>
<ShippingService>US Postal Service Priority Mail</ShippingService>
<ShippingServiceCost currencyID="USD">4.99</ShippingServiceCost>
<ShippingServiceAdditionalCost currencyID="USD">0.0</ShippingServiceAdditionalCost>
<ShippingServicePriority>1</ShippingServicePriority>
</ShippingServiceOptions>
</ShippingDetails>
...
</Item>

And let's say, here is a snippet of GeteBayDetails response:

<ShippingServiceDetails>
<Description>US Postal Service Priority Mail</Description>
<ShippingService>USPSPriority</ShippingService>
<ShippingServiceID>7</ShippingServiceID>
<ShippingTimeMax>3</ShippingTimeMax>
<ShippingTimeMin>2</ShippingTimeMin>
< /ShippingServiceDetails>


Reason for the error : The AddItem request has  shipping service value : <ShippingService>US Postal Service Priority Mail</ShippingService>, whereas GeteBayDetails shows the ShippingService value as <ShippingService>USPSPriority</ShippingService>. You should use the "exact" shipping service name from GeteBayDetails, and not the <Description>.

Resolution : Specify the correct ShippingService name i.e. <ShippingService>USPSPriority</ShippingService> in the AddItem request and it will go through.



Case 2 : Reason for error-37 "Shipping Service null is invalid"
This can happen when you do not specify the shipping service at all.

For example : Let's assume you are executing the ReviseItem request with the following snippet :

<Item>

<ItemID>110016433318</ItemID>

<ShippingDetails>

<ShippingServiceOptions>

<ShippingServiceCost>9.9</ShippingServiceCost>

<ShippingServiceAdditionalCost>6.95</ShippingServiceAdditionalCost>

</ShippingServiceOptions>

</ShippingDetails>

</Item>

and you are getting :

<Errors>

<ShortMessage>Input data is invalid.</ShortMessage>

<LongMessage>Input data for tag <ShippingService[NULL] is invalid or missing. Please check API documentation</LongMessage>

<ErrorCode>37</ErrorCode>

<SeverityCode>Error</SeverityCode>

<ErrorParameters ParamID="0">
<Value>ShippingService[NULL]</Value>
</ErrorParameters>

<ErrorClassification>RequestError</ErrorClassification>

</Errors>

 

 


Reason for the error :  Whenever you revise the Shipping Information, you need to send in the required information such as the shipping service, shipping service priority. As a best practice, send in the entire ShippingDetails container, as you would for an AddItem call.

 

Resolution :

Specify the entire ShippingDetails node with shipping service, priority, cost etc

 

<Item>

<ItemID>110016433318</ItemID>

<ShippingDetails>

<ShippingServiceOptions>
<!--Send in the complete information for the ShippingServiceOptions container -->

<ShippingServicePriority>1</ShippingServicePriority>

<ShippingService>UPSFirstClass</ShippingService>

<ShippingServiceCost>9.9</ShippingServiceCost>

<ShippingServiceAdditionalCost>6.95</ShippingServiceAdditionalCost>

</ShippingServiceOptions>

<!-- If you have multiple ShippingServiceOptions / InternationalShippingServiceOption (s), specify all of them, even if there is no revision to them.

</ShippingDetails>

</Item>

 

 


Case 3 : Sending correct shipping service name, but still getting error-37

Let's assume, you are sending the following snippet in the AddItem request :
    <ShippingDetails>
      <InsuranceOption>NotOffered</InsuranceOption>
      <ShippingServiceOptions>
        <ShippingInsuranceCost currencyID="USD">0</ShippingInsuranceCost>
        <ShippingService>FedExGroundDisabled</ShippingService>
        <ShippingServiceCost currencyID="USD">10</ShippingServiceCost>
        <ShippingServicePriority>1</ShippingServicePriority>
      </ShippingServiceOptions>

and you get the following error :
- <Errors>
  <ShortMessage>Shipping service is not available.</ShortMessage>
  <LongMessage>Shipping service FedEx Ground(68) is not available.</LongMessage>
  <ErrorCode>12519</ErrorCode>
  <SeverityCode>Error</SeverityCode>
- <ErrorParameters ParamID="0">
  <Value>FedEx Ground(68)</Value>
  </ErrorParameters>



Here is the GeteBayDeatils snippet for this service :
- <ShippingServiceDetails>
  <Description>FedEx Ground</Description>
  <ShippingService>FedExGroundDisabled</ShippingService>
  <ShippingServiceID>68</ShippingServiceID>
  <ShippingTimeMax>5</ShippingTimeMax>
  <ShippingTimeMin>1</ShippingTimeMin>
  <ServiceType>Flat</ServiceType>
  <ShippingPackage>Letter</ShippingPackage>
  <ShippingPackage>LargeEnvelope</ShippingPackage>
  <ShippingPackage>PackageThickEnvelope</ShippingPackage>
  <ShippingPackage>USPSLargePack</ShippingPackage>
  <DimensionsRequired>true</DimensionsRequired>
  <ValidForSellingFlow>false</ValidForSellingFlow>   
  <SurchargeApplicable>true</SurchargeApplicable>
  <ShippingCarrier>FedEx</ShippingCarrier>


Reason for the error: In this case ShippingService name is correct, however, GeteBayDetails response returns   <ValidForSellingFlow>false</ValidForSellingFlow>  so you cannot use this shippingservice in your Add/Revise/Relist api request.

Resolution : Looks for a different shipping service for ServiceType=Flat, which has   <ValidForSellingFlow>true</ValidForSellingFlow>   



 



How well did this answer your question?
Answers others found helpful

Got thoughts? Click the feedback button – your insights help us improve!