Overview
This API endpoint lets you pull a list of all custom fields defined for projects in your SubcontractorHub account. It's the first step when you need to know what custom data fields are available before reading or updating specific project values.
Why this matters: If you're building integrations or syncing project data with another system (like your CRM or ERP), you need to know exactly which custom fields exist and what type of data they hold.
💡 API (Application Programming Interface): A way for two software systems to talk to each other automatically — like a digital messenger that sends and receives data between SubcontractorHub and your other tools.
Prerequisites
✅ A valid SubcontractorHub API key (get this from your admin under Settings → API)
✅ A developer or technical team member to help with implementation
✅ A tool for making API calls (e.g., Postman, cURL, or your custom integration code)
API Details
Property | Value |
Endpoint URL |
|
Method |
|
Authentication | API key (passed as header or parameter per your account setup) |
Step-by-Step Instructions
Step 1: Set Up Your API Request
Open your API tool (Postman, cURL, etc.)
Create a new GET request
Enter the endpoint URL:
https://api.virtualsaleportal.com/api/public/v2/get-custom-fields/projectAdd your API key to the request headers
Step 2: Send the Request
Click Send (in Postman) or execute your cURL command. The API will return a JSON response listing all custom fields.
Step 3: Understand the Response
The response contains a fields array. Each field includes:
Property | Description |
| The human-readable name of the field (e.g., "Contract Approved") |
| The system key used in API calls (e.g., |
| The data type: |
| (For dropdowns only) The list of available values |
Example Response
{
" fields": [
{
" label": "Contract Approved",
" field_key": " m1_approved_date",
" type": " date_time"
},
{
" label": "Save Type",
" field_key": " save_type",
" type": " dropdown",
" options": [
{ " label": "None", " value": "None" },
{ " label": "Passive $100", " value": "Passive $100" },
{ " label": "Active $350", " value": "Active $350" }
]
}
]
}
Real-World Example
Scenario: Your operations manager wants to sync project milestone dates with an external project tracker.
Call this endpoint to discover all custom fields
Find the
field_keyfor each milestone (e.g.,m1_approved_date)Use those keys with the Get Custom Fields With Values endpoint to pull actual dates per project
Push the data to your external tracker
Related API Endpoints
Endpoint | Purpose |
Get Custom Fields With Values Per Project | Pull field values for a specific project |
Update Custom Fields of Project | Update field values for a specific project |
Get Single Project Detail | Get full project details including system info |
Troubleshooting / FAQ
Question | Answer |
I'm getting a 401 Unauthorized error | Your API key may be invalid or expired — check with your admin |
The response is empty | Your account may not have any custom fields configured yet |
I see fields I don't recognize | Custom fields may have been created by your EPC or parent org |
Change Log Summary
Change | Details |
Original Title | V2 API Get Project Custom Fields |
New Title | Retrieve All Project Custom Fields Using the V2 API |
Key Changes | Added plain-language overview, explained API concept, structured response documentation, added real-world example and troubleshooting |