xi.sdk.resellers 1.0.0.1

dotnet add package xi.sdk.resellers --version 1.0.0.1
NuGet\Install-Package xi.sdk.resellers -Version 1.0.0.1
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="xi.sdk.resellers" Version="1.0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add xi.sdk.resellers --version 1.0.0.1
#r "nuget: xi.sdk.resellers, 1.0.0.1"
#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 xi.sdk.resellers as a Cake Addin
#addin nuget:?package=xi.sdk.resellers&version=1.0.0.1

// Install xi.sdk.resellers as a Cake Tool
#tool nuget:?package=xi.sdk.resellers&version=1.0.0.1

xi.sdk.resellers - the C# library for the XI Sdk Resellers

For Resellers. Who are looking to Innovate with Ingram Micro's API SolutionsAutomate your eCommerce with our offering of APIs and Webhooks to create a seamless experience for your customers.

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations

Installation

From NuGet:

dotnet add package xi.sdk.resellers

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using xi.sdk.resellers.Api;
using xi.sdk.resellers.Client;
using xi.sdk.resellers.Model;

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out xi.sdk.resellers.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

Usage

To use the API client with a HTTP proxy, setup a System.Net.WebProxy

Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;

Connections

Each ApiClass (properly the ApiClient inside it) will create an instance of HttpClient. It will use that for the entire lifecycle and dispose it when called the Dispose method.

To better manager the connections it's a common practice to reuse the HttpClient and HttpClientHandler (see here for details). To use your own HttpClient instance just pass it to the ApiClass constructor.

HttpClientHandler yourHandler = new HttpClientHandler();
HttpClient yourHttpClient = new HttpClient(yourHandler);
var api = new YourApiClass(yourHttpClient, yourHandler);

If you want to use an HttpClient and don't have access to the handler, for example in a DI context in Asp.net Core when using IHttpClientFactory.

HttpClient yourHttpClient = new HttpClient();
var api = new YourApiClass(yourHttpClient);

You'll loose some configuration settings, the features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. You need to either manually handle those in your setup of the HttpClient or they won't be available.

Here an example of DI setup in a sample web project:

services.AddHttpClient<YourApiClass>(httpClient =>
   new PetApi(httpClient));

Getting Started

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using xi.sdk.resellers.Api;
using xi.sdk.resellers.Client;
using xi.sdk.resellers.Model;

namespace Example
{
    public class Example
    {
        public static void Main()
        {

            Configuration config = new Configuration();
            config.BasePath = "https://api.ingrammicro.com:443";
            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new AccesstokenApi(httpClient, config, httpClientHandler);
            var grantType = client_credentials;  // string | Keep grant_type as client_credentials only.
            var clientId = "clientId_example";  // string | 
            var clientSecret = "clientSecret_example";  // string | 

            try
            {
                // Accesstoken
                AccesstokenResponse result = apiInstance.GetAccesstoken(grantType, clientId, clientSecret);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling AccesstokenApi.GetAccesstoken: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }

        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.ingrammicro.com:443

Class Method HTTP request Description
AccesstokenApi GetAccesstoken GET /oauth/oauth20/token Accesstoken
DealsApi GetResellersV6Dealsdetails GET /resellers/v6/deals/{dealId} Deals Details
DealsApi GetResellersV6Dealssearch GET /resellers/v6/deals/search Deals Search
FreightEstimateApi PostFreightestimate POST /resellers/v6/freightestimate Freight Estimate
InvoicesApi GetInvoicedetailsV61 GET /resellers/v6.1/invoices/{invoiceNumber} Get Invoice Details v6.1
InvoicesApi GetResellersV6Invoicesearch GET /resellers/v6/invoices Search your invoice
OrderStatusApi ResellersV1WebhooksOrderstatuseventPost POST /resellers/v1/webhooks/orderstatusevent Order Status
OrdersApi DeleteOrdercancel DELETE /resellers/v6/orders/{OrderNumber} Cancel your Order
OrdersApi GetOrderdetailsV61 GET /resellers/v6.1/orders/{ordernumber} Get Order Details v6.1
OrdersApi GetResellersV6Ordersearch GET /resellers/v6/orders/search Search your Orders
OrdersApi PostCreateorderV6 POST /resellers/v6/orders Create your Order
OrdersApi PutOrdermodify PUT /resellers/v6/orders/{orderNumber} Modify your Order
ProductCatalogApi GetResellerV6Productdetail GET /resellers/v6/catalog/details/{ingramPartNumber} Product Details
ProductCatalogApi GetResellerV6Productsearch GET /resellers/v6/catalog Search Products
ProductCatalogApi PostPriceandavailability POST /resellers/v6/catalog/priceandavailability Price and Availability
QuoteToOrderApi PostQuoteToOrderV6 POST /resellers/v6/q2o/orders Quote To Order
QuotesApi GetQuotessearchV6 GET /resellers/v6/quotes/search Quote Search
QuotesApi GetResellerV6ValidateQuote GET /resellers/v6/q2o/validatequote Validate Quote
QuotesApi GetResellersV6Quotes GET /resellers/v6/quotes/{quoteNumber} Get Quote Details
RenewalsApi GetResellersV6Renewalsdetails GET /resellers/v6/renewals/{renewalId} Renewals Details
RenewalsApi PostRenewalssearch POST /resellers/v6/renewals/search Renewals Search
ReturnsApi GetResellersV6Returnsdetails GET /resellers/v6/returns/{caseRequestNumber} Returns Details
ReturnsApi GetResellersV6Returnssearch GET /resellers/v6/returns/search Returns Search
ReturnsApi PostReturnscreate POST /resellers/v6/returns/create Returns Create
StockUpdateApi ResellersV1WebhooksAvailabilityupdatePost POST /resellers/v1/webhooks/availabilityupdate Stock Update

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

application

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
    • write: allows modifying resources
    • read: allows reading resources
    • description:

Author

-Ingram Micro Xvantage

Contact

For any inquiries or support, please feel free to contact us at:

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 is compatible.  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 is compatible.  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
1.0.0.1 166 2/28/2024
0.0.1.2 91 2/27/2024
0.0.1.1 90 2/26/2024
0.0.1 102 2/21/2024
0.0.0.2 90 2/27/2024