## Why Get Day Part?

When you would like to return day parting information associated with a flight, the Get Day Part API endpoint enables you to retrieve this information in a `GET` call. When the API call is made, the day parting entity associated with the flight you specified will be returned.

## API Syntax

When using the Get Day Part API endpoint, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:

`GET https://api.kevel.co/v1/flight/{FlightID}/dayparting/{TimepartID}`

Where:

- `GET` - the type of API request being made.
- `https://api.kevel.co` - the URL for the request.
- `v1` - the API version.
- `flight` - the API endpoint being called.
- `FlightID` - the ID associated with the flight.
- `dayparting` - the specific day part object being used for the flight.
- `TimepartID` - the ID associated ID for the specific time part used for the day part.

### FlightID

int32

required

The ID of the flight

### TimepartID

int32

required

The ID of the day parting entity

# ```200      200

object

Id

integer

Defaults to 0

StartTime

string

EndTime

string

FlightId

integer

Defaults to 0

WeekDays

array of strings

# ```400      400

* * *

### Example Request

```shell
curl -g -H "X-Adzerk-ApiKey:$ADZERK_API_KEY" "https://api.kevel.co/v1/flight/1234567/dayparting/12345"
```

### Example Response

```json
{
  "Id": 67890,
  "StartTime": "09:30:00",
  "EndTime": "17:00:00",
  "FlightId": 12345,
  "WeekDays": [
    "MO",
    "TU"
  ]
}
```

* * *

Updated 10 months ago
