최근 검색


최근 검색 없음

Sean Russell's Avatar

Sean Russell

가입한 날짜: 2021년 5월 13일

·

마지막 활동: 2021년 10월 22일

팔로잉

0

팔로워

0

총 활동 수

8

투표 수

3

플랜 수

4

활동 개요

님의 최근 활동 Sean Russell

Sean Russell님이 에 게시물을 만듦

게시물 Developer - Zendesk APIs

I need to be able to update a ticket's custom_field value with an integer via ZAF Client request (the field "type" is "integer"). Using the request options below, the request is successful and the correct ticket field is updated, however the value is a String instead of Integer. This isn't a huge issue, but will require parsing the value to an integer when reading it, which isn't ideal. Is there a way to change my request to preserve the value's numeric datatype?

The request looks like this:

const options = {
url:`/api/v2/tickets/${ticketID}.json`,
type:"PUT",
contentType:'application/json',
dataType:"json",
data: JSON.stringify({ticket: {custom_fields: [{id: 1500003010701, value: 12}]}}),
}
client.request(options)

And the resulting ticket field looks like this:

{
"id": 1500003010701,
"value": "12"
}

Is there a way to ensure the value will be an Integer (12) rather than a String ("12") ?

2021년 4월 12일에 게시됨 · Sean Russell

0

팔로워

2

투표 수

1

댓글