Support Forum [ All Topics | New Topic ]

Thread: [XML] Error with Upload Lots

Hello,

I am getting bellow response for Upload Lots XML API.

Endpoint :
https://technet.rapaport.com/webservices/Upload/DiamondManager.asmx?op=UploadLots

Method : POST

Headers : 
      Content-Type : application/soap+xml

Request Body : 

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<AuthenticationTicketHeader xmlns="http://technet.rapaport.com/">
<Ticket>bf01de07ec544e78b99cfd1a26e69601</Ticket>
</AuthenticationTicketHeader>
</soap12:Header>
<soap12:Body>
<UploadLots xmlns="http://technet.rapaport.com/">
<Parameters>
<LotList>Shape,Weight,Color,Clarity,Measurements,Cut,Lab,RapnetDiscountPercent,IndexDiscountPercent,DepthPercent,TablePercent,GirdleMin,GirdleMax,GirdlePercent,GirdleCondition,CuletSize,CuletCondition,Polish,Symmetry,FluorescenceIntensity,FluorescenceColor,CrownHeight,CrownAngle,PavilionDepth,PavilionAngle,Enhancement,LaserInscription,FancyColor,FancyColorIntensity,FancyColorOvertone,Comment,CertificateID,CertificateImage,SarinFile,VendorStockNumber,MatchingVendorStockNumber,IsMatchedPairSeparable,CityLocation,StateLocation,CountryLocation,ParcelStoneCount,Availability,TradeShow,ShowOnRapnet,ShowOnIndex\nP,0.530,D,I1,6.65x4.50x2.84,,GIA,-0.434,,63.1,59.00,Medium,Very Thick,,Faceted,None,Pointed,EX,VG,N,,,,,,,GIA 131507716,,,,Free Delivery to DUBAI // HK,1313507716,https://bit.ly/AN502B,,AN502B,,True,Mumbai,,India,,G,,True,0\n</LotList>
<LotListFormat>Rapnet</LotListFormat>
<ReplaceAll>false</ReplaceAll>
<FirstRowHeaders>true</FirstRowHeaders>
<ReportOption>None</ReportOption>
</Parameters>
</UploadLots>
</soap12:Body>
</soap12:Envelope>

Response : 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<UploadLotsResponse xmlns="http://technet.rapaport.com/">
<UploadLotsResult>
<Result>Successful</Result>
<ResultDescription>Lot file uploaded successfully.</ResultDescription>
<LotUploadStatusDetails>
<ResultsPath />
<AccountID>0</AccountID>
<UploadID>77608212</UploadID>
<Timestamp>77608212</Timestamp>
<StartTime>0001-01-01T00:00:00</StartTime>
<EndTime>0001-01-01T00:00:00</EndTime>
<Duration>0 minutes (0 seconds)</Duration>
<RowsReceived>0</RowsReceived>
<RapnetRowsReceived>0</RapnetRowsReceived>
<IndexRowsReceived>0</IndexRowsReceived>
<ProgressStatus>0</ProgressStatus>
<ProgressRowsCount>0</ProgressRowsCount>
<RowsValid>0</RowsValid>
<RowsInvalid>0</RowsInvalid>
<RapnetLotsAdded>0</RapnetLotsAdded>
<RapnetLotsUpdated>0</RapnetLotsUpdated>
<RapnetLotsDeleted>0</RapnetLotsDeleted>
<IndexLotsAdded>0</IndexLotsAdded>
<IndexLotsUpdated>0</IndexLotsUpdated>
<IndexLotsDeleted>0</IndexLotsDeleted>
<LastUpdated>0001-01-01T00:00:00</LastUpdated>
<UploadCompleted>false</UploadCompleted>
<Step1Status />
<Step2Status />
<Step3Status />
<CurrentStep>1</CurrentStep>
<UploadFaild>true</UploadFaild>
</LotUploadStatusDetails>
<QueueUploadID>0</QueueUploadID>
<InvalidLots>ValidationCode,Errors,Warnings,Shape,Weight,Color,Clarity,Measurements,Cut,Lab,RapnetAskingPrice,IndexAskingPrice,RapnetDiscountPercent,IndexDiscountPercent,DepthPercent,TablePercent,GirdleMin,GirdleMax,GirdlePercent,GirdleCondition,CuletSize,CuletCondition,Polish,Symmetry,FluorescenceIntensity,FluorescenceColor,CrownHeight,CrownAngle,PavilionDepth,PavilionAngle,Enhancement,LaserInscription,FancyColor,FancyColorIntensity,FancyColorOvertone,Comment,CertificateID,CertificateImage,SarinFile,VendorStockNumber,MatchingVendorStockNumber,IsMatchedPairSeparable,CityLocation,StateLocation,CountryLocation,ParcelStoneCount,Availability,TradeShow,ShowOnRapnet,ShowOnIndex,Make,RapCode,ClientRowID
</InvalidLots>
<Timestamp />
</UploadLotsResult>
</UploadLotsResponse>
</soap:Body>
</soap:Envelope>

I get a response saying that upload failed. I am trying to call APIs using Postman windows client

Also, I would like to know what is the difference between Rapnet format and RapXML

It would be really great if Rapnet can provide with Postman collection. Can be really helpful for all the developers. Our developers are having really hard time with little to no documentation of the APIs.

Thank you,
Deep Shah
deepshah003@gmail.com


>> add a comment
Deep
04/11/2020 08:10


12 Replies:

Hi 
I looked at your code and find you did not insert customer credentials 
Here is the link for credentials 

Here is a link to all our sample codes 
https://technet.rapaport.com/Info/SampleCodeByLanguage.aspx

These can all be tested in Postman 

Thanks 

>> add a comment
Rapnet Technical
4/12/2020 7:02:00 AM
Hi,

Thank you for your response.

I have passed the ticket which I get from Login API

>> add a comment
Deep
4/13/2020 6:51:00 AM
Hello Rapnet Technical,

Can you please help with a solution ? 

Thank you,
Deep


>> add a comment
Deep
4/15/2020 3:18:00 AM
I am having exactly same problem. I am passing ticket with request. Can you please recheck my request body and tell me what's wrong ?

I think something is wrong with CSV string. It will be great if you can check what's wrong.

>> add a comment
Deep
4/15/2020 3:01:00 PM
I am investigating this further 
Thanks 

>> add a comment
Rapnet Technical
4/16/2020 2:39:00 AM
Thank you. really appreciate it.

Also consider making a Postman collection of all Rapnet APIs. It will make things so much easier for developers and your team.

>> add a comment
Deep
4/16/2020 3:35:00 AM
Hi 
Here is code that we have tested 
and it works 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<UploadLotsResponse xmlns="http://technet.rapaport.com/">
<UploadLotsResult>
<Result>Successful</Result>
<ResultDescription>Lot file uploaded successfully.</ResultDescription>
<LotUploadStatusDetails>
<ResultsPath />
<AccountID>0</AccountID>
<UploadID>77728724</UploadID>
<Timestamp>77728724</Timestamp>
<StartTime>2020-04-16T03:52:44.813</StartTime>
<EndTime>2020-04-16T03:52:45.073</EndTime>
<Duration>0 minutes (0.3 seconds)</Duration>
<RowsReceived>1</RowsReceived>
<RapnetRowsReceived>1</RapnetRowsReceived>
<IndexRowsReceived>0</IndexRowsReceived>
<ProgressStatus>100</ProgressStatus>
<ProgressRowsCount>1</ProgressRowsCount>
<RowsValid>1</RowsValid>
<RowsInvalid>0</RowsInvalid>
<RapnetLotsAdded>1</RapnetLotsAdded>
<RapnetLotsUpdated>0</RapnetLotsUpdated>
<RapnetLotsDeleted>0</RapnetLotsDeleted>
<IndexLotsAdded>0</IndexLotsAdded>
<IndexLotsUpdated>0</IndexLotsUpdated>
<IndexLotsDeleted>0</IndexLotsDeleted>
<LastUpdated>2020-04-16T03:52:44.983</LastUpdated>
<UploadCompleted>true</UploadCompleted>
<Step1Status />
<Step2Status />
<Step3Status />
<CurrentStep>1</CurrentStep>
<UploadFaild>false</UploadFaild>
</LotUploadStatusDetails>
<QueueUploadID>0</QueueUploadID>
<InvalidLots>ValidationCode,Errors,Warnings,Shape,Weight,Color,Clarity,Measurements,Cut,Lab,RapnetAskingPrice,IndexAskingPrice,RapnetDiscountPercent,IndexDiscountPercent,DepthPercent,TablePercent,GirdleMin,GirdleMax,GirdlePercent,GirdleCondition,CuletSize,CuletCondition,Polish,Symmetry,FluorescenceIntensity,FluorescenceColor,CrownHeight,CrownAngle,PavilionDepth,PavilionAngle,Enhancement,LaserInscription,FancyColor,FancyColorIntensity,FancyColorOvertone,Comment,CertificateID,CertificateImage,SarinFile,VendorStockNumber,MatchingVendorStockNumber,IsMatchedPairSeparable,CityLocation,StateLocation,CountryLocation,ParcelStoneCount,Availability,TradeShow,ShowOnRapnet,ShowOnIndex,Make,RapCode,ClientRowID
</InvalidLots>
<Timestamp />
</UploadLotsResult>
</UploadLotsResponse>
</soap:Body>
</soap:Envelope>


>> add a comment
Rapnet Technical
4/16/2020 3:55:00 AM
Here is the output of the code above 
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<UploadLotsResponse xmlns="http://technet.rapaport.com/">
<UploadLotsResult>
<Result>Successful</Result>
<ResultDescription>Lot file uploaded successfully.</ResultDescription>
<LotUploadStatusDetails>
<ResultsPath />
<AccountID>0</AccountID>
<UploadID>77728724</UploadID>
<Timestamp>77728724</Timestamp>
<StartTime>2020-04-16T03:52:44.813</StartTime>
<EndTime>2020-04-16T03:52:45.073</EndTime>
<Duration>0 minutes (0.3 seconds)</Duration>
<RowsReceived>1</RowsReceived>
<RapnetRowsReceived>1</RapnetRowsReceived>
<IndexRowsReceived>0</IndexRowsReceived>
<ProgressStatus>100</ProgressStatus>
<ProgressRowsCount>1</ProgressRowsCount>
<RowsValid>1</RowsValid>
<RowsInvalid>0</RowsInvalid>
<RapnetLotsAdded>1</RapnetLotsAdded>
<RapnetLotsUpdated>0</RapnetLotsUpdated>
<RapnetLotsDeleted>0</RapnetLotsDeleted>
<IndexLotsAdded>0</IndexLotsAdded>
<IndexLotsUpdated>0</IndexLotsUpdated>
<IndexLotsDeleted>0</IndexLotsDeleted>
<LastUpdated>2020-04-16T03:52:44.983</LastUpdated>
<UploadCompleted>true</UploadCompleted>
<Step1Status />
<Step2Status />
<Step3Status />
<CurrentStep>1</CurrentStep>
<UploadFaild>false</UploadFaild>
</LotUploadStatusDetails>
<QueueUploadID>0</QueueUploadID>
<InvalidLots>ValidationCode,Errors,Warnings,Shape,Weight,Color,Clarity,Measurements,Cut,Lab,RapnetAskingPrice,IndexAskingPrice,RapnetDiscountPercent,IndexDiscountPercent,DepthPercent,TablePercent,GirdleMin,GirdleMax,GirdlePercent,GirdleCondition,CuletSize,CuletCondition,Polish,Symmetry,FluorescenceIntensity,FluorescenceColor,CrownHeight,CrownAngle,PavilionDepth,PavilionAngle,Enhancement,LaserInscription,FancyColor,FancyColorIntensity,FancyColorOvertone,Comment,CertificateID,CertificateImage,SarinFile,VendorStockNumber,MatchingVendorStockNumber,IsMatchedPairSeparable,CityLocation,StateLocation,CountryLocation,ParcelStoneCount,Availability,TradeShow,ShowOnRapnet,ShowOnIndex,Make,RapCode,ClientRowID
</InvalidLots>
<Timestamp />
</UploadLotsResult>
</UploadLotsResponse>
</soap:Body>
</soap:Envelope>


>> add a comment
Rapnet Technical
4/16/2020 3:56:00 AM
Hi, 

I guess you have attached output in both comments, can you please check again and show me how your input / request body looks like ? 

>> add a comment
Deep
4/16/2020 6:49:00 AM
The input code as requested 

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<AuthenticationTicketHeader xmlns="http://technet.rapaport.com/">
<Ticket>159c9ad9c0a74b18bf1c9310a1f97c0c</Ticket>
</AuthenticationTicketHeader>
</soap:Header>
<soap:Body>
<UploadLots xmlns="http://technet.rapaport.com/">
<Parameters>
<LotList>Stock #,Availability,Shape,Weight,Color,Clarity,Cut Grade,Polish,Symmetry,Fluorescence Intensity,Fluorescence Color,Measurements,Lab,Certificate #,Treatment,RapNet Price,Rapnet Discount %,Cash Price,Cash Price Discount %,Fancy Color,Fancy Color Intensity,Fancy Color Overtone,Depth %,Table %,Girdle Thin,Girdle Thick,Girdle %,Girdle Condition,Culet Size,Culet Condition,Crown Height,Crown Angle,Pavilion Depth,Pavilion Angle,Laser Inscription,Comment,Shade,Black Inclusion,Center Inclusion,Milky,Key To Symbols,Country,State,City,Is Matched Pair Separable,Pair Stock #,Allow RapLink Feed,Parcel Stones,Certificate Filename,Diamond Image,3D File,Member Comment,Trade Show
IT-496,M,RBC,0.5,"H","I1","EX","VG","VG","NON",,"5.0600-5.0500*3.1400","GIA","2287209184",,1276.2,-29.1,,,"",,,62,58,,,0.04,,NON,,0.15,36,0.43,40.8,"","NO BGM 100% EYE CLEAN SONE IN HONG KONG",,,,,"TWINNING WISP FEATHER",HONG KONG,,,,,,,,http://www.supersolitaire.hk/diamonddetail.php?pno=IT-496,,"STONE IN HK CONTACT KARAN SHAH +85263885354, QQ ID: 2995151419, WECHAT ID: KARAN2763",</LotList>
<LotListFormat>Rapnet</LotListFormat>
<ReplaceAll>false</ReplaceAll>
<FirstRowHeaders>true</FirstRowHeaders>
<ReportOption>None</ReportOption>
</Parameters>
</UploadLots>
</soap:Body>
</soap:Envelope>


>> add a comment
Rapnet Technical
4/16/2020 8:16:00 AM
Please note the token changes 
i have included the Authentication page 
https://technet.rapaport.com:449/http/authenticate.aspx

Thanks 

>> add a comment
Rapnet Technical
4/16/2020 8:36:00 AM
Okay, I will get this checked and will let you know. 

Also, can you please tell me mandatory fields to be sent in XML format ?

>> add a comment
Deep
4/17/2020 7:11:00 AM