Skip to content

Advanced Usage

Igor Sazonov edited this page Mar 5, 2026 · 1 revision

This section covers advanced topics and usage patterns for the Shippo PHP SDK.

Pagination

When listing resources such as addresses, shipments, or transactions, the Shippo API returns a paginated list of results. The SDK provides a PaginatedCollection DTO that makes it easy to work with these paginated lists.

$addresses = $shippo->addresses()->list(['results' => 10, 'page' => 1]);

foreach ($addresses as $address) {
    echo $address->name . "\n";
}

if ($addresses->hasMorePages()) {
    echo "There are more pages of addresses.";
}

Automatic Retry Logic

The SDK has built-in automatic retry logic with exponential backoff for handling rate limit errors (HTTP 429). You can configure the retry settings in the configuration file.

Batch Operations

The SDK supports batch operations for creating multiple shipping labels at once. For more information, please see the Batches page.

International Shipments

When creating international shipments, you need to provide customs information. For more information, please see the Customs page.

Clone this wiki locally