> ## Documentation Index
> Fetch the complete documentation index at: https://docs.isprop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Crear nuevo producto

> Crea un nuevo producto asociado a un proyecto existente.
El producto se crea en estado borrador (sin publicar) por defecto.



## OpenAPI

````yaml /api/openapi.json post /products
openapi: 3.1.0
info:
  title: Isprop API
  version: 1.0.0
  description: API para gestión de unidades inmobiliarias y leads de Isprop
servers:
  - url: https://{tenantDomain}/api/v1
    description: Dominio del tenant
    variables:
      tenantDomain:
        default: tenant.example.com
        description: Dominio asignado al tenant, sin protocolo ni ruta.
security:
  - http: []
tags:
  - name: Unit
  - name: Project
  - name: Product
  - name: Typology
  - name: Lead
  - name: Lead Channel
  - name: Attribute
paths:
  /products:
    post:
      tags:
        - Product
      summary: Crear nuevo producto
      description: |-
        Crea un nuevo producto asociado a un proyecto existente.
        El producto se crea en estado borrador (sin publicar) por defecto.
      operationId: createProduct
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProductRequest'
      responses:
        '200':
          description: '`ProductResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Product'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    CreateProductRequest:
      type: object
      properties:
        project_id:
          type: string
          format: uuid
        product_type:
          type: string
          enum:
            - cocheras
            - oficinas
            - departamentos
            - locales
            - lotes
            - casas
            - parking
            - macro_locales
            - duplex
        name:
          type: string
          maxLength: 150
        description:
          type:
            - string
            - 'null'
        tagline:
          type:
            - string
            - 'null'
        social_links:
          type: object
          properties:
            facebook:
              type:
                - string
                - 'null'
              format: uri
              maxLength: 255
            instagram:
              type:
                - string
                - 'null'
              format: uri
              maxLength: 255
            twitter:
              type:
                - string
                - 'null'
              format: uri
              maxLength: 255
            linkedin:
              type:
                - string
                - 'null'
              format: uri
              maxLength: 255
      required:
        - project_id
        - product_type
        - name
      title: CreateProductRequest
    Product:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        description:
          type: string
        tagline:
          type: string
        social_links:
          type: string
        store_active:
          type: string
        published_at:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
        logos:
          type:
            - array
            - 'null'
          description: >-
            Override: null cuando el producto no tiene logo propio (el front cae
            al del project).
          items: {}
        media:
          type: object
          properties:
            gallery:
              anyOf:
                - type: array
                  items:
                    type: string
                  minItems: 0
                  maxItems: 0
                  additionalItems: false
                - type: string
            unit_thumbnail:
              anyOf:
                - $ref: '#/components/schemas/MediaImage'
                - type: 'null'
          required:
            - gallery
            - unit_thumbnail
        project:
          $ref: '#/components/schemas/ProjectSummary'
          description: >-
            Relaciones condicionales (summary resources para evitar nesting
            circular)
        product_type:
          type: object
          properties:
            value:
              type: string
            label:
              type: string
            labels:
              type: object
              properties:
                sector:
                  anyOf:
                    - type: string
                    - type: string
                      enum:
                        - Sector
                unit:
                  anyOf:
                    - type: string
                    - type: string
                      enum:
                        - Unidad
              required:
                - sector
                - unit
          required:
            - value
            - label
            - labels
        address:
          $ref: '#/components/schemas/Address'
        tags:
          type: string
      required:
        - id
        - slug
        - name
        - description
        - tagline
        - social_links
        - store_active
        - published_at
        - created_at
        - updated_at
        - logos
        - media
        - product_type
      title: Product
    MediaImage:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        file_name:
          type: string
        mime_type:
          type: string
        size:
          type: string
        order:
          type: string
        urls:
          type: string
      required:
        - id
        - name
        - file_name
        - mime_type
        - size
        - order
        - urls
      title: MediaImage
    ProjectSummary:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        description:
          type: string
        tagline:
          type: string
        store_active:
          type: string
        logos:
          type:
            - array
            - 'null'
          items: {}
        address:
          anyOf:
            - $ref: '#/components/schemas/AddressSummary'
            - type: 'null'
        product_types:
          type:
            - array
            - 'null'
          description: >-
            Tipos de producto distintos entre los products del proyecto (ej:
            ["lotes"] o ["departamentos","cocheras","oficinas"])
          items: {}
        lots_map:
          type:
            - array
            - 'null'
          description: >-
            Config del overlay de tiles para la vista de mapa de lotes (null si
            el emprendimiento no tiene uno definido).
          items: {}
        has_lots_map:
          type: boolean
          description: >-
            Conveniencia para mostrar el toggle Lista/Mapa sin inspeccionar
            `lots_map`.
        published_at:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - slug
        - name
        - description
        - tagline
        - store_active
        - logos
        - product_types
        - lots_map
        - has_lots_map
        - published_at
        - created_at
        - updated_at
      title: ProjectSummary
    Address:
      type: object
      properties:
        country:
          type: string
        state:
          type: string
        city:
          type: string
        neighborhood:
          type: string
        district:
          type: string
        postal_code:
          type: string
        address_line_1:
          type: string
        address_line_2:
          type: string
        phone:
          type: string
        latitude:
          type: string
        longitude:
          type: string
      required:
        - country
        - state
        - city
        - neighborhood
        - district
        - postal_code
        - address_line_1
        - address_line_2
        - phone
        - latitude
        - longitude
      title: Address
    AddressSummary:
      type: object
      properties:
        country:
          type: string
        state:
          type: string
        city:
          type: string
        neighborhood:
          type: string
      required:
        - country
        - state
        - city
        - neighborhood
      title: AddressSummary
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer
      bearerFormat: sanctum

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.