MOR API invoice update

From Kolmisoft Wiki

Jump to: navigation, search


[edit] Description

MOR API for invoice update.
If a user has 'accountant' rights and can see only assigned users, he will be able to update only for assigned users invoices.

[edit] Usage

  • From MOR X11 call: /api/invoice_update
  • Methods: POST, GET(if allowed, not recomended)

[edit] 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. (to change status, the value must be 1)
  • pay - paid status setting. (to change status, the value must be 1)

[edit] Request

If API Secret Key = secret

You send:

HTML POST: http://<SERVER IP>/billing/api/invoice_update?u=admin&id=2&hash=38282ca5e65e63746498ef5b39a2fe71c6448df4

* Note that username (u) is not included in the hash

[edit] Returns


<?xml version="1.0" encoding="UTF-8"?>
   <success>Invoice successfully updated</success>


<?xml version="1.0" encoding="UTF-8"?>
   <error>Invoice was not found</error>
<?xml version="1.0" encoding="UTF-8"?>
 <error>Incorrect hash</error>
<?xml version="1.0" encoding="UTF-8"?>
     <error>Access denied</error>

[edit] See also

Personal tools


Try M2