API reference
Test Helpers
Test-mode tools: complete a Verification or a Claim with a scripted person through the real engines.
Complete a test verification with the scripted customer
POST/test_helpers/verifications/{id}/capture
Test mode only. A scripted person completes the Verification's capture through the same endpoints a phone uses, and the real engines issue the Result a few seconds later, delivered as verification.result_ready (claim.result_ready for a damage claim). Nothing about the Result is faked.
verified: every step shows what its reference expects: the reference's first code, the reference's image, a scene that follows the light.needs_review: the first check with a reference is missed (another code, then another item), else the light responds weakly.unable_to_verify: the light step does not finish, else the first code cannot be read.
A template without the steps a scenario needs answers parameter_invalid. The link must not have been opened yet. Live keys are refused with test_mode_only.
Path parameters
- idstringrequired
The Verification's id.
Body parameters
- scenariostring
What the scripted person shows.
One of
verified,needs_review,unable_to_verify
Responses
- 202
Started. The Result follows as a webhook.
- 400
parameter_invalid: A parameter has the wrong type or an invalid value.paramnames it. - 401
api_key_missing: No API key was sent. SendAuthorization: Bearer <key>.api_key_invalid: The API key is not recognised, or it was revoked. - 403
test_mode_only: This operation needs a test key (vrl_test_…). - 404
resource_missing: No object with that id exists for this key's account and mode. - 409
verification_state: The Verification is in a state that does not allow this operation.claim_state: The Claim is in a state that does not allow this operation. - 429
rate_limited: Too many requests. Wait for the number of seconds in Retry-After.
curl -X POST https://api.verilo.app/v1/test_helpers/verifications/ver_2b7e41c09d8f4a6e9c1d3b5a7f9e0c2d/capture \
-H "Authorization: Bearer $VERILO_TEST_KEY" \
-H "Content-Type: application/json" \
-d '{ "scenario": "verified" }'await fetch('https://api.verilo.app/v1/test_helpers/verifications/ver_2b7e41c09d8f4a6e9c1d3b5a7f9e0c2d/capture', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.VERILO_TEST_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ scenario: 'verified' })
});import os, requests
requests.post("https://api.verilo.app/v1/test_helpers/verifications/ver_2b7e41c09d8f4a6e9c1d3b5a7f9e0c2d/capture",
headers={"Authorization": f"Bearer {os.environ['VERILO_TEST_KEY']}"},
json={"scenario": "verified"})require "json"
require "net/http"
uri = URI("https://api.verilo.app/v1/test_helpers/verifications/ver_2b7e41c09d8f4a6e9c1d3b5a7f9e0c2d/capture")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer #{ENV.fetch("VERILO_API_KEY")}"
request["Idempotency-Key"] = "rma-1042-create"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"scenario": "verified"
}
JSON
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(request) }
puts JSON.parse(response.body)<?php
$ch = curl_init('https://api.verilo.app/v1/test_helpers/verifications/ver_2b7e41c09d8f4a6e9c1d3b5a7f9e0c2d/capture');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('VERILO_API_KEY'),
'Idempotency-Key: rma-1042-create',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<JSON
{
"scenario": "verified"
}
JSON,
]);
echo curl_exec($ch);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"scenario": "verified"
}`)
req, _ := http.NewRequest("POST", "https://api.verilo.app/v1/test_helpers/verifications/ver_2b7e41c09d8f4a6e9c1d3b5a7f9e0c2d/capture", body)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERILO_API_KEY"))
req.Header.Set("Idempotency-Key", "rma-1042-create")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}{
"object": "test_capture",
"verificationId": "ver_2b7e41c09d8f4a6e9c1d3b5a7f9e0c2d",
"sessionId": "ses_6d8f2a1c9b1e4c3d8a7f2e1d9c4b5a6f",
"scenario": "verified",
"status": "started",
"message": "The scripted customer is completing the capture. The Result follows in a few seconds as verification.result_ready."
}Complete a test claim with the scripted customer
POST/test_helpers/claims/{id}/capture
Test mode only. A scripted customer completes the Claim's capture through the same endpoints a phone uses, and Verilo's real Evidence and Decision Engines issue the Result a few seconds later, delivered as claim.result_ready. Nothing about the Result is faked.
verified: the label carries the order's tracking number, the scene follows the phone's light, and the item matches the order line's image. Gives Verified on an order with a tracking number and an image.needs_review: the label is another parcel's.unable_to_verify: the label cannot be read.
The Claim's link must not have been opened yet. Live keys are refused with test_mode_only.
Path parameters
- idstringrequired
The Claim's id.
Body parameters
- scenariostring
What the scripted customer shows.
One of
verified,needs_review,unable_to_verify
Responses
- 202
Started. The Result follows as a webhook.
- 400
parameter_invalid: A parameter has the wrong type or an invalid value.paramnames it. - 401
api_key_missing: No API key was sent. SendAuthorization: Bearer <key>.api_key_invalid: The API key is not recognised, or it was revoked. - 403
test_mode_only: This operation needs a test key (vrl_test_…). - 404
resource_missing: No object with that id exists for this key's account and mode. - 409
claim_state: The Claim is in a state that does not allow this operation. - 429
rate_limited: Too many requests. Wait for the number of seconds in Retry-After.
curl -X POST https://api.verilo.app/v1/test_helpers/claims/clm_4c1f0e9a2b7d4e5f8a6b3c2d1e0f9a8b/capture \
-H "Authorization: Bearer $VERILO_TEST_KEY" \
-H "Content-Type: application/json" \
-d '{ "scenario": "verified" }'await fetch('https://api.verilo.app/v1/test_helpers/claims/clm_4c1f0e9a2b7d4e5f8a6b3c2d1e0f9a8b/capture', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.VERILO_TEST_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ scenario: 'verified' })
});import os, requests
requests.post("https://api.verilo.app/v1/test_helpers/claims/clm_4c1f0e9a2b7d4e5f8a6b3c2d1e0f9a8b/capture",
headers={"Authorization": f"Bearer {os.environ['VERILO_TEST_KEY']}"},
json={"scenario": "verified"})require "json"
require "net/http"
uri = URI("https://api.verilo.app/v1/test_helpers/claims/clm_4c1f0e9a2b7d4e5f8a6b3c2d1e0f9a8b/capture")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer #{ENV.fetch("VERILO_API_KEY")}"
request["Idempotency-Key"] = "rma-1042-create"
request["Content-Type"] = "application/json"
request.body = <<~JSON
{
"scenario": "verified"
}
JSON
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(request) }
puts JSON.parse(response.body)<?php
$ch = curl_init('https://api.verilo.app/v1/test_helpers/claims/clm_4c1f0e9a2b7d4e5f8a6b3c2d1e0f9a8b/capture');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('VERILO_API_KEY'),
'Idempotency-Key: rma-1042-create',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => <<<JSON
{
"scenario": "verified"
}
JSON,
]);
echo curl_exec($ch);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"scenario": "verified"
}`)
req, _ := http.NewRequest("POST", "https://api.verilo.app/v1/test_helpers/claims/clm_4c1f0e9a2b7d4e5f8a6b3c2d1e0f9a8b/capture", body)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERILO_API_KEY"))
req.Header.Set("Idempotency-Key", "rma-1042-create")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}{
"object": "test_capture",
"claimId": "clm_4c1f0e9a2b7d4e5f8a6b3c2d1e0f9a8b",
"sessionId": "ses_9d2e7b1c4a3f4e8d9b6a5c4d3e2f1a0b",
"scenario": "verified",
"status": "started",
"message": "The scripted customer is completing the capture. The Result follows in a few seconds as claim.result_ready."
}