---
title: "Contrato histórico: POST update-plugin | Documentación de Ordering.co"
description: "Contrato histórico de la API de Ordering.co para POST /plugins/{plugin_id}, conservado como referencia. Para nuevas integraciones, usa la referencia actual."
canonical: https://docs.ordering.co/es/api-reference/guides/history/update-plugin/
---

# Contrato histórico: POST update-plugin

[]()

> **Contrato histórico de API.** Esta página describe un contrato anterior. Los métodos, las rutas y las respuestas pueden diferir de la API vigente.

## Significado histórico

Editar plugin

Este endpoint de la API se utiliza para actualizar un plugin.

## API vigente

Para desarrollar una integración nueva, consulta la referencia o guía vigente enlazada.

[Leer la guía vigente](https://docs.ordering.co/es/api-reference/guides/plugins-model/)

## Parámetros

```json
[
  {
    "name": "language",
    "in": "path",
    "schema": {
      "type": "string",
      "default": "en"
    },
    "required": true
  },
  {
    "name": "project",
    "in": "path",
    "schema": {
      "type": "string",
      "default": "<redacted-personal>"
    },
    "required": true
  },
  {
    "name": "plugin_id",
    "in": "path",
    "schema": {
      "type": "integer",
      "format": "int32"
    },
    "required": true
  },
  {
    "name": "api_version",
    "in": "path",
    "schema": {
      "type": "string",
      "default": "v400"
    },
    "required": true
  }
]
```

## Cuerpo de solicitud

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "root": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
```

## Respuestas

```json
{
  "200": {
    "description": "200",
    "content": {
      "application/json": {
        "examples": {
          "Result": {
            "value": "{\n  \"error\": false,\n  \"result\": {\n    \"id\": 1,\n    \"name\": \"<redacted-personal>\",\n    \"root\": \"https://example.com/\",\n    \"key\": \"<redacted-secret>\",\n    \"description\": \"Description for Example Ordering\",\n    \"author\": \"Ordering Inc\",\n    \"url\": \"https://example.com/\",\n    \"version\": \"0.0.1\",\n    \"enabled\": true,\n    \"created_at\": \"2019-01-09 19:16:03\",\n    \"updated_at\": \"2019-01-09 19:16:03\",\n    \"hooks\": [\n      {\n        \"id\": 5,\n        \"plugin_id\": 1,\n        \"type\": 1,\n        \"hook\": \"users_register\",\n        \"endpoint\": \"/action_users_register.php\"\n      },\n      {\n        \"id\": 6,\n        \"plugin_id\": 1,\n        \"type\": 1,\n        \"hook\": \"users_update\",\n        \"endpoint\": \"/action_users_update.php\"\n      }\n    ]\n  }\n}"
          }
        },
        "schema": {
          "type": "object",
          "properties": {
            "error": {
              "type": "boolean",
              "example": false,
              "default": true
            },
            "result": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "example": 1,
                  "default": 0
                },
                "name": {
                  "type": "string",
                  "example": "<redacted-personal>"
                },
                "root": {
                  "type": "string",
                  "example": "https://example.com/"
                },
                "key": {
                  "type": "string",
                  "example": "<redacted-secret>"
                },
                "description": {
                  "type": "string",
                  "example": "Description for Example Ordering"
                },
                "author": {
                  "type": "string",
                  "example": "Ordering Inc"
                },
                "url": {
                  "type": "string",
                  "example": "https://example.com/"
                },
                "version": {
                  "type": "string",
                  "example": "0.0.1"
                },
                "enabled": {
                  "type": "boolean",
                  "example": true,
                  "default": true
                },
                "created_at": {
                  "type": "string",
                  "example": "2019-01-09 19:16:03"
                },
                "updated_at": {
                  "type": "string",
                  "example": "2019-01-09 19:16:03"
                },
                "hooks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 5,
                        "default": 0
                      },
                      "plugin_id": {
                        "type": "integer",
                        "example": 1,
                        "default": 0
                      },
                      "type": {
                        "type": "integer",
                        "example": 1,
                        "default": 0
                      },
                      "hook": {
                        "type": "string",
                        "example": "users_register"
                      },
                      "endpoint": {
                        "type": "string",
                        "example": "/action_users_register.php"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "400": {
    "description": "400",
    "content": {
      "application/json": {
        "examples": {
          "Result": {
            "value": "{\n  \"error\": true,\n  \"result\": [\n    \"ERROR_PLUGIN_CONFIG\"\n  ]\n}"
          }
        },
        "schema": {
          "type": "object",
          "properties": {
            "error": {
              "type": "boolean",
              "example": true,
              "default": true
            },
            "result": {
              "type": "array",
              "items": {
                "type": "string",
                "example": "ERROR_PLUGIN_CONFIG"
              }
            }
          }
        }
      }
    }
  },
  "401": {
    "description": "401",
    "content": {
      "application/json": {
        "examples": {
          "Result": {
            "value": "{\n  \"error\": true,\n  \"result\": [\n    \"You do not have permission.\"\n  ]\n}"
          }
        },
        "schema": {
          "type": "object",
          "properties": {
            "error": {
              "type": "boolean",
              "example": true,
              "default": true
            },
            "result": {
              "type": "array",
              "items": {
                "type": "string",
                "example": "You do not have permission."
              }
            }
          }
        }
      }
    }
  }
}
```
