Author Topic: url for admin api  (Read 10412 times)

Offline mcflynn617

  • Newbie
  • *
  • Posts: 3
  • Karma: +2/-0
    • View Profile
url for admin api
« on: January 06, 2017, 04:32:26 PM »
I would like to access the admin api, but I don't know how to create urls that will hit the admin api endpoints. For example, the storefront api uses 'rt=a/product/product&product_id=' to get information for a product number 'product_id'. How do you create one for 'ControllerApiOrderDetails' in admin/controller/api/order/details.php? Ultimately, I need to get a list of new orders (or all orders) and a list of new customers (or all customers), are there api calls for those? If not, to create new api calls, I would need to use Extensions? I'm new to Abantecart and php so any information is greatly appreciated!

Offline mcflynn617

  • Newbie
  • *
  • Posts: 3
  • Karma: +2/-0
    • View Profile
Re: url for admin api
« Reply #1 on: January 07, 2017, 09:59:50 AM »
More generally, how are routes created in Abantecart? Which php file parses the url and determines which controller to call? Is there something like a 'urls.py' in Django which takes a url and calls the proper method or function?

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2046
  • Karma: +318/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: url for admin api
« Reply #2 on: January 08, 2017, 02:43:11 PM »
do you use this?
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: url for admin api
« Reply #3 on: January 08, 2017, 06:00:23 PM »
Currently, there is a limited Admin API to retrieve customer, order details and search. I think this is what you need. 
There is no manual for Admin API yet. I hope we will find time to create it later, or feel free to help :)

Check API admin test tool to see what it can do for you:
https://github.com/abantecart/testing_tools

It should be easy to develop and extend it further.
For example, location for order admin API is here public_html/admin/controller/api/customer/orders.php

Storefront API Manual:
http://docs.abantecart.com/pages/developer/sf_api.html

Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline mcflynn617

  • Newbie
  • *
  • Posts: 3
  • Karma: +2/-0
    • View Profile
Re: url for admin api
« Reply #4 on: January 08, 2017, 11:25:11 PM »
Thanks! The testing script helped a lot. I'll be happy to write up some docs once I understand how the admin API works.

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: url for admin api
« Reply #5 on: April 20, 2017, 09:03:52 AM »
Great. Thank you for offering.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

 

Powered by SMFPacks Social Login Mod