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

From Hostway API Documentation
Jump to: navigation, search

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

Set promotion code for a product in an order.

Contents


Request

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

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

Query String Parameters

None.

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.

Response

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.

Example

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

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": ""
  }
}

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox