Add tickets to a dataset
curl --request POST \
--url https://judged.systems/api/datasets/{datasetId}/tickets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"tickets": [
{
"externalId": "48213",
"subject": "Charged twice for May",
"customerMessage": "I was billed twice and want one refunded."
}
]
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tickets: [
{
externalId: '48213',
subject: 'Charged twice for May',
customerMessage: 'I was billed twice and want one refunded.'
}
]
})
};
fetch('https://judged.systems/api/datasets/{datasetId}/tickets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://judged.systems/api/datasets/{datasetId}/tickets"
payload = { "tickets": [
{
"externalId": "48213",
"subject": "Charged twice for May",
"customerMessage": "I was billed twice and want one refunded."
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"inserted": 123,
"total": 123
}{
"error": "<string>",
"issues": [
{}
]
}Datasets
Add tickets to a dataset
Requires packs:write. Tickets are redacted before they are stored. A dataset holds at most 250 tickets. JSON body is . text/csv needs a header row with subject and customerMessage. externalId is optional.
POST
/
api
/
datasets
/
{datasetId}
/
tickets
Add tickets to a dataset
curl --request POST \
--url https://judged.systems/api/datasets/{datasetId}/tickets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"tickets": [
{
"externalId": "48213",
"subject": "Charged twice for May",
"customerMessage": "I was billed twice and want one refunded."
}
]
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tickets: [
{
externalId: '48213',
subject: 'Charged twice for May',
customerMessage: 'I was billed twice and want one refunded.'
}
]
})
};
fetch('https://judged.systems/api/datasets/{datasetId}/tickets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://judged.systems/api/datasets/{datasetId}/tickets"
payload = { "tickets": [
{
"externalId": "48213",
"subject": "Charged twice for May",
"customerMessage": "I was billed twice and want one refunded."
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"inserted": 123,
"total": 123
}{
"error": "<string>",
"issues": [
{}
]
}