curl --request POST \
--url https://api.decodahealth.com/inventory/members/update-discount \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"issuedDiscountId": "<string>",
"quantity": 123,
"expiryDate": "2023-11-07T05:31:56Z",
"comment": "<string>"
}
'{
"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"
}
]
}Update a member’s discount.
curl --request POST \
--url https://api.decodahealth.com/inventory/members/update-discount \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TENANT: <tenant>' \
--data '
{
"issuedDiscountId": "<string>",
"quantity": 123,
"expiryDate": "2023-11-07T05:31:56Z",
"comment": "<string>"
}
'{
"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"
}
]
}The tenant you are making this request on behalf of
Your api key
Successful Response
Unique identifier for the discount bank entry
ID of the member
ID of the membership discount
Quantity remaining in the bank
Details of the membership discount
Show child attributes
ID of the membership this discount belongs to
Unique identifier for the membership discount
ID of the specific item for this discount (includes packages)
Category name for items in this discount (references category.name)
Whether this discount applies to physical items (True), services (False), or neither (None)
Discount percentage
Discount amount in cents
Credit amount in cents
Quantity for this discount
Whether to rollover unused quantities
Days until rollover items expire
Whether rollover items never expire
Group for this discount
Whether the discount is archived
Item that has been used from this discount (includes packages)
Show child attributes
Name of the item
Price of the item in cents
Unique identifier for the item
Optional brand name of the item
Optional description of the item
Category name (references category.name)
Unit of measurement for the item
AMPOULES, APPLICATORS, BOTTLES, BOXES, CAPSULES, CUPS, DOSES, G_PER_ML, GRAMS, IU, IU_PER_ML, OUNCES, FLUID_OUNCES, KG, KITS, LITERS, MCG, MG, MG_PER_ML, ML, MMOL, MICROGRAM_PER_ML, PACKS, PAIRS, PATCHES, PERCENTAGE, PIECES, POUCHES, ROLLS, SACHETS, SHEETS, SPRAYS, STRIPS, SYRINGES, TABLETS, TABLETS_PER_DAY, TESTS, TUBES, UNITS, VIALS, TREATMENTS, SESSIONS, PULSES, JOULES, CENTIMETERS, THREAD_COUNT, INJECTIONS, WRINKLE_UNITS, POUNDS, FEET, INCHES Whether the item is physical
Whether the item is archived
Optional internal notes for the item
Whether the item is subject to taxes
Optional sort order for the item
Whether custom pricing is allowed for this item
Type of item (PRODUCT, MEDICATION, etc.)
ITEM, PRODUCT, MEDICATION, SERVICE, PACKAGE, MEMBERSHIP When this bank entry expires
Number of times this discount has been used
When the bank entry was created
When the bank entry was last updated
Items that have been used from this bank entry
Show child attributes
Identifier of the charge this item is associated with
Quantity of the item being charged
Price of the item in cents
Unique identifier for the charge item
Optional unique identifier for the item
Name of the item (None for items with associated inventory item)
Description of the item
Discount amount for the item
Discount percentage for the item
Reason for discount
Unique identifier for the sold package usage
Quantity to bank for later use
ID of banked item being used (for tracking usage)
Unique identifier for the specific issued discount instance used
Unique identifier for the provider who sold the item
Tax amount for the item in cents
Unique identifier for the pricing for the item
Optional list of shipment IDs to reduce the stock quantity of
Packages that have been used from this bank entry
Show child attributes
Package ID that was sold
Patient ID who purchased the package
Charge item ID associated with the package purchase
Status of the sold package
USED, ACTIVE, CANCELLED Date the package was created
Unique identifier for the sold package
Details of the package
Show child attributes
Name of the package
Price of the package in cents
Unique identifier for the package
Optional description of the package
Whether the package is archived
Optional internal notes for the package
Items included in the package
Show child attributes
Package ID this item belongs to
Item ID for this package item
Price of the item in the package in cents
Unique identifier for the package item
Quantity of the item in the package
Details of the item
Show child attributes
Name of the item
Price of the item in cents
Unique identifier for the item
Optional brand name of the item
Optional description of the item
Category name (references category.name)
Unit of measurement for the item
AMPOULES, APPLICATORS, BOTTLES, BOXES, CAPSULES, CUPS, DOSES, G_PER_ML, GRAMS, IU, IU_PER_ML, OUNCES, FLUID_OUNCES, KG, KITS, LITERS, MCG, MG, MG_PER_ML, ML, MMOL, MICROGRAM_PER_ML, PACKS, PAIRS, PATCHES, PERCENTAGE, PIECES, POUCHES, ROLLS, SACHETS, SHEETS, SPRAYS, STRIPS, SYRINGES, TABLETS, TABLETS_PER_DAY, TESTS, TUBES, UNITS, VIALS, TREATMENTS, SESSIONS, PULSES, JOULES, CENTIMETERS, THREAD_COUNT, INJECTIONS, WRINKLE_UNITS, POUNDS, FEET, INCHES Whether the item is physical
Whether the item is archived
Optional internal notes for the item
Whether the item is subject to taxes
Optional sort order for the item
Whether custom pricing is allowed for this item
Type of item (PRODUCT, MEDICATION, etc.)
ITEM, PRODUCT, MEDICATION, SERVICE, PACKAGE, MEMBERSHIP Category name (references category.name)
Date the package was updated