Palenca (Vech) internal/accounts API

The internal/accounts API from Palenca (Vech) — 5 operation(s) for internal/accounts.

OpenAPI Specification

palenca-vech-internal-accounts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Palenca accounts internal/accounts API
  description: Palenca API
  version: 2.0.0
tags:
- name: internal/accounts
paths:
  /v1/internal/accounts/{account_id}:
    get:
      tags:
      - internal/accounts
      summary: Retrieve Account By Id
      operationId: retrieve_account_by_id_v1_internal_accounts__account_id__get
      parameters:
      - required: true
        schema:
          type: string
          format: uuid
          title: Account Id
        name: account_id
        in: path
      - required: false
        schema:
          type: string
          title: Accept-Language
        name: accept-language
        in: header
      - required: false
        schema:
          type: string
          title: X-Api-Key
        name: x-api-key
        in: header
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_AccountBaseResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/internal/accounts/{account_id}/employment:
    get:
      tags:
      - internal/accounts
      summary: Retrieve Account Employment By Account Id
      operationId: retrieve_account_employment_by_account_id_v1_internal_accounts__account_id__employment_get
      parameters:
      - required: true
        schema:
          type: string
          format: uuid
          title: Account Id
        name: account_id
        in: path
      - required: false
        schema:
          type: string
          title: X-Api-Key
        name: x-api-key
        in: header
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_AccountBaseResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - internal/accounts
      summary: Store Profile Insights
      operationId: store_profile_insights_v1_internal_accounts__account_id__employment_post
      parameters:
      - required: true
        schema:
          type: string
          format: uuid
          title: Account Id
        name: account_id
        in: path
      - required: false
        schema:
          type: string
          title: X-Api-Key
        name: x-api-key
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmploymentDataParams'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/internal/companies/{company_id}/users/{user_id}/accounts:
    get:
      tags:
      - internal/accounts
      summary: Retrieve Accounts By User Id
      operationId: retrieve_accounts_by_user_id_v1_internal_companies__company_id__users__user_id__accounts_get
      parameters:
      - required: true
        schema:
          type: string
          format: uuid
          title: Company Id
        name: company_id
        in: path
      - required: true
        schema:
          type: string
          format: uuid
          title: User Id
        name: user_id
        in: path
      - required: false
        schema:
          type: string
          title: X-Api-Key
        name: x-api-key
        in: header
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_AccountBaseResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/internal/companies/{company_id}/accounts/{account_id}/retry:
    post:
      tags:
      - internal/accounts
      summary: Retry Account
      operationId: retry_account_v1_internal_companies__company_id__accounts__account_id__retry_post
      parameters:
      - required: true
        schema:
          type: string
          format: uuid
          title: Company Id
        name: company_id
        in: path
      - required: true
        schema:
          type: string
          format: uuid
          title: Account Id
        name: account_id
        in: path
      - required: false
        schema:
          type: string
          title: X-Api-Key
        name: x-api-key
        in: header
      requestBody:
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/RetryLoginOptions'
              title: Retry Options
              default:
                force_retry: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_AccountBaseResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/internal/accounts/{account_id}/last_login:
    patch:
      tags:
      - internal/accounts
      summary: Update Account Last Login
      operationId: update_account_last_login_v1_internal_accounts__account_id__last_login_patch
      parameters:
      - required: true
        schema:
          type: string
          format: uuid
          title: Account Id
        name: account_id
        in: path
      - required: false
        schema:
          type: string
          title: X-Api-Key
        name: x-api-key
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLoginParams'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    LoginStatus:
      enum:
      - created
      - success
      - retry
      - incomplete
      - error
      - pending
      - requires_auth
      - profile_unavailable
      - error_credentials
      - error_otp
      - pending_for_data
      - validation_pending
      - password_validation_pending
      title: LoginStatus
      description: An enumeration.
    AccountBaseResponse:
      properties:
        account_id:
          type: string
          format: uuid
          title: Account Id
        country:
          $ref: '#/components/schemas/CountryCode'
        platform:
          $ref: '#/components/schemas/PlatformCode'
        identifier:
          type: string
          title: Identifier
        worker_id:
          type: string
          title: Worker Id
        gov_id:
          type: string
          title: Gov Id
        last_successful_connection:
          type: string
          format: date-time
          title: Last Successful Connection
        warning:
          $ref: '#/components/schemas/AccountWarning'
        status:
          $ref: '#/components/schemas/LoginStatus'
        status_details:
          $ref: '#/components/schemas/StatusDetails'
        message:
          type: string
          title: Message
        recommendation:
          type: string
          title: Recommendation
        next_step:
          $ref: '#/components/schemas/LoginTypes'
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
      - account_id
      title: AccountBaseResponse
    IdType:
      enum:
      - tax
      - passport
      - national
      - social_security_number
      - individual_taxpayer_registry
      title: IdType
      description: An enumeration.
    Gender:
      enum:
      - male
      - female
      - other
      title: Gender
      description: An enumeration.
    CountryCode:
      enum:
      - mx
      - co
      - br
      - ar
      - cl
      - pe
      - us
      - cr
      - pa
      - ec
      - bo
      - ve
      - sv
      - do
      title: CountryCode
      description: An enumeration.
    InsightsStatusDetails:
      enum:
      - empty_employment_events
      - empty_employment_history
      - login_not_success
      - timeout_request
      - lambda_error
      - pending
      title: InsightsStatusDetails
      description: An enumeration.
    CivilStatus:
      enum:
      - single
      - married
      title: CivilStatus
      description: An enumeration.
    PlatformCode:
      enum:
      - uber
      - didi
      - imss
      - rappi
      - osmos
      - pemex
      - picap
      - ifood
      - issste
      - cabify
      - workday
      - indriver
      - uber_eats
      - didi_food
      - pedidos_ya
      - noventa_nove
      - mensajeros_urbanos
      - rapiboy
      - nueve_nueve_minutos
      - carteira_trabalho
      - mercado_pago
      - nom_gob_cdmx
      - nom_salud_cdmx
      - nom_sep_cdmx
      - nom_sep_qro
      - nom_gob_hidalgo
      - nom_sep_durango
      - nom_ayto_cancun
      - nom_sep_qroo
      - nom_gob_qroo
      - nom_salud_qroo
      - nom_sep_campeche
      - nom_gob_oaxaca
      - nom_sep_oaxaca
      - nom_pensiones_jal
      - nom_gob_nl
      - nom_gob_tamps
      - nom_salud_tamps
      - nom_fiscalia_tamps
      - nom_gob_sonora
      - nom_sep_sonora
      - nom_salud_sonora
      - nom_sep_bcsur
      - nom_gob_edomex
      - nom_sep_edomex
      - nom_gob_tabasco
      - nom_salud_sonora2
      - nom_com_soc_qroo
      - nom_pemex
      - mc_price_shoes
      - mc_avon
      - mc_mary_kay
      - mc_betterware
      - nominativa
      - microempreendedor_individual
      - runa
      - grupo_tress
      - beat
      - clip
      - worky
      - cornershop
      title: PlatformCode
      description: An enumeration.
    BaseResponse:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        error:
          $ref: '#/components/schemas/ErrorResponse'
        data:
          title: Data
      type: object
      title: BaseResponse
      example:
        success: true
        data: {}
        error: {}
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ProfileParams:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        id:
          type: string
          format: uuid
          title: Id
        account_id:
          type: string
          format: uuid
          title: Account Id
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        phone:
          type: string
          title: Phone
        email:
          type: string
          title: Email
        address:
          type: string
          title: Address
        city_name:
          type: string
          title: City Name
        birthday:
          type: string
          format: date
          title: Birthday
        civil_status:
          $ref: '#/components/schemas/CivilStatus'
        gender:
          $ref: '#/components/schemas/Gender'
        worker_role:
          $ref: '#/components/schemas/WorkerRole'
        picture_url:
          type: string
          title: Picture Url
      type: object
      required:
      - account_id
      - first_name
      - last_name
      title: ProfileParams
    AccountWarning:
      enum:
      - banned
      - not_registered
      - profile_unavailable
      - needs_auth
      - no_employment_records
      - missing_social_security_number
      - social_security_number_mismatch
      - curp_has_inconsistencies
      - curp_not_in_platform
      - zero_quoted_weeks
      - rpci_backup_process
      - web_scraping_backup_process
      - rider_account
      - fleet_account
      - onboarding
      - didi_auth_app
      - didi_auth_web
      - invalid_captcha
      - incomplete_profile_data
      - id_mismatch
      title: AccountWarning
      description: An enumeration.
    ErrorDetailResponse:
      properties:
        message:
          type: string
          title: Message
        location:
          type: string
          title: Location
      type: object
      title: ErrorDetailResponse
    InsightsStatus:
      enum:
      - computed_not_saved
      - incomplete
      - success
      - error
      title: InsightsStatus
      description: An enumeration.
    RetryLoginOptions:
      properties:
        force_retry:
          type: boolean
          title: Force Retry
          default: false
      type: object
      title: RetryLoginOptions
    WorkerParams:
      properties:
        id:
          type: string
          title: Id
      type: object
      required:
      - id
      title: WorkerParams
    UpdateLoginParams:
      properties:
        status:
          $ref: '#/components/schemas/LoginStatus'
        status_details:
          $ref: '#/components/schemas/StatusDetails'
        insights_status:
          $ref: '#/components/schemas/InsightsStatus'
        insights_status_details:
          $ref: '#/components/schemas/InsightsStatusDetails'
        should_notify_webhook:
          type: boolean
          title: Should Notify Webhook
          default: false
        login_id:
          type: string
          format: uuid
          title: Login Id
      type: object
      title: UpdateLoginParams
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    BaseResponse_AccountBaseResponse_:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        error:
          $ref: '#/components/schemas/ErrorResponse'
        data:
          $ref: '#/components/schemas/AccountBaseResponse'
      type: object
      title: BaseResponse[AccountBaseResponse]
      example:
        success: true
        data: {}
        error: {}
    ErrorResponse:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetailResponse'
          type: array
          title: Errors
      type: object
      title: ErrorResponse
    IdInfoParams:
      properties:
        type:
          $ref: '#/components/schemas/IdType'
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
      - type
      - id
      - name
      title: IdInfoParams
    EmploymentDataParams:
      properties:
        account_id:
          type: string
          format: uuid
          title: Account Id
        worker:
          $ref: '#/components/schemas/WorkerParams'
        id_info:
          $ref: '#/components/schemas/IdInfoParams'
        profile:
          $ref: '#/components/schemas/ProfileParams'
      type: object
      title: EmploymentDataParams
    WorkerRole:
      enum:
      - driver
      - courier
      - both
      title: WorkerRole
      description: An enumeration.
    StatusDetails:
      enum:
      - bad_request
      - banned
      - invalid_credentials
      - too_many_requests
      - service_unavailable
      - request_timeout
      - access_forbidden
      - platform_error
      - invalid_otp
      - expired_otp
      - invalid_nss
      - invalid_phone
      - invalid_email
      - lambda_error
      - phone_or_code_missing
      - password_missing
      - not_registered
      - login_refused
      - unknown
      - invalid_otp_session
      - invalid_otp_auth_key
      - needs_auth
      - requires_auth
      - curp_not_found
      - could_not_send_otp
      - profile_unavailable
      - no_employment_records
      - account_setup_incomplete
      - identity_verification_failed
      - gov_id_not_in_data_source
      - gov_id_has_inconsistencies
      - mfa_deactivation_required
      - access_token_not_generated
      - two_factor_auth_required
      - captcha_bypass_error
      - invalid_identifier
      - account_blocked
      - proxy_error
      - invalid_captcha
      - invalid_gov_id
      - device_authorization_required
      - max_retries_exceeded
      - task_create_fail
      - invalid_cpf
      - invalid_in_auth_session_id
      - unable_to_get_uber_metrics
      - email_otp_validation_pending
      - login_not_available
      - invalid_password
      - unknown_login_type
      - email_not_validated
      - already_connected
      - missing_social_security_number
      - social_security_number_mismatch
      - zero_quoted_weeks
      - proxy_max_retries_exceeded
      - curp_not_found_in_renapo
      - nss_not_found_in_imss
      - renapo_unavailable
      - service_degradation
      - server_error
      - db_constraint_violation
      - api_forbidden
      - auth_token_expired
      - network_max_retries_exceeded
      - api_service_unavailable_02
      - api_service_unavailable_08
      - lambda_timeout
      - api_service_unavailable
      - auth_max_attempts_exceeded
      - browser_navigation_timeout
      - render_invalid_html
      - browser_connection_timeout
      - parser_invalid_pdf
      - aws_s3_upload_fail
      - network_connectivity_issues
      - auth_invalid_token
      - server_not_found
      - api_server_error
      - network_ssl_error
      - auth_forbidden
      - api_bad_gateway
      - api_server_timeout
      - system_platform_error
      - api_rate_limit_exceeded
      - api_renapo_unavailable
      - user_gov_id_has_inconsistencies
      - user_ssn_missing
      - user_curp_not_found_in_renapo
      - rpci_timeout
      - pending_data_extraction
      - employment_info_in_imss
      - pending_for_data
      - validation_pending
      - password_validation_pending
      - validation_time_expired
      - curp_has_inconsistencies
      - curp_not_in_platform
      - platform_unavailable
      - failed_refresh
      - invalid_schema_response
      - not_available_in_platform
      - user_curp_not_in_platform
      - user_gov_id_not_in_data_source
      - account_not_found
      - profile_not_found
      - unable_to_get_rappi_metrics
      - captcha_required
      - captcha_detected
      - didi_rate_limited
      - device_risk
      - cell_rate_limited
      - resend_limit
      - didi_rejected
      - incomplete_profile
      title: StatusDetails
      description: An enumeration.
    LoginTypes:
      enum:
      - curp
      - otp
      - totp
      - pilot
      - email_otp
      - credentials
      - phone_voice_otp
      - phone_whatsapp_otp
      title: LoginTypes
      description: An enumeration.