> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unitedpetroleum.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a tag assignment

> Partially updates a tag assignment. Changing `has_gps` or any vehicle field re-normalizes the GPS/manual vehicle fields together.



## OpenAPI

````yaml /openapi.json patch /paso-rapido/tags/{id}
openapi: 3.1.0
info:
  title: United Logistics API
  version: 0.1.0
  description: >-
    Industry-grade public API for fleet, fuel, and toll operations. Every
    endpoint is scoped to the organization owning the API key. Authentication:
    bearer API key (`ulk_<prefix>_<secret>`). Rate limit: 60 requests/minute/key
    by default (override per key via the dashboard).
  contact:
    name: United Logistics Engineering
    email: sfuentes@assetmg.tech
servers:
  - url: https://app.unitedlogistics.com.do/api/v1
    description: Production
  - url: http://localhost:3000/api/v1
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /paso-rapido/tags/{id}:
    patch:
      tags:
        - Paso Rápido
      summary: Update a tag assignment
      description: >-
        Partially updates a tag assignment. Changing `has_gps` or any vehicle
        field re-normalizes the GPS/manual vehicle fields together.
      parameters:
        - schema:
            type: string
            pattern: ^\d+$
          required: true
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTagRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorObject'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UpdateTagRequest:
      type: object
      properties:
        tag_number:
          type: integer
          exclusiveMinimum: 0
        has_gps:
          type: boolean
        vehicle_external_id:
          type:
            - integer
            - 'null'
          exclusiveMinimum: 0
        vehicle_title:
          type:
            - string
            - 'null'
          maxLength: 200
        vehicle_license_plate:
          type:
            - string
            - 'null'
          maxLength: 50
        category:
          type: integer
          minimum: 1
          maximum: 5
        assignment_category:
          type:
            - string
            - 'null'
          maxLength: 200
        type:
          type: string
          enum:
            - corporativo
            - prepago
        date:
          type: string
        issued_at:
          type:
            - string
            - 'null'
        expires_at:
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - Valido
            - Inhabilitado
        notes:
          type:
            - string
            - 'null'
    TagResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Tag'
      required:
        - data
    ErrorObject:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: unauthorized
            message:
              type: string
              example: Missing Authorization header.
            details: {}
          required:
            - code
            - message
      required:
        - error
    Tag:
      type: object
      properties:
        id:
          type: integer
        org_id:
          type: string
          format: uuid
        tag_number:
          type: integer
        has_gps:
          type: boolean
        vehicle_external_id:
          type:
            - integer
            - 'null'
          description: >-
            External id of the GPS vehicle (legacy `vehicle_id`). Null for
            non-GPS tags.
        vehicle_title:
          type:
            - string
            - 'null'
        vehicle_license_plate:
          type:
            - string
            - 'null'
        category:
          type: integer
        assignment_category:
          type:
            - string
            - 'null'
        type:
          type: string
        date:
          type: string
        issued_at:
          type:
            - string
            - 'null'
        expires_at:
          type:
            - string
            - 'null'
        status:
          type: string
        notes:
          type:
            - string
            - 'null'
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - org_id
        - tag_number
        - has_gps
        - vehicle_external_id
        - vehicle_title
        - vehicle_license_plate
        - category
        - assignment_category
        - type
        - date
        - issued_at
        - expires_at
        - status
        - notes
        - created_at
        - updated_at
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: ulk_<prefix>_<secret>
      description: >-
        Authorization: Bearer ulk_<prefix>_<secret>. Cree la clave en
        Configuración → API.

````