Skip to main content

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 sr object with uuid and micro_id — photo requirements are fetched in the next step.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
Response: { 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: 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:
Photo requirements live under sr.sides, not sr.requirements. The requirements object holds validation status (media_requirements, sides_requirements, item_requirements) — it does not contain the photo list.
Response Data:
  • sr.sides.required - Mandatory images for authentication
  • sr.sides.optional - Additional images that improve authentication accuracy
  • sr.sides.progress - Upload counts and the met flag
  • Per side: uuid, name, description, ordinal, required, side_group_name, and thumbnail_image / example_image / overlay_image visual guides
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.
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.
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
Do not send your Authorization header on the PUT to the pre-signed URL. The URL is already signed, and S3 rejects the request with 400 if an Authorization header is present. Only the intent request is authenticated with your API key.
4

Check Progress

Verify that all required images have been uploaded before submitting.Fetch the service request with item=true&sides=true to get the current progress, which includes counts of uploaded required and optional images:
Progress Response:
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 /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}?item=true&sides=true&requirements=true
  3. Upload test images via the intent flow (or Private CDN signed-urls flow)
  4. Verify progress via GET /api/v2/sr/{uuid}?item=true&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. Follow Private CDN if your organization keeps media off the public CDN
  4. Test end-to-end workflow with sample items