curl --request GET \
--url https://api.staging.payrails.io/dispute/disputes/evidence-documents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.payrails.io/dispute/disputes/evidence-documents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.payrails.io/dispute/disputes/evidence-documents', 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://api.staging.payrails.io/dispute/disputes/evidence-documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.payrails.io/dispute/disputes/evidence-documents"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://api.staging.payrails.io/dispute/disputes/evidence-documents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.payrails.io/dispute/disputes/evidence-documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "terms",
"title": "<string>",
"attachedTo": "allDisputes",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"usedInCount": 123,
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archivedAt": "2023-11-07T05:31:56Z",
"currentVersion": {
"evidenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 2,
"validFrom": "2023-11-07T05:31:56Z",
"contentType": "application/pdf",
"contentLength": 123,
"createdAt": "2023-11-07T05:31:56Z",
"changeNote": "<string>"
},
"lastUsedAt": "2023-11-07T05:31:56Z",
"versions": [
{
"evidenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 2,
"validFrom": "2023-11-07T05:31:56Z",
"contentType": "application/pdf",
"contentLength": 123,
"createdAt": "2023-11-07T05:31:56Z",
"changeNote": "<string>"
}
],
"usages": [
{
"disputeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evidenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"linkedAt": "2023-11-07T05:31:56Z",
"reasonCode": "<string>",
"schemeReasonCode": "<string>",
"stage": "Created",
"chargebackStatus": "Incoming",
"defenseStatus": "NotDefendable"
}
]
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.malformed",
"detail": "The request has malformed syntax",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestmalformed"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.unauthorized",
"detail": "The request lacks necessary credentials to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestunauthorized"
}
]
}{
"errors": [
{
"id": "e7db22b3-914e-4975-928e-9edfb0885bea",
"code": "request.forbidden",
"detail": "The request credentials lack the required permissions to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestforbidden"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.not-found",
"detail": "The requested resource was not found",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestnot-found"
}
]
}{
"errors": [
{
"id": "07a1d642-dbf5-47d3-8563-700514b38e46",
"code": "request.header.missing",
"detail": "The request is missing a required header",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestheadermissing"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.rate-limit",
"detail": "Too many requests",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestrate-limit"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "internal",
"detail": "An internal error occurred",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#internal"
}
]
}List evidence library documents
List evidence library documents by title, each with its current version, the number of disputes that use it, and when it was last used.
curl --request GET \
--url https://api.staging.payrails.io/dispute/disputes/evidence-documents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.payrails.io/dispute/disputes/evidence-documents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.payrails.io/dispute/disputes/evidence-documents', 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://api.staging.payrails.io/dispute/disputes/evidence-documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.payrails.io/dispute/disputes/evidence-documents"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://api.staging.payrails.io/dispute/disputes/evidence-documents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.payrails.io/dispute/disputes/evidence-documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "terms",
"title": "<string>",
"attachedTo": "allDisputes",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"usedInCount": 123,
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archivedAt": "2023-11-07T05:31:56Z",
"currentVersion": {
"evidenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 2,
"validFrom": "2023-11-07T05:31:56Z",
"contentType": "application/pdf",
"contentLength": 123,
"createdAt": "2023-11-07T05:31:56Z",
"changeNote": "<string>"
},
"lastUsedAt": "2023-11-07T05:31:56Z",
"versions": [
{
"evidenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 2,
"validFrom": "2023-11-07T05:31:56Z",
"contentType": "application/pdf",
"contentLength": 123,
"createdAt": "2023-11-07T05:31:56Z",
"changeNote": "<string>"
}
],
"usages": [
{
"disputeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evidenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"linkedAt": "2023-11-07T05:31:56Z",
"reasonCode": "<string>",
"schemeReasonCode": "<string>",
"stage": "Created",
"chargebackStatus": "Incoming",
"defenseStatus": "NotDefendable"
}
]
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.malformed",
"detail": "The request has malformed syntax",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestmalformed"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.unauthorized",
"detail": "The request lacks necessary credentials to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestunauthorized"
}
]
}{
"errors": [
{
"id": "e7db22b3-914e-4975-928e-9edfb0885bea",
"code": "request.forbidden",
"detail": "The request credentials lack the required permissions to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestforbidden"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.not-found",
"detail": "The requested resource was not found",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestnot-found"
}
]
}{
"errors": [
{
"id": "07a1d642-dbf5-47d3-8563-700514b38e46",
"code": "request.header.missing",
"detail": "The request is missing a required header",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestheadermissing"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.rate-limit",
"detail": "Too many requests",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestrate-limit"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "internal",
"detail": "An internal error occurred",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#internal"
}
]
}usedInCount and lastUsedAt count only disputes in those workspaces.
Returns 404 when the evidenceLibraryEnabled feature flag is off.Authorizations
You can use an OAuth2 JWT bearer token in the Authorization header of your API requests for supported endpoints: Authorization: Bearer <YOUR_JWT_HERE>.
These tokens are valid for 10 minutes and can be requested via the access token endpoint endpoint.
Query Parameters
Only documents of this kind.
Kind of library document. terms and policy documents are attached to every dispute; productDescription documents to not-as-described disputes.
terms, policy, productDescription Case-insensitive substring of the title.
200Response
Evidence library documents.
Hide child attributes
Hide child attributes
Kind of library document. terms and policy documents are attached to every dispute; productDescription documents to not-as-described disputes.
terms, policy, productDescription Which new disputes Payrails attaches the document to, derived from its kind.
allDisputes, notAsDescribedDisputes Number of disputes that use any version of the document. For a caller limited to some workspaces, only disputes in those workspaces count.
Absent when the document applies to every workspace.
The version valid now. Absent when every version starts in the future.
Hide child attributes
Hide child attributes
Evidence that holds this version's file.
x >= 1Disputes for purchases made on or after this time use this version, until a later version starts.
"application/pdf"
When a dispute last started to use a version of the document. For a caller limited to some workspaces, only disputes in those workspaces count.
All versions, lowest first. Returned by create (version 1 only), get, add version and archive; not returned by list.
Hide child attributes
Hide child attributes
Evidence that holds this version's file.
x >= 1Disputes for purchases made on or after this time use this version, until a later version starts.
"application/pdf"
The latest 100 dispute links to a version of the document, newest first, one entry per link; usedInCount is the total. Returned by get, add version and archive; not returned by list.
100Hide child attributes
Hide child attributes
The version's evidence linked to the dispute.
Stage of the dispute.
Created, FraudReport, Retrieval, Chargeback, PreArbitration, Arbitration, Unknown Status of the chargeback.
Incoming, Executed, Reversed, SecondChargeback, IssuerReponseTimeframeExpired, ArbitrationReversed Status of the defense.
NotDefendable, Undefended, ReadyToSubmit, Submitted, Failed, UnderReview, Won, Lost, Accepted, Resolved, Unknown