results query string parameter.
NoteIf you do not specify a
results query string parameter, the Shippo API will only return a certain number of results. The default number of results is subject to change and depends on the resource you are calling. Many resources, such as shipments, transactions, and orders return 25 by default. Use a results query string parameter less than 200. A results query string parameter greater than 200 will cause your results to be truncated.Results
The response will be paginated by the number specified in theresults query string parameter. For example, for carrier accounts, by default you would only see 5 per page, with a next field indicating if there is another page of results. A previous field will give any previous pages if you’re not currently looking at the first page.
Example
URL:https://api.goshippo.com/carrier_accounts/?results=10
Response:
next field.
Date filtering
When querying the Shipments endpoint you can have an additional way to filter results by limiting the date range. We expect a date formatted to the ISO 8601 standard, and you can see some example below of what that looks like. You can retrieve any 90 day range (or smaller) of shipments by using the following query string parameters:object_created_gt— object(s) created greater than a provided date timeobject_created_gte— object(s) created greater than or equal to a provided date timeobject_created_lt— object(s) created less than a provided date timeobject_created_lte— object(s) created less than or equal to a provided date time
"2017-01-01""2017-01-01T03:30:30"or"2017-01-01T03:30:30.5""2017-01-01T03:30:30Z"
Example
URL:https://api.goshippo.com/shipments/?results=10&object_created_gte=2017-08-01T00:00:00&object_created_lte=2017-08-31T00:00:00
NoteThe format of the
page query parameter in the next and prev fields is subject to change and specifically may not necessarily be an integer.object_created_gt and object_created_lt were used, it would only retrieve shipments between those dates. You can use any combination of object_created_gt/object_created_gte and object_created_lt/object_created_lte to filter how you need. You just need to be sure that the date range is 90 days or less.