MOR API Services get

From Kolmisoft Wiki
Revision as of 13:18, 23 October 2014 by Vladislav (talk | contribs) (→‎Request)
Jump to navigationJump to search

NOTE: Available from MOR X5

Description

MOR API Services get

Usage

  • From MOR X5 Call: /api/services_get
  • Methods: POST, GET(if allowed, not recomended)



Parametres



Request

We have: API Secret Key = 123456

We send:

HTML POST: http://<SERVER_IP>/billing/api/services_get?u=admin&hash=7c4a8d09ca3762af61e59520943dc26494f8941b

NOTE that username is not included in hash

Success

<page>
 <services>
   <service>
     <name>Test_periodic_service</name>
     <type>periodic_fee</type>
     <period>month</period>
     <price>10.0</price>
     <self_cost>0.0</self_cost>
     <currency>USD</currency>
     <quantity>1</quantity>
   </service>
   <service>
     <name>Test_one_time_fee_service</name>
     <type>one_time_fee</type>
     <period></period>
     <price>12.0</price>
     <self_cost>0.0</self_cost>
     <currency>USD</currency>
     <quantity/>
   </service>
   <service>
     <name>Test_flat_rate_service</name>
     <type>flat_rate</type>
     <period></period>
     <price>1.0</price>
     <self_cost>0.0</self_cost>
     <currency>USD</currency>
     <quantity>1</quantity>
   </service>
 </services>
</page>




Errors

  • <error>No Services found</error> - Service was not found using specified ID. Use correct ID.
  • <error>You are not authorized to manage Services</error> - Such username does not exist in the database or User does not have rights to manage Services.
  • <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key while concatenating hash_string.



See also