Want To Customize Api

i want to make url like this for getting json data

http://{{domain}}/orders/merchantorder/79787/getorder

i want to make url like this for getting json data

http://{{domain}}/orders/merchantorder/79787/getorder

Feel free to contact us to get a free quote for this modification

i want to make url like this for getting json data

http://{{domain}}/orders/merchantorder/79787/getorder

My team also ready to do this . Please mail at cs24user@gmail.com to get free quote.

i want to make url like this for getting json data

http://{{domain}}/orders/merchantorder/79787/getorder

Link doesn't work.

If you are wanting to be very specific in your output, doing a small addon that returns the requested json is the most straightforward approach. What is is about the standard API that is not acceptable to you? You can always write a filter that will change the property names, etc. to meet your needs.

Please add:

1.
#file

app/addons/my_changes/schemas/routes/objects.post.php

#content

$schema[‘/orders/merchantorder/[i:order_id]/getorder’] = array(
‘dispatch’ => ‘merchantorder.getorder’
);

return $schema;

2.
#file

app/addons/my_changes/controllers/frontend/merchantorder.php

#content

if ( !defined(‘BOOTSTRAP’) ) { die(‘Access denied’); }

if($mode==‘getorder’){
$_REQUEST[‘order_id’] = !empty($_REQUEST[‘order_id’])?$_REQUEST[‘order_id’]:0;
$order_info = fn_get_order_info($_REQUEST[‘order_id’]);

header(‘Content-Type: application/json’);
echo json_encode($order_info);
exit;
}

Require My Changes add-on to be active.

PS: Is not safe because any who know the url can get the order details ;)

Keep on smiling,

---
Valentin
part of hungryweb.net