Home > @vsf-enterprise/sap-commerce-webservices-sdk > ConsentsApi > removeConsent

ConsentsApi.removeConsent() method

If the user consent was given, the consent is withdrawn. If consent was already withdrawn then returns consent already withdrawn error. If there is no such consent then returns not found. If the current user is an anonymous user then returns access denied error. Withdraw the user consent for a given consent code.

Signature:

removeConsent(baseSiteId: string, consentCode: string, userId: string, options?: any): Promise<import("axios").AxiosResponse<void>>;

Parameters

Parameter Type Description
baseSiteId string Base site identifier
consentCode string Consent code.
userId string User identifier or one of the literals : &#39;current&#39; for currently authenticated user, &#39;anonymous&#39; for anonymous user
options any Override http request option.

Returns:

Promise<import("axios").AxiosResponse<void>>

Exceptions

{RequiredError} ConsentsApi