Skip to content

Commit 5fb6ec8

Browse files
committed
Add sort to doc
1 parent 6d1d905 commit 5fb6ec8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,11 @@ print result.json()
239239

240240
#### Using pagination
241241

242-
Some requests (for example [GET /contact](https://dev.mailjet.com/email/reference/contacts/contact/#v3_get_contact)) has `limit` and `offset` query string parameters. These parameters could be used for pagination.
242+
Some requests (for example [GET /contact](https://dev.mailjet.com/email/reference/contacts/contact/#v3_get_contact)) has `limit`, `offset` and `sort` query string parameters. These parameters could be used for pagination.
243243
`limit` `int` Limit the response to a select number of returned objects. Default value: `10`. Maximum value: `1000`
244-
`offset` `int` Retrieve a list of objects starting from a certain offset. Combine this query parameter with Limit to retrieve a specific section of the list of objects. Default value: `0`
245-
Next example returns 40 contacts starting from 51th record:
244+
`offset` `int` Retrieve a list of objects starting from a certain offset. Combine this query parameter with `limit` to retrieve a specific section of the list of objects. Default value: `0`
245+
`sort` `str` Sort the results by a property and select ascending (ASC) or descending (DESC) order. The default order is ascending. Keep in mind that this is not available for all properties. Default value: `ID asc`
246+
Next example returns 40 contacts starting from 51th record sorted by `Email` field descendally:
246247

247248
```python
248249
import os
@@ -255,6 +256,7 @@ mailjet = Client(auth=(api_key, api_secret))
255256
filters = {
256257
"limit": 40,
257258
"offset": 50,
259+
"sort": "Email desc",
258260
}
259261
result = mailjet.contact.get(filters=filters)
260262
print(result.status_code)

0 commit comments

Comments
 (0)