Zapisz pola dodatkowe wielu obiektów
PUT
/api/v2/AdditionalFields/many
const url = 'https://twoja-instancja-additional-fields-api.enterprise.sellrocket.pl/api/v2/AdditionalFields/many';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '[{"objectId":1,"ownerType":"example","fields":[{"fieldName":"example","fieldType":"example","fieldValue":"example","additionalFieldDefinition":{"fieldName":"example","fieldDisplayName":"example","fieldType":"example","predefinedValues":["example"]}}]}]'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://twoja-instancja-additional-fields-api.enterprise.sellrocket.pl/api/v2/AdditionalFields/many \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '[ { "objectId": 1, "ownerType": "example", "fields": [ { "fieldName": "example", "fieldType": "example", "fieldValue": "example", "additionalFieldDefinition": { "fieldName": "example", "fieldDisplayName": "example", "fieldType": "example", "predefinedValues": [ "example" ] } } ] } ]'Masowo tworzy lub aktualizuje wartości pól dodatkowych dla wielu obiektów w jednym żądaniu.
Autoryzacja
Dział zatytułowany „Autoryzacja”Treść żądania
Dział zatytułowany „Treść żądania”Array<object>
object
objectId
integer format: int64
ownerType
string
fields
Array<object>
object
fieldName
string
fieldType
string
fieldValue
string
additionalFieldDefinition
object
fieldName
string
fieldDisplayName
string
fieldType
string
predefinedValues
Array<string>
Examplegenerated
[ { "objectId": 1, "ownerType": "example", "fields": [ { "fieldName": "example", "fieldType": "example", "fieldValue": "example", "additionalFieldDefinition": { "fieldName": "example", "fieldDisplayName": "example", "fieldType": "example", "predefinedValues": [ "example" ] } } ] }]Array<object>
object
objectId
integer format: int64
ownerType
string
fields
Array<object>
object
fieldName
string
fieldType
string
fieldValue
string
additionalFieldDefinition
object
fieldName
string
fieldDisplayName
string
fieldType
string
predefinedValues
Array<string>
Examplegenerated
[ { "objectId": 1, "ownerType": "example", "fields": [ { "fieldName": "example", "fieldType": "example", "fieldValue": "example", "additionalFieldDefinition": { "fieldName": "example", "fieldDisplayName": "example", "fieldType": "example", "predefinedValues": [ "example" ] } } ] }]Array<object>
object
objectId
integer format: int64
ownerType
string
fields
Array<object>
object
fieldName
string
fieldType
string
fieldValue
string
additionalFieldDefinition
object
fieldName
string
fieldDisplayName
string
fieldType
string
predefinedValues
Array<string>
Examplegenerated
[ { "objectId": 1, "ownerType": "example", "fields": [ { "fieldName": "example", "fieldType": "example", "fieldValue": "example", "additionalFieldDefinition": { "fieldName": "example", "fieldDisplayName": "example", "fieldType": "example", "predefinedValues": [ "example" ] } } ] }]Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success
Typ treściapplication/json
Array<object>
object
objectId
integer format: int64
ownerType
string
createdFields
Array<object>
object
fieldName
string
fieldValue
string
fieldType
string
outcome
string
Examplegenerated
[ { "objectId": 1, "ownerType": "example", "createdFields": [ { "fieldName": "example", "fieldValue": "example", "fieldType": "example", "outcome": "example" } ] }]Bad Request
Typ treściapplication/json
object
error
string
Examplegenerated
{ "error": "example"}Server Error

