API


change_password($pass_old, $pass_new)
Change of password.

Parameters:
  • pass_old - current password
  • pass_new - new password

Returns:
  • bad_login - invalid current password
  • ok - command successful
get_user_info()
Information about account.

Returns:
  • ok - data structure:
    • id - ID
    • login - login
    • email - contact e-mail
    • cell - phone number
    • lang - contact language
    • credit - credit amount
    • allow_debt - povolene precerpanie kreditu
send_message($message, $service_type)
Send authorized message to our staff.

Parameters:
  • service_type - type of service:
    • W - webhosting service
    • N - NIC service
    • S - SMS service
    • SH - serverhousing service
    • SO - subHoster service
  • message - text of message

Returns:
  • inv_service_type - invalid type of service
  • inv_email - na konte je nastaveny neplatny kontaktny e-mail
  • ok - command successful
get_cart_items()
List of items in shopping cart.

Vracia:
  • ok - data structure:
    • id - item ID
    • item - item label
    • count - amount
    • price - price each
    • vat - VAT rate in percentage
    • id_req - parent ID
remove_cart_item($itm_id)
Remove item from shopping cart.

Parameters:
  • itm_id - item ID

Returns:
  • not_exists - item with this ID doesn't exist or has a parent
  • ok - command successful
create_order_from_cart($coupon)
Create order from shopping cart.

Parameters:
  • coupon - discount coupon

Returns:
  • no_items - shopping cart is empty
  • inv_coupon - invalid discount coupon
  • ok - data structure:
    • order_id - ID of order
    • id_ticket - ID of notice on due payment
    • ticket_number - number of notice on due payment
    • keyhash - hash of notice on due payment
order_credit($count)
Insert credit into shopping cart.

Parameters:
  • count - credit amount

Returns:
  • inv_count - invalid parameter 'count'
  • ok - command successful
get_credit()
Current credit amount.

Returns:
  • ok - data structure:
    • credit - credit amount
get_credit_movements($poffset, $pcount, $fservice_type=NULL, $flabel=NULL, $fdateaddfrom=NULL, $fdateaddto=NULL)
Credit movements.

Parameters:
  • poffset - paging, offset
  • pcount - paging, number of items
  • fservice_type - filter by service type (not required)
  • flabel - filter by label (not required)
  • fdateaddfrom - filter by addition date (from) (not required)
  • fdateaddto - filter by addition date (to) (not required)

Returns:
  • ok - data structure:
    • count - number of all items
    • items - movements:
      • service_type - type of service
      • label - label
      • price - amount
      • debet - values:
        • 0 - credit reduction
        • 1 - credit addition
      • balance - balance
      • dateadd - addition date and time, format DD.MM.YYYY HH:MM:SS