openapi: 3.0.3
info:
  title: Awtomated public API
  version: 1.26.3
  description: 'The public API of Awtomated: create contacts, companies, deals, projects, leads and other
    records from your own systems, read choice lists, and manage vendors and their rate cards (partner
    API). Every request needs an API key. Guides: https://docs.awtomated.com/api/'
  termsOfService: https://awtomated.com
servers:
- url: https://api.awtomated.com
  description: Production
paths:
  /partner_api/choices/:
    get:
      operationId: partner_choices_list
      description: 'Lists the choice lists you can read, and how to call each one.


        Any valid API key may read these; no extra permission is needed. Choices that belong to an organization
        are those of the key''s organization.'
      tags:
      - Partner API
      security:
      - partnerApiKey: []
      responses:
        '200':
          description: No response body
  /partner_api/choices/{name}/:
    get:
      operationId: partner_choices_retrieve
      description: Returns one choice list as a plain list. Any valid API key may read it.
      parameters:
      - in: path
        name: name
        schema:
          type: string
        required: true
      tags:
      - Partner API
      security:
      - partnerApiKey: []
      responses:
        '200':
          description: No response body
  /partner_api/vendors/:
    get:
      operationId: partner_api_vendors_list
      description: Lists vendors in a short form. Use `search` to search by name. `/partner_api/vendors/filters/`
        describes the filters; ids may be repeated or separated by commas.
      parameters:
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - Partner API
      security:
      - partnerApiKey: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedPartnerVendorListList'
          description: ''
    post:
      operationId: partner_api_vendors_create
      description: Creates a vendor. The API key needs `write` on the `vendor` resource.
      tags:
      - Partner API
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerVendorWriteRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PartnerVendorWriteRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PartnerVendorWriteRequest'
      security:
      - partnerApiKey: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerVendorWrite'
          description: ''
  /partner_api/vendors/filters/:
    get:
      operationId: partner_api_vendors_filters_retrieve
      description: 'Returns the filters that the vendor list accepts.


        With any filter or `search` parameter (for example `filters/?service=11`) it returns the matching
        vendors instead, exactly like the list. `page`, `page_size` and `format` alone do not count as
        filters.'
      tags:
      - Partner API
      security:
      - partnerApiKey: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerVendorList'
          description: ''
  /partner_api/vendors/{id}/:
    get:
      operationId: partner_api_vendors_retrieve
      description: Returns one vendor with the full profile.
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - Partner API
      security:
      - partnerApiKey: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerVendorDetail'
          description: ''
    patch:
      operationId: partner_api_vendors_partial_update
      description: 'Updates a vendor. Only the fields you send are changed. The API key needs `write`
        on the `vendor` resource.


        There is no PUT and no DELETE: a vendor cannot be deleted through this API.'
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - Partner API
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedPartnerVendorWriteRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedPartnerVendorWriteRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedPartnerVendorWriteRequest'
      security:
      - partnerApiKey: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerVendorWrite'
          description: ''
  /partner_api/vendors/{id}/rate-cards/:
    get:
      operationId: partner_api_vendors_rate_cards_retrieve
      description: 'Returns the vendor''s rate card: its header and a paginated list of its rates.'
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - Partner API
      security:
      - partnerApiKey: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerVendorDetail'
          description: ''
  /partner_api/vendors/{vendor_id}/rate-cards/items/:
    post:
      operationId: partner_api_vendors_rate_cards_items_create
      description: 'External, API-key-authenticated (`Authorization: Bearer <token>`).

        Manages the rates (rate card items) of one vendor; every call needs `write`

        on the `vendor` resource.


        POST   /partner_api/vendors/<id>/rate-cards/items/            - add a rate

        PATCH  /partner_api/vendors/<id>/rate-cards/items/<item_id>/   - edit a rate

        DELETE /partner_api/vendors/<id>/rate-cards/items/<item_id>/   - delete a rate


        The vendor''s rate card is created on the first rate (as the read endpoint

        does). Rates are read from GET /partner_api/vendors/<id>/rate-cards/.

        PUT is excluded: PATCH changes only the fields that are sent.'
      parameters:
      - in: path
        name: vendor_id
        schema:
          type: string
          pattern: ^\d+$
        required: true
      tags:
      - Partner API
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerVendorRateCardItemWriteRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PartnerVendorRateCardItemWriteRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PartnerVendorRateCardItemWriteRequest'
        required: true
      security:
      - partnerApiKey: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerVendorRateCardItemWrite'
          description: ''
  /partner_api/vendors/{vendor_id}/rate-cards/items/{id}/:
    patch:
      operationId: partner_api_vendors_rate_cards_items_partial_update
      description: 'External, API-key-authenticated (`Authorization: Bearer <token>`).

        Manages the rates (rate card items) of one vendor; every call needs `write`

        on the `vendor` resource.


        POST   /partner_api/vendors/<id>/rate-cards/items/            - add a rate

        PATCH  /partner_api/vendors/<id>/rate-cards/items/<item_id>/   - edit a rate

        DELETE /partner_api/vendors/<id>/rate-cards/items/<item_id>/   - delete a rate


        The vendor''s rate card is created on the first rate (as the read endpoint

        does). Rates are read from GET /partner_api/vendors/<id>/rate-cards/.

        PUT is excluded: PATCH changes only the fields that are sent.'
      parameters:
      - in: path
        name: id
        schema:
          type: string
          pattern: ^\d+$
        required: true
      - in: path
        name: vendor_id
        schema:
          type: string
          pattern: ^\d+$
        required: true
      tags:
      - Partner API
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedPartnerVendorRateCardItemWriteRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedPartnerVendorRateCardItemWriteRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedPartnerVendorRateCardItemWriteRequest'
      security:
      - partnerApiKey: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerVendorRateCardItemWrite'
          description: ''
    delete:
      operationId: partner_api_vendors_rate_cards_items_destroy
      description: 'External, API-key-authenticated (`Authorization: Bearer <token>`).

        Manages the rates (rate card items) of one vendor; every call needs `write`

        on the `vendor` resource.


        POST   /partner_api/vendors/<id>/rate-cards/items/            - add a rate

        PATCH  /partner_api/vendors/<id>/rate-cards/items/<item_id>/   - edit a rate

        DELETE /partner_api/vendors/<id>/rate-cards/items/<item_id>/   - delete a rate


        The vendor''s rate card is created on the first rate (as the read endpoint

        does). Rates are read from GET /partner_api/vendors/<id>/rate-cards/.

        PUT is excluded: PATCH changes only the fields that are sent.'
      parameters:
      - in: path
        name: id
        schema:
          type: string
          pattern: ^\d+$
        required: true
      - in: path
        name: vendor_id
        schema:
          type: string
          pattern: ^\d+$
        required: true
      tags:
      - Partner API
      security:
      - partnerApiKey: []
      responses:
        '204':
          description: No response body
  /public/choices/{module}/:
    get:
      operationId: public_choices_retrieve
      parameters:
      - in: path
        name: module
        schema:
          type: string
        required: true
      tags:
      - Public API
      security:
      - publicApiKey: []
      responses:
        '200':
          description: No response body
    post:
      operationId: public_choices_create
      parameters:
      - in: path
        name: module
        schema:
          type: string
        required: true
      tags:
      - Public API
      security:
      - publicApiKey: []
      responses:
        '200':
          description: No response body
  /public/interpretation_requests/:
    get:
      operationId: public_interpretation_requests_retrieve
      description: Return the token's intake schema (envelope, template fields, rules).
      tags:
      - Public API
      security:
      - publicApiKey: []
      responses:
        '200':
          description: No response body
    post:
      operationId: public_interpretation_requests_create
      description: ''
      tags:
      - Public API
      security:
      - publicApiKey: []
      responses:
        '200':
          description: No response body
  /public/{module}/:
    get:
      operationId: public_retrieve
      parameters:
      - in: path
        name: module
        schema:
          type: string
        required: true
      tags:
      - Public API
      security:
      - publicApiKey: []
      responses:
        '200':
          description: No response body
    post:
      operationId: public_create
      parameters:
      - in: path
        name: module
        schema:
          type: string
        required: true
      tags:
      - Public API
      security:
      - publicApiKey: []
      responses:
        '200':
          description: No response body
components:
  schemas:
    DocumentType:
      type: object
      description: A document type.
      properties:
        id:
          type: integer
          readOnly: true
        document:
          type: string
          nullable: true
          title: Document Type
          maxLength: 450
        title:
          type: string
          readOnly: true
      required:
      - id
      - title
    LinkCurrency:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        title:
          type: string
          readOnly: true
        subtitle:
          type: string
          readOnly: true
        code:
          type: string
          nullable: true
          maxLength: 200
        curency_code:
          type: string
          readOnly: true
      required:
      - curency_code
      - id
      - subtitle
      - title
    PaginatedPartnerVendorListList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/PartnerVendorList'
    PartnerVendorDetail:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        full_name:
          type: string
          readOnly: true
        first_name:
          type: string
          nullable: true
          maxLength: 200
        last_name:
          type: string
          nullable: true
          maxLength: 200
        email:
          type: string
          format: email
          nullable: true
          maxLength: 200
        phone:
          type: string
          nullable: true
          maxLength: 20
        position:
          type: string
          nullable: true
          maxLength: 200
        country:
          type: string
          nullable: true
          maxLength: 100
        state:
          type: string
          nullable: true
          maxLength: 100
        industry:
          type: integer
          nullable: true
        verified:
          type: boolean
      required:
      - full_name
      - id
    PartnerVendorList:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        full_name:
          type: string
          readOnly: true
        country:
          type: string
          nullable: true
          maxLength: 100
        state:
          type: string
          nullable: true
          maxLength: 100
        industry:
          type: integer
          nullable: true
        verified:
          type: boolean
      required:
      - full_name
      - id
    PartnerVendorRateCardItemWrite:
      type: object
      description: 'A vendor rate (rate card item).


        Rules: composite services are rejected, the base rate must be above zero, the minimum fee must
        not be negative, and the currency defaults to the vendor''s currency. Service, unit type and languages
        must belong to the key''s organization (the same options `/partner_api/choices/` returns), and
        the unit type must be linked to the service.'
      properties:
        id:
          type: integer
          readOnly: true
        code:
          type: string
          readOnly: true
        rate_card:
          type: integer
          readOnly: true
        rate_card_name:
          type: string
          readOnly: true
        service:
          type: integer
          description: Service type for this rate
        service_name:
          type: string
          readOnly: true
        service_color:
          type: string
          readOnly: true
        source_language:
          type: integer
          nullable: true
          description: Source language for translation
        source_language_name:
          type: string
          readOnly: true
          nullable: true
        source_language_code:
          type: string
          readOnly: true
          nullable: true
        target_language:
          type: integer
          nullable: true
          description: Target language for translation
        target_language_name:
          type: string
          readOnly: true
          nullable: true
        target_language_code:
          type: string
          readOnly: true
          nullable: true
        unit_type:
          type: integer
          description: Unit type for pricing calculation
        unit_type_name:
          type: string
          readOnly: true
        base_rate:
          type: string
          format: decimal
          pattern: ^-?\d{0,17}(?:\.\d{0,3})?$
          description: Base price per unit
        min_fee:
          type: string
          format: decimal
          pattern: ^-?\d{0,17}(?:\.\d{0,3})?$
          title: Minimum Fee
          description: Minimum charge regardless of unit count
        currency:
          type: integer
          readOnly: true
          nullable: true
          description: Currency for pricing
        currency_name:
          type: string
          readOnly: true
        currency_symbol:
          type: string
          readOnly: true
        currency_code:
          type: string
          readOnly: true
        effective_currency:
          type: string
          readOnly: true
        document_type:
          type: integer
          nullable: true
          description: Optional document type specialization
        document_type_name:
          type: string
          readOnly: true
        industry:
          type: integer
          nullable: true
          description: Optional industry specialization
        industry_name:
          type: string
          readOnly: true
        is_active:
          type: boolean
          description: Whether this rate card item is currently in use
        created:
          type: string
          format: date-time
          readOnly: true
        modified:
          type: string
          format: date-time
          readOnly: true
        created_by:
          type: integer
          readOnly: true
          nullable: true
        created_by_name:
          type: string
          readOnly: true
        updated_by:
          type: integer
          readOnly: true
          nullable: true
        updated_by_name:
          type: string
          readOnly: true
        source_language_card:
          allOf:
          - $ref: '#/components/schemas/accountLinkedLanguage'
          readOnly: true
        target_language_card:
          allOf:
          - $ref: '#/components/schemas/accountLinkedLanguage'
          readOnly: true
        industry_card:
          allOf:
          - $ref: '#/components/schemas/accountLinkIndustry'
          readOnly: true
        unit_type_card:
          allOf:
          - $ref: '#/components/schemas/UnitTypeManagementChoice'
          readOnly: true
        document_type_card:
          allOf:
          - $ref: '#/components/schemas/DocumentType'
          readOnly: true
        service_card:
          allOf:
          - $ref: '#/components/schemas/ServiceManagementChoice'
          readOnly: true
        currency_card:
          allOf:
          - $ref: '#/components/schemas/LinkCurrency'
          readOnly: true
      required:
      - base_rate
      - code
      - created
      - created_by
      - created_by_name
      - currency
      - currency_card
      - currency_code
      - currency_name
      - currency_symbol
      - document_type_card
      - document_type_name
      - effective_currency
      - id
      - industry_card
      - industry_name
      - modified
      - rate_card
      - rate_card_name
      - service
      - service_card
      - service_color
      - service_name
      - source_language_card
      - source_language_code
      - source_language_name
      - target_language_card
      - target_language_code
      - target_language_name
      - unit_type
      - unit_type_card
      - unit_type_name
      - updated_by
      - updated_by_name
    PartnerVendorRateCardItemWriteRequest:
      type: object
      description: 'A vendor rate (rate card item).


        Rules: composite services are rejected, the base rate must be above zero, the minimum fee must
        not be negative, and the currency defaults to the vendor''s currency. Service, unit type and languages
        must belong to the key''s organization (the same options `/partner_api/choices/` returns), and
        the unit type must be linked to the service.'
      properties:
        service:
          type: integer
          description: Service type for this rate
        source_language:
          type: integer
          nullable: true
          description: Source language for translation
        target_language:
          type: integer
          nullable: true
          description: Target language for translation
        unit_type:
          type: integer
          description: Unit type for pricing calculation
        base_rate:
          type: string
          format: decimal
          pattern: ^-?\d{0,17}(?:\.\d{0,3})?$
          description: Base price per unit
        min_fee:
          type: string
          format: decimal
          pattern: ^-?\d{0,17}(?:\.\d{0,3})?$
          title: Minimum Fee
          description: Minimum charge regardless of unit count
        document_type:
          type: integer
          nullable: true
          description: Optional document type specialization
        industry:
          type: integer
          nullable: true
          description: Optional industry specialization
        is_active:
          type: boolean
          description: Whether this rate card item is currently in use
      required:
      - base_rate
      - service
      - unit_type
    PartnerVendorWrite:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        first_name:
          type: string
          nullable: true
          maxLength: 200
        last_name:
          type: string
          nullable: true
          maxLength: 200
        email:
          type: string
          format: email
          nullable: true
          maxLength: 200
        phone:
          type: string
          nullable: true
          maxLength: 20
        position:
          type: string
          nullable: true
          maxLength: 200
        country:
          type: string
          nullable: true
          maxLength: 100
        state:
          type: string
          nullable: true
          maxLength: 100
        address:
          type: string
          nullable: true
        industry:
          type: integer
          nullable: true
      required:
      - id
    PartnerVendorWriteRequest:
      type: object
      properties:
        first_name:
          type: string
          nullable: true
          maxLength: 200
        last_name:
          type: string
          nullable: true
          maxLength: 200
        email:
          type: string
          format: email
          nullable: true
          maxLength: 200
        phone:
          type: string
          nullable: true
          maxLength: 20
        position:
          type: string
          nullable: true
          maxLength: 200
        country:
          type: string
          nullable: true
          maxLength: 100
        state:
          type: string
          nullable: true
          maxLength: 100
        address:
          type: string
          nullable: true
        industry:
          type: integer
          nullable: true
    PatchedPartnerVendorRateCardItemWriteRequest:
      type: object
      description: 'A vendor rate (rate card item).


        Rules: composite services are rejected, the base rate must be above zero, the minimum fee must
        not be negative, and the currency defaults to the vendor''s currency. Service, unit type and languages
        must belong to the key''s organization (the same options `/partner_api/choices/` returns), and
        the unit type must be linked to the service.'
      properties:
        service:
          type: integer
          description: Service type for this rate
        source_language:
          type: integer
          nullable: true
          description: Source language for translation
        target_language:
          type: integer
          nullable: true
          description: Target language for translation
        unit_type:
          type: integer
          description: Unit type for pricing calculation
        base_rate:
          type: string
          format: decimal
          pattern: ^-?\d{0,17}(?:\.\d{0,3})?$
          description: Base price per unit
        min_fee:
          type: string
          format: decimal
          pattern: ^-?\d{0,17}(?:\.\d{0,3})?$
          title: Minimum Fee
          description: Minimum charge regardless of unit count
        document_type:
          type: integer
          nullable: true
          description: Optional document type specialization
        industry:
          type: integer
          nullable: true
          description: Optional industry specialization
        is_active:
          type: boolean
          description: Whether this rate card item is currently in use
    PatchedPartnerVendorWriteRequest:
      type: object
      properties:
        first_name:
          type: string
          nullable: true
          maxLength: 200
        last_name:
          type: string
          nullable: true
          maxLength: 200
        email:
          type: string
          format: email
          nullable: true
          maxLength: 200
        phone:
          type: string
          nullable: true
          maxLength: 20
        position:
          type: string
          nullable: true
          maxLength: 200
        country:
          type: string
          nullable: true
          maxLength: 100
        state:
          type: string
          nullable: true
          maxLength: 100
        address:
          type: string
          nullable: true
        industry:
          type: integer
          nullable: true
    ServiceManagementChoice:
      type: object
      description: A service, as returned in choice lists.
      properties:
        id:
          type: integer
          readOnly: true
        identifier:
          type: integer
          maximum: 9223372036854775807
          minimum: 0
          format: int64
          nullable: true
        code:
          type: string
          readOnly: true
        name:
          type: string
          title: Service Name
          maxLength: 200
        color:
          type: string
          pattern: '#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$'
          maxLength: 25
        title:
          type: string
          readOnly: true
        subtitle:
          type: string
          readOnly: true
        stages:
          type: string
          readOnly: true
        unit_types:
          type: string
          readOnly: true
        is_interpretation:
          type: boolean
          description: True for the six built-in interpretation services.
          readOnly: true
      required:
      - code
      - id
      - is_interpretation
      - name
      - stages
      - subtitle
      - title
      - unit_types
    UnitTypeManagementChoice:
      type: object
      description: A unit type, as returned in choice lists.
      properties:
        id:
          type: integer
          readOnly: true
        identifier:
          type: integer
          maximum: 9223372036854775807
          minimum: 0
          format: int64
          nullable: true
        code:
          type: string
          readOnly: true
        name:
          type: string
          title: Unit Type Name
          maxLength: 200
        title:
          type: string
          readOnly: true
      required:
      - code
      - id
      - name
      - title
    accountLinkIndustry:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        title:
          type: string
          readOnly: true
      required:
      - id
      - title
    accountLinkedLanguage:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        code:
          type: string
          readOnly: true
        language_code:
          type: string
          nullable: true
          title: ISO Language Code
          description: ISO 639-1 language code (e.g., en-US, fr-FR)
          maxLength: 200
        title:
          type: string
          readOnly: true
        subtitle:
          type: string
          readOnly: true
        is_rtl:
          type: boolean
          title: Right-to-Left
          description: Whether this language uses right-to-left text direction
      required:
      - code
      - id
      - subtitle
      - title
  securitySchemes:
    partnerApiKey:
      type: http
      scheme: bearer
      description: 'Partner API key (starts with `aw_`), sent as `Authorization: Bearer <key>`.'
    publicApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: Your API key, sent as the raw value of the Authorization header (no `Bearer` prefix).
        Create it in Awtomated under Settings > API.
tags:
- name: Public API
  description: Create records and read choice lists with your organization's API key.
- name: Partner API
  description: Vendors and vendor rate cards, with a partner API key (starts with `aw_`).
