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

# عيّنات Sandbox

> المستندات العيّنة التي تقرؤها Sandbox، وكيف تسردها وتنزّلها، وما يحدث لأي شيء آخر.

لا تقرأ Sandbox إلا **المستندات العيّنة (specimens)**. تنشر Sahl معرضاً منها لتشغّل كل استدعاء دون مستند عميل حقيقي. كل شخص وشركة وبنك في عيّنة خيالي.

ينطبق هذا على مساحات العمل المنشأة في 24 أكتوبر 2026 أو بعده، في كل الباقات، وفي API ووحدة التحكم وأداة التحقق. مساحة عمل أُنشئت قبل ذلك التاريخ تحتفظ بـ Sandbox المفتوحة التي كانت لها. الإنتاج يقرأ مستندات حقيقية.

| نقطة النهاية | الوظيفة | النطاق |
| - | - | - |
| `GET /v1/sandbox/specimens` | يسرد العيّنات. | أي مفتاح API صالح. لا نطاق مطلوب. |
| `GET /v1/sandbox/specimens/{id}` | ينزّل ملفاً. | أي مفتاح API صالح. |

## سرد العيّنات

```bash cURL theme={"dark"}
curl -s https://app.sahlfinancial.com/api/v1/sandbox/specimens \
  -H "Authorization: Bearer $SAHL_API_KEY"
```

```javascript JavaScript theme={"dark"}
const res = await fetch("https://app.sahlfinancial.com/api/v1/sandbox/specimens", {
  headers: { Authorization: `Bearer ${process.env.SAHL_API_KEY}` },
});
const { specimens, count, specimen_ice } = await res.json();
```

```python Python theme={"dark"}
import os, requests

body = requests.get(
    "https://app.sahlfinancial.com/api/v1/sandbox/specimens",
    headers={"Authorization": f"Bearer {os.environ['SAHL_API_KEY']}"},
).json()
for s in body["specimens"]:
    print(s["id"], s["doc_type"], s["filename"])
```

```json theme={"dark"}
{
  "specimens": [
    {
      "id": "modele_j",
      "doc_type": "modele_j",
      "title_fr": "Modèle J (registre de commerce)",
      "title_en": "Modèle J (trade register extract)",
      "filename": "specimen-modele-j.pdf",
      "content_type": "application/pdf",
      "size": 6207,
      "sha256": "..."
    }
  ],
  "count": 23,
  "specimen_ice": ["001234567000062"]
}
```

`specimen_ice` هو الـ ICE الذي يستخدمه فحص ICE في Sandbox كمثال.

## تنزيل واحدة

```bash theme={"dark"}
curl -s https://app.sahlfinancial.com/api/v1/sandbox/specimens/cin_recto \
  -H "Authorization: Bearer $SAHL_API_KEY" -o specimen-cin-recto.png
```

الرد هو الملف مع الترويسة `X-Content-SHA256`. معرّف غير معروف يرد 404 `not_found`.

## المعرض

| `id` | `doc_type` | المستند | الملف |
| - | - | - | - |
| `cin_recto` | `carte_nationale` | Moroccan ID card (front) | `specimen-cin-recto.png` |
| `cin_verso` | `carte_nationale` | Moroccan ID card (back, MRZ) | `specimen-cin-verso.png` |
| `passport` | `passport` | ICAO passport (UTO, ERIKSSON) | `specimen-passport-icao.png` |
| `bank_statement` | `releve_bancaire` | Bank statement | `specimen-releve-bancaire.pdf` |
| `payslip` | `bulletin_paie` | Payslip | `specimen-bulletin-de-paie.pdf` |
| `modele_j` | `modele_j` | Modèle J (trade register extract) | `specimen-modele-j.pdf` |
| `modele_7` | `modele_j` | Modèle 7 (registration certificate) | `specimen-modele-7.pdf` |
| `attestation_if` | `attestation_if` | Tax ID certificate (IF) | `specimen-attestation-if.pdf` |
| `liasse_fiscale` | `bilan` | Tax return 2025 (balance sheet, P\&L, prior year) | `specimen-liasse-fiscale-2025.pdf` |
| `statuts` | `statuts` | Articles of association (SARL) | `specimen-statuts.pdf` |
| `company_statement` | `releve_bancaire` | Company bank statement (3 months) | `specimen-releve-entreprise-3-mois.pdf` |
| `loan_schedule` | `tableau_amortissement` | Loan amortisation schedule (current loan) | `specimen-tableau-amortissement.pdf` |
| `attestation_cnss` | `attestation_cnss` | CNSS social security certificate | `specimen-attestation-cnss.pdf` |
| `attestation_fiscale` | `attestation_regularite_fiscale` | Tax compliance certificate | `specimen-attestation-regularite-fiscale.pdf` |
| `pv_assemblee` | `pv_assemblee` | General meeting minutes (2025 accounts, borrowing) | `specimen-pv-assemblee.pdf` |
| `declaration_be` | `declaration_beneficiaires_effectifs` | Beneficial ownership declaration | `specimen-declaration-beneficiaires.pdf` |
| `business_plan` | `business_plan` | Business plan 2026-2029 (loan request) | `specimen-business-plan.pdf` |
| `financial_projections` | `financial_projections` | Financial projections 2026-2029 (Excel) | `specimen-projections-financieres.xlsx` |
| `attestation_travail` | `attestation_travail` | Employment certificate (permanent contract) | `specimen-attestation-travail.pdf` |
| `rib` | `rib_certificate` | Bank details (RIB) | `specimen-rib.pdf` |
| `justificatif_domicile` | `utility_bill` | Proof of address (utility bill) | `specimen-justificatif-domicile.pdf` |
| `compromis_vente` | `contrat_vente` | Sale agreement (property) | `specimen-compromis-vente.pdf` |
| `certificat_propriete` | `certificat_propriete` | Land title certificate (ANCFCC) | `specimen-certificat-propriete.pdf` |

القائمة في الرد هي المرجع: قد تضيف Sahl عيّنات، فاقرأ `GET /v1/sandbox/specimens` بدلاً من تثبيت هذا الجدول.

## ما يُعدّ عيّنة

المستند عيّنة إذا كان أحد ملفات معرض Sahl (يُطابَق بـ SHA-256)، أو إذا أظهر محتواه ذلك: علامة أو علامة مائية SPÉCIMEN أو ÉCHANTILLON أو SAMPLE، أو حامل عيّنة، أو جواز السفر العيّنة لـ ICAO (الدولة المصدِرة `UTO`). المستند المزيف الذي صنعته بنفسك يُقبل إذا طُبع عليه SPECIMEN.

أي شيء آخر يُرفض في Sandbox بـ 422، ولا يُعاد ولا يُحفظ شيء مما قُرئ منه:

```json theme={"dark"}
{
  "detail": {
    "code": "sandbox_specimen_required",
    "message": "Sandbox only accepts specimen documents. Use Production for real documents.",
    "message_fr": "La Sandbox accepte uniquement les documents spécimens. Pour vos vrais documents, passez en Production.",
    "message_en": "Sandbox only accepts specimen documents. Use Production for real documents.",
    "specimens_url": "/api/v1/sandbox/specimens"
  }
}
```

* يتبع `message` ترويسة `Accept-Language`: الفرنسية لـ `fr` والإنجليزية غير ذلك. `message_fr` و`message_en` موجودان دائماً.
* في `POST /v1/kyb/ma/onboard` يحمل الجسم أيضاً `documents` يسمّي الأجزاء التي ليست عيّنات.
* كشف في قائمة الانتظار ليس عيّنة ينتهي `failed` بـ `error_code` `sandbox_specimen_required`.
* تشمل القاعدة `/v1/kyc/extract` و`/v1/kyb/ma/onboard` و`/v1/statements/extract` وصفحة رفع طلب المستندات. فحص ICE لا يحمل مستنداً، فيتحقق من صيغة أي ICE في Sandbox.
* يستمر الفحص `authenticity:specimen:` في العمل على العيّنة ويفشل، كما في الإنتاج. هذا هو الفحص يعمل وليس خطأً في تكاملك.

انظر أيضاً [Sandbox والإنتاج](https://docs.sahlfinancial.com/ar/sandbox.md).


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