Skip to content

JavaScript SDK autogenerated from swagger spec using the Swagger-CodeGen project

Notifications You must be signed in to change notification settings

crhistianramirez/OrderCloud-JavaScript-SDK

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OrderCloud

OrderCloud - JavaScript SDK for OrderCloud

OrderCloud.io is a cloud-hosted B2B eCommerce platform exposed entirely via a RESTful API. When combined with our extensive library of components, SDKs, and deployment tools, it enables rapid development of custom, secure, and scalable B2B eCommerce solutions. Spin up a fully functional B2B app in minutes, and customize it to limits of your imagination.

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0
  • Package version: 3.6.9
  • Build date: 2020-02-29T13:21:33.495-06:00

For more information, please visit https://developer.ordercloud.io/documentation/

Installation

npm

npm install ordercloud-javascript-sdk --save

Authentication

We'll need to get a token before we can make any API calls. The platform offers four different auth workflows all found under the Auth class.

We'll use the password-grant type for this example.

var OrderCloud = require('ordercloud-javascript-sdk')
var defaultClient = OrderCloud.Sdk.instance;

var username = 'YOUR_USERNAME'; //username of the user logging in
var password = 'YOUR_PASSWORD'; //password of the user logging in
var clientID = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; //clientID of the application the user is logging in to ([sign up for free](https://developer.ordercloud.io/account)
var scope = ['FullAccess']; //string array of roles the application has access to ([more info](https://developer.ordercloud.io/documentation/platform-guides/authentication/security-profiles)) 

return OrderCloud.Auth.Login(username, password, clientID, scope)
  .then(response => {
    //store token, now any subsequent calls will automatically set this token in the headers for you
    defaultClient.authentications['oauth2'].accessToken = token;
  })
  .catch(err => console.log(err));

Example

After following the authentication instructions we can make any API call very easily.

Let's get the currently authenticated user's details with a Me.Get()

return OrderCloudSDK.Me.Get()
  .then(user => console.log("This user's name is " + user.FirstName + " " + user.LastName))

Filtering

All of the filtering options you love from the API are available through the SDK as well. Simply pass in a key/value pair to the filters object on list calls where the key is any top-level API model or a custom indexed xp value and the value is the value you'd like to filter on.

Let's run through a couple scenarios and what the call will look like with the SDK:

My products where xp.Featured is true

return OrderCloudSDK.Me.ListProducts({filters: {'xp.Featured': true})
  .then(productList => console.log(productList));

My orders submitted after April 20th, 2018

return OrderCloudSDK.Me.ListOrders( {filters: {DateSubmitted: '>2018-04-20'}})
  .then(orderList => console.log(orderList))

Users with the last name starting with Smith:

return OrderCloudSDK.Users.List('my-mock-buyerid', {filters: {LastName: 'Smith*'})
  .then(userList => console.log(userList));

Users with the last name starting with Smith or users with the last name ending with Jones

return OrderCloudSDK.Users.List('my-mock-buyerid', {filters: {LastName: 'Smith*|*Jones'}})
  .then(userList => console.log(userList));

Products where xp.Color is not red and not blue

return OrderCloudSDK.Products.List({filters: {'xp.Color': ['!red', '!blue']}});

And of course you can mix and match filters to your heart's content.

Impersonation

Impersonation allows a seller user to make an api call on behalf of another user. The SDK enables this in two different ways, both tackling different use cases.

The first method we'll talk about is best suited when you need to toggle between just two users during a session. You'll simply get an impersonation token, set it and then use the As() method to flag the SDK that you want to use the impersonated token.

var OrderCloudSDK = require('ordercloud-javascript-sdk')
var defaultClient = OrderCloud.Sdk.instance;

// set regular token
var myToken = 'YOUR_TOKEN';
defaultClient.authentications['oauth2'].accessToken = myToken;

// set impersonation token
var myImpersonationToken = 'YOUR_IMPERSONATED_TOKEN'
defaultClient.authentications['oauth2'].impersonationToken = myImpersonationToken;

// Get products for regular user
OrderCloudSDK.As().Me.ListProducts()
  .then(productList => console.log(productList))


// Get products for the impersonated user
OrderCloudSDK.As().Me.ListProducts()
  .then(impersonatedProductList => console.log(impersonatedProductList))

As you can see this method makes it very easy to toggle between impersonated calls and non-impersonated calls. But what if you have more than two tokens to toggle between? To address that scenario we recommend using the optional accessToken parameter available on all calls.

var OrderCloud = require('ordercloud-javascript-sdk')
var token1 = 'USER1_TOKEN';
var token2 = 'USER2_TOKEN';
var token3 = 'USER3_TOKEN';

// Get products for user 1
OrderCloudSDK.Me.ListProducts(null, token1)
  .then(user1ProductList => console.log(user1ProductList))

// Get products for user 2
OrderCloudSDK.Me.ListProducts(null, token2)
  .then(user2ProductList => console.log(user2ProductList))

// Get products for user 3
OrderCloudSDK.Me.ListProducts(null, token3)
  .then(user3ProductList => console.log(user3ProductList))

Please note that the accessToken parameter will always be the last parameter.

Typescript Support

This package is fully compatible with typescript and comes bundles with its own definition files. Using this with typescript couldn't be easier!

Further Reading

You should now have enough information to get started building on our platform! The platform guides[https://developer.ordercloud.io/documentation/platform-guides] and API reference should be your go-to guide for working with the API.

Documentation for API Endpoints

All URIs are relative to https://api.ordercloud.io/v1

Class Method HTTP request Description
OrderCloud.Addresses Create POST /buyers/{buyerID}/addresses
OrderCloud.Addresses Delete DELETE /buyers/{buyerID}/addresses/{addressID}
OrderCloud.Addresses DeleteAssignment DELETE /buyers/{buyerID}/addresses/{addressID}/assignments
OrderCloud.Addresses Get GET /buyers/{buyerID}/addresses/{addressID}
OrderCloud.Addresses List GET /buyers/{buyerID}/addresses
OrderCloud.Addresses ListAssignments GET /buyers/{buyerID}/addresses/assignments
OrderCloud.Addresses Patch PATCH /buyers/{buyerID}/addresses/{addressID}
OrderCloud.Addresses Save PUT /buyers/{buyerID}/addresses/{addressID}
OrderCloud.Addresses SaveAssignment POST /buyers/{buyerID}/addresses/assignments
OrderCloud.AdminAddresses Create POST /addresses
OrderCloud.AdminAddresses Delete DELETE /addresses/{addressID}
OrderCloud.AdminAddresses Get GET /addresses/{addressID}
OrderCloud.AdminAddresses List GET /addresses
OrderCloud.AdminAddresses Patch PATCH /addresses/{addressID}
OrderCloud.AdminAddresses Save PUT /addresses/{addressID}
OrderCloud.AdminUsers Create POST /adminusers
OrderCloud.AdminUsers Delete DELETE /adminusers/{userID}
OrderCloud.AdminUsers Get GET /adminusers/{userID}
OrderCloud.AdminUsers List GET /adminusers
OrderCloud.AdminUsers Patch PATCH /adminusers/{userID}
OrderCloud.AdminUsers Save PUT /adminusers/{userID}
OrderCloud.AdminUserGroups Create POST /usergroups
OrderCloud.AdminUserGroups Delete DELETE /usergroups/{userGroupID}
OrderCloud.AdminUserGroups DeleteUserAssignment DELETE /usergroups/{userGroupID}/assignments/{userID}
OrderCloud.AdminUserGroups Get GET /usergroups/{userGroupID}
OrderCloud.AdminUserGroups List GET /usergroups
OrderCloud.AdminUserGroups ListUserAssignments GET /usergroups/assignments
OrderCloud.AdminUserGroups Patch PATCH /usergroups/{userGroupID}
OrderCloud.AdminUserGroups Save PUT /usergroups/{userGroupID}
OrderCloud.AdminUserGroups SaveUserAssignment POST /usergroups/assignments
OrderCloud.ApiClients Create POST /apiclients
OrderCloud.ApiClients Delete DELETE /apiclients/{apiClientID}
OrderCloud.ApiClients DeleteBuyerAssignment DELETE /buyers/{buyerID}/ApiClients/Assignments/{apiClientID}
OrderCloud.ApiClients DeleteSupplierAssignment DELETE /suppliers/{supplierID}/ApiClients/Assignments/{apiClientID}
OrderCloud.ApiClients Get GET /apiclients/{apiClientID}
OrderCloud.ApiClients List GET /apiclients
OrderCloud.ApiClients ListAssignments GET /apiclients/assignments
OrderCloud.ApiClients Patch PATCH /apiclients/{apiClientID}
OrderCloud.ApiClients Save PUT /apiclients/{apiClientID}
OrderCloud.ApiClients SaveAssignment POST /apiclients/assignments
OrderCloud.ApprovalRules Create POST /buyers/{buyerID}/approvalrules
OrderCloud.ApprovalRules Delete DELETE /buyers/{buyerID}/approvalrules/{approvalRuleID}
OrderCloud.ApprovalRules Get GET /buyers/{buyerID}/approvalrules/{approvalRuleID}
OrderCloud.ApprovalRules List GET /buyers/{buyerID}/approvalrules
OrderCloud.ApprovalRules Patch PATCH /buyers/{buyerID}/approvalrules/{approvalRuleID}
OrderCloud.ApprovalRules Save PUT /buyers/{buyerID}/approvalrules/{approvalRuleID}
OrderCloud.Buyers Create POST /buyers
OrderCloud.Buyers Delete DELETE /buyers/{buyerID}
OrderCloud.Buyers Get GET /buyers/{buyerID}
OrderCloud.Buyers List GET /buyers
OrderCloud.Buyers Patch PATCH /buyers/{buyerID}
OrderCloud.Buyers Save PUT /buyers/{buyerID}
OrderCloud.Catalogs Create POST /catalogs
OrderCloud.Catalogs Delete DELETE /catalogs/{catalogID}
OrderCloud.Catalogs DeleteAssignment DELETE /catalogs/{catalogID}/assignments
OrderCloud.Catalogs DeleteProductAssignment DELETE /catalogs/{catalogID}/productassignments/{productID}
OrderCloud.Catalogs Get GET /catalogs/{catalogID}
OrderCloud.Catalogs List GET /catalogs
OrderCloud.Catalogs ListAssignments GET /catalogs/assignments
OrderCloud.Catalogs ListProductAssignments GET /catalogs/productassignments
OrderCloud.Catalogs Patch PATCH /catalogs/{catalogID}
OrderCloud.Catalogs Save PUT /catalogs/{catalogID}
OrderCloud.Catalogs SaveAssignment POST /catalogs/assignments
OrderCloud.Catalogs SaveProductAssignment POST /catalogs/productassignments
OrderCloud.Categories Create POST /catalogs/{catalogID}/categories
OrderCloud.Categories Delete DELETE /catalogs/{catalogID}/categories/{categoryID}
OrderCloud.Categories DeleteAssignment DELETE /catalogs/{catalogID}/categories/{categoryID}/assignments
OrderCloud.Categories DeleteProductAssignment DELETE /catalogs/{catalogID}/categories/{categoryID}/productassignments/{productID}
OrderCloud.Categories Get GET /catalogs/{catalogID}/categories/{categoryID}
OrderCloud.Categories List GET /catalogs/{catalogID}/categories
OrderCloud.Categories ListAssignments GET /catalogs/{catalogID}/categories/assignments
OrderCloud.Categories ListProductAssignments GET /catalogs/{catalogID}/categories/productassignments
OrderCloud.Categories Patch PATCH /catalogs/{catalogID}/categories/{categoryID}
OrderCloud.Categories Save PUT /catalogs/{catalogID}/categories/{categoryID}
OrderCloud.Categories SaveAssignment POST /catalogs/{catalogID}/categories/assignments
OrderCloud.Categories SaveProductAssignment POST /catalogs/{catalogID}/categories/productassignments
OrderCloud.CostCenters Create POST /buyers/{buyerID}/costcenters
OrderCloud.CostCenters Delete DELETE /buyers/{buyerID}/costcenters/{costCenterID}
OrderCloud.CostCenters DeleteAssignment DELETE /buyers/{buyerID}/costcenters/{costCenterID}/assignments
OrderCloud.CostCenters Get GET /buyers/{buyerID}/costcenters/{costCenterID}
OrderCloud.CostCenters List GET /buyers/{buyerID}/costcenters
OrderCloud.CostCenters ListAssignments GET /buyers/{buyerID}/costcenters/assignments
OrderCloud.CostCenters Patch PATCH /buyers/{buyerID}/costcenters/{costCenterID}
OrderCloud.CostCenters Save PUT /buyers/{buyerID}/costcenters/{costCenterID}
OrderCloud.CostCenters SaveAssignment POST /buyers/{buyerID}/costcenters/assignments
OrderCloud.CreditCards Create POST /buyers/{buyerID}/creditcards
OrderCloud.CreditCards Delete DELETE /buyers/{buyerID}/creditcards/{creditCardID}
OrderCloud.CreditCards DeleteAssignment DELETE /buyers/{buyerID}/creditcards/{creditCardID}/assignments
OrderCloud.CreditCards Get GET /buyers/{buyerID}/creditcards/{creditCardID}
OrderCloud.CreditCards List GET /buyers/{buyerID}/creditcards
OrderCloud.CreditCards ListAssignments GET /buyers/{buyerID}/creditcards/assignments
OrderCloud.CreditCards Patch PATCH /buyers/{buyerID}/creditcards/{creditCardID}
OrderCloud.CreditCards Save PUT /buyers/{buyerID}/creditcards/{creditCardID}
OrderCloud.CreditCards SaveAssignment POST /buyers/{buyerID}/creditcards/assignments
OrderCloud.ImpersonationConfigs Create POST /impersonationconfig
OrderCloud.ImpersonationConfigs Delete DELETE /impersonationconfig/{impersonationConfigID}
OrderCloud.ImpersonationConfigs Get GET /impersonationconfig/{impersonationConfigID}
OrderCloud.ImpersonationConfigs List GET /impersonationconfig
OrderCloud.ImpersonationConfigs Patch PATCH /impersonationconfig/{impersonationConfigID}
OrderCloud.ImpersonationConfigs Save PUT /impersonationconfig/{impersonationConfigID}
OrderCloud.Incrementors Create POST /incrementors
OrderCloud.Incrementors Delete DELETE /incrementors/{incrementorID}
OrderCloud.Incrementors Get GET /incrementors/{incrementorID}
OrderCloud.Incrementors List GET /incrementors
OrderCloud.Incrementors Patch PATCH /incrementors/{incrementorID}
OrderCloud.Incrementors Save PUT /incrementors/{incrementorID}
OrderCloud.LineItems Create POST /orders/{direction}/{orderID}/lineitems
OrderCloud.LineItems Delete DELETE /orders/{direction}/{orderID}/lineitems/{lineItemID}
OrderCloud.LineItems Get GET /orders/{direction}/{orderID}/lineitems/{lineItemID}
OrderCloud.LineItems List GET /orders/{direction}/{orderID}/lineitems
OrderCloud.LineItems Patch PATCH /orders/{direction}/{orderID}/lineitems/{lineItemID}
OrderCloud.LineItems PatchShippingAddress PATCH /orders/{direction}/{orderID}/lineitems/{lineItemID}/shipto
OrderCloud.LineItems Save PUT /orders/{direction}/{orderID}/lineitems/{lineItemID}
OrderCloud.LineItems SetShippingAddress PUT /orders/{direction}/{orderID}/lineitems/{lineItemID}/shipto
OrderCloud.Me CreateAddress POST /me/addresses
OrderCloud.Me CreateCreditCard POST /me/creditcards
OrderCloud.Me DeleteAddress DELETE /me/addresses/{addressID}
OrderCloud.Me DeleteCreditCard DELETE /me/creditcards/{creditcardID}
OrderCloud.Me Get GET /me
OrderCloud.Me GetAddress GET /me/addresses/{addressID}
OrderCloud.Me GetCatalog GET /me/catalogs/{catalogID}
OrderCloud.Me GetCategory GET /me/categories/{categoryID}
OrderCloud.Me GetCreditCard GET /me/creditcards/{creditcardID}
OrderCloud.Me GetProduct GET /me/products/{productID}
OrderCloud.Me GetPromotion GET /me/promotions/{promotionID}
OrderCloud.Me GetShipment GET /me/shipments/{shipmentID}
OrderCloud.Me GetSpec GET /me/products/{productID}/specs/{specID}
OrderCloud.Me GetSpendingAccount GET /me/spendingaccounts/{spendingAccountID}
OrderCloud.Me ListAddresses GET /me/addresses
OrderCloud.Me ListApprovableOrders GET /me/orders/approvable
OrderCloud.Me ListCatalogs GET /me/catalogs
OrderCloud.Me ListCategories GET /me/categories
OrderCloud.Me ListCostCenters GET /me/costcenters
OrderCloud.Me ListCreditCards GET /me/creditcards
OrderCloud.Me ListOrders GET /me/orders
OrderCloud.Me ListProducts GET /me/products
OrderCloud.Me ListPromotions GET /me/promotions
OrderCloud.Me ListShipmentItems GET /me/shipments/{shipmentID}/items
OrderCloud.Me ListShipments GET /me/shipments
OrderCloud.Me ListSpecs GET /me/products/{productID}/specs
OrderCloud.Me ListSpendingAccounts GET /me/spendingAccounts
OrderCloud.Me ListUserGroups GET /me/usergroups
OrderCloud.Me Patch PATCH /me
OrderCloud.Me PatchAddress PATCH /me/addresses/{addressID}
OrderCloud.Me PatchCreditCard PATCH /me/creditcards/{creditcardID}
OrderCloud.Me Register PUT /me/register
OrderCloud.Me ResetPasswordByToken POST /me/password
OrderCloud.Me Save PUT /me
OrderCloud.Me SaveAddress PUT /me/addresses/{addressID}
OrderCloud.Me SaveCreditCard PUT /me/creditcards/{creditcardID}
OrderCloud.Me TransferAnonUserOrder PUT /me/orders
OrderCloud.MessageSenders Create POST /messagesenders
OrderCloud.MessageSenders Delete DELETE /messagesenders/{messageSenderID}
OrderCloud.MessageSenders DeleteAssignment DELETE /messagesenders/{messageSenderID}/assignments
OrderCloud.MessageSenders Get GET /messagesenders/{messageSenderID}
OrderCloud.MessageSenders List GET /messagesenders
OrderCloud.MessageSenders ListAssignments GET /messagesenders/assignments
OrderCloud.MessageSenders ListCCListenerAssignments GET /messagesenders/CCListenerAssignments
OrderCloud.MessageSenders Patch PATCH /messagesenders/{messageSenderID}
OrderCloud.MessageSenders Save PUT /messagesenders/{messageSenderID}
OrderCloud.MessageSenders SaveAssignment POST /messagesenders/assignments
OrderCloud.MessageSenders SaveCCListenerAssignment POST /messagesenders/CCListenerAssignments
OrderCloud.OpenIdConnects Create POST /openidconnects
OrderCloud.OpenIdConnects Delete DELETE /openidconnects/{openidconnectID}
OrderCloud.OpenIdConnects Get GET /openidconnects/{openidconnectID}
OrderCloud.OpenIdConnects List GET /openidconnects
OrderCloud.OpenIdConnects Patch PATCH /openidconnects/{openidconnectID}
OrderCloud.OpenIdConnects Save PUT /openidconnects/{openidconnectID}
OrderCloud.Orders AddPromotion POST /orders/{direction}/{orderID}/promotions/{promoCode}
OrderCloud.Orders Approve POST /orders/{direction}/{orderID}/approve
OrderCloud.Orders Cancel POST /orders/{direction}/{orderID}/cancel
OrderCloud.Orders Complete POST /orders/{direction}/{orderID}/complete
OrderCloud.Orders Create POST /orders/{direction}
OrderCloud.Orders Decline POST /orders/{direction}/{orderID}/decline
OrderCloud.Orders Delete DELETE /orders/{direction}/{orderID}
OrderCloud.Orders Forward POST /orders/{direction}/{orderID}/forward
OrderCloud.Orders Get GET /orders/{direction}/{orderID}
OrderCloud.Orders List GET /orders/{direction}
OrderCloud.Orders ListApprovals GET /orders/{direction}/{orderID}/approvals
OrderCloud.Orders ListEligibleApprovers GET /orders/{direction}/{orderID}/eligibleapprovers
OrderCloud.Orders ListPromotions GET /orders/{direction}/{orderID}/promotions
OrderCloud.Orders Patch PATCH /orders/{direction}/{orderID}
OrderCloud.Orders PatchBillingAddress PATCH /orders/{direction}/{orderID}/billto
OrderCloud.Orders PatchFromUser PATCH /orders/{direction}/{orderID}/fromuser
OrderCloud.Orders PatchShippingAddress PATCH /orders/{direction}/{orderID}/shipto
OrderCloud.Orders RemovePromotion DELETE /orders/{direction}/{orderID}/promotions/{promoCode}
OrderCloud.Orders Save PUT /orders/{direction}/{orderID}
OrderCloud.Orders SetBillingAddress PUT /orders/{direction}/{orderID}/billto
OrderCloud.Orders SetShippingAddress PUT /orders/{direction}/{orderID}/shipto
OrderCloud.Orders Ship POST /orders/{direction}/{orderID}/ship
OrderCloud.Orders Split POST /orders/{direction}/{orderID}/split
OrderCloud.Orders Submit POST /orders/{direction}/{orderID}/submit
OrderCloud.Orders Validate POST /orders/{direction}/{orderID}/validate
OrderCloud.PasswordResets ResetPasswordByVerificationCode PUT /password/reset/{verificationCode}
OrderCloud.PasswordResets SendVerificationCode POST /password/reset
OrderCloud.Payments Create POST /orders/{direction}/{orderID}/payments
OrderCloud.Payments CreateTransaction POST /orders/{direction}/{orderID}/payments/{paymentID}/transactions
OrderCloud.Payments Delete DELETE /orders/{direction}/{orderID}/payments/{paymentID}
OrderCloud.Payments DeleteTransaction DELETE /orders/{direction}/{orderID}/payments/{paymentID}/transactions/{transactionID}
OrderCloud.Payments Get GET /orders/{direction}/{orderID}/payments/{paymentID}
OrderCloud.Payments List GET /orders/{direction}/{orderID}/payments
OrderCloud.Payments Patch PATCH /orders/{direction}/{orderID}/payments/{paymentID}
OrderCloud.PriceSchedules Create POST /priceschedules
OrderCloud.PriceSchedules Delete DELETE /priceschedules/{priceScheduleID}
OrderCloud.PriceSchedules DeletePriceBreak DELETE /priceschedules/{priceScheduleID}/PriceBreaks
OrderCloud.PriceSchedules Get GET /priceschedules/{priceScheduleID}
OrderCloud.PriceSchedules List GET /priceschedules
OrderCloud.PriceSchedules Patch PATCH /priceschedules/{priceScheduleID}
OrderCloud.PriceSchedules Save PUT /priceschedules/{priceScheduleID}
OrderCloud.PriceSchedules SavePriceBreak POST /priceschedules/{priceScheduleID}/PriceBreaks
OrderCloud.Products Create POST /products
OrderCloud.Products Delete DELETE /products/{productID}
OrderCloud.Products DeleteAssignment DELETE /products/{productID}/assignments/{buyerID}
OrderCloud.Products GenerateVariants POST /products/{productID}/variants/generate
OrderCloud.Products Get GET /products/{productID}
OrderCloud.Products GetVariant GET /products/{productID}/variants/{variantID}
OrderCloud.Products List GET /products
OrderCloud.Products ListAssignments GET /products/assignments
OrderCloud.Products ListSpecs GET /products/{productID}/specs
OrderCloud.Products ListSuppliers GET /products/{productID}/suppliers
OrderCloud.Products ListVariants GET /products/{productID}/variants
OrderCloud.Products Patch PATCH /products/{productID}
OrderCloud.Products PatchVariant PATCH /products/{productID}/variants/{variantID}
OrderCloud.Products RemoveSupplier DELETE /products/{productID}/suppliers/{supplierID}
OrderCloud.Products Save PUT /products/{productID}
OrderCloud.Products SaveAssignment POST /products/assignments
OrderCloud.Products SaveSupplier PUT /products/{productID}/suppliers/{supplierID}
OrderCloud.Products SaveVariant PUT /products/{productID}/variants/{variantID}
OrderCloud.ProductFacets Create POST /productfacets
OrderCloud.ProductFacets Delete DELETE /productfacets/{productFacetID}
OrderCloud.ProductFacets Get GET /productfacets/{productFacetID}
OrderCloud.ProductFacets List GET /productfacets
OrderCloud.ProductFacets Patch PATCH /productfacets/{productFacetID}
OrderCloud.ProductFacets Save PUT /productfacets/{productFacetID}
OrderCloud.Promotions Create POST /promotions
OrderCloud.Promotions Delete DELETE /promotions/{promotionID}
OrderCloud.Promotions DeleteAssignment DELETE /promotions/{promotionID}/assignments
OrderCloud.Promotions Get GET /promotions/{promotionID}
OrderCloud.Promotions List GET /promotions
OrderCloud.Promotions ListAssignments GET /promotions/assignments
OrderCloud.Promotions Patch PATCH /promotions/{promotionID}
OrderCloud.Promotions Save PUT /promotions/{promotionID}
OrderCloud.Promotions SaveAssignment POST /promotions/assignments
OrderCloud.SecurityProfiles Create POST /securityprofiles
OrderCloud.SecurityProfiles Delete DELETE /securityprofiles/{securityProfileID}
OrderCloud.SecurityProfiles DeleteAssignment DELETE /securityprofiles/{securityProfileID}/assignments
OrderCloud.SecurityProfiles Get GET /securityprofiles/{securityProfileID}
OrderCloud.SecurityProfiles List GET /securityprofiles
OrderCloud.SecurityProfiles ListAssignments GET /securityprofiles/assignments
OrderCloud.SecurityProfiles Patch PATCH /securityprofiles/{securityProfileID}
OrderCloud.SecurityProfiles Save PUT /securityprofiles/{securityProfileID}
OrderCloud.SecurityProfiles SaveAssignment POST /securityprofiles/assignments
OrderCloud.Shipments Create POST /shipments
OrderCloud.Shipments Delete DELETE /shipments/{shipmentID}
OrderCloud.Shipments DeleteItem DELETE /shipments/{shipmentID}/items/{orderID}/{lineItemID}
OrderCloud.Shipments Get GET /shipments/{shipmentID}
OrderCloud.Shipments GetItem GET /shipments/{shipmentID}/items/{orderID}/{lineItemID}
OrderCloud.Shipments List GET /shipments
OrderCloud.Shipments ListItems GET /shipments/{shipmentID}/items
OrderCloud.Shipments Patch PATCH /shipments/{shipmentID}
OrderCloud.Shipments Save PUT /shipments/{shipmentID}
OrderCloud.Shipments SaveItem POST /shipments/{shipmentID}/items
OrderCloud.Specs Create POST /specs
OrderCloud.Specs CreateOption POST /specs/{specID}/options
OrderCloud.Specs Delete DELETE /specs/{specID}
OrderCloud.Specs DeleteOption DELETE /specs/{specID}/options/{optionID}
OrderCloud.Specs DeleteProductAssignment DELETE /specs/{specID}/productassignments/{productID}
OrderCloud.Specs Get GET /specs/{specID}
OrderCloud.Specs GetOption GET /specs/{specID}/options/{optionID}
OrderCloud.Specs List GET /specs
OrderCloud.Specs ListOptions GET /specs/{specID}/options
OrderCloud.Specs ListProductAssignments GET /specs/productassignments
OrderCloud.Specs Patch PATCH /specs/{specID}
OrderCloud.Specs PatchOption PATCH /specs/{specID}/options/{optionID}
OrderCloud.Specs Save PUT /specs/{specID}
OrderCloud.Specs SaveOption PUT /specs/{specID}/options/{optionID}
OrderCloud.Specs SaveProductAssignment POST /specs/productassignments
OrderCloud.SpendingAccounts Create POST /buyers/{buyerID}/spendingaccounts
OrderCloud.SpendingAccounts Delete DELETE /buyers/{buyerID}/spendingaccounts/{spendingAccountID}
OrderCloud.SpendingAccounts DeleteAssignment DELETE /buyers/{buyerID}/spendingaccounts/{spendingAccountID}/assignments
OrderCloud.SpendingAccounts Get GET /buyers/{buyerID}/spendingaccounts/{spendingAccountID}
OrderCloud.SpendingAccounts List GET /buyers/{buyerID}/spendingaccounts
OrderCloud.SpendingAccounts ListAssignments GET /buyers/{buyerID}/spendingaccounts/assignments
OrderCloud.SpendingAccounts Patch PATCH /buyers/{buyerID}/spendingaccounts/{spendingAccountID}
OrderCloud.SpendingAccounts Save PUT /buyers/{buyerID}/spendingaccounts/{spendingAccountID}
OrderCloud.SpendingAccounts SaveAssignment POST /buyers/{buyerID}/spendingaccounts/assignments
OrderCloud.Suppliers Create POST /suppliers
OrderCloud.Suppliers Delete DELETE /suppliers/{supplierID}
OrderCloud.Suppliers Get GET /suppliers/{supplierID}
OrderCloud.Suppliers List GET /suppliers
OrderCloud.Suppliers Patch PATCH /suppliers/{supplierID}
OrderCloud.Suppliers Save PUT /suppliers/{supplierID}
OrderCloud.SupplierAddresses Create POST /suppliers/{supplierID}/addresses
OrderCloud.SupplierAddresses Delete DELETE /suppliers/{supplierID}/addresses/{addressID}
OrderCloud.SupplierAddresses Get GET /suppliers/{supplierID}/addresses/{addressID}
OrderCloud.SupplierAddresses List GET /suppliers/{supplierID}/addresses
OrderCloud.SupplierAddresses Patch PATCH /suppliers/{supplierID}/addresses/{addressID}
OrderCloud.SupplierAddresses Save PUT /suppliers/{supplierID}/addresses/{addressID}
OrderCloud.SupplierUsers Create POST /suppliers/{supplierID}/users
OrderCloud.SupplierUsers Delete DELETE /suppliers/{supplierID}/users/{userID}
OrderCloud.SupplierUsers Get GET /suppliers/{supplierID}/users/{userID}
OrderCloud.SupplierUsers GetAccessToken POST /suppliers/{supplierID}/users/{userID}/accesstoken
OrderCloud.SupplierUsers List GET /suppliers/{supplierID}/users
OrderCloud.SupplierUsers Patch PATCH /suppliers/{supplierID}/users/{userID}
OrderCloud.SupplierUsers Save PUT /suppliers/{supplierID}/users/{userID}
OrderCloud.SupplierUserGroups Create POST /suppliers/{supplierID}/usergroups
OrderCloud.SupplierUserGroups Delete DELETE /suppliers/{supplierID}/usergroups/{userGroupID}
OrderCloud.SupplierUserGroups DeleteUserAssignment DELETE /suppliers/{supplierID}/usergroups/{userGroupID}/assignments/{userID}
OrderCloud.SupplierUserGroups Get GET /suppliers/{supplierID}/usergroups/{userGroupID}
OrderCloud.SupplierUserGroups List GET /suppliers/{supplierID}/usergroups
OrderCloud.SupplierUserGroups ListUserAssignments GET /suppliers/{supplierID}/usergroups/assignments
OrderCloud.SupplierUserGroups Patch PATCH /suppliers/{supplierID}/usergroups/{userGroupID}
OrderCloud.SupplierUserGroups Save PUT /suppliers/{supplierID}/usergroups/{userGroupID}
OrderCloud.SupplierUserGroups SaveUserAssignment POST /suppliers/{supplierID}/usergroups/assignments
OrderCloud.Users Create POST /buyers/{buyerID}/users
OrderCloud.Users Delete DELETE /buyers/{buyerID}/users/{userID}
OrderCloud.Users Get GET /buyers/{buyerID}/users/{userID}
OrderCloud.Users GetAccessToken POST /buyers/{buyerID}/users/{userID}/accesstoken
OrderCloud.Users List GET /buyers/{buyerID}/users
OrderCloud.Users Move POST /buyers/{buyerID}/users/{userID}/moveto/{newBuyerID}
OrderCloud.Users Patch PATCH /buyers/{buyerID}/users/{userID}
OrderCloud.Users Save PUT /buyers/{buyerID}/users/{userID}
OrderCloud.UserGroups Create POST /buyers/{buyerID}/usergroups
OrderCloud.UserGroups Delete DELETE /buyers/{buyerID}/usergroups/{userGroupID}
OrderCloud.UserGroups DeleteUserAssignment DELETE /buyers/{buyerID}/usergroups/{userGroupID}/assignments/{userID}
OrderCloud.UserGroups Get GET /buyers/{buyerID}/usergroups/{userGroupID}
OrderCloud.UserGroups List GET /buyers/{buyerID}/usergroups
OrderCloud.UserGroups ListUserAssignments GET /buyers/{buyerID}/usergroups/assignments
OrderCloud.UserGroups Patch PATCH /buyers/{buyerID}/usergroups/{userGroupID}
OrderCloud.UserGroups Save PUT /buyers/{buyerID}/usergroups/{userGroupID}
OrderCloud.UserGroups SaveUserAssignment POST /buyers/{buyerID}/usergroups/assignments
OrderCloud.Webhooks Create POST /webhooks
OrderCloud.Webhooks Delete DELETE /webhooks/{webhookID}
OrderCloud.Webhooks Get GET /webhooks/{webhookID}
OrderCloud.Webhooks List GET /webhooks
OrderCloud.Webhooks Patch PATCH /webhooks/{webhookID}
OrderCloud.Webhooks Save PUT /webhooks/{webhookID}
OrderCloud.XpIndexs Delete DELETE /xpindices/{thingType}/{key}
OrderCloud.XpIndexs List GET /xpindices
OrderCloud.XpIndexs Put PUT /xpindices

Documentation for Models

Documentation for Authorization

oauth2

  • Type: OAuth
  • Flow: password
  • Authorization URL:
  • Scopes:
    • AddressAdmin:
    • AddressReader:
    • AdminAddressAdmin:
    • AdminAddressReader:
    • AdminUserAdmin:
    • AdminUserGroupAdmin:
    • AdminUserGroupReader:
    • AdminUserReader:
    • ApiClientAdmin:
    • ApiClientReader:
    • ApprovalRuleAdmin:
    • ApprovalRuleReader:
    • BuyerAdmin:
    • BuyerImpersonation:
    • BuyerReader:
    • BuyerUserAdmin:
    • BuyerUserReader:
    • CatalogAdmin:
    • CatalogReader:
    • CategoryAdmin:
    • CategoryReader:
    • CostCenterAdmin:
    • CostCenterReader:
    • CreditCardAdmin:
    • CreditCardReader:
    • FullAccess:
    • GrantForAnyRole:
    • IncrementorAdmin:
    • IncrementorReader:
    • InventoryAdmin:
    • MeAddressAdmin:
    • MeAdmin:
    • MeCreditCardAdmin:
    • MessageConfigAssignmentAdmin:
    • MessageSenderAdmin:
    • MessageSenderReader:
    • MeXpAdmin:
    • OrderAdmin:
    • OrderReader:
    • OverrideShipping:
    • OverrideTax:
    • OverrideUnitPrice:
    • PasswordReset:
    • PriceScheduleAdmin:
    • PriceScheduleReader:
    • ProductAdmin:
    • ProductAssignmentAdmin:
    • ProductFacetAdmin:
    • ProductFacetReader:
    • ProductReader:
    • PromotionAdmin:
    • PromotionReader:
    • SecurityProfileAdmin:
    • SecurityProfileReader:
    • SetSecurityProfile:
    • ShipmentAdmin:
    • ShipmentReader:
    • Shopper:
    • SpendingAccountAdmin:
    • SpendingAccountReader:
    • SupplierAddressAdmin:
    • SupplierAddressReader:
    • SupplierAdmin:
    • SupplierReader:
    • SupplierUserAdmin:
    • SupplierUserGroupAdmin:
    • SupplierUserGroupReader:
    • SupplierUserReader:
    • UnsubmittedOrderReader:
    • UserGroupAdmin:
    • UserGroupReader:
    • WebhookAdmin:
    • WebhookReader:
    • XpIndexAdmin:

About

JavaScript SDK autogenerated from swagger spec using the Swagger-CodeGen project

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.9%
  • Shell 0.1%