All Projects → abuzuhri → Amazon-SP-API-CSharp

abuzuhri / Amazon-SP-API-CSharp

Licence: MIT license
.Net C# library for the new Amazon Selling Partner API

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to Amazon-SP-API-CSharp

selling-partner-api-sdk
Golang toolkit for working with Amazon's Selling Partner API (SP-API)
Stars: ✭ 48 (-49.47%)
Mutual labels:  amazon, mws-api, selling-partner-api, selling-partner-api-sdk
amz sp api
AmzSpApi - Unofficial Ruby gem for the Selling Partner APIs (SP-API)
Stars: ✭ 22 (-76.84%)
Mutual labels:  amazon, mws-api, selling-partner-api, selling-partner-api-sdk
selling-partner-sdk
Amazon Selling Partner JAVA SDK SP API
Stars: ✭ 15 (-84.21%)
Mutual labels:  amazon, amazon-web-services, selling-partner-api
oracdc
Oracle database CDC (Change Data Capture)
Stars: ✭ 51 (-46.32%)
Mutual labels:  amazon, amazon-web-services
aws-ses-template-manager
A simple application offering an interface for CRUD management of AWS SES templates across all compatible regions and with your own choice of credentials profile. A great GUI productivity tool that can be setup and run locally in seconds (see readme).
Stars: ✭ 23 (-75.79%)
Mutual labels:  amazon, amazon-web-services
sp-api-sdk
Amazon Selling Partner SPI - PHP SDKs
Stars: ✭ 34 (-64.21%)
Mutual labels:  amazon, selling-partner-api
Learn Aws Lambda
✨ Learn how to use AWS Lambda to easily create infinitely scalable web services
Stars: ✭ 910 (+857.89%)
Mutual labels:  amazon, amazon-web-services
Amazonbigspider
😱Full Automatic Amazon Distributed Spider | 亚马逊分布式四国际站采集选款产品|账号admin,密码adminadmin
Stars: ✭ 140 (+47.37%)
Mutual labels:  amazon, amazon-web-services
aws-lab-guide
Amazon Web Services Practice Lab Guide. Absolute beginners can try this lab practice guide.
Stars: ✭ 25 (-73.68%)
Mutual labels:  amazon, amazon-web-services
Terraform Aws Landing Zone
Terraform Module for AWS Landing Zone
Stars: ✭ 142 (+49.47%)
Mutual labels:  amazon, amazon-web-services
Aws Sdk Perl
A community AWS SDK for Perl Programmers
Stars: ✭ 153 (+61.05%)
Mutual labels:  amazon, amazon-web-services
Cognito Express
Authenticates API requests on a Node application by verifying the JWT signature of AccessToken or IDToken generated by Amazon Cognito.
Stars: ✭ 165 (+73.68%)
Mutual labels:  amazon, amazon-web-services
golang-tts
Text-to-Speach golang package based in Amazon Polly service
Stars: ✭ 19 (-80%)
Mutual labels:  amazon, amazon-web-services
terraform-emr-spark-example
An example Terraform project that will configure a Secure and Customizable Spark Cluster on Amazon EMR.
Stars: ✭ 43 (-54.74%)
Mutual labels:  amazon, amazon-web-services
aws-sqs-sns-client
AWS SNS SQS client UI
Stars: ✭ 26 (-72.63%)
Mutual labels:  amazon, amazon-web-services
Machine Learning Using K8s
Train and Deploy Machine Learning Models on Kubernetes using Amazon EKS
Stars: ✭ 145 (+52.63%)
Mutual labels:  amazon, amazon-web-services
aws2openapi
Amazon Web Services API description to OpenAPI 3.0 definition
Stars: ✭ 45 (-52.63%)
Mutual labels:  amazon, amazon-web-services
django-eb-sqs-worker
Django Background Tasks for Amazon Elastic Beanstalk
Stars: ✭ 27 (-71.58%)
Mutual labels:  amazon, amazon-web-services
aws-compute-decision-tree
A decision tree to help you decide on the right AWS compute service for your needs.
Stars: ✭ 25 (-73.68%)
Mutual labels:  amazon-web-services
alexa-ruby
Ruby toolkit for Amazon Alexa service
Stars: ✭ 17 (-82.11%)
Mutual labels:  amazon

Amazon Selling Partner API C# 🚀 .NET NuGet Gitter Chat

This is an API Binding in .Net C# for the new Amazon Selling Partner API.

This library is based on the output of swagger-codegen with the OpenAPI files provided by Amazon (Models) and has been modified by the contributors.

The purpose of this package is to have an easy way of getting started with the Amazon Selling Partner API using C#, you can watch this 📷 Youtube 📣 video for easy start your project


Requirements


Installation NuGet

Install-Package CSharpAmazonSpAPI

Tasks

Seller

Vendor


Keys

To get all keys needed you need to follow this step Creating and configuring IAM policies and entities and then you need to Registering your Application then Authorizing Selling Partner API applications

⚠️ Use role ARN created in step 5 when you register your application: and dont use IAM user

Name Description
AccessKey AWS USER ACCESS KEY
SecretKey AWS USER SECRET KEY
RoleArn AWS IAM Role ARN (needs permission to “Assume Role” STS)
Region Marketplace region List of Marketplaces
ClientId Your amazon app id
ClientSecret Your amazon app secret
RefreshToken Check how to get RefreshToken

For more information about keys please check New Amazon doc for create keys Developer , If you are not registered as developer please Register to be able to create application.


Usage

Configuration

AmazonConnection amazonConnection = new AmazonConnection(new AmazonCredential()
{
     AccessKey = "AKIAXXXXXXXXXXXXXXX",
     SecretKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
     RoleArn = "arn:aws:iam::XXXXXXXXXXXXX:role/XXXXXXXXXXXX",
     ClientId = "amzn1.application-XXX-client.XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
     ClientSecret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
     RefreshToken= "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
     MarketPlace = MarketPlace.UnitedArabEmirates, //MarketPlace.GetMarketPlaceByID("A2VIGQ35RCS4UG") 
});

Order List, For more orders sample please check Here.

ParameterOrderList serachOrderList = new ParameterOrderList();
serachOrderList.CreatedAfter = DateTime.UtcNow.AddMinutes(-600000);
serachOrderList.OrderStatuses = new List<OrderStatuses>();
serachOrderList.OrderStatuses.Add(OrderStatuses.Canceled);
var orders = amazonConnection.Orders.GetOrders(serachOrderList);

Order List with parameter

ParameterOrderList serachOrderList = new ParameterOrderList();
serachOrderList.CreatedAfter = DateTime.UtcNow.AddHours(-24);
serachOrderList.OrderStatuses = new List<OrderStatuses>();
serachOrderList.OrderStatuses.Add(OrderStatuses.Unshipped);
serachOrderList.MarketplaceIds = new List<string> { MarketPlace.UnitedArabEmirates.ID };

var orders = amazonConnection.Orders.GetOrders(serachOrderList);

Order List with parameter including PII data

var parameterOrderList = new ParameterOrderList
        {
            CreatedAfter = DateTime.UtcNow.AddHours(-24),
            OrderStatuses = new List<OrderStatuses> { OrderStatuses.Unshipped },
            MarketplaceIds = new List<string> { MarketPlace.UnitedArabEmirates.ID },
            IsNeedRestrictedDataToken = true,
            RestrictedDataTokenRequest = new CreateRestrictedDataTokenRequest
            {
                restrictedResources = new List<RestrictedResource>
                {
                    new RestrictedResource
                    {
                        method = Method.GET.ToString(),
                        path = ApiUrls.OrdersApiUrls.Orders,
                        dataElements = new List<string> { "buyerInfo", "shippingAddress" }
                    }
                }
            }
        };

var orders = _amazonConnection.Orders.GetOrders(parameterOrderList);

Order List data from Sandbox

AmazonConnection amazonConnection = new AmazonConnection(new AmazonCredential()
{
     AccessKey = "AKIAXXXXXXXXXXXXXXX",
     SecretKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
     RoleArn = "arn:aws:iam::XXXXXXXXXXXXX:role/XXXXXXXXXXXX",
     ClientId = "amzn1.application-XXX-client.XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
     ClientSecret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
     RefreshToken= "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
     Environment=Environments.Sandbox
});

var orders = amazonConnection.Orders.GetOrders
(
     new FikaAmazonAPI.Parameter.Order.ParameterOrderList
     {
         TestCase = Constants.TestCase200
     }
);

Report List, For more report sample please check Here.

var parameters = new ParameterReportList();
parameters.pageSize = 100;
parameters.reportTypes = new List<ReportTypes>();
parameters.reportTypes.Add(ReportTypes.GET_AFN_INVENTORY_DATA);
parameters.marketplaceIds = new List<string>();
parameters.marketplaceIds.Add(MarketPlace.UnitedArabEmirates.ID);
var reports=amazonConnection.Reports.GetReports(parameters);

Custom Report

var parameters = new ParameterCreateReportSpecification();
parameters.reportType = ReportTypes.GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL;
parameters.dataStartTime = DateTime.UtcNow.AddDays(-30);
parameters.dataEndTime = DateTime.UtcNow.AddDays(-10);
parameters.marketplaceIds = new MarketplaceIds();
parameters.marketplaceIds.Add(MarketPlace.UnitedArabEmirates.ID);
parameters.reportOptions = new AmazonSpApiSDK.Models.Reports.ReportOptions();

var report= amazonConnection.Reports.CreateReport(parameters);

Get Report with PII

//use this method automatically know if the report are RDT or not
var data2 = amazonConnection.Reports.CreateReportAndDownloadFile(ReportTypes.GET_EASYSHIP_DOCUMENTS, startDate, null, null);

// OR USE this method to get the document and pass parameter isRestrictedReport = true in case the report will return  PII data

var data = amazonConnection.Reports.GetReportDocument("50039018869997",true);

Report Manager 🚀🧑‍🚀

Easy way to get the report you need and convert the file return from amazon to class or list, this feature only ready for some reports as its will take much times to finish for All report type ....

ReportManager reportManager = new ReportManager(amazonConnection);
var products = reportManager.GetProducts(); //GET_MERCHANT_LISTINGS_ALL_DATA
var inventoryAging = reportManager.GetInventoryAging(); //GET_FBA_INVENTORY_AGED_DATA
var ordersByDate = reportManager.GetOrdersByOrderDate(90); //GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL
var ordersByLastUpdate = reportManager.GetOrdersByLastUpdate(90); //GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL
var settlementOrder = reportManager.GetSettlementOrder(90); //GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2
var returnMFNOrder = reportManager.GetReturnMFNOrder(90); //GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE
var returnFBAOrder = reportManager.GetReturnFBAOrder(90); //GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA
var reimbursementsOrder = reportManager.GetReimbursementsOrder(180); //GET_FBA_REIMBURSEMENTS_DATA
var feedbacks = reportManager.GetFeedbackFromDays(180); //GET_SELLER_FEEDBACK_DATA

Report GET_MERCHANT_LISTINGS_ALL_DATA sample

var parameters = new ParameterCreateReportSpecification();
parameters.reportType = ReportTypes.GET_MERCHANT_LISTINGS_ALL_DATA;

parameters.marketplaceIds = new MarketplaceIds();
parameters.marketplaceIds.Add(MarketPlace.UnitedArabEmirates.ID);

parameters.reportOptions = new FikaAmazonAPI.AmazonSpApiSDK.Models.Reports.ReportOptions();

var reportId = amazonConnection.Reports.CreateReport(parameters);
var filePath = string.Empty;
string ReportDocumentId = string.Empty;

while (string.IsNullOrEmpty(ReportDocumentId))
{
    Thread.Sleep(1000 * 60);
    var reportData = amazonConnection.Reports.GetReport(reportId);
    if (!string.IsNullOrEmpty(reportData.ReportDocumentId))
    {
        filePath = amazonConnection.Reports.GetReportFile(reportData.ReportDocumentId);
        break;
    }
}

//filePath for report

Product GetCatalogItem Version 2022-04-01

var data = await amazonConnection.CatalogItem.GetCatalogItem202204Async(
    new Parameter.CatalogItems.ParameterGetCatalogItem
            {
                ASIN = "B00JK2YANC",
                includedData = new[] { IncludedData.attributes, 
                                       IncludedData.salesRanks,
                                       IncludedData.summaries, 
                                       IncludedData.productTypes, 
                                       IncludedData.relationships, 
                                       IncludedData.dimensions, 
                                       IncludedData.identifiers, 
                                       IncludedData.images }
            });

Product SearchCatalogItems Version 2022-04-01

var data = await amazonConnection.CatalogItem.SearchCatalogItems202204Async(
    new Parameter.CatalogItems.ParameterSearchCatalogItems202204
            {
                keywords = new[] { "vitamin c" },
                includedData = new[] { IncludedData.attributes, 
                                       IncludedData.salesRanks,
                                       IncludedData.summaries, 
                                       IncludedData.productTypes, 
                                       IncludedData.relationships, 
                                       IncludedData.dimensions, 
                                       IncludedData.identifiers, 
                                       IncludedData.images }
            });

Product Pricing, For more Pricing sample please check Here.

var data = amazonConnection.ProductPricing.GetPricing(
    new Parameter.ProductPricing.ParameterGetPricing()
    {
        MarketplaceId = MarketPlace.UnitedArabEmirates.ID,
        Asins = new string[] { "B00CZC5F0G" }
    });

Product Competitive Price

var data = amazonConnection.ProductPricing.GetCompetitivePricing(
    new Parameter.ProductPricing.ParameterGetCompetitivePricing()
    {
        MarketplaceId = MarketPlace.UnitedArabEmirates.ID,
        Asins = new string[] { "B00CZC5F0G" },
    });

Notifications Create Destination, For more Notifications sample please check Here.

//EventBridge
var data = amazonConnection.Notification.CreateDestination(
    new Notifications.CreateDestinationRequest()
    {
        Name = "CompanyName",
        ResourceSpecification = new Notifications.DestinationResourceSpecification()
        {
            EventBridge = new Notifications.EventBridgeResourceSpecification("us-east-2", "999999999")
        }
    });

//SQS
var dataSqs = amazonConnection.Notification.CreateDestination(
    new Notifications.CreateDestinationRequest()
    {
        Name = "CompanyName_AE",
        ResourceSpecification = new Notifications.DestinationResourceSpecification
        {
            Sqs = new Notifications.SqsResource("arn:aws:sqs:us-east-2:9999999999999:NAME")
        }
    });

Notifications Create Subscription, For more Notifications sample please check Here.

//SQS
var result = amazonConnection.Notification.CreateSubscription(
    new ParameterCreateSubscription()
    {
        destinationId = "xxxxxxxxxxxxxxx", // take this from CreateDestination or GetDestinations response 
        notificationType = NotificationType.ANY_OFFER_CHANGED, // or B2B_ANY_OFFER_CHANGED for B2B prices
        payloadVersion = "1.0"
    });

Notifications read messages

var SQS_URL = "https://sqs.us-east-2.amazonaws.com/9999999999999/IUSER_SQS";
ParameterMessageReceiver param = new ParameterMessageReceiver(
                    Environment.GetEnvironmentVariable("AccessKey"), 
                    Environment.GetEnvironmentVariable("SecretKey"), 
                    SQS_URL, Amazon.RegionEndpoint.USEast2);

CustomMessageReceiver messageReceiver = new CustomMessageReceiver();


amazonConnection.Notification.StartReceivingNotificationMessages(param, messageReceiver);
public class CustomMessageReceiver : IMessageReceiver
{
     public void ErrorCatch(Exception ex)
     {
         //Your code here
     }

     public void NewMessageRevicedTriger(NotificationMessageResponce message)
     {
         //Your Code here
     }
}

Feed Submit

Here full sample for submit feed to change price and generate XML and get final report for result same as in doc. Notes: not all feed type finished as it's big work and effort but all classes are partial for easy change and you can generate XML outside and use our library to get data, now we support only submit existing product, change quantity and change price , I list most of XSD here Source\FikaAmazonAPI\ConstructFeed\xsd its will help you easy generate class and add it in your app to generate final feed xml.

Feed Submit for change price

ConstructFeedService createDocument = new ConstructFeedService("{SellerID}", "1.02");

var list = new List<PriceMessage>();
list.Add(new PriceMessage()
{
    SKU = "8201031206122...",
    StandardPrice = new StandardPrice()
    {
        currency = BaseCurrencyCode.AED.ToString(),
        Value = (201.0522M).ToString("0.00")
    }
});
createDocument.AddPriceMessage(list);

var xml = createDocument.GetXML();

var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_PRODUCT_PRICING_DATA);

Thread.Sleep(1000*30);

var feedOutput=amazonConnection.Feed.GetFeed(feedID);

var outPut=amazonConnection.Feed.GetFeedDocument(feedOutput.ResultFeedDocumentId);

var reportOutpit = outPut.Url;

var processingReport = amazonConnection.Feed.GetFeedDocumentProcessingReport(outPut.Url);

Feed Submit for change Quantity

ConstructFeedService createDocument = new ConstructFeedService("{SellerID}", "1.02");

var list = new List<InventoryMessage>();
list.Add(new InventoryMessage()
  {
    SKU = "82010312061.22...",
    Quantity = 2,
    FulfillmentLatency = "11",
 });

createDocument.AddInventoryMessage(list);

var xml = createDocument.GetXML();

var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_INVENTORY_AVAILABILITY_DATA);

Thread.Sleep(1000*30);

var feedOutput=amazonConnection.Feed.GetFeed(feedID);

var outPut=amazonConnection.Feed.GetFeedDocument(feedOutput.ResultFeedDocumentId);

var reportOutpit = outPut.Url;

var processingReport = amazonConnection.Feed.GetFeedDocumentProcessingReport(outPut.Url);

Feed Submit for change ProdcutImage

public void SubmitFeedProductImage()
{
    ConstructFeedService createDocument = new ConstructFeedService("A3J37AJU4O9RHK", "1.02");
    var list = new List<ProductImageMessage>();
    list.Add(new ProductImageMessage()
    {
	SKU = "8201031206122...",
	ImageLocation = "http://xxxx.com/1.jpeg",
	ImageType = ImageType.Main
    }) ;
    createDocument.AddProductImageMessage(list);
    var xml = createDocument.GetXML();

    var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_PRODUCT_IMAGE_DATA);

}

Feed Submit for change FULFILLMENT DATA (add tracking number for shipment)

ConstructFeedService createDocument = new ConstructFeedService("{sellerId}", "1.02");

var list = new List<OrderFulfillmentMessage>();
list.Add(new OrderFulfillmentMessage()
    {
       AmazonOrderID = "{orderId}",
       FulfillmentDate = DateTime.Now.ToString("yyyy-MM-dd'T'HH:mm:ss.fffK"),
       FulfillmentData = new FulfillmentData()
          {
              CarrierName = "Correos Express",
              ShippingMethod = "ePaq",
              ShipperTrackingNumber = "{trackingNumber}"
           }
    });
    createDocument.AddOrderFulfillmentMessage(list);

    var xml = createDocument.GetXML();

    var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_ORDER_FULFILLMENT_DATA);

Feed Submit for change Order Adjustments

public void SubmitFeedOrderAdjustment()
{
            ConstructFeedService createDocument = new ConstructFeedService("A3J37AJU4O9RHK", "1.02");
            var list = new List<OrderAdjustmentMessage>();
            list.Add(new OrderAdjustmentMessage()
            {
                AmazonOrderID = "AMZ1234567890123",
                ActionType = AdjustmentActionType.Refund,
                AdjustedItem = new List<AdjustedItem>() {
                   new AdjustedItem() {
                       AmazonOrderItemCode = "52986411826454",
                       AdjustmentReason = AdjustmentReason.CustomerCancel,
                       DirectPaymentAdjustments = new List<DirectPaymentAdjustments>()
                           {
                               new DirectPaymentAdjustments()
                               {
                                   Component = new List<DirectPaymentAdjustmentsComponent>()
                                   {
                                       new DirectPaymentAdjustmentsComponent() {
                                            DirectPaymentType = "Credit Card Refund",
                                            Amount = new CurrencyAmount() {
                                                Value = 10.50M,
                                                currency = BaseCurrencyCode.GBP
                                            }
                                       }
                                   }
                               }
                           }
                       }
                }
            });
            createDocument.AddOrderAdjustmentMessage(list);
            var xml = createDocument.GetXML();

            var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_PAYMENT_ADJUSTMENT_DATA);
}

Usage Plans and Rate Limits in the Selling Partner API

Please read this doc to get all information about this limitation https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md

we calc waiting time by read x-amzn-RateLimit-Limit header

int sleepTime = (int)((1 / header["x-amzn-RateLimit-Limit"] ) * 1000);

You can also disable libary from handelling limitaion by set IsActiveLimitRate=false in AmazonCredential

var amazonConnection = new AmazonConnection(new AmazonCredential()
{
      .
      .
      IsActiveLimitRate=false
});

Get restrictions before try to add new lists

var result = amazonConnection.Restrictions.GetListingsRestrictions(
    new Parameter.Restrictions.ParameterGetListingsRestrictions
            {
                asin = "AAAAAAAAAA",
                sellerId = "AXXXXXXXXXXXX"
            });

Create shipment operation from MerchantFulfillment

ShipmentRequestDetails shipmentRequestDetails = new ShipmentRequestDetails()
{
    AmazonOrderId = "999-9999-999999",
    ItemList = new ItemList()
    {
        new FikaAmazonAPI.AmazonSpApiSDK.Models.MerchantFulfillment.Item()
        {
		OrderItemId = "52986411826454",
            Quantity = 1
        }

    },
    ShipFromAddress = new Address()
    {
        AddressLine1 = "300 St",
        City = "City",
        PostalCode = "48123",
        Email = "[[email protected]](mailto:[email protected])",
        Phone = "999999999",
        StateOrProvinceCode = "MI",
        CountryCode = "US",
        Name = "FirstName LastName"
    },
    PackageDimensions = new PackageDimensions()
    {
        Height = 10,
        Width = 10,
        Length = 10,
        Unit = UnitOfLength.Inches
    },
    Weight = new Weight()
    {
        Value = 10,
        Unit = UnitOfWeight.Oz
    },
    ShippingServiceOptions = new ShippingServiceOptions()
    {
        DeliveryExperience = DeliveryExperienceType.NoTracking,
        CarrierWillPickUp = false,
        CarrierWillPickUpOption = CarrierWillPickUpOption.ShipperWillDropOff
    }
};

var shipmentRequest = new CreateShipmentRequest(
			shipmentRequestDetails, 
			shippingServiceId: "UPS_PTP_2ND_DAY_AIR", 
			shippingServiceOfferId: "WHgxtyn6qjGGaC");

 var shipmentResponse = amazonConnection.MerchantFulfillment.CreateShipment(shipmentRequest);

ProductTypes SearchDefinitions

var list = amazonConnection.ProductType.SearchDefinitionsProductTypes(
  new Parameter.ProductTypes.SearchDefinitionsProductTypesParameter()
   {
    keywords = new List<string> { String.Empty },
   });

ProductTypes GetDefinitions

var def = amazonConnection.ProductType.GetDefinitionsProductType(
   new Parameter.ProductTypes.GetDefinitionsProductTypeParameter()
    {
     productType = "PRODUCT",
     requirements = RequirementsEnum.LISTING,
     locale = AmazonSpApiSDK.Models.ProductTypes.LocaleEnum.en_US
     });

Sales Performance Sample

     DateTime queryStart = DateTime.UtcNow.AddDays(-11).Date;
     DateTime queryEnd = DateTime.UtcNow;
     var parameters = new ParameterGetOrderMetrics();
     parameters.marketplaceIds = new MarketplaceIds();
     parameters.marketplaceIds.Add(MarketPlace.UnitedArabEmirates.ID);
     parameters.interval = queryStart.ToString("yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture) + "Z--" + queryEnd.ToString("yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture) + "Z";
     parameters.granularity = Constants.GranularityEnum.Day;
     parameters.firstDayOfWeek = Constants.FirstDayOfWeek.monday;

     var sales = amazonConnection.Sales.GetOrderMetrics(parameters);

Q & A

If you have questions, please ask in GitHub discussions

discussions


ToDo

  • Improve documentation

Useful links

Selling Partner API
Amazon MWS to SP-API Migration Guide
SP-API models
Using Postman for Selling Partner API models
Test Project with pure C# code
Sample Code
Creating And Configuring AWS

Contributing

  1. Fork it (https://github.com/abuzuhri/Amazon-SP-API-CSharp/fork)
  2. Clone it (git clone https://github.com/{YOUR_USERNAME}/Amazon-SP-API-CSharp)
  3. Create your feature branch (git checkout -b your_branch_name)
  4. Commit your changes (git commit -m 'Description of a commit')
  5. Push to the branch (git push origin your_branch_name)
  6. Create a new Pull Request

Notes

If you are looking for a complete Feedback solution, you might want to consider giving Soon.se a shot.


Support & Consultation

We offer consultation on everything SP-API related. Book your meeting here:

Book Meeting


Thanks

Thanks go out to everybody who worked on this package.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].