Zapisz link do zewnętrznego pliku w polu
POST
/api/v2/AdditionalFields/File/Link
const url = 'https://twoja-instancja-additional-fields-api.enterprise.sellrocket.pl/api/v2/AdditionalFields/File/Link';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"objectId":1,"ownerType":"example","fieldName":"example","id":1,"fileUrl":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://twoja-instancja-additional-fields-api.enterprise.sellrocket.pl/api/v2/AdditionalFields/File/Link \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "objectId": 1, "ownerType": "example", "fieldName": "example", "id": 1, "fileUrl": "example" }'Zapisuje podany URL zewnętrznego pliku jako wartość pola dodatkowego, bez przesyłania pliku.
Instead of uploading the file, this stores a provided link as the field value.
Autoryzacja
Dział zatytułowany „Autoryzacja”Treść żądania
Dział zatytułowany „Treść żądania”object
objectId
integer format: int64
ownerType
string
fieldName
string
id
integer format: int64
fileUrl
string
Examplegenerated
{ "objectId": 1, "ownerType": "example", "fieldName": "example", "id": 1, "fileUrl": "example"}object
objectId
integer format: int64
ownerType
string
fieldName
string
id
integer format: int64
fileUrl
string
Examplegenerated
{ "objectId": 1, "ownerType": "example", "fieldName": "example", "id": 1, "fileUrl": "example"}object
objectId
integer format: int64
ownerType
string
fieldName
string
id
integer format: int64
fileUrl
string
Examplegenerated
{ "objectId": 1, "ownerType": "example", "fieldName": "example", "id": 1, "fileUrl": "example"}object
objectId
integer format: int64
ownerType
string
fieldName
string
id
integer format: int64
fileUrl
string
object
objectId
integer format: int64
ownerType
string
fieldName
string
id
integer format: int64
fileUrl
string
object
objectId
integer format: int64
ownerType
string
fieldName
string
id
integer format: int64
fileUrl
string
Odpowiedzi
Dział zatytułowany „Odpowiedzi”Created
Typ treściapplication/json
object
fileUrl
string
Examplegenerated
{ "fileUrl": "example"}Bad Request
Typ treściapplication/json
object
error
string
Examplegenerated
{ "error": "example"}Server Error

