Appearance
Postman Collection
Use our official Postman collection to quickly test all ShipYo API endpoints. The collection includes automatic token management, automated tests, and pre-configured variables for different environments.
Postman Collection
Download the complete Postman collection to test the ShipYo API
Complete Collection
Postman collection with all ShipYo API endpoints organized by category.
All endpointsAutomatic testsJWT token managementPre-request scripts
Download Collection Environment File
ShipYo API
Environment file with pre-configured variables for quick testing.
URL: https://shipyo.itExample credentials included
Download Environment Quick Setup
- Import the collection: Download and import the collection file into Postman
- Import the environment: Download and import the environment file
- Configure variables:
api_key,user_email,user_password - Start testing: Run login and test the endpoints!
Includes collection + environment file
What's Included in the Collection
Organized by Categories
- Authentication - Login, token generation, password reset
- User Management - Complete user CRUD operations
- Tenant Management - Multi-tenancy tenant management
- API Key Management - API key management
- Getting Started - Simplified 3-step workflow
Automated Features
- JWT Token Management - Automatic extraction and storage of tokens
- Variable Population - IDs and values automatically extracted from responses
- Pre-request Scripts - Automatic variable setup
- Response Tests - Automatic response validation
- Error Handling - Error management with detailed logging
Environment File
The collection includes a single environment file with:
- Base URL:
https://shipyo.it - Pre-filled values for immediate testing
- Example credentials included for quick setup
- All necessary variables for API testing
Quick Setup
1. Import into Postman
- Open Postman and go to Import
- Drag the downloaded files into the import window
- Confirm the import of collection + environment
2. Environment Configuration
Select the "ShipYo API" environment from the dropdown in the top right and configure:
| Variable | Description | Example |
|---|---|---|
api_key | Your ShipYo API Key | ak_1234567890abcdef |
user_email | Email for login | admin@example.com |
user_password | Password for login | password123 |
tenant_id | Tenant ID | 1 |
3. First Test
- Run "User Login" to get a JWT token
- The token is automatically saved in environment variables
- Try any endpoint - authentication is handled automatically
Authentication Types
The collection automatically handles three types of authentication:
Anonymous Endpoints
- No authentication required
- Only
Content-TypeandAcceptheaders - Examples: Login, Password Reset
API Key Only Endpoints
- Only
x-api-keyheader required - For basic operations without user context
- Examples: Generate Token from API Key
JWT Protected Endpoints
x-api-key+Authorization: Bearer <token>headers- For operations requiring user context
- Examples: User Management, Tenant Operations
Recommended Workflow
mermaid
graph LR
A[Import Collection] --> B[Import Environment]
B --> C[Configure api_key]
C --> D[Run Login]
D --> E[Test Endpoints]Automatic Variables
The collection automatically populates these variables:
From Login Responses
jwt_token- JWT token for authenticationuser_role_id- User role IDuser_role_name- Role namedefault_tenant_id- Default tenant (for Admin users)
From List Responses
sample_user_id- ID of the first user in the listsample_tenant_id- ID of the first tenantsample_api_key_id- ID of the first API key
From Creation Operations
created_user_id- ID of the newly created usercreated_tenant_id- ID of the newly created tenantcreated_api_key- Newly generated API keysubscription_id- ID of the created subscription
Advanced Features
Pre-request Scripts
javascript
// Auto-setup pagination variables
if (!pm.environment.get("page")) {
pm.environment.set("page", "1");
}
// Logging for debugging
console.log("Environment: " + pm.environment.name);
console.log("API Key: " + (pm.environment.get("api_key") ? "[PRESENT]" : "[MISSING]"));Automatic Test Scripts
javascript
// Status code validation
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
// JWT token extraction
if (jsonData.success && jsonData.data && jsonData.data.token) {
pm.environment.set("jwt_token", jsonData.data.token);
}Debugging and Troubleshooting
Console Logging
The collection includes automatic logging for:
- Current environment variables
- Presence/absence of credentials
- API response errors
- JWT token status
Common Errors
401 Unauthorized
json
{
"success": false,
"message": "API Key is missing."
}Solution: Verify that api_key is configured in the environment
403 Forbidden
json
{
"success": false,
"message": "Invalid API Key."
}Solution: Check that the API key is valid and active
JWT Token Expired
Solution: Run login again - the token will be automatically updated
Best Practices
Security
- Never commit environment files with real credentials
- Keep your API keys secure and rotate them regularly
- Use separate environments for different projects
Testing
- Configure variables before starting
- Test authentication first with the login endpoint
- Check logs in case of errors
Maintenance
- Update the collection when the API changes
- Synchronize variables across teams
- Document custom configurations
Support
For issues with the Postman collection:
- Check the logs in the Postman console
- Verify environment variables are configured correctly
- Test authentication endpoints first
- Consult the API documentation for specific details
The Postman collection is the quickest way to get started with the ShipYo API!