If you have subscribed to webhook events, you can use the /events API endpoint to retrieve payloads associated with webhook events. Each webhook will return with a status of processed or unprocessed, depending on the status of the associated event. The webhook system generates the contents of each event at the time of the associated transaction or activity.
You can mark a specific event as processed by making a POST request to the /events endpoint.
If you have not subscribed to webhook events, you can retrieve the same information through other API endpoints.
When using the /events endpoint to manage webhook events, the /events endpoint only works with events posted to the first webhook configured on the Webhooks page, under Developer Tools in the FastSpring App.
GET Events Requests
The beginning of each GET request should include one of the following modifiers:
- ?begin=unixtime&end=unixtime: Add unix dates to return events within a specific date range.
- ?days=: Add a number to specify how many days of events you want to return. If you input ?days=5, the request will return events from the past 5 days.
The /events endpoint does not return events that are more than 30 days old. If you specify a number greater than 30 in request, data will not return.
Each request can return up to 25 results. If there are more than 25 results, the return contains a "more" attribute.