Skip to content

Job status and, once paid, its deliverable files

Documents @snap4id-sdk/partner-api 1.0.0

GET
/api/v1/partner/jobs/{jobId}
import { createPartnerClient } from '@snap4id-sdk/partner-api';
const snap4id = createPartnerClient({
baseUrl: 'https://snap4.id',
partnerId: 'your-partner-id',
keyId: process.env.SNAP4ID_KEY_ID,
privateKey: process.env.SNAP4ID_PARTNER_KEY_PEM, // Ed25519 PKCS#8 PEM
});
const job = await snap4id.getJob('eu-6f1c2b9e-3d4a-4b8f-9c2e-1a7d5e3f0b42');
if (job.paid) for (const file of job.artifacts ?? []) await copy(file.url, file.filename);

Status of one of the partner’s jobs (crash recovery without the WebView). artifacts is present only when paid is true: the deliverables in metadata order, titles in the partner’s locale, each url the job’s existing signed link (stable across calls, never re-signed) valid until expires_at (the job’s retention end) — copy the files before then. Served during maintenance.

jobId
required

Job id ({zone}-{uuid} or a legacy bare uuid). Unknown, malformed, unroutable and other partners’ jobs all answer the same 404 not_found (no existence oracle).

string
/^([a-z]{2}-)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

Job id ({zone}-{uuid} or a legacy bare uuid). Unknown, malformed, unroutable and other partners’ jobs all answer the same 404 not_found (no existence oracle).

OK

Media typeapplication/json

Partner API job status

object
job_id
required
string
/^([a-z]{2}-)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/
status
required

Job status

string
paid
required
boolean
order_code
required
string
/^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{6}$/
artifacts
Array<object>

Deliverable artifact link

object
code
required

Artifact code

string
>= 1 characters
title
required

Title in the partner’s locale (en-us fallback)

string
mime_type
required
string
>= 1 characters
filename
required

Snap4id-{order_code}-{code}{extension}

string
>= 1 characters
url
required

The job’s existing signed link

string format: uri
expires_at
required

The job’s expires_at (files gone after)

string format: date-time

Example generated

{
"job_id": "example",
"status": "example",
"paid": true,
"order_code": "example",
"artifacts": [
{
"code": "example",
"title": "example",
"mime_type": "example",
"filename": "example",
"url": "https://example.com",
"expires_at": "2026-04-15T12:00:00Z"
}
]
}
Cache-Control
string
Allowed value: no-store

unauthorized

Media typeapplication/json

Embed / Partner API error

object
error
required
object
code
required
string
Allowed values: unauthorized

Examples

Exampleunauthorized
{
"error": {
"code": "unauthorized"
}
}

not_found

Media typeapplication/json

Embed / Partner API error

object
error
required
object
code
required
string
Allowed values: not_found

Examples

Examplenot_found
{
"error": {
"code": "not_found"
}
}

Retryable server error (body not part of the contract). Retry with a fresh x-request-id (also: a paid job whose links are not ready yet).