Difference between revisions of "MOR API credit notes delete"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '''This functionality is available from MOR 12'' MOR API Delete credit note <br><br> ---- <br><br> * Call: /api/credit_note_delete * Methods: P…')
 
Line 1: Line 1:
''This functionality is available from [[MOR 12 documentation | MOR 12]]''
=Deescription=
<!---This functionality is available from MOR 12--->
[[MOR API]] Delete credit note
<br><br>
=Usage=


* Call: /api/credit_note_delete
* Methods: POST, GET(if allowed, not recomended)
<br><br>
===Parametres===


[[MOR API]]
* credit_note_id - Credit note ID in MOR database, whose datas we want to delete. '''Required'''.
* u - username for authentication. '''Required'''.
* [[MOR API hash construction | hash]] - SHA1 hash constructed using '''device''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.
<br><br>
===Request===


Delete credit note
We have credit_note_id = 123, API Secret Key = 456789


<br><br>
We send:
----
<br><br>


* Call: /api/credit_note_delete
HTML POST: http://<SERVER_IP>/billing/api/credit_note_delete?u=username&credit_note_id=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441
* Methods: POST, GET(if allowed, not recomended)
* Params:
** credit_note_id - Credit note ID in MOR database, whose datas we want to delete. '''Required'''.
** u - username to login. '''Required'''.
** p - password to login. '''Required'''.
** [[MOR API hash construction | hash]] - SHA1 hash constructed using '''device''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.
**


* Returns:
'''* Note that username are not included in hash'''
**Success
<br><br>
*** <status>Credit note was deleted</status>
===Returns===


'''Success'''


** Errors:
<?xml version="1.0" encoding="UTF-8"?>
*** <error>Credit note was not found</error> - Credit note was not found using credit_note_id. Use correct credit note id.
<page>
*** <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
    <status>Credit note was created</status>
*** <error>Bad login</error>  
</page>
<br><br>
<br><br>
----
----
*Example:
'''Errors'''
**We have credit_note_id = 123, API Secret Key = 456789
 
**Hash string to be converted: "123456789"
* <error>Credit note was not found</error> - Credit note was not found using credit_note_id. Use correct credit note id.
**We send:
* <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
***/api/credit_note_delete?u=admin&p=admin&credit_note_id=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441
* <error>Bad login</error>
'''* Note that username and password are not included in hash'''
<br><br>
=See also=
 
* [[MOR API]]

Revision as of 04:40, 27 May 2013

Deescription

MOR API Delete credit note

Usage

  • Call: /api/credit_note_delete
  • Methods: POST, GET(if allowed, not recomended)



Parametres

  • credit_note_id - Credit note ID in MOR database, whose datas we want to delete. Required.
  • u - username for authentication. Required.
  • hash - SHA1 hash constructed using device 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_delete?u=username&credit_note_id=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441

* Note that username are not included in hash

Returns

Success

<?xml version="1.0" encoding="UTF-8"?>
<page>
   <status>Credit note was created</status>
</page>




Errors

  • <error>Credit note was not found</error> - Credit note was not found using credit_note_id. Use correct credit note id.
  • <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
  • <error>Bad login</error>



See also