Skip to main content
PATCH
/
applications
/
{application_id}
cURL
curl -X PATCH \
  "https://api.incentives.leap.energy/alpha/applications/123" \
  -H "x-api-key: leap_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "approval_date": "2025-01-25",
    "customer": {
      "email": "newemail@example.com"
    }
  }'
import requests

url = "https://api.incentives.leap.energy/alpha/applications/123"

payload = {
"approval_date": "2025-01-25",
"customer": {
"email": "newemail@example.com"
}
}

headers = {
"x-api-key": "leap_live_...",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)
print(response.json())
const response = await fetch(
'https://api.incentives.leap.energy/alpha/applications/123',
{
method: 'PATCH',
headers: {
'x-api-key': 'leap_live_...',
'Content-Type': 'application/json'
},
body: JSON.stringify({
approval_date: '2025-01-25',
customer: {
email: 'newemail@example.com'
}
})
}
);

const data = await response.json();
console.log(data);
const axios = require('axios');

const url = 'https://api.incentives.leap.energy/alpha/applications/123';

const payload = {
approval_date: '2025-01-25',
customer: {
email: 'newemail@example.com'
}
};

const response = await axios.patch(url, payload, {
headers: {
'x-api-key': 'leap_live_...',
'Content-Type': 'application/json'
}
});

console.log(response.data);
<?php

$url = 'https://api.incentives.leap.energy/alpha/applications/123';

$payload = [
'approval_date' => '2025-01-25',
'customer' => [
'email' => 'newemail@example.com'
]
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'x-api-key: leap_live_...',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

print_r(json_decode($response, true));
import java.net.http.*;
import java.net.URI;

HttpClient client = HttpClient.newHttpClient();

String json = """{
"approval_date": "2025-01-25",
"customer": {
"email": "newemail@example.com"
}
}""";

HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.incentives.leap.energy/alpha/applications/123"))
.header("x-api-key", "leap_live_...")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(json))
.build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
require 'net/http'
require 'json'

uri = URI('https://api.incentives.leap.energy/alpha/applications/123')

payload = {
approval_date: '2025-01-25',
customer: {
email: 'newemail@example.com'
}
}

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(uri)
request['x-api-key'] = 'leap_live_...'
request['Content-Type'] = 'application/json'
request.body = payload.to_json

response = http.request(request)
puts JSON.parse(response.body)
package main

import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)

func main() {
url := "https://api.incentives.leap.energy/alpha/applications/123"

payload := map[string]interface{}{
"approval_date": "2025-01-25",
"customer": map[string]interface{}{
"email": "newemail@example.com",
},
}

jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("PATCH", url, bytes.NewBuffer(jsonData))
req.Header.Set("x-api-key", "leap_live_...")
req.Header.Set("Content-Type", "application/json")

client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()

var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result)
}
using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;

var client = new HttpClient();
var url = "https://api.incentives.leap.energy/alpha/applications/123";

var payload = new {
approval_date = "2025-01-25",
customer = new {
email = "newemail@example.com"
}
};

var content = new StringContent(
JsonSerializer.Serialize(payload),
Encoding.UTF8,
"application/json"
);

var request = new HttpRequestMessage(new HttpMethod("PATCH"), url) {
Content = content
};
request.Headers.Add("x-api-key", "leap_live_...");

var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
{
  "ok": true,
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "application_id": 123,
  "customer_id": 456,
  "mutations": {
    "application": {
      "updated": true,
      "fields": [
        "status",
        "approval_date"
      ]
    },
    "customer": {
      "updated": true,
      "fields": [
        "email"
      ]
    }
  },
  "data": {
    "id": 123,
    "program_id": 45,
    "customer_id": 456,
    "organization_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "approved",
    "approval_date": "2025-01-25",
    "submission_date": "2025-01-15",
    "created_at": "2025-01-10T10:00:00Z",
    "updated_at": "2025-01-25T16:45:00Z",
    "customer": {
      "id": 456,
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "newemail@example.com",
      "customer_devices": [
        {
          "id": 10,
          "customer_id": 456,
          "device_id": 5,
          "quantity": 1
        }
      ]
    }
  }
}
{
"code": "not_found",
"message": "Application 123 not found",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"details": "Additional context about the error"
}
{
"code": "not_found",
"message": "Application 123 not found",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"details": "Additional context about the error"
}
{
"code": "not_found",
"message": "Application 123 not found",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"details": "Additional context about the error"
}
{
"code": "not_found",
"message": "Application 123 not found",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"details": "Additional context about the error"
}

Overview

Update application fields, customer information, and customer devices. Use dryRun=true as a query parameter to validate the request without applying changes.
Customer Devices: Each device in customer_devices must include id (required, not optional). Missing id will return a 400 Bad Request error.
For more details on dry run mode and best practices, see the API Guide.

Authorizations

x-api-key
string
header
required

API key for authentication. Include your Leap API key in the x-api-key header: x-api-key: leap_live_...

Path Parameters

application_id
integer
required

Application ID to update. The application must belong to your organization.

Query Parameters

dryRun
boolean
default:false

If true, validates the request without applying changes

Example:

false

Body

application/json

Application update request. See schema for details.

Request body for updating an application by application ID (organization authentication). Matches GET /applications/{id} response structure without protected fields. All fields are optional - only include fields you want to modify.

Protected fields (cannot be updated): id, customer_id, organization_id, program_id, status, created_at, updated_at

rebate_type
string | null

Type of rebate being requested

payee_type
enum<string> | null

Who will receive the rebate payment

Available options:
customer,
contractor,
instant
submission_date
string<date> | null

Date the application was submitted

Example:

"2025-01-20"

approval_date
string<date> | null

Date the application was approved

Example:

"2025-01-25"

total_requested_amount
number<decimal> | null

Total rebate amount being requested

equipment_complete
boolean | null

Whether equipment documentation is complete

permit_complete
boolean | null

Whether permit documentation is complete

utility_complete
boolean | null

Whether utility documentation is complete

customer_device_id
integer[] | null

Array of customer device IDs associated with this application

customer
object

Customer fields to update (optional)

customer_devices
object[]

Array of customer devices to update. Each device must include 'id' to identify the device.

Response

Successfully updated application(s)

ok
boolean
Example:

true

requestId
string
Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

application_id
integer
Example:

123

customer_id
integer
Example:

456

mutations
object

Details about what was updated

data
object

Complete snapshot matching GET /applications/{id} response structure