ATUM REST API

Inventory log notes

ATUM

The inventory log notes API allows you to create, view, and delete individual inventory log notes.
Inventory log notes are added by administrators and programmatically to store data about an inventory log, or its events.

Inventory log note properties

AttributeTypeDescription
idintegerUnique identifier for the resource. read-only
authorstringInventory log note author: the name of the user that added it, or ATUM for the system notes. read-only
date_createddate-timeThe date the inventory log note was created, in the site's timezone. read-only
date_created_gmtdate-timeThe date the inventory log note was created, as GMT. read-only
notestringInventory log note content. mandatory
added_by_userbooleanIf true, this note will be attributed to the current user. If false, the note will be attributed to the system. Default is false.
actionstringAction described in the note. For example: apiNote (note added through the API), changeStatus, increaseStock, decreaseStock or stockLevelsChanged. read-only
paramsarrayList of parameters to parse the action (for example, the old and new statuses of a changeStatus note). read-only

The action and params fields are only included in the view context, so they aren't returned when creating or deleting a note (these requests use the edit context).

Create an inventory log note

This API helps you to create a new note for an inventory log.

HTTP request

POST/wp-json/wc/v3/atum/inventory-logs/<id>/notes
curl -X POST https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes \
	-u consumer_key:consumer_secret \
	-H "Content-Type: application/json" \
	-d '{
  "note": "Test Note!!!",
  "added_by_user": true
}'
JSON response example
{
    "id": 4202,
    "author": "John Doe",
    "date_created": "2019-11-11T13:27:10",
    "date_created_gmt": "2019-11-11T12:27:10",
    "note": "Test Note!!!",
    "added_by_user": true,
    "_links": {
        "self": [
            {
                "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes/4202"
            }
        ],
        "collection": [
            {
                "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes"
            }
        ],
        "up": [
            {
                "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713"
            }
        ]
    }
}

Retrieve an inventory log note

This API lets you retrieve and view a specific note from an inventory log.

HTTP request

GET/wp-json/wc/v3/atum/inventory-logs/<id>/notes/<note_id>
curl https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes/4202 \
	-u consumer_key:consumer_secret
JSON response example
{
    "id": 4202,
    "author": "John Doe",
    "date_created": "2019-11-11T13:27:10",
    "date_created_gmt": "2019-11-11T12:27:10",
    "note": "Test Note!!!",
    "added_by_user": true,
    "action": "apiNote",
    "params": [
        []
    ],
    "_links": {
        "self": [
            {
                "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes/4202"
            }
        ],
        "collection": [
            {
                "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes"
            }
        ],
        "up": [
            {
                "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713"
            }
        ]
    }
}

Available parameters

ParameterTypeDescription
contextstringScope under which the request is made; determines fields present in response. Options: view and edit. Default is view.

List all inventory log notes

This API helps you to view all the notes from an inventory log.

HTTP request

GET/wp-json/wc/v3/atum/inventory-logs/<id>/notes
curl https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes \
	-u consumer_key:consumer_secret
JSON response example
[
    {
        "id": 4202,
        "author": "John Doe",
        "date_created": "2019-11-11T13:27:10",
        "date_created_gmt": "2019-11-11T12:27:10",
        "note": "Test Note!!!",
        "added_by_user": true,
        "action": "apiNote",
        "params": [
            []
        ],
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes/4202"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes"
                }
            ],
            "up": [
                {
                    "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713"
                }
            ]
        }
    },
    {
        "id": 589,
        "author": "ATUM",
        "date_created": "2019-03-05T11:17:16",
        "date_created_gmt": "2019-03-05T11:17:16",
        "note": "Order status changed from Completed to Pending.",
        "added_by_user": false,
        "action": "changeStatus",
        "params": [
            {
                "old_status": "atum_completed",
                "new_status": "atum_pending"
            }
        ],
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes/589"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes"
                }
            ],
            "up": [
                {
                    "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713"
                }
            ]
        }
    },
    {
        "id": 588,
        "author": "ATUM",
        "date_created": "2019-03-05T11:16:52",
        "date_created_gmt": "2019-03-05T11:16:52",
        "note": "Order status changed from Pending to Completed.",
        "added_by_user": false,
        "action": "changeStatus",
        "params": [
            {
                "old_status": "atum_pending",
                "new_status": "atum_completed"
            }
        ],
        "_links": {
            "self": [
                {
                    "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes/588"
                }
            ],
            "collection": [
                {
                    "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes"
                }
            ],
            "up": [
                {
                    "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713"
                }
            ]
        }
    }
]

Available parameters

ParameterTypeDescription
typestringLimit result to user or system notes. Options: any, user and system. Default is any.

Delete an inventory log note

This API helps you delete an inventory log note.

HTTP request

DELETE/wp-json/wc/v3/atum/inventory-logs/<id>/notes/<note_id>
curl -X DELETE https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes/4202?force=true \
	-u consumer_key:consumer_secret
JSON response example
{
    "id": 4202,
    "author": "John Doe",
    "date_created": "2019-11-11T13:27:10",
    "date_created_gmt": "2019-11-11T12:27:10",
    "note": "Test Note!!!",
    "added_by_user": true,
    "_links": {
        "self": [
            {
                "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes/4202"
            }
        ],
        "collection": [
            {
                "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713/notes"
            }
        ],
        "up": [
            {
                "href": "https://example.com/wp-json/wc/v3/atum/inventory-logs/713"
            }
        ]
    }
}

Available parameters

ParameterTypeDescription
forcebooleanRequired to be true, as resource does not support trashing. Default is false.

On this page