Difference between revisions of "MOR API phonebook edit"
From Kolmisoft Wiki
Jump to navigationJump to search
Line 1: | Line 1: | ||
''This functionality is available from [[MOR | ''This functionality is available from [[MOR 12| MOR 12]]'' | ||
[[MOR API]] | [[MOR API]] | ||
Credit note update | |||
<br><br> | <br><br> | ||
Line 10: | Line 10: | ||
<br><br> | <br><br> | ||
* Call: /api/ | * Call: /api/credit_note_update | ||
* Methods: POST, GET(if allowed, not recomended) | * Methods: POST, GET(if allowed, not recomended) | ||
* Params: | * Params: | ||
** | ** credit_note_id - Credit note ID in MOR database. '''Required'''. | ||
** u - username to login. '''Required'''. | ** u - username to login. '''Required'''. | ||
** p - password to login. '''Required'''. | ** p - password to login. '''Required'''. | ||
** status - status of credit note, posible values are 'paid', 'unpaid'. '''Optional''' | |||
** comment - unlimited length text. '''Optional''' | |||
** [[MOR API hash construction | hash]] - SHA1 hash constructed using '''params''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''. | ** [[MOR API hash construction | hash]] - SHA1 hash constructed using '''params''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''. | ||
* Returns: | * Returns: | ||
**Success | **Success | ||
*** <status> | *** <status>Credit note updated</status> | ||
** Errors: | ** Errors: | ||
*** <error> | *** <error>Credit note was not saved</error> | ||
*** <error>Bad login</error> | |||
*** <error> | *** <error>Credit note was not found</error> - credit note was not found using phonebook_id. Use correct phonebook id. | ||
*** <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string. | *** <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string. | ||
<br><br> | <br><br> | ||
---- | ---- | ||
*Example: | *Example: | ||
**We have | **We have credit_note_id = 123, API Secret Key = 456789 | ||
**Hash string to be converted: "123456789" | **Hash string to be converted: "123456789" | ||
**We send: | **We send: | ||
***/api/ | ***/api/credit_note_update?u=admin&p=admin&credit_note_id=123&status=paid&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441 | ||
'''* Note that username and password are not included in hash''' | '''* Note that username and password are not included in hash''' |
Revision as of 14:24, 12 January 2012
This functionality is available from MOR 12
Credit note update
- Call: /api/credit_note_update
- Methods: POST, GET(if allowed, not recomended)
- Params:
- credit_note_id - Credit note ID in MOR database. Required.
- u - username to login. Required.
- p - password to login. Required.
- status - status of credit note, posible values are 'paid', 'unpaid'. Optional
- comment - unlimited length text. Optional
- hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required.
- Returns:
- Success
- <status>Credit note updated</status>
- Errors:
- <error>Credit note was not saved</error>
- <error>Bad login</error>
- <error>Credit note was not found</error> - credit note was not found using phonebook_id. Use correct phonebook id.
- <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
- Success
- Example:
- We have credit_note_id = 123, API Secret Key = 456789
- Hash string to be converted: "123456789"
- We send:
- /api/credit_note_update?u=admin&p=admin&credit_note_id=123&status=paid&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441
* Note that username and password are not included in hash