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://test-api.taric2.com
Features
- Submit shipping cases with multiple file attachments
- Submit cases for MDC document processing (separate pipeline; MDC discovers work via S3)
- 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"
}
Submit a case for MDC (document) processing. Files and metadata are uploaded to the MDC mail bucket; the MDC service discovers new work by polling S3 (no database queue). Use this for NDC/MDC document processing instead of the standard case pipeline.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| email_address | string | Required | Authorized email address for submission |
| subject | string | Optional | Subject for the case (defaults to "API Submitted MDC Case") |
| files | file[] | Required | One or more file attachments (PDF, Excel, Word, images, text) |
Success Response
{
"success": true,
"message": "MDC case submitted successfully; MDC service will pick it up from S3",
"data": {
"email_address": "user@company.com",
"customer_uuid": "shippedpac-06890d7f1",
"message_id": "user_20240115103000",
"s3_prefix": "attachments/shippedpac-06890d7f1/20240115103000_user@company.com",
"attachments_count": 2,
"attachments": ["invoice.pdf", "packing_list.xlsx"],
"timestamp": "2024-01-15T10:30:00Z"
}
}
Error Responses
Same as Submit Case: 400 (missing email or no attachments), 403 (unauthorized email), 500 (server error).
Examples
Submit Case
cURL
curl -X POST https://test-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://test-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://test-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']}")
Submit MDC
cURL
curl -X POST https://test-api.taric2.com/api/submit-mdc \ -F "email_address=user@company.com" \ -F "subject=API Submitted MDC Case" \ -F "files=@document.pdf" \ -F "files=@data.xlsx"
JavaScript
const formData = new FormData();
formData.append('email_address', 'user@company.com');
formData.append('subject', 'API Submitted MDC Case');
formData.append('files', fileInput.files[0]);
fetch('https://test-api.taric2.com/api/submit-mdc', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => {
if (data.success) {
console.log('MDC case submitted:', data.data.message_id);
} else {
console.error('Error:', data.message);
}
})
.catch(error => {
console.error('Network error:', error);
});
Python
import requests
url = 'https://test-api.taric2.com/api/submit-mdc'
files = [
('files', ('document.pdf', open('document.pdf', 'rb'), 'application/pdf')),
('files', ('data.xlsx', open('data.xlsx', 'rb'), 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'))
]
data = {
'email_address': 'user@company.com',
'subject': 'API Submitted MDC Case'
}
response = requests.post(url, files=files, data=data)
result = response.json()
if result['success']:
print(f"MDC 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. Choose the endpoint, enter your email address, and select files.
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"
}