Orders-orderId-account-contactInfo-contactType:DELETE

From Hostway API Documentation
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
401 Unauthorized - No owner Id specified or the specified owner is not authorized to delete contact info for this order.
403 Forbidden Unauthorized: ContactInfo failed permission check Delete account contact info as an authenticated user, not associated with the order.
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

Get contact info with wrong OwnerId

Request

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

Response

401 Unauthorized
Content-Type: text/plain; charset=UTF-8

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.

Unassociated user without cookie

Request

DELETE /orders/{orderId}/account/contactInfo/billing
Authorization: {unassociated_user_authorization}

Response

403 Forbidden
Content-Type: application/json; charset=UTF-8

{
  "forbidden" : {
    "guid" : "53fd5c41-a4b1-48d1-8196-43fc5ba32cf2",
    "message" : "Unauthorized: ContactInfo failed permission check",
    "code" : 403,
    "details" : ""
  }
}

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