---
title: s_contract_edit
url: 'https://gidas.saver.lt/api/s_contract_edit'
markdown: 'https://gidas.saver.lt/api/s_contract_edit.md'
date: '2021-12-20'
description: 'Last update 2021-12-20 This method can be used for creation - modification of sales/purchases contracts. All parameters are expected via HTTP POST. M Mandatory field if new contract is created Mandatory parameters Name Description Notes session_id Session id login RIVILE username pa…'
taxonomy:
  category:
    - docs
---

[](#)  [ Pradžia ](https://gidas.saver.lt/)     [ API ](https://gidas.saver.lt/api)      s\_contract\_edit    

# s\_contract\_edit

Last update 2021-12-20

This method can be used for creation - modification of sales/purchases contracts. All parameters are expected via HTTP POST.

`M` Mandatory field if new contract is created

#### Mandatory parameters

| Name | Description | Notes |
|---|---|---|
| **session\_id** | Session id |
| **login** | RIVILE username |  |
| **pass** | RIVILE password hashed in **MD5** |  |
| **clientCode** | client code | n08\_kodas\_ks |
| **contractCode** | Contract number or code. Contract codes mus be Unique | n51\_kodas\_kt |

#### Additional optional parameters

| Name | Description | Notes |
|---|---|---|
| **contractType** | Type of contract. 1 - purchase, 2 - sales (1 if unspecified) Can not be updated, for new contracts only. | n51\_tipas |
| **contractPriority** | Contract priority. Numeric only field (0 if unspecified) | n51\_prioritetas |
| **contractDate** | Contract date | n51\_op\_data |
| **contractName** | Contract name `M` | n51\_pav |
| **contractSum** | Contract sum | n51\_suma |
| **contractDescription** | Contract description | n51\_pastabos |
| **contractInactive** | Contract inactive 1 - yes , 0 - no | n51\_viskas |
| **contractName1** `New` | Contract name 1 | n51\_aprasymas1 |
| **contractName2** `New` | Contract name 2 | n51\_aprasymas2 |
| **contractName3** `New` | Contract name 3 | n51\_aprasymas3 |
| **contractName4** `New` | Contract name 4 | n51\_aprasymas4 |

#### Web service returns

| Name | Description | Notes |
|---|---|---|
| **status** | Web service status |  |
| **description** | Status description |  |
| **login** | RIVILE username |  |
| **clientCode** |  |  |

#### Web service status list

| Name | Description |
|---|---|
| **00** | Ok |
| **01** | No parameter **session\_id** |
| **02** | No parameter **login** |
| **03** | No parameter **pass** |
| **04** | Login failed |
| **05** | No parameter **clientCode** |
| **06** | Client not found |
| **07** | No parameter **contarctCode** |
| **08** | Optional field validation error with explanation |
| **98** | DB connect error |
| **99** | Web service POST parameters error |

Nepadaryta contractName1-4

 [ ](https://gidas.saver.lt/api/s_client_login) [](https://gidas.saver.lt/api/s_extinfo_view)

---

## Navigation

- Parent: [API](https://gidas.saver.lt/api.md)
- Previous: [s_client_login](https://gidas.saver.lt/api/s_client_login.md)
- Next: [s_extinfo_view](https://gidas.saver.lt/api/s_extinfo_view.md)
