---
title: "aid_receipts_rid_get"
method: GET
path: "/accounts/{aid}/receipts/search"
tags: ["receipts"]
---

# aid_receipts_rid_get

`GET /accounts/{aid}/receipts/search`

Get receipts matching receipt_id (POS id)

scopes:
- admin:receipts
- read:receipts

## Path parameters

- `aid` string, ^[PT]{1}\d{8}$, required

## Query parameters

- `receipt_id` string, required

## Response `200`

Receipt collection

- object
  - `receipts` Receipt[]
    - `id` string, uuid — An UUID that uniquely identifies the resource
    - `created_at` string, date-time — The date-time when the resource was created
    - `created_by` string — The ID of the user/client created the resource
    - `updated_at` string, date-time — The date-time when the resource was last updated
    - `deleted_by` string — The ID of the user/client created the resource
    - `deleted_at` string, date-time
    - `discounts` DiscountRefs[] — List all discounts referenced in discount_lines
      - `id` string, uuid — An UUID that uniquely identifies the resource
      - `created_at` string, date-time — The date-time when the resource was created
      - `created_by` string — The ID of the user/client created the resource
      - `updated_at` string, date-time — The date-time when the resource was last updated
      - `deleted_by` string — The ID of the user/client created the resource
      - `deleted_at` string, date-time
      - `campaign_id` string — The campaign the rule belongs to
      - `active` boolean — the discount is active and can be available for purchase (if given to any or all customers)
      - `private` boolean — the discount will be excluded from public discount collection (GET /discounts/public/rules).
      - `updated_by` string — The ID of the user/client that last updated the resource
      - `type` 'item' | 'receipt' — The discount base type * `receipt` discount is given on receipt * `item` discount is given to items
      - `name` string
      - `receipt_text` string — Text that should be used when displaying the discount, e.g. on receipt
      - `visible_from` string, date-time — Make the discount visible to the customer from given date. Default behavior is to only return discount to the customer where the current time is between purchase_from and purchase_to
      - `description` string
      - `limitation` Limitation
        - `dynamic_purchase_to_days` number — Limit the `purchase_to` to the time added to a customer + the days The customer discount rule `purchase_to` will be set to the minimum of `requirement.purchase_to` and `now + limitation.dynamic_purchase_to_days`
        - `discount_activation` object[] — Dynamically control if the discount should be active.
          - `type` 'deactivate_if_discount_active', required — - `deactivate_if_discount_active`: The discount is deactivated if the value match the `id` of another active discount available for the purchase
          - `value` string, required — Value given the type
        - `discount_hours` object — Limit the discount to hours of the day
          - `timezone` string — The timezone identifier for the hour start/end, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for examples. DST is handled when using a Timezone with DST.
          - `hours` object[], required — an array of periods, day and time when discount will be available. Multiple periods for one day is accepted. Any hour of purchase is accepted if the array is empty.
            - `day` 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun', required
            - `start` string, required
            - `end` string, required
        - `discount_reward_usage` integer — Limit the number of rewards to be given in a purchase where multiple receipt items match the requirement
        - `discount_combination` -1 | 0 — Limit how many other discounts can be combined in a purchase where multiple discounts are applicable.
        - `discount_eligible` 'item_eligible_for_discount' | 'item_eligible_for_discount_no_discount' | 'receipt_no_discount' — Limit what items in the purchase is eligible for this discount
        - `discount_repeat_usage` integer — Limit how many purchases the discount can be used
        - `stamp_expire_days` integer — Number of days between first and last (exceeding count) stamp where reward will be given
        - `blacklist` Item[] — items not eligible for discount.
          - `id` string
          - `group_id` string
      - `requirement` Requirement, required — Discount base requirement
        - `customer` CustomerRequirement
          - `addresses` object[] — Require customer to have one or more addresses matching the properties. All properties defined must match a single address.
            - `country` string[]
            - `postal_code` string[]
            - `postal_place` string[]
            - `custom_type` string[]
            - `type` string[]
          - `company` object — Require customer to be a company matching all properties defined.
            - `bussiness_name` string[]
            - `department` string[]
            - `industry` string[]
            - `number_of_employees` string[]
            - `organization_number` string[]
            - `website` string[]
          - `date_of_birth` string[]
          - `enrolled_by` object
            - `type` string[]
            - `value` string[]
          - `favorite_store` string[]
          - `first_name` string[]
          - `gender` string[]
          - `last_name` string[]
          - `marketing_consent` object
            - `email` object
              - …
            - `sms` object
              - …
          - `status` string[] — limit discount to only receipt where customer status is included in the receipt and match one of the status values required by the discount
          - `term` object
            - `id` string[]
          - `type` string[]
          - `attributes` object — Limit discount to only receipt where customer attributes are included and match one of the values required by the discount
        - `item` object
          - `quantity` number — minimum number of items
          - `mixes` ItemMixProperty[] — Required mix items for the discount. A purchase must include `all` the items to fulfill the `item.mixes` requirement.
            - `items` object[] — Acceptable items for the mix "item" (`any`). No wildcard `*` is accepted.
              - …
            - `quantity` number, required — minimum quantity of given item (match by id or group) by the mix
            - `reward_eligible` boolean, required — The item will be eligible for discount when calculating the reward Example: The value of `discount_item_new_price` reward will be the total price of all items in a mix that has the applicable set to `true`
          - `items` Item[] — Required items for the discount A purchase can include `any` of the items to fulfill the `item.items` requirement. The values contols if the reward is given on the receipt (all items) or if they are limited to matching items **Receipt** - A rule with no items or items with only wildcard items **Item** - A rule with one or more items (except wildcard) - A rule with a single item `{"id": "ANY_ITEM"}` in items
            - `id` string
            - `group_id` string
        - `store_ids` string[] — `DEPRECATED`: [@since 2021-09-01](#section/Changelog/2021-09-01)
        - `gross_amount` integer — Minimum gross amount on purchase. Monetary amount in smallest unit for the currency
        - `net_amount` integer — Minimum net amount on purchase (amount after existing discounts). Monetary amount in smallest unit for the currency
        - `currencies` union[] — List of valid currencies, or `[{"anything-but": ["NOK"]}]` to exclude currencies. Currency format is the three-character [ISO-4217 currency](https://en.wikipedia.org/wiki/ISO_4217).
          - union
            - object
              - …
            - string
        - `stamp` integer — Stamp count required for the reward
        - `discount_code` string — A code required for the reward. The purchase must include the promotion code in the `receipt.discount_code` property or as an `receipt.item` where the `item.id` is the promotion code.
        - `store` StoreRequirement
          - `id` string[]
          - `name` string[] — name of the store, aka trade name of the store
          - `business_name` string[] — Official name of the person or entity that owns the store.
          - `address` object — Require customer to have one or more addresses matching the properties. All properties defined must match a single address.
            - `country` string[]
            - `postal_code` string[]
            - `postal_place` string[]
          - `chain` string[]
          - `email` string[]
          - `gln` string[]
          - `organization_number` string[]
          - `phone_number` string[]
          - `mcc` string[] — A four-digit Merchant Category Code (MCC) for the store [ISO 18245:2003](https://www.iso.org/standard/33365.html)
          - `mcc_ranges` object[] — Ranges of MCC codes to accept the discount for. Multiple ranges are possible. Prefer `mcc` if not a range.
            - `start` string, iso-18245, required
            - `end` string, iso-18245, required
          - `bax` string[] — Merchant number associated with the stores payment terminal
          - `terminal_id` string[] — Id to a specific point-of-sale (POS) terminal or workstation
        - `purchase_from` string, date-time, required
        - `purchase_to` string, date-time, required
      - `reward` Reward, required
        - `type` 'discount_amount' | 'discount_percent' | 'discount_item_new_price' | 'discount_item_quantity' | 'discount_item_percent' | 'discount_mix_new_price' | 'discount_debit', required — Reward Type: * `discount_amount` - value as discount * `discount_percent` - value percentage of gross amount as discount * `discount_item_new_price` - discount as old price subtracted with value * `discount_item_quantity` - number of items to get as discount (free) * `discount_item_percent` - percent discount of the cheapest item (stamp) as discount * `discount_debit` - value as discount, remaining amount after a purchase will be available in future purchases (if not limited by usage) * `discount_mix_new_price` - discount as old mix total value (reward_eligible=true) subtracted with value
        - `value` union, required — The reward value, unit of the value is resolved from the reward type Examples: - Percent: 10.5 - Amount: 10000 (amount in smallest unit for the currency) - Quantity: 1
          - integer
          - number
        - `values` object[] — Reward values that is used to "override" the reward value for matching items. Add support for having a single rule for multiple items that gives different reward value for each items > Only available for rules where `requirements.item.items` is non-empty.
          - `items` object[], required — `id` or `group_id` is required, if both are included both id and group id must match
            - `id` string
            - `group_id` string
          - `value` number, required
        - `base` 'net' | 'gross' — Let the discount reward be calculated from net or gross price. Not applicable for `discount_item_new_price` *Example*: item A à 100,- NOK with existing rebate of 20,- - 10% net reward is 10% of 80,- : 8,- - 10% gross reward is 10% of 100,- : 10,- * *net*: `gross - "any existing discounts"` * *gross*: `"total expense amount, including taxes"`
        - `effect` 'discount' | 'bonus' — How the reward will be added to the receipt. - `discount`: the reward will be applied as a discount directly on the receipt - `bonus`: the reward will be accumulated as bonus on the customers discount balance
      - `metadata` object — Additional metadata about the discount Metadata prefixed with `dintero:exclude:public:` will be excluded when listing the rules from the public endpoint - [GET /v1/accounts/{aid}/discounts/public/rules](/discounts-api/rules/aid_discounts_public_get) and included in all other endpoints that returns discount rules
      - `links` object[] — Links to resources related to the discount
        - `href` string, uri, required — The URL of the link.
        - `rel` string — Specifies the relationship between the discount and the link Following `rel` values are reserved for specific usage - thumbnail_discount_image: link to discount image - medium_discount_image: link to discount image - large_discount_image: link to discount image - webshop: link to site where the discount may be used
        - `type` string — Specifies the media type of the link
      - `refs` object[] — References to instances of the discount, a customer can have multiple instances of the same discount, this propery list the instances used
        - `id` string — reference id to the customer instance of the discount
        - `stamp` integer — number of stamp collected by the discount when used on the receipt.
        - `amount` integer — reward amount for the the ref used, monetary amount in smallest unit for the currency
        - `bonus` integer — reward bonus for the ref used
        - `statistics` object — statistics for given discount instance (ref)
          - `amount` integer — total amount discount given, inclusive discount amounts from previous purchases where the the discount was used
          - `bonus` integer — total bonus given, inclusive bonus from previous purchases where the the discount was used
          - `debit_balance` integer — the discount debit balance, only applicable if discount reward type is `discount_debit`
          - `stamp` integer — total stamp collected by the discount, inclusive previous purchases
          - `usage` integer — total times the discount reward was used, inclusive discount usage from previous purchases
        - `items` object[] — Items receiving the discount, list what items received an discount_lines entry for this discount
          - `line_id` integer — item line_id
          - `bonus` integer — bonus for given line_id
          - `amount` integer — discount amount for given line_id monetary amount in smallest unit for the currency
        - `usage` integer — number of times the ref was used
    - `store` Store, required
      - `id` string, required
      - `name` string — name of the store, aka trade name of the store
      - `business_name` string — Official name of the person or entity that owns the store.
      - `address` Address
        - `address_line` string, required
        - `address_line_2` string
        - `postal_code` string
        - `postal_place` string, required
        - `country` string, iso-3166-1, required — ISO 3166-1 country code
      - `chain` string
      - `email` string
      - `gln` string
      - `organization_number` string
      - `phone_number` string
      - `mcc` string, iso-18245 — A four-digit Merchant Category Code (MCC) for the store [ISO 18245:2003](https://www.iso.org/standard/33365.html)
      - `bax` string — Merchant number associated with the stores payment terminal
      - `terminal_id` string — Id to a specific point-of-sale (POS) terminal or workstation
      - `payout_destination_id` string — The payout destination id for the merchant of record, i.e. the seller responsible for the transaction. Required when `seitatech.in_person` payment is enabled.
    - `items` ReceiptItem[]
      - `id` string
      - `groups` object[]
        - `id` string, required — group id
        - `name` string — group name
      - `quantity` number
      - `unit` string — unit type
      - `description` string
      - `description_alias` string
      - `net_amount` integer — Monetary amount in smallest unit for the currency after discounts for items in this line
      - `net_amount_dwh` string — Monetary amount in smallest unit for the currency after discounts for items in this line in decimal
      - `gross_amount` integer — Monetary amount in smallest unit for the currency before discounts for items in this line
      - `gross_amount_dwh` string — Monetary amount in smallest unit for the currency before discounts for items in this line in decimal
      - `unit_gross_price` integer
      - `tax_percent` number
      - `line_id` integer
      - `barcode` string
      - `cost_price` integer — The purchase price the company pay for item
      - `voided` boolean
      - `scale_item` boolean — The price is calculated from scale (weight/volume).
      - `eligible_for_discount` boolean
      - `included_in_total_discount` boolean
      - `price_has_been_keyedIn` boolean
      - `discount_has_been_keyedIn` boolean
      - `is_return_item` boolean
      - `is_linked_item` boolean
      - `is_virtual_product` boolean
      - `is_changed` boolean — Discount applied to gross amount
      - `salesperson_id` string — Id of the sales person if other then the operator
      - `salesperson_name` string — Name of the sales person
      - `serial_id` string
      - `comment` string
      - `infocode_lines` InfoCodeItem[]
        - `line_id` integer
        - `amount` integer — Monetary amount in smallest unit for the currency
        - `amount_dwh` string — Monetary value with decimal
        - `infocode_id` string
        - `sub_infocode_id` string
        - `information` string
        - `input_type` integer
        - `withdrawal_from_stock` boolean
      - `tax_lines` TaxItem[]
        - `amount` integer — Monetary amount in smallest unit for the currency
        - `amount_dwh` string — Monetary value with decimal
        - `exempt` boolean
        - `included_in_price` boolean
        - `percentage` number
        - `tax_basis` integer — Total monetary value without tax
        - `tax_basis_dwh` string — Total monetary value without tax in decimal
        - `tax_code` string
        - `tax_group` string
      - `dimension` Dimension — Identify item attributes, such as size and color
        - `color` string
        - `size` string
        - `style` string
        - `config` string
        - `variant` string
      - `discount_lines` DiscountItem[]
        - `amount` integer — Monetary amount in smallest unit for the currency
        - `percentage` number — Optional, set if the amount given was from a percentage discount
        - `discount_type` 'customer' | 'periodic' | 'manual' | 'loyalty' | 'total' | 'employee' | 'external'
        - `discount_id` string
        - `description` string
        - `line_id` integer
      - `bonus_lines` BonusItem[]
        - `bonus` integer — Bonus in smallest unit for the currency
        - `percentage` number — Optional, set if the bonus given was from a percentage discount
        - `discount_type` 'customer' | 'periodic' | 'manual' | 'loyalty' | 'total' | 'employee' | 'external'
        - `discount_id` string
        - `description` string
        - `line_id` integer
      - `extra_info` ExtraInfo[]
        - `key` string
        - `value` string
        - `value_type` 'string' | 'integer' | 'number' | 'boolean' | 'datetime'
    - `receipt_id` string, required
    - `delivery` object — Details for the delivery
      - `first_name` string
      - `last_name` string
      - `email` string
      - `phone_number` string, ^\+?[1-9]\d{1,14}$ — A phone number in E.164 number formatting.
      - `address` Address
        - `address_line` string, required
        - `address_line_2` string
        - `postal_code` string
        - `postal_place` string, required
        - `country` string, iso-3166-1, required — ISO 3166-1 country code
    - `customer_id` string — The customer id identifying the customer. (must not have trailing or leading spaces)
    - `customer` object — The customer, owner of the receipt
      - `gender` string
      - `first_name` string
      - `last_name` string
      - `email` string
      - `metadata` object — A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format.
      - `phone_number` string, ^\+?[1-9]\d{1,14}$ — A phone number in E.164 number formatting.
      - `addresses` object[]
        - `address_line` string, required
        - `address_line_2` string
        - `postal_code` string
        - `postal_place` string, required
        - `country` string, iso-3166-1, required — ISO 3166-1 country code
        - `type` string
        - `custom_type` string
      - `pays_tax` boolean — Is customer required to pay tax
      - `date_of_birth` string, date, nullable
      - `enrolled_by` object — discribe where customers was recruit from
        - `type` string — Enrollment type, e.g. `url`, `store`, `qr_code`, any string
        - `value` string, nullable, required
      - `favorite_store` string, nullable — customer favorite store
      - `company` object — Company details, supported when type is Company
        - `organization_number` string — Companys identification number
        - `bussiness_name` string, required
        - `department` string — companys department
        - `industry` string
        - `website` string
        - `number_of_employees` string
      - `marketing_consent` object — Customers consent for marketing in different channels
        - `sms` object
          - `consent` boolean
          - `updated_at` string, date-time — The date-time when the resource was last updated:
        - `email` object
          - `consent` boolean
          - `updated_at` string, date-time — The date-time when the resource was last updated:
      - `status` string — Status of the customer
      - `term` object — The term and condition accepted by the customer
        - `id` string
      - `type` 'customer' | 'company' | 'contact' | 'employee' | 'other' — Describe type of an customer. Company only allowed to be set when the type is "Company"
      - `token` object — Token used to identify the customer
        - `token_id` string — Id of token identifying the customer
        - `value` string — Token value that combined with type was used to identify the customer
        - `type` string — The token issuer
    - `gross_amount` integer — Monetary amount in smallest unit for the currency before discounts
    - `gross_amount_dwh` string — Monetary amount in smallest unit for the currency before discounts with decimal
    - `net_amount` integer — Monetary amount in smallest unit for the currency after discounts
    - `net_amount_dwh` string — Monetary value in smallest unit for the currency after discounts with decimal
    - `round_off_to_coin` integer
    - `currency` string — The three-character ISO-4217 currency. https://en.wikipedia.org/wiki/ISO_4217
    - `purchase_at` string, date-time, required — The date and time for the receipt purchase
    - `order_number` string
    - `transaction_date` string, date-time
    - `amount_due` integer — How much more need to be paid before the transaction is completed. Monetary amount in smallest unit for the currency
    - `amount_due_dwh` string — Monetary value with decimal
    - `no_of_items` number — How many items did the customer buy
    - `is_changed` boolean — Discount applied to gross amount
    - `transaction_id` string
    - `total_discount` integer
    - `total_manual_discount_amount` integer — Monetary amount in smallest unit for the currency
    - `total_manual_percentage_discount` integer
    - `operator_id` string — POS user
    - `operator_name` string — Name of the POS user
    - `salesperson_id` string — ID of the POS user
    - `salesperson_name` string
    - `entry_status` 'None' | 'Voided' | 'Posted' | 'Concluded' | 'Cancelled' | 'OnHold' | 'Training' | 'Reprinted' — Status for the transaction
    - `comment` string
    - `tax_lines` TaxItem[] — Breakdown of the tax to different tax groups
      - `amount` integer — Monetary amount in smallest unit for the currency
      - `amount_dwh` string — Monetary value with decimal
      - `exempt` boolean
      - `included_in_price` boolean
      - `percentage` number
      - `tax_basis` integer — Total monetary value without tax
      - `tax_basis_dwh` string — Total monetary value without tax in decimal
      - `tax_code` string
      - `tax_group` string
    - `payments` PaymentItem[]
      - `line_id` integer
      - `amount` integer — Monetary amount in smallest unit for the currency
      - `type_id` string
      - `token_id` string — Id of the token
      - `token_type` string — The token issuer
      - `description` string
      - `voided` boolean
      - `card_info` CardInfo
        - `balance_amount` integer — Monetary amount in smallest unit for the currency
        - `card_amount` integer — Monetary amount in smallest unit for the currency
        - `issuer_id` integer
        - `issuer_name` string
        - `session_id` string
        - `terminal_id` string
        - `card_number` string
        - `card_type` string
        - `receipt` string
      - `reference_id` string
      - `infocode_lines` InfoCodeItem[]
        - `line_id` integer
        - `amount` integer — Monetary amount in smallest unit for the currency
        - `amount_dwh` string — Monetary value with decimal
        - `infocode_id` string
        - `sub_infocode_id` string
        - `information` string
        - `input_type` integer
        - `withdrawal_from_stock` boolean
    - `infocode_items` InfoCodeItem[]
      - `line_id` integer
      - `amount` integer — Monetary amount in smallest unit for the currency
      - `amount_dwh` string — Monetary value with decimal
      - `infocode_id` string
      - `sub_infocode_id` string
      - `information` string
      - `input_type` integer
      - `withdrawal_from_stock` boolean
    - `receipt_text` string
    - `discount_code` string[]
    - `extra_info` ExtraInfo[]
      - `key` string
      - `value` string
      - `value_type` 'string' | 'integer' | 'number' | 'boolean' | 'datetime'
  - `starting_after` string

## Other responses

- `401` — Access forbidden, invalid JWT token was used
- `403` — Forbidden
- `500` — Unexpected Error

---

[API](https://skmtc.net/dintero/apis/account-management-api.md) · [All operations](https://skmtc.net/dintero/apis/account-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dintero/account-management-api/versions/9b83a4199008/schema)
