Installation
Get started by installing the Ortto SDK via Composer.1
Install via Composer
Install the package using Composer:The package will be automatically discovered by Laravel.
2
Publish Configuration
Publish the configuration file to your Laravel application:This creates
config/ortto.php in your Laravel application.3
Configure API Credentials
Add your Ortto API credentials to your
.env file:Configuration
API Regions
Ortto uses region-specific endpoints. Set the correct API URL for your account region:- Default (AP3)
- Australia
- Europe
Configuration File
The published configuration file (config/ortto.php) looks like this:
The
url field should be set to the full API endpoint URL including /v1 for your region.Your First Request
Let’s create your first contact in Ortto!Success! You’ve created your first contact in Ortto using the SDK.
Common Operations
Here are some common operations you’ll perform with the SDK:Create or Update Contact
Create or Update Contact
Get Contact Information
Get Contact Information
Get Activity Feed
Get Activity Feed
List Audiences
List Audiences
Using with Testing
The SDK is built on Saloon, which provides excellent testing capabilities with MockClient:Next Steps
People API
Learn about managing contacts in Ortto.
Activities API
Track and retrieve customer activities.
Audiences API
Manage audience subscriptions.
Testing Guide
Learn how to test with the SDK.
Troubleshooting
401 Unauthorized
401 Unauthorized
404 Not Found
404 Not Found
Problem: Wrong API endpoint URL or person doesn’t exist.Solution:
- Verify
ORTTO_API_URLis set to the correct regional endpoint - Ensure URL includes
/v1at the end - For person endpoints, ensure the person_id is valid
400 Bad Request
400 Bad Request
Problem: Invalid request parameters or field IDs.Solution:
- Check Ortto field format:
type::field(e.g.,str::email) - Custom fields use:
type:cm:field(e.g.,str:cm:job-title) - Ensure required parameters are provided
Rate Limiting
Rate Limiting
Problem: Too many requests to certain endpoints.Solution:
- Some endpoints have rate limits (e.g., 1 req/sec for activities)
- Implement exponential backoff for retries
- Use async mode for bulk operations
Need more help? Check the API Reference or Ortto’s official documentation.