Add new value(s) to a field
Values can be added to a project’s field.
Request | |
---|---|
Method | POST |
Resource | https://[customer].asp.virtual-call-center.eu/v2/projects/[projectid]/fields/[fieldid]/values |
Options | N/A |
Body | Array of value objects, encoded in JSON. |
Response | |
Body | New valueID(s), encoded in JSON. |
Request
Resource parameters
Name | Type | Mandatory | Comment |
---|---|---|---|
customer | string | yes | Your call centre’s unique identifier (subdomain). |
fieldid | integer | yes | Field identifier. |
projectid | integer | yes | Unique project identifier. |
Request object
Name | Type | Mandatory | Comment |
---|---|---|---|
array | yes | Array of value objects. |
Value object
Name | Type | Mandatory | Comment |
---|---|---|---|
comission | string | no | Agent’s commission. |
description | string | no | Simple description. |
exportvalue | string | no | Value’s export name. |
name | string | yes | Value name. |
price | string | no | Call centre’s commission. |
Example
Request
URL: https://mycc.asp.virtual-call-center.eu/v2/projects/10/fields/3/value
Request body
[
{
"name": "high school",
"exportvalue": "HS",
"description": "high school graduate",
"commission": "100",
"price": "200"
},
{
"name": "university",
"exportvalue": "U",
"description": "university degree",
"commission": "10",
"price": "20"
}
]
Response body – on success
{
"errors": [],
"response": [
6,
7
]
}
Response body – on error
{
"errors": [
{
"errorcode": 417,
"index": 1,
"errormessage": "error.name_must_be_between",
"property": "name"
},
{
"errorcode": 417,
"index": 3,
"errormessage": "error.name_must_be_between",
"property": "name"
},
{
"errorcode": 417,
"index": 6,
"errormessage": "error.value_name_already_exists",
"property": "name"
}
],
"response": {
"0": 8,
"2": 9,
"4": 10,
"5": 11
}
}
Possible errors
HTTP Code | Message | Description |
---|---|---|
417 | error.adding_values_was_unsuccessful | Unsuccessful addition, the values were not created due to an error. |
417 | error.name_must_be_between | The name is too short or long. |
417 | error.value_name_already_exists | The value already exists in VCC’s database. |
417 | error.wrong_value_format | Missing value on a mandatory key. |
417 | error.wrong_values_format | The values sent are not correctly defined as an array or object. |
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.