Gerri API

Reviews

Endpoints for creating, listing, and retrieving contract reviews for the current organization.


Retrieve a review

GET
https://api.gerri.commonpaper.com
/v1/organizations/{organization_id}/reviews/{id}

Shows one review for the current organization (by id). Includes nested redline_evaluations, summary_positions, and flag_violations when applicable—the paginated GET /v1/organizations/{organization_id}/reviews index omits those for each item.

Retrieve a review › path Parameters

organization_id
​string · uuid · required

Organization id

id
​string · uuid · required

Review id

Retrieve a review › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Retrieve a review › Responses

A single review

​ReviewResource · required

Retrieve all reviews

GET
https://api.gerri.commonpaper.com
/v1/organizations/{organization_id}/reviews

Lists reviews for the current organization with pagination (page[number]). The default page size is 30 reviews per page.

Each list item includes core review fields, name (imported file name), and review_type. redline_evaluations, summary_positions (per-topic summaries), and flag_violations are not included here; they appear on GET /v1/organizations/{organization_id}/reviews/{id} (and on the dedicated nested collection endpoints where applicable).

Retrieve all reviews › path Parameters

organization_id
​string · uuid · required

Organization id

Retrieve all reviews › query Parameters

page[number]
​integer · min: 1

Page number for the review list (defaults to 1 when omitted). Each page returns up to 30 reviews by default.

Retrieve all reviews › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Retrieve all reviews › Responses

200

A paginated list of reviews for the organization (data, meta.pagination, and links are siblings).

​ReviewResourceList[] · required
​ReviewsListMeta · required
​ReviewsListLinks · required

Create a review

POST
https://api.gerri.commonpaper.com
/v1/organizations/{organization_id}/reviews

Start a new review in one of three ways.

API clients (API key):

  • application/json: send imported_file_id (plus optional playbook_id and review_type) to review a file you already imported.
  • multipart/form-data: send a file part (plus optional playbook_id and review_type) to upload a new PDF or DOCX. Don't send imported_file_id on multipart.

MCP clients (OAuth):

  • Send filename (local PDF or DOCX path). Optional: playbook_id, review_type.
  • Returns { curl_command } — run it to POST the file bytes to the signed URL. Do not send file bytes through the MCP tool.
  • Required for MCP mint: filename only.

review_type must be RedlineReview or SummaryReview when you send it. A 201 response uses the same JSON:API review resource as GET /v1/organizations/{organization_id}/reviews/{id}. MCP mint returns 200 with curl_command instead of creating the review immediately.

Create a review › path Parameters

organization_id
​string · uuid · required

Organization id

Create a review › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Create a review › Request Body

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = object · requires: filename
type = object · requires: imported_file_id
type = object · requires: file
Properties for MCP signed upload (mint curl):
MCP clients: send `filename` (local PDF or DOCX path). Returns a `curl_command` to POST the local file bytes. Do not send file bytes through this tool. See **`#/components/schemas/CreateReviewMcpMintBody`**.
filename
​string · minLength: 1 · maxLength: 1024 · pattern: ^[^\u0000-\u001F\u00… · required

Local PDF or DOCX path on the client machine (e.g. ./Cloud Service Agreement.pdf). Must not contain control characters (newlines, null bytes, etc.). The server shell-escapes this value when building curl_command (including apostrophes); run the returned command exactly as-is and do not re-quote or edit the @path.

playbook_id
​string · uuid · minLength: 1 · pattern: ^[0-9a-fA-F]{8}-[0-9…
review_type
​string · enum

Optional; when omitted the service chooses the review mode after upload.

Enum values:
RedlineReview
SummaryReview

Create a review › Responses

MCP mint: JSON with a curl_command to POST the local PDF or DOCX bytes. The review is created when that command is run.

curl_command
​string · required

Ready-to-run curl that POSTs the local PDF or DOCX to the signed upload URL. The @path is shell-escaped by the server. Execute the string exactly as returned; do not re-quote or modify arguments.


List redline evaluations for a review

GET
https://api.gerri.commonpaper.com
/v1/organizations/{organization_id}/reviews/{review_id}/redline_evaluations

Returns every redline evaluation for the given review, scoped to the current organization. This applies to redline reviews (review_type: RedlineReview); the list matches the redline_evaluations array on the review resource from GET /v1/organizations/{organization_id}/reviews/{id}.

List redline evaluations for a review › path Parameters

organization_id
​string · uuid · required

Organization id

review_id
​string · uuid · required

Review id (must be a redline review to contain evaluations)

List redline evaluations for a review › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

List redline evaluations for a review › Responses

Evaluations for the review (may be an empty array while processing or if none apply)

​RedlineEvaluation[] · required

Redline evaluations for the review (same objects as attributes.redline_evaluations on a RedlineReview resource).


Retrieve a single redline evaluation

GET
https://api.gerri.commonpaper.com
/v1/organizations/{organization_id}/reviews/{review_id}/redline_evaluations/{evaluation_id}

Returns one redline evaluation by id under the given review, scoped to the current organization. The payload matches a single element of redline_evaluations on GET /v1/organizations/{organization_id}/reviews/{id}. When a counterproposal exists, attributes.counterproposal is included as a JSON:API-style object with nested data (type counterproposal, id, attributes including directive, suggested_counterproposal_text, created_at, updated_at, and status). Nested attributes.status is always completed or in_progress. When there is no counterproposal, the counterproposal key is omitted from attributes (never null).

Retrieve a single redline evaluation › path Parameters

organization_id
​string · uuid · required

Organization id

review_id
​string · uuid · required

Parent review id

evaluation_id
​string · uuid · required

Redline evaluation id

Retrieve a single redline evaluation › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Retrieve a single redline evaluation › Responses

The requested redline evaluation


Update a redline evaluation

PATCH
https://api.gerri.commonpaper.com
/v1/organizations/{organization_id}/reviews/{review_id}/redline_evaluations/{evaluation_id}

Updates how a single redline evaluation is classified. Send a required evaluation object (discriminated by type) and an optional top-level comment. Simple outcomes are accept, reject, manual, and needs_review (each is only type). counterpropose adds a required counterproposal: either an object { directive } (instruction text) or { new_text } (replacement copy)—exactly one of those two shapes. Applies only to the evaluation identified by evaluation_id under the given review.

Update a redline evaluation › path Parameters

organization_id
​string · uuid · required

Organization id

review_id
​string · uuid · required

Parent review id

evaluation_id
​string · uuid · required

Redline evaluation id

Update a redline evaluation › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Update a redline evaluation › Request Body

​required

Outcome and payload for this redline evaluation. Discriminated by type; see oneOf variants below.

comment
​string

Optional comment accompanying the evaluation update.

Update a redline evaluation › Responses

Updated redline evaluation (same JSON:API data shape as GET). When a counterproposal exists, attributes.counterproposal is a nested JSON:API document { "data": { "id", "type": "counterproposal", "attributes": { … } } }; nested attributes.status is completed or in_progress. Otherwise the counterproposal key is omitted (see GET examples).


List flag violations for a review

GET
https://api.gerri.commonpaper.com
/v1/organizations/{organization_id}/reviews/{review_id}/flag_violations

Returns every summary-review flag violation for the given review, scoped to the current organization. This applies to summary reviews (review_type: SummaryReview); the list matches the flag_violations array on the review resource from GET /v1/organizations/{organization_id}/reviews/{id}.

List flag violations for a review › path Parameters

organization_id
​string · uuid · required

Organization id

review_id
​string · uuid · required

Review id (must be a summary review to contain flag violations)

List flag violations for a review › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

List flag violations for a review › Responses

Flag violations for the review (may be an empty array if none were detected)

​SummaryReviewFlagViolation[] · required

Flag violations for the review (same objects as attributes.flag_violations on a SummaryReview resource).


Retrieve a single flag violation

GET
https://api.gerri.commonpaper.com
/v1/organizations/{organization_id}/reviews/{review_id}/flag_violations/{flag_violation_id}

Returns one flag violation by id under the given review, scoped to the current organization. The payload matches a single element of flag_violations on GET /v1/organizations/{organization_id}/reviews/{id}.

Retrieve a single flag violation › path Parameters

organization_id
​string · uuid · required

Organization id

review_id
​string · uuid · required

Parent review id

flag_violation_id
​string · uuid · required

Flag violation id

Retrieve a single flag violation › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Retrieve a single flag violation › Responses

The requested flag violation


Update a flag violation

PATCH
https://api.gerri.commonpaper.com
/v1/organizations/{organization_id}/reviews/{review_id}/flag_violations/{flag_violation_id}

Records a user decision for a single flag violation: either exception_approved (the exception is accepted) or issue_confirmed (the issue stands). Applies only to the violation identified by flag_violation_id under the given review.

Update a flag violation › path Parameters

organization_id
​string · uuid · required

Organization id

review_id
​string · uuid · required

Parent review id

flag_violation_id
​string · uuid · required

Flag violation id

Update a flag violation › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Update a flag violation › Request Body

decision
​string · enum · required

User decision for this flag violation.

Enum values:
exception_approved
issue_confirmed

Update a flag violation › Responses

Updated flag violation


Download review bundle (ZIP)

GET
https://api.gerri.commonpaper.com
/v1/organizations/{organization_id}/reviews/{review_id}/downloads

Downloads a .zip archive containing the original contract, processed (redlined) document, and audit trail for a RedlineReview.

SummaryReview is not supported — this endpoint returns 422 for summary reviews. Use GET /v1/organizations/{organization_id}/reviews/{review_id}/downloads/original instead.

Example:

Code
GET /v1/organizations/{organization_id}/reviews/{review_id}/downloads

Download review bundle (ZIP) › path Parameters

organization_id
​string · uuid · required

Organization id

review_id
​string · uuid · required

Review id

Download review bundle (ZIP) › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Download review bundle (ZIP) › Responses

ZIP archive (application/zip).

string · binary

Download review audit document

GET
https://api.gerri.commonpaper.com
/v1/organizations/{organization_id}/reviews/{review_id}/downloads/audit

Downloads the audit document for a RedlineReview.

SummaryReview is not supported — returns 422. Use GET /v1/organizations/{organization_id}/reviews/{review_id}/downloads/original for summary reviews.

Example:

Code
GET /v1/organizations/{organization_id}/reviews/{review_id}/downloads/audit

Download review audit document › path Parameters

organization_id
​string · uuid · required

Organization id

review_id
​string · uuid · required

Review id

Download review audit document › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Download review audit document › Responses

Audit document download (typically .docx).

string · binary

Download processed (redlined) contract

GET
https://api.gerri.commonpaper.com
/v1/organizations/{organization_id}/reviews/{review_id}/downloads/processed

Downloads the processed (redlined) contract for a RedlineReview.

SummaryReview is not supported — returns 422. Use GET /v1/organizations/{organization_id}/reviews/{review_id}/downloads/original for summary reviews.

Example:

Code
GET /v1/organizations/{organization_id}/reviews/{review_id}/downloads/processed

Download processed (redlined) contract › path Parameters

organization_id
​string · uuid · required

Organization id

review_id
​string · uuid · required

Review id

Download processed (redlined) contract › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Download processed (redlined) contract › Responses

Processed document (typically .docx, or application/pdf when applicable).

string · binary

Download original uploaded contract

GET
https://api.gerri.commonpaper.com
/v1/organizations/{organization_id}/reviews/{review_id}/downloads/original

Downloads the original uploaded contract (.docx or .pdf, depending on the upload). Supported for both RedlineReview and SummaryReview — this is the only download path available for summary reviews.

Example:

Code
GET /v1/organizations/{organization_id}/reviews/{review_id}/downloads/original

Download original uploaded contract › path Parameters

organization_id
​string · uuid · required

Organization id

review_id
​string · uuid · required

Review id

Download original uploaded contract › Headers

Authorization
​string · required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Download original uploaded contract › Responses

Original file: application/vnd.openxmlformats-officedocument.wordprocessingml.document (.docx) or application/pdf.

string · binary