Skip to main content

Get All Operation Types

GET /api/metadata/operation-types
Retrieves all available operation types (sale, rent, etc.) that can be associated with properties.

Response

success
boolean
required
Indicates if the request was successful
data
array
required
Array of operation type objects
{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "Venta",
      "slug": "venta"
    },
    {
      "id": 2,
      "name": "Alquiler",
      "slug": "alquiler"
    },
    {
      "id": 3,
      "name": "Alquiler temporal",
      "slug": "alquiler-temporal"
    },
    {
      "id": 4,
      "name": "Permuta",
      "slug": "permuta"
    }
  ]
}

Operation Type Reference

Venta

Sale - Property is available for purchase

Alquiler

Rent - Property is available for long-term rental

Alquiler temporal

Temporary Rent - Property is available for short-term or seasonal rental

Permuta

Exchange - Property is available for exchange/trade

Usage Example

Use operation types when creating or filtering properties:
Example Usage
const operationTypes = await fetch('/api/metadata/operation-types')
  .then(res => res.json());

// Use in property creation
const newProperty = {
  title: "Hermoso departamento en Palermo",
  operation_type_id: 2, // Alquiler
  // ... other fields
};

Build docs developers (and LLMs) love