# Replace billing credit Fully replaces an existing Billing Credit. All fields must be provided. Endpoint: PUT /site/{siteId}/ahds/v1/billing-credit/{billingCreditId} Version: 1.0 Security: bearer ## Path parameters: - `siteId` (number, required) Site identifier - `billingCreditId` (string, required) Billing Credit unique identifier (UUID) ## Request fields (application/json): - `appliedTo` (object, required) Entity the credit is currently associated/applied to, if different from availability. - `availableTo` (object, required) Entity for which this credit is available to be applied. - `creditType` (string, required) Whether the credit is tracked as a quantity (e.g., visits) or a monetary value. Enum: "quantity", "value" - `endDate` (string, required) Date on which the credit expires, if applicable. Example: "2025-01-01" - `expiry` (object, required) Relative expiry configuration, if the credit expires after a period. - `extensions` (object, required) Vendor- or practice-specific extensions. - `isActive` (boolean, required) Whether this billing credit is currently active and usable. - `remainingAmount` (number, required) Quantity or monetary amount still available for use. - `startDate` (string, required) Date from which the credit becomes valid. Example: "2025-01-01" - `totalAmount` (number, required) Total quantity or monetary amount originally granted for this credit. - `usedAmount` (number, required) Quantity or monetary amount that has been used. - `wastedAmount` (number, required) Quantity or monetary amount that has been wasted or expired without use. - `wellnessPlanBenefitId` (string, required) Identifier of the wellness plan benefit that generated this credit, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `wellnessPlanId` (string, required) Identifier of the wellness plan that generated this credit, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `wellnessPlanMembershipCycleId` (string, required) Identifier of the membership cycle associated with this credit, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `wellnessPlanMembershipId` (string, required) Identifier of the wellness plan membership associated with this credit, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `wellnessPlanMembershipStatusPeriodId` (string, required) Identifier of the membership status period associated with this credit, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `amountType` (object, required) Classification of what the credit represents (e.g., visit count, service package, generic monetary credit). - `amountType.code` (string, required) Code value - `amountType.system` (string, required) Code system URI - `amountType.display` (string) Human-readable display - `creditCategory` (object, required) Classification of the billing credit (e.g., promotion, refund, goodwill adjustment), represented as a coded concept. - `currency` (object, required) Currency in which monetary billing credits are denominated, using a coded concept (e.g., ISO 4217). For quantity-based credits, this may be omitted. - `measurementUnit` (object, required) Unit or concept describing what the credit quantity or value represents (e.g., 'visit', 'day of boarding', 'grooming session', or a specific service/package code). ## Response 200 fields (application/json): - `appliedTo` (object, required) Entity the credit is currently associated/applied to, if different from availability. - `availableTo` (object, required) Entity for which this credit is available to be applied. - `billingCreditId` (string, required) Canonical identifier for the billing credit. Example: "123e4567-e89b-12d3-a456-426614174000" - `createdAt` (string, required) Timestamp when the billing credit was created. Example: "2025-01-01T00:00:00.000Z" - `creditType` (string, required) Whether the credit is tracked as a quantity (e.g., visits) or a monetary value. Enum: "quantity", "value" - `endDate` (string, required) Date on which the credit expires, if applicable. Example: "2025-01-01T00:00:00Z" - `expiry` (object, required) Relative expiry configuration, if the credit expires after a period. - `extensions` (object, required) Vendor- or practice-specific extensions. - `isActive` (boolean, required) Whether this billing credit is currently active and usable. - `remainingAmount` (number, required) Quantity or monetary amount still available for use. - `startDate` (string, required) Date from which the credit becomes valid. Example: "2025-01-01T00:00:00Z" - `totalAmount` (number, required) Total quantity or monetary amount originally granted for this credit. - `updatedAt` (string, required) Timestamp when the billing credit was last updated. Example: "2025-01-01T00:00:00.000Z" - `usedAmount` (number, required) Quantity or monetary amount that has been used. - `wastedAmount` (number, required) Quantity or monetary amount that has been wasted or expired without use. - `wellnessPlanBenefitId` (string, required) Identifier of the wellness plan benefit that generated this credit, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `wellnessPlanId` (string, required) Identifier of the wellness plan that generated this credit, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `wellnessPlanMembershipCycleId` (string, required) Identifier of the membership cycle associated with this credit, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `wellnessPlanMembershipId` (string, required) Identifier of the wellness plan membership associated with this credit, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `wellnessPlanMembershipStatusPeriodId` (string, required) Identifier of the membership status period associated with this credit, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `amountType` (object, required) Classification of what the credit represents (e.g., visit count, service package, generic monetary credit). - `amountType.code` (string, required) Code value - `amountType.system` (string, required) Code system URI - `amountType.display` (string) Human-readable display - `creditCategory` (object, required) Classification of the billing credit (e.g., promotion, refund, goodwill adjustment), represented as a coded concept. - `currency` (object, required) Currency in which monetary billing credits are denominated, using a coded concept (e.g., ISO 4217). For quantity-based credits, this may be omitted. - `measurementUnit` (object, required) Unit or concept describing what the credit quantity or value represents (e.g., 'visit', 'day of boarding', 'grooming session', or a specific service/package code). ## Response 400 fields ## Response 401 fields ## Response 404 fields