MVMNT Vendor Contacts API

Vendor contact management operations

OpenAPI Specification

mvmnt-vendor-contacts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: MVMNT Bill Payments Vendor Contacts API
  version: 1.0.0
  description: "The MVMNT API enables you to automate freight brokerage workflows by integrating\ndirectly with our Transportation Management System.\n\n## Authentication\n\nOAuth 2.0 client credentials flow. See [Authentication Guide](/getting-started/authentication)\nfor details.\n\n### Token Endpoint\n\n```\nPOST https://api.mvmnt.io/oauth2/token\n```\n\n#### Request\n\n**Headers:**\n```http\nContent-Type: application/x-www-form-urlencoded\n```\n\n**Body Parameters:**\n```\ngrant_type=client_credentials\nclient_id=YOUR_CLIENT_ID\nclient_secret=YOUR_CLIENT_SECRET\n```\n\n#### Example Request\n\n```bash\ncurl -X POST https://api.mvmnt.io/oauth2/token \\\n  -H \"Content-Type: application/x-www-form-urlencoded\" \\\n  -d \"grant_type=client_credentials\" \\\n  -d \"client_id=YOUR_CLIENT_ID\" \\\n  -d \"client_secret=YOUR_CLIENT_SECRET\"\n```\n\n#### Success Response\n\n**Status:** `200 OK`\n\n```json\n{\n  \"access_token\": \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 3600\n}\n```\n\n**Response Fields:**\n- `access_token`: JWT Bearer token to use for API requests\n- `token_type`: Always `Bearer`\n- `expires_in`: Token lifetime in seconds (3600 = 1 hour)\n"
  contact:
    name: MVMNT Support
    email: support@mvmnt.io
    url: https://docs.mvmnt.io
  license:
    name: Proprietary
    url: https://mvmnt.io/legal/terms
  x-parsed-md-description:
    result:
    - $$mdtype: Node
      errors: []
      lines:
      - 0
      - 2
      inline: false
      attributes: {}
      children:
      - $$mdtype: Node
        errors: []
        lines:
        - 0
        - 2
        inline: false
        attributes: {}
        children:
        - $$mdtype: Node
          errors: []
          lines:
          - 0
          - 2
          inline: true
          attributes:
            content: The MVMNT API enables you to automate freight brokerage workflows by integrating
          children: []
          type: text
          annotations: []
          slots: {}
        - $$mdtype: Node
          errors: []
          lines:
          - 0
          - 2
          inline: true
          attributes: {}
          children: []
          type: softbreak
          annotations: []
          slots: {}
        - $$mdtype: Node
          errors: []
          lines:
          - 0
          - 2
          inline: true
          attributes:
            content: directly with our Transportation Management System.
          children: []
          type: text
          annotations: []
          slots: {}
        type: inline
        annotations: []
        slots: {}
      type: paragraph
      annotations: []
      slots: {}
    - $$mdtype: Node
      errors: []
      lines:
      - 3
      - 4
      inline: false
      attributes:
        level: 2
      children:
      - $$mdtype: Node
        errors: []
        lines:
        - 3
        - 4
        inline: false
        attributes: {}
        children:
        - $$mdtype: Node
          errors: []
          lines:
          - 3
          - 4
          inline: true
          attributes:
            content: Authentication
          children: []
          type: text
          annotations: []
          slots: {}
        type: inline
        annotations: []
        slots: {}
      type: heading
      annotations: []
      slots: {}
    - $$mdtype: Node
      errors: []
      lines:
      - 5
      - 6
      inline: false
      attributes: {}
      children:
      - $$mdtype: Node
        errors: []
        lines:
        - 5
        - 6
        inline: false
        attributes: {}
        children:
        - $$mdtype: Node
          errors: []
          lines:
          - 5
          - 6
          inline: true
          attributes:
            content: 'OAuth 2.0 client credentials flow. See '
          children: []
          type: text
          annotations: []
          slots: {}
        - $$mdtype: Node
          errors: []
          lines:
          - 5
          - 6
          inline: true
          attributes:
            href: /getting-started/authentication
          children:
          - $$mdtype: Node
            errors: []
            lines:
            - 5
            - 6
            inline: true
            attributes:
              content: Authentication Guide
            children: []
            type: text
            annotations: []
            slots: {}
          type: link
          annotations: []
          slots: {}
          redocly:::linkOriginal:href: /getting-started/authentication
        - $$mdtype: Node
          errors: []
          lines:
          - 5
          - 6
          inline: true
          attributes:
            content: ' for details.'
          children: []
          type: text
          annotations: []
          slots: {}
        type: inline
        annotations: []
        slots: {}
      type: paragraph
      annotations: []
      slots: {}
servers:
- url: https://api.mvmnt.io/v1
  description: Production
security:
- BearerAuth: []
tags:
- name: Vendor Contacts
  description: Vendor contact management operations
paths:
  /vendor-contacts/filter:
    post:
      tags:
      - Vendor Contacts
      summary: Filter vendor contacts
      description: 'Query vendor contacts using flexible filter criteria with AND/OR logic.


        By default, only non-deleted contacts are returned (deletedAt: { isNull: true }).

        Override this by explicitly setting deletedAt filter criteria.

        '
      operationId: filterVendorContacts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VendorContactFilterRequest'
      responses:
        '200':
          description: Filtered vendor contacts with pagination
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                - pageInfo
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/VendorContact'
                  pageInfo:
                    $ref: '#/components/schemas/PaginationInfo'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /vendor-contacts:
    post:
      tags:
      - Vendor Contacts
      summary: Create a new vendor contact
      description: 'Create a new contact for a vendor.


        Contacts represent individuals at the vendor who can be reached for various purposes.

        '
      operationId: createVendorContact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VendorContactInput'
            examples:
              billing:
                summary: Billing contact
                value:
                  vendorId: 550e8400-e29b-41d4-a716-446655440001
                  email: billing@abcwarehouse.com
                  phone: +1-555-123-4567
                  roles:
                  - BILLING
              operations:
                summary: Operations contact
                value:
                  vendorId: 550e8400-e29b-41d4-a716-446655440001
                  email: ops@abcwarehouse.com
                  phone: +1-555-987-6543
                  roles:
                  - OPERATION
                  - AGENT
      responses:
        '201':
          description: Vendor contact created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VendorContact'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '409':
          $ref: '#/components/responses/ConflictError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /vendor-contacts/{id}:
    get:
      tags:
      - Vendor Contacts
      summary: Get a vendor contact by ID
      description: 'Retrieve a single vendor contact by its unique identifier.

        '
      operationId: getVendorContactById
      parameters:
      - $ref: '#/components/parameters/IdOrClientKey'
      responses:
        '200':
          description: Vendor contact found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VendorContact'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    patch:
      tags:
      - Vendor Contacts
      summary: Update a vendor contact
      description: 'Partially update a vendor contact. Only provided fields will be updated.


        - **Omitted fields**: Not modified (current value preserved)

        - **Provided fields**: Updated to the new value

        - **Null values**: Clear the field (set to null) where applicable

        '
      operationId: updateVendorContact
      parameters:
      - $ref: '#/components/parameters/IdOrClientKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VendorContactPatch'
            examples:
              updateEmail:
                summary: Update email address
                value:
                  email: newemail@abcwarehouse.com
              updateRoles:
                summary: Update contact roles
                value:
                  roles:
                  - BILLING
                  - OWNER
      responses:
        '200':
          description: Vendor contact updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VendorContact'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '409':
          $ref: '#/components/responses/ConflictError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      tags:
      - Vendor Contacts
      summary: Delete a vendor contact
      description: 'Soft delete a vendor contact (sets deletedAt timestamp).


        The contact will no longer appear in default queries but can be retrieved

        by explicitly filtering for deleted records.

        '
      operationId: deleteVendorContact
      parameters:
      - $ref: '#/components/parameters/IdOrClientKey'
      responses:
        '204':
          description: Vendor contact deleted successfully
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: not_found
            message: Resource not found
    ConflictError:
      description: Conflict - resource already exists or constraint violation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: conflict
            message: A resource with this identifier already exists
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: internal_server_error
            message: An unexpected error occurred
    UnauthorizedError:
      description: Unauthorized - invalid or missing access token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
            message: Invalid or expired access token
    BadRequestError:
      description: Bad request - invalid input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: bad_request
            message: Invalid request parameters
  schemas:
    Error:
      type: object
      required:
      - error
      - message
      properties:
        error:
          type: string
          description: Error code
        message:
          type: string
          description: Human-readable error message
    VendorContactInput:
      type: object
      required:
      - vendorId
      properties:
        vendorId:
          type: string
          format: uuid
          description: Vendor this contact belongs to
          example: 550e8400-e29b-41d4-a716-446655440001
        email:
          type: string
          format: email
          description: Contact email address
          example: john.smith@abcwarehouse.com
        phone:
          type: string
          description: Contact phone number
          example: +1-555-123-4567
        role:
          type: string
          description: Contact role or title (deprecated - use roles array)
          example: Billing Manager
        roles:
          type: array
          items:
            $ref: '#/components/schemas/VendorContactRole'
          description: Types/roles this contact serves
          example:
          - BILLING
          - AGENT
    PaginationInfo:
      type: object
      required:
      - pageSize
      - hasNextPage
      properties:
        pageSize:
          type: integer
          description: Number of items per page
          example: 50
        hasNextPage:
          type: boolean
          description: Whether there are more pages
          example: true
        hasPreviousPage:
          type: boolean
          description: Whether there are previous pages
          example: false
        endCursor:
          type:
          - string
          - 'null'
          description: Cursor for the next page (null if no next page)
          example: eyJpZCI6IjU1MGU4NDAwLWUyOWItNDFkNC1hNzE2LTQ0NjY1NTQ0MDAwMCJ9
    VendorContactPatch:
      type: object
      description: 'Partial vendor contact update. All fields are optional.


        - **Omitted fields**: Not modified (current value preserved)

        - **Provided fields**: Updated to the new value

        - **Null values**: Clear the field (set to null) where applicable


        Note: vendorId cannot be updated after creation.

        '
      properties:
        email:
          type:
          - string
          - 'null'
          format: email
          description: Contact email address
          example: john.smith@abcwarehouse.com
        phone:
          type:
          - string
          - 'null'
          description: Contact phone number
          example: +1-555-123-4567
        role:
          type:
          - string
          - 'null'
          description: Contact role or title (deprecated - use roles array)
          example: Billing Manager
        roles:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/VendorContactRole'
          description: Types/roles this contact serves (replaces entire array)
          example:
          - BILLING
          - AGENT
    VendorContact:
      type: object
      required:
      - vendor
      - createdAt
      properties:
        object:
          type: string
          enum:
          - VENDOR_CONTACT
          readOnly: true
          description: Object type identifier
          example: VENDOR_CONTACT
        vendor:
          $ref: '#/components/schemas/ResourceReference'
          description: Vendor this contact belongs to (id and key only)
        email:
          type:
          - string
          - 'null'
          format: email
          description: Contact email address
          example: john.smith@abcwarehouse.com
        phone:
          type:
          - string
          - 'null'
          description: Contact phone number
          example: +1-555-123-4567
        role:
          type:
          - string
          - 'null'
          description: Contact role or title (deprecated - use roles array)
          example: Billing Manager
        roles:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/VendorContactRole'
          description: Types/roles this contact serves
          example:
          - BILLING
          - AGENT
        deletedBy:
          anyOf:
          - $ref: '#/components/schemas/UserReference'
          - type: 'null'
          readOnly: true
          description: User who deleted this contact (full user details)
        createdAt:
          type: string
          format: date-time
          readOnly: true
          description: When the contact was created
          example: '2025-01-15T10:00:00Z'
        deletedAt:
          type:
          - string
          - 'null'
          format: date-time
          readOnly: true
          description: When the contact was soft deleted (null if active)
          example: null
    VendorContactFilterRequest:
      type: object
      description: Request body for filtering vendor contacts
      properties:
        filter:
          $ref: '#/components/schemas/VendorContactFilter'
          description: 'Filter criteria (optional - omit to return all vendor contacts).


            Note: deletedAt automatically defaults to { isNull: true } unless explicitly overridden.

            '
        pageSize:
          type: integer
          minimum: 1
          maximum: 250
          default: 50
          description: Number of results per page
        cursor:
          type: string
          description: Pagination cursor for next page
      example:
        filter:
          and:
          - roles:
              includes: BILLING
          - vendorId:
              equalTo: 550e8400-e29b-41d4-a716-446655440001
        pageSize: 50
    UUIDFilter:
      type: object
      description: Filter options for UUID fields (all operations)
      properties:
        equalTo:
          type: string
          format: uuid
          description: Exact match
        notEqualTo:
          type: string
          format: uuid
          description: Not equal to
        in:
          type: array
          items:
            type: string
            format: uuid
          description: Matches any UUID in the array
        notIn:
          type: array
          items:
            type: string
            format: uuid
          description: Does not match any UUID in the array
        isNull:
          type: boolean
          description: Field is null (true) or not null (false)
    VendorContactRole:
      type: string
      description: Type of vendor contact role
      enum:
      - AGENT
      - BILLING
      - OPERATION
      - OWNER
    DatetimeFilter:
      type: object
      description: Filter options for datetime fields
      properties:
        equalTo:
          type: string
          format: date-time
          description: Exact match
        notEqualTo:
          type: string
          format: date-time
          description: Not equal to
        lessThan:
          type: string
          format: date-time
          description: Before this datetime
        lessThanOrEqualTo:
          type: string
          format: date-time
          description: On or before this datetime
        greaterThan:
          type: string
          format: date-time
          description: After this datetime
        greaterThanOrEqualTo:
          type: string
          format: date-time
          description: On or after this datetime
        isNull:
          type: boolean
          description: Field is null (true) or not null (false)
    UserReference:
      type: object
      description: 'Enhanced reference to a user resource (returned in responses).

        Includes full user details in addition to id/key.


        Note: Does NOT include nested references (teams, etc.) to prevent recursion.

        Maximum nesting depth: 1 level.

        '
      required:
      - id
      - email
      - status
      - createdAt
      - updatedAt
      properties:
        id:
          type: string
          format: uuid
          description: User UUID
          example: 550e8400-e29b-41d4-a716-446655440000
        key:
          type:
          - string
          - 'null'
          maxLength: 512
          description: Client-defined reference ID if set
          example: ERP-USER-12345
        email:
          type: string
          format: email
          description: User's email address
          example: john.doe@example.com
        name:
          type:
          - string
          - 'null'
          description: User's full name
          example: John Doe
        phone:
          type:
          - string
          - 'null'
          description: User's phone number
          example: +1-555-123-4567
        phoneExt:
          type:
          - string
          - 'null'
          description: Phone extension
          example: '123'
        status:
          type: string
          description: User account status
          enum:
          - PENDING
          - ACTIVE
          - INACTIVE
          example: ACTIVE
        avatarId:
          type:
          - string
          - 'null'
          format: uuid
          description: Profile avatar document ID
          example: 7c9e6679-7425-40de-944b-e07fc1f90ae7
        createdAt:
          type: string
          format: date-time
          description: When the user was created
          example: '2025-01-15T10:00:00Z'
        updatedAt:
          type: string
          format: date-time
          description: When the user was last updated
          example: '2025-01-15T14:30:00Z'
        deletedAt:
          type:
          - string
          - 'null'
          format: date-time
          description: When the user was soft deleted (null if active)
          example: null
    ResourceReference:
      type: object
      description: Reference to another resource (returned in responses)
      required:
      - id
      properties:
        id:
          type: string
          format: uuid
          description: Resource UUID
        key:
          type:
          - string
          - 'null'
          description: Client-defined reference ID if set
      example:
        id: 550e8400-e29b-41d4-a716-446655440000
        key: ERP-USER-12345
    StringFilter:
      type: object
      description: Filter options for string fields
      properties:
        equalTo:
          type: string
          description: Exact match
        notEqualTo:
          type: string
          description: Not equal to
        in:
          type: array
          items:
            type: string
          description: Matches any value in the array
        notIn:
          type: array
          items:
            type: string
          description: Does not match any value in the array
        includes:
          type: string
          description: Contains substring (case-insensitive)
        notIncludes:
          type: string
          description: Does not contain substring (case-insensitive)
        startsWith:
          type: string
          description: Starts with prefix (case-insensitive)
        notStartsWith:
          type: string
          description: Does not start with prefix (case-insensitive)
        endsWith:
          type: string
          description: Ends with suffix (case-insensitive)
        notEndsWith:
          type: string
          description: Does not end with suffix (case-insensitive)
        isNull:
          type: boolean
          description: Field is null (true) or not null (false)
    VendorContactRoleFilter:
      type: object
      description: Filter for contact role enum array field
      properties:
        includes:
          $ref: '#/components/schemas/VendorContactRole'
          description: Array contains this contact role
        notIncludes:
          $ref: '#/components/schemas/VendorContactRole'
          description: Array does not contain this contact role
        isNull:
          type: boolean
          description: Field is null (true) or not null (false)
    VendorContactFilter:
      type: object
      description: Filter criteria for vendor contacts with AND/OR logic support
      properties:
        and:
          type: array
          description: All conditions must match (recursive)
          items:
            $ref: '#/components/schemas/VendorContactFilter'
        or:
          type: array
          description: At least one condition must match (recursive)
          items:
            $ref: '#/components/schemas/VendorContactFilter'
        not:
          $ref: '#/components/schemas/VendorContactFilter'
          description: Negates the filter
        vendorId:
          $ref: '#/components/schemas/UUIDFilter'
        email:
          $ref: '#/components/schemas/StringFilter'
        phone:
          $ref: '#/components/schemas/StringFilter'
        role:
          $ref: '#/components/schemas/StringFilter'
        roles:
          $ref: '#/components/schemas/VendorContactRoleFilter'
        deletedById:
          $ref: '#/components/schemas/UUIDFilter'
        createdAt:
          $ref: '#/components/schemas/DatetimeFilter'
        deletedAt:
          $ref: '#/components/schemas/DatetimeFilter'
  parameters:
    IdOrClientKey:
      name: id
      in: path
      required: true
      description: Resource ID (UUID) or client key
      schema:
        type: string
      example: 550e8400-e29b-41d4-a716-446655440000
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth 2.0 access token obtained via client credentials flow