Partner API · v1.0.0

Build virtual Try-On into your experience

Submit consented customer photos, process Try-Ons asynchronously, retrieve short-lived results, and monitor tenant usage.

Authentication and scopes

Send the complete API credential as a Bearer token from trusted server-side code. Never expose it in browser code, URLs, logs, analytics, or an embeddable widget.

OperationRequired scope
Submit Try-Ontry_on:create
Retrieve Try-Ontry_on:read
Read usageusage:read

Submit an asynchronous Try-On

Send multipart/form-data with an image up to 10 MiB. The full multipart body is limited to 11 MiB. Every submission requires an 8–128 character Idempotency-Key.

curl --request POST \
  "$UDUTHIPAAR_BASE_URL/api/v1/try-ons" \
  --header "Authorization: Bearer $UDUTHIPAAR_API_KEY" \
  --header 'Idempotency-Key: order-4821-try-on-1' \
  --form-string 'sessionId=<session-uuid>' \
  --form-string 'sessionFabricId=<session-fabric-uuid>' \
  --form-string 'consentGranted=true' \
  --form-string 'consentVersion=2' \
  --form-string 'consentText=Yes, I agree to the Try-On policy.' \
  --form 'file=@./customer.png;type=image/png'

Safe retry rule

After a timeout, network error, or 503, retry with the same key and exactly the same fields and file. A changed payload with the same key returns 409.

Poll the result

curl "$UDUTHIPAAR_BASE_URL/api/v1/try-ons/$TRY_ON_ID" \
  --header "Authorization: Bearer $UDUTHIPAAR_API_KEY"
  1. Poll after 2 seconds, then every 3–5 seconds while HTTP status is 202.
  2. Stop on 200, 402, 404, or 410.
  3. Respect the Retry-After header on 429.
  4. Use the returned image promptly; its signed URL expires in 300 seconds.

Statuses: DRAFT · PHOTO_UPLOADED · QUEUED · PROCESSING · COMPLETED · FAILED · CANCELLED

Read tenant usage

curl "$UDUTHIPAAR_BASE_URL/api/v1/usage" \
  --header "Authorization: Bearer $UDUTHIPAAR_API_KEY"

The response contains the tenant timezone, current billing period, catalogue and Try-On counts, incurred usage, and daily/monthly budget status.

Error handling

HTTPTypical codeAction
400INVALID_INPUTCorrect the request; do not retry unchanged.
401INVALID_API_KEYSupply or rotate the credential.
402BUDGET_EXCEEDEDAsk the administrator to extend the budget.
403INSUFFICIENT_SCOPECorrect API access or scopes.
404NOT_FOUNDVerify the ID and credential ownership.
409IDEMPOTENCY_CONFLICTReuse keys only with identical input.
410GONEStop retrieving or displaying the result.
413BODY_TOO_LARGEReduce the request and image size.
429RATE_LIMITEDRespect the Retry-After header.
503SERVICE_UNAVAILABLERetry POST with the same key and input.

Production readiness

  • ✓Store API keys in a managed secret store.
  • ✓Use separate sandbox and production keys.
  • ✓Grant only the required scopes.
  • ✓Persist idempotency keys before submission.
  • ✓Store exact consent wording and version.
  • ✓Implement polling and Retry-After handling.
  • ✓Treat signed image URLs as sensitive.
  • ✓Complete UAT certification before enablement.