CMS365.EbaySharp 1.0.8

There is a newer version of this package available.
See the version list below for details.
dotnet add package CMS365.EbaySharp --version 1.0.8                
NuGet\Install-Package CMS365.EbaySharp -Version 1.0.8                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CMS365.EbaySharp" Version="1.0.8" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CMS365.EbaySharp --version 1.0.8                
#r "nuget: CMS365.EbaySharp, 1.0.8"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CMS365.EbaySharp as a Cake Addin
#addin nuget:?package=CMS365.EbaySharp&version=1.0.8

// Install CMS365.EbaySharp as a Cake Tool
#tool nuget:?package=CMS365.EbaySharp&version=1.0.8                

EbaySharp: A .NET wrapper library for eBay REST API.

NuGet version GitHub last commit (main) NuGet Downloads Build status License

EbaySharp is a .NET library that enables you to authenticate and make REST API calls to eBay. It's used for creating listings and managing orders using C# and .NET

Installation

EbaySharp is available on NuGet. Use the package manager console in Visual Studio to install it:

Install-Package CMS365.EbaySharp

API support

EbaySharp version eBay REST API version
1.0.X Inventory API 1.17.2
Metadata API v1.7.1
Taxonomy API v1.0.1

EbaySharp currently supports the following Ebay REST APIs:

Access and Security

Create an account here https://developer.ebay.com/my/keys and generate keys for production.

For example: alt text

Navigate to user tokens https://developer.ebay.com/my/auth/?env=production&index=0 and select following options.

alt text

From the same page, generate the ebay redirect URL (called RU)

alt text

Copy the URL of the field "Your branded eBay Production Sign In (OAuth)" and open in a new browser in private mode and also save a copy of the URL for future use. Log in with your store user ID and password and you will be redirected to the following page

alt text

Copy the URL of the thank you page and assign it to a variable called "secureURL" and execute the following function.

public async Task<string> GetRefreshTokenAsync()
{
    string secureURL="replace with the URL of the thank you page";
    EbaySharp.Controllers.IDentityController IDentityController = new EbaySharp.Controllers.IDentityController();
    string refreshToken = await IDentityController.GetRefreshTokenAsync(ReplaceYourClientID, ReplaceYourClientSecret, 
        , secureURL, Replace with RU);
}

This method returns a refresh token which is valID for 18 months. You will need to re run this function after 18 months when refresh token has expired. We will use the refresh token and generate an access token.

IDentityController IDentityController=new IDentityController();
var clientCredentials = await IDentityController.GetClientCredentials(ReplaceYourClientID, ReplaceYourClientSecret, ReplaceWithRefreshToken , ReplaceWithScopes);

This method now gives you ClientCredentialsResponse object which contains an access token.

Using the EbaySharp

Initialize the instance with the access token.

EbayController ebayController = new EbayController(clientCredentials.AccessToken);

Sell

Inventory

You can see a list of Inventory methods here

Listing
Bulk migrate listings

If you have already created your listing using old API (for example .NET C# SDK), you will need to migrate all listing to new REST API. You can find more detail here

BulkMigrateListingRequest bulkMigrateListingRequest = new BulkMigrateListingRequest()
{
    Requests = new BulkMigrateListingRequestItem[]
    {
        new BulkMigrateListingRequestItem(){ListingID = "21432432432" },
        new BulkMigrateListingRequestItem(){ListingID = "78658678678" }
    }
});
EbaySharp.Controllers.EbayController ebayController = new EbaySharp.Controllers.EbayController(clientCredentials.AccessToken);
BulkMigrateListingResponse bulkMigrateListingResponse = await ebayController.BulkMigrateAsync(bulkMigrateListingRequest);

Get inventory items

You can get list of existing items, you need to pass limit (default is 25 and max is 200) and offset (default for first page is 0). You can find more detail here


EbaySharp.Controllers.EbayController ebayController = new EbaySharp.Controllers.EbayController(clientCredentials.AccessToken);
InventoryItemsResponse bulkMigrateListingResponse = await ebayController.GetInventoryItems(limit, offset);

Get inventory item

You can get an item based on a SKU You can find more detail here


EbaySharp.Controllers.EbayController ebayController = new EbaySharp.Controllers.EbayController(clientCredentials.AccessToken);
InventoryItemResponse inventoryItemResponse = await ebayController.GetInventoryItem(SKU);

Delete inventory item

You can delete an item based on a SKU You can find more detail here


EbaySharp.Controllers.EbayController ebayController = new EbaySharp.Controllers.EbayController(clientCredentials.AccessToken);
await ebayController.DeleteInventoryItem(SKU);

Offer
Get offers

You can get offers based on a SKU You can find more detail here


EbaySharp.Controllers.EbayController ebayController = new EbaySharp.Controllers.EbayController(clientCredentials.AccessToken);
OffersResponse offersResponse = await ebayController.GetOffers(SKU);

Metadata

You can see a list of Metadata methods here

Marketplace
Get return policies
ReturnPoliciesResponse returnPoliciesResponse = await ebayController.GetReturnPoliciesAsync("EBAY_US");

You need to pass MarketplaceID, please visit here for supported market places.

Commerce

Taxonomy

You can see a list of Taxonomy methods here

Category Tree
Get default category tree ID
CategoryTreeIDResponse categoryTreeIDResponse = await ebayController.GetDefaultCategoryTreeIDAsync("EBAY_US");

You need to pass MarketplaceID, please visit here for supported market places.

Get category suggestions
CategorySuggestionsResponse categorySuggestionsResponse = await ebayController.GetCategorySuggestionsAsync(15, "I am a table, look for me");

You need to pass a Category Tree ID and the product title you are searching categories for.

Get category tree
CategoryTreeResponse categorySuggestionsResponse = await ebayController.GetCategoryTreeAsync(15);

You need to pass a Category Tree ID.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.1.1 96 10/21/2024
8.1.0 123 8/3/2024
8.0.0.1 93 7/14/2024
8.0.0 79 7/14/2024
6.6.6.1 74 7/14/2024
6.6.6 105 7/8/2024
6.6.5 83 7/2/2024
6.6.4 112 6/27/2024
6.6.3 115 6/6/2024
6.6.2 111 6/4/2024
6.6.1 118 5/26/2024
6.5.1 136 3/22/2024
6.5.0 112 3/1/2024
6.4.0 105 2/17/2024
6.3.0 105 2/14/2024
6.2.1 108 2/2/2024
6.2.0 98 2/2/2024
6.1.0 102 1/29/2024
6.0.1 92 1/27/2024
6.0.0 88 1/26/2024
1.0.10 90 1/25/2024
1.0.9 103 1/23/2024
1.0.8 103 1/22/2024
1.0.7 97 1/22/2024
1.0.6 95 1/22/2024
1.0.5 98 1/22/2024
1.0.4 101 1/19/2024
1.0.3 127 1/14/2024
1.0.2 114 1/13/2024
1.0.1 1,355 1/13/2024