> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truthlocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# صك إيصال

> إنشاء حدث إيصال موقع تشفيريًا ومثبت بسجل الشفافية.

ينشئ حدث إيصال موقع تشفيريًا ومثبتًا في سجل الشفافية. يتم التحقق من صحة الإيصالات مقابل مخطط نوع الإيصال المسجل قبل التوقيع.

### أنواع الإيصالات

| النوع | الاسم | الحقول المطلوبة |
| - | - | - |
| `payment_receipt` | إيصال دفع | `amount`، `currency`، `provider`، `provider_reference`، `subject` |
| `security_event_receipt` | إيصال حدث أمني | `event_type`، `severity`، `subject`، `outcome` |
| `delivery_receipt` | إيصال التسليم | `item_reference`، `recipient`، `delivery_method`، `delivered_at` |
| `compliance_receipt` | إيصال الامتثال | `check_type`، `subject`، `result`، `framework` |
| `custom_receipt` | إيصال مخصص | `subject`، `event` |

## الرؤوس

## الاستجابة

**receipt\_id** `string`

معرّف UUID للإيصال الذي تم إنشاؤه.

**receipt\_type** `string`

اسم نوع الإيصال.

**status** `string`

`active`

**issuer\_id** `string`

معرّف UUID للمُصدر الموقّع.

**subject** `string`

معرّف الموضوع.

**signature** `object`

التوقيع التشفيري: `alg`، `kid`، `value`.

**issued\_at** `string`

طابع زمني ISO 8601.

### حدث Webhook

يتم تسليم حدث webhook لـ `receipt.created` إلى جميع نقاط النهاية المكونة بعد سك ناجح.


## OpenAPI

````yaml ar/mint-openapi.yaml POST /v1/receipts
openapi: 3.0.3
info:
  title: Truthlocks API
  description: >
    Truthlocks هي بنية تحتية عالمية للتحقق من المستندات وبيانات الاعتماد والأصول
    الرقمية.يحدد هذا المواصفات واجهة برمجة التطبيقات (API) الأساسية للتفاعل مع
    خدمات Truthlocks.


    ## عناوين URL الأساسية

    - **الإنتاج**: `https://api.truthlocks.com`

    - **البيئة التجريبية (Sandbox)**: `https://sandbox-api.truthlocks.com`


    ## المصادقة

    - **مفاتيح API**: استخدم رأس `X-API-Key` للعمليات من جهاز إلى جهاز

    - **رموز Bearer**: استخدم `Authorization: Bearer <jwt>` للعمليات التي يبدأها
    المستخدم


    ## هوية المستأجر

    في بيئة الإنتاج، تُستمد هوية المستأجر من السياق المصادق عليه (مفتاح API أو
    JWT).

    يتم تجاهل رأس `X-Tenant-ID` في بيئة الإنتاج لمنع الانتحال.
  version: 1.0.0
  contact:
    name: Truthlocks Support
    url: https://truthlocks.com/support
    email: support@truthlocks.com
servers:
  - url: https://api.truthlocks.com
    description: واجهة برمجة تطبيقات الإنتاج
  - url: https://sandbox-api.truthlocks.com
    description: بيئة اختبار (Sandbox)
security:
  - APIKey: []
  - BearerAuth: []
tags:
  - name: Authentication
    description: إدارة مفاتيح ورموز API
  - name: Issuers
    description: تسجيل المصدر وإدارة الثقة
  - name: Keys
    description: إدارة المفاتيح التشفيرية لجهات الإصدار
  - name: Attestations
    description: دورة حياة الإشهاد (السك، الإلغاء، الاستبدال)
  - name: Verification
    description: حزم التحقق والإثبات للإشهاد
  - name: Governance
    description: سير عمل حوكمة المصدر (للمسؤول فقط)
  - name: Identity
    description: إدارة المنظمة والمستخدمين والأدوار
  - name: Audit
    description: استعلامات أحداث التدقيق
  - name: Tenant Console
    description: ملف تعريف المستأجر ونقاط نهاية دورة الحياة
  - name: Health
    description: نقاط نهاية صحة الخدمة وجاهزيتها
  - name: Risk
    description: استيعاب إشارة المخاطر واكتشاف الاحتيال
  - name: Risk Enforcement
    description: إجراءات إنفاذ المخاطر — الحظر والتحدي والحجر والتكوين
  - name: Billing
    description: إدارة الفوترة والاشتراكات والإضافات
  - name: Machine Identity
    description: >-
      بروتوكول هوية وكيل الآلة (MAIP) — تسجيل الوكيل، الجلسات، الثقة، الشهادة،
      الامتثال، التنسيق، والمراقبة
externalDocs:
  description: واجهة برمجة تطبيقات الشفافية للقراءة فقط (مواصفات خدمة منفصلة)
  url: >-
    https://github.com/truthlocks/truthlock/blob/main/docs/transparency/openapi.yaml
paths:
  /v1/receipts:
    post:
      tags:
        - Receipts
      summary: صك إيصال
      description: ينشئ حدث إيصال موقع تشفيريًا ومثبتًا في سجل الشفافية.
      operationId: receipts.mint
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
          description: معرف UUID لسك العمليات المتطابقة
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                alg:
                  $ref: '#/components/schemas/SigningAlgorithm'
                  description: خوارزمية التوقيع المطابقة للمفتاح.
                issuer_id:
                  type: string
                  description: معرف UUID للمُصدر الذي يوقع الإيصال
                kid:
                  type: string
                  description: معرف المفتاح لمفتاح التوقيع
                metadata:
                  description: بيانات وصفية اختيارية
                payload:
                  description: تم التحقق من حمولة الإيصال مقابل المخطط
                receipt_type:
                  type: string
                  description: اسم نوع الإيصال
                receipt_version:
                  type: string
                retention_policy:
                  type: string
                subject:
                  type: string
                  description: معرف الموضوع
              type: object
              required:
                - issuer_id
                - kid
                - receipt_type
                - subject
                - payload
      responses:
        '201':
          description: تم إنشاء الإيصال
          content:
            application/json:
              schema:
                type: object
                properties:
                  receipt_id:
                    type: string
                  receipt_type:
                    type: string
                  status:
                    type: string
                  issuer_id:
                    type: string
                  subject:
                    type: string
                  signature:
                    type: object
                    properties:
                      alg:
                        type: string
                      kid:
                        type: string
                      value:
                        type: string
                  issued_at:
                    type: string
        '401':
          description: المصادقة مطلوبة
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '422':
          description: خطأ في التحقق من صحة المخطط
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - APIKey: []
components:
  schemas:
    SigningAlgorithm:
      type: string
      enum:
        - Ed25519
        - ES256
        - ES384
        - ES512
        - RS256
        - RS384
        - RS512
        - PS256
        - PS384
        - PS512
      description: خوارزمية التوقيع لتوليد المفتاح
    ErrorEnvelope:
      type: object
      required:
        - code
        - message
        - http_status
      properties:
        code:
          type: string
          description: رمز خطأ قابل للقراءة آليًا
          enum:
            - AUTH_REQUIRED
            - AUTH_INVALID
            - PERMISSION_DENIED
            - TENANT_IDENTITY_UNVERIFIED
            - NOT_FOUND
            - VALIDATION_ERROR
            - CONFLICT
            - PAYLOAD_TOO_LARGE
            - RATE_LIMIT_EXCEEDED
            - QUOTA_EXCEEDED
            - SERVICE_UNAVAILABLE
            - INTERNAL_ERROR
        message:
          type: string
          description: رسالة خطأ مقروءة بشريًا
        http_status:
          type: integer
          description: رمز حالة HTTP
        retry_after_ms:
          type: integer
          description: عدد المللي ثانية للانتظار قبل إعادة المحاولة (لحدود المعدل)
        details:
          type: object
          description: سياق خطأ إضافي
      example:
        code: AUTH_REQUIRED
        message: Authentication required
        http_status: 401
  securitySchemes:
    APIKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: مفتاح API للمصادقة من جهاز إلى جهاز
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT للعمليات التي يبدأها المستخدم

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.