Applications API

Create, retrieve, and manage applications through the API.

Create Application

POST
/api/v1/applications

Create a new application with contact information and optional questions. Field names use apiName from your tenant's questionsConfig for explicit mapping.

Request Body

{
  "email": "applicant@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "phone": "+15551234567",
  "requestAmount": 50000,
  "businessName": "Acme Corp",
  "timeInBusiness": {
    "start": 12,
    "end": 24
  },
  "monthlyGrossSales": {
    "start": 50000,
    "end": 75000
  },
  "personalCreditScore": {
    "start": 700,
    "end": 749
  },
  "affiliateCode": "default",
  "metadata": {
    "source": "partner_system",
    "campaign": "summer_2024"
  }
}

Response

{
  "applicationId": "550e8400-e29b-41d4-a716-446655440000",
  "code": 12345,
  "status": "DRAFT"
}

Examples

cURL
curl -X POST https://api.growstacked.com/api/v1/applications \
  -H "X-API-Key: sk_tenant_yourcode_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "email": "applicant@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "phone": "+15551234567",
    "requestAmount": 50000,
    "businessName": "Acme Corp",
    "timeInBusiness": {"start": 12, "end": 24}
  }'

Get Application

GET
/api/v1/applications/{applicationId}

Retrieve application details including status, code, and timestamps.

Response

{
  "applicationId": "550e8400-e29b-41d4-a716-446655440000",
  "code": 12345,
  "status": "DRAFT",
  "submittedAt": null,
  "createdAt": "2024-01-15T10:30:00Z"
}

Examples

cURL
curl https://api.growstacked.com/api/v1/applications/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-API-Key: sk_tenant_yourcode_abc123..."

Update Application

PUT
/api/v1/applications/{applicationId}

Update application questions using apiName fields from your tenant's questionsConfig. External API can only update questions, not status or other application fields.

Request Body

{
  "email": "newemail@example.com",
  "firstName": "Jane",
  "lastName": "Smith",
  "phone": "+15559876543",
  "requestAmount": 75000,
  "businessName": "Updated Corp Name"
}

Response

{
  "success": true,
  "updatedQuestions": 3,
  "questionIds": [
    "SIGN_UP",
    "OWNER_INFORMATION_FIRST_NAME",
    "OWNER_INFORMATION_LAST_NAME"
  ],
  "requestId": "c1990ac0-d5c6-4803-acdb-9b408f194b2f"
}

Examples

cURL
curl -X PUT https://api.growstacked.com/api/v1/applications/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-API-Key: sk_tenant_yourcode_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "email": "newemail@example.com",
    "firstName": "Jane",
    "lastName": "Smith",
    "requestAmount": 75000,
    "businessName": "Updated Corp Name"
  }'

Field Mapping

Field names in API requests map to internal question IDs through explicit apiName values defined in your tenant's questionsConfig. This ensures deterministic, tenant-specific field naming.

Mapping Priority

  1. apiName from questionsConfig (e.g., requestAmount REQUEST_AMOUNT)
  2. mappingConfig.mapTo (tenant-specific overrides)
  3. Direct questionId (UPPER_SNAKE_CASE format, e.g., REQUEST_AMOUNT)

Example Field Mappings

requestAmount REQUEST_AMOUNT
businessName BUSINESS_INFORMATION_NAME
timeInBusiness TIME_IN_BUSINESS
monthlyGrossSales MONTHLY_GROSS_SALES

Note: Each tenant defines their own apiName values in their questionsConfig. Contact your account manager to obtain your tenant's available field names.