Docs
Servidor MCPHerramientas disponibles

Recibir inventario

Registra una entrega de inventario de proveedor con varios productos.

Herramienta MCPreceive_inventory

Propósito

Usar cuando
Se recibió una entrega de un proveedor.
No usar cuando
Solo corriges la existencia de un producto.
Permisos requeridos
products:manage
Efectos secundarios
Destructivo
Idempotencia
Idempotente

Esquema de entrada

JSON Schema
{  "type": "object",  "properties": {    "idempotencyKey": {      "type": "string",      "minLength": 1,      "maxLength": 200,      "description": "Unique retry key for this exact operation. Reuse it only when retrying the same request."    },    "input": {      "type": "object",      "properties": {        "supplierId": {          "type": "string",          "minLength": 1        },        "locationId": {          "type": "string",          "minLength": 1        },        "reference": {          "type": "string",          "minLength": 1,          "maxLength": 120        },        "note": {          "type": "string",          "minLength": 1,          "maxLength": 500        },        "items": {          "minItems": 1,          "maxItems": 50,          "type": "array",          "items": {            "type": "object",            "properties": {              "productId": {                "type": "string",                "minLength": 1              },              "quantity": {                "type": "number",                "exclusiveMinimum": 0              }            },            "required": [              "productId",              "quantity"            ],            "additionalProperties": false          }        }      },      "required": [        "supplierId",        "locationId",        "items"      ],      "additionalProperties": false    }  },  "required": [    "idempotencyKey",    "input"  ],  "$schema": "http://json-schema.org/draft-07/schema#",  "additionalProperties": false}

Esquema de salida

JSON Schema
{  "type": "object",  "properties": {    "data": {      "type": "object",      "properties": {        "inventoryReceiptId": {          "type": "string"        },        "itemCount": {          "type": "integer",          "exclusiveMinimum": 0,          "maximum": 9007199254740991        }      },      "required": [        "inventoryReceiptId",        "itemCount"      ],      "additionalProperties": false    },    "error": {      "$schema": "http://json-schema.org/draft-07/schema#",      "type": "object",      "properties": {        "code": {          "enum": [            "validation_error",            "unauthenticated",            "forbidden",            "payment_required",            "not_found",            "method_not_allowed",            "conflict",            "idempotency_conflict",            "operation_in_progress",            "recovery_required",            "migration_required",            "rate_limited",            "provider_unavailable",            "internal"          ]        },        "message": {          "type": "string"        },        "details": {          "type": "object",          "properties": {            "document": {              "type": "object",              "properties": {                "documentRef": {                  "type": "string",                  "pattern": "^(invoice|withholding|sales_receipt|declaration|tax_compliance_opinion|sales_receipt_refund):.+$"                },                "editable": {                  "type": "boolean"                }              },              "required": [                "documentRef",                "editable"              ],              "additionalProperties": false            },            "issues": {              "type": "array",              "items": {                "type": "object",                "properties": {                  "path": {                    "type": "array",                    "items": {                      "anyOf": [                        {                          "type": "string"                        },                        {                          "type": "number"                        }                      ]                    }                  },                  "message": {                    "type": "string"                  },                  "code": {                    "type": "string"                  }                },                "required": [                  "path",                  "message"                ],                "additionalProperties": false              }            },            "retryable": {              "type": "boolean"            },            "retryAfterSeconds": {              "type": "integer",              "exclusiveMinimum": 0,              "maximum": 9007199254740991            },            "reason": {              "type": "string"            },            "balanceMinor": {              "type": "integer",              "minimum": 0,              "maximum": 9007199254740991            },            "topUpUrl": {              "type": "string"            }          },          "additionalProperties": false        }      },      "required": [        "code",        "message"      ],      "additionalProperties": false    }  },  "$schema": "http://json-schema.org/draft-07/schema#",  "additionalProperties": false,  "oneOf": [    {      "required": [        "data"      ]    },    {      "required": [        "error"      ]    }  ]}

Flujo relacionado

Consulta los flujos canónicos en Inicio rápido

Herramientas relacionadas