Update an evidence library document
Change the title or the reason codes of an evidence library document, including an archived one, and get back the document with its versions.
- The title rules are the same as when you add a document. Each title can be used only once per document type. Returns 409 when a document of the same type already has the title, including when that document is archived or belongs to another workspace.
- Payrails ignores upper and lower case and extra spaces when it compares titles. It removes spaces at the start and end of the title and replaces repeated spaces with one space.
- The title must not end with a version, such as
Refund policy v2orRefund policy version 2. Returns 422 for such a title. To update the file, add a new version instead. reasonCodesreplaces the whole list. Send an empty list when no reason code applies. Returns 422 for a reason code that is not in the list of supported codes.- Payrails AI suggests reason codes when you add a document or a new version. It never replaces reason codes that you set.
- The document history records each change and who made it.
- A value that does not change returns the document unchanged.
- You can update an archived document. It stays archived.
- Returns 403 when the document applies to all workspaces and your credentials give access to only some of them.
- Returns 404 when the document does not exist, or when the
evidenceLibraryEnabledfeature 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.
Headers
Body
Send only the fields you want to change.
The card network reason codes this document helps defend. The list replaces the current reason codes. Send an empty list when no reason code applies.
A card network reason code. Visa: 10.4 other fraud, card-absent; 13.1 merchandise or services not received; 13.2 cancelled recurring transaction; 13.3 not as described or defective; 13.6 credit not processed; 13.7 cancelled merchandise or services. Mastercard: 4837 no cardholder authorization; 4853 cardholder dispute; 4855 goods or services not provided.
10.4, 13.1, 13.2, 13.3, 13.6, 13.7, 4837, 4853, 4855 Response
The updated document.
The card network reason codes this document helps defend. Payrails AI suggests them when you add the document or a new version, and you can change them. null until Payrails AI or a person sets them. An empty list means that no reason code applies.
A card network reason code. Visa: 10.4 other fraud, card-absent; 13.1 merchandise or services not received; 13.2 cancelled recurring transaction; 13.3 not as described or defective; 13.6 credit not processed; 13.7 cancelled merchandise or services. Mastercard: 4837 no cardholder authorization; 4853 cardholder dispute; 4855 goods or services not provided.
10.4, 13.1, 13.2, 13.3, 13.6, 13.7, 4837, 4853, 4855 Who set reasonCodes. ai: Payrails AI. user: a person on your team in the Payrails portal. client: your system through the API. null until the reason codes are set. Payrails AI never replaces reason codes that a person or your system set.
ai, user, client, null The 100 disputes that most recently started to use the document, newest first, with the version each one uses. A dispute that uses two versions appears twice. usedInCount is the total number of disputes. Returned by Get document, Add version, Archive document and Archive version. To see every dispute, use List the disputes that use an evidence library document.
100