Add report code to a case
curl --request PATCH \
--url http://localhost/api/api/cases/{id}/report_code \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"report_code": "<string>"
}
'import requests
url = "http://localhost/api/api/cases/{id}/report_code"
payload = { "report_code": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({report_code: '<string>'})
};
fetch('http://localhost/api/api/cases/{id}/report_code', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://localhost/api/api/cases/{id}/report_code",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'report_code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost/api/api/cases/{id}/report_code"
payload := strings.NewReader("{\n \"report_code\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost/api/api/cases/{id}/report_code")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"report_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/api/api/cases/{id}/report_code")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"report_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"case_status": "<string>",
"ageing": 123,
"priority": 123,
"case_status_order": 123,
"alert_date": "<string>",
"alert_risk_rating": "HIGH",
"assignee": {
"id": 123,
"name": "<string>"
},
"bucket": {
"id": 123,
"name": "<string>"
},
"case_action": "<string>",
"case_subjects": {
"subject_1": {
"id": 123,
"name": "<string>",
"client_subject_id": "<string>"
},
"subject_2": {
"id": 123,
"name": "<string>",
"client_subject_id": "<string>"
}
},
"created_on": "<string>",
"rule": 123,
"active_timestamp": "2023-11-07T05:31:56Z"
}{
"detail": "<string>",
"code": "<string>",
"field_errors": {}
}{
"detail": "<string>",
"code": "<string>",
"field_errors": {}
}{
"detail": "<string>",
"code": "<string>",
"field_errors": {}
}Case
Add report code to a case
Add a report code to a specific case by its ID.
PATCH
/
api
/
cases
/
{id}
/
report_code
Add report code to a case
curl --request PATCH \
--url http://localhost/api/api/cases/{id}/report_code \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"report_code": "<string>"
}
'import requests
url = "http://localhost/api/api/cases/{id}/report_code"
payload = { "report_code": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({report_code: '<string>'})
};
fetch('http://localhost/api/api/cases/{id}/report_code', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://localhost/api/api/cases/{id}/report_code",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'report_code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost/api/api/cases/{id}/report_code"
payload := strings.NewReader("{\n \"report_code\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost/api/api/cases/{id}/report_code")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"report_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/api/api/cases/{id}/report_code")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"report_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"case_status": "<string>",
"ageing": 123,
"priority": 123,
"case_status_order": 123,
"alert_date": "<string>",
"alert_risk_rating": "HIGH",
"assignee": {
"id": 123,
"name": "<string>"
},
"bucket": {
"id": 123,
"name": "<string>"
},
"case_action": "<string>",
"case_subjects": {
"subject_1": {
"id": 123,
"name": "<string>",
"client_subject_id": "<string>"
},
"subject_2": {
"id": 123,
"name": "<string>",
"client_subject_id": "<string>"
}
},
"created_on": "<string>",
"rule": 123,
"active_timestamp": "2023-11-07T05:31:56Z"
}{
"detail": "<string>",
"code": "<string>",
"field_errors": {}
}{
"detail": "<string>",
"code": "<string>",
"field_errors": {}
}{
"detail": "<string>",
"code": "<string>",
"field_errors": {}
}Authorizations
CustomAuthenticationcookieAuth
Response
Report code added successfully.
Case object with all details
