Difference between revisions of "MOR API Services get"
From Kolmisoft Wiki
Jump to navigationJump to search
| (One intermediate revision by one other user not shown) | |||
| Line 30: | Line 30: | ||
<id>1</id> | <id>1</id> | ||
<name>Test_periodic_service</name> | <name>Test_periodic_service</name> | ||
<memo>Comment</memo> | |||
<type>periodic_fee</type> | <type>periodic_fee</type> | ||
<period>month</period> | <period>month</period> | ||
| Line 36: | Line 37: | ||
<currency>USD</currency> | <currency>USD</currency> | ||
<quantity>1</quantity> | <quantity>1</quantity> | ||
<continue_call>0</continue_call> | |||
</service> | </service> | ||
<service> | <service> | ||
<id>2</id> | <id>2</id> | ||
<name>Test_one_time_fee_service</name> | <name>Test_one_time_fee_service</name> | ||
<memo>Comment2</memo> | |||
<type>one_time_fee</type> | <type>one_time_fee</type> | ||
<period></period> | <period></period> | ||
| Line 46: | Line 49: | ||
<currency>USD</currency> | <currency>USD</currency> | ||
<quantity/> | <quantity/> | ||
<continue_call>0</continue_call> | |||
</service> | </service> | ||
<service> | <service> | ||
<id>3</id> | <id>3</id> | ||
<name>Test_flat_rate_service</name> | <name>Test_flat_rate_service</name> | ||
<memo>Comment3</memo> | |||
<type>flat_rate</type> | <type>flat_rate</type> | ||
<period></period> | <period></period> | ||
| Line 56: | Line 61: | ||
<currency>USD</currency> | <currency>USD</currency> | ||
<quantity>1</quantity> | <quantity>1</quantity> | ||
<continue_call>1</continue_call> | |||
</service> | </service> | ||
</services> | </services> | ||
Latest revision as of 13:39, 21 October 2025
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
- u - username for authentication. Required.
- hash - SHA1 hash constructed using API_Secret_Key ( More described in Constructing hash). Required.
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>
<continue_call>0</continue_call>
</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/>
<continue_call>0</continue_call>
</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>
<continue_call>1</continue_call>
</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.