Rechercher des reçus
curl --request POST \
--url https://api.truthlocks.com/v1/receipts/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"from_date": "<string>",
"index_key": "<string>",
"index_value": "<string>",
"issuer_id": "<string>",
"limit": 123,
"offset": 123,
"q": "<string>",
"receipt_type": "<string>",
"status": "<string>",
"to_date": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from_date: '<string>',
index_key: '<string>',
index_value: '<string>',
issuer_id: '<string>',
limit: 123,
offset: 123,
q: '<string>',
receipt_type: '<string>',
status: '<string>',
to_date: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/receipts/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/receipts/search"
payload = {
"from_date": "<string>",
"index_key": "<string>",
"index_value": "<string>",
"issuer_id": "<string>",
"limit": 123,
"offset": 123,
"q": "<string>",
"receipt_type": "<string>",
"status": "<string>",
"to_date": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/receipts/search"
payload := strings.NewReader("{\n \"from_date\": \"<string>\",\n \"index_key\": \"<string>\",\n \"index_value\": \"<string>\",\n \"issuer_id\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"q\": \"<string>\",\n \"receipt_type\": \"<string>\",\n \"status\": \"<string>\",\n \"to_date\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}{
"items": [
{}
],
"total": 123
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Reçus
Rechercher des reçus
Recherchez des reçus en utilisant la recherche en texte intégral et les filtres à facettes.
POST
/
v1
/
receipts
/
search
Rechercher des reçus
curl --request POST \
--url https://api.truthlocks.com/v1/receipts/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"from_date": "<string>",
"index_key": "<string>",
"index_value": "<string>",
"issuer_id": "<string>",
"limit": 123,
"offset": 123,
"q": "<string>",
"receipt_type": "<string>",
"status": "<string>",
"to_date": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from_date: '<string>',
index_key: '<string>',
index_value: '<string>',
issuer_id: '<string>',
limit: 123,
offset: 123,
q: '<string>',
receipt_type: '<string>',
status: '<string>',
to_date: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/receipts/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/receipts/search"
payload = {
"from_date": "<string>",
"index_key": "<string>",
"index_value": "<string>",
"issuer_id": "<string>",
"limit": 123,
"offset": 123,
"q": "<string>",
"receipt_type": "<string>",
"status": "<string>",
"to_date": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/receipts/search"
payload := strings.NewReader("{\n \"from_date\": \"<string>\",\n \"index_key\": \"<string>\",\n \"index_value\": \"<string>\",\n \"issuer_id\": \"<string>\",\n \"limit\": 123,\n \"offset\": 123,\n \"q\": \"<string>\",\n \"receipt_type\": \"<string>\",\n \"status\": \"<string>\",\n \"to_date\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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))
}{
"items": [
{}
],
"total": 123
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}
