Difference between revisions of "MOR API credit note update"
From Kolmisoft Wiki
Jump to navigationJump to search
m (moved MOR API credit note update api to MOR API credit note update) |
|
(No difference)
|
Revision as of 04:18, 27 May 2013
MOR API Credit note update
Usage
- Call: /api/credit_note_update
- Methods: POST, GET(if allowed, not recomended)
Parametres
- credit_note_id - Credit note ID in MOR database. Required.
- u - username for authentication. 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.
Request
We have credit_note_id = 123, API Secret Key = 456789
We send:
HTML POST: http://<SERVER_IP>/billing/api/credit_note_update?u=username&credit_note_id=123&status=paid&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441
NOTE that username are not included in hash
Returns
Success
<?xml version="1.0" encoding="UTF-8"?> <page> <status>Credit note was updated</status> </page>
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.