Claims
Create Claim Attachment
Uploads a document as a claim attachment and returns an attachment ID that can be used with other claim APIs
POST
/
api
/
claim
/
attachment
/
v1
cURL
curl --request POST \
--url https://forecaster.cairhealth.com/api/claim/attachment/v1 \
--header 'Authorization: Bearer <token>' \
--header 'content-type: <content-type>' \
--data '<string>'import requests
url = "https://forecaster.cairhealth.com/api/claim/attachment/v1"
payload = "<string>"
headers = {
"content-type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'content-type': '<content-type>', Authorization: 'Bearer <token>'},
body: '<string>'
};
fetch('https://forecaster.cairhealth.com/api/claim/attachment/v1', 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 => "https://forecaster.cairhealth.com/api/claim/attachment/v1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"content-type: <content-type>"
],
]);
$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 := "https://forecaster.cairhealth.com/api/claim/attachment/v1"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://forecaster.cairhealth.com/api/claim/attachment/v1")
.header("content-type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://forecaster.cairhealth.com/api/claim/attachment/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"attachmentId": "12345678-1234-1234-1234-123456789012"
}"Bad Request""Unauthorized"Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Content type of the attachment (e.g., 'application/pdf', 'image/jpeg', 'text/plain')
Body
text/plainapplication/jsonapplication/pdfimage/jpegimage/png
Raw content of the document to be attached
Plain text content
Response
Attachment uploaded successfully
ID of the created attachment that can be used with other claim APIs
⌘I
cURL
curl --request POST \
--url https://forecaster.cairhealth.com/api/claim/attachment/v1 \
--header 'Authorization: Bearer <token>' \
--header 'content-type: <content-type>' \
--data '<string>'import requests
url = "https://forecaster.cairhealth.com/api/claim/attachment/v1"
payload = "<string>"
headers = {
"content-type": "<content-type>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'content-type': '<content-type>', Authorization: 'Bearer <token>'},
body: '<string>'
};
fetch('https://forecaster.cairhealth.com/api/claim/attachment/v1', 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 => "https://forecaster.cairhealth.com/api/claim/attachment/v1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"content-type: <content-type>"
],
]);
$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 := "https://forecaster.cairhealth.com/api/claim/attachment/v1"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "<content-type>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://forecaster.cairhealth.com/api/claim/attachment/v1")
.header("content-type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://forecaster.cairhealth.com/api/claim/attachment/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = '<content-type>'
request["Authorization"] = 'Bearer <token>'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"attachmentId": "12345678-1234-1234-1234-123456789012"
}"Bad Request""Unauthorized"
