/user/purchases
From EveryTrail API Developer Documentation
Contents |
URL
/api/user/purchases
Semantics
All users purchases (currently only guides are available)
Parameters
| Parameter name | Parameter format | Required | Description |
|---|---|---|---|
| username | string | yes | username of user performing the request |
| password | string | yes | password of user performing the request |
| status | bitmask | no | A bitwise OR of the data to return (see below), default is all |
| purchased_after | string in Standard Date Format | no | date, results will only contains guides downloaded after that date |
| modified_after | string in Standard Date Format | no | date, results will only contains guides downloaded or modified after that date |
| lat | float | no | location coordinate, used for ordering results by proximity |
| lon | float | no | location coordinate, used for ordering results by proximity |
| limit | int | no | The maximum number of results to return (default is 20) |
| start | int | no | The index of the first guide to return from the result set. (default is 0) |
| sort | string | no | How to sort the results (rating, title, download_time, proximity) |
| order | string | no | how to order the results (asc, desc) |
| minimal | boolean | no | if true, only returns the root element for each result (and the id). used for quick syncing |
Status
- 0x1: pending
- 0x2: paid
- 0x4: deleted (but paid)
- 0x8: paid through a bundle purchase
- 0x16: deleted, (but paid through a bundle purchase)
Success Response
<etUserPurchasesResponse status="success"> <userID>${userID}</userID> <guides> ${guideXML} </guides> </etUserPurchasesResponse>
${userID}: ID of user making the search
For each guide, a status is returned. ${status} 0: pending 1: paid 2: deleted 3: bundled 4: deleted from bundle
Error Reponse
<etUserPurchasesResponse status="error"> <userID>${userID}</userID> ${error reponse} </etUserPurchasesResponse>
