Delete a Provider

This route deletes a provider and all of its linked instances from the marketplace. It is accessible to both providers and admins.

Delete a Provider from Marketplace

This endpoint permanently deletes a provider's account and all of their associated instances from the marketplace. This is a destructive and irreversible action. The endpoint supports both Administrator and Provider roles.

  • Admins can delete any provider account.
  • Providers can only delete their own account.

Endpoint

DELETE /api/v1/providers/{pro_id}

Authentication

TypeRequiredLocationDescription
Admin Key OR Provider KeytrueHeaderThe key must be sent as x-api-key: YOUR_API_KEY.

The behavior of this endpoint depends on the type of key provided.


URL Parameters

ParameterTypeRequiredDescription
pro_idstringtrueThe unique ID of the provider account to be deleted. For providers, this must be their own ID.

Request

This endpoint does not require a request body.

Example Requests

As an Administrator

This request deletes the specified provider and all their instances. Replace PROVIDER_ID_TO_DELETE and YOUR_ADMIN_KEY.

curl -X DELETE 'https://offers.dataoorts.com/api/v1/providers/PROVIDER_ID_TO_DELETE' \
-H 'x-api-key: YOUR_ADMIN_KEY'

As a Provider (Self-Deletion)

This request deletes the authenticated provider's own account and linked instances. The pro_id in the URL must match the ID associated with the provided API key.

curl -X DELETE 'https://offers.dataoorts.com/api/v1/providers/YOUR_OWN_PRO_ID' \
-H 'x-api-key: YOUR_PROVIDER_API_KEY'

Responses

✅ Success Response (200 OK)

Returned when the provider and all their associated instances are successfully deleted.

Body

{
  "status": "Success",
  "message": "Success: Provider 'PRO_15052024120000123' and all associated instances have been deleted."
}

❌ Error Response (401 Unauthorized)

Returned if the x-api-key header is missing or the provided key is invalid.

Body

{
  "error": "Unauthorized: Invalid API key."
}
❗️

More than three failed authentication attempts will result in a permanent IP block.


❌ Error Response (403 Forbidden)

This error is specific to Providers. It is returned when a provider attempts to delete another provider's account or using pro_id invalid.

Body

{
  "error": "Forbidden",
  "details": "You can only delete your own provider account."
}

❌ Error Response (404 Not Found)

This error is specific to Admins. It is returned if no provider account exists with the pro_id provided in the URL.

Body

{
  "error": "Not Found",
  "details": "Deletion failed: No provider found with ID 'PRO_56987450236987520523'."
}

❌ Error Response (500 Internal Server Error)

Returned for database errors or other unexpected issues on the server during the deletion process.

Body

{
  "error": "A database error occurred",
  "details": "Specific error message from the database driver."
}