s_opportunities_edit
This method is for creating / editing opportunities.
All parameters are expected via HTTP POST.
Mandatory parameters
| Name |
Description |
Notes |
| session_id |
Session id |
|
| login |
RIVILE username |
|
| pass |
RIVILE password hashed in MD5 |
|
| leadId |
opportunity ID |
0 for new |
| leadName |
opportunity Name |
Mandatory for new, optional for edit |
Additional parameters
| Name |
Description |
Notes |
| lang |
Web service response language. EN LT or RU |
|
| testMode |
Error validation, no operation |
0-1 |
| leadDescription |
Description |
|
| leadDateFrom |
Date from |
Format YYYY-MM-DD HH:MM:SS |
| leadDateTo |
Date to |
Format YYYY-MM-DD HH:MM:SS |
| leadNextDate |
Next action date |
Format YYYY-MM-DD HH:MM:SS |
| leadStageId |
Stage ID |
|
| leadPipeId |
Pipe ID |
|
| leadLoseId |
ACTIVE/WIN/LOSE ID |
Provide 9999 for active opportunity, 0 for WIN ,1-99 for LOSE |
| leadSourceId |
Source ID |
|
| leadColor |
Color code |
|
| leadLink |
URL Link |
|
| leadContactId |
Contact ID |
|
| leadContactName |
Contact Name |
|
| leadContactTitle |
Contact Title |
|
| leadContactPhone |
Contact Phone |
|
| leadContactMobPhone |
Contact Mob Phone |
|
| leadContactEmail |
Contact Email |
|
| leadSum |
Sum |
Works if leadSalesDecription3 not provided |
| leadSalesDecription3 |
Sales document ID |
|
| leadUser |
User |
|
| leadClientCode |
Client code |
Provide "000000000000" for potential client |
| leadClientName |
Potential client name |
When leadClientCode = "000000000000" |
| leadClientCompanyCode |
Potential client company code |
When leadClientCode = "000000000000" |
| leadClientVatCode |
Potential client VAT code |
When leadClientCode = "000000000000" |
| leadClientAddress |
Potential client address |
When leadClientCode = "000000000000" |
| leadClientRating |
Potential client rating |
When leadClientCode = "000000000000" |
| leadClientShortName |
Potential client short name |
When leadClientCode = "000000000000" |
| leadClientNotes |
Potential client notes |
When leadClientCode = "000000000000" |
| leadClientDescription |
Potential client description |
When leadClientCode = "000000000000" |
| leadClientTags |
Potential client tags |
When leadClientCode = "000000000000" |
| leadClientWebLink |
Potential client URL link |
When leadClientCode = "000000000000" |
| leadLogisticCode1 |
Logistic code 1 |
|
| leadLogisticCode2 |
Logistic code 2 |
|
| leadLogisticCode3 |
Logistic code 3 |
|
| leadLogisticCode4 |
Logistic code 4 |
|
Web service returns
| Name |
Description |
Notes |
| status |
Web service status |
|
| description |
Status description |
|
| login |
RIVILE username |
|
| list |
List with data |
|
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 or wrong parameter leadId |
| 06 |
++leadId not found |
| 07 |
++No parameter leadNem |
| 08 |
DB connect error |
| 09 |
++Wrong parameter lang , values LT,EN,RU only. |
| 10 |
No parameter list |
| 11 |
Parameter list is not json list |
| 12 |
++Error in parameter testMode. Possible values 0-1 |
| 14 |
++Parameter leadDateFrom validation error. Input must be yyyy-mm-dd format |
| 15 |
++Parameter leadDateTo validation error. Input must be yyyy-mm-dd format |
| 16 |
++Parameter leadNextDate validation error. Input must be yyyy-mm-dd format |
| 17 |
++Parameter leadPipeId validation error. Input must be numeric and in ... range |
| 18 |
++Parameter leadStageId validation error. Input must be numeric and in ... range |
| 19 |
++Parameter leadLoseId validation error. Input must be numeric and in ... range |
| 98 |
++SQL error |