List Product Models
GET https://api.runningahead.com/rest/logs/me/products/{activityID}/{brandID}
Retrieves a list product models in the system.
Parameters
Parameter |
Type |
Description |
access_token |
string (required) |
OAuth 2.0 token for the current user. |
activityID |
integer or fixed type |
If specified, returns only brands that support the activity type identified by
id.
You can also use the following named types:
|
brandID |
string |
The brand ID |
limit |
integer |
The total number of records to be returned. Must be between 1 and 100,
inclusive. If not specified, limit will be defaulted to 50. |
offset |
integer |
0-based index of the first equipment to be returned. |
search |
string |
A space separated list of words or partial words that must appear
within the model's name. You can use this parameter to implement auto
complete by sending repeated requests as the user fills out the models
field. Be sure to URL encode this string. |
Response
Parameter |
Type |
Description |
entries |
ProductModel[] |
An array of ProductModel objects. |
numEntries |
integer |
Total number of equipment. |
Example
Request
List 10 Nike models containing the name "Span Triax"
https://api.runningahead.com/rest/logs/me/product/running/Nike?
access_token=VjU5s4dyhAPO2XiUzaNVeE&
limit=10&
search=span%20triax
Response
The response contains a list Nike Air Spans. Notice there are only a total
of 4 entries even though we requested 10.
{
"code": 0,
"data":
{
"entries":
[
{
"name": "Air Span Triax"
},
{
"name": "Air Span Triax 8"
},
{
"name": "Air Span Triax 9"
},
{
"name": "Air Span Triax 3"
}
],
"numEntries": 4
}
}