Palenca (Vech) widgets API

The widgets API from Palenca (Vech) — 3 operation(s) for widgets.

OpenAPI Specification

palenca-vech-widgets-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Palenca accounts widgets API
  description: Palenca API
  version: 2.0.0
tags:
- name: widgets
paths:
  /v1/widgets:
    get:
      tags:
      - widgets
      summary: Get Widgets
      operationId: get_widgets_v1_widgets_get
      parameters:
      - 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_WidgetDataResponse_'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_WidgetDataResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - widgets
      summary: Create Widget
      operationId: create_widget_v1_widgets_post
      parameters:
      - required: false
        schema:
          type: string
          title: X-Api-Key
        name: x-api-key
        in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/app__api__schemas__widgets__CreateWidgetParams'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_WidgetDataResponse_'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_WidgetDataResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/widgets/{widget_id}:
    get:
      tags:
      - widgets
      summary: Get Widget
      operationId: get_widget_v1_widgets__widget_id__get
      parameters:
      - required: true
        schema:
          type: string
          format: uuid
          title: Widget Id
        name: widget_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_WidgetDataResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - widgets
      summary: Update Widget
      operationId: update_widget_v1_widgets__widget_id__put
      parameters:
      - required: true
        schema:
          type: string
          format: uuid
          title: Widget Id
        name: widget_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/app__api__schemas__widgets__UpdateWidgetParams'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_WidgetDataResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/widgets/{widget_id}/setup:
    get:
      tags:
      - widgets
      summary: Get Widget Setup
      operationId: get_widget_setup_v1_widgets__widget_id__setup_get
      parameters:
      - required: true
        schema:
          type: string
          format: uuid
          title: Widget Id
        name: widget_id
        in: path
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_WidgetSetupDataResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Company:
      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
        client_id:
          type: string
          title: Client Id
        logo:
          type: string
          title: Logo
        status:
          $ref: '#/components/schemas/CompanyStatus'
        display_name:
          type: string
          title: Display Name
        company_name:
          type: string
          title: Company Name
        priority:
          $ref: '#/components/schemas/CompanyPriority'
        website:
          type: string
          title: Website
        public_api_key:
          type: string
          title: Public Api Key
        private_api_key:
          type: string
          title: Private Api Key
        public_encryption_key:
          type: string
          title: Public Encryption Key
        private_encryption_key:
          type: string
          title: Private Encryption Key
        require_encryption:
          type: boolean
          title: Require Encryption
          default: false
        owner:
          type: string
          title: Owner
        refresh:
          type: boolean
          title: Refresh
          default: false
        refresh_frequency:
          type: integer
          title: Refresh Frequency
        retries_enabled:
          type: boolean
          title: Retries Enabled
          default: false
        group_id:
          type: string
          format: uuid
          title: Group Id
        data_controller:
          type: boolean
          title: Data Controller
          default: true
        widget_advanced_customization:
          type: boolean
          title: Widget Advanced Customization
          default: false
      type: object
      required:
      - display_name
      - company_name
      - priority
      - public_api_key
      - private_api_key
      title: Company
    CountryCode:
      enum:
      - mx
      - co
      - br
      - ar
      - cl
      - pe
      - us
      - cr
      - pa
      - ec
      - bo
      - ve
      - sv
      - do
      title: CountryCode
      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.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CompanyDataResponse:
      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
        client_id:
          type: string
          title: Client Id
        logo:
          type: string
          title: Logo
        status:
          $ref: '#/components/schemas/CompanyStatus'
        display_name:
          type: string
          title: Display Name
        company_name:
          type: string
          title: Company Name
        priority:
          $ref: '#/components/schemas/CompanyPriority'
        website:
          type: string
          title: Website
        public_api_key:
          type: string
          title: Public Api Key
        private_api_key:
          type: string
          title: Private Api Key
        public_encryption_key:
          type: string
          title: Public Encryption Key
        private_encryption_key:
          type: string
          title: Private Encryption Key
        require_encryption:
          type: boolean
          title: Require Encryption
          default: false
        owner:
          type: string
          title: Owner
        refresh:
          type: boolean
          title: Refresh
          default: false
        refresh_frequency:
          type: integer
          title: Refresh Frequency
        retries_enabled:
          type: boolean
          title: Retries Enabled
          default: false
        group_id:
          type: string
          format: uuid
          title: Group Id
        data_controller:
          type: boolean
          title: Data Controller
          default: true
        widget_advanced_customization:
          type: boolean
          title: Widget Advanced Customization
          default: false
      type: object
      required:
      - display_name
      - company_name
      - priority
      - public_api_key
      - private_api_key
      title: CompanyDataResponse
      example:
        id: 9334389a-c93c-4183-9894-ea8eb72f82e8
        client_id: c2644819-1879-4219-93ab-86b54fb83467
        logo: https://palenca.com/logo.png
        display_name: Palenca
        company_name: palenca
        website: https://palenca.com
        priority: low
        public_api_key: 2b4712e7-b318-4beb-bf8e-fa7c8f7b4037
    WidgetSetupDataResponse:
      properties:
        company:
          $ref: '#/components/schemas/CompanyDataResponse'
        widget:
          $ref: '#/components/schemas/WidgetDataResponse'
        platforms:
          items:
            $ref: '#/components/schemas/PlatformDataResponse'
          type: array
          title: Platforms
        countries:
          items:
            $ref: '#/components/schemas/CountryDataResponse'
          type: array
          title: Countries
        group:
          $ref: '#/components/schemas/GroupResponse'
      type: object
      required:
      - company
      - widget
      - platforms
      - countries
      title: WidgetSetupDataResponse
    GroupResponse:
      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
        name:
          type: string
          title: Name
        admin:
          $ref: '#/components/schemas/GroupAdminResponse'
        companies:
          items:
            $ref: '#/components/schemas/Company'
          type: array
          title: Companies
          default: []
        privacy_url:
          type: string
          title: Privacy Url
      type: object
      required:
      - id
      - name
      - admin
      title: GroupResponse
    ErrorDetailResponse:
      properties:
        message:
          type: string
          title: Message
        location:
          type: string
          title: Location
      type: object
      title: ErrorDetailResponse
    PlatformCategory:
      enum:
      - gig
      - employment
      title: PlatformCategory
      description: An enumeration.
    BaseResponse_WidgetSetupDataResponse_:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        error:
          $ref: '#/components/schemas/ErrorResponse'
        data:
          $ref: '#/components/schemas/WidgetSetupDataResponse'
      type: object
      title: BaseResponse[WidgetSetupDataResponse]
      example:
        success: true
        data: {}
        error: {}
    WidgetDataResponse:
      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
        name:
          type: string
          title: Name
        company_id:
          type: string
          format: uuid
          title: Company Id
        country:
          $ref: '#/components/schemas/CountryCode'
        platforms:
          items:
            $ref: '#/components/schemas/PlatformCode'
          type: array
          default: []
        is_sandbox:
          type: boolean
          title: Is Sandbox
          default: false
        hide_logo:
          type: boolean
          title: Hide Logo
          default: false
        hide_whatsapp:
          type: boolean
          title: Hide Whatsapp
          default: false
        hide_consent:
          type: boolean
          title: Hide Consent
          default: false
        hide_privacy_url:
          type: boolean
          title: Hide Privacy Url
          default: true
        hide_redirect_url:
          type: boolean
          title: Hide Redirect Url
          default: true
        hide_label:
          type: boolean
          title: Hide Label
          default: false
        require_gov_id:
          type: boolean
          title: Require Gov Id
          default: false
        persist_session:
          type: boolean
          title: Persist Session
          default: false
        font_family:
          type: string
          title: Font Family
        primary_color:
          type: string
          title: Primary Color
        background_color:
          type: string
          title: Background Color
        text_field_style:
          type: string
          title: Text Field Style
        border_radius:
          type: string
          title: Border Radius
        custom_privacy_url:
          type: string
          title: Custom Privacy Url
        redirect_url:
          type: string
          title: Redirect Url
        whatsapp_number:
          type: string
          title: Whatsapp Number
        webhook_url:
          type: string
          title: Webhook Url
        countries:
          items:
            $ref: '#/components/schemas/CountryCode'
          type: array
          default: []
        widget_type:
          $ref: '#/components/schemas/WidgetType'
        widget_internal_type:
          $ref: '#/components/schemas/WidgetInternalType'
        settings:
          type: object
          title: Settings
          default: {}
      type: object
      required:
      - company_id
      title: WidgetDataResponse
      example:
        id: 9334389a-c93c-4183-9894-ea8eb72f82e8
        company_id: fcee4e50-c32a-4cc7-bc88-4d885ce47242
        country: mx
        platform:
        - uber
        is_sandbox: false
        hide_logo: false
        hide_whatsapp: false
        hide_consent: false
        hide_privacy_url: false
        hide_redirect_url: false
        require_gov_id: false
        persist_session: false
        font_family: Nunito
        primary_color: '#ea4c89'
        border_radius: 0px
        custom_privacy_url: https://palenca.com/privacy
        redirect_url: https://mycustomredirection.com/privacy
        whatsapp_number: '+525539043015'
        webhook_url: https://webhooks.palenca.com/example
        settings: {}
    PlatformDataResponse:
      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
        code:
          $ref: '#/components/schemas/PlatformCode'
        name:
          type: string
          title: Name
        logo:
          type: string
          title: Logo
        is_active:
          type: boolean
          title: Is Active
        category:
          $ref: '#/components/schemas/PlatformCategory'
        countries:
          items:
            $ref: '#/components/schemas/CountryCode'
          type: array
        status:
          $ref: '#/components/schemas/PlatformStatus'
      type: object
      required:
      - id
      - code
      - name
      - logo
      - is_active
      - category
      - countries
      title: PlatformDataResponse
      example:
        id: 9334389a-c93c-4183-9894-ea8eb72f82e8
        code: uber
        name: Uber
        logo: https://palenca.com/logo.png
        is_active: true
        category: gig
        status: available
    BaseResponse_WidgetDataResponse_:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        error:
          $ref: '#/components/schemas/ErrorResponse'
        data:
          $ref: '#/components/schemas/WidgetDataResponse'
      type: object
      title: BaseResponse[WidgetDataResponse]
      example:
        success: true
        data: {}
        error: {}
    WidgetInternalType:
      enum:
      - default_api_calls
      title: WidgetInternalType
      description: An enumeration.
    CompanyStatus:
      enum:
      - internal_test
      - active
      - demo
      - pilot
      - sandbox
      - read_permissions_disabled
      - write_permissions_disabled
      - suspended
      title: CompanyStatus
      description: An enumeration.
    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
    app__api__schemas__widgets__CreateWidgetParams:
      properties:
        name:
          type: string
          title: Name
        countries:
          items:
            $ref: '#/components/schemas/CountryCode'
          type: array
          default: []
        platforms:
          items:
            $ref: '#/components/schemas/PlatformCode'
          type: array
          default: []
        is_sandbox:
          type: boolean
          title: Is Sandbox
          default: false
        require_gov_id:
          type: boolean
          title: Require Gov Id
          default: false
      type: object
      title: CreateWidgetParams
    CompanyPriority:
      enum:
      - highest
      - high
      - medium
      - low
      - lowest
      title: CompanyPriority
      description: An enumeration.
    CountryDataResponse:
      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
        alpha_2:
          $ref: '#/components/schemas/CountryCode'
        alpha_3:
          type: string
          title: Alpha 3
        name:
          type: string
          title: Name
        currency:
          type: string
          title: Currency
        calling_code:
          type: string
          title: Calling Code
        timezone:
          type: string
          title: Timezone
        flag:
          type: string
          title: Flag
        is_active:
          type: boolean
          title: Is Active
          default: true
      type: object
      required:
      - id
      - alpha_2
      - alpha_3
      - name
      - currency
      - calling_code
      - timezone
      title: CountryDataResponse
      example:
        id: 9334389a-c93c-4183-9894-ea8eb72f82e8
        alpha_2: mx
        alpha_3: mex
        name: Mexico
        currency: MXN
        calling_code: '52'
        timezone: America/Mexico_City
        flag: https://cdn.palenca.com/flags/mx.svg
    WidgetType:
      enum:
      - income_verification
      title: WidgetType
      description: An enumeration.
    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
    app__api__schemas__widgets__UpdateWidgetParams:
      properties:
        name:
          type: string
          title: Name
        require_gov_id:
          type: boolean
          title: Require Gov Id
          default: false
        countries:
          items:
            $ref: '#/components/schemas/CountryCode'
          type: array
          default: []
        platforms:
          items:
            $ref: '#/components/schemas/PlatformCode'
          type: array
          default: []
        hide_logo:
          type: boolean
          title: Hide Logo
        hide_whatsapp:
          type: boolean
          title: Hide Whatsapp
        hide_consent:
          type: boolean
          title: Hide Consent
        font_family:
          type: string
          title: Font Family
        primary_color:
          type: string
          title: Primary Color
        border_radius:
          type: string
          title: Border Radius
        custom_privacy_url:
          type: string
          title: Custom Privacy Url
        whatsapp_number:
          type: string
          title: Whatsapp Number
      type: object
      title: UpdateWidgetParams
    PlatformStatus:
      enum:
      - up
      - down
      - degraded
      - maintenance
      - deprecated
      title: PlatformStatus
      description: An enumeration.
    GroupAdminResponse:
      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
        client_id:
          type: string
          title: Client Id
        logo:
          type: string
          title: Logo
        status:
          $ref: '#/components/schemas/CompanyStatus'
        display_name:
          type: string
          title: Display Name
        company_name:
          type: string
          title: Company Name
        priority:
          $ref: '#/components/schemas/CompanyPriority'
        website:
          type: string
          title: Website
        public_api_key:
          type: string
          title: Public Api Key
        private_api_key:
          type: string
          title: Private Api Key
        public_encryption_key:
          type: string
          title: Public Encryption Key
        private_encryption_key:
          type: string
          title: Private Encryption Key
        require_encryption:
          type: boolean
          title: Require Encryption
          default: false
        owner:
          type: string
          title: Owner
        refresh:
          type: boolean
          title: Refresh
          default: false
        refresh_frequency:
          type: integer
          title: Refresh Frequency
        retries_enabled:
          type: boolean
          title: Retries Enabled
          default: false
        group_id:
          type: string
          format: uuid
          title: Group Id
        data_controller:
          type: boolean
          title: Data Controller
          default: true
        widget_advanced_customization:
          type: boolean
          title: Widget Advanced Customization
          default: false
      type: object
      required:
      - display_name
      - company_name
      - priority
      - public_api_key
      - private_api_key
      title: GroupAdminResponse