Skip to main content

Overview

The TallerXEmpresa API manages the many-to-many relationship between branding workshops and companies. This allows companies to have preferred workshops for their campaign vehicle branding needs, and workshops to serve multiple company clients.

The TallerXEmpresa Object

id_taller
integer
required
Unique identifier for the workshop-company relationship
id_empresa
integer
required
Foreign key reference to the company (Empresa)
estado
integer
required
Relationship status:
  • 0 - Inactive/Terminated
  • 1 - Active
  • 2 - Suspended
  • 3 - Pending approval
fecha_creacion
date
required
Date when the relationship was established (YYYY-MM-DD format)
fecha_modificacion
date
required
Date when the relationship was last modified (YYYY-MM-DD format)

Create Workshop-Company Relationship

curl -X POST https://api.restapi.com/taller-empresa \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "id_empresa": 5,
    "estado": 1,
    "fecha_creacion": "2026-03-09",
    "fecha_modificacion": "2026-03-09"
  }'
{
  "id_taller": 1,
  "id_empresa": 5,
  "estado": 1,
  "fecha_creacion": "2026-03-09",
  "fecha_modificacion": "2026-03-09"
}
id_empresa
integer
required
Company ID to associate with the workshop
estado
integer
required
Status of the relationship (0: Inactive, 1: Active, 2: Suspended, 3: Pending)
fecha_creacion
date
required
Date when the relationship was created in YYYY-MM-DD format
fecha_modificacion
date
required
Last modification date in YYYY-MM-DD format

Get Workshop-Company Relationship

curl -X GET https://api.restapi.com/taller-empresa/1 \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id_taller": 1,
  "id_empresa": 5,
  "estado": 1,
  "fecha_creacion": "2026-03-09",
  "fecha_modificacion": "2026-03-09",
  "empresa": {
    "id_empresa": 5,
    "nombre": "TechCorp Ecuador",
    "ruc": "1234567890001"
  }
}

List Workshop-Company Relationships

curl -X GET https://api.restapi.com/taller-empresa?id_empresa=5&estado=1&limit=50 \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "data": [
    {
      "id_taller": 1,
      "id_empresa": 5,
      "estado": 1,
      "fecha_creacion": "2026-03-09",
      "fecha_modificacion": "2026-03-09"
    },
    {
      "id_taller": 2,
      "id_empresa": 5,
      "estado": 1,
      "fecha_creacion": "2026-02-20",
      "fecha_modificacion": "2026-02-20"
    },
    {
      "id_taller": 3,
      "id_empresa": 5,
      "estado": 1,
      "fecha_creacion": "2026-01-15",
      "fecha_modificacion": "2026-03-01"
    }
  ],
  "total": 3,
  "page": 1,
  "limit": 50
}
id_empresa
integer
Filter relationships by company ID
estado
integer
Filter relationships by status (0: Inactive, 1: Active, 2: Suspended, 3: Pending)
fecha_desde
date
Filter relationships created from this date onwards (YYYY-MM-DD)
fecha_hasta
date
Filter relationships created up to this date (YYYY-MM-DD)
limit
integer
default:"20"
Number of records to return per page
page
integer
default:"1"
Page number for pagination

Update Workshop-Company Relationship

curl -X PUT https://api.restapi.com/taller-empresa/1 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "estado": 2,
    "fecha_modificacion": "2026-03-10"
  }'
{
  "id_taller": 1,
  "id_empresa": 5,
  "estado": 2,
  "fecha_creacion": "2026-03-09",
  "fecha_modificacion": "2026-03-10"
}
estado
integer
Updated relationship status
fecha_modificacion
date
Update timestamp in YYYY-MM-DD format

Delete Workshop-Company Relationship

curl -X DELETE https://api.restapi.com/taller-empresa/1 \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "message": "Workshop-company relationship deleted successfully",
  "id_taller": 1
}

Get Workshops for Company

Retrieve all workshops associated with a specific company.
curl -X GET https://api.restapi.com/taller-empresa/empresa/5/talleres \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id_empresa": 5,
  "nombre_empresa": "TechCorp Ecuador",
  "talleres": [
    {
      "id_taller": 1,
      "nombre": "Auto Wrap Ecuador",
      "direccion": "Av. 6 de Diciembre N45-125",
      "telefono": "+593999888777",
      "estado_relacion": 1,
      "fecha_asociacion": "2026-03-09"
    },
    {
      "id_taller": 2,
      "nombre": "Vinyl Graphics Pro",
      "direccion": "Av. República del Salvador N34-567",
      "telefono": "+593998765432",
      "estado_relacion": 1,
      "fecha_asociacion": "2026-02-20"
    },
    {
      "id_taller": 3,
      "nombre": "LED Panel Installers",
      "direccion": "Calle Los Pinos E12-890",
      "telefono": "+593987123456",
      "estado_relacion": 1,
      "fecha_asociacion": "2026-01-15"
    }
  ],
  "total": 3
}

Get Companies for Workshop

Retrieve all companies served by a specific workshop.
curl -X GET https://api.restapi.com/taller-empresa/taller/1/empresas \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id_taller": 1,
  "nombre_taller": "Auto Wrap Ecuador",
  "empresas": [
    {
      "id_empresa": 5,
      "nombre": "TechCorp Ecuador",
      "ruc": "1234567890001",
      "estado_relacion": 1,
      "fecha_asociacion": "2026-03-09"
    },
    {
      "id_empresa": 8,
      "nombre": "Marketing Plus S.A.",
      "ruc": "0987654321001",
      "estado_relacion": 1,
      "fecha_asociacion": "2026-02-15"
    },
    {
      "id_empresa": 12,
      "nombre": "Delivery Express",
      "ruc": "1122334455001",
      "estado_relacion": 1,
      "fecha_asociacion": "2026-01-10"
    }
  ],
  "total": 3
}

Bulk Create Workshop-Company Relationships

Associate multiple workshops with a company in a single request.
curl -X POST https://api.restapi.com/taller-empresa/bulk \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "id_empresa": 5,
    "id_talleres": [1, 2, 3],
    "estado": 1,
    "fecha_creacion": "2026-03-09",
    "fecha_modificacion": "2026-03-09"
  }'
{
  "success": true,
  "message": "3 workshop-company relationships created successfully",
  "relationships": [
    {
      "id_taller": 1,
      "id_empresa": 5,
      "estado": 1
    },
    {
      "id_taller": 2,
      "id_empresa": 5,
      "estado": 1
    },
    {
      "id_taller": 3,
      "id_empresa": 5,
      "estado": 1
    }
  ]
}
id_empresa
integer
required
Company ID to associate with workshops
id_talleres
array
required
Array of workshop IDs to associate with the company
estado
integer
required
Status for all relationships
fecha_creacion
date
required
Creation date for all relationships
fecha_modificacion
date
required
Modification date for all relationships

Build docs developers (and LLMs) love