Solvimon contacts API

The contacts API from Solvimon — 2 operation(s) for contacts.

OpenAPI Specification

solvimon-contacts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Configuration alertRules contacts API
  version: 1.0.0
servers:
- url: https://test.api.solvimon.com
  description: The TEST environment for our API
- url: https://api.solvimon.com
  description: The live environment for our API
tags:
- name: contacts
paths:
  /v{version}/contacts:
    get:
      operationId: getContacts
      summary: Get a list of contacts
      description: Requires the CONTACT.VIEW permission.
      tags:
      - contacts
      parameters:
      - name: version
        in: path
        description: version
        required: true
        schema:
          type: string
          default: '1'
      - name: customer_id
        in: query
        description: The resource id of the customer.
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: The page which is going to be shown
        required: false
        schema:
          type: integer
      - name: limit
        in: query
        description: The amount of records shown in the list
        required: false
        schema:
          type: integer
      - name: custom_field
        in: query
        description: Filter the response by a custom field value.
        required: false
        schema:
          type: string
      - name: X-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: x-platform-id
        in: header
        description: Platform ID.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactResponseWrapper'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
    post:
      operationId: postContacts
      summary: Create a contact
      description: Requires the CONTACT.CREATE permission.
      tags:
      - contacts
      parameters:
      - name: version
        in: path
        description: version
        required: true
        schema:
          type: string
          default: '1'
      - name: X-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: x-platform-id
        in: header
        description: Platform ID.
        required: false
        schema:
          type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactCreateRequest'
    put:
      operationId: putContacts
      summary: Update or create a contact (upsert)
      description: Requires the CONTACT.CREATE or CONTACT.UPDATE permission.
      tags:
      - contacts
      parameters:
      - name: version
        in: path
        description: version
        required: true
        schema:
          type: string
          default: '1'
      - name: identifier_field
        in: query
        description: Which field to use to identify whether the resource exists or not
        required: false
        schema:
          type: string
      - name: custom_field_reference
        in: query
        description: Which custom field to use to identify whether the resource exists or not
        required: false
        schema:
          type: string
      - name: field_actions
        in: query
        description: The list of actions for specific fields.
        required: false
        schema:
          type: object
          additionalProperties:
            type: string
      - name: X-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: x-platform-id
        in: header
        description: Platform ID.
        required: false
        schema:
          type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactCreateRequest'
  /v{version}/contacts/{resourceId}:
    get:
      operationId: getContactsByResourceId
      summary: Get a contact by ID
      description: Requires the CONTACT.VIEW permission.
      tags:
      - contacts
      parameters:
      - name: version
        in: path
        description: version
        required: true
        schema:
          type: string
          default: '1'
      - name: resourceId
        in: path
        description: The ID of the resource to be requested.
        required: true
        schema:
          type: string
          default: ''
      - name: X-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: x-platform-id
        in: header
        description: Platform ID.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
    delete:
      operationId: deleteContactsByResourceId
      summary: Delete a contact by ID
      description: Requires the CONTACT.DELETE permission.
      tags:
      - contacts
      parameters:
      - name: version
        in: path
        description: version
        required: true
        schema:
          type: string
          default: '1'
      - name: resourceId
        in: path
        description: The ID of the resource to be requested.
        required: true
        schema:
          type: string
          default: ''
      - name: X-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: x-platform-id
        in: header
        description: Platform ID.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
    patch:
      operationId: patchContactsByResourceId
      summary: Update a contact
      description: Requires the CONTACT.UPDATE permission.
      tags:
      - contacts
      parameters:
      - name: version
        in: path
        description: version
        required: true
        schema:
          type: string
          default: '1'
      - name: resourceId
        in: path
        description: The ID of the resource to be requested.
        required: true
        schema:
          type: string
          default: ''
      - name: X-API-KEY
        in: header
        required: true
        schema:
          type: string
      - name: x-platform-id
        in: header
        description: Platform ID.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactUpdateRequest'
components:
  schemas:
    NotificationChannel:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/NotificationChannelType'
          description: The channel type to use.
        enabled:
          type:
          - boolean
          - 'null'
          description: Whether the channel is enabled for the notification type.
      title: NotificationChannel
    CustomFieldValue:
      type: object
      properties:
        id:
          type:
          - string
          - 'null'
          description: Resource ID of type CUSTOM_FIELD
        reference:
          type:
          - string
          - 'null'
        value:
          type:
          - string
          - 'null'
        values:
          type:
          - array
          - 'null'
          items:
            type: string
        integration_details:
          oneOf:
          - $ref: '#/components/schemas/IntegrationDetails'
          - type: 'null'
        integration_id:
          type: string
          description: The resource ID of the integration linked to the custom field
      title: CustomFieldValue
    NotificationPreferenceUpdateRequestType:
      type: string
      enum:
      - INVOICE
      description: The notification type to configure.
      title: NotificationPreferenceUpdateRequestType
    LinkedIntegration:
      type: object
      properties:
        id:
          type: string
        link_details:
          type: array
          items:
            $ref: '#/components/schemas/LinkDetail'
      title: LinkedIntegration
    IntegrationDetails:
      type: object
      properties:
        id:
          type:
          - string
          - 'null'
        reference:
          type:
          - string
          - 'null'
        payment_gateway_variant:
          $ref: '#/components/schemas/IntegrationDetailsPaymentGatewayVariant'
        adyen:
          $ref: '#/components/schemas/AdyenIntegrationDetails'
        stripe:
          $ref: '#/components/schemas/StripeIntegrationDetails'
      title: IntegrationDetails
    NotificationPreferenceCreateRequest:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/NotificationPreferenceCreateRequestType'
          description: The notification type to configure.
        channels:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/NotificationChannel'
          description: The channels for this notification type.
      title: NotificationPreferenceCreateRequest
    ContactResponseWrapper:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Contact'
        page:
          type:
          - integer
          - 'null'
        limit:
          type:
          - integer
          - 'null'
        total_number_of_pages:
          type:
          - integer
          - 'null'
        links:
          $ref: '#/components/schemas/PaginationLinks'
      required:
      - data
      title: ContactResponseWrapper
    StripeIntegrationDetails:
      type: object
      properties:
        payment_method_id:
          type: string
      title: StripeIntegrationDetails
    NotificationPreference:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/NotificationPreferenceType'
          description: The notification type to configure.
        channels:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/NotificationChannel'
          description: The channels for this notification type.
      title: NotificationPreference
    LinkedIntegrationCreateRequest:
      type: object
      properties:
        id:
          type: string
        link_details:
          type: array
          items:
            $ref: '#/components/schemas/LinkDetail'
      title: LinkedIntegrationCreateRequest
    Name:
      type: object
      properties:
        first_name:
          type:
          - string
          - 'null'
        last_name:
          type:
          - string
          - 'null'
        infix:
          type:
          - string
          - 'null'
      title: Name
    IntegrationDetailsPaymentGatewayVariant:
      type: string
      enum:
      - ADYEN
      - STRIPE
      title: IntegrationDetailsPaymentGatewayVariant
    LinkedIntegrationUpdateRequest:
      type: object
      properties:
        id:
          type: string
        link_details:
          type: array
          items:
            $ref: '#/components/schemas/LinkDetail'
      title: LinkedIntegrationUpdateRequest
    CustomFieldValueCreateRequest:
      type: object
      properties:
        id:
          type:
          - string
          - 'null'
          description: Resource ID of type CUSTOM_FIELD
        reference:
          type:
          - string
          - 'null'
        value:
          type:
          - string
          - 'null'
        values:
          type:
          - array
          - 'null'
          items:
            type: string
        integration_details:
          oneOf:
          - $ref: '#/components/schemas/IntegrationDetails'
          - type: 'null'
        integration_id:
          type: string
          description: The resource ID of the integration linked to the custom field
      title: CustomFieldValueCreateRequest
    NotificationPreferenceType:
      type: string
      enum:
      - INVOICE
      description: The notification type to configure.
      title: NotificationPreferenceType
    LinkDetail:
      type: object
      properties:
        url:
          type:
          - string
          - 'null'
        custom_field_name:
          type:
          - string
          - 'null'
      title: LinkDetail
    ApiErrorType:
      type: string
      enum:
      - API_ERROR
      - INVALID_REQUEST
      title: ApiErrorType
    Contact:
      type: object
      properties:
        object_type:
          type:
          - string
          - 'null'
        id:
          type:
          - string
          - 'null'
        reference:
          type: string
          description: A custom reference assigned to the contact.
        customer_id:
          type: string
          description: The ID of the customer.
        name:
          $ref: '#/components/schemas/Name'
          description: A custom name assigned to the contact.
        email:
          type: string
          description: The email of the contact.
        notification_preferences:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/NotificationPreference'
          description: Notification preferences for contact-related communications.
        custom_fields:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/CustomFieldValue'
        linked_integrations:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/LinkedIntegration'
      title: Contact
    ContactUpdateRequest:
      type: object
      properties:
        object_type:
          type:
          - string
          - 'null'
        id:
          type:
          - string
          - 'null'
        reference:
          type: string
          description: A custom reference assigned to the contact.
        customer_id:
          type: string
          description: The ID of the customer.
        name:
          $ref: '#/components/schemas/NameUpdateRequest'
          description: A custom name assigned to the contact.
        email:
          type: string
          description: The email of the contact.
        notification_preferences:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/NotificationPreferenceUpdateRequest'
          description: Notification preferences for contact-related communications.
        custom_fields:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/CustomFieldValueUpdateRequest'
        linked_integrations:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/LinkedIntegrationUpdateRequest'
      title: ContactUpdateRequest
    ApiError:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ApiErrorType'
        code:
          $ref: '#/components/schemas/ApiErrorCode'
        field:
          type:
          - string
          - 'null'
        message:
          type: string
        resource_id:
          type:
          - string
          - 'null'
        resource_type:
          oneOf:
          - $ref: '#/components/schemas/ApiErrorResourceType'
          - type: 'null'
      required:
      - type
      - code
      - message
      title: ApiError
    NotificationPreferenceUpdateRequest:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/NotificationPreferenceUpdateRequestType'
          description: The notification type to configure.
        channels:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/NotificationChannel'
          description: The channels for this notification type.
      title: NotificationPreferenceUpdateRequest
    NameCreateRequest:
      type: object
      properties:
        first_name:
          type:
          - string
          - 'null'
        last_name:
          type:
          - string
          - 'null'
        infix:
          type:
          - string
          - 'null'
      title: NameCreateRequest
    CustomFieldValueUpdateRequest:
      type: object
      properties:
        id:
          type:
          - string
          - 'null'
          description: Resource ID of type CUSTOM_FIELD
        reference:
          type:
          - string
          - 'null'
        value:
          type:
          - string
          - 'null'
        values:
          type:
          - array
          - 'null'
          items:
            type: string
        integration_details:
          oneOf:
          - $ref: '#/components/schemas/IntegrationDetails'
          - type: 'null'
        integration_id:
          type: string
          description: The resource ID of the integration linked to the custom field
      title: CustomFieldValueUpdateRequest
    ApiErrorResourceType:
      type: string
      enum:
      - CUSTOMER
      - CUSTOM_FIELD
      - PLATFORM
      - PLATFORM_UPTODATE
      - METER
      - METER_VALUE
      - METER_PROPERTY
      - METER_VALUE_CALCULATION
      - INGEST_DATA
      - METER_DATA
      - CHARGE_DATA
      - PERSIST_DATA
      - ADJUSTMENT_DATA
      - PRODUCT_CATEGORY
      - PRODUCT
      - PRODUCT_ITEM
      - PRICING
      - PRICING_GROUP
      - PRICING_ITEM
      - PRICING_ITEM_CONFIG
      - PRICING_PLAN_SUBSCRIPTION
      - PRICING_PLAN_SUBSCRIPTION_GROUP
      - PRICING_PLAN_SCHEDULE
      - PRICING_PLAN
      - PRICING_PLAN_VERSION
      - QUOTE
      - QUOTE_VERSION
      - QUOTE_TEMPLATE
      - API_KEY
      - USER
      - ROLE
      - PROXY_USER
      - EXTERNAL_CREDENTIALS
      - TOKEN
      - INVOICE
      - E_INVOICE
      - PDF
      - BILLING_ENTITY
      - FEATURE
      - MEMBERSHIP
      - PAYMENT
      - PAYMENT_ACCEPTOR
      - PAYMENT_METHOD
      - PAYMENT_METHOD_OPTIONS
      - PAYMENT_SCHEDULE
      - PAYMENT_REQUEST
      - INTEGRATION
      - WEBHOOK
      - FILE
      - FILE_PROCESSING_SETTINGS
      - TEAM
      - DOWNLOAD_URL
      - CSV_REPORT
      - REPORT
      - REPORT_GENERATE_REQUEST
      - REPORT_CONFIGURATION
      - REPORT_SUBSCRIPTION
      - REPORT_DEFINITION
      - ACCOUNT_GROUP
      - ENTITY
      - EVENT_TRACE
      - EVENT_TRACE_LINK
      - PRICING_CATEGORY
      - CONTACT
      - ALERT_RULE
      - ALERT
      - AUDIT_RECORD
      - PORTAL_URL
      - AUTHENTICATION_PROVIDER
      - REPROCESS
      - APPROVAL_POLICY
      - APPROVAL_REQUEST
      - BULK_ACTION
      - COUPON
      - PROMOTION_CODE
      - WALLET
      - WALLET_TYPE
      - WALLET_GRANT
      - WORKFLOW
      - WORKFLOW_TRIGGER
      - WORKFLOW_ACTION
      - CREDIT_TYPE
      - SIGNATURE_REQUEST
      - ATTACHMENT
      - DOCUMENT
      title: ApiErrorResourceType
    ContactCreateRequest:
      type: object
      properties:
        object_type:
          type:
          - string
          - 'null'
        id:
          type:
          - string
          - 'null'
        reference:
          type: string
          description: A custom reference assigned to the contact.
        customer_id:
          type: string
          description: The ID of the customer.
        name:
          $ref: '#/components/schemas/NameCreateRequest'
          description: A custom name assigned to the contact.
        email:
          type: string
          description: The email of the contact.
        notification_preferences:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/NotificationPreferenceCreateRequest'
          description: Notification preferences for contact-related communications.
        custom_fields:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/CustomFieldValueCreateRequest'
        linked_integrations:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/LinkedIntegrationCreateRequest'
      required:
      - reference
      - customer_id
      title: ContactCreateRequest
    AdyenIntegrationDetails:
      type: object
      properties:
        recurring_detail_reference:
          type: string
      title: AdyenIntegrationDetails
    NotificationPreferenceCreateRequestType:
      type: string
      enum:
      - INVOICE
      description: The notification type to configure.
      title: NotificationPreferenceCreateRequestType
    ApiErrorCode:
      type: string
      enum:
      - RESOURCE_NOT_FOUND
      - RESOURCES_NOT_FOUND
      - UNABLE_TO_PROCESS_INSTRUCTIONS
      - BAD_REQUEST
      - UNSUPPORTED_MEDIA_TYPE
      - RESOURCE_ALREADY_EXISTS
      - CUSTOM_FIELD_VALUE_ALREADY_EXISTS
      - COULD_NOT_CREATE_RESOURCE
      - COULD_NOT_UPDATE_RESOURCE
      - COULD_NOT_DELETE_RESOURCE
      - MISSING_VERSION
      - UNSUPPORTED_VERSION
      - UNAUTHORISED
      - CUSTOMER_NOT_FOUND
      - PLATFORM_NOT_FOUND
      - PRICING_PLAN_NOT_FOUND
      - PRODUCT_NOT_FOUND
      - PRODUCT_ITEM_NOT_FOUND
      - PRICING_NOT_FOUND
      - PRICING_ITEM_NOT_FOUND
      - USER_NOT_FOUND
      - METER_NOT_FOUND
      - METER_VALUE_NOT_FOUND
      - METER_PROPERTY_NOT_FOUND
      - PRICING_ITEM_SUMMARIES_NOT_FOUND
      - MISSING_ID
      - INVALID_ID
      - MISSING_REFERENCE
      - MISSING_FIELD
      - INVALID_FIELD
      - INVALID_OPERATION
      - INTERNAL_ERROR
      - USER_NOT_ALLOWED
      - IDEMPOTENCY_CHECK_FAILED
      - INVALID_REQUEST
      title: ApiErrorCode
    PaginationLinks:
      type: object
      properties:
        first:
          type:
          - string
          - 'null'
        previous:
          type:
          - string
          - 'null'
        current:
          type:
          - string
          - 'null'
        next:
          type:
          - string
          - 'null'
      title: PaginationLinks
    NameUpdateRequest:
      type: object
      properties:
        first_name:
          type:
          - string
          - 'null'
        last_name:
          type:
          - string
          - 'null'
        infix:
          type:
          - string
          - 'null'
      title: NameUpdateRequest
    NotificationChannelType:
      type: string
      enum:
      - EMAIL
      description: The channel type to use.
      title: NotificationChannelType
  securitySchemes:
    API-Key:
      type: apiKey
      in: header
      name: X-API-KEY
    JWT-Authentication:
      type: http
      scheme: bearer