Step-by-Step Implementation
Create Service Request
When an item is ready for authentication, create a service request. This provides you with the specific image requirements for the selected item category.API Reference: Request Data:Dependencies:
POST /api/v2/srRequired Headers:- Service UUID: Your partner service identifier
- Item Taxonomy: Category, type, and brand UUIDs from your taxonomy mapping
- External ID (optional): Your internal item identifier for correlation
- Taxonomy mapping configured (see Taxonomy)
Get Image Requirements
Retrieve the specific image sides required for your item category. This tells you exactly which photos to capture.API Reference: Response Data:
GET /api/v2/sr/{sr_uuid} with query parametersFetch the service request with requirements=true and sides=true to get the full image requirements:- Side groups - Organized image requirements by group
- Required sides - Mandatory images for authentication
- Optional sides - Additional images that enhance authentication
- Template images - Visual guides for each required angle
- Format: JPG/JPEG/PNG
- Size: 600 x 600 px minimum
- File Size: 5 MB maximum per image
- Quality: Clear, well-lit, focused images
Upload Images
Upload images using Legitmark’s secure CDN system. For each required side, get a pre-signed URL and upload directly to S3.API Reference: Media Management endpoints
GET https://media.legitmark.com/intent- Get pre-signed upload URLPUT /{presigned-url}- Direct S3 upload
- Get upload URL with query parameters:
sr(service request UUID) andside(side UUID with file extension) - Upload directly to the pre-signed S3 URL using PUT request with binary data
Check Progress
Verify that all required images have been uploaded before submitting.Fetch the service request with Progress Response:When
sides=true to get the current progress, which includes counts of uploaded required and optional images:met is true, all required images are uploaded and the service request can be submitted.Submit for Authentication
Once progress requirements are met, submit the service request for expert authentication.API Reference: Post-Submission Process:
POST /api/v2/sr/{sr_uuid}/submit- Quality Control Review: Image and data verification
- Authentication Review: Expert authentication by specialists
- Results Notification: Webhook updates at each stage (see States)
Implementation Patterns
Error Handling
Batch Image Upload
Best Practices
Pre-Sale Optimization
- Cache image requirements for frequently used categories
- Validate images client-side before storage
- Compress images while maintaining quality standards
- Store images locally until item sells
Upload Optimization
- Use parallel uploads for multiple images
- Implement retry logic for failed uploads
- Show upload progress to users
- Validate upload completion before proceeding
Validation Strategy
- Check requirements before finalization
- Handle validation errors gracefully
- Provide user feedback on missing requirements
- Retry validation after corrections
TypeScript SDK
The official TypeScript SDK (npm install legitmark) handles the complete workflow with type safety, automatic retries, and a clean resource-based API:
Testing and Debugging
Test Service Request Creation
Use the Interactive API Reference to test service request creation with your actual credentials.Validate Image Upload Flow
Test the complete upload process:- Create a test service request
- Fetch image requirements via
GET /api/v2/sr/{uuid}?requirements=true&sides=true - Upload test images via the intent flow
- Verify progress via
GET /api/v2/sr/{uuid}?sides=true - Submit via
POST /api/v2/sr/{uuid}/submit