---
title: NotificationHistoryRequest
framework: appstoreserverapi
role: symbol
role_heading: Object
path: appstoreserverapi/notificationhistoryrequest
---

# NotificationHistoryRequest

The request body for notification history.

## Declaration

```data
object NotificationHistoryRequest
```

## Properties

startDate: Required. The start date of the timespan for the requested App Store Server Notification history records. The startDate needs to precede the endDate. Choose a startDate that’s within the past 180 days. In the sandbox environment, choose a startDate that’s within the past 30 days. endDate: Required. The end date of the timespan for the requested App Store Server Notification history records. Choose an endDate that’s later than the startDate. If you choose an endDate in the future, the endpoint automatically uses the current date as the endDate. notificationType: Optional. A notification type. Provide this field to limit the notification history records to those with this one notification type. For a list of notifications types, see notificationType. Note: You may include either the transactionId or the notificationType property (or neither) in your query, but not both. notificationSubtype: Optional. A notification subtype. Provide this field to limit the notification history records to those with this one notification subtype. For a list of subtypes, see subtype. If you specify a notificationSubtype, you need to also specify its related notificationType. onlyFailures: Optional. A Boolean value you set to true to request only the notifications that haven’t reached your server successfully. The response also includes notifications that the App Store server is currently retrying to send to your server. transactionId: Optional. The transaction identifier, which may be an original transaction identifier, of any transaction belonging to the customer. Provide this field to limit the notification history request to this one customer. Note: You may include either the transactionId or the notificationType property (or neither) in your query, but not both. originalTransactionId: Use transactionId instead.

## Mentioned in

App Store Server API changelog

## Discussion

Discussion Specify the constraints for the App Store Server Notification history entries you’re requesting from Get Notification History. The request requires the startDate and endDate fields; all other fields are optional. Include only the fields in your request that you need to constrain the response. If you provide both the notificationType and subtype, they need to be a valid combination, otherwise, the request returns an InvalidNotificationTypeError error. For more information, see notificationType and subtype. note: Notification history is available for the past 180 days in the production environment, and the past 30 days in the sandbox environment. Choose a startDate that’s within the past 180 days in the production environment, and within the past 30 days in the sandbox environment.

## Topics

### Data types

- [startDate](appstoreserverapi/startdate.md)
- [endDate](appstoreserverapi/enddate.md)
- [notificationType](appstoreserverapi/notificationtype.md)
- [notificationSubtype](appstoreserverapi/notificationsubtype.md)
- [onlyFailures](appstoreserverapi/onlyfailures.md)

## See Also

### App Store Server Notifications history

- [Get Notification History](appstoreserverapi/get-notification-history.md)
- [NotificationHistoryResponse](appstoreserverapi/notificationhistoryresponse.md)
- [notificationHistoryResponseItem](appstoreserverapi/notificationhistoryresponseitem.md)
