RapNet Instant Inventory Web Service Example (C#)

All of the parameters are optional and you do not have to send them.
Feed RF = new Feed();
FeedParameters Params = new FeedParameters();

//This must be done in HTTPS protocol
RF.Login("UserName", "Password");

//After log in you will receive a encrypted ticket with your credentials. This will be used to authenticate your session.
//Now you can choose to change the protocol to HTTP so it works faster.

RF.Url = RF.Url.Replace("https", "http");

Params.SearchType = SearchTypes.WHITE; // The default value is WHITE.
Params.ColorFrom = Colors.F;
Params.ColorTo = Colors.J;
Params.ClarityFrom = Clarities.IF;
Params.ClarityTo = Clarities.I1;
Params.SizeFrom = 0.3m;
Params.SizeTo = 0.7m;
Params.CutFrom = Cuts.VERY_GOOD;
Params.CutTo = Cuts.FAIR;
Params.GirdleSizeMin = GirdleSizes.EXTR_THICK;
Params.GirdleSizeMax = GirdleSizes.SLIGHTLY_THICK;
Params.TablePercentFrom = 48.2m;
Params.TablePercentTo = 73.4m;
Params.DepthPercentFrom = 33.86m;
Params.DepthPercentTo = 73.8m;
Params.MeasLengthFrom = 3.7m;
Params.MeasLengthTo = 6.4m;
Params.MeasWidthFrom = 2.8m;
Params.MeasWidthTo = 7.9m;
Params.MeasDepthFrom = 2.7m;
Params.MeasDepthTo = 3.86m;
Params.PriceFrom = 0;
Params.PriceTo = 150000;
Params.SortDirection = SortDirections.DESC;
Params.SortBy = SortByField.CLARITY;

List<Shapes> MyShapes = new List<Shapes>();
MyShapes.Add(Shapes.ROUND);
Params.ShapeCollection = MyShapes.ToArray();

List<Labs> MyLabs = new List<Labs>();
MyLabs.Add(Labs.GIA);
MyLabs.Add(Labs.HRD);
Params.LabCollection = MyLabs.ToArray();

List<FluorescenceColors> MyFluorescenceColors = new List<FluorescenceColors>();
MyFluorescenceColors.Add(FluorescenceColors.BLUE);
MyFluorescenceColors.Add(FluorescenceColors.GREEN);
Params.FluorescenceColorsCollection = MyFluorescenceColors.ToArray();

List<FluorescenceIntensities> MyFluorescenceIntensities = new List<FluorescenceIntensities>();
MyFluorescenceIntensities.Add(FluorescenceIntensities.FAINT);
MyFluorescenceIntensities.Add(FluorescenceIntensities.MEDIUM);
Params.FluorescenceIntensityCollection = MyFluorescenceIntensities.ToArray();

List<CuletSizes> MyCuletSizes = new List<CuletSizes>();
MyCuletSizes.Add(CuletSizes.LARGE);
MyCuletSizes.Add(CuletSizes.MEDIUM);
Params.CuletSizesCollection = MyCuletSizes.ToArray();

//For Fancy Colors search :
// Params.SearchType = SearchTypes.FANCY;
List<FancyColors> MyFancyColors = new List<FancyColors>();
MyFancyColors.Add(FancyColors.YELLOW);
MyFancyColors.Add(FancyColors.BROWN);
Params.FancyColorCollection = MyFancyColors.ToArray();
Params.FancyColorIntensityFrom = FancyColorIntensities.FAINT;
Params.FancyColorIntensityTo = FancyColorIntensities.VERY_LIGHT;

Params.PageSize = 25;//Max Page size is 50
int DiamondsCount=0;
DataSet ds = RF.GetDiamonds(Params, ref DiamondsCount);


To get the grading certificate path: If HasCertFile=true then you can use the following url to get the grading certificate path http://www.diamondselections.com/GetCertificatePath.aspx?diamondid=XXX