Feel free to reach techsupport@surepass.io for any technical support or guidance.
Authorization header as Bearer TOKEN.https://sandbox.surepass.apphttps://kyc-api.surepass.app| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer token for API authentication. Format: Bearer <JWT_TOKEN> |
| Content-Type | Yes | Must be set to application/json |
| Parameter | Type | Required | Description |
|---|---|---|---|
| recipe_id | string | Yes | Unique identifier for the build recipe. Example: recipe_fxwFeYqwpVzju |
| Parameter | Type | Description |
|---|---|---|
| data | object | Container object holding the complete recipe information |
| data.doc_url | string | Presigned S3 URL to access the original document used for recipe creation |
| data.recipe_id | string | Unique identifier for the recipe |
| data.keys | object | Schema definition containing all extractable fields with their metadata |
| data.keys.{field_name}.type | string | Data type of the field (e.g., "string", "number", "date") |
| data.keys.{field_name}.description | string | Human-readable description of what the field contains |
| data.description | string | Overall description of the document type and recipe purpose |
| data.name | string | Friendly name assigned to the recipe schema |
| data.pages | array | List of page numbers included in the document (e.g., [1] for single-page documents) |
| data.use_pdf | boolean | Indicates whether the source document is in PDF format |
| data.status | string | Processing status of the recipe (e.g., "completed", "processing", "failed") |
| data.keys_mappings | array | Array of objects mapping fields to specific document pages |
| data.keys_mappings[].page_no | integer | Page number where the fields are located |
| data.keys_mappings[].keys | array | List of field names extracted from this page |
| status_code | integer | HTTP status code (200 for success) |
| success | boolean | Indicates if the request was successful |
| message | string | Human-readable message describing the result |
| message_code | string | Machine-readable code for the result status |
{
"data": {
"doc_url": "https://playground-docs.s3.amazonaws.com/recipe_builder_mhCDemlkeH/ai_playground/recipe_builder_17656404.pdf",
"recipe_id": "recipe_builder_mhCDem",
"keys": {
"school_name": {
"type": "string",
"description": "Name of the school or institution."
},
"school_address": {
"type": "string",
"description": "Address of the school or institution."
},
"card_type": {
"type": "string",
"description": "Type of the ID card, e.g., 'Student ID Card'."
},
"student_name_label": {
"type": "string",
"description": "Label indicating the student's name."
},
"student_name": {
"type": "string",
"description": "Full name of the student."
},
"member_id_label": {
"type": "string",
"description": "Label indicating the member ID."
},
"member_id": {
"type": "string",
"description": "Unique identification number assigned to the student."
},
"phone_label": {
"type": "string",
"description": "Label indicating the phone number."
},
"phone_number": {
"type": "string",
"description": "Phone number of the student."
},
"address_label": {
"type": "string",
"description": "Label indicating the address."
},
"student_address": {
"type": "string",
"description": "Address of the student."
}
},
"description": "A student identification card with personal and school information.",
"name": "Student ID Card Schema",
"pages": [
1
],
"use_pdf": true,
"status": "completed",
"keys_mappings": [
{
"page_no": 1,
"keys": [
"school_name",
"school_address",
"card_type",
"student_name_label",
"student_name",
"member_id_label",
"member_id",
"phone_label",
"phone_number",
"address_label",
"student_address"
]
}
]
},
"status_code": 200,
"success": true,
"message": "Success",
"message_code": "success"
}{
"data": null,
"status_code": 400,
"success": false,
"message": "Recipe not found",
"message_code": "recipe_not_found"
}curl --location --request GET 'https://kyc-api.surepass.app/api/v1/ai-playground/fetch-build-recipe?recipe_id=recipe_fxwFeYqwpVzju' \
--header 'Authorization: Bearer <token>'{
"data": {
"doc_url": "https://playground-docs.s3.amazonaws.com/recipe_builder_mhCDemlkeH/ai_playground/recipe_builder_17656404.pdf",
"recipe_id": "recipe_builder_mhCDem",
"keys": {
"school_name": {
"type": "string",
"description": "Name of the school or institution."
},
"school_address": {
"type": "string",
"description": "Address of the school or institution."
},
"card_type": {
"type": "string",
"description": "Type of the ID card, e.g., 'Student ID Card'."
},
"student_name_label": {
"type": "string",
"description": "Label indicating the student's name."
},
"student_name": {
"type": "string",
"description": "Full name of the student."
},
"member_id_label": {
"type": "string",
"description": "Label indicating the member ID."
},
"member_id": {
"type": "string",
"description": "Unique identification number assigned to the student."
},
"phone_label": {
"type": "string",
"description": "Label indicating the phone number."
},
"phone_number": {
"type": "string",
"description": "Phone number of the student."
},
"address_label": {
"type": "string",
"description": "Label indicating the address."
},
"student_address": {
"type": "string",
"description": "Address of the student."
}
},
"description": "A student identification card with personal and school information.",
"name": "Student ID Card Schema",
"pages": [
1
],
"use_pdf": true,
"status": "completed",
"keys_mappings": [
{
"page_no": 1,
"keys": [
"school_name",
"school_address",
"card_type",
"student_name_label",
"student_name",
"member_id_label",
"member_id",
"phone_label",
"phone_number",
"address_label",
"student_address"
]
}
]
},
"status_code": 200,
"success": true,
"message": "Success",
"message_code": "success"
}