Skip to main content
POST
/
v1
/
scanner
/
receipts
cURL
curl --request POST \
  --url http://localhost:3000/v1/scanner/receipts \
  --header 'Content-Type: application/json' \
  --data '
{
  "sweep_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "storage_paths": [
    "<string>"
  ],
  "page_count": 2,
  "total_bytes": 123
}
'
import requests

url = "http://localhost:3000/v1/scanner/receipts"

payload = {
"sweep_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"storage_paths": ["<string>"],
"page_count": 2,
"total_bytes": 123
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
sweep_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
storage_paths: ['<string>'],
page_count: 2,
total_bytes: 123
})
};

fetch('http://localhost:3000/v1/scanner/receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v1/scanner/receipts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sweep_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'storage_paths' => [
'<string>'
],
'page_count' => 2,
'total_bytes' => 123
]),
CURLOPT_HTTPHEADER => [
"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:3000/v1/scanner/receipts"

payload := strings.NewReader("{\n \"sweep_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"storage_paths\": [\n \"<string>\"\n ],\n \"page_count\": 2,\n \"total_bytes\": 123\n}")

req, _ := http.NewRequest("POST", url, payload)

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.post("http://localhost:3000/v1/scanner/receipts")
.header("Content-Type", "application/json")
.body("{\n \"sweep_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"storage_paths\": [\n \"<string>\"\n ],\n \"page_count\": 2,\n \"total_bytes\": 123\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("http://localhost:3000/v1/scanner/receipts")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sweep_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"storage_paths\": [\n \"<string>\"\n ],\n \"page_count\": 2,\n \"total_bytes\": 123\n}"

response = http.request(request)
puts response.read_body

Body

application/json
sweep_id
string<uuid>
required

Sweep ID this receipt belongs to

storage_paths
string[]
required

Array of storage paths for uploaded page images

Minimum array length: 1
page_count
integer
required

Number of pages scanned

Required range: x >= 1
total_bytes
integer

Total file size in bytes

Response

Receipt record created