Fulcrumpro Attachment API

The Attachment API from Fulcrumpro — 6 operation(s) for attachment.

OpenAPI Specification

fulcrumpro-attachment-api-openapi.yml Raw ↑
openapi: 3.0.4
info:
  title: Fulcrum Public Accounting Code Attachment API
  version: v1
servers:
- url: https://api.fulcrumpro.com
tags:
- name: Attachment
paths:
  /api/attachments:
    post:
      tags:
      - Attachment
      summary: Create an attachment
      operationId: CreateAttachment
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - Detail.IsNoteAttachment
              - File
              type: object
              properties:
                File:
                  type: string
                  description: The file itself
                  format: binary
                Detail.Owner.Type:
                  $ref: '#/components/schemas/CommonEnumOwnerTypeCreateEnum'
                Detail.Owner.Id:
                  maxLength: 36
                  minLength: 24
                  type: string
                  description: The primary owner id of this attachment.
                Detail.Description:
                  maxLength: 200
                  minLength: 1
                  type: string
                  description: File description
                Detail.IsNoteAttachment:
                  type: boolean
                  description: Indicates whether this attachment is bound to a note.
                Detail.Parent.Type:
                  $ref: '#/components/schemas/CommonEnumOwnerTypeCreateEnum'
                Detail.Parent.Id:
                  maxLength: 36
                  minLength: 24
                  type: string
                  description: The primary owner id of this attachment.
                Detail.Metadata:
                  type: object
                  additionalProperties:
                    type: string
                    nullable: true
                  description: Metadata to associate to the attachment.
            encoding:
              File:
                style: form
              Detail.Owner.Type:
                style: form
              Detail.Owner.Id:
                style: form
              Detail.Description:
                style: form
              Detail.IsNoteAttachment:
                style: form
              Detail.Parent.Type:
                style: form
              Detail.Parent.Id:
                style: form
              Detail.Metadata:
                style: form
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedResponseDto'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/CreatedResponseDto'
  /api/attachments/remote:
    post:
      tags:
      - Attachment
      summary: Create an attachment based on a remote data endpoint.
      operationId: CreateRemoteAttachment
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/AttachmentRemoteCreateDto'
          application/json:
            schema:
              $ref: '#/components/schemas/AttachmentRemoteCreateDto'
          text/json:
            schema:
              $ref: '#/components/schemas/AttachmentRemoteCreateDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/AttachmentRemoteCreateDto'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedResponseDto'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/CreatedResponseDto'
  /api/attachments/{attachmentId}:
    delete:
      tags:
      - Attachment
      summary: Delete a specific attachment
      operationId: DeleteAttachment
      parameters:
      - name: attachmentId
        in: path
        required: true
        schema:
          maxLength: 24
          minLength: 24
          type: string
      responses:
        '200':
          description: Success
        '204':
          description: Attachment did not exist
        '410':
          description: Attachment record had an invalid Id value
    get:
      tags:
      - Attachment
      summary: Get a specific attachment
      operationId: GetAttachment
      parameters:
      - name: attachmentId
        in: path
        required: true
        schema:
          maxLength: 24
          minLength: 24
          type: string
      responses:
        '200':
          description: The attachment for the given id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentDto'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/AttachmentDto'
        '404':
          description: Attachment did not exist
  /api/attachments/{attachmentId}/download:
    get:
      tags:
      - Attachment
      summary: Download a specific attachment
      operationId: DownloadAttachment
      parameters:
      - name: attachmentId
        in: path
        required: true
        schema:
          maxLength: 24
          minLength: 24
          type: string
      - name: fileName
        in: query
        schema:
          type: string
      responses:
        '200':
          description: The attachment for the given id
        '404':
          description: Attachment did not exist
  /api/attachments/download:
    post:
      tags:
      - Attachment
      summary: Download attachment(s) for a given filter in ZIP format
      operationId: DownloadAttachments
      parameters:
      - name: fileName
        in: query
        schema:
          type: string
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/AttachmentRequestFindParameters'
          application/json:
            schema:
              $ref: '#/components/schemas/AttachmentRequestFindParameters'
          text/json:
            schema:
              $ref: '#/components/schemas/AttachmentRequestFindParameters'
          application/*+json:
            schema:
              $ref: '#/components/schemas/AttachmentRequestFindParameters'
        required: true
      responses:
        '200':
          description: The attachments for the given filter
        '400':
          description: File extension not supported
        '404':
          description: No attachments exist
  /api/attachments/list:
    post:
      tags:
      - Attachment
      summary: Find attachments based on search parameters.
      operationId: ListAttachment
      parameters:
      - name: Sort.Field
        in: query
        description: Sort field
        schema:
          minLength: 1
          type: string
      - name: Sort.Dir
        in: query
        description: Sort direction
        schema:
          $ref: '#/components/schemas/CommonEnumSortDirectionEnum'
      - name: Skip
        in: query
        description: Number of records to skip.
        schema:
          minimum: 0
          type: integer
          format: int32
      - name: Take
        in: query
        description: Number of records to return (maximum)
        schema:
          maximum: 5000
          minimum: 0
          type: integer
          format: int32
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/AttachmentRequestFindParameters'
          application/json:
            schema:
              $ref: '#/components/schemas/AttachmentRequestFindParameters'
          text/json:
            schema:
              $ref: '#/components/schemas/AttachmentRequestFindParameters'
          application/*+json:
            schema:
              $ref: '#/components/schemas/AttachmentRequestFindParameters'
        required: true
      responses:
        '200':
          description: List of attachments matching the filters
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AttachmentDto'
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AttachmentDto'
components:
  schemas:
    AttachmentDto:
      required:
      - fileId
      - id
      - owner
      type: object
      properties:
        id:
          maxLength: 24
          minLength: 24
          type: string
          description: Unique Id associated to this entity
        owner:
          $ref: '#/components/schemas/AttachmentOwnerDto'
        name:
          type: string
          description: The file name.
          nullable: true
        description:
          type: string
          description: Description
          nullable: true
        type:
          $ref: '#/components/schemas/CommonEnumAttachmentTypeEnum'
        format:
          $ref: '#/components/schemas/CommonEnumAttachmentMediaFormatEnum'
        size:
          type: integer
          description: File size in bytes
          format: int64
          nullable: true
        fileId:
          minLength: 1
          type: string
          description: Internal file identifier
        createdUtc:
          type: string
          description: 'UTC timestamp when this attachment record was created on its current owner.

            Note: when an attachment is copied between owners (for example, from a quote to a job),

            a new attachment record is created and this value reflects the copy time, not the original upload time.'
          format: date-time
      additionalProperties: false
      description: Represents a file attachment.
    CommonEnumOwnerTypeEnum:
      enum:
      - salesOrder
      - salesOrderReceiving
      - salesOrderPartLineItem
      - quote
      - quotePartLineItem
      - purchaseOrder
      - purchaseOrderReceiving
      - purchaseOrderPartLineItem
      - invoice
      - workOrderOperation
      - operation
      - inventoryLot
      - item
      - job
      type: string
      description: Owner types
    CommonEnumAttachmentMediaFormatEnum:
      enum:
      - undefined
      - cad
      - document
      - image
      - video
      type: string
      description: Attachment format
    AttachmentOwnerCreateDto:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CommonEnumOwnerTypeCreateEnum'
        id:
          maxLength: 36
          minLength: 24
          type: string
          description: The primary owner id of this attachment.
      additionalProperties: false
      description: Attachment owner
    AttachmentRequestFindParameters:
      type: object
      properties:
        owner:
          $ref: '#/components/schemas/AttachmentOwnerDto'
        owners:
          maxItems: 500
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/AttachmentOwnerDto'
          description: The primary owners of the attachment.
          nullable: true
        attachmentIds:
          maxItems: 500
          minItems: 1
          type: array
          items:
            type: string
          description: Filter to attachments whose ids are in the list.
          nullable: true
        formats:
          maxItems: 500
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/CommonEnumAttachmentMediaFormatEnum'
          description: Allows for filtering based on specific attachment format types.
          nullable: true
      additionalProperties: false
      description: 'Parameters used for searching/finding attachmewnts.


        Note: These filters are applied using the AND operator. If both attachmentIds and owner are provided, attachments that do match the owner will not be returned.'
    AttachmentOwnerDto:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CommonEnumOwnerTypeEnum'
        id:
          maxLength: 36
          minLength: 24
          type: string
          description: The primary owner id of this attachment.
      additionalProperties: false
      description: Attachment owner
    CommonEnumAttachmentTypeEnum:
      enum:
      - standard
      - externalAccessDocument
      - certification
      type: string
      description: Attachment types
    CreatedResponseDto:
      required:
      - id
      type: object
      properties:
        id:
          minLength: 1
          type: string
          description: The id of the created record
      additionalProperties: false
      description: Response for a created record
    CommonEnumOwnerTypeCreateEnum:
      enum:
      - salesOrder
      - salesOrderReceiving
      - salesOrderPartLineItem
      - quote
      - quotePartLineItem
      - purchaseOrder
      - purchaseOrderReceiving
      - purchaseOrderPartLineItem
      - invoice
      - workOrderOperation
      - operation
      - item
      - job
      type: string
      description: Owner types
    CommonEnumSortDirectionEnum:
      enum:
      - ascending
      - descending
      type: string
      description: Specify sorting direction.
    AttachmentRemoteCreateDto:
      required:
      - accessUrl
      - fileName
      - owner
      type: object
      properties:
        owner:
          $ref: '#/components/schemas/AttachmentOwnerCreateDto'
        parent:
          $ref: '#/components/schemas/AttachmentOwnerCreateDto'
        fileName:
          maxLength: 200
          minLength: 1
          type: string
          description: File name
        accessUrl:
          minLength: 1
          type: string
          description: File access url
          format: uri
        token:
          type: string
          description: Optional token that may be required for access the AccessUrl
          nullable: true
      additionalProperties: false
      description: Create an attachment.
  securitySchemes:
    bearer:
      type: http
      description: Your API bearer token generated in System Data > Advanced > Public API Setup
      scheme: bearer
      bearerFormat: JWT
x-tagGroups:
- name: Accounting Code
  tags:
  - Accounting Code
- name: Attachment
  tags:
  - Attachment
  - Attachment Certification
- name: Auth
  tags:
  - Auth
- name: CAPAs
  tags:
  - CAPAs
- name: Chart Of Accounts
  tags:
  - Chart Of Accounts
- name: Company Info
  tags:
  - Company Info
- name: Custom Field
  tags:
  - Custom Field
- name: Customer
  tags:
  - Customer
  - Customer Address
  - Customer Contact
- name: Customer Tier
  tags:
  - Customer Tier
- name: Department
  tags:
  - Department
- name: Equipment
  tags:
  - Equipment
- name: Gauge Code
  tags:
  - Gauge Code
- name: Grade Code
  tags:
  - Grade Code
- name: InProcessTrackingFieldType
  tags:
  - InProcessTrackingFieldType
- name: Inventory
  tags:
  - Inventory
- name: Inventory Event
  tags:
  - Inventory Event
  - Inventory Event Details
- name: Inventory Lot
  tags:
  - Inventory Lot
- name: Inventory Transactions
  tags:
  - Inventory Transactions
- name: Invoice
  tags:
  - Invoice
  - Invoice Deposit Adjustment Line Item
  - Invoice Deposit Line Item
  - Invoice Discount Line Item
  - Invoice Fee Line Item
  - Invoice Line Item
  - Invoice Note
  - Invoice Part Line Item
  - Invoice Refund Line Item
  - Invoice Shipping Charge Line Item
  - Invoice Tax Line Item
- name: Item
  tags:
  - Item
  - Item Custom Fields
  - Item Customer
  - Item Material Vendor
  - Item PriceBreaks
  - Item Routing
  - Item Vendor
- name: Item Category
  tags:
  - Item Category
- name: Item Class
  tags:
  - Item Class
- name: Item Tag
  tags:
  - Item Tag
- name: Job
  tags:
  - Job
  - Job Custom Fields
  - Job Full Routing
  - Job Part Line Item Full Routing
  - Job Item To Make
  - Job Item To Make Operation
  - Job Operation
- name: Job Tracking Timers
  tags:
  - Job Tracking Timers
- name: Location
  tags:
  - Location
- name: Material
  tags:
  - Material
  - Material Vendor
- name: Material Code
  tags:
  - Material Code
- name: NCRs
  tags:
  - NCRs
- name: Note
  tags:
  - Note
- name: Operation
  tags:
  - Operation
- name: Payment Term
  tags:
  - Payment Term
- name: Purchase Order
  tags:
  - Purchase Order
  - Purchase Order Custom Fields
  - Purchase Order Discount Line Item
  - Purchase Order Fee Line Item
  - Purchase Order Line Item
  - Purchase Order Outside Processing Line Item
  - Purchase Order Part Line Item
  - Purchase Order Tax Line Item
  - Purchase Order Vendor Credit Line Item
- name: Quote
  tags:
  - Quote
  - Quote Custom Fields
  - Quote Discount Line Item
  - Quote Fee Line Item
  - Quote Part Line Item
  - Quote Part Line Item Custom Fields
  - Quote Part Line Item Full Routing
  - Quote Tax Line Item
- name: Receiving
  tags:
  - Receiving Receipt
  - Receiving Receipt Line Item
- name: Refund Reason Code
  tags:
  - Refund Reason Code
- name: Reporting
  tags:
  - Reporting
- name: Sales Order
  tags:
  - Sales Order
  - Sales Order Blanket Line Item
  - Sales Order Custom Fields
  - Sales Order Discount Line Item
  - Sales Order Fee Line Item
  - Sales Order Line Item
  - Sales Order Part Line Item
  - Sales Order Part Line Item Custom Fields
  - Sales Order Part Line Item Full Routing
  - Sales Order Refund Line Item
  - Sales Order Shipping Charge Line Item
  - Sales Order Tax Line Item
- name: ScrapReport
  tags:
  - ScrapReport
- name: Shape Code
  tags:
  - Shape Code
- name: Shipment Line Items (V3)
  tags:
  - Shipment Line Items (V3)
- name: Shipment
  tags:
  - Shipment Custom Fields
- name: Shipments
  tags:
  - Shipments
- name: Shipping Method
  tags:
  - Shipping Method
- name: Tag
  tags:
  - Tag
- name: Tax Rate
  tags:
  - Tax Rate
- name: Time Clock Timers
  tags:
  - Time Clock Timers
- name: Timer
  tags:
  - Timer
- name: User
  tags:
  - User
  - User Status
- name: Vendor
  tags:
  - Vendor
  - Vendor Address
  - Vendor Contact
- name: Work Order
  tags:
  - Work Order
- name: WorkCenter
  tags:
  - WorkCenter