# Get notification GET https://api-sandbox.payabli.com/api/Notification/{nId} Retrieves a single notification or autogenerated report's details. Reference: https://docs.payabli.com/developers/api-reference/notification/get-notification ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get notification version: endpoint_notification.GetNotification paths: /Notification/{nId}: get: operationId: get-notification summary: Get notification description: Retrieves a single notification or autogenerated report's details. tags: - - subpackage_notification parameters: - name: nId in: path description: 'Notification ID. ' required: true schema: type: string - name: requestToken in: header required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/type_:NotificationQueryRecord' '400': description: Bad request/ invalid data content: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} components: schemas: type_:NotificationContentEventType: type: string enum: - value: ApprovedPayment - value: AuthorizedPayment - value: DeclinedPayment - value: OriginatedPayment - value: SettledPayment - value: SubscriptionCreated - value: SubscriptionUpdated - value: SubscriptionCanceled - value: SubscriptionCompleted - value: FundedPayment - value: VoidedPayment - value: RefundedPayment - value: HoldTransaction - value: ReleasedTransaction - value: HoldBatch - value: ReleasedBatch - value: TransferDisabledCreditFund - value: TransferDisabledDebitFund - value: TransferNotAvailableBalance - value: TransferReturn - value: TransferSuccess - value: TransferSuspended - value: TransferError - value: SendReceipt - value: RecoveredTransaction - value: CreatedApplication - value: ApprovedApplication - value: FailedBoardingApplication - value: SubmittedApplication - value: UnderWritingApplication - value: ActivatedMerchant - value: ReceivedChargeBack - value: ChargebackUpdated - value: ReceivedRetrieval - value: RetrievalUpdated - value: ReceivedAchReturn - value: HoldingApplication - value: DeclinedApplication - value: BoardingApplication - value: FraudAlert - value: InvoiceSent - value: InvoicePaid - value: InvoiceCreated - value: BillPaid - value: BillApproved - value: BillDisApproved - value: BillCanceled - value: BillProcessing - value: CardCreated - value: CardActivated - value: CardDeactivated - value: CardExpired - value: CardExpiring - value: CardLimitUpdated - value: BatchClosed - value: BatchNotClosed - value: PayOutFunded - value: PayOutProcessed - value: PayOutCanceled - value: PayOutPaid - value: PayOutReturned - value: PayoutSubscriptionCreated - value: PayoutSubscriptionUpdated - value: PayoutSubscriptionCanceled - value: PayoutSubscriptionCompleted - value: PayoutSubscriptionReminder - value: importFileReceived - value: importFileProcessed - value: importFileError - value: exportFileSent - value: exportFileError - value: FailedEmailNotification - value: FailedWebNotification - value: FailedSMSNotification - value: UserPasswordExpiring - value: UserPasswordExpired - value: TransactionNotFound - value: SystemAlert - value: Report type_:NotificationContentFileFormat: type: string enum: - value: json - value: csv - value: xlsx type_:KeyValueDuo: type: object properties: key: type: string description: Key name. value: type: string description: Key value. type_:NotificationContentReportName: type: string enum: - value: Transaction - value: Settlement - value: Boarding - value: Returned type_:Timezone: type: integer type_:NotificationContent: type: object properties: eventType: $ref: '#/components/schemas/type_:NotificationContentEventType' description: The notification's event name. fileFormat: $ref: '#/components/schemas/type_:NotificationContentFileFormat' description: |- Indicate the format of report file to be generated by the engine. Used for `method` = *report-email* and *report-web*. internalData: type: array items: $ref: '#/components/schemas/type_:KeyValueDuo' description: >- Array of pairs key:value to insert in request body to target in **method** = *web* or *report-web*. reportName: $ref: '#/components/schemas/type_:NotificationContentReportName' description: >- The kind report to generate. For [automated reports](/developers/developer-guides/notifications-and-webhooks-overview#automated-reports) only. timeZone: $ref: '#/components/schemas/type_:Timezone' transactionId: type: string default: '0' description: >- Used internally to reference the entity or object generating the event. webHeaderParameters: type: array items: $ref: '#/components/schemas/type_:KeyValueDuo' description: >- Array of pairs key:value to insert in header of request to target in **method** = *web* or *report-web*. type_:CreatedAt: type: string format: date-time type_:Frequencynotification: type: string enum: - value: one-time - value: daily - value: weekly - value: biweekly - value: monthly - value: quarterly - value: semiannually - value: annually - value: untilcancelled type_:LastModified: type: string format: date-time type_:Methodnotification: type: string enum: - value: email - value: sms - value: web - value: report-email - value: report-web type_:NotificationId: type: integer format: int64 type_:Ownerid: type: string type_:Ownertype: type: integer type_:Source: type: string type_:Statusnotification: type: integer type_:Target: type: string type_:NotificationQueryRecord: type: object properties: content: $ref: '#/components/schemas/type_:NotificationContent' description: Notification content. createdAt: $ref: '#/components/schemas/type_:CreatedAt' description: Timestamp of when notification was created. frequency: $ref: '#/components/schemas/type_:Frequencynotification' lastUpdated: $ref: '#/components/schemas/type_:LastModified' description: Timestamp of when notification was last updated. method: $ref: '#/components/schemas/type_:Methodnotification' notificationId: $ref: '#/components/schemas/type_:NotificationId' ownerId: $ref: '#/components/schemas/type_:Ownerid' ownerName: type: string description: Name of entity owner of notification. ownerType: $ref: '#/components/schemas/type_:Ownertype' source: $ref: '#/components/schemas/type_:Source' description: Custom descriptor of source of notification. status: $ref: '#/components/schemas/type_:Statusnotification' target: $ref: '#/components/schemas/type_:Target' ``` ## SDK Code Examples ```python Get from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.notification.get_notification( n_id="1717", ) ``` ```typescript Get import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.notification.getNotification("1717"); ``` ```go Get import ( context "context" option "github.com/payabli/sdk-go/option" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.Notification.GetNotification( context.TODO(), "1717", ) ``` ```csharp Get using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.Notification.GetNotificationAsync("1717"); ``` ```ruby Get require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/Notification/1717") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["requestToken"] = '' response = http.request(request) puts response.read_body ``` ```java Get HttpResponse response = Unirest.get("https://api-sandbox.payabli.com/api/Notification/1717") .header("requestToken", "") .asString(); ``` ```php Get request('GET', 'https://api-sandbox.payabli.com/api/Notification/1717', [ 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift Get import Foundation let headers = ["requestToken": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Notification/1717")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```