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

# Get receipts (synchronous)

> Returns receipt data immediately using the api_receipts mart view.



## OpenAPI

````yaml https://emerge-openapi-specs.s3.eu-central-1.amazonaws.com/query/1.21.0/openapi.json get /v1/sync/get_receipts
openapi: 3.1.0
info:
  title: Emerge Query API
  description: >-
    Privacy-first API for retrieving consented user data. Query provides
    asynchronous and synchronous endpoints for accessing search, browsing,
    YouTube, ads, and receipt data.
  contact:
    name: Emerge Support
    email: account@emergedata.ai
  version: 1.21.0
servers:
  - url: https://query.emergedata.ai
    description: Query API - Data retrieval
security: []
tags:
  - name: Query Async
    description: Asynchronous data queries with job polling
  - name: Query Sync
    description: Synchronous data queries with immediate response
  - name: Jobs
    description: Job status and management
paths:
  /v1/sync/get_receipts:
    get:
      tags:
        - Query Sync
      summary: Get receipts (synchronous)
      description: Returns receipt data immediately using the api_receipts mart view.
      operationId: endpoint_v1_sync_get_receipts_get
      parameters:
        - name: begin
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by event timestamp (start)
            title: Begin
          description: Filter by event timestamp (start)
        - name: end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by event timestamp (end)
            title: End
          description: Filter by event timestamp (end)
        - name: ingested_begin
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by ingestion timestamp (start)
            title: Ingested Begin
          description: Filter by ingestion timestamp (start)
        - name: ingested_end
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: Filter by ingestion timestamp (end), defaults to now()
            title: Ingested End
          description: Filter by ingestion timestamp (end), defaults to now()
        - name: uid
          in: query
          required: true
          schema:
            type: string
            description: Your user reference
            examples:
              - alice@yourcompany.com
            title: Uid
          description: Your user reference
        - name: category
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Category subtree to filter by
            examples:
              - /Shopping
              - /Finance/Investing
            title: Category
          description: Category subtree to filter by
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 10000
            minimum: 1
            description: Maximum number of rows to return
            default: 1000
            title: Limit
          description: Maximum number of rows to return
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Pagination cursor from previous response
            title: Cursor
          description: Pagination cursor from previous response
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReceiptsDataResponse'
              examples:
                default:
                  summary: Example response
                  value:
                    data:
                      - user_id: psub_d4e5f6789012345678901234abcdef01
                        event_id: 502938
                        timestamp: '2026-02-09T11:10:11Z'
                        ingested_at: '2026-02-09T11:12:00Z'
                        subject: Your receipt from Nike
                        retailer_name: Nike
                        receipt_currency: USD
                        total_value: 129.99
                        items:
                          - name: Nike Pegasus 42
                            quantity: 1
                            price: 129.99
                            brand: Nike
                            category: /Shopping/Apparel/Footwear
                        category: /Shopping/Apparel/Footwear
                        brands:
                          - Nike
                    count: 1
                    next_cursor: null
                    has_more: false
                    applied_ingested_end: '2026-02-12T09:10:11Z'
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                detail: Invalid token
        '404':
          description: >-
            User Not Found – the provided UID has no mapping for the requesting
            client.
          content:
            application/json:
              example:
                detail: user_not_found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearerAuth: []
components:
  schemas:
    ReceiptsDataResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ReceiptsEvent'
          type: array
          title: Data
        count:
          type: integer
          title: Count
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        has_more:
          type: boolean
          title: Has More
        applied_ingested_end:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Applied Ingested End
      type: object
      title: ReceiptsDataResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ReceiptsEvent:
      properties:
        user_id:
          type: string
          title: User Id
        event_id:
          type: integer
          title: Event Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        ingested_at:
          type: string
          format: date-time
          title: Ingested At
        subject:
          anyOf:
            - type: string
            - type: 'null'
          title: Subject
        retailer_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Retailer Name
        receipt_currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Receipt Currency
        total_value:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Value
        items:
          items:
            $ref: '#/components/schemas/ReceiptItem'
          type: array
          title: Items
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
        brands:
          items:
            anyOf:
              - type: string
              - type: 'null'
          type: array
          title: Brands
      type: object
      title: ReceiptsEvent
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      title: ValidationError
    ReceiptItem:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        quantity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Quantity
        price:
          anyOf:
            - type: number
            - type: 'null'
          title: Price
        brand:
          anyOf:
            - type: string
            - type: 'null'
          title: Brand
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
      type: object
      title: ReceiptItem
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        API token from the Control Room. Include as `Authorization: Bearer
        <token>`
      scheme: bearer

````