Skip to content

Update a project

Request

Update a project by id. This endpoint supports partial updates using PATCH semantics:

  • Only fields present in the request will be updated
  • Null values clear the clearable fields (note, retentionDays)
  • Absent fields will remain unchanged
  • All other fields (name, projectType, extractionModelId, ocr, completion, duplicates, isLive, generateWordRegionsOnReview, members, schema) may be omitted but cannot be set to null; sending null returns a 422
  • At least one field must be provided in the request

projectType can change from documentProcessing to preProcessing or execution, and between preProcessing and execution. Changing a project back to documentProcessing is rejected with a 422. Sending the current type is accepted and changes nothing. A type change keeps the schema, OCR, members, all other settings and the existing documents; only the type and the processing mode change.

When projectType changes and extractionModelId is omitted, the default processing mode of the new type is selected, as on creation. When extractionModelId is omitted and the type does not change, the current processing mode is kept. If no default processing mode exists for the company, the request is rejected with a 400.

For preProcessing and execution projects, extractionModelId must match the company's automatically selected Cases processing mode; any other value is rejected with a 422. When projectType changes in the same request, extractionModelId is validated against the new type.

If the project's type is changed by another request while this update is being processed, the update is rejected with a 409 and nothing is written. Re-read the project and retry.

Only the google and internal OCR engines can be set. A project that currently uses abbyy or chinese can still be updated, but the ocr property must be omitted from the request — sending the project's existing ocr block back unchanged is rejected with a 422.

Security
OAuth2(Required scopes: projects.write)
Path
idstring(ProjectId)required

Project id

Example:63e6663823b4c1f5287398bb
Bodyapplication/jsonrequired

Project update data (all fields optional for partial update)

namestring, [ 1 .. 60 ] characters(ProjectName)

Project name

Example:"My Project"
notestring, [ 1 .. 1000 ] characters(ProjectNote)

Project note

Example:"My project description note"
projectTypestring(ProjectType)

New project type. Allowed changes:

  • documentProcessing to preProcessing or execution
  • preProcessing to execution, and execution to preProcessing

Changing back to documentProcessing returns a 422; sending the current type changes nothing. When the type changes, the processing mode is re-selected as on creation unless extractionModelId is also sent, in which case it is validated against the new type. Only the type and the processing mode change: schema, OCR, members, other settings and existing documents are kept. Null is not allowed.

Default:"documentProcessing"
Enum:"documentProcessing""preProcessing""execution"
Example:"execution"
ocrany(ProjectOCRRequest)
extractionModelIdstring(ProjectExtractionModelId)

Processing mode used by the project.

Omit to keep the current processing mode, or, when projectType changes, to select the default processing mode of the new type. Null is not allowed. For preProcessing and execution an explicit value must match the company's automatically selected Cases processing mode; the Cases processing mode cannot be assigned to documentProcessing projects. Malformed or mismatched IDs return 422 for preProcessing/execution; invalid or unknown document-processing model IDs, or a missing company default, return 400.

Example:"63e6663823b4c1f5287398bb"
completionstring(ProjectCompletion)

ProjectCompletion type

  • automatic - Mark documents as completed after succesfull validation
  • manual - Mark documents to review after succesfull validation
Default:"manual"
Enum:"automatic""manual"
Example:"manual"
duplicatesstring(ProjectDuplicates)

How duplicates documents show be handle

  • allow - Allow documents duplicates to be processed
  • fail - Mark documents duplicates as failed
Default:"fail"
Enum:"allow""fail"
Example:"allow"
retentionDaysinteger, [ 1 .. 3650 ](ProjectRetentionDays)

Project document retention in days

Example:180
isLiveboolean(ProjectIsLive)

Indicates if a project is live or not

Default:false
generateWordRegionsOnReviewboolean(ProjectGenerateWordRegionsOnReview)

Generate word bounding boxes for documents that require human review.

When enabled, documents that stop for review (extracted or reviewRequired) get an additional OCR pass that produces word regions, unless the project's OCR engine already provided them. Useful for the internal OCR engine, which does not place words.

Default:false
Example:true
membersany
schemaobject(Schema)
curl -i -X PATCH \
  https://api.cloud.hypatos.ai/v2/projects/63e6663823b4c1f5287398bb \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "My Project",
    "note": "My project description note",
    "projectType": "execution",
    "ocr": {
      "engine": "google",
      "features": [
        "barcodes"
      ]
    },
    "extractionModelId": "63e6663823b4c1f5287398bb",
    "completion": "manual",
    "duplicates": "allow",
    "retentionDays": 180,
    "isLive": false,
    "generateWordRegionsOnReview": true,
    "members": {
      "allow": "all"
    },
    "schema": {
      "version": 1,
      "dataPoints": [
        {
          "internalName": "type",
          "displayName": "Type",
          "type": "string",
          "source": {
            "type": "extractor"
          },
          "normalization": [],
          "rules": {}
        },
        {
          "internalName": "number",
          "displayName": "Number",
          "type": "string",
          "source": {
            "type": "extractor"
          },
          "normalization": [],
          "rules": {}
        },
        {
          "internalName": "issuedAt",
          "displayName": "Issued At",
          "type": "date",
          "preferDayOfMonth": "last",
          "source": {
            "type": "extractor"
          },
          "normalization": [],
          "rules": {}
        },
        {
          "internalName": "deliveredAt",
          "displayName": "Delivered At",
          "type": "date",
          "preferDayOfMonth": "last",
          "source": {
            "type": "extractor"
          },
          "normalization": [],
          "rules": {}
        },
        {
          "internalName": "currency",
          "displayName": "Currency",
          "type": "string",
          "source": {
            "type": "extractor"
          },
          "normalization": [],
          "rules": {}
        }
      ],
      "features": {
        "derivation": false
      },
      "enrichment": {},
      "normalization": {},
      "validation": {}
    }
  }'

Responses

Project updated

Bodyapplication/json
idstring(ProjectId)required

Project ID

Example:"63e6663823b4c1f5287398bb"
projectTypestring(ProjectType)required

Project processing type. Defaults to documentProcessing on creation. Can be changed on update from documentProcessing to preProcessing or execution, and between preProcessing and execution; a project can never change back to documentProcessing.

  • documentProcessing - classic extraction project backed by an extraction model
  • preProcessing - pre-processing project backed by the company's Cases processing mode
  • execution - execution project backed by the company's Cases processing mode
Default:"documentProcessing"
Enum:"documentProcessing""preProcessing""execution"
Example:"documentProcessing"
createdAtstring, (date-time)required
Example:"1990-12-31T15:46:19.384990Z"
createdBystring(ProjectMemberId)required

Project member id

Example:"63e6663823b4c1f5287398bb"
updatedAtstring, (date-time)required
Example:"1990-12-31T15:46:19.384990Z"
updatedBystring(ProjectMemberId)required

Project member id

Example:"63e6663823b4c1f5287398bb"
namestring, [ 1 .. 60 ] characters(ProjectName)required

Project name

Example:"My Project"
notestring, [ 1 .. 1000 ] characters(ProjectNote)

Project note

Example:"My project description note"
extractionModelIdstring(ProjectExtractionModelId)required

Extraction Model id

Example:"63e6663823b4c1f5287398bb"
ocrany(ProjectOCRResponse)required
completionstring(ProjectCompletion)required

ProjectCompletion type

  • automatic - Mark documents as completed after succesfull validation
  • manual - Mark documents to review after succesfull validation
Default:"manual"
Enum:"automatic""manual"
Example:"manual"
duplicatesstring(ProjectDuplicates)required

How duplicates documents show be handle

  • allow - Allow documents duplicates to be processed
  • fail - Mark documents duplicates as failed
Default:"fail"
Enum:"allow""fail"
Example:"allow"
membersanyrequired
retentionDaysinteger, [ 1 .. 3650 ](ProjectRetentionDays)

Project document retention in days

Example:180
isLiveboolean(ProjectIsLive)required

Indicates if a project is live or not

Default:false
generateWordRegionsOnReviewboolean(ProjectGenerateWordRegionsOnReview)required

Generate word bounding boxes for documents that require human review.

When enabled, documents that stop for review (extracted or reviewRequired) get an additional OCR pass that produces word regions, unless the project's OCR engine already provided them. Useful for the internal OCR engine, which does not place words.

Default:false
Example:true
Response
{ "id": "63e6663823b4c1f5287398bb", "projectType": "documentProcessing", "createdAt": "1990-12-31T15:46:19.384990Z", "createdBy": "63e6663823b4c1f5287398bb", "updatedAt": "1990-12-31T15:46:19.384990Z", "updatedBy": "63e6663823b4c1f5287398bb", "name": "My Project", "note": "My project description note", "extractionModelId": "63e6663823b4c1f5287398bb", "ocr": { "engine": "abbyy", "features": [ … ], "languages": [ … ] }, "completion": "manual", "duplicates": "allow", "members": { "allow": "all" }, "retentionDays": 180, "isLive": false, "generateWordRegionsOnReview": true }