> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# CountArrivals

# Package: arrivals

# Namespace: ArrivalsService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/bookings/arrivals/arrival/count-arrivals.md

## Permission Scopes:
SCOPE.ARRIVALS.READ-ARRIVALS: SCOPE.ARRIVALS.READ-ARRIVALS

## Introduction

Counts arrivals matching a filter, for dashboard tiles such as "granted today" and "denied today".

The filter accepts the same fields as Query Arrivals. To count denials, filter `status` `DENIED` with a `createdDate` lower bound; an
arrival that a site collaborator overrode is `GRANTED`, since its status moved, and is counted with the grants. To count
overrides, filter `{ "overriddenBy.wixUserId": { "$exists": true } }` with a `createdDate` lower bound.
A filter on `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`,
`planBenefit.type` or `overriddenBy.wixUserId`, fields with no index, must also have a lower bound on `createdDate`
(`$gt` or `$gte`) no more than 400 days ago, as on Query Arrivals; otherwise the call fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`.
Counting more than 100,000 arrivals fails with `TOO_MANY_TO_COUNT`; narrow the filter, for example by
`createdDate`.

---

## REST API

### Schema

```
 Method: countArrivals
 Description: Counts arrivals matching a filter, for dashboard tiles such as "granted today" and "denied today".  The filter accepts the same fields as Query Arrivals. To count denials, filter `status` `DENIED` with a `createdDate` lower bound; an arrival that a site collaborator overrode is `GRANTED`, since its status moved, and is counted with the grants. To count overrides, filter `{ "overriddenBy.wixUserId": { "$exists": true } }` with a `createdDate` lower bound. A filter on `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`, `planBenefit.type` or `overriddenBy.wixUserId`, fields with no index, must also have a lower bound on `createdDate` (`$gt` or `$gte`) no more than 400 days ago, as on Query Arrivals; otherwise the call fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`. Counting more than 100,000 arrivals fails with `TOO_MANY_TO_COUNT`; narrow the filter, for example by `createdDate`.
 URL: https://www.wixapis.com/arrivals/v1/arrivals/count
 Method: POST
 Method parameters:
   param name: filter | type: filter | description: Filter, in the same form as the `filter` of a Query Arrivals request. Empty counts all arrivals.  
 Return type: CountArrivalsResponse
  - name: count | type: integer | description: Number of arrivals matching the filter.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: CREATED_DATE_LOWER_BOUND_REQUIRED | Description: The filter uses a field with no index (`status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`, `planBenefit.type` or `overriddenBy.wixUserId`) without a lower bound on `createdDate` (`$gt` or `$gte`) no more than 400 days ago.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: TOO_MANY_TO_COUNT | Description: Number of arrivals that match the filter exceeds the server's limit of 100,000.


```

### Examples

### Count Arrivals
Counts today's granted arrivals for a dashboard tile

```curl
curl -X POST \
  'https://www.wixapis.com/arrivals/v1/arrivals/count' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "filter": {
      "status": "GRANTED",
      "createdDate": { "$gte": "2026-09-09T00:00:00Z" }
    }
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.arrivals.arrivals.countArrivals(options)
 Description: Counts arrivals matching a filter, for dashboard tiles such as "granted today" and "denied today".  The filter accepts the same fields as Query Arrivals. To count denials, filter `status` `DENIED` with a `createdDate` lower bound; an arrival that a site collaborator overrode is `GRANTED`, since its status moved, and is counted with the grants. To count overrides, filter `{ "overriddenBy.wixUserId": { "$exists": true } }` with a `createdDate` lower bound. A filter on `status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`, `planBenefit.type` or `overriddenBy.wixUserId`, fields with no index, must also have a lower bound on `createdDate` (`$gt` or `$gte`) no more than 400 days ago, as on Query Arrivals; otherwise the call fails with `CREATED_DATE_LOWER_BOUND_REQUIRED`. Counting more than 100,000 arrivals fails with `TOO_MANY_TO_COUNT`; narrow the filter, for example by `createdDate`.
 Method parameters:
   param name: options | type: CountArrivalsOptions  none  
        - name: filter | type: object | description: Filter, in the same form as the `filter` of a Query Arrivals request. Empty counts all arrivals.  
 Return type: PROMISE<CountArrivalsResponse>
  - name: count | type: integer | description: Number of arrivals matching the filter.  

 Possible Errors:
   HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: CREATED_DATE_LOWER_BOUND_REQUIRED | Description: The filter uses a field with no index (`status`, `source.identifiedBy`, `eligibilityDetails.issues`, `planBenefit.poolId`, `planBenefit.benefitKey`, `planBenefit.type` or `overriddenBy.wixUserId`) without a lower bound on `createdDate` (`$gt` or `$gte`) no more than 400 days ago.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: TOO_MANY_TO_COUNT | Description: Number of arrivals that match the filter exceeds the server's limit of 100,000.


```

### Examples

### Count today's granted arrivals
Counts the arrivals granted since midnight on September 9, 2026. A filter on status needs a createdDate lower bound no more than 400 days ago.

```javascript
import { arrivals } from "@wix/arrivals";

async function countArrivals() {
  const response = await arrivals.countArrivals({
    filter: {
      status: "GRANTED",
      _createdDate: { $gte: "2026-09-09T00:00:00Z" },
    },
  });

  return response;
}

/* Promise resolves to:
 * {
 *   "count": 137
 * }
 */

```

### countArrivals (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { arrivals } from '@wix/arrivals';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { arrivals },
  // Include the auth strategy and host as relevant
});


async function countArrivals(options) {
  const response = await myWixClient.arrivals.countArrivals(options);
};
```

---