Saltar a contenido

Guardar vehículo, operador o ubicación

Crea o actualiza un dato de transporte de la carta porte, según kind: un vehículo, una figura (operador u otra figura de transporte) o una ubicación. Recibe los campos de ese tipo, como la página Transporte: de un vehículo, permiso, configuración, peso bruto, placa, año modelo, seguros y remolques; de una figura, tipo, RFC, licencia, país e identificación fiscal extranjera; de una ubicación, nombre, RFC del tercero, domicilio, estado, país y código postal. Con id reemplaza ese dato; sin él, el que tenga el mismo nombre. Guardar envía el dato completo: lo que la llamada no envía queda vacío. Devuelve el dato como lo lista list_waybill_parts. Errores: invalid_input con el campo, not_found si el id no existe, conflict, forbidden.

Alcance (scope): cefidia:write · Características: Idempotente

Parámetros

Parámetro Tipo Obligatorio Descripción
taxpayer texto No Nombre o RFC del contribuyente. Se puede omitir si solo hay uno.
kind texto Sí vehicle, figure o location: el tipo del dato.
id texto No Id del dato por reemplazar; sin él, el que tenga el mismo nombre.
name texto Sí Nombre del dato, de 1 a 300 caracteres.
permit_type texto No Vehículo: tipo de permiso SCT (c_TipoPermiso).
permit_number texto No Vehículo: número del permiso SCT.
vehicle_config texto No Vehículo: configuración (c_ConfigVehicular).
gross_weight número o texto No Vehículo: peso bruto vehicular, en toneladas.
plate texto No Vehículo: placa.
model_year entero No Vehículo: año modelo.
civil_liability_insurer texto No Vehículo: aseguradora de responsabilidad civil.
civil_liability_policy texto No Vehículo: póliza de responsabilidad civil.
environment_insurer texto No Vehículo: aseguradora de daño ambiental.
environment_policy texto No Vehículo: póliza ambiental.
cargo_insurer texto No Vehículo: aseguradora de la carga.
cargo_policy texto No Vehículo: póliza de la carga.
trailers lista de objeto No Vehículo: remolques, hasta 2, con subtype (c_SubTipoRem) y plate.
figure_type texto No Figura: tipo (c_FiguraTransporte), 01 a 04: operador u otra figura.
rfc texto No Figura: RFC de la persona.
license_number texto No Figura: número de licencia.
foreign_tax_id texto No Figura: identificación fiscal extranjera.
party_name texto No Ubicación: nombre del tercero.
party_rfc texto No Ubicación: RFC del tercero.
street texto No Ubicación: calle.
exterior_number texto No Ubicación: número exterior.
interior_number texto No Ubicación: número interior.
neighborhood texto No Ubicación: colonia (c_Colonia).
locality texto No Ubicación: localidad (c_Localidad).
reference texto No Ubicación: referencia.
municipality texto No Ubicación: municipio (c_Municipio).
state texto No Ubicación: estado (c_Estado).
country texto No Figura, opcional; ubicación: país (c_Pais), obligatorio en una ubicación.
postal_code texto No Ubicación: código postal.

Esquema de entrada (JSON Schema)

{
  "$defs": {
    "Trailer": {
      "additionalProperties": false,
      "description": "A trailer of a vehicle: its subtype (c_SubTipoRem) and plate.",
      "properties": {
        "subtype": {
          "title": "Subtype",
          "type": "string"
        },
        "plate": {
          "title": "Plate",
          "type": "string"
        }
      },
      "required": [
        "subtype",
        "plate"
      ],
      "title": "Trailer",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "description": "One part of the waybill, by `kind`: the fields of that kind (DIR-30 to DIR-32). A save is\nthe whole part, as on the web page; the fields of another kind are not read.",
  "properties": {
    "taxpayer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Nombre o RFC del contribuyente. Se puede omitir si solo hay uno.",
      "title": "Taxpayer"
    },
    "kind": {
      "description": "vehicle, figure o location: el tipo del dato.",
      "enum": [
        "vehicle",
        "figure",
        "location"
      ],
      "title": "Kind",
      "type": "string"
    },
    "id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Id del dato por reemplazar; sin él, el que tenga el mismo nombre.",
      "title": "Id"
    },
    "name": {
      "description": "Nombre del dato, de 1 a 300 caracteres.",
      "title": "Name",
      "type": "string"
    },
    "permit_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Vehículo: tipo de permiso SCT (c_TipoPermiso).",
      "title": "Permit Type"
    },
    "permit_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Vehículo: número del permiso SCT.",
      "title": "Permit Number"
    },
    "vehicle_config": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Vehículo: configuración (c_ConfigVehicular).",
      "title": "Vehicle Config"
    },
    "gross_weight": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Vehículo: peso bruto vehicular, en toneladas.",
      "title": "Gross Weight"
    },
    "plate": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Vehículo: placa.",
      "title": "Plate"
    },
    "model_year": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Vehículo: año modelo.",
      "title": "Model Year"
    },
    "civil_liability_insurer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Vehículo: aseguradora de responsabilidad civil.",
      "title": "Civil Liability Insurer"
    },
    "civil_liability_policy": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Vehículo: póliza de responsabilidad civil.",
      "title": "Civil Liability Policy"
    },
    "environment_insurer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Vehículo: aseguradora de daño ambiental.",
      "title": "Environment Insurer"
    },
    "environment_policy": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Vehículo: póliza ambiental.",
      "title": "Environment Policy"
    },
    "cargo_insurer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Vehículo: aseguradora de la carga.",
      "title": "Cargo Insurer"
    },
    "cargo_policy": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Vehículo: póliza de la carga.",
      "title": "Cargo Policy"
    },
    "trailers": {
      "default": [],
      "description": "Vehículo: remolques, hasta 2, con subtype (c_SubTipoRem) y plate.",
      "items": {
        "$ref": "#/$defs/Trailer"
      },
      "title": "Trailers",
      "type": "array"
    },
    "figure_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Figura: tipo (c_FiguraTransporte), 01 a 04: operador u otra figura.",
      "title": "Figure Type"
    },
    "rfc": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Figura: RFC de la persona.",
      "title": "Rfc"
    },
    "license_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Figura: número de licencia.",
      "title": "License Number"
    },
    "foreign_tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Figura: identificación fiscal extranjera.",
      "title": "Foreign Tax Id"
    },
    "party_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Ubicación: nombre del tercero.",
      "title": "Party Name"
    },
    "party_rfc": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Ubicación: RFC del tercero.",
      "title": "Party Rfc"
    },
    "street": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Ubicación: calle.",
      "title": "Street"
    },
    "exterior_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Ubicación: número exterior.",
      "title": "Exterior Number"
    },
    "interior_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Ubicación: número interior.",
      "title": "Interior Number"
    },
    "neighborhood": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Ubicación: colonia (c_Colonia).",
      "title": "Neighborhood"
    },
    "locality": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Ubicación: localidad (c_Localidad).",
      "title": "Locality"
    },
    "reference": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Ubicación: referencia.",
      "title": "Reference"
    },
    "municipality": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Ubicación: municipio (c_Municipio).",
      "title": "Municipality"
    },
    "state": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Ubicación: estado (c_Estado).",
      "title": "State"
    },
    "country": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Figura, opcional; ubicación: país (c_Pais), obligatorio en una ubicación.",
      "title": "Country"
    },
    "postal_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Ubicación: código postal.",
      "title": "Postal Code"
    }
  },
  "required": [
    "kind",
    "name"
  ],
  "title": "SaveWaybillPartInput",
  "type": "object"
}