Overview
The ShippedFlow API allows you to submit shipping cases with document attachments for automated processing. This API is designed to integrate seamlessly with your existing workflows.
Base URL
https://api.taric2.com
Features
- Submit shipping cases with multiple file attachments
- Support for various file formats (PDF, Excel, Word, images)
- Automatic case processing and classification
- Real-time status updates
- Secure file handling and storage
Authentication
The API uses email-based authentication. Only authorized email addresses can submit cases through the API.
Authorization
To submit a case, you must use an email address that has been pre-authorized in the system. The API will validate the email address and reject requests from unauthorized addresses.
user@company.com (Authorized)
unauthorized@example.com (Not authorized)
API Endpoints
Check the health status of the API service.
Response
{
"status": "healthy",
"timestamp": "2024-01-15T10:30:00Z",
"version": "1.0.0"
}
Submit a new shipping case with document attachments for processing.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| email_address | string | Required | Authorized email address for case submission |
| subject | string | Optional | Subject line for the case (defaults to "API Submitted Case") |
| files | file[] | Required | One or more file attachments (PDF, Excel, Word, images, text) |
Success Response
{
"success": true,
"message": "Case submitted successfully",
"data": {
"message_id": "20240115103000_user@company.com",
"customer_uuid": "shippedpac-06890d7f1",
"s3_prefix": "attachments/shippedpac-06890d7f1/20240115103000_user@company.com",
"attachments": [
{
"filename": "invoice.pdf",
"s3_key": "attachments/shippedpac-06890d7f1/20240115103000_user@company.com/invoice.pdf",
"size": 245760
}
],
"submitted_via_api": true,
"api_timestamp": "2024-01-15T10:30:00Z"
}
}
Error Responses
400 Bad Request - No Attachments
{
"success": false,
"error": "No attachments",
"message": "At least one file attachment is required"
}
403 Forbidden - Unauthorized Email
{
"success": false,
"error": "Unauthorized email",
"message": "Email address test@example.com is not authorized"
}
Examples
cURL
curl -X POST https://api.taric2.com/api/submit-case \ -F "email_address=user@company.com" \ -F "subject=Test Case Submission" \ -F "files=@invoice.pdf" \ -F "files=@packing_list.xlsx"
JavaScript
const formData = new FormData();
formData.append('email_address', 'user@company.com');
formData.append('subject', 'Test Case Submission');
formData.append('files', fileInput.files[0]);
fetch('https://api.taric2.com/api/submit-case', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => {
if (data.success) {
console.log('Case submitted:', data.data.message_id);
} else {
console.error('Error:', data.message);
}
})
.catch(error => {
console.error('Network error:', error);
});
Python
import requests
url = 'https://api.taric2.com/api/submit-case'
files = {
'files': ('invoice.pdf', open('invoice.pdf', 'rb'), 'application/pdf')
}
data = {
'email_address': 'user@company.com',
'subject': 'Test Case Submission'
}
response = requests.post(url, files=files, data=data)
result = response.json()
if result['success']:
print(f"Case submitted: {result['data']['message_id']}")
else:
print(f"Error: {result['message']}")
Test API
Use the form below to test the API directly from your browser. Enter your email address and select files to submit a test case.
Error Handling
The API uses standard HTTP status codes to indicate success or failure of requests.
Status Codes
| Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 400 | Bad Request - Invalid request parameters |
| 403 | Forbidden - Unauthorized email address |
| 500 | Internal Server Error - Server-side error |
Error Response Format
All error responses follow this format:
{
"success": false,
"error": "Error type",
"message": "Human-readable error message"
}