0.0.1 • Published 1 year ago

reseller_api_test v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

reseller_api

ResellerApi - JavaScript client for reseller_api 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. This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 6.0
  • Package version: 6.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install reseller_api --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your reseller_api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

The library is hosted at a git repository, https://github.com/ingrammicro-xvantage/xi-sdk-resellers-node install it via:

    npm install ingrammicro-xvantage/xi-sdk-resellers-node --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var ResellerApi = require('reseller_api');

var defaultClient = ResellerApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: application
var application = defaultClient.authentications['application'];
application.accessToken = "YOUR ACCESS TOKEN"

var api = new ResellerApi.DealsApi()
var iMCustomerNumber = 20-222222; // {String} Your unique Ingram Micro customer number.
var iMCountryCode = US; // {String} Two-character ISO country code.
var iMCorrelationID = fbac82ba-cf0a-4bcf-fc03-0c5084; // {String} Unique transaction number to identify each transaction across all the systems.
var dealId = 12345678; // {String} Unique deal ID.
var opts = {
  'iMSenderID': MyCompany // {String} Unique value used to identify the sender of the transaction. Example: MyCompany
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getResellersV6Dealsdetails(iMCustomerNumber, iMCountryCode, iMCorrelationID, dealId, opts, callback);

Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
ResellerApi.DealsApigetResellersV6DealsdetailsGET /resellers/v6/deals/{dealId}Deals Details
ResellerApi.DealsApigetResellersV6DealssearchGET /resellers/v6/deals/searchDeals Search
ResellerApi.FreightEstimateApipostFreightestimatePOST /resellers/v6/freightestimateFreight Estimate
ResellerApi.InvoicesApigetInvoicedetailsV61GET /resellers/v6.1/invoices/{invoiceNumber}Get Invoice Details v6.1
ResellerApi.InvoicesApigetResellersV6InvoicesearchGET /resellers/v6/invoices/Search your invoice
ResellerApi.InvoicesV4ApipostV4InvoicedetailsPOST /invoices/v4/invoicedetailsGet Invoice Details
ResellerApi.InvoicesV5ApigetInvoicesGET /resellers/v5/invoices/{invoiceNumber}Get Invoice Details
ResellerApi.InvoicesV6ApigetInvoicedetailsV6GET /resellers/v6/invoices/{invoicenumber}Get Invoice Details v6
ResellerApi.OrderStatusApiresellersV1WebhooksOrderstatuseventPostPOST /resellers/v1/webhooks/orderstatuseventOrder Status
ResellerApi.OrdersApideleteOrdercancelDELETE /resellers/v6/orders/{OrderNumber}Cancel your Order
ResellerApi.OrdersApigetOrderdetailsV61GET /resellers/v6.1/orders/{ordernumber}Get Order Details v6.1
ResellerApi.OrdersApigetResellersV6OrdersearchGET /resellers/v6/orders/searchSearch your Orders
ResellerApi.OrdersApipostCreateorderV6POST /resellers/v6/ordersCreate your Order
ResellerApi.OrdersApiputOrdermodifyPUT /resellers/v6/orders/{orderNumber}Modify your Order
ResellerApi.OrdersV4ApipostV4OrdercreatePOST /orders/v4/ordercreateCreate a new Order
ResellerApi.OrdersV4ApipostV4OrderdeletePOST /orders/v4/orderdeleteDelete an Order
ResellerApi.OrdersV4ApipostV4OrderdetailsPOST /orders/v4/orderdetailsGet Order Details
ResellerApi.OrdersV4ApipostV4OrdermodifyPOST /orders/v4/ordermodifyModify an Existing Order
ResellerApi.OrdersV4ApipostV4OrdersearchPOST /orders/v4/orderlookupOrder Search
ResellerApi.OrdersV5ApideleteOrdersOrderNumberDELETE /resellers/v5/Orders/{ordernumber}Cancel an Existing Order
ResellerApi.OrdersV5ApigetOrdersSearchGET /resellers/v5/Orders/searchSearch your Orders
ResellerApi.OrdersV5ApigetV5OrdersDetailsGET /resellers/v5/Orders/{ordernumber}Get Order Details
ResellerApi.OrdersV5ApipostV5OrdersCreatePOST /resellers/v5/OrdersCreate a New Order
ResellerApi.OrdersV6ApigetOrderdetailsV6GET /resellers/v6/orders/{ordernumber}Get Order Details v6
ResellerApi.ProductCatalogApigetResellerV6ProductdetailGET /resellers/v6/catalog/details/{ingramPartNumber}Product Details
ResellerApi.ProductCatalogApigetResellerV6ProductsearchGET /resellers/v6/catalogSearch Products
ResellerApi.ProductCatalogApipostPriceandavailabilityPOST /resellers/v6/catalog/priceandavailabilityPrice and Availability
ResellerApi.ProductCatalogV4ApipostV4MultiskupriceandstockPOST /products/v4/multiskupriceandstockProduct availability for upto 50 SKUs
ResellerApi.ProductCatalogV4ApipostV4ProductsearchPOST /products/v4/productsearchReal-time Product Search
ResellerApi.ProductCatalogV5ApigetV5CatalogProductsearchGET /resellers/v5/CatalogSearch Product Catalog
ResellerApi.ProductCatalogV5ApimultiSKUPriceAndStockPOST /resellers/v5/Catalog/priceandavailabilityFind availability of upto 50 SKUs
ResellerApi.QuoteToOrderApipostQuoteToOrderV6POST /resellers/v6/q2o/ordersQuote To Order
ResellerApi.QuotesApigetQuotessearchV6GET /resellers/v6/quotes/searchQuote Search
ResellerApi.QuotesApigetResellerV6ValidateQuoteGET /resellers/v6/q2o/validatequoteValidate Quote
ResellerApi.QuotesApigetResellersV6QuotesGET /resellers/v6/quotes/{quoteNumber}Get Quote Details
ResellerApi.QuotesV4ApipostV4QuotedetailsPOST /quotes/v1/quotedetailsGet Quote Details
ResellerApi.QuotesV4ApipostV4QuotesearchPOST /quotes/v1/quotesGet Quote List
ResellerApi.QuotesV5ApigetV5QuotesDetailsGET /resellers/v5/quote/{quoteNumber}Get Quote Details
ResellerApi.QuotesV5ApipostV5QuotesSearchPOST /resellers/v5/quote/searchSearch Quotes
ResellerApi.RenewalsApigetResellersV6RenewalsdetailsGET /resellers/v6/renewals/{renewalId}Renewals Details
ResellerApi.RenewalsApipostRenewalssearchPOST /resellers/v6/renewals/searchRenewals Search
ResellerApi.ReturnsApigetResellersV6ReturnsdetailsGET /resellers/v6/returns/{caseRequestNumber}Returns Details
ResellerApi.ReturnsApigetResellersV6ReturnssearchGET /resellers/v6/returns/searchReturns Search
ResellerApi.ReturnsApipostReturnscreatePOST /resellers/v6/returns/createReturns Create
ResellerApi.StockUpdateApiresellersV1WebhooksAvailabilityupdatePostPOST /resellers/v1/webhooks/availabilityupdateStock 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

Author

-Ingram Micro Xvantage

Contact

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