Rename an evidence library document
Change the title of an evidence library document, including an archived one, and get back the document with its versions and the disputes that use it.
- 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. - Renaming a document to its current title returns the document unchanged.
- You can rename 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
Idempotency key to be used. Sending again the same key would return the same result without re-executing the update.
Path Parameters
Identifier of the resource in Payrails.
Body
The new title. Payrails removes spaces at the start and end and replaces repeated spaces with one space. It must not end with a version, such as v2.
1 - 200"Terms of service"
Response
The renamed document.
Kind of library document. terms and policy documents are attached to every dispute; productDescription documents to not-as-described disputes.
terms, policy, productDescription Always allDisputes. Payrails attaches every document to every new dispute.
allDisputes Number of disputes that use any version of the document. If your credentials can access only some workspaces, only disputes in those workspaces count.
Absent when the document applies to every workspace.
The latest version that is not archived. New disputes get this version. Absent when every version is archived.
When a dispute last started to use a version of the document. If your credentials can access only some workspaces, only disputes in those workspaces count.
All versions of the document, oldest first. Returned by Add document (version 1 only), Get document, Add version, Archive document and Archive version. List documents does not return it.
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.
100The changes to the document, newest first, with who made each change and when. Returned by Get document only. For documents changed before this history existed, it shows only what their stored dates show. An archive and restore that happened before then does not appear.