| Time | Status | User Agent |  |
| :-- | :-- | :-- | :-- |
| Make a request to see history. |

#### URL Expired

The URL for this request expired after 30 days.

### Search meter dispatch request input

#### Search parameters for the search dispatches endpoints

- **meter_event_ids**  
  array of uuids  
  length ≥ 1  
  Meter event ids to get dispatches for

- **meter_ids**  
  array of uuids  
  length ≥ 1  
  Meter ids to get dispatches for

- **start_date**  
  date-time  
  required  
  Start datetime range to get dispatches for (inclusive)

- **end_date**  
  date-time  
  required  
  End datetime range to get dispatches for (exclusive). End date must be max 31 days after the start date

- **exclude_real_time_events**  
  boolean  
  Defaults to true  
  Exclude dispatches for CAISO 5 minute real time events in the response. If empty, 5 min real time events are excluded

- **exclude_voluntary_events**  
  boolean  
  Defaults to false  
  Exclude dispatches for voluntary events in the response. If empty, all dispatches are returned

- **page_token**  
  uuid  
  Token of the page to request. Max results per page is 500. Null to request a new batch of results

# `200` A list of meter dispatches that match the search input

### Response structure

- **next_page_token**  
  uuid  
  Token to be used in a subsequent request to get the next batch of results. Max results per page is 500. Null when the last page of results has been reached

- **results**  
  array of objects  
  required  
  A list of meter-level dispatches.  
  - **meter_id**  
    uuid  
    required  
    Id of the meter that received dispatches from the market

- **partner_reference**  
    string  
    The partner-supplied reference ID to help identify the customer or site that a Leap meter correlates to a partner’s internal systems.

- **timeslots**  
    array of objects  
    required  
    length ≥ 1  
    List with timeslots and quantities that contains dispatches for this meter

### Timeslot structure

- **meter_event_id**  
  uuid  
  required  
  Unique identifier of the dispatch event

- **communication_test**  
  boolean  
  Indicates whether the dispatch is a communication test.

- **start_time**  
  date-time  
  required  
  Start time of dispatch

- **end_time**  
  date-time  
  required  
  End time of dispatch

- **cancelled**  
  boolean  
  required  
  'true' if this event has been cancelled

- **energy_kw**  
  double  
  0.01 to 100000  
  The awarded kW for the dispatch. This represents the expected power in kW to be curtailed/exported for the duration of the event. If the value is 'null' partners should dispatch the maximum they can manage.

- **nomination_kw**  
  double  
  0.01 to 100000  
  The nomination in kW. It represents the commitment amount made to the market for this asset.

- **performance_compensation_cap**  
  string  
  required  
  This field can be used to automate a dispatch response that is aligned with the event’s settlement structure, to capitalize on scenarios where over-performance is lucrative versus scenarios where over-performance is not compensated and best reserved for another event.  
  
  - UpToNomination  
  - UpToSiteLoad  
  - GridExportsAllowed

- **priority**  
  integer  
  required  
  1 to 10  
  The priority of the dispatch compared to other dispatches for the same meter. This value is meant to support partners in prioritizing dispatch events in same-day or overlapping scenarios, at times where the asset may not be able to perform across all events. Number 1 reflects the highest priority.

- **is_voluntary**  
  boolean  
  required  
  Indicates whether the dispatch is voluntary or a commitment. Pay-for-performance events, with no energy commitment to achieve, are categorized as true.

- **dispatch_event_types**  
  array of objects  
  required  
  length ≥ 1  
  Used for programs that have different compensation structures for different types of dispatch events.

- **programs**  
  array of objects  
  required  
  length ≥ 1  
  Programs associated with the dispatch. This is a fixed list of values depending on your use-case and refers to the program(s) that the meters are enrolled in.

# `400` Request could not be parsed or is invalid
# `401` Unauthorized
# `403` No access to this resource
# `404` Resource not found
# `5XX` Unexpected error

### Example Request
```bash
curl --request POST \
     --url https://api.staging.leap.energy/v2/dispatch/meter/search \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '  
{ 
  "meter_event_ids": [],  
  "meter_ids": [],  
  "exclude_real_time_events": true,  
  "exclude_voluntary_events": false  
}
'```

### Example Response
```json
{   
  "next_page_token": "242c3e24-43e6-4ad7-88b3-666cda21582b",  
  "results": [ 
    {  
      "meter_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",  
      "timeslots": [  
        {  
          "meter_event_id": "f4cfced0-16f4-4fb7-b72e-5ff939ae541e",  
          "start_time": "2023-02-21T00:00:00.000Z",  
          "end_time": "2023-02-21T01:00:00.000Z",  
          "energy_kw": 80,  
          "nomination_kw": 100,  
          "cancelled": false,  
          "programs": [  
            "CCA"  
          ],  
          "priority": 1,  
          "is_voluntary": false,  
          "performance_compensation_cap": "up-to-site-load",  
          "dispatch_event_types": [  
            "day-ahead",  
            "capacity-test"  
          ]  
        },  
        {  
          "meter_event_id": "a6d4bbde-36ee-401f-92b8-c58aa17aa71d",  
          "start_time": "2023-02-21T00:00:00.000Z",  
          "end_time": "2023-02-21T04:00:00.000Z",  
          "energy_kw": null,  
          "nomination_kw": 100,  
          "cancelled": false,  
          "programs": [  
            "ELRP"  
          ],  
          "priority": 3,  
          "is_voluntary": true,  
          "performance_compensation_cap": "grid-exports-allowed",  
          "dispatch_event_types": [  
            "standard"  
          ]  
        }  
      ]  
    }  
  ]  
}
```
