Resources
Passports
Every Passports endpoint, with the scope it enforces, the body it takes, a response you can read, and the refusals it can return.
List passports.
/organizations/{organization}/passports- Scope
- passports:read
Idempotency-Key- Not accepted
- Returns
- 200
Path parameters
organizationstringRequiredThe organization this request acts for. The credential must hold a grant for it.
Query parameters
limitstringOptionalHow many records to return. The server may return fewer.
cursorstringOptionalThe next_cursor from the previous page. A cursor encodes the filters it was issued under; sending it with different filters is refused with cursor_invalid.
statusstringOptionalReturn only passports in this status.
categorystringOptionalReturn only passports in this category.
updated_sincestringOptionalAn RFC 3339 timestamp. Returns passports updated at or after it, which is how an integrator polls for changes without re-reading the catalogue.
Errors
Every refusal this endpoint can return, with the status it arrives with.
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports?status=published&limit=25" \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"{
"object": "list",
"data": [
{
"object": "passport",
"id": "2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"category": "textile",
"status": "published",
"gtin": "03453120000011",
"external_id": "SKU-4471-BLK",
"version": 4,
"livemode": true,
"created_at": "2026-08-01T09:12:44.918Z",
"updated_at": "2026-08-01T14:03:22.501Z",
"data": {
"product_name": "Merino Crew Neck",
"product_description": "Mid-weight knitted crew neck in 100% merino wool.",
"manufacturer_name": "Atelier Kestrel SAS",
"manufacturer_address": "14 rue des Tanneurs, 59100 Roubaix",
"manufacturer_country": "FR",
"material_composition": [
{
"fiber": "Merino wool",
"percentage": 100
}
],
"substances_of_concern": [
{
"name": "None declared",
"present": false
}
],
"gtin": "03453120000011"
}
}
],
"has_more": false,
"next_cursor": null
}GET /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports?status=published&limit=25
Create a passport.
/organizations/{organization}/passports- Scope
- passports:write
Idempotency-Key- Accepted
- Returns
- 201
Path parameters
organizationstringRequiredThe organization this request acts for. The credential must hold a grant for it.
Request body
categorystringRequiredA category id from GET /categories. It fixes the field schema and cannot be changed afterwards.
external_idstringOptionalYour own identifier for this product, 1 to 255 characters. Unique within the organization and the mode, which is what lets you reconcile without storing our ids — so the same id can exist once in test and once in live.
dataobjectOptionalThe passport document. Keys are field names from the category schema, plus each documentable field's document_id_key companion; anything else is refused rather than silently stored.
Errors
Every refusal this endpoint can return, with the status it arrives with.
- 500configuration_error
- 409idempotency_conflict
- 403insufficient_scope
- 500internal_error
- 401invalid_key
- 400invalid_request
- 401key_expired
- 401key_revoked
- 401key_rotated
- 400mode_mismatch
- 402no_subscription
- 404organization_not_found_or_not_granted
- 413payload_too_large
- 402payment_overdue
- 429rate_limited
- 415unsupported_media_type
- 422validation_failed
- 400wildcard_not_supported
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports" \
-X POST \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"category": "textile",
"external_id": "SKU-4471-BLK",
"data": {
"product_name": "Merino Crew Neck",
"product_description": "Mid-weight knitted crew neck in 100% merino wool.",
"manufacturer_name": "Atelier Kestrel SAS",
"manufacturer_address": "14 rue des Tanneurs, 59100 Roubaix",
"manufacturer_country": "FR"
}
}'{
"object": "passport",
"id": "2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"category": "textile",
"status": "draft",
"gtin": null,
"serial_number": null,
"external_id": "SKU-4471-BLK",
"version": 1,
"livemode": true,
"registry_id": null,
"created_at": "2026-08-01T09:12:44.918Z",
"updated_at": "2026-08-01T09:12:44.918Z",
"published_at": null,
"trashed_at": null,
"data": {
"product_name": "Merino Crew Neck",
"product_description": "Mid-weight knitted crew neck in 100% merino wool.",
"manufacturer_name": "Atelier Kestrel SAS",
"manufacturer_address": "14 rue des Tanneurs, 59100 Roubaix",
"manufacturer_country": "FR",
"material_composition": [
{
"fiber": "Merino wool",
"percentage": 100
}
],
"substances_of_concern": [
{
"name": "None declared",
"present": false
}
]
}
}POST /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports
Fetch one passport.
/organizations/{organization}/passports/{id}- Scope
- passports:read
Idempotency-Key- Not accepted
- Returns
- 200
Path parameters
organizationstringRequiredThe organization this request acts for. The credential must hold a grant for it.
idstringRequiredThe identifier of the resource. Treat it as an opaque string.
Errors
Every refusal this endpoint can return, with the status it arrives with.
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41" \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"{
"object": "passport",
"id": "2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"category": "textile",
"status": "published",
"gtin": "03453120000011",
"serial_number": null,
"external_id": "SKU-4471-BLK",
"version": 4,
"livemode": true,
"registry_id": null,
"created_at": "2026-08-01T09:12:44.918Z",
"updated_at": "2026-08-01T14:03:22.501Z",
"published_at": "2026-08-01T14:03:22.501Z",
"trashed_at": null,
"data": {
"product_name": "Merino Crew Neck",
"product_description": "Mid-weight knitted crew neck in 100% merino wool.",
"manufacturer_name": "Atelier Kestrel SAS",
"manufacturer_address": "14 rue des Tanneurs, 59100 Roubaix",
"manufacturer_country": "FR",
"material_composition": [
{
"fiber": "Merino wool",
"percentage": 100
}
],
"substances_of_concern": [
{
"name": "None declared",
"present": false
}
],
"gtin": "03453120000011"
}
}GET /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41
Apply a JSON Merge Patch to a passport.
/organizations/{organization}/passports/{id}- Scope
- passports:write
Idempotency-Key- Accepted
- Returns
- 200
Path parameters
organizationstringRequiredThe organization this request acts for. The credential must hold a grant for it.
idstringRequiredThe identifier of the resource. Treat it as an opaque string.
Request headers
If-MatchstringOptionalThe ETag from the passport you read. The write is refused with precondition_failed if the passport changed in between, which is the only way to make a read-modify-write safe against a concurrent editor.
Request body
dataobjectOptionalAn RFC 7386 JSON Merge Patch applied to the passport document. Omit a key to leave it alone; send null to delete it. Arrays are replaced, never merged.
Errors
Every refusal this endpoint can return, with the status it arrives with.
- 500configuration_error
- 409idempotency_conflict
- 403insufficient_scope
- 500internal_error
- 401invalid_key
- 400invalid_request
- 401key_expired
- 401key_revoked
- 401key_rotated
- 400mode_mismatch
- 402no_subscription
- 404organization_not_found_or_not_granted
- 413payload_too_large
- 402payment_overdue
- 412precondition_failed
- 429rate_limited
- 404resource_not_found
- 415unsupported_media_type
- 422validation_failed
- 400wildcard_not_supported
- 409wrong_status
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41" \
-X PATCH \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"data": {
"recycled_content_percentage": 38,
"recycling_instructions": "Return to any Atelier Kestrel store for fibre recovery."
}
}'{
"object": "passport",
"id": "2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"category": "textile",
"status": "draft",
"gtin": null,
"serial_number": null,
"external_id": "SKU-4471-BLK",
"version": 2,
"livemode": true,
"registry_id": null,
"created_at": "2026-08-01T09:12:44.918Z",
"updated_at": "2026-08-01T10:44:12.700Z",
"published_at": null,
"trashed_at": null,
"data": {
"product_name": "Merino Crew Neck",
"product_description": "Mid-weight knitted crew neck in 100% merino wool.",
"manufacturer_name": "Atelier Kestrel SAS",
"manufacturer_address": "14 rue des Tanneurs, 59100 Roubaix",
"manufacturer_country": "FR",
"material_composition": [
{
"fiber": "Merino wool",
"percentage": 100
}
],
"substances_of_concern": [
{
"name": "None declared",
"present": false
}
],
"recycled_content_percentage": 38,
"recycling_instructions": "Return to any Atelier Kestrel store for fibre recovery."
}
}PATCH /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41
Publish a passport.
/organizations/{organization}/passports/{id}/publish- Scope
- passports:write
Idempotency-Key- Accepted
- Returns
- 200
Path parameters
organizationstringRequiredThe organization this request acts for. The credential must hold a grant for it.
idstringRequiredThe identifier of the resource. Treat it as an opaque string.
Errors
Every refusal this endpoint can return, with the status it arrives with.
- 500configuration_error
- 422document_missing
- 422gtin_required
- 409idempotency_conflict
- 403insufficient_scope
- 500internal_error
- 401invalid_key
- 400invalid_request
- 401key_expired
- 401key_revoked
- 401key_rotated
- 400mode_mismatch
- 402no_subscription
- 404organization_not_found_or_not_granted
- 413payload_too_large
- 402payment_overdue
- 402publish_limit_reached
- 429rate_limited
- 404resource_not_found
- 503storage_unavailable
- 402unit_limit_reached
- 415unsupported_media_type
- 422validation_failed
- 400wildcard_not_supported
- 409wrong_status
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/publish" \
-X POST \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"object": "passport",
"id": "2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"category": "textile",
"status": "published",
"gtin": "03453120000011",
"serial_number": null,
"external_id": "SKU-4471-BLK",
"version": 4,
"livemode": true,
"registry_id": null,
"created_at": "2026-08-01T09:12:44.918Z",
"updated_at": "2026-08-01T14:03:22.501Z",
"published_at": "2026-08-01T14:03:22.501Z",
"trashed_at": null,
"data": {
"product_name": "Merino Crew Neck",
"product_description": "Mid-weight knitted crew neck in 100% merino wool.",
"manufacturer_name": "Atelier Kestrel SAS",
"manufacturer_address": "14 rue des Tanneurs, 59100 Roubaix",
"manufacturer_country": "FR",
"material_composition": [
{
"fiber": "Merino wool",
"percentage": 100
}
],
"substances_of_concern": [
{
"name": "None declared",
"present": false
}
],
"gtin": "03453120000011"
},
"warnings": [
{
"code": "environmental_claim_detected",
"message": "This passport contains environmental claim language (carbon neutral). From 27 September 2026, Directive (EU) 2024/825 requires the trader placing the product on the market to hold substantiation for such claims. Publishing succeeded; confirm the substantiation exists.",
"doc_url": "https://passportcraft.com/docs/api/errors#environmental_claim_detected"
}
]
}POST /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/publish
Unpublish a passport.
Destructive/organizations/{organization}/passports/{id}/unpublish- Scope
- passports:write
Idempotency-Key- Accepted
- Returns
- 200
Path parameters
organizationstringRequiredThe organization this request acts for. The credential must hold a grant for it.
idstringRequiredThe identifier of the resource. Treat it as an opaque string.
Errors
Every refusal this endpoint can return, with the status it arrives with.
- 500configuration_error
- 409idempotency_conflict
- 403insufficient_scope
- 500internal_error
- 401invalid_key
- 400invalid_request
- 401key_expired
- 401key_revoked
- 401key_rotated
- 400mode_mismatch
- 402no_subscription
- 404organization_not_found_or_not_granted
- 413payload_too_large
- 402payment_overdue
- 412precondition_failed
- 429rate_limited
- 404resource_not_found
- 415unsupported_media_type
- 422validation_failed
- 400wildcard_not_supported
- 409wrong_status
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/unpublish" \
-X POST \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"object": "passport",
"id": "2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"category": "textile",
"status": "draft",
"gtin": "03453120000011",
"serial_number": null,
"external_id": "SKU-4471-BLK",
"version": 5,
"livemode": true,
"registry_id": null,
"created_at": "2026-08-01T09:12:44.918Z",
"updated_at": "2026-08-02T08:15:09.113Z",
"published_at": null,
"trashed_at": null,
"data": {
"product_name": "Merino Crew Neck",
"product_description": "Mid-weight knitted crew neck in 100% merino wool.",
"manufacturer_name": "Atelier Kestrel SAS",
"manufacturer_address": "14 rue des Tanneurs, 59100 Roubaix",
"manufacturer_country": "FR",
"material_composition": [
{
"fiber": "Merino wool",
"percentage": 100
}
],
"substances_of_concern": [
{
"name": "None declared",
"present": false
}
],
"gtin": "03453120000011"
}
}POST /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/unpublish
Move a passport to trash.
Destructive/organizations/{organization}/passports/{id}/trash- Scope
- passports:write
Idempotency-Key- Accepted
- Returns
- 200
Path parameters
organizationstringRequiredThe organization this request acts for. The credential must hold a grant for it.
idstringRequiredThe identifier of the resource. Treat it as an opaque string.
Errors
Every refusal this endpoint can return, with the status it arrives with.
- 500configuration_error
- 409idempotency_conflict
- 403insufficient_scope
- 500internal_error
- 401invalid_key
- 400invalid_request
- 401key_expired
- 401key_revoked
- 401key_rotated
- 400mode_mismatch
- 402no_subscription
- 404organization_not_found_or_not_granted
- 413payload_too_large
- 402payment_overdue
- 412precondition_failed
- 429rate_limited
- 404resource_not_found
- 415unsupported_media_type
- 422validation_failed
- 400wildcard_not_supported
- 409wrong_status
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/trash" \
-X POST \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"object": "passport",
"id": "2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"category": "textile",
"status": "trashed",
"gtin": "03453120000011",
"serial_number": null,
"external_id": "SKU-4471-BLK",
"version": 6,
"livemode": true,
"registry_id": null,
"created_at": "2026-08-01T09:12:44.918Z",
"updated_at": "2026-08-02T08:19:44.002Z",
"published_at": null,
"trashed_at": "2026-08-02T08:19:44.002Z",
"data": {
"product_name": "Merino Crew Neck",
"product_description": "Mid-weight knitted crew neck in 100% merino wool.",
"manufacturer_name": "Atelier Kestrel SAS",
"manufacturer_address": "14 rue des Tanneurs, 59100 Roubaix",
"manufacturer_country": "FR",
"material_composition": [
{
"fiber": "Merino wool",
"percentage": 100
}
],
"substances_of_concern": [
{
"name": "None declared",
"present": false
}
],
"gtin": "03453120000011"
}
}POST /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/trash
Restore a passport from trash.
/organizations/{organization}/passports/{id}/restore- Scope
- passports:write
Idempotency-Key- Accepted
- Returns
- 200
Path parameters
organizationstringRequiredThe organization this request acts for. The credential must hold a grant for it.
idstringRequiredThe identifier of the resource. Treat it as an opaque string.
Errors
Every refusal this endpoint can return, with the status it arrives with.
- 500configuration_error
- 409idempotency_conflict
- 403insufficient_scope
- 500internal_error
- 401invalid_key
- 400invalid_request
- 401key_expired
- 401key_revoked
- 401key_rotated
- 400mode_mismatch
- 402no_subscription
- 409not_trashed
- 404organization_not_found_or_not_granted
- 413payload_too_large
- 402payment_overdue
- 412precondition_failed
- 429rate_limited
- 404resource_not_found
- 415unsupported_media_type
- 422validation_failed
- 400wildcard_not_supported
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/restore" \
-X POST \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"{
"object": "passport",
"id": "2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"category": "textile",
"status": "draft",
"gtin": "03453120000011",
"serial_number": null,
"external_id": "SKU-4471-BLK",
"version": 7,
"livemode": true,
"registry_id": null,
"created_at": "2026-08-01T09:12:44.918Z",
"updated_at": "2026-08-02T08:21:03.884Z",
"published_at": null,
"trashed_at": null,
"data": {
"product_name": "Merino Crew Neck",
"product_description": "Mid-weight knitted crew neck in 100% merino wool.",
"manufacturer_name": "Atelier Kestrel SAS",
"manufacturer_address": "14 rue des Tanneurs, 59100 Roubaix",
"manufacturer_country": "FR",
"material_composition": [
{
"fiber": "Merino wool",
"percentage": 100
}
],
"substances_of_concern": [
{
"name": "None declared",
"present": false
}
],
"gtin": "03453120000011"
}
}POST /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/restore
Check a passport against its category schema without saving.
/organizations/{organization}/passports/{id}/validate- Scope
- passports:read
Idempotency-Key- Not accepted
- Returns
- 200
Path parameters
organizationstringRequiredThe organization this request acts for. The credential must hold a grant for it.
idstringRequiredThe identifier of the resource. Treat it as an opaque string.
Request body
dataobjectOptionalFields to merge in before checking, so you can test an edit without saving it. Nothing is written either way.
Errors
Every refusal this endpoint can return, with the status it arrives with.
- 500configuration_error
- 403insufficient_scope
- 500internal_error
- 401invalid_key
- 400invalid_request
- 401key_expired
- 401key_revoked
- 401key_rotated
- 400mode_mismatch
- 404organization_not_found_or_not_granted
- 413payload_too_large
- 429rate_limited
- 404resource_not_found
- 503storage_unavailable
- 415unsupported_media_type
- 422validation_failed
- 400wildcard_not_supported
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/validate" \
-X POST \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": {
"material_composition": null
}
}'{
"object": "validation",
"id": "2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/validation",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"passport_id": "2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"category": "textile",
"schema_version": "1.0.0-draft",
"dry_run": true,
"valid": false,
"publishable": false,
"error_count": 2,
"warning_count": 0,
"checked_at": "2026-08-02T08:26:11.409Z",
"issues": [
{
"object": "validation_issue",
"field": "material_composition",
"source": {
"pointer": "/data/material_composition"
},
"rule": "required",
"severity": "error",
"message": "Material Composition is required",
"message_key": "required",
"message_params": {
"field": "Material Composition"
},
"writable_via_api": true
},
{
"object": "validation_issue",
"field": "gtin",
"source": {
"pointer": "/data/gtin"
},
"rule": "required",
"severity": "error",
"message": "A GTIN is required before this passport can be published.",
"writable_via_api": true
}
]
}POST /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/validate
Fetch the public and GS1 Digital Link URLs.
/organizations/{organization}/passports/{id}/links- Scope
- passports:read
Idempotency-Key- Not accepted
- Returns
- 200
Path parameters
organizationstringRequiredThe organization this request acts for. The credential must hold a grant for it.
idstringRequiredThe identifier of the resource. Treat it as an opaque string.
Errors
Every refusal this endpoint can return, with the status it arrives with.
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/links" \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"{
"object": "passport_links",
"id": "2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/links",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"passport": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"status": "published",
"livemode": true,
"gtin": "03453120000011",
"serial_number": null,
"public_url": "https://passportcraft.com/passport/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"qr_target": "https://passportcraft.com/01/03453120000011",
"gs1_digital_link": {
"uri": "https://passportcraft.com/01/03453120000011",
"gtin14": "03453120000011",
"serial": null,
"linkset_url": "https://passportcraft.com/01/03453120000011?linkType=linkset",
"unavailable_reason": null
},
"resolves_publicly": true,
"not_resolvable_reason": null
}GET /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/links
Detach a document, and delete it from the library when nothing else holds it.
/organizations/{organization}/passports/{id}/documents/{documentId}- Scope
- documents:write
Idempotency-Key- Not accepted
- Returns
- 200
Path parameters
organizationstringRequiredThe organization this request acts for. The credential must hold a grant for it.
idstringRequiredThe identifier of the resource. Treat it as an opaque string.
documentIdstringRequiredThe identifier of the resource. Treat it as an opaque string.
Errors
Every refusal this endpoint can return, with the status it arrives with.
- 500configuration_error
- 403insufficient_scope
- 500internal_error
- 401invalid_key
- 400invalid_request
- 401key_expired
- 401key_revoked
- 401key_rotated
- 400mode_mismatch
- 402no_subscription
- 404organization_not_found_or_not_granted
- 413payload_too_large
- 402payment_overdue
- 429rate_limited
- 409resource_busy
- 404resource_not_found
- 400wildcard_not_supported
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/documents/a3b8c2d1-5e64-4f79-8a0b-1c2d3e4f5a6b" \
-X DELETE \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"{
"object": "document.deleted",
"id": "a3b8c2d1-5e64-4f79-8a0b-1c2d3e4f5a6b",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"passport_id": "2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41",
"livemode": true,
"detached": true,
"deleted_from_library": true,
"remaining_links": 0,
"document_limit": 50
}DELETE /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/2c1f9e07-3b4d-4a18-9f6c-5e0a7b8d3c41/documents/a3b8c2d1-5e64-4f79-8a0b-1c2d3e4f5a6b