Assign asset to a product

This api will all you to add product reference to an asset in your container.

PUT /v4/file/{file_uuid}/product

API Permissions

FILE_PRODUCT_CHANGE

Body

{
    "product": {
        "ref": "H03423",
        "position": 1, // optional
    }
}

You can later modify the position with the Modify product position endpoint.

Try it out

Request

Copy-paste the cURL request in your Terminal or click on the API Explorer tab to see the API in action.

host: 'https://api.filerobot.com/fdocs' path: /v4/file/{file_uuid}/product headers: X-Filerobot-Key: 19692813e7364ef8ad6a6504d50a12ca variables: file_uuid: d7a64732-8a70-5b28-a483-b09298350000 theme: clouds-midnight editor_theme: clouds_midnight method: PUT body: | { "product": { "ref": "AZERTY", "position": 1 } } render: curl_tab: true

Response

{
    "status": "success",
    "action": "product_ref_updated",
    "product_ref": "H03423",
    "product_position": 1,
    "file_uuid": "d7a64732-8a70-5b28-a483-b09298350000",
    "file": {
        "uuid": "d7a64732-8a70-5b28-a483-b09298350000",
        "name": "leather.jpg",
        "extension": "jpg",
        "size": {
            "bytes": 104778,
            "pretty": "102.32 KB"
        },
        "type": "image/jpeg",
        "info": {
            "area": 667000,
            "name": "leather.jpg",
            "type": "image/jpeg",
            "img_h": 1000,
            "img_o": "PO",
            "img_w": 667,
            "img_type": "JPEG",
            "visibility": "2"
        },
        "meta": {
            "sku": "A320120",
            "price": "70",
            "title": {
                "de_DE": "Boot",
                "en_US": "boat",
                "fr_FR": "bateau",
                "it_IT": "barca"
            },
            "category": [],
            "material": "leather",
            "description": {
              "de_DE": "ein kleines Boot",
              "en_US": "a small boat",
              "fr_FR": "un petit bateau",
              "it_IT": "una piccola barca"
            },
        },
        "tags": {},
        "visibility": {
            "value": "VISIBILITY_INHERIT",
            "inherited": "VISIBILITY_PUBLIC",
            "set": "VISIBILITY_INHERIT",
            "actual": "VISIBILITY_PUBLIC"
        },
        "url": {
            "public": "https://store.filerobot.com/fdocs/api-demo/new-folder/leather.jpg",
            "permalink": "https://api.filerobot.com/fdocs/v4/get/d7a64732-8a70-5b28-a483-b09298350000",
            "cdn": "https://fdocs.filerobot.com/api-demo/new-folder/leather.jpg?vh=2558f1",
            "path": "/api-demo/new-folder/leather.jpg"
        },
        "hash": {
            "sha1": "2558f1789fdb6b31c173602ed600183185a9448d",
            "blurhash": null
        },
        "created_at": "2021-08-23T12:42:45Z",
        "modified_at": "2021-09-06T19:48:48Z",
        "folder": {
            "uuid": "c35f5199-19da-57e1-9230-ec4a136db6b6",
            "name": "/api-demo/new-folder"
        }
    }
}