Fleetbase Contacts API

Customer and facilitator contacts.

OpenAPI Specification

fleetbase-contacts-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Fleetbase Contacts API
  description: RESTful API for the Fleetbase open-source logistics and supply chain operating system. Manage orders, places, contacts, drivers, vehicles, fleets, zones, service rates, tracking, and webhooks. Available self-hosted (AGPL-3.0) or via managed Fleetbase Cloud.
  termsOfService: https://www.fleetbase.io/terms
  contact:
    name: Fleetbase Support
    email: hello@fleetbase.io
    url: https://docs.fleetbase.io
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.en.html
  version: '1.0'
servers:
- url: https://api.fleetbase.io/v1
  description: Fleetbase Cloud / self-hosted REST API
security:
- bearerAuth: []
tags:
- name: Contacts
  description: Customer and facilitator contacts.
paths:
  /contacts:
    get:
      operationId: listContacts
      tags:
      - Contacts
      summary: List contacts
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: A list of contacts.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Contact'
    post:
      operationId: createContact
      tags:
      - Contacts
      summary: Create a contact
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Contact'
      responses:
        '200':
          description: The created contact.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
  /contacts/{id}:
    get:
      operationId: getContact
      tags:
      - Contacts
      summary: Retrieve a contact
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: The requested contact.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
    put:
      operationId: updateContact
      tags:
      - Contacts
      summary: Update a contact
      parameters:
      - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Contact'
      responses:
        '200':
          description: The updated contact.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
    delete:
      operationId: deleteContact
      tags:
      - Contacts
      summary: Delete a contact
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: Confirmation the contact was deleted.
components:
  parameters:
    limit:
      name: limit
      in: query
      description: Number of records to return (default 25, max 100).
      schema:
        type: integer
        default: 25
        maximum: 100
    offset:
      name: offset
      in: query
      description: Number of records to skip for pagination.
      schema:
        type: integer
        default: 0
    id:
      name: id
      in: path
      required: true
      description: The unique public identifier of the resource.
      schema:
        type: string
  schemas:
    Contact:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        title:
          type: string
        email:
          type: string
        phone:
          type: string
        type:
          type: string
          description: Contact type (customer or contact).
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key passed as a Bearer token in the Authorization header. Test keys are prefixed flb_test_ and live keys flb_live_.