Field NationDeveloper Platform
Field NationDeveloper Platform
GlossaryError CodesSupport & HelpEnvironmentsFrequently Asked Questions

Environments

Understand Sandbox and Production environments, access URLs, testing strategies, and migration best practices.


Environment Overview

Sandbox Environment

A complete test environment that mirrors production functionality without affecting live data or operations.

Access URLs

Prop

Type

Description

Web Application?URL

[app-sandbox.fndev.net](https://app-sandbox.fndev.net)

API Base URL?URL

[api-sandbox.fndev.net](https://api-sandbox.fndev.net)

Webhooks UI?URL

[ui-sandbox.fndev.net/integrations/webhooks](https://ui-sandbox.fndev.net/integrations/webhooks)

Swagger UI?URL

[ui-sandbox.fndev.net/integrations/webhooks/_api](https://ui-sandbox.fndev.net/integrations/webhooks/_api)

Purpose

  • Development - Build and iterate on your integration
  • Testing - Test all functionality without risk
  • Training - Learn the platform and API
  • Staging - Final validation before production

Key Characteristics

  • ✅ Identical features to production
  • ✅ Separate database (no live data)
  • ✅ Test work orders and providers
  • ✅ No real payments processed
  • ✅ Safe for experimentation
  • ✅ API credentials separate from production

Access Required: Request sandbox access through a support case with your Company ID and integration requirements.

Webhook IP Addresses (Sandbox)

Whitelist these IPs if your webhook endpoint uses IP filtering:

18.215.51.196
3.223.100.250
44.199.193.222

Security Guide →

Production Environment

The live Field Nation platform where real work orders, payments, and operations occur.

Access URLs

Prop

Type

Description

Web Application?URL

[app.fieldnation.com](https://app.fieldnation.com)

API Base URL?URL

Contact Field Nation support for production access

Status Page?URL

[status.fieldnation.com](https://status.fieldnation.com)

Purpose

  • Live Operations - Real work orders and payments
  • Customer Facing - Actual business operations
  • Performance Critical - Must be reliable and tested

Key Characteristics

  • ⚠️ Real data and operations
  • ⚠️ Actual payments processed
  • ⚠️ Affects live work orders
  • ⚠️ Requires thorough testing first
  • ⚠️ Separate API credentials required
  • ⚠️ Change control recommended

Production Access: Requires approval and thorough testing in sandbox first. Contact Field Nation support to request production API credentials.

Webhook IP Addresses (Production)

Contact Field Nation support for production webhook IP addresses to whitelist.


Environment Comparison

FeatureSandboxProduction
PurposeDevelopment & TestingLive Operations
DataTest data onlyReal customer data
PaymentsNo real paymentsReal payments processed
Work OrdersTest work ordersLive work orders
API CredentialsSandbox-specificProduction-specific
AvailabilityOn requestRequires approval
Error ImpactNo real impactAffects operations
TestingEncouragedAfter sandbox validation

Getting Access

Sandbox Access

Submit Support Case

Submit a support case with:

Subject: Sandbox Access Request

Company ID: [Your Company ID]
Company Name: [Your Company Name]
Integration Type: [REST API / Webhooks / Connector]
Purpose: [Development and testing of integration]

Technical Contact:
Name: [Name]
Email: [Email]
Phone: [Phone]

Receive Credentials

Field Nation team will:

  • Provision sandbox account
  • Provide access credentials
  • Share sandbox Company ID

Begin Development

Log in to sandbox and start building:

  • Create test work orders
  • Configure webhooks
  • Test API integrations

Production Access

Complete Sandbox Testing

Ensure your integration:

  • ✅ Passes all test scenarios
  • ✅ Handles errors gracefully
  • ✅ Implements proper security
  • ✅ Meets performance requirements

Submit Production Request

Submit a support case:

Subject: Production API Access Request

Company ID: [Your Production Company ID]
Company Name: [Your Company Name]
Integration Type: [REST API / Webhooks / Connector]

Sandbox Testing Complete:
- Testing Duration: [X weeks/months]
- Test Scenarios: [List key scenarios tested]
- Issues Resolved: [Any issues found and fixed]

Production Use Case:
[Describe your production integration]

Expected Volume:
- Work Orders per day: [Estimate]
- API Requests per day: [Estimate]
- Webhooks per day: [Estimate]

Receive Approval

Field Nation will:

  • Review your request
  • Verify sandbox testing
  • Provide production credentials
  • Assign support contact

Deploy to Production

Follow deployment best practices:

  • Use environment variables for credentials
  • Monitor closely after deployment
  • Have rollback plan ready

Testing Strategy

Development Phase (Sandbox)

Goals: Build core functionality

Loading diagram...

Best Practices:

  • Use ngrok or localtunnel for local testing
  • Log all requests and responses
  • Test individual endpoints first
  • Verify signature validation

Testing Guide →


Integration Testing (Sandbox)

Goals: Validate end-to-end flows

Create Test Scenarios

Define realistic workflows:

  • Work order creation and publishing
  • Provider assignment and acceptance
  • Work completion and approval
  • Payment processing

Execute Test Cases

Run comprehensive tests:

  • Happy path scenarios
  • Error handling
  • Edge cases
  • Data validation

Monitor Results

Track integration health:

  • Webhook delivery success rate
  • API response times
  • Error rates and types
  • Data accuracy

Iterate and Improve

Based on results:

  • Fix identified issues
  • Optimize performance
  • Enhance error handling
  • Document learnings

Staging Phase (Sandbox)

Goals: Production-like validation

Staging Checklist:

  • ☐ All features implemented and tested
  • ☐ Error handling comprehensive
  • ☐ Security measures in place
  • ☐ Performance meets requirements
  • ☐ Monitoring and alerts configured
  • ☐ Documentation complete
  • ☐ Team trained on operations
  • ☐ Rollback procedure defined

Production Deployment

Goals: Safe, monitored launch

  1. Pre-Deployment

    # Verify environment variables
    echo $FN_CLIENT_ID
    echo $FN_CLIENT_SECRET
    echo $FN_BASE_URL
    
    # Test connectivity
    curl https://api.fieldnation.com/health
  2. Deployment

    • Deploy webhook endpoint
    • Create production webhooks
    • Enable API integration
    • Monitor initial traffic
  3. Post-Deployment

    • Run smoke tests
    • Verify webhook deliveries
    • Check error logs
    • Monitor metrics

Critical Metrics:

// Track these in production
const metrics = {
  // Webhook health
  webhookSuccessRate: '>99%',
  webhookLatency: '<2s p95',
  deliveryFailures: '<1%',

  // API health
  apiErrorRate: '<1%',
  apiLatency: '<500ms p95',

  // Business metrics
  workOrdersCreated: 'track daily',
  syncFailures: 'alert immediately'
};

Set Up Alerts:

  • Webhook delivery failures
  • High error rates
  • Slow response times
  • Authentication failures

Monitoring Guide →

If Issues Arise:

  1. Immediate Actions

    # Deactivate webhook
    curl -X PUT https://api.fieldnation.com/api/v1/webhooks/wh_prod \
      -H "Authorization: Bearer $TOKEN" \
      -d '{"status": "inactive"}'
    
    # Stop API calls
    # Revert to previous version
  2. Assess Impact

    • How many work orders affected?
    • Any data loss or corruption?
    • Customer impact level?
  3. Fix and Redeploy

    • Identify root cause
    • Fix in sandbox
    • Test thoroughly
    • Redeploy with monitoring

Migration: Sandbox → Production

Code Changes

// ❌ Don't hardcode environments
const baseUrl = 'https://api-sandbox.fndev.net';

// ✅ Use environment variables
const baseUrl = process.env.FN_BASE_URL;

// ❌ Don't commit credentials
const clientId = 'sandbox_client_id';

// ✅ Use environment variables
const clientId = process.env.FN_CLIENT_ID;

Configuration Files

.env.sandbox
FN_BASE_URL=https://api-sandbox.fndev.net
FN_CLIENT_ID=sandbox_client_id
FN_CLIENT_SECRET=sandbox_secret
FN_WEBHOOK_SECRET=sandbox_webhook_secret
.env.production
FN_BASE_URL=https://api.fieldnation.com
FN_CLIENT_ID=prod_client_id
FN_CLIENT_SECRET=prod_secret
FN_WEBHOOK_SECRET=prod_webhook_secret

Deployment Checklist

  • ☐ Environment variables configured
  • ☐ Production credentials obtained
  • ☐ Webhook endpoints updated
  • ☐ IP whitelisting configured (if applicable)
  • ☐ Monitoring and alerts active
  • ☐ Error handling tested
  • ☐ Team notified of deployment
  • ☐ Rollback procedure ready

Best Practices

Do's ✅

  • Always test in sandbox first
  • Use separate credentials for each environment
  • Implement environment-aware configuration
  • Monitor production closely after deployment
  • Keep sandbox and production code in sync
  • Document environment-specific settings
  • Test error scenarios in sandbox
  • Have a rollback plan ready

Don'ts ❌

  • Never test in production
  • Don't use sandbox credentials in production
  • Don't skip sandbox testing phase
  • Don't deploy without monitoring
  • Don't mix sandbox and production data
  • Don't hardcode environment URLs
  • Don't deploy during peak hours
  • Don't skip error handling

Troubleshooting

Wrong Environment

Symptom: API calls work in sandbox but fail in production

Check:

console.log('Base URL:', process.env.FN_BASE_URL);
console.log('Client ID:', process.env.FN_CLIENT_ID.substring(0, 10) + '...');

// Verify you're calling correct environment
if (process.env.FN_BASE_URL.includes('sandbox')) {
  console.log('✅ Using SANDBOX');
} else {
  console.log('✅ Using PRODUCTION');
}

Mixed Credentials

Symptom: Authentication fails unexpectedly

Solution: Verify credentials match environment

# Check which environment credentials are for
curl -X POST https://api-sandbox.fndev.net/authentication/api/oauth/token \
  -d "grant_type=client_credentials" \
  -d "client_id=$FN_CLIENT_ID" \
  -d "client_secret=$FN_CLIENT_SECRET"

Last updated on

Support & Help

Get help with Field Nation Integration through support cases, phone support, and comprehensive resources.

Frequently Asked Questions

Common questions about authentication, environments, and integration capabilities.

On this page

Environment Overview
Sandbox Environment
Access URLs
Purpose
Key Characteristics
Webhook IP Addresses (Sandbox)
Production Environment
Access URLs
Purpose
Key Characteristics
Webhook IP Addresses (Production)
Environment Comparison
Getting Access
Sandbox Access
Submit Support Case
Receive Credentials
Begin Development
Production Access
Complete Sandbox Testing
Submit Production Request
Receive Approval
Deploy to Production
Testing Strategy
Development Phase (Sandbox)
Integration Testing (Sandbox)
Create Test Scenarios
Execute Test Cases
Monitor Results
Iterate and Improve
Staging Phase (Sandbox)
Production Deployment
Migration: Sandbox → Production
Code Changes
Configuration Files
Deployment Checklist
Best Practices
Do's ✅
Don'ts ❌
Troubleshooting
Wrong Environment
Mixed Credentials