Skip to main content

Delete

Basic​

This method deletes a resource by its unique identifier.

Usage​

const response = await services.userService
.id("79c8c567b05e986509d55733a")
.subs("statusHistory")
.delete('95ac058c573be9879d059c663');

Parameters​

ParameterTypeDescription
subIdstringThe ID of the sub-document resource to be retrieved.
axiosRequestConfigAxiosRequestConfig (optional)Axios request configuration for fine-tuning the HTTP request.

Response​

PropTypeDescription
successbooleanIndicates whether the request was successful.
statusnumberHTTP status code of the response.
messagestringA message providing additional information about the response, especially in case of errors.
rawstringThe ID of the deleted resource.
datastringThe ID of the deleted resource.
headersobject[AxiosHeaders]Axios headers associated with the response.
{
success: true,
status: 200,
raw: '95ac058c573be9879d059c663',
data: '95ac058c573be9879d059c663',
headers: Object [AxiosHeaders] {}
}