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

# Update rep



## OpenAPI

````yaml /openapi.yaml patch /reps/{id}/
openapi: 3.0.3
info:
  title: Velocity Merchant API
  version: 1.0.0
servers:
  - url: https://api.velocity.shop
security: []
paths:
  /reps/{id}/:
    patch:
      tags:
        - Reps
      summary: Update rep
      operationId: reps_partial_update
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RepRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rep'
          description: ''
        '401':
          description: Missing or invalid API token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No rep matches the given id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - merchantApiToken: []
components:
  schemas:
    RepRequest:
      type: object
      properties:
        identifier:
          type: string
          minLength: 1
        name:
          type: string
          minLength: 1
        email:
          description: An empty string clears the email.
          type: string
          format: email
        notifications:
          type: array
          items:
            type: object
            properties:
              event:
                type: string
                enum:
                  - NEW_ORDER
              channel:
                type: string
                enum:
                  - EMAIL
            required:
              - event
              - channel
      required:
        - email
        - name
    Rep:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        identifier:
          type: string
        name:
          type: string
        email:
          description: An empty string clears the email.
          type: string
          format: email
        is_disabled:
          type: boolean
          readOnly: true
        workos_user_id:
          type: string
          nullable: true
          readOnly: true
        customer_id:
          type: integer
          nullable: true
          readOnly: true
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/Permission'
          nullable: true
          readOnly: true
        notifications:
          type: array
          items:
            type: object
            properties:
              event:
                type: string
                enum:
                  - NEW_ORDER
              channel:
                type: string
                enum:
                  - EMAIL
            required:
              - event
              - channel
        alignments:
          type: array
          items:
            $ref: '#/components/schemas/ThinAlignment'
          readOnly: true
        has_commission_overrides:
          type: boolean
          readOnly: true
      required:
        - alignments
        - customer_id
        - email
        - has_commission_overrides
        - id
        - is_disabled
        - name
        - permissions
        - workos_user_id
    Error:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
    Permission:
      type: object
      properties:
        name:
          type: string
          maxLength: 255
        group:
          allOf:
            - $ref: '#/components/schemas/GroupEnum'
          readOnly: true
        slug:
          allOf:
            - $ref: '#/components/schemas/PermissionSlugEnum'
          readOnly: true
      required:
        - group
        - name
        - slug
    ThinAlignment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
      required:
        - id
        - name
    GroupEnum:
      type: string
      enum:
        - Addresses
        - Checkout Flows
        - Commission
        - Companies
        - Customers
        - Discounts
        - Other
        - Payments
        - Visibility
    PermissionSlugEnum:
      type: string
      enum:
        - authentication.repuser.view_all_entities
        - authentication.repuser.view_downline_entities
        - commission.commission.view_commission
        - portal.draftorder.edit_draft_line_level_discounts
        - portal.draftorder.edit_draft_order_addresses
        - portal.draftorder.edit_draft_order_level_custom_discount
        - portal.draftorder.edit_draft_order_level_discount_codes
        - portal.draftorder.edit_payment_terms
        - portal.draftorder.use_admin_approval_flow
        - portal.draftorder.use_customer_approval_flow
        - portal.draftorder.use_customer_impersonation_flow
        - portal.draftorder.use_open_as_admin_flow
        - shopify.shopifycompany.create_companies
        - shopify.shopifycompanylocation.create_company_locations
        - shopify.shopifycustomer.create_customers
        - shopify.shopifycustomeraddress.edit_customer_addresses
  securitySchemes:
    merchantApiToken:
      type: http
      scheme: bearer

````