Orders
(→Ordering API) |
Mike.robski (Talk | contribs) m (1 revision: Release 86) |
Revision as of 10:59, 11 October 2013
Ordering API
The ordering API supports the operations of creating, building and placing orders. The orders are the main method of creating new accounts and adding and managing the products for an account.
Contents |
download this selection of articles as a PDF book
Orders
Order management resources.
- POST /orders - Creates a new order
- GET /orders/{orderId} - Returns order details
- DELETE /orders/{orderId} - Deletes an order
- POST /orders/{orderId}/action - Performs an action on an order
Order Shorthand
An URL shortcut allowing the user to access the currently open order without specifying the order ID.
Account
Customer information in a given order. Only one account is allowed per order.
- PUT /orders/{orderId}/account - Add account to the order
- GET /orders/{orderId}/account - Returns the account details
Account Attributes
Custom attributes for an Account in a given Order.
- PUT /orders/{orderId}/account/attributes - Sets account attributes
- GET /orders/{orderId}/account/attributes - Returns account attributes
- DELETE /orders/{orderId}/account/attributes - Deletes all account attributes
Account Contact Info
Various types of Contact Info set for an Account in a given Order.
- PUT /orders/{orderId}/account/contactInfo/{contactType} - Set contact details
- GET /orders/{orderId}/account/contactInfo{contactType} - Returns contact details
- GET /orders/{orderId}/account/contactInfo - Returns all account contacts
- DELETE /orders/{orderId}/account/contactInfo/{contactType} - Deletes specific contact
Account Payment Information
Payment method information for an Account in a given Order. An account cannot have multiple payment methods.
- PUT /orders/{orderId}/account/paymentInfo - Sets the payment method for an account
- GET /orders/{orderId}/account/paymentInfo - Returns the payment method for an account
Account User
User information for an Account in a given Order.
- PUT /orders/{orderId}/account/user - Sets the account user credentials
- GET /orders/{orderId}/account/user - Returns information about account user credentials
Products
Products included in the order.
- POST /orders/{orderId}/account/products - Adds product to the account
- GET /orders/{orderId}/account/products - Gets all products
- GET /orders/{orderId}/account/products/{productId} - Gets the product details
- DELETE /orders/{orderId}/account/products/{productId} - Removes product from the order
Services
Services included in the products.
- POST /orders/{orderId}/account/products/{productId}/services - Adds service to a product
- GET /orders/{orderId}/account/products/{productId}/services - Gets all services for a product
- GET /orders/{orderId}/account/products/{productId}/services/{serviceId} - Gets service details
- DELETE /orders/{orderId}/account/products/{productId}/services/{serviceId} - Removes service from a product
Service Attributes
Attributed for the included services.
- PUT /orders/{orderId}/account/products/{productId}/services/{serviceId}/attributes - Adds service attributes
- GET /orders/{orderId}/account/products/{productId}/services/{serviceId}/attributes - Gets service attributes
- OPTIONS /orders/{orderId}/account/products/{productId}/services/{serviceId}/attributes - Returns information about supported attributes
- Service Attributes Structure - Structure of attributes set supported by Hostway API
Promotion Codes
Describes handling of promotion codes.
Product Promotion Codes
- PUT /orders/{orderId}/account/products/{productId}/promotion - Add or update promotion code for a product.
- DELETE /orders/{orderId}/account/products/{productId}/promotion - Removes the promotion code for a product.
Custom Discounts
Custom discounts at the order, product and service levels. Managing discounts requires elevated permissions.
Order Discounts
- PUT /orders/{orderId}/discounts - Adds order discounts
- GET /orders/{orderId}/discounts - Returns all order discounts
- DELETE /orders/{orderId}/discounts - Removes all order discounts
Product Discounts
- PUT /orders/{orderId}/account/products/{productId}/discounts - Adds product discounts
- GET /orders/{orderId}/account/products/{productId}/discounts - Returns all product discounts
- DELETE /orders/{orderId}/account/products/{productId}/discounts - Removes all product discounts
Service Discounts
- PUT /orders/{orderId}/account/products/{productId}/services/{serviceId}/discounts - Adds service discounts
- GET /orders/{orderId}/account/products/{productId}/services/{serviceId}/discounts - Returns all service discounts
- DELETE /orders/{orderId}/account/products/{productId}/services/{serviceId}/discounts - Removes all service discounts
Order Quote
Quote information for a given order.
- GET /orders/{orderId}/quote - Returns quote for the products and services in the order
See also