Skip to content

Commit

Permalink
Merge pull request #56 from Mathiou04/master
Browse files Browse the repository at this point in the history
#55 Wrong route to reports top sellers
  • Loading branch information
claudiosanches committed Sep 27, 2016
2 parents bd43d1a + d9d8cd3 commit 9e2188b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions source/includes/wp-api-v1/_reports.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,17 @@ This API lets you retrieve and view a list of top sellers report.
<div class="api-endpoint">
<div class="endpoint-data">
<i class="label label-get">GET</i>
<h6>/wp-json/wc/v1/reports/sales/top_sellers</h6>
<h6>/wp-json/wc/v1/reports/top_sellers</h6>
</div>
</div>

```shell
curl https://example.com/wp-json/wc/v1/reports/sales/top_sellers?period=last_month \
curl https://example.com/wp-json/wc/v1/reports/top_sellers?period=last_month \
-u consumer_key:consumer_secret
```

```javascript
WooCommerce.get('reports/sales/top_sellers?period=last_month', function(err, data, res) {
WooCommerce.get('reports/top_sellers?period=last_month', function(err, data, res) {
console.log(res);
});
```
Expand All @@ -227,20 +227,20 @@ $query = [
'period' => 'last_month'
];

print_r($woocommerce->get('reports/sales/top_sellers', $query));
print_r($woocommerce->get('reports/top_sellers', $query));
?>
```

```python
print(wcapi.get("reports/sales/top_sellers?period=last_month").json())
print(wcapi.get("reports/top_sellers?period=last_month").json())
```

```ruby
query = {
period: "last_month"
}

woocommerce.get("reports/sales/top_sellers", query).parsed_response
woocommerce.get("reports/top_sellers", query).parsed_response
```

> JSON response example:
Expand Down

0 comments on commit 9e2188b

Please sign in to comment.