Palenca (Vech) companies API

The companies API from Palenca (Vech) — 5 operation(s) for companies.

OpenAPI Specification

palenca-vech-companies-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Palenca accounts companies API
  description: Palenca API
  version: 2.0.0
tags:
- name: companies
paths:
  /v1/companies/from_api_key:
    get:
      tags:
      - companies
      summary: Get Company From Api Key
      operationId: get_company_from_api_key_v1_companies_from_api_key_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: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/companies:
    get:
      tags:
      - companies
      summary: List Companies
      operationId: list_companies_v1_companies_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_ListCompaniesDataResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - companies
      summary: Create Company
      operationId: create_company_v1_companies_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/app__api__schemas__companies__CreateCompanyParams'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_CompanyDataResponse_'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_CompanyDataResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/companies/search:
    post:
      tags:
      - companies
      summary: Search Company
      operationId: search_company_v1_companies_search_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/SearchCompaniesParams'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_CompanyDataResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/companies/{company_id}:
    get:
      tags:
      - companies
      summary: Get Company
      operationId: get_company_v1_companies__company_id__get
      parameters:
      - required: true
        schema:
          type: string
          format: uuid
          title: Company Id
        name: company_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_CompanyDataResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/companies/{company_id}/widgets:
    get:
      tags:
      - companies
      summary: Get Company Widgets
      operationId: get_company_widgets_v1_companies__company_id__widgets_get
      parameters:
      - required: true
        schema:
          type: string
          format: uuid
          title: Company Id
        name: company_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_CompanyDataResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    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
    ListCompaniesDataResponse:
      properties:
        companies:
          items:
            $ref: '#/components/schemas/ListCompanyDataResponse'
          type: array
          title: Companies
      type: object
      required:
      - companies
      title: ListCompaniesDataResponse
    ListCompanyDataResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        widgets_ids:
          items:
            type: string
          type: array
          title: Widgets Ids
        company_name:
          type: string
          title: Company Name
        display_name:
          type: string
          title: Display Name
        private_api_key:
          type: string
          title: Private Api Key
      type: object
      required:
      - id
      - widgets_ids
      - company_name
      - display_name
      - private_api_key
      title: ListCompanyDataResponse
    BaseResponse_ListCompaniesDataResponse_:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        error:
          $ref: '#/components/schemas/ErrorResponse'
        data:
          $ref: '#/components/schemas/ListCompaniesDataResponse'
      type: object
      title: BaseResponse[ListCompaniesDataResponse]
      example:
        success: true
        data: {}
        error: {}
    ErrorDetailResponse:
      properties:
        message:
          type: string
          title: Message
        location:
          type: string
          title: Location
      type: object
      title: ErrorDetailResponse
    CompanyStatus:
      enum:
      - internal_test
      - active
      - demo
      - pilot
      - sandbox
      - read_permissions_disabled
      - write_permissions_disabled
      - suspended
      title: CompanyStatus
      description: An enumeration.
    BaseResponse_CompanyDataResponse_:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        error:
          $ref: '#/components/schemas/ErrorResponse'
        data:
          $ref: '#/components/schemas/CompanyDataResponse'
      type: object
      title: BaseResponse[CompanyDataResponse]
      example:
        success: true
        data: {}
        error: {}
    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
    CompanyPriority:
      enum:
      - highest
      - high
      - medium
      - low
      - lowest
      title: CompanyPriority
      description: An enumeration.
    app__api__schemas__companies__CreateCompanyParams:
      properties:
        client_id:
          type: string
          title: Client Id
        logo:
          type: string
          title: Logo
        priority:
          allOf:
          - $ref: '#/components/schemas/CompanyPriority'
          default: low
        display_name:
          type: string
          title: Display Name
        company_name:
          type: string
          title: Company Name
        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
        refresh:
          type: boolean
          title: Refresh
          default: false
        refresh_frequency:
          type: integer
          title: Refresh Frequency
        status:
          anyOf:
          - $ref: '#/components/schemas/CompanyStatus'
          - type: string
          title: Status
        data_controller:
          type: boolean
          title: Data Controller
          default: true
      type: object
      required:
      - display_name
      - company_name
      - website
      title: CreateCompanyParams
      example:
        logo: https://palenca.com/logo.png
        display_name: Palenca
        company_name: palenca
        website: https://palenca.com
    PaginationSearchParams:
      properties:
        items_per_page:
          type: integer
          title: Items Per Page
          default: 100
        page:
          type: integer
          title: Page
          default: 1
      type: object
      title: PaginationSearchParams
    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
    SearchCompaniesParams:
      properties:
        statuses:
          items:
            $ref: '#/components/schemas/CompanyStatus'
          type: array
        q:
          type: string
          title: Q
        options:
          allOf:
          - $ref: '#/components/schemas/PaginationSearchParams'
          title: Options
          default:
            items_per_page: 100
            page: 1
      type: object
      title: SearchCompaniesParams
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError