Skip to main content

Delete Shipping Address

This DELETE API allows you to remove an existing shipping address associated with a specific company.

Endpoint Details

  • URL: /shippingAddress/{company_id}
  • Method: DELETE
  • Authentication: Bearer Token (required)

Path Parameters

ParameterTypeDescription
company_idstringThe unique identifier of the company from which the shipping address needs to be deleted.

Query Parameters

ParameterTypeDescription
idstringA unique identifier representing the specific shipping address to be deleted. (required)

Authentication

You must provide a valid accessToken in the request headers to authenticate and access this endpoint.

Authentication Headers

HeaderTypeDescription
accessTokenstringA valid access token is required.

Request Body

No request body is required for this DELETE operation.

Response

Success Response

Status CodeDescription
200 OKShipping address was successfully deleted.

Success Response Body Structure

FieldTypeDescription
successbooleanIndicates if the deletion was successful.
messagestringMessage indicating the result of the delete operation.

Sample Response Body

{
"success": true,
"message": "Shipping address deleted successfully"
}

Error Responses

Status CodeDescription
400 Bad RequestInvalid request format or missing parameters.
401 UnauthorizedInvalid or missing access token.
403 ForbiddenAccess denied.
404 Not FoundCompany or shipping address not found.
500 Internal Server ErrorServer encountered an error.

Notes

  • Ensure that the company_id in the URL corresponds to the actual ID of the company under which the shipping address is being deleted.
  • The API requires a valid access token for authentication to successfully delete the shipping address.
  • Deletions are permanent and cannot be undone. Ensure that the correct address is confirmed with the id before performing this operation.