openapi: 3.0.1
info:
  title: Dealers API V2
  description: The Dealers API V2 is a RESTful API designed to manage dealer-related
    operations.
  version: 4.10.0
externalDocs:
  description: Core API documentation
  url: https://github.com/masmovil/mm-monorepo/tree/master/pkg/mas-stack/bss/mas-dealers/back
servers:
- url: https://dealers.masstack.com/v2/
  description: PROD server
  variables: {}
- url: https://dealers.sta.masstack.com/v2/
  description: STA server
  variables: {}
- url: https://mas-dealers.private.dev.k8s.masmovil.com/api/v2/
  description: DEV server
  variables: {}
tags:
- name: Loads
  description: Operations related to loads xlxs files
- name: Actors
  description: Operations related to actors
- name: Dealers
  description: Operations related to dealers
- name: Custom Information
  description: Operations related to custom information
- name: Commercial Structure
  description: Operations related to commercial structure
paths:
  /dealers/{id}/brands:
    get:
      tags:
      - Dealers
      summary: Get all brands for a dealer
      description: Get all brands for a dealer
      operationId: GetDealerBrands
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: List of dealer brands successfully obtained
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DealerBrandResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    post:
      tags:
      - Dealers
      summary: Add a brand to a dealer
      description: Add a brand to a dealer
      operationId: AddDealerBrand
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Information of the brand to be added
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealerBrandInsertRequest'
        required: true
      responses:
        "201":
          description: Brand successfully added to dealer
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: NOT_FOUND
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /accounting-systems:
    get:
      tags:
      - Accoutning systems
      summary: Get all available accounting systems
      description: Get all available accounting systems to operate
      operationId: GetAllAccountingSystems
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: List of accounting systems successfully obtained
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccountingSystemPaginatedResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    post:
      tags:
      - Accoutning systems
      summary: Create a new accounting system
      description: Create a new accounting system
      operationId: CreateAccountingSystem
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: The data with which we want to create the accounting system
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingSystemRequest'
        required: true
      responses:
        "201":
          description: Successfully create an accounting system
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountingSystemResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /actors:
    get:
      tags:
      - Actors
      summary: "Get actor by query params, type, code, parentCode etc"
      description: Get actor by query params
      operationId: GetActorByQuery
      parameters:
      - name: code
        in: query
        description: Actor code
        schema:
          type: string
          description: "Similar to get by code, because the code is unique"
          example: "123456"
      - name: email
        in: query
        description: Actor email
        schema:
          type: string
          description: The email of the actor
          example: vvvv.ssss@masorange.com
      - name: full_name
        in: query
        description: Full name or partials of it of the actors to search
        schema:
          type: string
          description: "Full name or partials of it of the actors to search, case\
            \ insensitive"
          example: JOHn Do
      - name: type
        in: query
        description: Actor type
        schema:
          $ref: '#/components/schemas/ActorTypeListApiModelRequest'
      - name: parent_id
        in: query
        description: Actor parent id
        schema:
          type: string
          description: The parent id of the actor
          example: ac95e92c-277a-4115-9257-49de7279fdc2
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          description: Limit of results in the response
          format: int64
          example: 20
          default: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          description: Offset applied to results for pagination
          format: int64
          example: 0
          default: 0
      - name: sort
        in: query
        description: |
          The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added:
          * ":asc" to indicate an ascending order.
          * ":desc" to indicate a descending order.
        schema:
          type: string
          description: |
            The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added:
            * ":asc" to indicate an ascending order.
            * ":desc" to indicate a descending order.
          example: "name:asc,id:desc"
          default: id:desc
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "206":
          description: Return successfully the actor information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActorsResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
    post:
      tags:
      - Actors
      summary: Create new actor
      description: Create new actor
      operationId: CreateActors
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Body with the actor information
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActorInsertRequest'
        required: true
      responses:
        "201":
          description: Successfully create the actor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActorResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /dealers/{id}/billing:
    get:
      tags:
      - Dealers
      summary: Get billing relationship for a dealer
      description: Get billing relationship for a dealer
      operationId: GetDealerBilling
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Successfully return the billing information for the dealer
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/BillingOfDealerResponseV1'
                - $ref: '#/components/schemas/BillingOfDealerResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
    post:
      tags:
      - Dealers
      summary: Create new billing relationship for a dealer
      description: Create new billing relationship for a dealer
      operationId: CreateDealerBilling
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Body with the dealer billing information
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealerBillingRequest'
        required: true
      responses:
        "201":
          description: Successfully create the billing information for the dealer
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
    delete:
      tags:
      - Dealers
      summary: Delete billing relationship for a dealer
      description: Delete billing relationship for a dealer
      operationId: DeleteDealerBilling
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Successfully delete the billing information for the dealer
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /commercial-structures:
    get:
      tags:
      - Commercial Structure
      summary: Get the list of commercial structures
      description: Get all commercial structures
      operationId: GetAvailableCommercialStructures
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: List of commercial structures successfully obtained
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CommercialStructureResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    post:
      tags:
      - Commercial Structure
      summary: Create a commercial structure
      description: Create a new commercial structure in the system
      operationId: CreateCommercialStructure
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Commercial Structure request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommercialStructureRequest'
        required: true
      responses:
        "201":
          description: Successfully create a commercial structure
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /custom-information:
    get:
      tags:
      - Custom Information
      summary: List custom information variable definitions
      description: Endpoint to list custom information variable definitions
      operationId: ListCustomInformationVariables
      parameters:
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          description: Limit of results in the response
          format: int64
          example: 20
          default: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          description: Offset applied to results for pagination
          format: int64
          example: 0
          default: 0
      - name: sort
        in: query
        description: |
          The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added:
          * ":asc" to indicate an ascending order.
          * ":desc" to indicate a descending order.
        schema:
          type: string
          description: |
            The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added:
            * ":asc" to indicate an ascending order.
            * ":desc" to indicate a descending order.
          example: "name:asc,id:desc"
          default: id:desc
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Successfully returned the list of custom information variable
            definitions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomInformationPaginatedResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    post:
      tags:
      - Custom Information
      summary: Create custom information variable definition
      description: Endpoint to create a custom information variable definition
      operationId: CreateCustomInformationVariable
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Custom information variable definition creation request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomInformationInsertionRequest'
        required: true
      responses:
        "201":
          description: Successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomInformationResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /dealers:
    get:
      tags:
      - Dealers
      summary: Get dealers
      description: Get dealers by code or by system and username
      operationId: GetDealers
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      - name: code
        in: query
        description: Dealer code
        schema:
          type: string
          example: DealerCode001
      - name: system
        in: query
        description: Accounting system code
        schema:
          type: string
          example: IAM
      - name: username
        in: query
        description: Accounting system username
        schema:
          type: string
          example: user@masorange.es
      - name: document_type
        in: query
        description: Document type for fiscal identification
        schema:
          type: string
          example: NIF
          enum:
          - CC
          - NIF
          - NIE
          - NONE
      - name: document_number
        in: query
        description: Document number for fiscal identification
        schema:
          type: string
          example: 12345678Z
      - name: level
        in: query
        description: Dealer's level
        schema:
          type: integer
          format: int32
          example: 3
      - name: status
        in: query
        description: Dealer's status
        schema:
          type: string
          example: Activo
      - name: commercial_structure
        in: query
        description: Dealer's commercial structure
        schema:
          type: string
          example: AC
      - name: parent_id
        in: query
        description: Dealer's parent id
        schema:
          type: string
          example: 111-222-333-uuid
      - name: parent_code
        in: query
        description: Dealer's parent code
        schema:
          type: string
          example: PARENT_CODE_001
      - name: commercial_name
        in: query
        description: Dealer's commercial name
        schema:
          type: string
          example: Mas Orange Store
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          description: Limit of results in the response
          format: int64
          example: 20
          default: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          description: Offset applied to results for pagination
          format: int64
          example: 0
          default: 0
      - name: sort
        in: query
        description: |
          The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added:
          * ":asc" to indicate an ascending order.
          * ":desc" to indicate a descending order.
        schema:
          type: string
          description: |
            The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added:
            * ":asc" to indicate an ascending order.
            * ":desc" to indicate a descending order.
          example: "name:asc,id:desc"
          default: id:desc
      responses:
        "200":
          description: Successfully return the dealer(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealersResponseV2'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
    post:
      tags:
      - Dealers
      summary: Create a new dealer
      description: Create a new dealer
      operationId: CreateDealer
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Body with the dealer information
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealerInsertRequest'
        required: true
      responses:
        "201":
          description: Successfully create a dealer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerResponseV2'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /dealers/{id}/accounting-systems:
    get:
      tags:
      - Dealers
      summary: Get all the accounting systems for the dealer
      description: Get all the accounting systems for the dealer
      operationId: GetDealerAccountingSystems
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Successfully retrieved dealer's all accounting systems
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DealerAccountingSystemResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    post:
      tags:
      - Dealers
      summary: Create a new accounting system for the dealer
      description: Create a new accounting system for the dealer
      operationId: CreateDealerAccountingSystem
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      - name: id
        in: path
        description: Dealer ID
        required: true
        schema:
          type: string
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
      requestBody:
        description: Body with the dealer accounting system information
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealerAccountingSystemInsertRequest'
        required: true
      responses:
        "201":
          description: Successfully create a dealer accounting system
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerAccountingSystemResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /dealers/{id_dealer}/actors/{id_actor}:
    post:
      tags:
      - Dealers
      summary: Create a new relationship between a dealer and an actor
      description: Create a new relationship between a dealer and an actor
      operationId: CreateDealerActorRelationship
      parameters:
      - name: id_actor
        in: path
        description: Actor id
        required: true
        schema:
          type: string
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
      - name: id_dealer
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "201":
          description: Successfully created the dealer-actor relationship
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
    delete:
      tags:
      - Dealers
      summary: Delete the actor relationship for a dealer
      description: Delete actor relationship for a dealer
      operationId: DeleteDealerActorRelationship
      parameters:
      - name: id_dealer
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: id_actor
        in: path
        description: Actor id
        required: true
        schema:
          type: string
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Successfully delete the relationship with an actor for the
            dealer
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /dealers/{id}/contacts:
    get:
      tags:
      - Dealers
      summary: Get all contacts for a dealer
      description: Get all contacts for a dealer
      operationId: GetDealerContacts
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: List of contacts successfully obtained
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DealerContactResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    post:
      tags:
      - Dealers
      summary: Create a new contact for a dealer
      description: Create a new contact for a dealer
      operationId: CreateDealerContact
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Information of the contact to be created
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealerContactInsertRequest'
        required: true
      responses:
        "201":
          description: Contact successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerContactResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: NOT_FOUND
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /dealers/{id}/custom-information:
    get:
      tags:
      - Dealers
      summary: Get all custom information assignations for a dealer
      description: Retrieve all custom information variables assignations and values
        for the specified dealer
      operationId: GetDealerCustomInformationAssignations
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: List of custom information variable assignations successfully
            obtained
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerCustomInformationPaginatedResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    post:
      tags:
      - Dealers
      summary: Create a dealer custom information assignation
      description: Assign a custom information variable value to the dealer
      operationId: CreateDealerCustomInformation
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Custom information variable value assigned to the dealer
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealerCustomInformationInsertionRequest'
        required: true
      responses:
        "201":
          description: Custom information assignation successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerCustomInformationResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /dealers/{id}/ticket-config:
    get:
      tags:
      - Dealers
      summary: Get ticket config for a dealer
      description: Get ticket config for a dealer
      operationId: GetDealerTicketConfig
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Return successfully the ticket config information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketConfigResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
    put:
      tags:
      - Dealers
      summary: Update ticket config for a dealer
      description: Update ticket config for a dealer
      operationId: UpdateDealerTicketConfig
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Body with the dealer ticket config information
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TicketConfigUpdateRequest'
        required: true
      responses:
        "204":
          description: Successfully update the dealer's ticket config
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
    post:
      tags:
      - Dealers
      summary: Create new ticket config for a dealer
      description: Create ticket config for a dealer
      operationId: CreateDealerTicketConfig
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Body with the dealer ticket config information
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TicketConfigInsertRequest'
        required: true
      responses:
        "201":
          description: Successfully create the ticket config for the dealer
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
    delete:
      tags:
      - Dealers
      summary: Delete ticket config for a dealer
      description: Delete ticket config for a dealer
      operationId: DeleteDealerTicketConfig
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Successfully delete the dealer's ticket config
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /accounting-systems/{id}:
    get:
      tags:
      - Accoutning systems
      summary: Get the accounting system for the given id
      description: Get the accounting system for the given id
      operationId: GetAccountingSystemById
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      - name: id
        in: path
        description: Unique identifier of the commercial structure
        required: true
        schema:
          type: string
          example: e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b
      responses:
        "200":
          description: The accounting system if found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountingSystemResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    put:
      tags:
      - Accoutning systems
      summary: Update the accounting system for the given id
      description: Update the accounting system for the given id
      operationId: UpdateAccountingSystemById
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      - name: id
        in: path
        description: Unique identifier of the commercial structure
        required: true
        schema:
          type: string
          example: e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b
      requestBody:
        description: The data with which we want to create the accounting system
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingSystemRequest'
        required: true
      responses:
        "200":
          description: The updated accounting system
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountingSystemResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    delete:
      tags:
      - Accoutning systems
      summary: Delete the accounting system for the given id
      description: Delete the accounting system for the given id
      operationId: DeleteAccountingSystemById
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      - name: id
        in: path
        description: Unique identifier of the commercial structure
        required: true
        schema:
          type: string
          example: e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b
      responses:
        "204":
          description: Successfully deleted the accounting system
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /actors/{id}:
    get:
      tags:
      - Actors
      summary: Get actor by id
      description: Get actor by id
      operationId: GetActorById
      parameters:
      - name: id
        in: path
        description: Actor id
        required: true
        schema:
          type: string
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Return successfully the actor information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActorResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
    put:
      tags:
      - Actors
      summary: Update an actor
      description: Update an actor
      operationId: UpdateActors
      parameters:
      - name: id
        in: path
        description: Actor id
        required: true
        schema:
          type: string
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Body with the actor information
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActorUpdateRequest'
        required: true
      responses:
        "204":
          description: Successfully update the actor
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
    delete:
      tags:
      - Actors
      summary: Delete actor by id
      description: Delete actor by id
      operationId: DeleteActorById
      parameters:
      - name: id
        in: path
        description: Actor id
        required: true
        schema:
          type: string
          example: ac95e92c-277a-4115-9257-49de7279fdc2
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Successfully delete the actor
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /commercial-structures/{id}:
    get:
      tags:
      - Commercial Structure
      summary: Get a commercial structures by id
      description: Get a commercial structures by id
      operationId: GetCommercialStructure
      parameters:
      - name: id
        in: path
        description: Unique identifier of the commercial structure
        required: true
        schema:
          type: string
          example: e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: The commercial structures successfully obtained
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommercialStructureResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    put:
      tags:
      - Commercial Structure
      summary: Update a commercial structure
      description: Update an existing commercial structure in the system
      operationId: UpdateCommercialStructure
      parameters:
      - name: id
        in: path
        description: Unique identifier of the commercial structure
        required: true
        schema:
          type: string
          example: e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Commercial Structure request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommercialStructureRequest'
        required: true
      responses:
        "204":
          description: Successfully updated the commercial structure
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    delete:
      tags:
      - Commercial Structure
      summary: Delete a commercial structure
      description: Delete an existing commercial structure in the system
      operationId: DeleteCommercialStructure
      parameters:
      - name: id
        in: path
        description: Unique identifier of the commercial structure
        required: true
        schema:
          type: string
          example: e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Successfully deleted the commercial structure
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /custom-information/{id}:
    get:
      tags:
      - Custom Information
      summary: Get custom information variable definition
      description: Endpoint to get a custom information variable definition
      operationId: GetCustomInformationVariable
      parameters:
      - name: id
        in: path
        description: Custom information variable definition ID
        required: true
        schema:
          type: string
          example: e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Successfully returned the custom information variable definition
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomInformationResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    put:
      tags:
      - Custom Information
      summary: Update custom information variable definition
      description: Endpoint to update a custom information variable definition
      operationId: UpdateCustomInformationVariable
      parameters:
      - name: id
        in: path
        description: Custom information variable definition ID
        required: true
        schema:
          type: string
          example: e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Custom information variable definition update request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomInformationUpdateRequest'
        required: true
      responses:
        "204":
          description: Successfully updated
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    delete:
      tags:
      - Custom Information
      summary: Delete custom information variable definition
      description: Endpoint to delete a custom information variable definition
      operationId: DeleteCustomInformationVariable
      parameters:
      - name: id
        in: path
        description: Custom information variable definition ID
        required: true
        schema:
          type: string
          example: e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Successfully deleted
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /dealers/{id}/accounting-systems/{accounting_system_id}:
    get:
      tags:
      - Dealers
      summary: Get the accounting system for the dealer
      description: Get the accounting system for the dealer
      operationId: GetDealerAccountingSystem
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: accounting_system_id
        in: path
        description: Dealer accounting system ID
        required: true
        schema:
          type: string
          example: 6ad1bea4-2b9d-4b4f-9755-c9e9ce908987
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Successfully retrieved dealer accounting system
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerAccountingSystemResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    put:
      tags:
      - Dealers
      summary: Update an accounting system for the dealer
      description: Update an accounting system for the dealer
      operationId: UpdateDealerAccountingSystem
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: accounting_system_id
        in: path
        description: Dealer accounting system ID
        required: true
        schema:
          type: string
          example: 6ad1bea4-2b9d-4b4f-9755-c9e9ce908987
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Body with the dealer accounting system information
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealerAccountingSystemUpdateRequest'
        required: true
      responses:
        "204":
          description: Accounting system successfully updated
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    delete:
      tags:
      - Dealers
      summary: Delete a specific accounting system account of a dealer
      description: Delete a specific accounting system account of a dealer
      operationId: DeleteDealerAccountingSystem
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: accounting_system_id
        in: path
        description: Dealer accounting system ID
        required: true
        schema:
          type: string
          example: 6ad1bea4-2b9d-4b4f-9755-c9e9ce908987
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Accounting system successfully deleted
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /dealers/{id}/address:
    get:
      tags:
      - Dealers
      summary: Get dealer address
      description: Get address for a specific dealer
      operationId: GetDealerAddress
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Successfully returned the dealer's address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerAddressResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: NOT_FOUND
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
    put:
      tags:
      - Dealers
      summary: Upsert (Inserts or Updates) dealer address
      description: Upsert address for a specific dealer
      operationId: CreateOrUpdateDealerAddress
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Información de la dirección del dealer
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealerAddressCreateUpdateRequest'
        required: true
      responses:
        "200":
          description: Address correctly created or updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerAddressResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: NOT_FOUND
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
    delete:
      tags:
      - Dealers
      summary: Delete dealer address
      description: Delete the address of a specific dealer
      operationId: DeleteDealerAddress
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Successfully deleted the dealer's address
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: NOT_FOUND
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
  /dealers/{id}/brands/{brand_name}:
    delete:
      tags:
      - Dealers
      summary: Delete a brand from a dealer
      description: Delete a brand from a dealer
      operationId: DeleteDealerBrand
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: brand_name
        in: path
        description: Brand name
        required: true
        schema:
          type: string
          description: Brand codes enumeration
          example: YG
          enum:
          - GU
          - PP
          - YG
          - LE
          - MM
          - LY
          - LL
          - VI
          - EB
          - AH
          - AL
          - BT
          - SW
          - JI
          - MB
          - ST
          - PM
          - EK
          - RT
          - TC
          - RC
          - SY
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Brand successfully deleted from dealer
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /dealers/{id}/contacts/{contact_id}:
    get:
      tags:
      - Dealers
      summary: Get a specific contact for a dealer
      description: Get a specific contact for a dealer
      operationId: GetDealerContact
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: contact_id
        in: path
        description: Contact ID
        required: true
        schema:
          type: string
          example: 6ad1bea4-2b9d-4b4f-9755-c9e9ce908987
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Contact successfully obtained
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerContactResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    put:
      tags:
      - Dealers
      summary: Update a specific contact of a dealer
      description: Update a specific contact for a dealer
      operationId: UpdateDealerContact
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: contact_id
        in: path
        description: Contact ID
        required: true
        schema:
          type: string
          example: 6ad1bea4-2b9d-4b4f-9755-c9e9ce908987
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Information of the contact to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealerContactUpdateRequest'
        required: true
      responses:
        "204":
          description: Contact successfully updated
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    delete:
      tags:
      - Dealers
      summary: Delete a specific contact of a dealer
      description: Delete a specific contact for a dealer
      operationId: DeleteDealerContact
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: contact_id
        in: path
        description: Contact ID
        required: true
        schema:
          type: string
          example: 6ad1bea4-2b9d-4b4f-9755-c9e9ce908987
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "204":
          description: Contact successfully deleted
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /dealers/{id}/custom-information/{custom_information_id}:
    get:
      tags:
      - Dealers
      summary: Gets the dealer assigned specific custom information variable value
      description: Gets the value of a custom information variable assignation of
        an specified dealer
      operationId: GetDealerCustomInformationValue
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: custom_information_id
        in: path
        description: Identifier of the custom information variable
        required: true
        schema:
          type: string
          example: ec08f90d-8deb-4f6e-931b-0d8f47ca3e2a
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Dealer Custom Information variable value successfully obtained
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerCustomInformationResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    put:
      tags:
      - Dealers
      summary: Updates the dealer assigned specific custom information variable value
      description: Updates the value of a custom information variable assignation
        for an specified dealer
      operationId: UpdateDealerCustomInformationValue
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: custom_information_id
        in: path
        description: Identifier of the custom information variable
        required: true
        schema:
          type: string
          example: ec08f90d-8deb-4f6e-931b-0d8f47ca3e2a
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Custom information variable assigned to the dealer value update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealerCustomInformationUpdateRequest'
        required: true
      responses:
        "204":
          description: Dealer Custom Information variable value successfully updated
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    delete:
      tags:
      - Dealers
      summary: Deletes the dealer assigned specific custom information variable value
      description: Deletes the custom information variable assignation of an specified
        dealer
      operationId: DeleteDealerCustomInformationValue
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: custom_information_id
        in: path
        description: Identifier of the custom information variable
        required: true
        schema:
          type: string
          example: ec08f90d-8deb-4f6e-931b-0d8f47ca3e2a
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Dealer Custom Information variable value successfully obtained
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerCustomInformationResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /dealers/{id}/store-capability:
    get:
      tags:
      - Dealers
      summary: Get dealer store capability
      description: Get store capability for a specific dealer
      operationId: GetDealerStoreCapability
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      - name: id
        in: path
        description: Dealer ID
        required: true
        schema:
          type: string
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
      responses:
        "200":
          description: Successfully retrieved dealer store capability
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerStoreCapabilityResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    put:
      tags:
      - Dealers
      summary: Create or update dealer store capability
      description: "Create or update, sets the store capability for a specific dealer"
      operationId: CreateOrUpdateDealerStoreCapability
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Dealer's store capability data to set
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealerStoreCapabilityCreateUpdateRequest'
        required: true
      responses:
        "200":
          description: Store capability data successfully set (upserted)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerStoreCapabilityResponse'
        "400":
          description: Invalid request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal server error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
    delete:
      tags:
      - Dealers
      summary: Delete dealer store capability
      description: Delete store capability for a specific dealer
      operationId: DeleteDealerStoreCapability
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      - name: id
        in: path
        description: Dealer ID
        required: true
        schema:
          type: string
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
      responses:
        "204":
          description: "Successfully deleted dealer store capability, no content returned"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /actors/types:
    get:
      tags:
      - Actors
      summary: Get all actor types
      description: Get a list with all the actor types that the dealer system has
      operationId: GetActorTypes
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Return successfully the actor types
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActorTypeResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /brands:
    get:
      tags:
      - Brands
      summary: Get all brands available
      description: Get all available brands to operate
      operationId: GetAvailableBrands
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: List of brands successfully obtained
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BrandResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /dealers/{id}/actors:
    get:
      tags:
      - Dealers
      summary: Get actors related to a dealer
      description: Returns a list of actors that have a relationship with the specified
        dealer
      operationId: GetDealerRelationshipWithActors
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: code
        in: query
        description: Actor code
        schema:
          type: string
          description: The code of the actor
          example: aaa-bbb-111-ccc-ddd
      - name: email
        in: query
        description: Actor email
        schema:
          type: string
          description: The email of the actor
          example: vvvv.ssss@masorange.com
      - name: name
        in: query
        description: Actor name
        schema:
          type: string
          description: The name of the actor
          example: Actor name
      - name: type
        in: query
        description: Tipo de actor
        schema:
          type: string
          description: El tipo de actor
          example: dealer
      - name: parent_id
        in: query
        description: ID del actor padre
        schema:
          type: integer
          description: El ID del actor padre
          format: int64
          example: 98765
      - name: parent_code
        in: query
        description: Código del actor padre
        schema:
          type: string
          description: El código del actor padre
          example: parent-abc-123
      - name: full_name
        in: query
        description: Nombre completo del actor
        schema:
          type: string
          description: El nombre completo del actor
          example: Juan Pérez
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          description: Limit of results in the response
          format: int64
          example: 20
          default: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          description: Offset applied to results for pagination
          format: int64
          example: 0
          default: 0
      - name: sort
        in: query
        description: |
          The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added:
          * ":asc" to indicate an ascending order.
          * ":desc" to indicate a descending order.
        schema:
          type: string
          description: |
            The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added:
            * ":asc" to indicate an ascending order.
            * ":desc" to indicate a descending order.
          example: "name:asc,id:desc"
          default: id:desc
      - name: relation_type
        in: query
        description: |
          The type of relation between the actors and the dealers. It can be one of the following values:
          * "DIRECT"
          * "INDIRECT"
          * "DIRECT_AND_INDIRECT"
        schema:
          type: string
          description: Enumeration of possible relations between actors and dealers
          enum:
          - DIRECT_AND_INDIRECT
          - DIRECT
          - INDIRECT
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "206":
          description: Return successfully the actors information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActorsResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /dealers/by-code/{code}:
    get:
      tags:
      - Dealers
      summary: Get dealer by code
      description: Get a single dealer by exact dealer code match. Only returns active
        dealers
      operationId: GetDealerByCode
      parameters:
      - name: code
        in: path
        description: Dealer code
        required: true
        schema:
          type: string
        examples:
          dealer_code:
            description: Dealer code
            value: DealerCode001
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Successfully returned the dealer information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerResponseV2'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: NOT_FOUND
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /dealers/{id}:
    get:
      tags:
      - Dealers
      summary: Get dealer by id
      description: Get dealer by id
      operationId: GetDealerById
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "200":
          description: Return successfully the dealer information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealerResponseV2'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
    put:
      tags:
      - Dealers
      summary: Update dealer by id
      description: Update dealer by id
      operationId: UpdateDealerById
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      requestBody:
        description: Body with the dealer information
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DealerUpdateRequest'
        required: true
      responses:
        "204":
          description: Successfully updated the dealer
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /actors/{id}/dealers:
    get:
      tags:
      - Actors
      summary: Get dealers by actor id
      description: Get dealers that have a relationship with an actor
      operationId: GetDealersByActor
      parameters:
      - name: id
        in: path
        description: Actor id
        required: true
        schema:
          type: string
          example: ac95e92c-277a-4115-9257-49de7279fdc2
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          description: Limit of results in the response
          format: int64
          example: 20
          default: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          description: Offset applied to results for pagination
          format: int64
          example: 0
          default: 0
      - name: sort
        in: query
        description: |
          The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added:
          * ":asc" to indicate an ascending order.
          * ":desc" to indicate a descending order.
        schema:
          type: string
          description: |
            The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added:
            * ":asc" to indicate an ascending order.
            * ":desc" to indicate a descending order.
          example: "name:asc,id:desc"
          default: id:desc
      - name: relation_type
        in: query
        description: |
          The type of relation between the actors and the dealers. It can be one of the following values:
          * "DIRECT"
          * "INDIRECT"
          * "DIRECT_AND_INDIRECT"
        schema:
          type: string
          description: Enumeration of possible relations between actors and dealers
          enum:
          - DIRECT_AND_INDIRECT
          - DIRECT
          - INDIRECT
      - name: code
        in: query
        description: Código del dealer
        schema:
          type: string
          example: "123456"
      - name: commercial_name
        in: query
        description: Nombre comercial del dealer
        schema:
          type: string
          example: Comercial S.A.
      - name: level_id
        in: query
        description: "ID del nivel del dealer (V1 only, requires X-API-Version: 1\
          \ header)"
        schema:
          type: integer
          format: int32
          example: 3
      - name: level
        in: query
        description: Dealer's level
        schema:
          type: integer
          format: int32
          example: 3
      - name: status_code
        in: query
        description: "Código de estado del dealer (V1 only, requires X-API-Version:\
          \ 1 header)"
        schema:
          type: string
          example: ACTIVE
      - name: status
        in: query
        description: Dealer's status
        schema:
          type: string
          example: ACTIVE
      - name: subchannel_name
        in: query
        description: "Nombre del subcanal del dealer (V1 only, requires X-API-Version:\
          \ 1 header)"
        schema:
          type: string
          example: Online
      - name: commercial_structure
        in: query
        description: Dealer's commercial structure
        schema:
          type: string
          example: Online
      - name: parent_id
        in: query
        description: ID del dealer padre
        schema:
          type: string
          example: ac95e92c-277a-4115-9257-49de7279fdc2
      - name: parent_code
        in: query
        description: Código del dealer padre
        schema:
          type: string
          example: PARENT123
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "206":
          description: "Return successfully the dealer list information. Returns DealersResponse\
            \ (V1) when X-API-Version: 1 header is present, otherwise returns DealersResponseV2\
            \ (V2)"
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/DealersResponse'
                - $ref: '#/components/schemas/DealersRelatedToActorResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "404":
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /dealers/billing/{id}:
    get:
      tags:
      - Dealers
      summary: Get dealers by billing
      description: "Get dealers by billing, obtain all the dealers that have a relation\
        \ with the queried billing dealer"
      operationId: GetDealersByBilling
      parameters:
      - name: id
        in: path
        description: Dealer id (can be numeric legacy ID or UUID)
        required: true
        schema:
          type: string
        examples:
          numeric:
            description: Legacy numeric ID
            value: 1234
          uuid:
            description: UUID format
            value: aaa-bbb-ccc-111-ddd
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          description: Limit of results in the response
          format: int64
          example: 20
          default: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          description: Offset applied to results for pagination
          format: int64
          example: 0
          default: 0
      - name: sort
        in: query
        description: |
          The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added:
          * ":asc" to indicate an ascending order.
          * ":desc" to indicate a descending order.
        schema:
          type: string
          description: |
            The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added:
            * ":asc" to indicate an ascending order.
            * ":desc" to indicate a descending order.
          example: "name:asc,id:desc"
          default: id:desc
      responses:
        "200":
          description: Successfully return the list of the dealers that have a relation
            with the queried billing dealer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DealersResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /stores:
    get:
      tags:
      - Stores
      summary: Get nearby stores
      description: "Get a list of stores near a given postal code, filtered by criteria\
        \ and sorted by distance. Returns stores with their capabilities, contacts,\
        \ and brands."
      operationId: GetStores
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      - name: postal_code
        in: query
        description: Postal code for location-based search
        required: true
        schema:
          type: string
          example: "28013"
      - name: brand_code
        in: query
        description: Brand codes to filter stores (repeatable parameter)
        schema:
          type: string
          example: "[\"YG\",\"MM\"]"
      - name: store_delivery
        in: query
        description: Filter by store delivery capability
        schema:
          type: boolean
          example: true
      - name: device_return
        in: query
        description: Filter by device return capability
        schema:
          type: boolean
          example: true
      - name: subchannel
        in: query
        description: Filter by subchannel code
        schema:
          type: string
          example: RETAIL
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          format: int64
          example: 10
          default: 10
      responses:
        "200":
          description: List of stores successfully obtained
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoresResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Invalid postal code
                  ref: postal_code
                  details: The provided postal code is not valid
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /loads:
    post:
      tags:
      - Loads
      summary: Bulk loads endpoint
      description: Bulk loads endpoint for dealers creation
      operationId: LoadsEndpoint
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      - name: ignoreErrors
        in: query
        description: Flag to ignore errors
        schema:
          type: string
      requestBody:
        description: Body with the XLXS file to process
        content:
          application/octet-stream:
            schema:
              required:
              - file
              type: object
              description: XLXS file to process
        required: true
      responses:
        "200":
          description: Successfully returned the order info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoadsResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
  /dealers/fix-geocoding:
    post:
      tags:
      - Dealers
      summary: Fix geocoding data
      description: Fix geocoding data for all dealers that have it wrongly setup
      operationId: FixGeocoding
      parameters:
      - name: Authorization
        in: header
        description: Bearer token
        required: true
        schema:
          type: string
      responses:
        "201":
          description: Successfully processed the fix geocoding request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FixGeocodingResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: BAD_REQUEST
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: UNAUTHORIZED
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: CONFLICT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "500":
          description: Internal Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: INTERNAL_SERVER_ERROR
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "503":
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: SERVICE_UNAVAILABLE
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
        "504":
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                errors:
                - code: GATEWAY_TIMEOUT
                  title: Error message
                  ref: some_ref
                  details: Detailed error message
components:
  schemas:
    ApiError:
      required:
      - code
      - details
      - ref
      - title
      type: object
      properties:
        code:
          type: string
          description: code of the error
        title:
          type: string
          description: title of the error
        ref:
          type: string
          description: ref of the error
        details:
          type: string
          description: details of the error
    ApiErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiError'
      description: API Error Response
    DealerBrandInsertRequest:
      required:
      - brandCode
      type: object
      properties:
        brandCode:
          minLength: 1
          type: string
          description: Brand codes enumeration
          example: YG
          enum:
          - GU
          - PP
          - YG
          - LE
          - MM
          - LY
          - LL
          - VI
          - EB
          - AH
          - AL
          - BT
          - SW
          - JI
          - MB
          - ST
          - PM
          - EK
          - RT
          - TC
          - RC
          - SY
      description: Dealer Brand insert request
    AccountingSystemResponse:
      required:
      - code
      - description
      - id
      type: object
      properties:
        id:
          maxLength: 36
          minLength: 36
          type: string
          description: Accounting system ID
          example: c74d4aac-6853-4a94-a5ae-d9369b0da443
        code:
          minLength: 1
          type: string
          description: Accounting system code
          example: MYS
        description:
          minLength: 1
          type: string
          description: Accounting system  name
          example: MYSIM
      description: Accounting system response data
    AccountingSystemRequest:
      required:
      - code
      - description
      type: object
      properties:
        code:
          minLength: 1
          type: string
          description: Code of the accounting system
          example: MYS
        description:
          minLength: 1
          type: string
          description: Description of the accounting system
          example: MYSIM
      description: Accounting System Request
    ActorResponse:
      required:
      - code
      - email
      - id
      - type
      type: object
      properties:
        id:
          type: string
          description: Id of the actor
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
        code:
          type: string
          description: Code of the actor
          example: jjhags123-a1
        name:
          type: string
          description: Name of the actor
          example: Test Name
        surname:
          type: string
          description: Surname of the actor
          example: Test Surname
        type:
          type: string
          description: Enumeration of possible actor types
          example: EMPLOYEE
          enum:
          - EMPLOYEE
          - EXTERNAL_MANAGER
          - HEAD
          - MANAGER
          - COORDINATOR
          - SUPERVISOR
          - TRAINER
          - INTERNAL_POS_MANAGER
          - EXTERNAL_POS_MANAGER
          - TERRITORIAL
          - NATIONAL
          - KAM
        email:
          type: string
          description: Email of the actor
          example: test@masmovil.es
        parent_id:
          type: string
          description: parentId if exist
          example: DEAL-1233
        parent_code:
          type: string
          description: parentCode if exist
          example: DEAL-6370
        relation_type:
          type: string
          description: Enumeration of possible relations between actors and dealers
          example: DIRECT
          enum:
          - DIRECT_AND_INDIRECT
          - DIRECT
          - INDIRECT
      description: Actor information
    ActorInsertRequest:
      required:
      - code
      - email
      - name
      - type
      type: object
      properties:
        code:
          minLength: 1
          type: string
          description: Code of the actor
          example: GTRW12341A
        name:
          minLength: 1
          type: string
          description: Name of the actor
          example: Test Name
        surname:
          type: string
          description: Surname of the actor msisdn
          example: Surname Test
        type:
          minLength: 1
          type: string
          description: Enumeration of possible actor types
          example: EMPLOYEE
          enum:
          - EMPLOYEE
          - EXTERNAL_MANAGER
          - HEAD
          - MANAGER
          - COORDINATOR
          - SUPERVISOR
          - TRAINER
          - INTERNAL_POS_MANAGER
          - EXTERNAL_POS_MANAGER
          - TERRITORIAL
          - NATIONAL
          - KAM
        email:
          minLength: 1
          type: string
          description: Email of the actor
          format: email
          example: test@masmovil.es
        parent_id:
          minLength: 1
          type: string
          description: parentId if exist
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
      description: Actor Request
    DealerBillingRequest:
      required:
      - billing_dealer_id
      type: object
      properties:
        billing_dealer_id:
          type: string
          description: Id of the dealer that bill. UUID for V2 or id for V1
      description: Dealer Billing Request
    CommercialStructureRequest:
      required:
      - channel_name
      - masterchannel_name
      - masterchannel_type
      - subchannel_code
      - subchannel_name
      - superchannel_name
      type: object
      properties:
        subchannel_code:
          maxLength: 10
          minLength: 1
          type: string
          description: Subchannel code
          example: AC
        subchannel_name:
          maxLength: 100
          minLength: 1
          type: string
          description: Subchannel name
          example: Atención al Cliente
        channel_name:
          maxLength: 100
          minLength: 1
          type: string
          description: Channel name
          example: No exclusivo
        superchannel_name:
          maxLength: 100
          minLength: 1
          type: string
          description: Superchannel name
          example: El supercanal
        masterchannel_name:
          maxLength: 100
          minLength: 1
          type: string
          description: MasterChannel name
          example: No exclusivo
        masterchannel_type:
          maxLength: 100
          minLength: 1
          type: string
          description: MasterChannel type
          example: El mastercanal
      description: Commercial structure request
    CustomInformationResponse:
      required:
      - description
      - id
      - name
      type: object
      properties:
        id:
          type: string
          description: Identifier of the custom information variable
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          description: Name of the custom information variable
          example: Funnel
        description:
          type: string
          description: Description of the custom information variable
          nullable: true
          example: Funnel Access
      description: Custom information creation response with the data of a defined
        custom information variable
    CustomInformationInsertionRequest:
      required:
      - description
      - name
      type: object
      properties:
        name:
          maxLength: 100
          minLength: 1
          type: string
          description: Name of the custom information variable
          example: Funnel
        description:
          maxLength: 100
          minLength: 10
          type: string
          description: Description of the custom information variable
          example: Funnel Access
      description: "Custom information creation request, used to define new custom\
        \ information variable"
    DealerResponseV2:
      required:
      - code
      - commercial_name
      - commercial_structure_id
      - id
      - level
      - status
      type: object
      properties:
        id:
          type: string
          description: Id of the dealer
          example: abcd-1234-xyz
        code:
          type: string
          description: Code of the dealer
          example: COD-123
        commercial_name:
          type: string
          description: CommercialName of the dealer
          example: Testing Test SL
        level:
          type: integer
          description: Level of the dealer
          format: int32
          example: 2
        identity_document:
          $ref: '#/components/schemas/IdentityDocumentResponse'
        ine:
          type: string
          description: INE of the dealer
          example: "123456789012345"
        segment:
          type: string
          description: Segment of the dealer
          example: RESIDENCIAL
          enum:
          - RESIDENCIAL
          - NEGOCIOS
          - NONE
        parent_id:
          type: string
          description: Id of the dealer's parent
          example: abcd-1234-xyz
        parent_code:
          type: string
          description: Code of the dealer's parent
          example: COD-123
        commercial_structure_id:
          type: string
          description: Commercial structure id of the dealer
          example: abcd-1234-xyz
        commercial_structure_code:
          type: string
          description: Commercial structure code of the dealer
          example: AC
        status:
          type: string
          description: Enumeration of possible dealer statuses
          example: Activo
          enum:
          - Bloqueado
          - Pendiente
          - Baja
          - Activo
          - Inactivo
          - ""
      description: Dealer information
    IdentityDocumentResponse:
      type: object
      properties:
        type:
          type: string
          description: The document type
          example: NIF
          enum:
          - CC
          - NIF
          - NIE
          - NONE
        value:
          type: string
          description: The document value
          example: 12345678Z
        issuing_country:
          type: string
          description: The issuing country
          example: ES
      description: Legal identification information
    DealerInsertRequest:
      required:
      - code
      - commercial_name
      - commercial_structure_id
      - ine
      - level
      - parent_id
      - segment
      - status
      type: object
      properties:
        code:
          maxLength: 100
          minLength: 1
          pattern: ^\S+$
          type: string
          description: Code of the dealer
          example: ATC12345
        level:
          maximum: 4
          minimum: 1
          type: integer
          description: Level of the dealer
          format: int32
          example: 4
        ine:
          maxLength: 100
          minLength: 1
          type: string
          description: Ine code of the dealer
          nullable: true
          example: "1234567890"
        segment:
          type: string
          description: Segment of the dealer
          nullable: true
          example: RETAIL
          enum:
          - RESIDENCIAL
          - NEGOCIOS
          - NONE
        status:
          minLength: 1
          type: string
          description: Enumeration of possible dealer statuses
          example: Activo
          enum:
          - Bloqueado
          - Pendiente
          - Baja
          - Activo
          - Inactivo
          - ""
        commercial_name:
          maxLength: 100
          minLength: 1
          type: string
          description: Commercial name of the dealer
          example: Test Commercial Name
        identity_document:
          $ref: '#/components/schemas/IdentityDocumentRequest'
        parent_id:
          minLength: 1
          type: string
          description: The parentId of the dealer
          nullable: true
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
        commercial_structure_id:
          minLength: 1
          type: string
          description: The commercialStructureId of the dealer
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
      description: Dealer Insert Request
    IdentityDocumentRequest:
      required:
      - issuing_country
      - type
      - value
      type: object
      properties:
        type:
          type: string
          description: The document type
          nullable: true
          example: NIF
          enum:
          - CC
          - NIF
          - NIE
          - NONE
        value:
          type: string
          description: The document value
          nullable: true
          example: 12345678Z
        issuing_country:
          type: string
          description: The issuing country
          nullable: true
          example: ES
      description: Legal identification information
      nullable: true
    DealerAccountingSystemResponse:
      required:
      - id
      - system
      - username
      type: object
      properties:
        id:
          type: string
          description: Dealer accounting_system entry id (unique identifier)
          example: e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b
        system:
          type: string
          description: Accounting system name
          example: IAM
          enum:
          - MYSIM
          - QVANTEL
          - LUCERA
          - HEOS
          - IAM
          - LEBARA
          - LYCAMOBILE
          - VIRGIN
          - HERO
          - EMBOU
          - SCHAMAN
          - PORTAL DE COMPRAS
          - DIGO
          - SISTEMAS ORANGE SPAIN
          - SAP KRT
          - EKTNET
          - TCNET
          - SIEBEL RCABLE
          - TENDERETE
        username:
          type: string
          description: Username
          example: medias_puri@masmovil.com
      description: Dealer accounting-system response data
    DealerAccountingSystemInsertRequest:
      required:
      - system
      - username
      type: object
      properties:
        username:
          maxLength: 100
          minLength: 1
          type: string
          description: Username
          example: medias_puri@masmovil.com
        system:
          type: string
          description: Accounting system identifier
          example: IAM
          enum:
          - MYSIM
          - QVANTEL
          - LUCERA
          - HEOS
          - IAM
          - LEBARA
          - LYCAMOBILE
          - VIRGIN
          - HERO
          - EMBOU
          - SCHAMAN
          - PORTAL DE COMPRAS
          - DIGO
          - SISTEMAS ORANGE SPAIN
          - SAP KRT
          - EKTNET
          - TCNET
          - SIEBEL RCABLE
          - TENDERETE
      description: Dealer accounting-system insertion request
    DealerContactResponse:
      required:
      - dealer_id
      - email
      - id
      - name
      - phone_number
      - purposes
      type: object
      properties:
        id:
          type: string
          description: Unique contact ID (UUID)
          example: e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b
        dealer_id:
          type: string
          description: Dealer ID to which the contact belongs
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
        name:
          type: string
          description: Contact name
          nullable: true
          example: John Doe
        email:
          type: string
          description: Contact email
          nullable: true
          example: contactmail@example.es
        phone_number:
          type: string
          description: Contact phoneNumber number
          nullable: true
        purposes:
          type: array
          description: "Contact purposes: [Gerencia, Comercial, Logística, Informes,\
            \ Facturación, Incidencias, Público]"
          nullable: true
          example: "[Comercial, Facturación]"
          items:
            type: string
            description: "Contact purposes: [Gerencia, Comercial, Logística, Informes,\
              \ Facturación, Incidencias, Público]"
            nullable: true
            example: "[Comercial, Facturación]"
    DealerContactInsertRequest:
      required:
      - email
      - name
      - phone_number
      - purposes
      type: object
      properties:
        name:
          maxLength: 100
          minLength: 1
          type: string
          description: Contact name
          example: John Doe
        email:
          maxLength: 100
          minLength: 1
          pattern: "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*+@(?:[a-zA-Z0-9-]+\\\
            .)++[a-zA-Z]{2,}$"
          type: string
          description: Contact email
          format: email
          nullable: true
          example: contactmail@example.es
        phone_number:
          maxLength: 100
          minLength: 1
          pattern: "^(\\+\\d{1,3})?\\d{9}$"
          type: string
          description: Contact phoneNumber number
          nullable: true
          example: "600123456"
        purposes:
          type: array
          description: "Contact purposes: [Gerencia, Comercial, Logística, Informes,\
            \ Facturación, Incidencias, Público]"
          nullable: true
          example: "[Comercial, Facturación]"
          items:
            type: string
            description: "Contact purposes: [Gerencia, Comercial, Logística, Informes,\
              \ Facturación, Incidencias, Público]"
            nullable: true
            example: "[Comercial, Facturación]"
      description: Dealer contact creation request
    DealerCustomInformationResponse:
      required:
      - dealer_id
      - field_id
      - field_name
      - field_value
      - id
      type: object
      properties:
        id:
          type: string
          description: Identifier of the dealer <-> custom information variable assignation
            relationship
          example: 7944a62c-98fc-40e6-a914-d49479eeb53f
        dealer_id:
          type: string
          description: Identifier of the dealer to whom the custom information variable
            value is assigned
          example: 123e4567-e89b-12d3-a456-426614174000
        field_id:
          type: string
          description: Id of the custom information variable definition
          example: 48f7917f-9d0f-43d3-95c8-f8038d4c954e
        field_name:
          type: string
          description: Id of the custom information variable definition
          example: '@Funnel'
        field_value:
          type: string
          description: Value for the custom information variable assigned to dealer
          example: "Yes"
      description: "Dealer custom information response data, represents the assignation\
        \ of the custom information variable value to a dealer"
    DealerCustomInformationInsertionRequest:
      required:
      - field_id
      - field_value
      type: object
      properties:
        field_id:
          type: string
          description: Id of the custom information variable definition
          example: 48f7917f-9d0f-43d3-95c8-f8038d4c954e
        field_value:
          maxLength: 100
          minLength: 1
          type: string
          description: Value of the custom information variable
          example: "Yes"
      description: "Dealer custom information insertion request, used to create the\
        \ assignation of the custom information variable value to a dealer"
    TicketConfigInsertRequest:
      type: object
      properties:
        commercialName:
          type: string
          description: Commercial name of the ticket config
          example: Test Commercial Name
        address:
          type: string
          description: Address of the ticket config
          example: Test Address
        city:
          type: string
          description: City of the ticket config
          example: Test City
        province:
          type: string
          description: Province of the ticket config
          example: Test Province
        postalCode:
          type: string
          description: Postal code of the ticket config
          example: "12345"
        country:
          type: string
          description: Country of the ticket config
          example: Test Country
        printType:
          type: string
          description: Print type of the ticket config
          example: A4
        identity_document:
          $ref: '#/components/schemas/IdentityDocumentRequest'
      description: TicketConfig Request
    AccountingSystemPaginatedResponse:
      required:
      - items
      type: object
      properties:
        offset:
          type: integer
          description: Offset used to paginate in conjunction with limit
          format: int32
          example: 0
        limit:
          type: integer
          description: Max number of results of the response
          format: int32
          example: 10
        total:
          type: integer
          description: Total number of records
          format: int32
          example: 100
        sort:
          type: string
          description: The fields by which the results will be sorted. It can be a
            list of fields separated by commas
          example: id:asc
        items:
          type: array
          description: List of items
          items:
            $ref: '#/components/schemas/AccountingSystemResponse'
      description: Response containing the paginated collection of accounting system
        variable definitions
    ActorTypeListApiModelRequest:
      type: object
      properties:
        actorTypes:
          type: array
          description: List of actor types
          items:
            type: string
            description: Enumeration of possible actor types
            enum:
            - EMPLOYEE
            - EXTERNAL_MANAGER
            - HEAD
            - MANAGER
            - COORDINATOR
            - SUPERVISOR
            - TRAINER
            - INTERNAL_POS_MANAGER
            - EXTERNAL_POS_MANAGER
            - TERRITORIAL
            - NATIONAL
            - KAM
      description: List of actor types
    ActorsResponse:
      required:
      - items
      type: object
      properties:
        offset:
          type: integer
          description: Offset used to paginate in conjunction with limit
          format: int32
          example: 0
        limit:
          type: integer
          description: Max number of results of the response
          format: int32
          example: 10
        total:
          type: integer
          description: Total number of records
          format: int32
          example: 100
        sort:
          type: string
          description: The fields by which the results will be sorted. It can be a
            list of fields separated by commas
          example: id:asc
        items:
          type: array
          description: List of items
          items:
            $ref: '#/components/schemas/ActorResponse'
      description: Response containing the list of actors
    ActorTypeResponse:
      required:
      - types
      type: object
      properties:
        types:
          type: array
          description: List of actor types
          items:
            type: string
            description: Enumeration of possible actor types
            enum:
            - EMPLOYEE
            - EXTERNAL_MANAGER
            - HEAD
            - MANAGER
            - COORDINATOR
            - SUPERVISOR
            - TRAINER
            - INTERNAL_POS_MANAGER
            - EXTERNAL_POS_MANAGER
            - TERRITORIAL
            - NATIONAL
            - KAM
      description: All the actor types available
    BillingOfDealerResponseV1:
      required:
      - billing_dealer
      - dealer_id
      type: object
      properties:
        dealer_id:
          type: integer
          description: Id of the dealer
          format: int32
          example: 12344567
        billing_dealer:
          $ref: '#/components/schemas/BillingResponse'
      description: Response with the information of the billing of a dealer
    BillingResponse:
      required:
      - code
      - commercial_name
      - id
      type: object
      properties:
        id:
          type: string
          description: Id of the dealer. UUID for V2 and id for V1
          example: aaa-bbb-ccc-111-ddd
        code:
          type: string
          description: Code of the dealer
          example: COD-123
        commercial_name:
          type: string
          description: CommercialName of the dealer
          example: Testing Test SL
        identity_document:
          $ref: '#/components/schemas/IdentityDocumentResponse'
      description: Information of the billing of a dealer
    BillingOfDealerResponse:
      required:
      - billing_dealer
      - dealer_id
      type: object
      properties:
        dealer_id:
          type: string
          description: Id of the dealer. Uuid for V2 and id for V1
          example: aaa-bbb-ccc-111-ddd
        billing_dealer:
          $ref: '#/components/schemas/BillingResponse'
      description: Response with the information of the billing of a dealer
    BrandResponse:
      required:
      - brand
      - code
      type: object
      properties:
        code:
          minLength: 1
          type: string
          description: Brand codes enumeration
          example: YG
          enum:
          - GU
          - PP
          - YG
          - LE
          - MM
          - LY
          - LL
          - VI
          - EB
          - AH
          - AL
          - BT
          - SW
          - JI
          - MB
          - ST
          - PM
          - EK
          - RT
          - TC
          - RC
          - SY
        brand:
          minLength: 1
          type: string
          description: Brand name
          example: yoigo
      description: Brand response data
    CommercialStructureResponse:
      required:
      - id
      - masterchannel_name
      - subchannel_code
      - subchannel_name
      type: object
      properties:
        id:
          minLength: 1
          type: string
          description: Commercial structure id
          example: aeb857a4-a1b2-4148-b733-9af8a9e13339
        subchannel_code:
          minLength: 1
          type: string
          description: Subchannel code
          example: AC
        subchannel_name:
          minLength: 1
          type: string
          description: Subchannel name
          example: Atención al Cliente
        channel_name:
          minLength: 1
          type: string
          description: Channel name
        superchannel_name:
          minLength: 1
          type: string
          description: Superchannel name
        masterchannel_name:
          minLength: 1
          type: string
          description: Masterchannel name
          example: No exclusivo
        masterchannel_type:
          minLength: 1
          type: string
          description: Masterchannel type
      description: Commercial structure response data
    CustomInformationPaginatedResponse:
      required:
      - items
      type: object
      properties:
        offset:
          type: integer
          description: Offset used to paginate in conjunction with limit
          format: int32
          example: 0
        limit:
          type: integer
          description: Max number of results of the response
          format: int32
          example: 10
        total:
          type: integer
          description: Total number of records
          format: int32
          example: 100
        sort:
          type: string
          description: The fields by which the results will be sorted. It can be a
            list of fields separated by commas
          example: id:asc
        items:
          type: array
          description: List of items
          items:
            $ref: '#/components/schemas/CustomInformationResponse'
      description: Response containing the paginated collection of custom information
        variable definitions
    DealerAddressResponse:
      required:
      - address
      - city
      - country
      - dealer_id
      - id
      - postal_code
      - province
      type: object
      properties:
        id:
          type: string
          description: Dealer Address entry id (unique identifier)
          example: e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b
        dealer_id:
          type: string
          description: Dealer id (unique identifier)
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
        address:
          type: string
          description: Street address
          example: Calle Gran Vía 28
        city:
          type: string
          description: City
          example: Madrid
        province:
          type: string
          description: Province
          example: Madrid
        postal_code:
          type: string
          description: Postal code
          example: "28013"
        country:
          type: string
          description: Country
          example: España
        location:
          type: string
          description: Geographic coordinates
          example: "40.4199,-3.7065"
      description: Dealer Address response data
    DealerBrandResponse:
      required:
      - brand
      - brand_code
      - dealer_id
      type: object
      properties:
        brand:
          minLength: 1
          type: string
          description: Brand name
          example: yoigo
        dealer_id:
          type: string
          description: The id of the dealer that has the brand and refers to
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
        brand_code:
          minLength: 1
          type: string
          description: Brand codes enumeration
          example: YG
          enum:
          - GU
          - PP
          - YG
          - LE
          - MM
          - LY
          - LL
          - VI
          - EB
          - AH
          - AL
          - BT
          - SW
          - JI
          - MB
          - ST
          - PM
          - EK
          - RT
          - TC
          - RC
          - SY
      description: Dealer Brand response data
    DealerCustomInformationPaginatedResponse:
      required:
      - items
      type: object
      properties:
        offset:
          type: integer
          description: Offset used to paginate in conjunction with limit
          format: int32
          example: 0
        limit:
          type: integer
          description: Max number of results of the response
          format: int32
          example: 10
        total:
          type: integer
          description: Total number of records
          format: int32
          example: 100
        sort:
          type: string
          description: The fields by which the results will be sorted. It can be a
            list of fields separated by commas
          example: id:asc
        items:
          type: array
          description: List of items
          items:
            $ref: '#/components/schemas/DealerCustomInformationResponse'
      description: Response containing the paginated collection of custom information
        assigned variables values
    DealerStoreCapabilityResponse:
      required:
      - dealer_id
      - device_return
      - sim_duplicate
      - store_delivery
      - store_type
      type: object
      properties:
        id:
          type: string
          description: The id of the store capability. It is generated automatically
            when creating a new record
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
        dealer_id:
          type: string
          description: The id of the dealer that store capability refers to
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
        store_delivery:
          type: boolean
          description: "Indicates if the store has delivery capability, if it can\
            \ delivery products"
          example: true
        device_return:
          type: boolean
          description: "Indicates if the store has device return capability, if it\
            \ can receive devices returns"
          example: true
        sim_duplicate:
          type: boolean
          description: "Indicates if the store has sim duplicate capability, if it\
            \ can manage sim duplicates"
          example: true
        store_type:
          type: string
          description: Type of the store
          example: BASIC
      description: Dealer store capability response data
    TicketConfigResponse:
      required:
      - address
      - city
      - commercialName
      - country
      - dealerId
      - id
      - postalCode
      - province
      type: object
      properties:
        id:
          type: string
          description: Id of the ticket config
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
        commercialName:
          type: string
          description: Commercial name of the ticket config
          example: Test Commercial Name
        address:
          type: string
          description: Address of the ticket config
          example: Test Address
        city:
          type: string
          description: City of the ticket config
          example: Test City
        province:
          type: string
          description: Province of the ticket config
          example: Test Province
        postalCode:
          type: string
          description: Postal code of the ticket config
          example: "12345"
        country:
          type: string
          description: Country of the ticket config
          example: Test Country
        dealerId:
          type: string
          description: Dealer uuid related to the ticket config
          example: aaa-bbb-ccc-111-ddd
        printType:
          type: string
          description: Print type of the ticket config
          example: A4
        identity_document:
          $ref: '#/components/schemas/IdentityDocumentResponse'
      description: Ticket config information
    DealersResponseV2:
      required:
      - items
      type: object
      properties:
        offset:
          type: integer
          description: Offset used to paginate in conjunction with limit
          format: int32
          example: 0
        limit:
          type: integer
          description: Max number of results of the response
          format: int32
          example: 10
        total:
          type: integer
          description: Total number of records
          format: int32
          example: 100
        sort:
          type: string
          description: The fields by which the results will be sorted. It can be a
            list of fields separated by commas
          example: id:asc
        items:
          type: array
          description: List of items
          items:
            $ref: '#/components/schemas/DealerResponseV2'
      description: Response containing the list of dealers
    DealerResponse:
      required:
      - code
      - commercial_name
      - id
      - level_id
      - status_code
      - subchannel_code
      - subchannel_id
      type: object
      properties:
        id:
          type: integer
          description: Id of the dealer
          format: int32
          example: 12344567
        code:
          type: string
          description: Code of the dealer
          example: COD-123
        commercial_name:
          type: string
          description: CommercialName of the dealer
          example: Testing Test SL
        level_id:
          type: integer
          description: Level of the dealer
          format: int32
          example: 2
        status_code:
          type: string
          description: Status of the dealer
          example: ACTIVO
        subchannel_id:
          type: string
          description: Subchannel of the dealer
          example: "1"
        subchannel_code:
          type: string
          description: Subchannel code of the dealer
          example: "1"
        subchannel_name:
          type: string
          description: Subchannel name of dealer's referenced subchannel_id
          example: Atención al Cliente
        relation_type:
          type: string
          description: Enumeration of possible relations between actors and dealers
          example: DIRECT
          enum:
          - DIRECT_AND_INDIRECT
          - DIRECT
          - INDIRECT
        parent_id:
          type: integer
          description: Id of the parent dealer
          format: int32
          example: 54321
        parent_code:
          type: string
          description: Code of the parent dealer
          example: COD-P123
      description: Dealer information
    DealersResponse:
      required:
      - items
      type: object
      properties:
        offset:
          type: integer
          description: Offset used to paginate in conjunction with limit
          format: int32
          example: 0
        limit:
          type: integer
          description: Max number of results of the response
          format: int32
          example: 10
        total:
          type: integer
          description: Total number of records
          format: int32
          example: 100
        sort:
          type: string
          description: The fields by which the results will be sorted. It can be a
            list of fields separated by commas
          example: id:asc
        items:
          type: array
          description: List of items
          items:
            $ref: '#/components/schemas/DealerResponse'
      description: Response containing the list of dealers
    DealerRelatedToActorResponse:
      required:
      - code
      - commercial_name
      - commercial_structure_id
      - id
      - level
      - status
      type: object
      properties:
        id:
          type: string
          description: Id of the dealer
          example: abcd-1234-xyz
        code:
          type: string
          description: Code of the dealer
          example: COD-123
        relationType:
          type: string
          description: Enumeration of possible relations between actors and dealers
          example: DIRECT
          enum:
          - DIRECT_AND_INDIRECT
          - DIRECT
          - INDIRECT
        commercial_name:
          type: string
          description: CommercialName of the dealer
          example: Testing Test SL
        level:
          type: integer
          description: Level of the dealer
          format: int32
          example: 2
        identity_document:
          $ref: '#/components/schemas/IdentityDocumentResponse'
        ine:
          type: string
          description: INE of the dealer
          example: "123456789012345"
        segment:
          type: string
          description: Segment of the dealer
          example: RESIDENCIAL
          enum:
          - RESIDENCIAL
          - NEGOCIOS
          - NONE
        parent_id:
          type: string
          description: Id of the dealer's parent
          example: abcd-1234-xyz
        parent_code:
          type: string
          description: Code of the dealer's parent
          example: COD-123
        commercial_structure_id:
          type: string
          description: Commercial structure id of the dealer
          example: abcd-1234-xyz
        commercial_structure_code:
          type: string
          description: Commercial structure code of the dealer
          example: AC
        status:
          type: string
          description: Enumeration of possible dealer statuses
          example: Activo
          enum:
          - Bloqueado
          - Pendiente
          - Baja
          - Activo
          - Inactivo
          - ""
      description: Dealer information of a dealer related to an actor
    DealersRelatedToActorResponse:
      required:
      - items
      type: object
      properties:
        offset:
          type: integer
          description: Offset used to paginate in conjunction with limit
          format: int32
          example: 0
        limit:
          type: integer
          description: Max number of results of the response
          format: int32
          example: 10
        total:
          type: integer
          description: Total number of records
          format: int32
          example: 100
        sort:
          type: string
          description: The fields by which the results will be sorted. It can be a
            list of fields separated by commas
          example: id:asc
        items:
          type: array
          description: List of items
          items:
            $ref: '#/components/schemas/DealerRelatedToActorResponse'
      description: Response containing the list of dealers related to an actor
    PublicContactResponse:
      required:
      - name
      type: object
      properties:
        name:
          type: string
          description: Contact name
          example: Atención tienda
        phone_number:
          type: string
          description: Contact phone number
          example: "900000000"
        email:
          type: string
          description: Contact email
          example: tienda@ejemplo.es
      description: Public contact information for a store
    StoreAddressInfoResponse:
      required:
      - address
      - city
      - country
      - postal_code
      - province
      type: object
      properties:
        address:
          type: string
          description: Street address
          example: Gran Via 28
        city:
          type: string
          description: City
          example: Madrid
        province:
          type: string
          description: Province
          example: Madrid
        postal_code:
          type: string
          description: Postal code
          example: "28013"
        country:
          type: string
          description: Country
          example: España
        location:
          $ref: '#/components/schemas/StoreLocationResponse'
      description: Store address information
    StoreBrandResponse:
      required:
      - brand
      - brand_code
      type: object
      properties:
        brand:
          type: string
          description: Brand name
          example: yoigo
        brand_code:
          type: string
          description: Brand code
          example: YG
      description: Store brand information
    StoreCapabilityResponse:
      required:
      - device_return
      - sim_duplicate
      - store_delivery
      type: object
      properties:
        store_delivery:
          type: boolean
          description: Indicates if the store has delivery capability
          example: true
        device_return:
          type: boolean
          description: Indicates if the store has device return capability
          example: true
        sim_duplicate:
          type: boolean
          description: Indicates if the store has sim duplicate capability
          example: false
        store_type:
          type: string
          description: Type of the store
          example: BASIC
      description: Store capability information
    StoreLocationResponse:
      required:
      - latitude
      - longitude
      type: object
      properties:
        latitude:
          type: number
          description: Latitude coordinate
          format: double
          example: 40.4199
        longitude:
          type: number
          description: Longitude coordinate
          format: double
          example: -3.7065
      description: Geographic location coordinates
    StoreResponse:
      required:
      - commercial_name
      - dealer_code
      - dealer_id
      - distance_km
      type: object
      properties:
        dealer_id:
          type: string
          description: Unique identifier of the dealer
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
        dealer_code:
          type: string
          description: Dealer code
          example: ST0001
        commercial_name:
          type: string
          description: Commercial name of the store
          example: Tienda Gran Via
        distance_km:
          type: number
          description: Distance from search location in kilometers
          format: double
          example: 1.234
        address_info:
          $ref: '#/components/schemas/StoreAddressInfoResponse'
        public_contacts:
          type: array
          description: Public contact information
          items:
            $ref: '#/components/schemas/PublicContactResponse'
        store_capability:
          $ref: '#/components/schemas/StoreCapabilityResponse'
        brands:
          type: array
          description: Brands available at the store
          items:
            $ref: '#/components/schemas/StoreBrandResponse'
        subchannel_code:
          type: string
          description: Commercial subchannel code
          example: RETAIL
      description: Store information with location and capabilities
    StoresResponse:
      required:
      - items
      type: object
      properties:
        offset:
          type: integer
          description: Offset used to paginate in conjunction with limit
          format: int32
          example: 0
        limit:
          type: integer
          description: Max number of results of the response
          format: int32
          example: 10
        total:
          type: integer
          description: Total number of records
          format: int32
          example: 100
        sort:
          type: string
          description: The fields by which the results will be sorted. It can be a
            list of fields separated by commas
          example: id:asc
        items:
          type: array
          description: List of items
          items:
            $ref: '#/components/schemas/StoreResponse'
      description: Response containing the list of stores with pagination metadata
    LoadsResponse:
      type: object
      properties:
        message:
          type: string
    FixGeocodingDealer:
      required:
      - dealer_id
      type: object
      properties:
        dealer_id:
          type: integer
          description: The dealerId to identify a specific dealer
          format: int32
      description: "Fix geocoding unit information, the dealer id that was processed\
        \ to fix the geocoding"
    FixGeocodingResponse:
      required:
      - modified_dealers_ids
      - not_modified_dealers_ids
      type: object
      properties:
        modified_dealers_ids:
          type: array
          description: The list of the dealers that were modified
          items:
            $ref: '#/components/schemas/FixGeocodingDealer'
        not_modified_dealers_ids:
          type: array
          description: The list of the dealers that were NOT modified
          items:
            $ref: '#/components/schemas/FixGeocodingDealer'
      description: Fix geocoding response information
    ActorUpdateRequest:
      required:
      - email
      - name
      - parent_id
      - surname
      - type
      type: object
      properties:
        name:
          minLength: 1
          type: string
          description: Name of the actor
          example: Test Name
        surname:
          minLength: 1
          type: string
          description: Surname of the actor msisdn
          example: Surname Test
        type:
          minLength: 1
          type: string
          description: Enumeration of possible actor types
          example: EMPLOYEE
          enum:
          - EMPLOYEE
          - EXTERNAL_MANAGER
          - HEAD
          - MANAGER
          - COORDINATOR
          - SUPERVISOR
          - TRAINER
          - INTERNAL_POS_MANAGER
          - EXTERNAL_POS_MANAGER
          - TERRITORIAL
          - NATIONAL
          - KAM
        email:
          minLength: 1
          type: string
          description: Email of the actor
          format: email
          example: test@masmovil.es
        parent_id:
          type: string
          description: parentId for the actor. null if none
          nullable: true
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
      description: Update Actor Request
    CustomInformationUpdateRequest:
      required:
      - description
      - name
      type: object
      properties:
        name:
          maxLength: 100
          minLength: 1
          type: string
          description: Name of the custom information variable
          example: Funnel
        description:
          maxLength: 100
          minLength: 10
          type: string
          description: Description of the custom information variable
          example: Funnel Access
      description: "Custom information update request, used to update information\
        \ variable definition"
    DealerUpdateRequest:
      required:
      - code
      - commercial_name
      - commercial_structure_id
      - ine
      - level
      - parent_id
      - segment
      - status
      type: object
      properties:
        level:
          maximum: 4
          minimum: 1
          type: integer
          description: Level of the dealer
          format: int32
          example: 4
        ine:
          maxLength: 100
          minLength: 1
          type: string
          description: Ine code of the dealer
          nullable: true
          example: "1234567890"
        segment:
          type: string
          description: Segment of the dealer
          nullable: true
          example: RETAIL
          enum:
          - RESIDENCIAL
          - NEGOCIOS
          - NONE
        status:
          minLength: 1
          type: string
          description: Enumeration of possible dealer statuses
          example: Activo
          enum:
          - Bloqueado
          - Pendiente
          - Baja
          - Activo
          - Inactivo
          - ""
        code:
          maxLength: 50
          minLength: 1
          type: string
          description: Code of the dealer
          nullable: true
          example: DEALER001
        commercial_name:
          maxLength: 100
          minLength: 1
          type: string
          description: Commercial name of the dealer
          example: Test Commercial Name
        identity_document:
          $ref: '#/components/schemas/IdentityDocumentRequest'
        parent_id:
          minLength: 1
          type: string
          description: The parentId of the dealer
          nullable: true
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
        commercial_structure_id:
          minLength: 1
          type: string
          description: The commercialStructureId of the dealer
          example: d39cb65f-1aa8-44fe-a3d8-d310e321331a
      description: Update Actor Request
    DealerAccountingSystemUpdateRequest:
      required:
      - username
      type: object
      properties:
        username:
          maxLength: 100
          minLength: 1
          type: string
          description: Username
          example: medias_puri@masmovil.com
      description: Dealer accounting-system update request
    DealerContactUpdateRequest:
      required:
      - email
      - name
      - phone_number
      - purposes
      type: object
      properties:
        name:
          maxLength: 100
          minLength: 1
          type: string
          description: Contact name
          example: John Doe
        email:
          maxLength: 100
          minLength: 1
          pattern: "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*+@(?:[a-zA-Z0-9-]+\\\
            .)++[a-zA-Z]{2,}$"
          type: string
          description: Contact email
          format: email
          nullable: true
          example: contactmail@example.es
        phone_number:
          maxLength: 100
          minLength: 1
          pattern: "^(\\+\\d{1,3})?\\d{9}$"
          type: string
          description: Contact phoneNumber number
          nullable: true
          example: "600123456"
        purposes:
          type: array
          description: "Contact purposes: [Gerencia, Comercial, Logística, Informes,\
            \ Facturación, Incidencias, Público]"
          nullable: true
          example: "[Comercial, Facturación]"
          items:
            type: string
            description: "Contact purposes: [Gerencia, Comercial, Logística, Informes,\
              \ Facturación, Incidencias, Público]"
            nullable: true
            example: "[Comercial, Facturación]"
      description: Dealer contact update request
    DealerCustomInformationUpdateRequest:
      required:
      - field_value
      type: object
      properties:
        field_value:
          maxLength: 100
          minLength: 1
          type: string
          description: Value of the custom information variable
          example: "Yes"
      description: "Dealer custom information update request, used to update the custom\
        \ information variable value previously assigned to a dealer"
    TicketConfigUpdateRequest:
      required:
      - address
      - city
      - commercialName
      - country
      - postalCode
      - printType
      - province
      type: object
      properties:
        commercialName:
          type: string
          description: Commercial name of the ticket config
          example: Test Commercial Name
        address:
          type: string
          description: Address of the ticket config
          example: Test Address
        city:
          type: string
          description: City of the ticket config
          example: Test City
        province:
          type: string
          description: Province of the ticket config
          example: Test Province
        postalCode:
          type: string
          description: Postal code of the ticket config
          example: "12345"
        country:
          type: string
          description: Country of the ticket config
          example: Test Country
        printType:
          type: string
          description: Print type of the ticket config
          example: A4
        identity_document:
          $ref: '#/components/schemas/IdentityDocumentRequest'
      description: TicketConfig Request
    DealerAddressCreateUpdateRequest:
      required:
      - address
      - city
      - country
      - postal_code
      - province
      type: object
      properties:
        address:
          maxLength: 100
          minLength: 1
          type: string
          description: Street address
          example: Calle Gran Vía 28
        city:
          maxLength: 100
          minLength: 1
          type: string
          description: City
          example: Madrid
        province:
          maxLength: 100
          minLength: 1
          type: string
          description: Province
          example: Madrid
        country:
          maxLength: 100
          minLength: 1
          type: string
          description: Country
          example: España
        postal_code:
          maxLength: 10
          minLength: 1
          type: string
          description: Postal code
          example: "28013"
      description: Dealer Address insertion request
    DealerStoreCapabilityCreateUpdateRequest:
      required:
      - device_return
      - sim_duplicate
      - store_delivery
      - store_type
      type: object
      properties:
        store_delivery:
          type: boolean
          description: "Indicates if the store has delivery capability, if it can\
            \ delivery products"
          example: true
        device_return:
          type: boolean
          description: "Indicates if the store has device return capability, if it\
            \ can receive devices returns"
          example: true
        sim_duplicate:
          type: boolean
          description: "Indicates if the store has sim duplicate capability, if it\
            \ can manage sim duplicates"
          example: true
        store_type:
          minLength: 1
          type: string
          description: Type of the store
          nullable: true
          example: BASIC
      description: Dealer store capability Create/Update request
