Get Notification History
Get a list of notifications that the App Store server attempted to send to your server.
URL
POST https://api.storekit.apple.com/inApps/v1/notifications/historySandbox URL
POST https://api.storekit-sandbox.apple.com/inApps/v1/notifications/historyQuery Parameters
| Name | Type | Description |
|---|---|---|
paginationToken Optional | paginationToken | An optional token you use to get the next set of up to 20 notification history records. All responses that have more records available include a Note: Omit this parameter the first time you call this endpoint. |
Response Codes
| Status | Reason | Type | Description |
|---|---|---|---|
| 200 | OK Content-Type: application/json | NotificationHistoryResponse | Request succeeded. |
| 400 | Bad Request Content-Type: application/json | (InvalidTransactionIdError | PaginationTokenExpiredError | InvalidPaginationTokenError | InvalidStartDateError | InvalidEndDateError | StartDateAfterEndDateError | StartDateTooFarInPastError | InvalidNotificationTypeError | MultipleFiltersSuppliedError) | Invalid request. |
| 401 | Unauthorized | The JSON Web Token (JWT) in the authorization header is invalid. For more information, see Generating JSON Web Tokens for API requests. | |
| 404 | Not Found Content-Type: application/json | (TransactionIdNotFoundError | AccountNotFoundError) | |
| 429 | Content-Type: application/json | RateLimitExceededError | The request exceeded the rate limit. |
| 500 | Internal Server Error Content-Type: application/json | (GeneralInternalError | GeneralInternalRetryableError) | Server error. Try again later. |
Mentioned in
Discussion
Call this endpoint to get a paginated list of the version 2 App Store Server Notifications that the App Store attempted to send to your server’s App Store Server Notifications V2 endpoint in a specified timespan. Notification history is available for the past 180 days in the production environment, and the past 30 days in the sandbox environment.
You can further limit the request by specifying a notificationType or notificationSubtype in the NotificationHistoryRequest object. Alternatively, to get the notification history for a single user, provide a transactionId. The response, NotificationHistoryResponse, contains the full contents of the original notifications.
Each time you call this endpoint, it returns a maximum of 20 notification history records. If the hasMore field in the NotificationHistoryResponse is true, use the paginationToken from the response in your subsequent request to get the next set of records. Use the same NotificationHistoryRequest body on subsequent requests.
This endpoint is available in the production and sandbox environments. For more information about configuring App Store Server Notifications, see Enabling App Store Server Notifications and Enter a URL for App Store server notifications.
HTTP Body
The request body that includes the start and end dates, and optional query constraints.