MOR API Services get

From Kolmisoft Wiki

Jump to: navigation, search

Contents

[edit] NOTE: Available from MOR X5

[edit] Description

MOR API Services get

[edit] Usage

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



[edit] Parametres



[edit] 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>
     <id>1</id>
     <name>Test_periodic_service</name>
     <memo>Comment</memo>
     <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>
     <id>2</id>
     <name>Test_one_time_fee_service</name>
     <memo>Comment2</memo>
     <type>one_time_fee</type>
     <period></period>
     <price>12.0</price>
     <self_cost>0.0</self_cost>
     <currency>USD</currency>
     <quantity/>
   </service>
   <service>
     <id>3</id>
     <name>Test_flat_rate_service</name>
     <memo>Comment3</memo>
     <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.



[edit] See also

Personal tools

Try MOR

Try M2