OrderCloud

OrderCloud


Keywords
Swagger, OrderCloud
License
Other
Install
pip install OrderCloud==0.0.1

Documentation

OrderCloud

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

For more information, see the official OrderCloud website.

  • API version: 1.0
  • Build date: 2017-06-23T12:33:47.980-05:00

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

Make sure you have pip installed. Then run:

pip install OrderCloud

(you may need to run pip with root permission: sudo pip install OrderCloud)

Then import the package:

import OrderCloud 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import OrderCloud

Getting Started

Please follow the installation procedure and then run the following:

#Import the OrderCloud SDK
import OrderCloud as oc
#We have to configure these settings before we can use the API
oc.configuration.client_id = "YOUR_CLIENT_ID" #Grab your Client ID from the OrderCloud Developer Center and paste it here! 
oc.configuration.scopes = ["FullAccess"]

#This is a shortcut for authenticating with the password grant type
oc.auth.login("USERNAME","PASSWORD")
#This will acquire an access token and store it in oc.configuration.access_token

#Now we can use the API, to check if everything worked, this should return the currently authenticated user.
print(oc.MeApi.get())

Documentation for API Endpoints

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

Class Method HTTP request Description
AddressApi buyers_buyer_id_addresses_address_id_assignments_delete DELETE /buyers/{buyerID}/addresses/{addressID}/assignments
AddressApi buyers_buyer_id_addresses_address_id_delete DELETE /buyers/{buyerID}/addresses/{addressID}
AddressApi buyers_buyer_id_addresses_address_id_get GET /buyers/{buyerID}/addresses/{addressID}
AddressApi buyers_buyer_id_addresses_address_id_patch PATCH /buyers/{buyerID}/addresses/{addressID}
AddressApi buyers_buyer_id_addresses_address_id_put PUT /buyers/{buyerID}/addresses/{addressID}
AddressApi buyers_buyer_id_addresses_assignments_get GET /buyers/{buyerID}/addresses/assignments
AddressApi buyers_buyer_id_addresses_assignments_post POST /buyers/{buyerID}/addresses/assignments
AddressApi buyers_buyer_id_addresses_get GET /buyers/{buyerID}/addresses
AddressApi buyers_buyer_id_addresses_post POST /buyers/{buyerID}/addresses
AdminAddressApi addresses_address_id_delete DELETE /addresses/{addressID}
AdminAddressApi addresses_address_id_get GET /addresses/{addressID}
AdminAddressApi addresses_address_id_patch PATCH /addresses/{addressID}
AdminAddressApi addresses_address_id_put PUT /addresses/{addressID}
AdminAddressApi addresses_get GET /addresses
AdminAddressApi addresses_post POST /addresses
AdminUserApi adminusers_get GET /adminusers
AdminUserApi adminusers_post POST /adminusers
AdminUserApi adminusers_user_id_delete DELETE /adminusers/{userID}
AdminUserApi adminusers_user_id_get GET /adminusers/{userID}
AdminUserApi adminusers_user_id_patch PATCH /adminusers/{userID}
AdminUserApi adminusers_user_id_put PUT /adminusers/{userID}
AdminUserGroupApi usergroups_assignments_get GET /usergroups/assignments
AdminUserGroupApi usergroups_assignments_post POST /usergroups/assignments
AdminUserGroupApi usergroups_get GET /usergroups
AdminUserGroupApi usergroups_post POST /usergroups
AdminUserGroupApi usergroups_user_group_id_assignments_user_id_delete DELETE /usergroups/{userGroupID}/assignments/{userID}
AdminUserGroupApi usergroups_user_group_id_delete DELETE /usergroups/{userGroupID}
AdminUserGroupApi usergroups_user_group_id_get GET /usergroups/{userGroupID}
AdminUserGroupApi usergroups_user_group_id_patch PATCH /usergroups/{userGroupID}
AdminUserGroupApi usergroups_user_group_id_put PUT /usergroups/{userGroupID}
ApprovalRuleApi buyers_buyer_id_approvalrules_approval_rule_id_delete DELETE /buyers/{buyerID}/approvalrules/{approvalRuleID}
ApprovalRuleApi buyers_buyer_id_approvalrules_approval_rule_id_get GET /buyers/{buyerID}/approvalrules/{approvalRuleID}
ApprovalRuleApi buyers_buyer_id_approvalrules_approval_rule_id_patch PATCH /buyers/{buyerID}/approvalrules/{approvalRuleID}
ApprovalRuleApi buyers_buyer_id_approvalrules_approval_rule_id_put PUT /buyers/{buyerID}/approvalrules/{approvalRuleID}
ApprovalRuleApi buyers_buyer_id_approvalrules_get GET /buyers/{buyerID}/approvalrules
ApprovalRuleApi buyers_buyer_id_approvalrules_post POST /buyers/{buyerID}/approvalrules
BuyerApi buyers_buyer_id_delete DELETE /buyers/{buyerID}
BuyerApi buyers_buyer_id_get GET /buyers/{buyerID}
BuyerApi buyers_buyer_id_patch PATCH /buyers/{buyerID}
BuyerApi buyers_buyer_id_put PUT /buyers/{buyerID}
BuyerApi buyers_get GET /buyers
BuyerApi buyers_post POST /buyers
CatalogApi catalogs_assignments_get GET /catalogs/assignments
CatalogApi catalogs_assignments_post POST /catalogs/assignments
CatalogApi catalogs_catalog_id_assignments_delete DELETE /catalogs/{catalogID}/assignments
CatalogApi catalogs_catalog_id_delete DELETE /catalogs/{catalogID}
CatalogApi catalogs_catalog_id_get GET /catalogs/{catalogID}
CatalogApi catalogs_catalog_id_patch PATCH /catalogs/{catalogID}
CatalogApi catalogs_catalog_id_productassignments_product_id_delete DELETE /catalogs/{catalogID}/productassignments/{productID}
CatalogApi catalogs_catalog_id_put PUT /catalogs/{catalogID}
CatalogApi catalogs_get GET /catalogs
CatalogApi catalogs_post POST /catalogs
CatalogApi catalogs_productassignments_get GET /catalogs/productassignments
CatalogApi catalogs_productassignments_post POST /catalogs/productassignments
CategoryApi catalogs_catalog_id_categories_assignments_get GET /catalogs/{catalogID}/categories/assignments
CategoryApi catalogs_catalog_id_categories_assignments_post POST /catalogs/{catalogID}/categories/assignments
CategoryApi catalogs_catalog_id_categories_category_id_assignments_delete DELETE /catalogs/{catalogID}/categories/{categoryID}/assignments
CategoryApi catalogs_catalog_id_categories_category_id_delete DELETE /catalogs/{catalogID}/categories/{categoryID}
CategoryApi catalogs_catalog_id_categories_category_id_get GET /catalogs/{catalogID}/categories/{categoryID}
CategoryApi catalogs_catalog_id_categories_category_id_patch PATCH /catalogs/{catalogID}/categories/{categoryID}
CategoryApi catalogs_catalog_id_categories_category_id_productassignments_product_id_delete DELETE /catalogs/{catalogID}/categories/{categoryID}/productassignments/{productID}
CategoryApi catalogs_catalog_id_categories_category_id_put PUT /catalogs/{catalogID}/categories/{categoryID}
CategoryApi catalogs_catalog_id_categories_get GET /catalogs/{catalogID}/categories
CategoryApi catalogs_catalog_id_categories_post POST /catalogs/{catalogID}/categories
CategoryApi catalogs_catalog_id_categories_productassignments_get GET /catalogs/{catalogID}/categories/productassignments
CategoryApi catalogs_catalog_id_categories_productassignments_post POST /catalogs/{catalogID}/categories/productassignments
CostCenterApi buyers_buyer_id_costcenters_assignments_get GET /buyers/{buyerID}/costcenters/assignments
CostCenterApi buyers_buyer_id_costcenters_assignments_post POST /buyers/{buyerID}/costcenters/assignments
CostCenterApi buyers_buyer_id_costcenters_cost_center_id_assignments_delete DELETE /buyers/{buyerID}/costcenters/{costCenterID}/assignments
CostCenterApi buyers_buyer_id_costcenters_cost_center_id_delete DELETE /buyers/{buyerID}/costcenters/{costCenterID}
CostCenterApi buyers_buyer_id_costcenters_cost_center_id_get GET /buyers/{buyerID}/costcenters/{costCenterID}
CostCenterApi buyers_buyer_id_costcenters_cost_center_id_patch PATCH /buyers/{buyerID}/costcenters/{costCenterID}
CostCenterApi buyers_buyer_id_costcenters_cost_center_id_put PUT /buyers/{buyerID}/costcenters/{costCenterID}
CostCenterApi buyers_buyer_id_costcenters_get GET /buyers/{buyerID}/costcenters
CostCenterApi buyers_buyer_id_costcenters_post POST /buyers/{buyerID}/costcenters
CreditCardApi buyers_buyer_id_creditcards_assignments_get GET /buyers/{buyerID}/creditcards/assignments
CreditCardApi buyers_buyer_id_creditcards_assignments_post POST /buyers/{buyerID}/creditcards/assignments
CreditCardApi buyers_buyer_id_creditcards_credit_card_id_assignments_delete DELETE /buyers/{buyerID}/creditcards/{creditCardID}/assignments
CreditCardApi buyers_buyer_id_creditcards_credit_card_id_delete DELETE /buyers/{buyerID}/creditcards/{creditCardID}
CreditCardApi buyers_buyer_id_creditcards_credit_card_id_get GET /buyers/{buyerID}/creditcards/{creditCardID}
CreditCardApi buyers_buyer_id_creditcards_credit_card_id_patch PATCH /buyers/{buyerID}/creditcards/{creditCardID}
CreditCardApi buyers_buyer_id_creditcards_credit_card_id_put PUT /buyers/{buyerID}/creditcards/{creditCardID}
CreditCardApi buyers_buyer_id_creditcards_get GET /buyers/{buyerID}/creditcards
CreditCardApi buyers_buyer_id_creditcards_post POST /buyers/{buyerID}/creditcards
ImpersonationConfigApi impersonationconfig_get GET /impersonationconfig
ImpersonationConfigApi impersonationconfig_impersonation_config_id_delete DELETE /impersonationconfig/{impersonationConfigID}
ImpersonationConfigApi impersonationconfig_impersonation_config_id_get GET /impersonationconfig/{impersonationConfigID}
ImpersonationConfigApi impersonationconfig_impersonation_config_id_patch PATCH /impersonationconfig/{impersonationConfigID}
ImpersonationConfigApi impersonationconfig_impersonation_config_id_put PUT /impersonationconfig/{impersonationConfigID}
ImpersonationConfigApi impersonationconfig_post POST /impersonationconfig
LineItemApi orders_direction_order_id_lineitems_get GET /orders/{direction}/{orderID}/lineitems
LineItemApi orders_direction_order_id_lineitems_line_item_id_delete DELETE /orders/{direction}/{orderID}/lineitems/{lineItemID}
LineItemApi orders_direction_order_id_lineitems_line_item_id_get GET /orders/{direction}/{orderID}/lineitems/{lineItemID}
LineItemApi orders_direction_order_id_lineitems_line_item_id_patch PATCH /orders/{direction}/{orderID}/lineitems/{lineItemID}
LineItemApi orders_direction_order_id_lineitems_line_item_id_put PUT /orders/{direction}/{orderID}/lineitems/{lineItemID}
LineItemApi orders_direction_order_id_lineitems_line_item_id_shipto_patch PATCH /orders/{direction}/{orderID}/lineitems/{lineItemID}/shipto
LineItemApi orders_direction_order_id_lineitems_line_item_id_shipto_put PUT /orders/{direction}/{orderID}/lineitems/{lineItemID}/shipto
LineItemApi orders_direction_order_id_lineitems_post POST /orders/{direction}/{orderID}/lineitems
MeApi me_addresses_address_id_delete DELETE /me/addresses/{addressID}
MeApi me_addresses_address_id_get GET /me/addresses/{addressID}
MeApi me_addresses_address_id_patch PATCH /me/addresses/{addressID}
MeApi me_addresses_address_id_put PUT /me/addresses/{addressID}
MeApi me_addresses_get GET /me/addresses
MeApi me_addresses_post POST /me/addresses
MeApi me_catalogs_catalog_id_get GET /me/catalogs/{catalogID}
MeApi me_catalogs_get GET /me/catalogs
MeApi me_categories_get GET /me/categories
MeApi me_costcenters_get GET /me/costcenters
MeApi me_creditcards_creditcard_id_delete DELETE /me/creditcards/{creditcardID}
MeApi me_creditcards_creditcard_id_get GET /me/creditcards/{creditcardID}
MeApi me_creditcards_creditcard_id_patch PATCH /me/creditcards/{creditcardID}
MeApi me_creditcards_creditcard_id_put PUT /me/creditcards/{creditcardID}
MeApi me_creditcards_get GET /me/creditcards
MeApi me_creditcards_post POST /me/creditcards
MeApi me_get GET /me
MeApi me_orders_approvable_get GET /me/orders/approvable
MeApi me_orders_get GET /me/orders
MeApi me_orders_put PUT /me/orders
MeApi me_password_post POST /me/password
MeApi me_patch PATCH /me
MeApi me_products_get GET /me/products
MeApi me_products_product_id_get GET /me/products/{productID}
MeApi me_products_product_id_specs_get GET /me/products/{productID}/specs
MeApi me_products_product_id_specs_spec_id_get GET /me/products/{productID}/specs/{specID}
MeApi me_promotions_get GET /me/promotions
MeApi me_promotions_promotion_id_get GET /me/promotions/{promotionID}
MeApi me_put PUT /me
MeApi me_register_put PUT /me/register
MeApi me_shipments_get GET /me/shipments
MeApi me_shipments_shipment_id_get GET /me/shipments/{shipmentID}
MeApi me_shipments_shipment_id_items_get GET /me/shipments/{shipmentID}/items
MeApi me_spending_accounts_get GET /me/spendingAccounts
MeApi me_spendingaccounts_spending_account_id_get GET /me/spendingaccounts/{spendingAccountID}
MeApi me_usergroups_get GET /me/usergroups
MessageSendersApi messagesenders_assignments_get GET /messagesenders/assignments
MessageSendersApi messagesenders_assignments_post POST /messagesenders/assignments
MessageSendersApi messagesenders_cc_listener_assignments_get GET /messagesenders/CCListenerAssignments
MessageSendersApi messagesenders_cc_listener_assignments_post POST /messagesenders/CCListenerAssignments
MessageSendersApi messagesenders_get GET /messagesenders
MessageSendersApi messagesenders_message_sender_id_assignments_delete DELETE /messagesenders/{messageSenderID}/assignments
MessageSendersApi messagesenders_message_sender_id_get GET /messagesenders/{messageSenderID}
OrderApi orders_direction_get GET /orders/{direction}
OrderApi orders_direction_order_id_approvals_get GET /orders/{direction}/{orderID}/approvals
OrderApi orders_direction_order_id_approve_post POST /orders/{direction}/{orderID}/approve
OrderApi orders_direction_order_id_billto_patch PATCH /orders/{direction}/{orderID}/billto
OrderApi orders_direction_order_id_billto_put PUT /orders/{direction}/{orderID}/billto
OrderApi orders_direction_order_id_cancel_post POST /orders/{direction}/{orderID}/cancel
OrderApi orders_direction_order_id_decline_post POST /orders/{direction}/{orderID}/decline
OrderApi orders_direction_order_id_delete DELETE /orders/{direction}/{orderID}
OrderApi orders_direction_order_id_eligibleapprovers_get GET /orders/{direction}/{orderID}/eligibleapprovers
OrderApi orders_direction_order_id_get GET /orders/{direction}/{orderID}
OrderApi orders_direction_order_id_patch PATCH /orders/{direction}/{orderID}
OrderApi orders_direction_order_id_promotions_get GET /orders/{direction}/{orderID}/promotions
OrderApi orders_direction_order_id_promotions_promo_code_delete DELETE /orders/{direction}/{orderID}/promotions/{promoCode}
OrderApi orders_direction_order_id_promotions_promo_code_post POST /orders/{direction}/{orderID}/promotions/{promoCode}
OrderApi orders_direction_order_id_put PUT /orders/{direction}/{orderID}
OrderApi orders_direction_order_id_ship_post POST /orders/{direction}/{orderID}/ship
OrderApi orders_direction_order_id_shipto_patch PATCH /orders/{direction}/{orderID}/shipto
OrderApi orders_direction_order_id_shipto_put PUT /orders/{direction}/{orderID}/shipto
OrderApi orders_direction_order_id_submit_post POST /orders/{direction}/{orderID}/submit
OrderApi orders_direction_post POST /orders/{direction}
PasswordResetApi password_reset_post POST /password/reset
PasswordResetApi password_reset_verification_code_put PUT /password/reset/{verificationCode}
PaymentApi orders_direction_order_id_payments_get GET /orders/{direction}/{orderID}/payments
PaymentApi orders_direction_order_id_payments_payment_id_delete DELETE /orders/{direction}/{orderID}/payments/{paymentID}
PaymentApi orders_direction_order_id_payments_payment_id_get GET /orders/{direction}/{orderID}/payments/{paymentID}
PaymentApi orders_direction_order_id_payments_payment_id_patch PATCH /orders/{direction}/{orderID}/payments/{paymentID}
PaymentApi orders_direction_order_id_payments_payment_id_transactions_post POST /orders/{direction}/{orderID}/payments/{paymentID}/transactions
PaymentApi orders_direction_order_id_payments_payment_id_transactions_transaction_id_delete DELETE /orders/{direction}/{orderID}/payments/{paymentID}/transactions/{transactionID}
PaymentApi orders_direction_order_id_payments_post POST /orders/{direction}/{orderID}/payments
PriceScheduleApi priceschedules_get GET /priceschedules
PriceScheduleApi priceschedules_post POST /priceschedules
PriceScheduleApi priceschedules_price_schedule_id_delete DELETE /priceschedules/{priceScheduleID}
PriceScheduleApi priceschedules_price_schedule_id_get GET /priceschedules/{priceScheduleID}
PriceScheduleApi priceschedules_price_schedule_id_patch PATCH /priceschedules/{priceScheduleID}
PriceScheduleApi priceschedules_price_schedule_id_price_breaks_delete DELETE /priceschedules/{priceScheduleID}/PriceBreaks
PriceScheduleApi priceschedules_price_schedule_id_price_breaks_post POST /priceschedules/{priceScheduleID}/PriceBreaks
PriceScheduleApi priceschedules_price_schedule_id_put PUT /priceschedules/{priceScheduleID}
ProductApi products_assignments_get GET /products/assignments
ProductApi products_assignments_post POST /products/assignments
ProductApi products_get GET /products
ProductApi products_post POST /products
ProductApi products_product_id_assignments_buyer_id_delete DELETE /products/{productID}/assignments/{buyerID}
ProductApi products_product_id_delete DELETE /products/{productID}
ProductApi products_product_id_get GET /products/{productID}
ProductApi products_product_id_patch PATCH /products/{productID}
ProductApi products_product_id_put PUT /products/{productID}
ProductApi products_product_id_suppliers_get GET /products/{productID}/suppliers
ProductApi products_product_id_suppliers_supplier_id_delete DELETE /products/{productID}/suppliers/{supplierID}
ProductApi products_product_id_suppliers_supplier_id_put PUT /products/{productID}/suppliers/{supplierID}
ProductApi products_product_id_variants_generate_post POST /products/{productID}/variants/generate
ProductApi products_product_id_variants_get GET /products/{productID}/variants
ProductApi products_product_id_variants_variant_id_get GET /products/{productID}/variants/{variantID}
ProductApi products_product_id_variants_variant_id_patch PATCH /products/{productID}/variants/{variantID}
ProductApi products_product_id_variants_variant_id_put PUT /products/{productID}/variants/{variantID}
PromotionApi promotions_assignments_get GET /promotions/assignments
PromotionApi promotions_assignments_post POST /promotions/assignments
PromotionApi promotions_get GET /promotions
PromotionApi promotions_post POST /promotions
PromotionApi promotions_promotion_id_assignments_delete DELETE /promotions/{promotionID}/assignments
PromotionApi promotions_promotion_id_delete DELETE /promotions/{promotionID}
PromotionApi promotions_promotion_id_get GET /promotions/{promotionID}
PromotionApi promotions_promotion_id_patch PATCH /promotions/{promotionID}
PromotionApi promotions_promotion_id_put PUT /promotions/{promotionID}
SecurityProfileApi securityprofiles_assignments_get GET /securityprofiles/assignments
SecurityProfileApi securityprofiles_assignments_post POST /securityprofiles/assignments
SecurityProfileApi securityprofiles_get GET /securityprofiles
SecurityProfileApi securityprofiles_security_profile_id_assignments_delete DELETE /securityprofiles/{securityProfileID}/assignments
SecurityProfileApi securityprofiles_security_profile_id_get GET /securityprofiles/{securityProfileID}
ShipmentApi shipments_get GET /shipments
ShipmentApi shipments_post POST /shipments
ShipmentApi shipments_shipment_id_delete DELETE /shipments/{shipmentID}
ShipmentApi shipments_shipment_id_get GET /shipments/{shipmentID}
ShipmentApi shipments_shipment_id_items_get GET /shipments/{shipmentID}/items
ShipmentApi shipments_shipment_id_items_order_id_line_item_id_delete DELETE /shipments/{shipmentID}/items/{orderID}/{lineItemID}
ShipmentApi shipments_shipment_id_items_order_id_line_item_id_get GET /shipments/{shipmentID}/items/{orderID}/{lineItemID}
ShipmentApi shipments_shipment_id_items_post POST /shipments/{shipmentID}/items
ShipmentApi shipments_shipment_id_patch PATCH /shipments/{shipmentID}
ShipmentApi shipments_shipment_id_put PUT /shipments/{shipmentID}
SpecApi specs_get GET /specs
SpecApi specs_post POST /specs
SpecApi specs_productassignments_get GET /specs/productassignments
SpecApi specs_productassignments_post POST /specs/productassignments
SpecApi specs_spec_id_delete DELETE /specs/{specID}
SpecApi specs_spec_id_get GET /specs/{specID}
SpecApi specs_spec_id_options_get GET /specs/{specID}/options
SpecApi specs_spec_id_options_option_id_delete DELETE /specs/{specID}/options/{optionID}
SpecApi specs_spec_id_options_option_id_get GET /specs/{specID}/options/{optionID}
SpecApi specs_spec_id_options_option_id_patch PATCH /specs/{specID}/options/{optionID}
SpecApi specs_spec_id_options_option_id_put PUT /specs/{specID}/options/{optionID}
SpecApi specs_spec_id_options_post POST /specs/{specID}/options
SpecApi specs_spec_id_patch PATCH /specs/{specID}
SpecApi specs_spec_id_productassignments_product_id_delete DELETE /specs/{specID}/productassignments/{productID}
SpecApi specs_spec_id_put PUT /specs/{specID}
SpendingAccountApi buyers_buyer_id_spendingaccounts_assignments_get GET /buyers/{buyerID}/spendingaccounts/assignments
SpendingAccountApi buyers_buyer_id_spendingaccounts_assignments_post POST /buyers/{buyerID}/spendingaccounts/assignments
SpendingAccountApi buyers_buyer_id_spendingaccounts_get GET /buyers/{buyerID}/spendingaccounts
SpendingAccountApi buyers_buyer_id_spendingaccounts_post POST /buyers/{buyerID}/spendingaccounts
SpendingAccountApi buyers_buyer_id_spendingaccounts_spending_account_id_assignments_delete DELETE /buyers/{buyerID}/spendingaccounts/{spendingAccountID}/assignments
SpendingAccountApi buyers_buyer_id_spendingaccounts_spending_account_id_delete DELETE /buyers/{buyerID}/spendingaccounts/{spendingAccountID}
SpendingAccountApi buyers_buyer_id_spendingaccounts_spending_account_id_get GET /buyers/{buyerID}/spendingaccounts/{spendingAccountID}
SpendingAccountApi buyers_buyer_id_spendingaccounts_spending_account_id_patch PATCH /buyers/{buyerID}/spendingaccounts/{spendingAccountID}
SpendingAccountApi buyers_buyer_id_spendingaccounts_spending_account_id_put PUT /buyers/{buyerID}/spendingaccounts/{spendingAccountID}
SupplierApi suppliers_get GET /suppliers
SupplierApi suppliers_post POST /suppliers
SupplierApi suppliers_supplier_id_delete DELETE /suppliers/{supplierID}
SupplierApi suppliers_supplier_id_get GET /suppliers/{supplierID}
SupplierApi suppliers_supplier_id_patch PATCH /suppliers/{supplierID}
SupplierApi suppliers_supplier_id_put PUT /suppliers/{supplierID}
SupplierUserApi suppliers_supplier_id_users_get GET /suppliers/{supplierID}/users
SupplierUserApi suppliers_supplier_id_users_post POST /suppliers/{supplierID}/users
SupplierUserApi suppliers_supplier_id_users_user_id_accesstoken_post POST /suppliers/{supplierID}/users/{userID}/accesstoken
SupplierUserApi suppliers_supplier_id_users_user_id_delete DELETE /suppliers/{supplierID}/users/{userID}
SupplierUserApi suppliers_supplier_id_users_user_id_get GET /suppliers/{supplierID}/users/{userID}
SupplierUserApi suppliers_supplier_id_users_user_id_patch PATCH /suppliers/{supplierID}/users/{userID}
SupplierUserApi suppliers_supplier_id_users_user_id_put PUT /suppliers/{supplierID}/users/{userID}
SupplierUserGroupApi suppliers_supplier_id_usergroups_assignments_get GET /suppliers/{supplierID}/usergroups/assignments
SupplierUserGroupApi suppliers_supplier_id_usergroups_assignments_post POST /suppliers/{supplierID}/usergroups/assignments
SupplierUserGroupApi suppliers_supplier_id_usergroups_get GET /suppliers/{supplierID}/usergroups
SupplierUserGroupApi suppliers_supplier_id_usergroups_post POST /suppliers/{supplierID}/usergroups
SupplierUserGroupApi suppliers_supplier_id_usergroups_user_group_id_assignments_user_id_delete DELETE /suppliers/{supplierID}/usergroups/{userGroupID}/assignments/{userID}
SupplierUserGroupApi suppliers_supplier_id_usergroups_user_group_id_delete DELETE /suppliers/{supplierID}/usergroups/{userGroupID}
SupplierUserGroupApi suppliers_supplier_id_usergroups_user_group_id_get GET /suppliers/{supplierID}/usergroups/{userGroupID}
SupplierUserGroupApi suppliers_supplier_id_usergroups_user_group_id_patch PATCH /suppliers/{supplierID}/usergroups/{userGroupID}
SupplierUserGroupApi suppliers_supplier_id_usergroups_user_group_id_put PUT /suppliers/{supplierID}/usergroups/{userGroupID}
UserApi buyers_buyer_id_users_get GET /buyers/{buyerID}/users
UserApi buyers_buyer_id_users_post POST /buyers/{buyerID}/users
UserApi buyers_buyer_id_users_user_id_accesstoken_post POST /buyers/{buyerID}/users/{userID}/accesstoken
UserApi buyers_buyer_id_users_user_id_delete DELETE /buyers/{buyerID}/users/{userID}
UserApi buyers_buyer_id_users_user_id_get GET /buyers/{buyerID}/users/{userID}
UserApi buyers_buyer_id_users_user_id_patch PATCH /buyers/{buyerID}/users/{userID}
UserApi buyers_buyer_id_users_user_id_put PUT /buyers/{buyerID}/users/{userID}
UserGroupApi buyers_buyer_id_usergroups_assignments_get GET /buyers/{buyerID}/usergroups/assignments
UserGroupApi buyers_buyer_id_usergroups_assignments_post POST /buyers/{buyerID}/usergroups/assignments
UserGroupApi buyers_buyer_id_usergroups_get GET /buyers/{buyerID}/usergroups
UserGroupApi buyers_buyer_id_usergroups_post POST /buyers/{buyerID}/usergroups
UserGroupApi buyers_buyer_id_usergroups_user_group_id_assignments_user_id_delete DELETE /buyers/{buyerID}/usergroups/{userGroupID}/assignments/{userID}
UserGroupApi buyers_buyer_id_usergroups_user_group_id_delete DELETE /buyers/{buyerID}/usergroups/{userGroupID}
UserGroupApi buyers_buyer_id_usergroups_user_group_id_get GET /buyers/{buyerID}/usergroups/{userGroupID}
UserGroupApi buyers_buyer_id_usergroups_user_group_id_patch PATCH /buyers/{buyerID}/usergroups/{userGroupID}
UserGroupApi buyers_buyer_id_usergroups_user_group_id_put PUT /buyers/{buyerID}/usergroups/{userGroupID}

Documentation For Models

Documentation For Authorization

There are four ways to authenticate into an app. All of them acquire an access token and store it in OrderCloud.configuration.access_token.

Simple user/pass

This is most commonly used when a human user is logging into the app:

OrderCloud.auth.login(user,password)

Elevated user/pass

This is a more stricter form for when you have a client_secret set up for your app in the developer center and it needs to be pass in:

OrderCloud.auth.login(user,password,client_secret)

Client secret

This is for when a backend system needs to interact with the app:

OrderCloud.auth.authenticate(client_secret)

Anonymous shopping

For when you need to allow anyone to publically access the app:

OrderCloud.auth.authenticate()

Check the OrderCloud Authentication guide for more detailed information!

oauth2

  • Type: OAuth
  • Flow: password
  • Authorization URL: https://auth.ordercloud.io/oauth/token
  • Scopes:
  • AddressAdmin:
  • AddressReader:
  • AdminAddressAdmin:
  • AdminAddressReader:
  • AdminUserAdmin:
  • AdminUserGroupAdmin:
  • AdminUserGroupReader:
  • AdminUserReader:
  • ApprovalRuleAdmin:
  • ApprovalRuleReader:
  • BuyerAdmin:
  • BuyerImpersonation:
  • BuyerReader:
  • BuyerUserAdmin:
  • BuyerUserReader:
  • CatalogAdmin:
  • CatalogReader:
  • CategoryAdmin:
  • CategoryReader:
  • CostCenterAdmin:
  • CostCenterReader:
  • CreditCardAdmin:
  • CreditCardReader:
  • FullAccess:
  • GrantForAnyRole:
  • InventoryAdmin:
  • MeAddressAdmin:
  • MeAdmin:
  • MeCreditCardAdmin:
  • MessageConfigAssignmentAdmin:
  • MeXpAdmin:
  • OrderAdmin:
  • OrderReader:
  • OverrideShipping:
  • OverrideTax:
  • OverrideUnitPrice:
  • PasswordReset:
  • PriceScheduleAdmin:
  • PriceScheduleReader:
  • ProductAdmin:
  • ProductAssignmentAdmin:
  • ProductReader:
  • PromotionAdmin:
  • PromotionReader:
  • SetSecurityProfile:
  • ShipmentAdmin:
  • ShipmentReader:
  • Shopper:
  • SpendingAccountAdmin:
  • SpendingAccountReader:
  • SupplierAdmin:
  • SupplierReader:
  • SupplierUserAdmin:
  • SupplierUserGroupAdmin:
  • SupplierUserGroupReader:
  • SupplierUserReader:
  • UnsubmittedOrderReader:
  • UserGroupAdmin:
  • UserGroupReader:

Impersonating

The SDK also includes a helpful class OrderCloud.impersonation for impersonating users. It has two functions:

OrderCloud.impersonation.start(access_token)

Now any API calls you make will be on behalf of that user. To stop the impersonation, just do:

OrderCloud.impersonation.stop()

Even though it was stopped, it still saves the original access token. So the next time you call start, you can call it with no arguments and it will use the last one.

Here is a full working example:

#Import the library
import OrderCloud as oc
#Configure client id and scopes
oc.configuration.client_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
oc.configuration.scopes = ["FullAccess"]
#Acquire and store the access token
oc.auth.login("user","pass")
print(oc.MeApi.get())#Should print out the user you just logged in with

#Get an impersonation token 
token_request = oc.ImpersonateTokenRequest(client_id="[INSERT YOUR BUYER APP CLIENT ID]",claims=[])
resp = oc.UserApi.get_access_token("buyer_id","user_id",token_request)
print(resp.access_token) #This is our access token

#Start the impersonation
oc.impersonation.start(resp.access_token)

print(oc.MeApi.get()) #Should give us the information of the user we just impersonated

oc.impersonation.stop()

print(oc.MeApi.get()) #Our original user is back now 

Author

ordercloud@four51.com