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.
To install the package use:
go get -u github.com/ingrammicro-xvantage/xi-sdk-resellers-go
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import xi_sdk_resellers "github.com/ingrammicro-xvantage/xi-sdk-resellers-go"
To use a proxy, set the environment variable `HTTP_PROXY`:
```go
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value xi_sdk_resellers.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), xi_sdk_resellers.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value xi_sdk_resellers.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), xi_sdk_resellers.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using xi_sdk_resellers.ContextOperationServerIndices
and xi_sdk_resellers.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), xi_sdk_resellers.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), xi_sdk_resellers.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
Quickstart on creating an application can be found here
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 | 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 |
- AccesstokenResponse
- AsyncOrderCreateDTO
- AsyncOrderCreateDTOAdditionalAttributesInner
- AsyncOrderCreateDTOEndUserInfo
- AsyncOrderCreateDTOLinesInner
- AsyncOrderCreateDTOLinesInnerEndUserInfoInner
- AsyncOrderCreateDTOResellerInfo
- AsyncOrderCreateDTOShipToInfo
- AsyncOrderCreateDTOShipmentDetails
- AsyncOrderCreateDTOVmfadditionalAttributesInner
- AsyncOrderCreateDTOWarrantyInfoInner
- AsyncOrderCreateDTOWarrantyInfoInnerSerialInfoInner
- AsyncOrderCreateDTOWarrantyInfoInnerVmfAdditionalAttributesLinesInner
- AsyncOrderCreateResponse
- AvailabilityAsyncNotificationRequest
- AvailabilityAsyncNotificationRequestResourceInner
- AvailabilityAsyncNotificationRequestResourceInnerLinksInner
- DealsDetailsResponse
- DealsDetailsResponseProductsInner
- DealsSearchResponse
- DealsSearchResponseDealsInner
- Error
- ErrorResponse
- ErrorResponseDTO
- ErrorResponseErrorsInner
- ErrorResponseErrorsInnerFieldsInner
- Fields
- FreightRequest
- FreightRequestLinesInner
- FreightRequestShipToAddressInner
- FreightResponse
- FreightResponseFreightEstimateResponse
- FreightResponseFreightEstimateResponseDistributionInner
- FreightResponseFreightEstimateResponseDistributionInnerCarrierListInner
- FreightResponseFreightEstimateResponseLinesInner
- GetAccesstoken400Response
- GetAccesstoken500Response
- GetAccesstoken500ResponseFault
- GetAccesstoken500ResponseFaultDetail
- GetResellerV6ValidateQuote400Response
- GetResellerV6ValidateQuote400ResponseFieldsInner
- InvoiceDetailsv61Response
- InvoiceDetailsv61ResponseBillToInfo
- InvoiceDetailsv61ResponseFxRateInfo
- InvoiceDetailsv61ResponseLinesInner
- InvoiceDetailsv61ResponseLinesInnerSerialNumbersInner
- InvoiceDetailsv61ResponsePaymentTermsInfo
- InvoiceDetailsv61ResponseShipToInfo
- InvoiceDetailsv61ResponseSummary
- InvoiceDetailsv61ResponseSummaryForeignFxTotals
- InvoiceDetailsv61ResponseSummaryLines
- InvoiceDetailsv61ResponseSummaryMiscChargesInner
- InvoiceDetailsv61ResponseSummaryTotals
- InvoiceSearchResponse
- InvoiceSearchResponseInvoicesInner
- OrderCreateRequest
- OrderCreateRequestAdditionalAttributesInner
- OrderCreateRequestEndUserInfo
- OrderCreateRequestLinesInner
- OrderCreateRequestLinesInnerAdditionalAttributesInner
- OrderCreateRequestLinesInnerEndUserInfoInner
- OrderCreateRequestLinesInnerWarrantyInfoInner
- OrderCreateRequestLinesInnerWarrantyInfoInnerSerialInfoInner
- OrderCreateRequestResellerInfo
- OrderCreateRequestShipToInfo
- OrderCreateRequestShipmentDetails
- OrderCreateRequestVmf
- OrderCreateResponse
- OrderCreateResponseEndUserInfo
- OrderCreateResponseOrdersInner
- OrderCreateResponseOrdersInnerAdditionalAttributesInner
- OrderCreateResponseOrdersInnerLinesInner
- OrderCreateResponseOrdersInnerLinesInnerAdditionalAttributesInner
- OrderCreateResponseOrdersInnerLinesInnerShipmentDetailsInner
- OrderCreateResponseOrdersInnerLinksInner
- OrderCreateResponseOrdersInnerMiscellaneousChargesInner
- OrderCreateResponseOrdersInnerRejectedLineItemsInner
- OrderCreateResponseShipToInfo
- OrderDetailB2B
- OrderDetailB2BAdditionalAttributesInner
- OrderDetailB2BBillToInfo
- OrderDetailB2BEndUserInfo
- OrderDetailB2BLinesInner
- OrderDetailB2BLinesInnerAdditionalAttributesInner
- OrderDetailB2BLinesInnerEstimatedDatesInner
- OrderDetailB2BLinesInnerEstimatedDatesInnerDelivery
- OrderDetailB2BLinesInnerEstimatedDatesInnerDeliveryDeliveryDateRange
- OrderDetailB2BLinesInnerEstimatedDatesInnerShip
- OrderDetailB2BLinesInnerEstimatedDatesInnerShipShipDateRange
- OrderDetailB2BLinesInnerLinksInner
- OrderDetailB2BLinesInnerMultipleShipmentsInner
- OrderDetailB2BLinesInnerScheduleLinesInner
- OrderDetailB2BLinesInnerServiceContractInfo
- OrderDetailB2BLinesInnerServiceContractInfoContractInfo
- OrderDetailB2BLinesInnerServiceContractInfoLicenseInfo
- OrderDetailB2BLinesInnerServiceContractInfoSubscriptions
- OrderDetailB2BLinesInnerShipmentDetailsInner
- OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInner
- OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInner
- OrderDetailB2BLinesInnerShipmentDetailsInnerCarrierDetailsInnerTrackingDetailsInnerSerialNumbersInner
- OrderDetailB2BMiscellaneousChargesInner
- OrderDetailB2BShipToInfo
- OrderModifyRequest
- OrderModifyRequestAdditionalAttributesInner
- OrderModifyRequestLinesInner
- OrderModifyRequestShipToInfo
- OrderModifyResponse
- OrderModifyResponseLinesInner
- OrderModifyResponseLinesInnerAdditionalAttributesInner
- OrderModifyResponseLinesInnerShipmentDetails
- OrderModifyResponseRejectedLineItemsInner
- OrderModifyResponseShipToInfo
- OrderSearchResponse
- OrderSearchResponseOrdersInner
- OrderSearchResponseOrdersInnerLinks
- OrderSearchResponseOrdersInnerSubOrdersInner
- OrderSearchResponseOrdersInnerSubOrdersInnerLinksInner
- OrderStatusAsyncNotificationRequest
- OrderStatusAsyncNotificationRequestResourceInner
- OrderStatusAsyncNotificationRequestResourceInnerLinesInner
- OrderStatusAsyncNotificationRequestResourceInnerLinesInnerSerialNumberDetailsInner
- OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInner
- OrderStatusAsyncNotificationRequestResourceInnerLinesInnerShipmentDetailsInnerPackageDetailsInner
- OrderStatusAsyncNotificationRequestResourceInnerLinksInner
- PostCreateorderV7400Response
- PostCreateorderV7400ResponseFieldsInner
- PostCreateorderV7500Response
- PostRenewalssearch400Response
- PriceAndAvailabilityRequest
- PriceAndAvailabilityRequestAdditionalAttributesInner
- PriceAndAvailabilityRequestAvailabilityByWarehouseInner
- PriceAndAvailabilityRequestProductsInner
- PriceAndAvailabilityRequestProductsInnerAdditionalAttributesInner
- PriceAndAvailabilityResponseInner
- PriceAndAvailabilityResponseInnerAvailability
- PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInner
- PriceAndAvailabilityResponseInnerAvailabilityAvailabilityByWarehouseInnerBackOrderInfoInner
- PriceAndAvailabilityResponseInnerDiscountsInner
- PriceAndAvailabilityResponseInnerDiscountsInnerQuantityDiscountsInner
- PriceAndAvailabilityResponseInnerDiscountsInnerSpecialPricingInner
- PriceAndAvailabilityResponseInnerPricing
- PriceAndAvailabilityResponseInnerReserveInventoryDetailsInner
- PriceAndAvailabilityResponseInnerServiceFeesInner
- ProductDetailResponse
- ProductDetailResponseAdditionalInformation
- ProductDetailResponseAdditionalInformationProductWeightInner
- ProductDetailResponseCiscoFields
- ProductDetailResponseIndicators
- ProductDetailResponseTechnicalSpecificationsInner
- ProductSearchResponse
- ProductSearchResponseCatalogInner
- ProductSearchResponseCatalogInnerLinksInner
- QuoteDetailsResponse
- QuoteDetailsResponseAdditionalAttributesInner
- QuoteDetailsResponseEndUserInfo
- QuoteDetailsResponseProductsInner
- QuoteDetailsResponseProductsInnerBillDetailsInner
- QuoteDetailsResponseProductsInnerPrice
- QuoteDetailsResponseProductsInnerPriceDiscountsInner
- QuoteDetailsResponseProductsInnerPriceExtraFeesDetailsInner
- QuoteDetailsResponseResellerInfo
- QuoteDetailsResponseShippingInfo
- QuoteSearchResponse
- QuoteSearchResponseQuotesInner
- QuoteSearchResponseQuotesInnerLinks
- RenewalsDetailsResponse
- RenewalsDetailsResponseAdditionalAttributesInner
- RenewalsDetailsResponseEndUserInfo
- RenewalsDetailsResponseProductsInner
- RenewalsDetailsResponseReferenceNumber
- RenewalsSearchRequest
- RenewalsSearchRequestDateType
- RenewalsSearchRequestDateTypeEndDate
- RenewalsSearchRequestDateTypeExpirationDate
- RenewalsSearchRequestDateTypeInvoiceDate
- RenewalsSearchRequestDateTypeStartDate
- RenewalsSearchRequestStatus
- RenewalsSearchRequestStatusOpporutinyStatus
- RenewalsSearchResponse
- RenewalsSearchResponseRenewalsInner
- RenewalsSearchResponseRenewalsInnerLinksInner
- ReturnsCreateRequest
- ReturnsCreateRequestListInner
- ReturnsCreateRequestListInnerShipFromInfoInner
- ReturnsCreateResponse
- ReturnsCreateResponseReturnsClaimsInner
- ReturnsDetailsResponse
- ReturnsDetailsResponseProductsInner
- ReturnsSearchResponse
- ReturnsSearchResponseReturnsClaimsInner
- ReturnsSearchResponseReturnsClaimsInnerLinksInner
- ValidateQuoteResponse
- ValidateQuoteResponseLinesInner
- ValidateQuoteResponseLinesInnerVmfAdditionalAttributesLinesInner
- ValidateQuoteResponseVmfAdditionalAttributesInner
Authentication schemes defined for the API:
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes:
- write: allows modifying resources
- read: allows reading resources
- description:
Example
auth := context.WithValue(context.Background(), xi_sdk_resellers.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
import "golang.org/x/oauth2"
/* Perform OAuth2 round trip request and obtain a token */
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, xi_sdk_resellers.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime
For any inquiries or support, please feel free to contact us at: