Delete Payment Term
This API endpoint allows you to delete an existing payment term based on the provided ID.
HTTP Request
- URL:
/api/paymentTerms/{id} - Method:
DELETE - Headers:
accessToken: Required. This is your access token for authenticating the request.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | The unique identifier of the payment term to delete. |
cURL Example
Below is a sample cURL command demonstrating how to make a request to delete a payment term:
curl --location --request DELETE '/api/paymentTerms/67a46366869ddc960b432623' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The payment term was successfully deleted, and the server returned a success message.
- 4XX: Client errors indicating issues such as an invalid access token or resource not found.
- 5XX: Server errors indicating that something went wrong on the server's end.
Sample JSON Response
Below is an example of the JSON response you might receive after successfully deleting a payment term:
{
"success": true,
"message": "Payment term deleted successfully"
}
Response Details
| Key | Type | Description |
|---|---|---|
success | Boolean | Indicates if the request was successful. |
message | String | A message confirming the successful deletion. |
Notes
- Ensure that the
accessTokenprovided is valid and has not expired. - Replace
{id}in the URL with the actual ID of the payment term you wish to delete.