Orders-orderId-account-products-productId:DELETE

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
m (1 revision: Release 99)
 
(3 intermediate revisions by 2 users not shown)
Line 21: Line 21:
  
 
=== Status Code ===
 
=== Status Code ===
; 204 No Content
+
{| class="wikitable"
: The operation was successfully completed.
+
! Status Code
 +
! Error Message
 +
! Description
 +
|-
 +
| 204  
 +
| -
 +
| The product was successfully deleted.
 +
|-
 +
| 401 Unauthorized
 +
| This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
 +
| The '''OwnerId''' cookie or the '''Authorization''' header are not specified or invalid.
 +
|-
 +
| 403 Forbidden
 +
| Unauthorized: Products failed permission check
 +
| The client does not have permissions to delete products.
 +
|-
 +
| 404 Not Found
 +
| Resource not found
 +
| The client is trying to delete a non existing product or the order does not exist.
 +
|-
 +
| 502 Bad Gateway
 +
| -
 +
| Unexpected backend response.
 +
|}
  
; 401 Unauthorized
+
=== Response Body ===
: The '''OwnerId''' cookie or the '''Authorization''' header are not specified or do not permit access to the specified order.
+
  
; 404 Not Found
+
==== Successful response ====
: The specified order or product does not exist.
+
None.
 +
 
 +
==== Error responses ====
 +
<nowiki>401 Unauthorized
 +
 
 +
This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.</nowiki>
 +
 
 +
<nowiki>
 +
403 Forbidden - the client does not have permission to delete products.
 +
{
 +
    "forbidden": {
 +
        "guid": "d336dd8e-bc52-44f3-b672-9aa2fac7fbf4",
 +
        "message": "Unauthorized: Products failed permission check",
 +
        "code": 403,
 +
        "details": ""
 +
    }
 +
}</nowiki>
 +
 
 +
<nowiki>
 +
404 Not Found
 +
{
 +
    "itemNotFound": {
 +
        "guid": "579951da-5f2c-4db7-9169-25658bfaafdb",
 +
        "message": "Resource not found",
 +
        "code": 404,
 +
        "details": ""
 +
    }
 +
}</nowiki>
 +
 
 +
<nowiki>
 +
502 Bad Gateway - unexpected error from the backend.
 +
{
 +
    "computeFault": {
 +
        "guid": "8ced5fe7-f6a9-4e8f-8700-cfc9fa15e6ce",
 +
        "timestamp": "2014-09-10 20:59:50",
 +
        "code": 502,
 +
        "errorRefId": "8ced5fe7-f6a9-4e8f-8700-cfc9fa15e6ce"
 +
    }
 +
}</nowiki>
  
 
== See also ==
 
== See also ==

Latest revision as of 10:06, 14 October 2014

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

Removes a product from the account's order.

Contents


[edit] Request

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

[edit] Request Parameters

orderId - string
The unique order Id. The URI of the order is returned by the POST /orders call.
productId - string
Product's unique Id.

[edit] URI Parameters

None.

[edit] Request Headers

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 - The product was successfully deleted.
401 Unauthorized This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. The OwnerId cookie or the Authorization header are not specified or invalid.
403 Forbidden Unauthorized: Products failed permission check The client does not have permissions to delete products.
404 Not Found Resource not found The client is trying to delete a non existing product or the order does not exist.
502 Bad Gateway - Unexpected backend response.

[edit] Response Body

[edit] Successful response

None.

[edit] Error responses

401 Unauthorized

This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
403 Forbidden - the client does not have permission to delete products.
{
    "forbidden": {
        "guid": "d336dd8e-bc52-44f3-b672-9aa2fac7fbf4",
        "message": "Unauthorized: Products failed permission check",
        "code": 403,
        "details": ""
    }
}
404 Not Found
{
    "itemNotFound": {
        "guid": "579951da-5f2c-4db7-9169-25658bfaafdb",
        "message": "Resource not found",
        "code": 404,
        "details": ""
    }
}
502 Bad Gateway - unexpected error from the backend.
{
    "computeFault": {
        "guid": "8ced5fe7-f6a9-4e8f-8700-cfc9fa15e6ce",
        "timestamp": "2014-09-10 20:59:50",
        "code": 502,
        "errorRefId": "8ced5fe7-f6a9-4e8f-8700-cfc9fa15e6ce"
    }
}

[edit] See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox