Hi Dev Forum,
I am looking to update my remote phone address through platform API.
Currently , i have assigned my mobile number to a remote phone in Genesys , and I need to update this with another mobile number . Below is an api that i figured out to use . Is the choice of API correct ? If yes, why am i getting the error in response .
PUT /api/v2/telephony/providers/edges/phones/22915c57-b513-4d9a-bcd3-ff53ce1f3930 (last bit is my remote phone id).
With The body and response are as follows .
I am passing the body as follows :-
{
"name": "garimaRemote",
"site": {
"id": "6f143f33-3ee3-4106-a2e0-ac405ac82ef1"
},
"phoneBaseSettings": {
"id": "9c8f156c-bdb9-4b49-a74c-80d0fb33c116"
},
"lines": [
{
"name": "garimaRemote_1",
"properties": {
"station_label": {
"type": "string",
"value": {
"default": "Remote Phone"
}
},
"station_remote_address": {
"type": "string",
"value": {
"default": null,
"instance": "+918408040927"
},
"required": true
}
}
}
],
"properties": {}
}
Response : -
{
"message": "StationV2 with name 'garimaRemote_1' already exists.",
"code": "general.bad.request",
"status": 400,
"messageWithParams": "{entityName} with {fieldName} '{value}' already exists.",
"messageParams": {
"entityName": "StationV2",
"fieldName": "name",
"value": "garimaRemote_1"
},
"contextId": "1445edc6-41b3-4b12-8685-fb29aac6d30c",
"details": [
{
"errorCode": "DUPLICATE_LINE_NAME",
"fieldName": "lines[0].name"
}
],
"errors": []
}
Regards
Garima