# Update contract information

This guide explains the functionality and messages used to update&#x20;contract information in Ropo One.

Interface can be used for example updating&#x20;contract status in Ropo One.

\
This documentation describes Ropo One interface (RestAPI) and message&#x20;format (JSON). If this doesn’t apply to possibilities that client and their system&#x20;can provide, then other interfaces (SFTP) and message formats can be agreed&#x20;as long as they match to Ropo One requirements. Other interfaces and&#x20;message formats must be discussed and agreed separately during&#x20;implementation project.

| Field                                        | Description                                  | Mandatory / Optional | Example                  |
| -------------------------------------------- | -------------------------------------------- | -------------------- | ------------------------ |
| contract\_&#xD;no                            | <p>Contract number (identifier). Is used to  |                      |                          |
| <br>find contract which is requested to be   |                                              |                      |                          |
| <br>updated</p>                              | Mandatory                                    | CN18&#xD;2838        |                          |
| name                                         | Contract name                                | Optional             | Home&#xD; Insura&#xD;nce |
| startdate                                    | Start date for contract                      | Optional             | 2023-&#xD;06-10          |
| enddate                                      | End date for contract                        | Optional             | 2025-&#xD;06-10          |
| contracts&#xD;tatus                          | <p>Contract status                           |                      |                          |
| <br>Available options:                       |                                              |                      |                          |
| <br>• active                                 |                                              |                      |                          |
| <br>• terminated                             |                                              |                      |                          |
| <br>• closed</p>                             | Optional                                     | Termi&#xD;nated      |                          |
| type                                         | Contract type                                | Optional             | Insura&#xD;nce           |
| terminati&#xD;on\_date                       | <p>Date for contract termination if invoices |                      |                          |
| <br>are not paid before.</p>                 | Optional                                     | <p>2023-             |                          |
| <br>08-01</p>                                |                                              |                      |                          |
| terminati&#xD;onterm                         | <p>Term to be used when calculating          |                      |                          |
| <br>termination date. If termination date is |                                              |                      |                          |
| <br>calculated in Ropo24.</p>                | Optional                                     | 14                   |                          |

## PATCH /contract

> Update a contract

```json
{"openapi":"3.1.0","info":{"title":"Ropo One","version":"1.0.0"},"tags":[{"name":"contract","description":"Job contracts"}],"servers":[{"url":"/rest","description":"Ropo One"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","bearerFormat":"JWT","scheme":"bearer"}},"schemas":{"ContractUpdateRequest":{"title":"ContractUpdateRequest","description":"ContractUpdateRequest","properties":{"data":{"$ref":"#/components/schemas/JobContract"}},"type":"object"},"JobContract":{"title":"JobContract","description":"JobContract","required":["contract_no"],"properties":{"contract_no":{"description":"Contract number","type":"string"},"name":{"type":["string","null"]},"startdate":{"type":["string","null"]},"enddate":{"description":"Contract end date","type":["string","null"]},"contractstatus":{"description":"Status of contract (active, closed, terminated)","type":["string","null"]},"type":{"description":"Type of contract (insurance)","type":["string","null"]},"termination_date":{"description":"Contract termination date","type":["string","null"]},"terminationterm":{"description":"Contract termination term. Number of days termination will be done.","type":["integer","null"]},"product":{"description":"Contract product name","type":["string","null"]}},"type":"object"},"HttpApiProblem":{"title":"HttpApiProblem","description":"HttpApiProblem","properties":{"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem","type":["integer","null"]},"type":{"description":"A URI reference that identifies the problem type","type":["string","null"]},"title":{"description":"A short, human-readable summary of the problem type","type":["string","null"]},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem","type":["string","null"]}},"type":"object"}}},"paths":{"/contract":{"patch":{"tags":["contract"],"summary":"Update a contract","operationId":"updateContractAction","requestBody":{"description":"JSON data with contract details.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractUpdateRequest"}}}},"responses":{"200":{"description":"Returns success message if contract was succesfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractUpdateRequest"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpApiProblem"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpApiProblem"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpApiProblem"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpApiProblem"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.ropo.com/guides/industry-specific-add-ons/update-contract-information.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
