Reposition a Taxon
curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/taxons/{id}/reposition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"taxon": {
"new_parent_id": 1,
"new_position_idx": 1
}
}'
{
"data": {
"id": "79",
"type": "taxon",
"attributes": {
"position": 0,
"name": "taxon_25",
"permalink": "taxonomy-39/shorts/taxon-25",
"lft": 3,
"rgt": 4,
"description": null,
"created_at": "2022-11-08T19:35:53.074Z",
"updated_at": "2022-11-08T19:35:53.324Z",
"meta_title": null,
"meta_description": null,
"meta_keywords": null,
"depth": 2,
"public_metadata": {},
"private_metadata": {},
"pretty_name": "taxonomy_39 -> Shorts -> taxon_25",
"seo_title": "taxon_25",
"is_root": false,
"is_child": true,
"is_leaf": true
},
"relationships": {
"parent": {
"data": {
"id": "78",
"type": "taxon"
}
},
"taxonomy": {
"data": {
"id": "39",
"type": "taxonomy"
}
},
"children": {
"data": []
},
"image": {
"data": {
"id": "115",
"type": "taxon_image"
}
}
}
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Record updated
The response is of type object
.
Was this page helpful?
curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/taxons/{id}/reposition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"taxon": {
"new_parent_id": 1,
"new_position_idx": 1
}
}'
{
"data": {
"id": "79",
"type": "taxon",
"attributes": {
"position": 0,
"name": "taxon_25",
"permalink": "taxonomy-39/shorts/taxon-25",
"lft": 3,
"rgt": 4,
"description": null,
"created_at": "2022-11-08T19:35:53.074Z",
"updated_at": "2022-11-08T19:35:53.324Z",
"meta_title": null,
"meta_description": null,
"meta_keywords": null,
"depth": 2,
"public_metadata": {},
"private_metadata": {},
"pretty_name": "taxonomy_39 -> Shorts -> taxon_25",
"seo_title": "taxon_25",
"is_root": false,
"is_child": true,
"is_leaf": true
},
"relationships": {
"parent": {
"data": {
"id": "78",
"type": "taxon"
}
},
"taxonomy": {
"data": {
"id": "39",
"type": "taxonomy"
}
},
"children": {
"data": []
},
"image": {
"data": {
"id": "115",
"type": "taxon_image"
}
}
}
}
}