Asset update error, not found for exist asset

Asset update error, not found for exist asset

greg11223
Shopify Partner
3 0 0
Hello i send this request : 

curl --location --globoff 'https://itbcode.myshopify.com/admin/api/2024-01/themes/160877478194/assets.json?asset[key]=assets%2Ftest.css' \
--header 'X-Shopify-Access-Token: $token' \

get

{
    "asset": {
        "key": "assets/test.css",
        "public_url": "https://cdn.shopify.com/s/files/1/0746/5936/5170/t/2/assets/test.css?v=1729792972",
        "value": "",
        "created_at": "2024-10-24T14:02:52-04:00",
        "updated_at": "2024-10-24T14:02:52-04:00",
        "content_type": "text/css",
        "size": 0,
        "checksum": "d41d8cd98f00b204e9800998ecf8427e",
        "theme_id": 160877478194,
        "warnings": []
    }
}


so why this request 

curl --location --request PUT 'https://itbcode.myshopify.com/admin/api/2024-07/themes/160877478194/assets.json' \
--header 'X-Shopify-Access-Token: $token' \
--header 'Content-Type: application/json' \
--data '{
    "asset": {
        "key": "assets/test.css",
        "value": "body { background-color: #000; }"
    }
}'


i get

{
    "errors": "Not Found"
}

 

Replies 0 (0)