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

# السجل

> احصل على الإنفاق والأداء اليومي لإعلانات Snapchat التي عززتها عبر Ayrshare، مع إجماليات لكل عملة وعوامل تصفية للتاريخ.

احصل على سجل الإنفاق اليومي لإعلانات Snapchat التي أنشأتها عبر [تعزيز المنشور](https://www.ayrshare.com/docs/apis/ads/snapchat/boost-post.md). كل إدخال في `history` هو إعلان واحد في يوم واحد.

<ul>
  <li>السجل هو سجل Ayrshare اليومي لإنفاقك، لذا قد لا يظهر إنفاق اليوم بعد. للأرقام المباشرة، استخدم [الرؤى](https://www.ayrshare.com/docs/apis/ads/snapchat/get-ad-insights.md).</li>
  <li>يظهر الإعلان في كل يوم يُبلغ فيه Snapchat عن إحصاءات له. لا تُدرج الإعلانات المُنشأة في Snapchat Ads Manager.</li>
  <li>عندما لا يُعثر على أي أيام في النطاق الزمني، تظل الاستجابة ناجحة: يكون `history` فارغًا ويحتوي `warnings` على إدخال واحد بالرمز `401`.</li>
  <li>يكون `spend` لكل يوم بعملة الحساب الإعلاني، الظاهرة في `currency`. يعطي `totalSpendByCurrency` الإجمالي بكل عملة. إذا كانت حساباتك الإعلانية تستخدم عملات مختلفة، فصفِّ حسب `accountId`.</li>
  <li>يحسب `clicks` عدد مرات السحب لأعلى (swipe-ups). لا يُبلغ Snapchat عن الوصول اليومي، لذا تكون `reach` و`frequency` و`cpp` مساوية لـ `0`.</li>
  <li>`spendUsd` هو `spend` لليوم عندما تكون العملة USD، و`null` بخلاف ذلك. يكون `totalSpend` دائمًا `null`: استخدم `totalSpendByCurrency`.</li>
  <li>يجمّع `byGoalType` و`goalPerformance` الأرقام حسب هدف التعزيز: `brand_awareness` أو `video_views` أو `traffic`.</li>
</ul>

## معاملات الترويسة

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`
**Profile-Key** `string`

[Profile Key](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## معاملات الاستعلام

أرسل واحدًا على الأكثر من `adId` و`postId` و`accountId` و`socialPostId`. إذا أرسلت أكثر من واحد، يُستخدم الأول بهذا الترتيب. احذفها جميعًا للحصول على كل إعلانات Snapchat.

**adId** `string`

إعلان Snapchat هذا فقط.

**postId** `string`

الإعلانات المُعزَّزة من [معرّف المنشور](https://www.ayrshare.com/docs/apis/overview.md#ayrshare-post-id) هذا في Ayrshare فقط.

**accountId** `string`

الإعلانات الموجودة في حساب Snapchat الإعلاني هذا فقط.

**socialPostId** `string`

الإعلانات المُعزَّزة من هذا الـ Snap فقط: قيمة `mediaId` في نتيجة Snapchat للمنشور. يُقبل `snapchatSnapId` كالمعامل نفسه.

**startDate** `string` (default: 30 days before endDate)

بداية النطاق الزمني بتنسيق ISO 8601، مثل `2026-11-01`.

**endDate** `string` (default: now)

نهاية النطاق الزمني بتنسيق ISO 8601.

**limit** `number` (default: 25)

الحد الأقصى لعدد الإدخالات اليومية المُعادة، الأحدث أولًا. الحد الأقصى 300؛ تُقيَّد القيم الأعلى عند 300.

```bash cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/snapchat/history?adId=c3a1e2d4-0000-4000-8000-0000000000ad&startDate=2026-11-20&endDate=2026-11-22"
```

```json 200: Success theme={"system"}
{
  "status": "success",
  "history": [
    {
      "accountId": "5a0d0000-0000-4000-8000-000000000003",
      "adId": "c3a1e2d4-0000-4000-8000-0000000000ad",
      "adName": "Acme - Snap - 2026-11-20T15:04",
      "budgetDaily": 20,
      "budgetType": "",
      "currency": "USD",
      "deliveryStatus": null,
      "goal": { "type": "brand_awareness" },
      "isActive": true,
      "isComplete": false,
      "metrics": {
        "clicks": 42,
        "cpc": 0.43,
        "cpp": 0,
        "cpm": 4.5,
        "ctr": 1.05,
        "frequency": 0,
        "impressions": 4000,
        "reach": 0
      },
      "network": "snapchat",
      "postId": "DE6gpw8kxlonHy6eb7L1",
      "snapchatSnapId": "6f1c2d3e-0000-4000-8000-00000000000a",
      "socialPostId": "6f1c2d3e-0000-4000-8000-00000000000a",
      "spend": 18,
      "spendDate": "2026-11-21T00:00:00.000Z",
      "spendUsd": 18,
      "status": "ACTIVE"
    }
  ],
  "dateRange": {
    "start": "2026-11-20T00:00:00.000Z",
    "end": "2026-11-22T00:00:00.000Z",
    "adId": "c3a1e2d4-0000-4000-8000-0000000000ad"
  },
  "metrics": {
    "totalSpend": null,
    "totalSpendByCurrency": { "USD": 18 },
    "totalClicks": 42,
    "totalImpressions": 4000,
    "totalReach": 0,
    "averageCTR": 1.05,
    "averageFrequency": 0,
    "cpm": 4.5,
    "cpp": 0,
    "cpc": 0.43,
    "costPerResult": 0.43,
    "byGoalType": {
      "brand_awareness": {
        "spend": 18,
        "impressions": 4000,
        "clicks": 42,
        "reach": 0,
        "count": 1,
        "ctr": 1.05,
        "cpm": 4.5,
        "cpp": 0,
        "cpc": 0.42857142857142855
      }
    },
    "byGoalTitle": {},
    "goalPerformance": {
      "bestPerformingGoalType": { "type": "brand_awareness", "clicks": 42, "spend": 18, "ctr": 1.05 },
      "mostEfficientGoalType": { "type": "brand_awareness", "cpc": 0.43, "spend": 18 }
    },
    "count": 1,
    "firstDay": "2026-11-21T00:00:00.000Z",
    "lastDay": "2026-11-21T00:00:00.000Z"
  }
}
```

```json 400: Bad date theme={"system"}
{
  "action": "request",
  "status": "error",
  "code": 101,
  "message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
  "details": "Invalid date format. Please use ISO 8601 format (YYYY-MM-DD)."
}
```


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