Skip to main content

Step-by-Step Implementation

1

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: POST /api/v2/srRequired Headers:
Request Data:
  • 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
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: GET /api/v2/sr/{sr_uuid} with query parametersFetch the service request with requirements=true and sides=true to get the full image requirements:
Response Data:
  • 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
Image Requirements:
  • 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 endpointsUpload Process:
  1. Get upload URL with query parameters: sr (service request UUID) and side (side UUID with file extension)
  2. 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 sides=true to get the current progress, which includes counts of uploaded required and optional images:
Progress Response:
When met is true, all required images are uploaded 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 /api/v2/sr/{sr_uuid}/submit
Post-Submission Process:
  1. Quality Control Review: Image and data verification
  2. Authentication Review: Expert authentication by specialists
  3. 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:
See the SDK documentation for installation, configuration, and detailed usage.

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:
  1. Create a test service request
  2. Fetch image requirements via GET /api/v2/sr/{uuid}?requirements=true&sides=true
  3. Upload test images via the intent flow
  4. Verify progress via GET /api/v2/sr/{uuid}?sides=true
  5. Submit via POST /api/v2/sr/{uuid}/submit

Next Steps

Once workflow implementation is complete:
  1. Setup Webhooks for real-time status notifications
  2. Review States for handling authentication results
  3. Test end-to-end workflow with sample items