Earnings Event(s)
This action retrieves information about Earnings Event(s) associated with your White Swan account.
Earnings events with the Earnings Event value "Paid Compensation" signifies payments made to you and should be treated differently than events with the Earnings Event value "Closed Case" or "Referred Partner Earning". For a deeper understanding, refer to our Example Use Case of Integrating With Accounting/Payroll Tools.
API Method:
Fetch Earning Event(s)
POST
https://app.whiteswan.io/api/1.1/wf/earnings_event
Returns information about earnings events associated with your White Swan account.
Headers
Authorization*
String
Bearer <YOUR API KEY>
Content-Type*
String
application/json
Accept*
String
application/json
user-agent*
String
<YOUR APP>
Request Body
JSON Body*
Object
See specification below
Please note that the sample body payload above contains all possible parameters for your reference. In an actual call, you don't need to use all (or any) parameters.
Code Examples - Making the API Call:
Code examples are available in cURL, Python, Javascript, Java, PHP, Ruby, and Go, but can be constructed for other languages and tools. Some code examples include dependencies that may need to be installed in your codebase to ensure functionality. Remember to replace any values in the code that looks like <VALUE> and to adapt the parameter values passed.
Body Parameters Specification:
User Email
user_email
Text
john@acme.com
This input can optionally be used to only show earnings events associated with a particular user on your account.
Client Email
client_email
Text
jane@gmail.com
This input can optionally be used to only show earnings events associated with a particular client referred from your account.
Look-back Period in Days
lookback
Number
90
This input can optionally be used to only show earnings events created after the current date minus X amount of days.
Returned Parameters Specification:
Earnings Event Name
event_name
Text
Case Closed
The name of the earnings event.
Earnings Event Amount Credited
amount_credited
Number
500
The amount credited for the earnings event.
Earnings Event Associated Client Name
associated_client_name
Text
John Doe
The name of the client associated with the earnings event (only for Closed Case Events).
Earnings Event Associated Client Email
associated_client_email
Text
john@example.com
The email address of the client associated with the earnings event (only for Closed Case Events).
Earnings Event Associated Plan Request ID
associated_request_id
Text
1670721321811x149164079586738180
The ID of the plan request associated with the earnings event.
Earnings Event Associated Referred Partner
referred_partner
Text
Acme Inc
The name of the partner associated with the earnings event (only for Referred Partner Earning Events).
Earnings Event Credit Invoice
credit_invoice
Text
https://s3.amazonaws.com/appforest_uf/f167656056312330177020/Crediting%20Invoice%20.docx
A link to the credit invoice for the earnings event (only for Paid Compensation Events)
Earnings Event Associated Account User
partner_associated_user
Text
Axel Doe
The name of the account user associated with the earnings event.
Last updated