Add product reference to file
This api will all you to add reference to a file.
Add a product reference to one file
PUT
/file/{file_uuid}/product
API Permissions
FILE_PRODUCT_CHANGE
Body
{
"product": {
"ref": "AZERTY",
"position": 1, // not required
}
}
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'
path: /fusqadtm/file/{file_uuid}/product
headers:
X-Filerobot-Key: 19692813e7364ef8ad6a6504d50a12ca
varaibles:
file_uuid: 4045f60e-8a91-5039-bb4e-3d3d247056e9
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": "AZERTY",
"product_position": 1
"file_uuid": "4045f60e-8a91-5039-bb4e-3d3d247056e9"
}
Add a product reference to mutiple files
PUT
/product/{product_ref}/files
API Permissions
FILE_PRODUCT_CHANGE
Body
{
"files_uuids": [
"4045f60e-8a91-5039-bb4e-3d3d247056e9",
"bb4ef60e-ef60-bb4e-3d3d-3d3d2478a911"
]
}
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'
path: /fusqadtm/product/{product_ref}/files
headers:
X-Filerobot-Key: 19692813e7364ef8ad6a6504d50a12ca
varaibles:
product_ref: AZERTY
theme: clouds-midnight
editor_theme: clouds_midnight
method: PUT
body: |
{
"files_uuids": [
"4045f60e-8a91-5039-bb4e-3d3d247056e9",
"bb4ef60e-ef60-bb4e-3d3d-3d3d2478a911"
]
}
render:
curl_tab: true
Response
{
"status":"success",
"action":"product_ref_updated",
"product_ref": "AZERTY",
"files_uuids": [
"4045f60e-8a91-5039-bb4e-3d3d247056e9",
"bb4ef60e-ef60-bb4e-3d3d-3d3d2478a911"
]
}
Change file order
PATCH
/file/{file_uuid}/product/position
API Permissions
FILE_PRODUCT_CHANGE
Body
{
"position": 2
}
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'
path: /fusqadtm/file/{file_uuid}/product/position
headers:
X-Filerobot-Key: 19692813e7364ef8ad6a6504d50a12ca
varaibles:
file_uuid: 4045f60e-8a91-5039-bb4e-3d3d247056e9
theme: clouds-midnight
editor_theme: clouds_midnight
method: PUT
body: |
{
"position": 1
}
render:
curl_tab: true
Response
{
"status":"success",
"action":"product_position_updated",
"product_ref": "AZERTY",
"product_position": 1
"file_uuid": "4045f60e-8a91-5039-bb4e-3d3d247056e9"
}
Change reference name on all occurence
PATCH
/product/{product_ref}
API Permissions
FILE_PRODUCT_CHANGE
Body
{
"ref": "AZERTY2"
}
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'
path: /fusqadtm/product/{product_ref}/files
headers:
X-Filerobot-Key: 19692813e7364ef8ad6a6504d50a12ca
varaibles:
product_ref: AZERTY
theme: clouds-midnight
editor_theme: clouds_midnight
method: PUT
body: |
{
"ref": "AZERTY2"
}
render:
curl_tab: true
Response
{
"status":"success",
"action":"product_ref_updated",
"product_ref": "AZERTY2",
"files_uuids": [
"4045f60e-8a91-5039-bb4e-3d3d247056e9",
"bb4ef60e-ef60-bb4e-3d3d-3d3d2478a911"
]
}