Create content
Uploads a binary file as a Content resource the client can later attach to an expense record (e.g. as a receipt). The created resource is temporary — owned by the caller and eligible for cleanup if it is not subsequently attached. When action=scan is passed, the OCR result is persisted on the resource so it can be referenced later without re-scanning.
curl --request POST \
--url https://stage-api.findity.com/api/v1/expense/content \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '<string>'import requests
url = "https://stage-api.findity.com/api/v1/expense/content"
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://stage-api.findity.com/api/v1/expense/content', 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://stage-api.findity.com/api/v1/expense/content",
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://stage-api.findity.com/api/v1/expense/content"
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://stage-api.findity.com/api/v1/expense/content")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/expense/content")
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{
"id": "62bfaa54dc9341819cd6f4ff4ae39f44",
"personId": "063ee3c7fa4b4728b418097299447f9d",
"contentType": "application/pdf",
"isTemporary": true,
"signatureType": null,
"signatureUrl": null,
"name": "receipt-photo.jpg",
"description": "Receipt photo",
"qrScan": "A:514482621*B:501878076*C:PT*D:FR*E:N*F:20260508*G:111 26A/154*H:J6Z9V4MR-154*I1:PT-MA*I7:68.50*I8:15.76*N:15.76*O:84.26*Q:T4Fn*R:116",
"scanResult": {
"id": "a185160800524ac68cbf0a18ad59649b",
"amount": 135,
"taxAmount": 23,
"currency": "SEK",
"purchaseDate": "2023-04-20",
"categoryIds": [
"575ba2572de74f38b947a07df93a2909",
"350dadb020694421aebc1d9473fa64a9"
],
"categoryId": "575ba2572de74f38b947a07df93a2909"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
MIME type of the request body. Must be image/* or application/pdf; the server also verifies the bytes match the declared type.
Optional name for the uploaded content. URL-decoded server-side. Auto-generated if omitted.
Optional description for the uploaded content. URL-decoded server-side.
Optional URL-encoded string extracted from a fiscal QR code on the receipt (currently used for Portuguese receipts). URL-decoded server-side and persisted on the resource; the decoded value is returned in the response and on subsequent reads. Send only when the verification.receiptAttachment field has qrCodeSupported: true (see the fields endpoint) and the client successfully scanned a QR — otherwise omit the header.
Query Parameters
Optional server-side action to run against the uploaded content. scan runs synchronous OCR; the result is persisted on the resource.
scan Organization scope for the request. Required when the caller has access to more than one organization; auto-inferred otherwise. UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$Body
The body is of type file.
Response
OK
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$EU Decoded fiscal QR string as sent in the qrScan request header on POST. Omitted when the resource has no QR data attached. Currently populated for Portuguese receipts.
Hide child attributes
Hide child attributes
UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$curl --request POST \
--url https://stage-api.findity.com/api/v1/expense/content \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '<string>'import requests
url = "https://stage-api.findity.com/api/v1/expense/content"
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://stage-api.findity.com/api/v1/expense/content', 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://stage-api.findity.com/api/v1/expense/content",
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://stage-api.findity.com/api/v1/expense/content"
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://stage-api.findity.com/api/v1/expense/content")
.header("Content-Type", "<content-type>")
.header("Authorization", "Bearer <token>")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://stage-api.findity.com/api/v1/expense/content")
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{
"id": "62bfaa54dc9341819cd6f4ff4ae39f44",
"personId": "063ee3c7fa4b4728b418097299447f9d",
"contentType": "application/pdf",
"isTemporary": true,
"signatureType": null,
"signatureUrl": null,
"name": "receipt-photo.jpg",
"description": "Receipt photo",
"qrScan": "A:514482621*B:501878076*C:PT*D:FR*E:N*F:20260508*G:111 26A/154*H:J6Z9V4MR-154*I1:PT-MA*I7:68.50*I8:15.76*N:15.76*O:84.26*Q:T4Fn*R:116",
"scanResult": {
"id": "a185160800524ac68cbf0a18ad59649b",
"amount": 135,
"taxAmount": 23,
"currency": "SEK",
"purchaseDate": "2023-04-20",
"categoryIds": [
"575ba2572de74f38b947a07df93a2909",
"350dadb020694421aebc1d9473fa64a9"
],
"categoryId": "575ba2572de74f38b947a07df93a2909"
}
}
