Przejdź do głównej zawartości

Zapisz pola dodatkowe wielu obiektów

PUT
/api/v2/AdditionalFields/many
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.

Array<object>
object
objectId
integer format: int64
ownerType
string
nullable
fields
Array<object>
nullable
object
fieldName
string
nullable
fieldType
string
nullable
fieldValue
string
nullable
additionalFieldDefinition
object
fieldName
string
nullable
fieldDisplayName
string
nullable
fieldType
string
nullable
predefinedValues
Array<string>
nullable
Examplegenerated
[
{
"objectId": 1,
"ownerType": "example",
"fields": [
{
"fieldName": "example",
"fieldType": "example",
"fieldValue": "example",
"additionalFieldDefinition": {
"fieldName": "example",
"fieldDisplayName": "example",
"fieldType": "example",
"predefinedValues": [
"example"
]
}
}
]
}
]

Success

Typ treściapplication/json
Array<object>
object
objectId
integer format: int64
ownerType
string
nullable
createdFields
Array<object>
nullable
object
fieldName
string
nullable
fieldValue
string
nullable
fieldType
string
nullable
outcome
string
nullable
Examplegenerated
[
{
"objectId": 1,
"ownerType": "example",
"createdFields": [
{
"fieldName": "example",
"fieldValue": "example",
"fieldType": "example",
"outcome": "example"
}
]
}
]

Bad Request

Typ treściapplication/json
object
error
string
nullable
Examplegenerated
{
"error": "example"
}

Server Error