PATCH - Update Asset
Use this endpoint to update an asset
PATCH
https://api.readyplayer.me/v1/assets/:id
Path Parameters
Name
Type
Description
id*
string
The id of the asset you want to update.
Request Body
Name
Type
Description
data.name
string
Minimum length of 1 character
data.type
enum(string)
Possible values:
outfit
data.gender
enum(string)
Possible values:
male
, female
, neutral
data.modelUrl
url
Must be a valid url pointing to a GLB file.
data.iconUrl
url
Must be a valid url pointing to a PNG or JPG file.
data.locked
boolean
data.applications
array
list of application-asset relations this asset should be available in.
{
"data": {
"id": "640f2b0ed1dbab604a9955d0",
"type": "outfit",
"gender": "female",
"iconUrl": "https://example.org/icon.png",
"modelUrl": "https://example.org/model.glb",
"status": "draft",
"organizationId": "53a58ec6df126a3df8ce0d72",
"name": "Asset test updated",
"applicationIds": [],
"createdAt": "2023-03-14T09:32:31.423Z",
"updatedAt": "2023-03-14T09:32:48.804Z",
"publishedAt": "2023-03-14T09:32:48.804Z",
}
}
Example Request Body
{
"data": {
"name": "jacket-occassionwear-02",
"organizationId": "6453d11c462434a35b4abe17",
"locked": false,
"type": "outfit",
"gender": "neutral",
"modelUrl": "https://example.org/jacket-occassionwear-02.glb",
"iconUrl": "https://example.org/jacket-occassionwear-02.png",
"applications": [
{
"id": "6479be53386e0a8665161420",
"organizationId": "62a58eb4df136d4df8ce0d74",
"isVisibleInEditor": true
}
],
}
}
Example Response
{
"data": {
"id": "145064511",
"name": "jacket-occassionwear-02",
"organizationId": "6453d11c462434a35b4abe17",
"locked": false,
"type": "top",
"gender": "neutral",
"modelUrl": "https://example.org/jacket-occassionwear-02.glb",
"iconUrl": "https://example.org/jacket-occassionwear-02.png",
"applications": [
{
"id": "6479be53386e0a8665161420",
"organizationId": "62a58eb4df136d4df8ce0d74",
"isVisibleInEditor": true,
"masculineOrder": 1,
"feminineOrder": 2
}
],
"hasApps": true,
"createdAt": "2023-02-02T14:39:01.026Z",
"updatedAt": "2023-02-02T14:39:08.656Z"
}
}
Last updated
Was this helpful?