Commands › Inventory
inventory_to_prim
Copy an inventory item into an object's contents
Usage
curl -X POST "https://api.lifebots.cloud/api/bot.html" \
-H "Content-Type: application/json" \
-d '{
"action": "inventory_to_prim",
"apikey": "YOUR_API_KEY",
"botname": "Joe Resident",
"secret": "bot-secret-123",
"inventory": "5d2d7a1d-0e8e-4f5d-a678-000000000000",
"prim": "9f8e7d6c-5b4a-4321-8fed-000000000000",
"dataType": "json"
}' Every request also needs apikey, botname and secret — see Authentication.
Parameters
| Name | Required | Description |
|---|---|---|
inventoryUUID | yes | Inventory item to put in. Also accepted as: itemId |
primUUID | yes | Object (prim) in the bot's region. Also accepted as: uuid |
Example response
{
"success": true,
"result": "OK",
"resulttext": "Item added to prim inventory"
} With dataType=json. A failure has result: "FAIL" and the reason in resulttext — see Responses & errors.
Good to know
- The object must have streamed in to the bot. OK means it was sent; the object's owner permissions may still refuse it.