เริ่มต้นใช้งาน
ข้อมูลหลัก
อื่นๆ

ชุดข้อมูลรับรอง

การส่งข้อมูลรับรองแบบชุดพร้อมการอัปโหลดแบบอะซิงโครนัสรองรับเฉพาะใน API เวอร์ชัน 2 เท่านั้น
คำขอ API ต้องใช้ OAuth scope ที่เกี่ยวข้องทั้งหมด เช่น write.education write.microcredential ดูที่ OAuth authentication
Batch API ช่วยให้คุณส่งข้อมูลรับรองหลายรายการได้ในการเรียก API ครั้งเดียว โดย endpoint นี้ช่วยให้ประสบการณ์การเพิ่มข้อมูลรับรองหลายรายการพร้อมกันราบรื่นขึ้น สามารถใช้เพื่อรองรับ:
  1. 1.
    หลายรายการของข้อมูลรับรองประเภทเดียว (เช่น 2x คุณวุฒิการศึกษา)
  2. 2.
    หลายรายการของข้อมูลรับรองหลายประเภท (เช่น 1x Digital Identity, 2x คุณวุฒิการศึกษา และ 5x ข้อมูลรับรองการเรียนรู้และพัฒนาตนเอง)
curl -L $SEEK_PASS_URL/api/partner/v2/add/requests/batch.json \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data '<BATCH PAYLOAD>'

คำอธิบายฟิลด์

คุณยังสามารถอ้างอิงจาก OpenAPI Specification V2 ของเราสำหรับรูปแบบเพย์โหลดต่าง ๆ ของ batch API
Batch API v2 รองรับการส่งข้อมูลรับรองหลายประเภทในคำขอเดียว เพย์โหลดรองรับฟิลด์ต่อไปนี้:
  • digital_identity
  • education_items
  • microcredential_items
  • english_proficiency_items
  • right_to_work_items
  • career_history
  • universal_credential_items

ข้อกำหนดในการอัปโหลดไฟล์

สำหรับ education_items, microcredential_items, english_proficiency_items และ universal_credential_items คุณสามารถรวมฟิลด์ assets เพื่อเปิดใช้งานการอัปโหลดไฟล์แบบอะซิงโครนัสได้ เมื่อระบุฟิลด์นี้ API จะส่งคืนลิงก์อัปโหลดที่ปลอดภัย ซึ่งช่วยให้คุณแนบเอกสารประกอบเข้ากับคำขอได้ (เช่น ใบประกาศนียบัตรการสำเร็จการศึกษา เอกสารรับรองการพัฒนาวิชาชีพในรูปแบบ PDF/PNG/JPG/OpenCerts หรือหลักฐาน Universal Credential ในรูปแบบ PDF/PNG)
อัปโหลดไฟล์โดยส่งคำขอ HTTP PUT ไปยัง presigned URL ที่ให้มา คำขอนี้ไม่จำเป็นต้องมีการยืนยันตัวตน เนื่องจาก URL มีสิทธิ์ที่จำเป็นอยู่แล้วในพารามิเตอร์คิวรี ตรวจสอบให้แน่ใจว่าส่วนหัว Content-Type ตรงกับประเภทที่ระบุไว้ตอนสร้างลิงก์อัปโหลด (หากมี) เนื้อหาของคำขอควรเป็นข้อมูลไบนารีดิบของไฟล์ ตัวอย่างเช่น เมื่อใช้ cURL:
curl -X PUT "<URL>" \
--header "Content-Type: application/pdf" \
--data-binary "@path/to/your/file.pdf"

โครงสร้างเพย์โหลดของคำขอ

{
  "credential_id": { "type": "string" }, // (Required) Unique identifier for the batch. Include at least one credential section below.

  "digital_identity": { // { "type": "object" }, (Optional)
    "credential_id": { "type": "string" }, // (Required) Unique identifier for a credential
    "fields": { // { "type": "object" }, (Required)
      "full_name": { "type": "string" }, // (Required)
      "identity_document_validity": { "type": "string" }, // (Required) "manual", "government_database", or "verifiable_credential"
      "identity_document_liveness": { "type": "string" }, // (Required) "automated" or "in_person"
      "identity_document_person_match": { "type": "string" }, // (Required) "manual", "automated", or "government_database"
    }
  },

  "education_items": [ // { "type": "array" }, (Optional) Array of education data
    {
      "credential_id": { "type": "string" }, // (Required) Unique identifier for a credential
      "fields": {
        "full_name": { "type": "string" }, // (Required)
        "education_provider": { "type": "string" }, // (Required)
        "course_name": { "type": "string" }, // (Required)
        "conferral_year": { "type": ["string", "null"] }, // (Required unless awaiting_graduation) Year: YYYY or null if awaiting graduation
        "awaiting_graduation": { "type": "boolean" }, // (Optional)
        "has_majors": { "type": "boolean" }, // (Optional)
        "majors": { "type": "array", "items": { "type": "string" } }, // (Optional)
        "with_honours": { "type": "boolean" }, // (Optional)
        "transcript": { // { "type": "object" }, // (Optional)
          ... (Refer to the Education Qualification section)
        },
        "partner_chain": { "type": ["array", "null"] } // (Optional unless otherwise specified) Array of objects to specify partner institutions, e.g. [{ "name": "Partner Organization" }]
      },
      "assets": [ // (Optional) Specifies an asset to be uploaded asynchronously
        {
          "asset_id": { "type": "string" }, // (Required) Unique identifier for an asset
          "asset_type": { "type": "string" }, // (Required) Must be one of "pdf" or "open_cert"
        }
      ]
    }
  ],

  "microcredential_items": [ // { "type": "array" }, (Optional) Array of microcredential data
    {
      "credential_id": { "type": "string" }, // (Required) Unique identifier for a credential
      "fields": { // { "type": "object" }, (Required)
        "full_name": { "type": "string" }, // (Required)
        "issuer_name": { "type": "string" }, // (Required)
        "microcredential_name": { "type": "string" }, // (Required)
        "issue_date": { "type": "string" }, // (Required) Date format: "YYYY-MM-DD"
        "expiry_date": { "type": "string" }, // (Optional) Date format: "YYYY-MM-DD"
        "assessment_result": { "type": ["string", null] }, // (Optional) Text description
        "partner_chain": { "type": ["array", "null"] } // (Optional unless otherwise specified) Array of objects to specify partner institutions, e.g. [{ "name": "Partner Organization" }]
      },
      "assets": [ // (Optional) Specifies an asset to be uploaded asynchronously
        {
          "asset_id": { "type": "string" }, // (Required) Unique identifier for an asset
          "asset_type": { "type": "string" }, // (Required) Must be one of "pdf", "jpg", "png" or "open_cert"
        }
      ]
    }
  ],

  "english_proficiency_items": [ // { "type": "array" }, (Optional) Array of English proficiency data
    {
      "credential_id": { "type": "string" }, // (Required) Unique identifier for a credential
      "fields": { // { "type": "object" }, (Required)
        "full_name": { "type": "string" }, // (Required)
        "test_provider": { "type": "string" }, // (Required)
        "test_name": { "type": "string" }, // (Required)
        "completion_date": { "type": "string" }, // (Required) Date format: "YYYY-MM-DD"
        "expiry_date": { "type": "string" }, // (Optional) Date format: "YYYY-MM-DD"
        "test_scores": { // { "type": "object" }, (Required)
          ... (Refer to the English Proficiency section)
        },
        "partner_chain": { "type": ["array", "null"] } // (Optional unless otherwise specified) Array of objects to specify partner institutions, e.g. [{ "name": "Partner Organization" }]
      },
      "assets": [ // (Optional) Specifies an asset to be uploaded asynchronously
        {
          "asset_id": { "type": "string" }, // (Required) Unique identifier for an asset
          "asset_type": { "type": "string" }, // (Required) Must be one of "pdf"
        }
      ]
    }
  ],

  "right_to_work_items": [ // { "type": "array" }, (Optional)
    {
      "credential_id": { "type": "string" }, // (Required)
      "fields": { ... } // (Refer to the Right to Work section)
    }
  ],

  "career_history": { // { "type": "object" }, (Optional)
    "credential_id": { "type": "string" }, // (Required)
    "fields": { ... } // (Refer to the Career History section)
  },

  "universal_credential_items": [ // { "type": "array" }, (Optional)
    {
      "credential_id": { "type": "string" }, // (Required)
      "fields": { ... }, // (Refer to the Universal Credential section)
      "assets": [
        {
          "asset_id": { "type": "string" }, // (Required)
          "asset_type": { "type": "string" } // (Required) "pdf" or "png"
        }
      ]
    }
  ]
}

ตัวอย่าง payload

{
  "credential_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5",
  "digital_identity": {
    "credential_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-1",
    "fields": {
      "full_name": "John Doe",
      "identity_document_validity": "manual",
      "identity_document_liveness": "in_person",
      "identity_document_person_match": "government_database"
    }
  },
  "microcredential_items": [
    {
      "credential_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-micro-1",
      "fields": {
        "full_name": "John Doe",
        "issuer_name": "Skill Test Provider",
        "microcredential_name": "AI Essentials",
        "issue_date": "2024-04-30",
        "expiry_date": "2026-08-30"
      },
      "assets": [
        {
          "asset_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-micro-1-asset",
          "asset_type": "pdf"
        }
      ]
    },
    {
      "credential_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-micro-2",
      "fields": {
        "full_name": "John Doe",
        "issuer_name": "Skill Test Provider",
        "microcredential_name": "AI Advanced",
        "issue_date": "2024-05-30",
        "expiry_date": "2026-10-30"
      },
      "assets": [
        {
          "asset_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-micro-2-asset",
          "asset_type": "png"
        }
      ]
    }
  ],
  "education_items": [
    {
      "credential_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-edu-1",
      "fields": {
        "full_name": "John Doe",
        "education_provider": "University of Melbourne",
        "course_name": "BSc",
        "conferral_year": "2024",
        "has_majors": true,
        "majors": [ "IT" ]
      },
      "assets": [
        {
          "asset_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-edu-1-asset",
          "asset_type": "pdf"
        }
      ]
    },
    {
      "credential_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-edu-2",
      "fields": {
        "full_name": "John Doe",
        "education_provider": "University of Melbourne",
        "course_name": "Master of Science",
        "conferral_year": "2026",
        "has_majors": true,
        "majors": [ "IT" ]
      }
    }
  ],
  "english_proficiency_items": [
    {
      "credential_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-eng-1",
      "fields": {
        "full_name": "John Doe",
        "test_provider": "Skill Test Provider",
        "test_name": "English SPEAKING",
        "completion_date": "2024-01-01",
        "expiry_date": "2026-01-01",
        "test_scores": {
          "cefr_scores": {
            "writing": "A1"
          },
          "overall": {
            "score": "100",
            "scale": "EnglishScore"
          }
        }
      }
    },
    {
      "credential_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-eng-2",
      "fields": {
        "full_name": "John Doe",
        "test_provider": "Skill Test Provider",
        "test_name": "English WRITING",
        "completion_date": "2024-01-01",
        "expiry_date": "2026-01-01",
        "test_scores": {
          "cefr_scores": {
            "writing": "A1"
          },
          "overall": {
            "score": "100",
            "scale": "EnglishScore"
          }
        }
      }
    }
  ],
  "right_to_work_items": [
    {
      "credential_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-rtw-1",
      "fields": {
        "full_name": "John Doe",
        "country": "SG",
        "singapore_work_rights": "resident"
      }
    }
  ],
  "career_history": {
    "credential_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-ch",
    "fields": {
      "full_name": "John Doe",
      "employment": [
        {
          "organisation": "Company A",
          "role_title": "Senior Software Engineer",
          "start_date": "2024-01",
          "last_processed_month": "2024-07"
        }
      ]
    }
  },
  "universal_credential_items": [
    {
      "credential_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-uc-1",
      "fields": {
        "full_name": "John Doe",
        "credential_name": "Example Certification",
        "credential_category": "AVPRC Registration",
        "credential_sub_type": "Cert",
        "issuer_name": "Example Issuer",
        "issue_date": "2024-08-31",
        "expiry_date": "2026-08-31"
      },
      "assets": [
        {
          "asset_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-uc-1-asset",
          "asset_type": "pdf"
        }
      ]
    }
  ]
}

ตัวอย่างการตอบกลับ

{
  "redirect_uri": "https://app.seekpass-staging.com/partner/add/batch#clientId=[CLIENT_ID]&content=[REQUEST_ID]",
  "asset_uploads": [
    {
      "asset_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-edu-1-asset",
      "url": "[ASSET UPLOAD LINK]"
    },
    {
      "asset_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-micro-1-asset",
      "url": "[ASSET UPLOAD LINK]"
    },
    {
      "asset_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-micro-2-asset",
      "url": "[ASSET UPLOAD LINK]"
    },
    {
      "asset_id": "3601f8ae-9181-41a3-89ed-6dbe5ecde2b5-uc-1-asset",
      "url": "[ASSET UPLOAD LINK]"
    }
  ]
}