Step-by-Step Implementation
1
Create Service Request
When an item is ready for authentication, create a draft service request. The response returns a minimal Request Data:Response:
sr object with uuid and micro_id — photo requirements are fetched in the next step.API Reference: POST /api/v2/srRequired Headers:- Service UUID (optional): Your partner service identifier. If omitted, auto-resolved based on your organization and item type.
- Item Taxonomy: Category, type, and brand UUIDs from your taxonomy mapping
- External ID (optional): Your internal item identifier for correlation
{ success, message, sr } — use sr.uuid for all subsequent calls. The external_id you send is returned on the SR and exposed as reference_id in webhooks.Dependencies:- Taxonomy mapping configured (see Taxonomy)
2
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 item=true and sides=true to get the photo list. Add requirements=true if you also want the validation status object:sr.sides.required- Mandatory images for authenticationsr.sides.optional- Additional images that improve authentication accuracysr.sides.progress- Upload counts and themetflag- Per side:
uuid,name,description,ordinal,required,side_group_name, andthumbnail_image/example_image/overlay_imagevisual guides
- Format: JPG/JPEG/PNG
- Size: 600 x 600 px minimum
- File Size: 5 MB maximum per image
- Quality: Clear, well-lit, focused images
3
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
If your organization uses the Private CDN, skip
GET /intent. Call POST /api/media/signed-urls/{sr_uuid} instead — /intent writes to the public bucket.GET https://asset.legitmark.com/intent- Get pre-signed upload URL (public CDN)POST /api/media/signed-urls/{sr_uuid}- Batch pre-signed upload URLs (private CDN)PUT /{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
4
Check Progress
Verify that all required images have been uploaded before submitting.Fetch the service request with Progress Response:
item=true&sides=true to get the current progress, which includes counts of uploaded required and optional images:exempted_required is the subset of current_required that was covered by a waiver rather than an uploaded photo. When met is true, every required side is accounted for and the service request can be submitted.5
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}?item=true&sides=true&requirements=true - Upload test images via the intent flow (or Private CDN signed-urls flow)
- Verify progress via
GET /api/v2/sr/{uuid}?item=true&sides=true - Submit via
POST /api/v2/sr/{uuid}/submit
Next Steps
Once workflow implementation is complete:- Setup Webhooks for real-time status notifications
- Review States for handling authentication results
- Follow Private CDN if your organization keeps media off the public CDN
- Test end-to-end workflow with sample items