MOR API invoice update
From Kolmisoft Wiki
Jump to navigationJump to search
Description
MOR API for invoice update.
Usage
- From MOR X11 call: /api/invoice_update
- Methods: POST, GET(if allowed, not recomended)
Parametres
Parameters which are included into hash:
- id - Inovice ID in MOR database, which we want to change. Required.
Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key
Parameters which are not included into hash:
- hash - SHA1 hash constructed using parameters above and API_Secret_Key ( More described in Constructing hash). Required.
- u - username to login. Required.
- address - User Details address
- city - User Details city
- postcode - User Details postcode
- state - User Details state
- country_id - User Details Country (Direction id)
- phone - User Details phone
- tax_reg_number - User Details TAX Registration Number
- comment - Comment
- name - User Details name
- invoice_sent_manually - Invoice sent manually setting.
- pay - paid status setting.
Request
If API Secret Key = secret
You send:
HTML POST: http://<SERVER IP>/billing/api/invoice_update?u=admin&id=38282ca5e65e63746498ef5b39a2fe71c6448df4
* Note that username (u) is not included in the hash
Returns
Success
<?xml version="1.0" encoding="UTF-8"?> <page> <status> <success>Invoice successfully updated</success> </status> </page>
Errors
<?xml version="1.0" encoding="UTF-8"?> <page> <status> <error>Invoice was not found</error> </status> </page>
<?xml version="1.0" encoding="UTF-8"?> <status> <error>Incorrect hash</error> </status>
<?xml version="1.0" encoding="UTF-8"?> <page> <status> <error>Access denied</error> </status> </page>