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

# GET /Sales

> Retrieve paginated sales data linked to bookings.

Retrieve paginated sales data linked to bookings. Filter by date range to narrow results.

<ParamField header="X-API-KEY" type="string" required>Your API key</ParamField>

<ParamField query="StartDate" type="string">Filter by sale date (start). Format: `yyyy-MM-ddTHH:mm:ss.fffZ`</ParamField>
<ParamField query="EndDate" type="string">Filter by sale date (end). Format: `yyyy-MM-ddTHH:mm:ss.fffZ`</ParamField>
<ParamField query="Limit" type="integer">Number of records to return</ParamField>
<ParamField query="StartIndex" type="integer">Zero-based offset for pagination</ParamField>

<CodeGroup>
  ```shell curl theme={null}
  curl --location '[BASE_URL]/Sales?StartDate=2024-03-20T00:00:00.000Z&EndDate=2024-03-20T23:59:59.000Z&Limit=20&StartIndex=0' \
  --header 'X-API-KEY: your_api_key_here'
  ```
</CodeGroup>

Response is a paginated result with `from`, `to`, `length`, and `items` (array of SalesDataReport).

**SalesDataReport fields**

| Field              | Type    | Description                    |
| ------------------ | ------- | ------------------------------ |
| `bookingId`        | string  | NowBookIt booking ID           |
| `method`           | string  | Booking method (e.g. `online`) |
| `bookingTime`      | string  | UTC booking datetime           |
| `duration`         | integer | Duration in minutes            |
| `people`           | integer | Number of guests               |
| `serviceId`        | string  | Service ID                     |
| `serviceName`      | string  | Service name                   |
| `serviceType`      | string  | Service type                   |
| `notes`            | string  | Booking notes                  |
| `lastModifiedDate` | string  | UTC last modified datetime     |
| `customer`         | object  | Customer details               |
| `tables`           | array   | Assigned tables                |
| `tags`             | array   | Booking tags                   |
| `status`           | object  | `{ statusType, code, name }`   |
| `saleDetail`       | object  | POS sale data — see below      |

**saleDetail fields**

| Field                 | Type   | Description            |
| --------------------- | ------ | ---------------------- |
| `transactionId`       | string | POS sale ID            |
| `transactionDateTime` | string | UTC close time         |
| `storeName`           | string | Store/venue name       |
| `posName`             | string | POS system name        |
| `posId`               | string | POS system ID          |
| `staffId`             | string | Staff member ID        |
| `staffName`           | string | Staff member name      |
| `total`               | number | Total amount (dollars) |
| `totalExTax`          | number | Total excluding tax    |
| `tax`                 | number | Tax amount             |
| `discount`            | number | Discount amount        |
| `tipAmount`           | number | Tip amount             |
| `status`              | string | Sale status            |
| `actualStartTime`     | string | Actual start time      |
| `actualEndTime`       | string | Actual end time        |
| `payments`            | array  | Payment records        |
| `items`               | array  | Line items             |

**Example 200 Response**

```json theme={null}
{
  "from": 0,
  "to": 1,
  "length": 1,
  "items": [
    {
      "bookingId": "abc-123",
      "method": "online",
      "bookingTime": "2024-03-20T19:00:00Z",
      "duration": 90,
      "people": 4,
      "serviceId": "svc-101",
      "serviceName": "Dinner Service",
      "status": { "statusType": "standard", "code": "COMPLETED", "name": "Completed" },
      "saleDetail": {
        "transactionId": "pos-sale-9981",
        "transactionDateTime": "2024-03-20T20:45:00Z",
        "storeName": "Main Venue",
        "total": 185.00,
        "totalExTax": 168.18,
        "tax": 16.82,
        "payments": [{ "type": "EFTPOS", "amount": 185.00, "status": "APPROVED" }],
        "items": [{ "productName": "Wagyu Steak", "category": "food", "quantity": 2, "unitPrice": 65.00 }]
      }
    }
  ]
}
```

| Status | Description                         |
| ------ | ----------------------------------- |
| `200`  | Sales returned                      |
| `400`  | Filter dates null                   |
| `400`  | `StartDate` invalid format          |
| `400`  | `EndDate` invalid format            |
| `400`  | API key not associated with a venue |
| `400`  | `No Venue Subscribed to your App.`  |
| `401`  | X-API-KEY missing or invalid        |


## OpenAPI

````yaml GET /Sales
openapi: 3.0.4
info:
  title: NowBookIt IPOS Partner API
  description: >-
    REST API for integrating your POS or external system with NowBookIt's
    reservation, sales, and gift card platform.
  version: v1
  contact:
    email: platform.integrations@nowbookit.com
servers:
  - url: https://ipos.dev.nowbookit.com
    description: Development
  - url: https://ipos.nowbookit.com
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /Sales:
    get:
      tags:
        - Sales
      summary: List Sales
      operationId: listSales
      parameters:
        - name: StartDate
          in: query
          description: >-
            The Sales Transactions Start Date. Format:
            'yyyy-MM-ddTHH:mm:ss.fffZ'
          required: true
          schema:
            type: string
        - name: EndDate
          in: query
          description: 'The Sales Transactions End Date. Format: ''yyyy-MM-ddTHH:mm:ss.fffZ'''
          required: true
          schema:
            type: string
        - name: Limit
          in: query
          description: Max number of records to return, default is 100, max is 100.
          schema:
            maximum: 100
            minimum: 1
            type: integer
            format: int32
        - name: StartIndex
          in: query
          description: >-
            Number of matching records to skip before returning the matches,
            default is 0.
          schema:
            type: integer
            format: int32
        - name: X-API-KEY
          in: header
          description: API Key authentication header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Get paginated sales data with booking summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesDataReportPaginatedResult'
        '500':
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SalesDataReportPaginatedResult:
      type: object
      properties:
        from:
          type: integer
          format: int64
        to:
          type: integer
          format: int64
        length:
          type: integer
          format: int64
        items:
          type: array
          items:
            $ref: '#/components/schemas/SalesDataReport'
          nullable: true
      additionalProperties: false
    SalesDataReport:
      type: object
      properties:
        bookingId:
          type: string
          nullable: true
        method:
          type: string
          nullable: true
        bookingTime:
          type: string
          nullable: true
        duration:
          type: integer
          format: int32
        people:
          type: integer
          format: int32
        customer:
          $ref: '#/components/schemas/BookingModelCustomer'
        tables:
          type: array
          items:
            $ref: '#/components/schemas/BookingTable'
          nullable: true
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
          nullable: true
        status:
          $ref: '#/components/schemas/BookingStatus'
        notes:
          type: string
          nullable: true
        serviceId:
          type: string
          nullable: true
        lastModifiedDate:
          type: string
          nullable: true
        serviceName:
          type: string
          nullable: true
        serviceType:
          type: string
          nullable: true
        saleDetail:
          $ref: '#/components/schemas/SaleDetail'
      additionalProperties: false
    BookingModelCustomer:
      type: object
      properties:
        id:
          type: string
          description: The NBI Customer unique Id.
          nullable: true
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
        company:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        phone:
          type: string
          description: Phone including international code.
          nullable: true
        address:
          $ref: '#/components/schemas/Address'
        phoneNational:
          type: string
          nullable: true
        phone2:
          type: string
          nullable: true
        birthdayDate:
          type: integer
          format: int32
          nullable: true
        birthdayMonth:
          type: integer
          format: int32
          nullable: true
        birthdayYear:
          type: integer
          format: int32
          nullable: true
        notes:
          type: string
          nullable: true
        noShowCount:
          type: integer
          format: int32
          nullable: true
        tags:
          type: array
          items:
            $ref: '#/components/schemas/CustomerTag'
          nullable: true
        subscribed:
          type: boolean
          description: The Customer Email Subscription status
        lastModifiedDate:
          type: string
          nullable: true
      additionalProperties: false
    BookingTable:
      type: object
      properties:
        tableId:
          type: string
          nullable: true
        tableName:
          type: string
          nullable: true
        sectionId:
          type: string
          nullable: true
        sectionName:
          type: string
          nullable: true
      additionalProperties: false
    Tag:
      type: object
      properties:
        tagType:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
      additionalProperties: false
    BookingStatus:
      type: object
      properties:
        statusType:
          type: string
          nullable: true
        code:
          type: string
          description: The Booking Status Code.
          nullable: true
        name:
          type: string
          description: The Booking Status string.
          nullable: true
      additionalProperties: false
    SaleDetail:
      type: object
      properties:
        transactionId:
          type: string
          nullable: true
        transactionDateTime:
          type: string
          format: date-time
          nullable: true
        storeName:
          type: string
          nullable: true
        posName:
          type: string
          nullable: true
        posId:
          type: string
          nullable: true
        staffId:
          type: string
          nullable: true
        staffName:
          type: string
          nullable: true
        discount:
          type: number
          format: double
          nullable: true
        total:
          type: number
          format: double
        tax:
          type: number
          format: double
          nullable: true
        totalExTax:
          type: number
          format: double
        tipAmount:
          type: number
          format: double
          nullable: true
        status:
          type: string
          nullable: true
        actualStartTime:
          type: string
          format: date-time
          nullable: true
        actualEndTime:
          type: string
          format: date-time
          nullable: true
        payments:
          type: array
          items:
            $ref: '#/components/schemas/SalePayment'
          nullable: true
        items:
          type: array
          items:
            $ref: '#/components/schemas/SaleReportItem'
          nullable: true
      additionalProperties: false
    Address:
      type: object
      properties:
        line1:
          type: string
          nullable: true
        line2:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        postalCode:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
      additionalProperties: false
    CustomerTag:
      type: object
      properties:
        id:
          type: string
          nullable: true
        identifier:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
      additionalProperties: false
    SalePayment:
      type: object
      properties:
        terminalId:
          type: string
          nullable: true
        paymentTransactionId:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        surchargeAmount:
          type: number
          format: double
          nullable: true
        tipAmount:
          type: number
          format: double
          nullable: true
        amount:
          type: number
          format: double
          nullable: true
        status:
          type: string
          nullable: true
      additionalProperties: false
    SaleReportItem:
      type: object
      properties:
        sku:
          type: string
          nullable: true
        productId:
          type: string
          nullable: true
        productName:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        discountAmount:
          type: number
          format: double
          nullable: true
        quantity:
          type: number
          format: double
        unitPrice:
          type: number
          format: double
          nullable: true
        unitPriceExTax:
          type: number
          format: double
          nullable: true
        unitTax:
          type: number
          format: double
          nullable: true
        barcode:
          type: string
          nullable: true
        category:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````