Saltar a contenido

Update a product

Replace every field of a product in the calling issuer's catalog, with the same fields as register_product. impuestos replaces the product's taxes too: omit it or pass [] to clear them. Each tax in impuestos must already be in the issuer's tax catalog: add it with add_tax first.

Alcance (scope): products:write · Características: Destructiva, Idempotente

Parámetros

Parámetro Tipo Obligatorio Descripción
product_id string Sí
name string Sí
unit_price string Sí Decimal string, e.g. '199.00'
clave_prod_serv string Sí SAT c_ClaveProdServ code
clave_unidad string Sí SAT c_ClaveUnidad code
description string No
impuestos array de object No The taxes the product carries. Omit or pass [] for a product without taxes. Each entry must already be in the issuer's tax catalog (add it with add_tax; the keys are listed by list_tax_presets). Each entry is one traslado or retencion, for example IVA 16%: {"tipo": "traslado", "impuesto": "002", "tipo_factor": "Tasa", "tasa_o_cuota": "0.160000"}. Exento entries take tasa_o_cuota null. ISR (001) is only a retencion; Cuota is only for IEPS (003).
issuer string Sí Id of the issuer the call acts for, from list_issuers.

Esquema de entrada (JSON Schema)

{
  "type": "object",
  "properties": {
    "product_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "unit_price": {
      "type": "string",
      "description": "Decimal string, e.g. '199.00'"
    },
    "clave_prod_serv": {
      "type": "string",
      "description": "SAT c_ClaveProdServ code"
    },
    "clave_unidad": {
      "type": "string",
      "description": "SAT c_ClaveUnidad code"
    },
    "description": {
      "type": "string"
    },
    "impuestos": {
      "type": "array",
      "description": "The taxes the product carries. Omit or pass [] for a product without taxes. Each entry must already be in the issuer's tax catalog (add it with add_tax; the keys are listed by list_tax_presets). Each entry is one traslado or retencion, for example IVA 16%: {\"tipo\": \"traslado\", \"impuesto\": \"002\", \"tipo_factor\": \"Tasa\", \"tasa_o_cuota\": \"0.160000\"}. Exento entries take tasa_o_cuota null. ISR (001) is only a retencion; Cuota is only for IEPS (003).",
      "items": {
        "type": "object",
        "properties": {
          "tipo": {
            "type": "string",
            "enum": [
              "traslado",
              "retencion"
            ]
          },
          "impuesto": {
            "type": "string",
            "enum": [
              "001",
              "002",
              "003"
            ]
          },
          "tipo_factor": {
            "type": "string",
            "enum": [
              "Tasa",
              "Cuota",
              "Exento"
            ]
          },
          "tasa_o_cuota": {
            "type": [
              "string",
              "null"
            ],
            "description": "Decimal string with at most 6 decimals, e.g. '0.160000'; null for Exento."
          }
        },
        "required": [
          "tipo",
          "impuesto",
          "tipo_factor",
          "tasa_o_cuota"
        ],
        "additionalProperties": false
      }
    },
    "issuer": {
      "type": "string",
      "format": "uuid",
      "description": "Id of the issuer the call acts for, from list_issuers."
    }
  },
  "required": [
    "product_id",
    "name",
    "unit_price",
    "clave_prod_serv",
    "clave_unidad",
    "issuer"
  ]
}