Skip to navigation

Create contract from file

View as Markdown

Uploads a contract PDF and creates a new contract for it in one call. No existing contract or customer is needed.

The contract is created with status IN_PROGRESS and source API, and its ID is returned immediately. Processing then runs in the background, the same as a contract uploaded in the Tabs dashboard: it extracts the contract terms and, when no customerId is given, creates a new customer or links an existing one. Poll GET /v3/contracts/{id} to follow the contract; customerId stays null until processing has linked a customer.

  • customerId (optional) links the contract to one of your customers up front. A customerId that is not one of your customers returns 404.
  • name (optional) sets the contract’s display name. It defaults to the uploaded file’s name.
  • shouldProcess=false creates the contract and stores the file without starting processing. No jobId is returned in that case.

The file must be a PDF sent as the multipart field “file”.

Authentication

Authorizationstring
API Key authentication via header

Query parameters

namestringOptional
Display name of the contract. Defaults to the uploaded file's name.
customerIdstringOptional
Customer to link the contract to. Omit it to let contract processing create or match the customer from the document.
shouldProcessenumOptional
Whether to start contract processing after the upload. Defaults to true.
Allowed values:

Request

This endpoint expects a multipart form containing a file.
filefileRequired

Response

Created contract
payloadobject
Response payload, will be empty when success is false
successboolean

Boolean with true=success, false=failure

messagestring

Plain-text description of the result

errorobjectOptional
json element with any error messages or warnings

Errors

400
Bad Request Error
404
Not Found Error