Update deal fields
Sets field values for a deal. `field_id` comes from GET /deals/fields. When multiple is true, value is an array and can include more than one option name: {"deal_id": 12, "fields": [{"field_id": 47, "value": ["Barzahler", "Finanzierung"]}]}. Each name must be in that field's options. signature and uploader must be binary (base64 or a data URL). date must be Y-m-d. An empty string clears the value.
post
/api/v1/deals/fields
Security
Request body required
application/json
Example
{
"deal_id": 12,
"fields": [
{
"field_id": 47,
"value": [
"Barzahler",
"Finanzierung"
]
}
]
}
Schema
{
"type": "object",
"required": [
"deal_id",
"fields"
],
"properties": {
"deal_id": {
"type": "integer"
},
"fields": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"field_id",
"value"
],
"properties": {
"field_id": {
"type": "integer",
"description": "Field id from `GET /deals/fields`."
},
"value": {
"nullable": true,
"description": "text/longtext/link/plaintext string; number; date `Y-m-d`; dropdown/checkbox array of option names; dropdown_single/radio one option name; product id; signature/uploader base64 or data URL. Empty string clears the value. `table` and `fixed_table` fields are not accepted.\n"
}
}
}
}
}
}
Responses
200
Deal fields updated
application/json
{
"allOf": [
{
"title": "API envelope",
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string",
"nullable": true
},
"errors": {
"nullable": true
},
"meta": {
"type": "object",
"nullable": true,
"additionalProperties": true
}
}
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"required": [
"deal_id",
"fields"
],
"properties": {
"deal_id": {
"type": "integer"
},
"fields": {
"type": "array",
"items": {
"type": "object",
"required": [
"field_id"
],
"properties": {
"field_id": {
"type": "integer"
},
"value": {
"nullable": true,
"description": "Value stored for this field, in the same shape as `GET /deals/fields`."
}
}
}
}
}
}
}
}
]
}
401
Missing or invalid API key
application/json
{
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string",
"example": "Missing API key (X-Api-Key)"
}
}
}
404
Resource not found
application/json
{
"title": "API envelope",
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string",
"nullable": true
},
"errors": {
"nullable": true
},
"meta": {
"type": "object",
"nullable": true,
"additionalProperties": true
}
}
}
422
Validation failed
application/json
{
"title": "API envelope",
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string",
"nullable": true
},
"errors": {
"nullable": true
},
"meta": {
"type": "object",
"nullable": true,
"additionalProperties": true
}
}
}