**גרסאות API** · [V2 (Latest)](/integrations/v2/docs?lang=he) · **V1**

> **גרסה זו של ה־API מיושנת.** לחיבורים חדשים יש להשתמש בגרסה העדכנית ביותר. [לתיעוד העדכני](/integrations/v2/docs?lang=he)

# נתונים ועימוד

כללים שכדאי לבדוק לפני קריאה או שינוי של הנתונים שלכם.

## מעבר על רשימה

רשימות עם עימוד כוללות את data ואת meta. כל עוד meta.hasMore הוא true, הציבו את meta.nextCursor בפרמטר cursor ושמרו על אותם מסננים. המגבלה הרגילה היא 50 פריטים, והמקסימום הוא 200; בדקו את הפרמטרים של כל פעולה.

```shell
GET /contacts?limit=50
GET /contacts?limit=50&cursor=NEXT_CURSOR
```

## סכומים ומטבעות

סכומי התשלומים מבוטאים ביחידות הקטנות של המטבע: 1500 מייצג 15,00 EUR. התחייבויות לתרומה משתמשות ביחידות מלאות. בדקו תמיד את סכמת השדה ואת המטבע שלו.

## עריכת תוכן רב-לשוני

שפת הארגון הראשית נמצאת ברמה העליונה של האובייקט. השפות האחרות מופיעות כאובייקטים חלקיים תחת קוד השפה שלהן. בדקו את defaultLanguage ואת enabledLanguages באמצעות GET /me.

```json
{
  "label": "Restaurant",
  "en": {"label": "Restaurant"},
  "he": {"label": "מסעדה"}
}
```

בבקשת PATCH, שדה שלא נשלח נשאר ללא שינוי. הצבת שכבת שפה על null מוחקת את התרגום הזה. כללי המחיקה של שדות אחרים תלויים בסכמה שלהם.

**Multilingual content (read this before writing any text field).** Translatable content does NOT use a `{fr:…, en:…}` map. Instead:
- The value in the organisation's **default language** (`org.language`) sits at the **ROOT** of the object — never nested under its own language key.
- Every **other** language enabled by the org (`org.languages`) is a **partial overlay** keyed by its language code, holding only the translatable fields.

```json
{ "label": "Restaurant", "he": { "label": "מסעדה" } }   // org default = French
```

Valid overlay keys are **dynamic per organisation** = its enabled languages minus the default one. Sending the default language as an overlay is rejected (it would duplicate the root); an unsupported language is dropped silently. A field missing from an overlay falls back to the root value.

**Editing vs deleting a translation** — on a partial update (`PATCH`), omitting a key means *"leave it as it is"*. Therefore:

| Body | Effect on the `he` translation |
|---|---|
| `{"he": {"label": "מסעדה"}}` | created / overwritten |
| *(key omitted)* | left untouched |
| `{"he": null}` | **deleted** (the whole `he` overlay is removed) |
| `{"he": {}}` | deleted too — an empty overlay carries no translation |

To delete a translation, explicitly send null for that language. An empty translation object is also treated as a deletion; omitting the language preserves its current value.

**The default language is gated on the operation, not on the key.** Sending it as an overlay to WRITE it is rejected (`{"fr": {"label": "…"}}` on a French-default org) — the default language belongs at the root. But `{"fr": null}` is accepted: it DELETES an overlay in that language. This matters when an organisation changes its default language — an overlay in the new default language survives in the documents and takes precedence over the root value when rendered, so deleting it must remain possible. See the `I18nOverlay` schema.
