LawVu Contracts API
The Contracts API from LawVu — 12 operation(s) for contracts.
The Contracts API from LawVu — 12 operation(s) for contracts.
openapi: 3.0.1
info:
title: LawVu Account Auth Contracts API
description: Apis for account related resources (authentication, profiles, organisation details etc)
version: '1.0'
servers:
- url: https://api-sandbox.lawvu.com/account-apis
description: Sandbox API
- url: https://api.lawvu.com/account-apis
description: Production API
tags:
- name: Contracts
paths:
/v2/contracts:
get:
tags:
- Contracts
summary: Get contracts
description: Retrieve a list of contracts
operationId: get-v2-contracts
parameters:
- name: $filter
in: query
description: Filter the results using OData filter syntax
schema:
type: string
- name: $orderby
in: query
description: Order the results using OData orderby syntax
schema:
type: string
- name: $skip
in: query
description: Skip the specified number of results
schema:
type: integer
- name: $top
in: query
description: Limit the number of results returned
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ContractCollectionResponse'
'400':
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/HttpValidationProblemDetails'
example:
detail: The request was invalid and could not be processed
errors:
Name: Operation 'gt' is not supported for 'Name'
instance: /contracts
operationId: 7edb5d62-f5bf-463b-9410-cdd8b3293d89
status: 400
title: Invalid request
type: https://api-docs.lawvu.com/errors/invalid_request
post:
tags:
- Contracts
summary: Create contract
description: Creates a contract based on the provided contract type.
operationId: post-v2-contracts
requestBody:
content:
application/json:
schema:
required:
- type
allOf:
- $ref: '#/components/schemas/CreateContract'
responses:
'201':
description: Created
headers:
Location:
description: Location to retrieve the created contract
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/CreatedContract'
'400':
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/HttpValidationProblemDetails'
example:
detail: The request was invalid and could not be processed
errors:
Name: Required
instance: /contracts/
operationId: 7edb5d62-f5bf-463b-9410-cdd8b3293d89
status: 400
title: Invalid request
type: https://api-docs.lawvu.com/errors/invalid_request
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
example:
detail: The request could not be processed due to a conflict
errors:
ExternalId: Is already in use
instance: /contracts/
operationId: 7edb5d62-f5bf-463b-9410-cdd8b3293d89
status: 409
title: Conflict
type: https://api-docs.lawvu.com/errors/conflict
/v2/contracts/{contractId}:
get:
tags:
- Contracts
summary: Get contract
description: Retrieve a contract by its identifier
operationId: get-v2-contracts-contractid
parameters:
- name: contractId
in: path
description: The system identifier for the contract
required: true
schema:
type: integer
description: The system identifier for the contract
format: int32
example: 5348
example: 5348
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Contract'
'404':
description: Not Found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
example:
detail: The requested resource could not be found
instance: /contracts/5348
operationId: 7edb5d62-f5bf-463b-9410-cdd8b3293d89
status: 404
title: Resource not found
type: https://api-docs.lawvu.com/errors/resource_not_found
patch:
tags:
- Contracts
summary: Update contract
description: Updates a contracts details
operationId: patch-v2-contracts-contractid
parameters:
- name: contractId
in: path
description: The system identifier for the contract
required: true
schema:
type: integer
description: The system identifier for the contract
format: int32
example: 5348
example: 5348
requestBody:
content:
application/merge-patch+json:
schema:
allOf:
- $ref: '#/components/schemas/UpdateContract'
responses:
'204':
description: No Content
'400':
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/HttpValidationProblemDetails'
example:
detail: The request was invalid and could not be processed
errors:
Name: Required
instance: /contracts/5348
operationId: 7edb5d62-f5bf-463b-9410-cdd8b3293d89
status: 400
title: Invalid request
type: https://api-docs.lawvu.com/errors/invalid_request
'403':
description: Forbidden
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
example:
detail: You do not have permission to update this contract
instance: /contracts/5348
operationId: 7edb5d62-f5bf-463b-9410-cdd8b3293d89
status: 403
title: Forbidden
type: https://api-docs.lawvu.com/errors/forbidden
'404':
description: Not Found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
example:
detail: The requested resource could not be found
instance: /contracts/5348
operationId: 7edb5d62-f5bf-463b-9410-cdd8b3293d89
status: 404
title: Resource not found
type: https://api-docs.lawvu.com/errors/resource_not_found
'409':
description: Conflict
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
example:
detail: The request could not be processed due to a conflict
errors:
ExternalId: Is already in use
instance: /contracts/5348
operationId: 7edb5d62-f5bf-463b-9410-cdd8b3293d89
status: 409
title: Conflict
type: https://api-docs.lawvu.com/errors/conflict
/v2/contracts/{contractId}/files/{fileId}:
get:
tags:
- Contracts
summary: Get contract file
description: Retrieve information about a file on a contract
operationId: get-v2-contracts-contractid-files-fileid
parameters:
- name: contractId
in: path
description: The system identifier for the contract
required: true
schema:
type: integer
description: The system identifier for the contract
format: int32
example: 5348
example: 5348
- name: fileId
in: path
description: The system identifier for the file
required: true
schema:
type: integer
description: The system identifier for the file
format: int32
example: 9456
example: 9456
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/File'
'404':
description: Not Found
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
example:
detail: The requested resource could not be found
instance: /contracts/5348/files/9456
operationId: 7edb5d62-f5bf-463b-9410-cdd8b3293d89
status: 404
title: Resource not found
type: https://api-docs.lawvu.com/errors/resource_not_found
/v2/contractTypes:
get:
tags:
- Contracts
summary: Get contract types
description: Retrieve a list of contract types
operationId: get-v2-contracttypes
parameters:
- name: $skip
in: query
description: Specifies the number of items to skip
schema:
type: integer
description: Specifies the number of items to skip
format: int32
default: 0
- name: $top
in: query
description: Specifies the maximum number of items to return
schema:
type: integer
description: Specifies the maximum number of items to return
format: int32
default: 25
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ContractTypeCollectionResponse'
'400':
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/HttpValidationProblemDetails'
example:
detail: The request was invalid and could not be processed
instance: /contractsTypes/
operationId: 7edb5d62-f5bf-463b-9410-cdd8b3293d89
status: 400
title: Invalid request
type: https://api-docs.lawvu.com/errors/invalid_request
/v1/contracts:
post:
tags:
- Contracts
summary: Create contract by upload
description: Creates a new contract, with the main contract file being sent in the body of the request
operationId: post-v1-contracts
requestBody:
content:
multipart/form-data:
schema:
required:
- ContractTemplateId
- Name
type: object
properties:
ContractTemplateId:
type: integer
description: The template for the category
format: int32
MatterId:
type: integer
description: Optionally set the parent matter id
format: int32
ParentContractId:
type: integer
description: Optionally set the parent contract id
format: int32
Fields:
type: string
description: The fields (from contract template) for the contract
Name:
type: string
description: The contract name
ExternalId:
type: string
description: Optionally set an ID from an external system. Uniqueness is enforced for your organisation
TeamId:
type: integer
description: 'Assigns a team to the contract. This can be required [ref: contractTemplate: TeamRequired]'
format: int32
ContractFile:
type: string
format: binary
example:
contractTemplateId: 1
matterId: 321
parentContractId: 123
fields: '{"field_1":"field 1","field_2":123,"field_3":["yes"],"field_4":true}'
name: Test Contract
externalId: '123'
teamId: null
contractFile: null
encoding:
ContractTemplateId:
style: form
MatterId:
style: form
ParentContractId:
style: form
Fields:
style: form
Name:
style: form
ExternalId:
style: form
TeamId:
style: form
ContractFile:
style: form
responses:
'200':
description: Success
content:
text/plain:
schema:
type: integer
format: int32
application/json:
schema:
type: integer
format: int32
text/json:
schema:
type: integer
format: int32
get:
tags:
- Contracts
summary: Get contracts
description: "Gets contracts filtered by single or multiple fields.\r\n<br /> \r\n_To filter by one field_: \"filtering.field\", \"filtering.operator\" and \"filtering.value\" parameters must be filled.\r\n<br /> \r\n_To filter by multiple fields_: \"filtering.logic\" and \"filtering.filters\" parameters must be filled."
operationId: get-v1-contracts
parameters:
- name: skip
in: query
description: The number of contracts to skip (used for paging)
schema:
type: integer
format: int32
- name: fields
in: query
description: Fields to include in the response
schema:
type: array
items:
type: string
- name: filtering.logic
in: query
description: Gets or sets the filtering logic for filters. Value by default is 'and'
schema:
enum:
- and
- or
type: string
- name: filtering.filters
in: query
description: "Array of filters object (optional)\r\n<br /> \r\n_Object Properties_:\r\n<br /> \r\n* _Field_: field to filter by\r\n<br /> \r\n* _Operator_: operator used to filter by\r\n<br /> \r\n* _Value_: value to filter by"
schema:
$ref: '#/components/schemas/FilteringArray'
- name: filtering.field
in: query
description: Field to filter by (optional)
schema:
type: string
- name: filtering.operator
in: query
description: Operator used for filtering (optional)
schema:
enum:
- eq
- neq
- lt
- lte
- gt
- gte
- startswith
- endswith
- contains
- doesnotcon
- isnull
type: string
- name: filtering.value
in: query
description: Value to filter by (optional)
schema:
type: string
- name: sorting.direction
in: query
description: Set the sorting direction
schema:
enum:
- asc
- desc
type: string
- name: sorting.field
in: query
description: Set the sorting fields
schema:
type: string
- name: take
in: query
description: 'The maximum number of contracts to return<p>Default: 50</p>'
schema:
type: integer
format: int32
default: 50
- name: context
in: query
description: 'Controls the scope of contracts returned by this operation<p>Default: Personal</p><p>Options:</p><ul><li>All - Returns all contracts regardless of whether the authenticated user is a member. Requires the authenticated user to be a member of the Contract Administrators security group</li><li>Personal - Returns contracts which the authenticated user is a member of. Equivalent to the "My contracts" view in LawVu</li><li>Teams - Returns all contracts that are accessible by teams that the authenticated user is a member of</li><li>Restricted - Returns restricted contracts. Requires the authenticated user to be an Organization Administrator</li></ul>'
schema:
enum:
- All
- Personal
- Teams
- Restricted
type: string
description: <p>Options:</p><ul><li>All - Returns all contracts regardless of whether the authenticated user is a member. Requires the authenticated user to be a member of the Contract Administrators security group</li><li>Personal - Returns contracts which the authenticated user is a member of. Equivalent to the "My contracts" view in LawVu</li><li>Teams - Returns all contracts that are accessible by teams that the authenticated user is a member of</li><li>Restricted - Returns restricted contracts. Requires the authenticated user to be an Organization Administrator</li></ul>
default: Personal
responses:
'200':
description: Success
content:
text/plain:
schema:
$ref: '#/components/schemas/DataSourceResultModel'
example:
data:
- restricted: false
$id: 123
name: Example contract
onContract: true
total: 1
application/json:
schema:
$ref: '#/components/schemas/DataSourceResultModel'
example:
data:
- restricted: false
$id: 123
name: Example contract
onContract: true
total: 1
text/json:
schema:
$ref: '#/components/schemas/DataSourceResultModel'
example:
data:
- restricted: false
$id: 123
name: Example contract
onContract: true
total: 1
/v1/contracts/quickfind:
get:
tags:
- Contracts
summary: Find contracts
description: Quickly find and filter contracts
operationId: get-v1-contracts-quickfind
parameters:
- name: term
in: query
description: A term to search contracts by
schema:
type: string
- name: take
in: query
description: 'The number of contracts to return (maximum: 100, default: 20)'
schema:
type: integer
format: int32
responses:
'200':
description: Success
content:
text/plain:
schema:
$ref: '#/components/schemas/QuickFindContractArray'
application/json:
schema:
$ref: '#/components/schemas/QuickFindContractArray'
text/json:
schema:
$ref: '#/components/schemas/QuickFindContractArray'
/v1/contracts/recent:
get:
tags:
- Contracts
summary: Recent contracts
description: Returns recently viewed (ref:take) contracts for the user
operationId: get-v1-contracts-recent
parameters:
- name: take
in: query
description: 'The number of recently viewed contracts to return<p>Default: 5</p>'
schema:
type: integer
format: int32
default: 5
responses:
'200':
description: Success
content:
text/plain:
schema:
$ref: '#/components/schemas/RecentContractArray'
example:
- id: 95
title: My Contract
description: 'Contract ID: 95'
name: My Contract
matterNumber: LV1234-0012
contractStatus: Draft
ownerId: 08FD1ED1-627E-4CB9-8388-731227584D21
lastActivityDateUtc: '2023-12-15T20:30:00Z'
- id: 789
title: Another Contract
description: 'Contract ID: 789'
name: Another Contract
matterNumber: null
contractStatus: Void
ownerId: BE17D7D6-721A-4F6D-B081-CAABB6D8F5B9
lastActivityDateUtc: '2024-01-12T10:00:00Z'
- id: 684
title: Different Contract
description: 'Contract ID: 684'
name: Different Contract
matterNumber: null
contractStatus: Executed
ownerId: BE17D7D6-721A-4F6D-B081-CAABB6D8F5B9
lastActivityDateUtc: '2023-12-10T15:30:00Z'
application/json:
schema:
$ref: '#/components/schemas/RecentContractArray'
example:
- id: 95
title: My Contract
description: 'Contract ID: 95'
name: My Contract
matterNumber: LV1234-0012
contractStatus: Draft
ownerId: 08FD1ED1-627E-4CB9-8388-731227584D21
lastActivityDateUtc: '2023-12-15T20:30:00Z'
- id: 789
title: Another Contract
description: 'Contract ID: 789'
name: Another Contract
matterNumber: null
contractStatus: Void
ownerId: BE17D7D6-721A-4F6D-B081-CAABB6D8F5B9
lastActivityDateUtc: '2024-01-12T10:00:00Z'
- id: 684
title: Different Contract
description: 'Contract ID: 684'
name: Different Contract
matterNumber: null
contractStatus: Executed
ownerId: BE17D7D6-721A-4F6D-B081-CAABB6D8F5B9
lastActivityDateUtc: '2023-12-10T15:30:00Z'
text/json:
schema:
$ref: '#/components/schemas/RecentContractArray'
example:
- id: 95
title: My Contract
description: 'Contract ID: 95'
name: My Contract
matterNumber: LV1234-0012
contractStatus: Draft
ownerId: 08FD1ED1-627E-4CB9-8388-731227584D21
lastActivityDateUtc: '2023-12-15T20:30:00Z'
- id: 789
title: Another Contract
description: 'Contract ID: 789'
name: Another Contract
matterNumber: null
contractStatus: Void
ownerId: BE17D7D6-721A-4F6D-B081-CAABB6D8F5B9
lastActivityDateUtc: '2024-01-12T10:00:00Z'
- id: 684
title: Different Contract
description: 'Contract ID: 684'
name: Different Contract
matterNumber: null
contractStatus: Executed
ownerId: BE17D7D6-721A-4F6D-B081-CAABB6D8F5B9
lastActivityDateUtc: '2023-12-10T15:30:00Z'
/v1/contracts/entities:
get:
tags:
- Contracts
summary: Contract entities
description: Gets contract entities (other parties)
operationId: get-v1-contracts-entities
responses:
'200':
description: Success
content:
text/plain:
schema:
$ref: '#/components/schemas/ContractEntityArray'
example:
- id: 1
name: Entity 1
- id: 2
name: Entity 2
application/json:
schema:
$ref: '#/components/schemas/ContractEntityArray'
example:
- id: 1
name: Entity 1
- id: 2
name: Entity 2
text/json:
schema:
$ref: '#/components/schemas/ContractEntityArray'
example:
- id: 1
name: Entity 1
- id: 2
name: Entity 2
post:
tags:
- Contracts
summary: Create contract entity
description: Creates a contract entity
operationId: post-v1-contracts-entities
requestBody:
content:
application/json-patch+json:
schema:
type: string
application/json:
schema:
type: string
text/json:
schema:
type: string
application/*+json:
schema:
type: string
responses:
'200':
description: Success
content:
text/plain:
schema:
type: integer
format: int32
application/json:
schema:
type: integer
format: int32
text/json:
schema:
type: integer
format: int32
/v1/contracts/externalid/{externalId}:
get:
tags:
- Contracts
summary: ExternalId lookup
operationId: get-v1-contracts-externalid-externalid
parameters:
- name: externalId
in: path
description: The externalId to lookup
required: true
schema:
type: string
responses:
'200':
description: Success
content:
text/plain:
schema:
$ref: '#/components/schemas/ExternalIdLookupModel'
application/json:
schema:
$ref: '#/components/schemas/ExternalIdLookupModel'
text/json:
schema:
$ref: '#/components/schemas/ExternalIdLookupModel'
/v1/contracts/{contractId}:
patch:
tags:
- Contracts
summary: Update contract
operationId: patch-v1-contracts-contractid
parameters:
- name: contractId
in: path
description: The Id of the contract
required: true
schema:
type: integer
format: int32
requestBody:
description: The update request (in jsonpatch format)
content:
application/json-patch+json:
schema:
$ref: '#/components/schemas/OperationArray'
example:
- value: '123'
path: ExternalId
op: replace
application/json:
schema:
$ref: '#/components/schemas/OperationArray'
example:
- value: '123'
path: ExternalId
op: replace
text/json:
schema:
$ref: '#/components/schemas/OperationArray'
example:
- value: '123'
path: ExternalId
op: replace
application/*+json:
schema:
$ref: '#/components/schemas/OperationArray'
example:
- value: '123'
path: ExternalId
op: replace
responses:
'200':
description: Success
get:
tags:
- Contracts
summary: Get contract
description: Get contract details by contract id
operationId: get-v1-contracts-contractid
parameters:
- name: contractId
in: path
description: The Id of the contract
required: true
schema:
type: integer
format: int32
responses:
'200':
description: Success
content:
text/plain:
schema:
$ref: '#/components/schemas/ContractDetails'
application/json:
schema:
$ref: '#/components/schemas/ContractDetails'
text/json:
schema:
$ref: '#/components/schemas/ContractDetails'
/v1/contracts/{contractId}/fields:
get:
tags:
- Contracts
summary: Get contract fields
description: Get contract fields by contract id
operationId: get-v1-contracts-contractid-fields
parameters:
- name: contractId
in: path
description: The Id of the contract
required: true
schema:
type: integer
format: int32
responses:
'200':
description: Success
content:
text/plain:
schema:
$ref: '#/components/schemas/ContractFieldData'
example:
detailFields:
schema:
properties:
field_1:
fieldId: 1
title: An example field name
description: Example field description
lawvuType: 7
isReadOnly: false
type: boolean
label: ''
order:
- field_1
required:
- field_1
model:
field_1: true
coreFields:
schema: null
model: null
application/json:
schema:
$ref: '#/components/schemas/ContractFieldData'
example:
detailFields:
schema:
properties:
field_1:
fieldId: 1
title: An example field name
description: Example field description
lawvuType: 7
isReadOnly: false
type: boolean
label: ''
order:
- field_1
required:
- field_1
model:
field_1: true
coreFields:
schema: null
model: null
text/json:
schema:
$ref: '#/components/schemas/ContractFieldData'
example:
detailFields:
schema:
properties:
field_1:
fieldId: 1
title: An example field name
description: Example field description
lawvuType: 7
isReadOnly: false
type: boolean
label: ''
order:
- field_1
required:
- field_1
model:
field_1: true
coreFields:
schema: null
model: null
patch:
tags:
- Contracts
summary: Update fields
operationId: patch-v1-contracts-contractid-fields
parameters:
- name: contractId
in: path
description: The Id of the contract
required: true
schema:
type: integer
format: int32
requestBody:
description: The update request (in jsonpatch format)
content:
application/json-patch+json:
schema:
$ref: '#/components/schemas/OperationArray'
examples:
string field:
value:
value: new value
path: /field_string
op: replace
number field:
value:
value: 123
path: /field_number
op: replace
date field:
value:
value: '2022-03-0
# --- truncated at 32 KB (71 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lawvu/refs/heads/main/openapi/lawvu-contracts-api-openapi.yml