Skip to main content

Delete service station

DELETE 

/api/oil/:id

Endpoint to permanently delete a service station from the system.

Deletion Process:

  • Deletes the station's record from the database
  • Deletes any associated images from S3 (if they exist)
  • Updates references in other systems

Considerations:

  • The operation is irreversible
  • A station with associated active operations cannot be deleted
  • Deactivation (isActive: false) is recommended over deletion when possible

Use Cases:

  • Removal of duplicate stations
  • Permanent closure of stations
  • Cleanup of test data

Usage Example:

DELETE /api/oil/5f8d0d55b54764421b7156da
Headers:
X-API-KEY: your-api-key

Request

Responses

Station successfully removed. Returns no content. Status code 204 indicates success with no response content.