Orders-orderId-account-products-productId-services-serviceId-notes:POST

From Hostway API Documentation
Jump to: navigation, search

POST /orders/{orderId}/account/products/{productId}/services/{serviceId}/notes

Adds a new note to a service in the order.

Contents


Request

POST /orders/{orderId}/account/products/{productId}/services/{serviceId}/notes

Request 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
serviceId - string
UUID specifying the service

URI Parameters

None.

Request Headers

Content-Type
Required. Set this header to application/json; charset=UTF-8


Request Body

{
  "note": "xx"
}

Parameters

note - string
The text of the note

Response

Status Code

Status Code Error Message Description
201 Created - The note was successfully added to the service.
400 Bad Request POST data error Trying to create a note without passing all the required attributes.
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 request was not properly authorized.
403 Forbidden Unauthorized: NotesView failed permission check The client does not have permissions to add notes.
404 Not Found Resource not found The order or product or service doesn't exist.
405 Method not allowed Method not allowed Trying to add notes for placed order.
502 Bad Gateway - Unexpected backend response.

Response Headers

None.

Response Body

Successful response

201 Created


Error responses

400 Bad Request - request body is missing some of the required attributes
{
    "badRequest": {
        "guid": "23bf964e-fb93-4bd6-816e-3dcb31b82755",
        "message": "POST data error",
        "code": 400,
        "details": {
            "note": "Required"
        }
    }
}
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 access to add notes.
{
    "forbidden": {
        "guid": "d336dd8e-bc52-44f3-b672-9aa2fac7fbf4",
        "message": "Unauthorized: NotesView failed permission check",
        "code": 403,
        "details": ""
    }
}
404 Not Found - the order, product or the service was not found.
{
    "itemNotFound": {
        "guid": "e1792d8a-5b0a-43ef-adf5-34a0710c8fc5",
        "message": "Resource not found",
        "code": 404,
        "details": ""
    }
}
{
    "badMethod": {
        "guid": "3e9418e0-5a5d-4652-ae50-0e665d39571a",
        "message": "Method not allowed",
        "code": 405,
        "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"
    }
}


See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox