I have the following code:
foreach ($collects as $collect) {
$collectId = $collect['id'];
$collectionId = $collect['collection_id'];
$collectCreateUrl = "https://{$storeUrl}/admin/api/2023-10/collects.json";
$data = [
'collect' => [
'product_id' => $productId,
'collection_id' => $collectionId,
'position' => 1
]
];
curlRequest($collectCreateUrl, $accessToken, 'POST', $data);
}
The code above is supposed to create a ‘collect’ for a product within a collection and set the position property to 1. Instead, it will set the position to be the last position within the collection specified and send the product to the end of the collection. I’m starting to believe it is impossible to manually set the position. Is this an expected behaviour? I cannot find anything in the documentation confirms this.