Skip to main content
Version: Node SDK

Update Usage

Increments usage count on a License

Code Sample

import { Salable } from '@salable/node-sdk';

const salable = new Salable('{{API_KEY}}', 'v2');

await salable.usage.updateLicenseUsage({
granteeId: 'grantee_1',
planUuid: 'bc4e485c-cdd6-4cd2-9d61-7d0f6a6ce53c',
increment: 1,
idempotencyKey: '63f37318-c5a5-4e56-b338-cadccc7162e7'
});

Parameters

options (required)

Type: UpdateLicenseUsageOptions

OptionTypeDescriptionRequired
granteeIdstringThe granteeId of the license
planUuidstringThe UUID of the plan the license belongs to
incrementstringThe value to increment the usage on the license
idempotencyKeystringA unique key for idempotent requests

Return Type

Returns void