Orders-orderId-account-contactInfo-contactType:DELETE

From Hostway API Documentation
Revision as of 03:44, 11 September 2014 by Pa.dinh (Talk)
Jump to: navigation, search

DELETE /orders/{orderId}/account/contactInfo/{contactType}

Deletes the account contact details for a given contact type in an order.

Contents


Request

DELETE /orders/{orderId}/account/contactInfo/{contactType}

Request Parameters

orderId - string
The unique order Id. The URI of the order is returned by the POST /orders call.
contact_type - string
Contact Type (regular, billing, administrator or technical)

URI 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 Error Message Description
204 No Content - The contact info was successfully deleted.
404 Not Found Resource not found The specified order does not exist.
An account has not been added to the given order.
The specified contact type is not set
502 Bad Gateway - Unexpected backend response. Cannot delete contact info.

Example

Successfully delete contact type of an order

Request

DELETE /orders/{orderId}/account/contactInfo/billing
Cookie: OwnerId={owner_id}; Path=/

Response

204 No Content

Delete contact info of unset contact type

Request

DELETE /orders/{orderId}/account/contactInfo/billing
Cookie: OwnerId={owner_id}; Path=/

Response

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

{
  "itemNotFound": {
    "guid": "3f8d5d31-3986-4075-8a13-5fe3e20a2be4",
    "message": "Resource not found",
    "code": 404,
    "details": ""
  }
}

Accout has not been set

Request

DELETE /orders/{orderId}/account/contactInfo/billing
Cookie: OwnerId={owner_id}; Path=/

Response

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

{
  "itemNotFound": {
    "guid": "3f8d5d31-3986-4075-8a13-5fe3e20a2be4",
    "message": "Resource not found",
    "code": 404,
    "details": ""
  }
}

Order does not exist

Request

DELETE /orders/{non-existent_orderId}/account/contactInfo/billing
Cookie: OwnerId={owner_id}; Path=/

Response

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

{
  "itemNotFound": {
    "guid": "80d5e49e-0795-4209-a929-1ee051e0f252",
    "message": "Resource not found",
    "code": 404,
    "details": ""
  }
}

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox