Orders-orderId-account-products-productId-promotion:DELETE

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
(Status Code)
m (1 revision: Release 98)
 

Latest revision as of 08:51, 15 September 2014

[edit] DELETE /orders/{orderId}/account/products/{productId}/promotion

Set promotion code for a product in an order.

Contents


[edit] Request

DELETE /orders/{orderId}/account/products/{productId}/promotion

[edit] URI Parameters

orderId - string
The unique order Id. The URI of the order is returned by the POST /orders call.
productId - string
UUID specifying the product for which actions are to be performed

[edit] Query String Parameters

None.

[edit] Request Headers

Content-Type
Required. Set this header to application/json; charset=UTF-8
Cookie
A cookie named OwnerId to identify the client (for most browser clients, the browser will do this automatically, depending on the browser configuration). The value of the cookie would come from the response to the create order request in the Set-Cookie response header.

[edit] Response

[edit] Status Code

Status Code Error Message Description
204 No Content - The operation was successfully completed.
404 Not Found Resource not found Order does not exist.
Product does not exist.
502 Bad Gateway - Unexpected backend response. Cannot delete promotion code.

[edit] Example

[edit] Successfully delete a promotion code for product

Request

DELETE /orders/{orderId}/account/products/{product_id}/promotion
Cookie: OwnerId={owner_id}; Path=/

Response

204 No Content

[edit] Product does not exist

Request

DELETE /orders/{order_id}/account/products/{non-existent_product_id}/promotion
Cookie: OwnerId={owner_id}; Path=/

Response

404 Not found
Content-Type : application/json; charset=UTF-8

{
  "itemNotFound": {
    "guid": "ee20516d-011e-44ea-99d2-ae7a2b6fe99a",
    "message": "Resource not found",
    "code": 404,
    "details": ""
  }
}

[edit] See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox