Skip to main content
GET
/
inventory
/
members
/
{member_id}
/
issued-discounts
Get Issued Discounts
curl --request GET \
  --url https://api.decodahealth.com/inventory/members/{member_id}/issued-discounts \
  --header 'API-KEY: <api-key>' \
  --header 'TENANT: <tenant>'
[
  {
    "id": "<string>",
    "memberId": "<string>",
    "membershipDiscountId": "<string>",
    "quantityRemaining": 123,
    "membershipDiscount": {
      "membershipId": "<string>",
      "id": "<string>",
      "itemId": "<string>",
      "itemCategory": "<string>",
      "isPhysical": true,
      "discountPercentage": 123,
      "discountAmount": 123,
      "creditAmount": 123,
      "quantity": 123,
      "rollover": false,
      "rolloverExpiryDays": 123,
      "neverExpire": false,
      "group": "<string>",
      "isArchived": false,
      "item": {
        "name": "<string>",
        "price": 123,
        "id": "<string>",
        "brandName": "<string>",
        "description": "<string>",
        "category": "<string>",
        "unit": "AMPOULES",
        "isPhysical": true,
        "isArchived": false,
        "internalNotes": "<string>",
        "taxable": false,
        "sortOrder": 123,
        "allowCustomPricing": false,
        "type": "PRODUCT"
      }
    },
    "expiryDate": "2023-11-07T05:31:56Z",
    "usageCount": 0,
    "createdDate": "2023-11-07T05:31:56Z",
    "updatedDate": "2023-11-07T05:31:56Z",
    "items": [
      {
        "chargeId": "<string>",
        "quantity": 123,
        "price": 123,
        "id": "<string>",
        "itemId": "<string>",
        "name": "<string>",
        "description": "<string>",
        "discountAmount": 123,
        "discountPercentage": 123,
        "discountReason": "<string>",
        "soldPackageId": "<string>",
        "bankedQuantity": 123,
        "bankedItemId": "<string>",
        "issuedDiscountId": "<string>",
        "soldByProviderId": "<string>",
        "taxAmount": 123,
        "pricingId": "<string>",
        "shipmentIds": [
          "<string>"
        ]
      }
    ],
    "packages": [
      {
        "packageId": "<string>",
        "patientId": "<string>",
        "chargeItemId": "<string>",
        "status": "USED",
        "createdDate": "2023-11-07T05:31:56Z",
        "id": "<string>",
        "package": {
          "name": "<string>",
          "price": 123,
          "id": "<string>",
          "description": "<string>",
          "isArchived": false,
          "internalNotes": "<string>",
          "items": [
            {
              "packageId": "<string>",
              "itemId": "<string>",
              "price": 123,
              "id": "<string>",
              "quantity": 123,
              "item": {
                "name": "<string>",
                "price": 123,
                "id": "<string>",
                "brandName": "<string>",
                "description": "<string>",
                "category": "<string>",
                "unit": "AMPOULES",
                "isPhysical": true,
                "isArchived": false,
                "internalNotes": "<string>",
                "taxable": false,
                "sortOrder": 123,
                "allowCustomPricing": false,
                "type": "PRODUCT"
              }
            }
          ],
          "category": "<string>"
        },
        "updatedDate": "2023-11-07T05:31:56Z"
      }
    ]
  }
]

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Path Parameters

member_id
string
required

Query Parameters

itemName
string | null
quantityRemainingMin
integer | null
quantityRemainingMax
integer | null
createdDateStart
string<date-time> | null
createdDateEnd
string<date-time> | null
expiryDateStart
string<date-time> | null
expiryDateEnd
string<date-time> | null
includeExpired
boolean
default:false

Response

Successful Response

id
string
required

Unique identifier for the discount bank entry

memberId
string
required

ID of the member

membershipDiscountId
string
required

ID of the membership discount

quantityRemaining
integer
required

Quantity remaining in the bank

membershipDiscount
MembershipDiscountDetail · object
required

Details of the membership discount

expiryDate
string<date-time> | null

When this bank entry expires

usageCount
integer
default:0

Number of times this discount has been used

createdDate
string<date-time> | null

When the bank entry was created

updatedDate
string<date-time> | null

When the bank entry was last updated

items
ChargeItem · object[] | null

Items that have been used from this bank entry

packages
SoldPackage · object[] | null

Packages that have been used from this bank entry