Field NationDeveloper Platform
Field NationDeveloper Platform
IntroductionQuick StartAPI Playground

Getting Started

API Reference

Overview
MessagesAttachmentsContacts
Work OrdersCommunication

Attachments

Upload and manage files on work orders.


Attachments

Upload documents, photos, or diagrams to a work order. Files are organized into folders.

List Attachments

GET /workorders/{id}/attachments

Response

{
  "results": [
    {
      "id": 1,
      "name": "Work Instructions",
      "results": [
        {
          "id": 101,
          "file": {
            "name": "install_guide.pdf",
            "link": "https://cdn.fieldnation.com/files/abc.pdf",
            "size_bytes": 245000
          },
          "created": { "utc": "2025-01-15 10:00:00" }
        }
      ]
    },
    {
      "id": 2,
      "name": "Completion Photos",
      "results": []
    }
  ]
}

Create Folder

POST /workorders/{id}/attachments

{
  "name": "Site Documentation"
}

Upload File

POST /workorders/{id}/attachments/{folder_id}

Content-Type: multipart/form-data

curl -X POST \
  -H "Authorization: Bearer {token}" \
  -F "file=@/path/to/document.pdf" \
  https://api.fieldnation.com/api/rest/v2/workorders/{id}/attachments/{folder_id}
const formData = new FormData();
formData.append('file', fileBlob, 'document.pdf');

fetch(`/workorders/${id}/attachments/${folderId}`, {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${token}` },
  body: formData
});

Update File

PUT /workorders/{id}/attachments/{folder_id}/{attachment_id}

{
  "filename": "updated_guide.pdf",
  "visible_to_provider": true
}

Delete File

DELETE /workorders/{id}/attachments/{folder_id}/{attachment_id}

Supported File Types

CategoryExtensions
Images.jpg, .jpeg, .png, .gif
Documents.pdf, .doc, .docx
Spreadsheets.xls, .xlsx, .csv

Maximum file size is typically 10MB. Large files may need to be compressed.

Provider-Uploaded Photos

Providers typically upload completion photos via the mobile app. These appear in designated folders and are used for work verification.

Related

  • Messages - Text communication
  • Tasks - Photo tasks

Last updated on

Messages

Communicate with providers via work order messages.

Contacts

Manage site contacts for work orders.

On this page

Attachments
List Attachments
Response
Create Folder
Upload File
Update File
Delete File
Supported File Types
Provider-Uploaded Photos
Related