server side for project with promo codes in magnit shops. base url: https://magnit-server.000webhostapp.com/
- All queries send throught POST method.
- The result is also an object, its content is in the content field
- fields: message(string), isError(boolean), content(array)
- adress: /php/controllers/login-controller.php
- arguments: login(string), password(string)
- result: user(object)
- adress: /php/controllers/signin-controller.php
- arguments: login(string), password(string), region(string)
- result: user(object)
- adress: /php/controllers/region-get-controller.php
- arguments: none
- result: regions(object array)
- adress: /php/controllers/region-add-controller.php
- arguments: region(string)
- result: inserted region id(int)
- adress: /php/controllers/region-delete-controller.php
- arguments: region(string)
- result: successful message from response object
- adress: /php/controllers/range-get-controller.php
- arguments: none
- result: ranges(object array)
- adress: /php/controllers/range-delete-controller.php
- arguments: range(int, only 12 numbers length)
- result: successful message from response object
- adress: /php/controllers/card-get-controller.php
- arguments: range(int, only 12 numbers length)
- result: cards(array)
this method can only be called after login
- adress: /php/controllers/card-add-controller.php
- arguments: range(int, only 12 numbers length)
- result: cards(int array), region(object)
field id is a card id
- adress: /php/controllers/qr-controller.php
- arguments: id(int)
- result: url(string), card(object)
- adress: /php/controllers/promo-add-controller.php
- arguments: card_id(int), balance(decimal)
- result: successful message from response object
- adress: /php/controllers/orders-get-controller.php
- arguments: none
- result: orders(object array)
when registering the first user, it is automatically assigned the role of super admin, which has the right to assign and remove other administrators only super admin can use this methods
- adress: /php/controllers/admin-add-controller.php
- arguments: login(string), password(string), region_id(int)
- result: successful message from response object
- adress: /php/controllers/admin-delete-controller.php
- arguments: id(int)
- result: successful message from response object
- adress: /php/controllers/admin-get-controller.php
- arguments: none
- result: admins(object array)
methods for manage qiwi wallets for recive payments from customers use only last added wallet token(string) - public qiwi wallet key secret(string) - secret qiwi wallet key
- adress: /php/controllers/qiwi-get-controller.php
- arguments: none
- result: qiwi(object)
- adress: /php/controllers/qiwi-add-controller.php
- arguments: number(int), token(string), secret(string)
- result: qiwi(object)