For resellers seeking to innovate with Ingram Micro's API solutions, automate your eCommerce experience with our array of API's and webhooks to craft a seamless journey for your customers.
- Json.NET - 13.0.2 or later
- JsonSubTypes - 1.8.0 or later
- System.ComponentModel.Annotations - 5.0.0 or later
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
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;
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.
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;
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));
Quickstart on creating an application can be found here
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);
}
}
}
}
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 | PostCreateorderV7 | POST /resellers/v7/orders | Create your Order v7 |
OrdersApi | PutOrdermodify | PUT /resellers/v6/orders/{orderNumber} | Modify your Order |
ProductCatalogApi | GetResellerV6Productdetail | GET /resellers/v6/catalog/details/{ingramPartNumber} | Product Details |
ProductCatalogApi | GetResellerV6Productdetailcmp | GET /resellers/v6/catalog/details | Product Details |
ProductCatalogApi | GetResellerV6Productsearch | GET /resellers/v6/catalog | Search Products |
ProductCatalogApi | PostPriceandavailability | POST /resellers/v6/catalog/priceandavailability | Price and Availability |
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 |
- Model.AccesstokenResponse
- Model.AvailabilityAsyncNotificationRequest
- Model.AvailabilityAsyncNotificationRequestResourceInner
- Model.AvailabilityAsyncNotificationRequestResourceInnerLinksInner
- Model.DealsDetailsResponse
- Model.DealsDetailsResponseProductsInner
- Model.DealsSearchResponse
- Model.DealsSearchResponseDealsInner
- Model.Error
- Model.ErrorResponse
- Model.ErrorResponseDTO
- Model.ErrorResponseErrorsInner
- Model.ErrorResponseErrorsInnerFieldsInner
- Model.Fields
- Model.FreightRequest
- Model.FreightRequestLinesInner
- Model.FreightRequestShipToAddressInner
- Model.FreightResponse
- Model.FreightResponseFreightEstimateResponse
- Model.FreightResponseFreightEstimateResponseDistributionInner
- Model.FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner
- Model.FreightResponseFreightEstimateResponseLinesInner
- Model.GetAccesstoken400Response
- Model.GetAccesstoken500Response
- Model.GetAccesstoken500ResponseFault
- Model.GetAccesstoken500ResponseFaultDetail
- Model.GetResellerV6ValidateQuote400Response
- Model.GetResellerV6ValidateQuote400ResponseFieldsInner
- Model.InvoiceDetailsv61Response
- Model.InvoiceDetailsv61ResponseBillToInfo
- Model.InvoiceDetailsv61ResponseFxRateInfo
- Model.InvoiceDetailsv61ResponseLinesInner
- Model.InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner
- Model.InvoiceDetailsv61ResponsePaymentTermsInfo
- Model.InvoiceDetailsv61ResponseShipToInfo
- Model.InvoiceDetailsv61ResponseSummary
- Model.InvoiceDetailsv61ResponseSummaryForeignFxTotals
- Model.InvoiceDetailsv61ResponseSummaryLines
- Model.InvoiceDetailsv61ResponseSummaryMiscChargesInner
- Model.InvoiceDetailsv61ResponseSummaryTotals
- Model.InvoiceSearchResponse
- Model.InvoiceSearchResponseInvoicesInner
- Model.OrderCreateRequest
- Model.OrderCreateRequestAdditionalAttributesInner
- Model.OrderCreateRequestEndUserInfo
- Model.OrderCreateRequestLinesInner
- Model.OrderCreateRequestLinesInnerAdditionalAttributesInner
- Model.OrderCreateRequestLinesInnerEndUserInfoInner
- Model.OrderCreateRequestLinesInnerWarrantyInfoInner
- Model.OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner
- Model.OrderCreateRequestResellerInfo
- Model.OrderCreateRequestShipToInfo
- Model.OrderCreateRequestShipmentDetails
- Model.OrderCreateRequestVmf
- Model.OrderCreateResponse
- Model.OrderCreateResponseEndUserInfo
- Model.OrderCreateResponseOrdersInner
- Model.OrderCreateResponseOrdersInnerAdditionalAttributesInner
- Model.OrderCreateResponseOrdersInnerLinesInner
- Model.OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner
- Model.OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner
- Model.OrderCreateResponseOrdersInnerLinksInner
- Model.OrderCreateResponseOrdersInnerMiscellaneousChargesInner
- Model.OrderCreateResponseOrdersInnerRejectedLineItemsInner
- Model.OrderCreateResponseShipToInfo
- Model.OrderCreateV7Request
- Model.OrderCreateV7RequestAdditionalAttributesInner
- Model.OrderCreateV7RequestEndUserInfo
- Model.OrderCreateV7RequestLinesInner
- Model.OrderCreateV7RequestLinesInnerAdditionalAttributesInner
- Model.OrderCreateV7RequestLinesInnerEndUserInfoInner
- Model.OrderCreateV7RequestLinesInnerVmfAdditionalAttributesLinesInner
- Model.OrderCreateV7RequestResellerInfo
- Model.OrderCreateV7RequestShipToInfo
- Model.OrderCreateV7RequestShipmentDetails
- Model.OrderCreateV7RequestVmfAdditionalAttributesInner
- Model.OrderCreateV7Response
- Model.OrderCreateV7Response201
- Model.OrderCreateV7ResponseResource
- Model.OrderCreateV7ResponseResourceOrdersInner
- Model.OrderCreateV7ResponseResourceOrdersInnerLinesInner
- Model.OrderCreateV7ResponseResourceOrdersInnerLinesInnerShipmentDetailsInner
- Model.OrderCreateV7ResponseResourceShipToInfo
- Model.OrderDetailB2B
- Model.OrderDetailB2BAdditionalAttributesInner
- Model.OrderDetailB2BBillToInfo
- Model.OrderDetailB2BEndUserInfo
- Model.OrderDetailB2BLinesInner
- Model.OrderDetailB2BLinesInnerAdditionalAttributesInner
- Model.OrderDetailB2BLinesInnerEstimatedDatesInner
- Model.OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery
- Model.OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange
- Model.OrderDetailB2BLinesInnerEstimatedDatesInnerShip
- Model.OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange
- Model.OrderDetailB2BLinesInnerLinksInner
- Model.OrderDetailB2BLinesInnerMultipleShipmentsInner
- Model.OrderDetailB2BLinesInnerScheduleLinesInner
- Model.OrderDetailB2BLinesInnerServiceContractInfo
- Model.OrderDetailB2BLinesInnerServiceContractInfoContractInfo
- Model.OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo
- Model.OrderDetailB2BLinesInnerServiceContractInfoSubscriptions
- Model.OrderDetailB2BLinesInnerShipmentDetailsInner
- Model.OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner
- Model.OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner
- Model.OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner
- Model.OrderDetailB2BMiscellaneousChargesInner
- Model.OrderDetailB2BShipToInfo
- Model.OrderModifyRequest
- Model.OrderModifyRequestAdditionalAttributesInner
- Model.OrderModifyRequestLinesInner
- Model.OrderModifyRequestShipToInfo
- Model.OrderModifyResponse
- Model.OrderModifyResponseLinesInner
- Model.OrderModifyResponseLinesInnerAdditionalAttributesInner
- Model.OrderModifyResponseLinesInnerShipmentDetails
- Model.OrderModifyResponseRejectedLineItemsInner
- Model.OrderModifyResponseShipToInfo
- Model.OrderSearchResponse
- Model.OrderSearchResponseOrdersInner
- Model.OrderSearchResponseOrdersInnerLinks
- Model.OrderSearchResponseOrdersInnerSubOrdersInner
- Model.OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner
- Model.OrderStatusAsyncNotificationRequest
- Model.OrderStatusAsyncNotificationRequestResourceInner
- Model.OrderStatusAsyncNotificationRequestResourceInnerLinesInner
- Model.OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner
- Model.OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner
- Model.OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner
- Model.OrderStatusAsyncNotificationRequestResourceInnerLinksInner
- Model.PostCreateorderV7400Response
- Model.PostCreateorderV7400ResponseFieldsInner
- Model.PostCreateorderV7500Response
- Model.PostRenewalssearch400Response
- Model.PriceAndAvailabilityRequest
- Model.PriceAndAvailabilityRequestAdditionalAttributesInner
- Model.PriceAndAvailabilityRequestAvailabilityByWarehouseInner
- Model.PriceAndAvailabilityRequestProductsInner
- Model.PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner
- Model.PriceAndAvailabilityResponseInner
- Model.PriceAndAvailabilityResponseInnerAvailability
- Model.PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner
- Model.PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner
- Model.PriceAndAvailabilityResponseInnerDiscountsInner
- Model.PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner
- Model.PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner
- Model.PriceAndAvailabilityResponseInnerPricing
- Model.PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner
- Model.PriceAndAvailabilityResponseInnerServiceFeesInner
- Model.PriceAndAvailabilityResponseInnerSubscriptionPriceInner
- Model.PriceAndAvailabilityResponseInnerSubscriptionPriceInnerBillingPeriod
- Model.PriceAndAvailabilityResponseInnerSubscriptionPriceInnerGroupsInner
- Model.PriceAndAvailabilityResponseInnerSubscriptionPriceInnerOptionsInner
- Model.PriceAndAvailabilityResponseInnerSubscriptionPriceInnerOptionsInnerDiscountsInner
- Model.PriceAndAvailabilityResponseInnerSubscriptionPriceInnerOptionsInnerDiscountsInnerSpecialPricingInner
- Model.PriceAndAvailabilityResponseInnerSubscriptionPriceInnerOptionsInnerDiscountsInnerVolumeDiscountsInner
- Model.PriceAndAvailabilityResponseInnerSubscriptionPriceInnerOptionsInnerFeesInner
- Model.PriceAndAvailabilityResponseInnerSubscriptionPriceInnerOptionsInnerResourcePricingInner
- Model.PriceAndAvailabilityResponseInnerSubscriptionPriceInnerSubscriptionPeriodInner
- Model.ProductDetailResponse
- Model.ProductDetailResponseAdditionalInformation
- Model.ProductDetailResponseAdditionalInformationProductWeightInner
- Model.ProductDetailResponseCiscoFields
- Model.ProductDetailResponseIndicators
- Model.ProductDetailResponseSubscriptionDetailsInner
- Model.ProductDetailResponseSubscriptionDetailsInnerBillingPeriod
- Model.ProductDetailResponseSubscriptionDetailsInnerGroupsInner
- Model.ProductDetailResponseSubscriptionDetailsInnerOptionsInner
- Model.ProductDetailResponseSubscriptionDetailsInnerSubscriptionPeriodInner
- Model.ProductSearchResponse
- Model.ProductSearchResponseCatalogInner
- Model.ProductSearchResponseCatalogInnerLinksInner
- Model.ProductSearchResponseSubscriptionCatalogInner
- Model.ProductSearchResponseSubscriptionCatalogInnerPlansInner
- Model.ProductSearchResponseSubscriptionCatalogInnerPlansInnerLinksInner
- Model.ProductSearchResponseSubscriptionCatalogInnerPlansInnerSubscriptionPeriodSummaryInner
- Model.QuoteDetailsResponse
- Model.QuoteDetailsResponseAdditionalAttributesInner
- Model.QuoteDetailsResponseEndUserInfo
- Model.QuoteDetailsResponseProductsInner
- Model.QuoteDetailsResponseProductsInnerBillDetailsInner
- Model.QuoteDetailsResponseProductsInnerPrice
- Model.QuoteDetailsResponseProductsInnerPriceDiscountsInner
- Model.QuoteDetailsResponseProductsInnerPriceExtraFeesDetailsInner
- Model.QuoteDetailsResponseResellerInfo
- Model.QuoteDetailsResponseShippingInfo
- Model.QuoteSearchResponse
- Model.QuoteSearchResponseQuotesInner
- Model.QuoteSearchResponseQuotesInnerLinks
- Model.RenewalsDetailsResponse
- Model.RenewalsDetailsResponseAdditionalAttributesInner
- Model.RenewalsDetailsResponseEndUserInfo
- Model.RenewalsDetailsResponseProductsInner
- Model.RenewalsDetailsResponseReferenceNumber
- Model.RenewalsSearchRequest
- Model.RenewalsSearchRequestDateType
- Model.RenewalsSearchRequestDateTypeEndDate
- Model.RenewalsSearchRequestDateTypeExpirationDate
- Model.RenewalsSearchRequestDateTypeInvoiceDate
- Model.RenewalsSearchRequestDateTypeStartDate
- Model.RenewalsSearchRequestStatus
- Model.RenewalsSearchRequestStatusOpporutinyStatus
- Model.RenewalsSearchResponse
- Model.RenewalsSearchResponseRenewalsInner
- Model.RenewalsSearchResponseRenewalsInnerLinksInner
- Model.ReturnsCreateRequest
- Model.ReturnsCreateRequestListInner
- Model.ReturnsCreateRequestListInnerShipFromInfoInner
- Model.ReturnsCreateResponse
- Model.ReturnsCreateResponseReturnsClaimsInner
- Model.ReturnsDetailsResponse
- Model.ReturnsDetailsResponseProductsInner
- Model.ReturnsSearchResponse
- Model.ReturnsSearchResponseReturnsClaimsInner
- Model.ReturnsSearchResponseReturnsClaimsInnerLinksInner
- Model.ValidateQuoteResponse
- Model.ValidateQuoteResponseLinesInner
- Model.ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner
- Model.ValidateQuoteResponseVmfAdditionalAttributesInner
Authentication schemes defined for the API:
- Type: OAuth
- Flow: application
- Authorization URL: https://api.ingrammicro.com:443/oauth/oauth20/token?grant_type=client_credentials&client_id={ClientId}&client_secret={clientSecret}
- Method: Get
- Scopes:
- write: allows modifying resources
- read: allows reading resources
For any inquiries or support, please feel free to contact us at:
- Email: xi_support@ingrammicro.com