Group Notes

An order note contains some useful info about the order.

Notes collection

GET

Retrieve list of notes of the specific order.

GET /orgs/{org_pk}/orders/{order_pk}/notes/

Example request:

curl -iL --request GET "https://www.readycloud.com/api/v2/orgs/1/orders/1/notes/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"

Response 200 (application/json):

{
    "count": 2,
    "next": null,
    "previous": null,
    "results": [
        {
            "author": {
                "email": "[email protected]",
                "name": "Administrator",
                "system": true
            },
            "content": "Operator must call this customer as soon as possible",
            "created_at": "2015-08-14T08:11:38.912000Z",
            "updated_at": "2015-08-14T08:11:43.556000Z",
            "url": "/api/v2/orgs/1/orders/1/notes/2/"
        },
        {
            "author": {
                "email": "[email protected]",
                "name": "Mike",
                "system": false
            },
            "content": "Call only between 5PM - 8PM",
            "created_at": "2015-08-14T08:10:29.918000Z",
            "updated_at": "2015-08-14T08:10:29.918000Z",
            "url": "/api/v2/orgs/1/orders/1/notes/1/"
        }
    ]
}

POST

Create new note for the specific order.

POST /orgs/{org_pk}/orders/{order_pk}/notes/

Example request:

curl -iL --request POST -H "Content-Type: application/json" --upload-file data.json "https://www.readycloud.com/api/v2/orgs/1/orders/1/notes/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"

data.json:

{
    "author": {
        "email": "[email protected]",
        "name": "Administrator",
        "system": true
    },
    "content": "We are out of these items"
}

Response 201 (application/json):

{
    "author": {
        "email": "[email protected]",
        "name": "Administrator",
        "system": true
    },
    "content": "We are out of these items",
    "created_at": "2015-08-13T09:33:07Z",
    "updated_at": "2015-08-13T09:33:07Z",
    "url": "/api/v2/orgs/1/orders/1/notes/3/"
}

Note

GET

Retrieve details of an order note.

GET /orgs/{org_pk}/orders/{order_pk}/notes/{note_pk}/

Example request:

curl -iL --request GET "https://www.readycloud.com/api/v2/orgs/1/orders/1/notes/1/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"

Response 200 (application/json):

{
    "author": {
        "email": "[email protected]",
        "name": "Mike",
        "system": false
    },
    "content": "Call only between 5PM - 8PM",
    "created_at": "2015-08-14T08:10:29.918000Z",
    "updated_at": "2015-08-14T08:10:29.918000Z",
    "url": "/api/v2/orgs/1/orders/1/notes/1/"
}

PATCH

Update an order note.

PATCH /orgs/{org_pk}/orders/{order_pk}/notes/{note_pk}/

Example request:

curl -iL --request PATCH -H "Content-Type: application/json" --upload-file data.json "https://www.readycloud.com/api/v2/orgs/1/orders/1/notes/1/?bearer_token=4ef5b29b1f4f35c383bebfccf4bf4d01"

data.json:

{
    "author": {
        "email": "[email protected]"
    },
    "content": "Call only between 2PM - 8PM"
}

Response 200 (application/json):

{
    "author": {
        "email": "[email protected]",
        "name": "Mike",
        "system": false
    },
    "content": "Call only between 2PM - 8PM",
    "created_at": "2015-08-14T08:10:29.918000Z",
    "updated_at": "2015-08-13T09:33:07Z",
    "url": "/api/v2/orgs/1/orders/1/notes/1/"
}

DELETE

Delete an order note.

DELETE /orgs/{org_pk}/orders/{order_pk}/notes/{note_pk}/

Response 204 (application/json)