Invoices
The “Invoice” Object
The base invoice object is returned on both endpoints documented here.
Body Fields
The invoices’ unique identifier
The identifier of the network associated with the invoice
The status of the invoice. Can be paid
or unpaid
The start of the period covered by the invoice. YYYY-MM-DD HH:MM:SS
format
The end of the period covered by the invoice. YYYY-MM-DD HH:MM:SS
format
The timezone associated with the invoice period
Note : this field is calculated from the line items and will only be present in the response of the “Get all invoices” endpoint
The total amount of the invoice
Note : this field is calculated from the line items and will only be present in the response of the “Get all invoices” endpoint
The amount of the invoice that has been paid
The amount of the invoice that has not yet been paid
Conditions of the invoice, e.g. "Net 30"
Currency that applies to the invoice, e.g. "USD"
Unix timestamp that represents the invoice’s creation date
Unix timestamp that represents the last time the invoice was modified
Get All Invoices
/v1/affiliates/billings/affiliates/invoicestable
This endpoint returns all the invoices that match the filters passed in the payload
Returns an empty array if no invoices match the filters.
Paging
This endpoint supports paging. Refer to our User Guide for usage.
Body Params
This endpoint supports query filters but the filters are optional
Only return invoices that match the status specified. Can be paid
or unpaid
Only return invoices with a period that starts on or after this date. YYYY-MM-DD
format
Only return invoices with a period that ends on or before this date. YYYY-MM-DD
format
Only return invoices with a balance above the amount specified
Only return invoices with a balance below the amount specified
Request Example
cURL
curl --request POST 'https://api.eflow.team//v1/affiliates/billings/affiliates/invoicestable' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'content-type: application/json' \
--data '<INSERT PAYLOAD>'
Example 1 : Fetch all unpaid invoices from 2024
{
"filters":
{
"affiliate_invoice_status": "unpaid",
"min_start_time": "2024-01-01",
"max_end_time": "2024-12-31"
}
}
Example 2 : Fetch all invoices with a balance of more than 100$
{
"filters":
{
"min_balance": 100
}
}
Response
{
"invoices": [
{
"network_affiliate_invoice_id": 1234,
"network_id": 1,
"affiliate_invoice_status": "unpaid",
"start_time": "2024-10-01 00:00:00",
"end_time": "2024-10-31 23:59:59",
"timezone_id": 80,
"balance": 237.43,
"billed": 237.43,
"paid": 0,
"payment_terms": "Net 30",
"currency_id": "USD",
"notes": "",
"time_created": 1667979773,
"time_saved": 1689685995
}
],
"paging": {
"page": 1,
"page_size": 50,
"total_count": 1
}
}
Get Invoice By ID
/v1/affiliates/billings/affiliates/invoices/:invoiceId
Note that the line items and payments of the invoices will be located in the “relationship” object of the response.
Path Parameters
Parameter | Description |
---|---|
invoiceId | The ID of the invoice you want to fetch |
In the invoice details :
- The
type
of each detail (line item) can bereferral
,offer_detail
,vat
oradjustment
- The
payment_type
of each payment can bepay
for Everflow Pay,paypal
,direct_deposit
,wire
,check
,tipalti
,veem
,masspay
,paxum
,payoneer
,bitcoin
,webmoney
,capitalist
,gift_card
,skrill
,transferwise
ornone
. Not all payment methods are supported by all networks so possible values are likely a subset of the previous enumeration.
Request Example
cURL
curl --request GET 'https://api.eflow.team/v1/affiliates/billings/affiliates/invoices/<invoice-id>' \
--header 'X-Eflow-API-Key: <INSERT API KEY>'
Response
{
"network_affiliate_invoice_id": 10,
"network_id": 1,
"network_affiliate_id": 1,
"status": "unpaid",
"start_time": "2024-10-01 00:00:00",
"end_time": "2024-10-31 23:59:59",
"notes": "Invoice for October",
"balance": 120.00,
"timezone_id": 80,
"currency_id": "USD",
"time_created": 1731196800,
"time_saved": 1731196800,
"relationship": {
"details": [
{
"network_affiliate_invoice_detail_id": 480,
"network_affiliate_invoice_id": 10,
"network_offer_id": 0,
"network_offer_name": "",
"amount": 20.00,
"invoice_currency_amount": 20.00,
"currency_id": "USD",
"notes": "",
"quantity": 0,
"relationship": {
"referred_affiliate_id": 100,
"referred_affiliate_name": "Referred John Doe"
},
"referral_history_id": 31,
"type": "referral"
},
{
"network_affiliate_invoice_detail_id": 481,
"network_affiliate_invoice_id": 10,
"network_offer_id": 1265,
"network_offer_name": "Gaming Offer Example",
"amount": 110.00,
"invoice_currency_amount": 110.00,
"currency_id": "USD",
"notes": "",
"quantity": 0,
"referral_history_id": 0,
"type": "offer_detail"
}
],
"payments": [
{
"network_affiliate_payment_id": 158,
"network_id": 1,
"network_affiliate_invoice_id": 10,
"status": "rejected",
"notes": "",
"amount": 120.00,
"currency": "USD",
"unix_timestamp": 1731628800,
"payment_type": "pay"
},
{
"network_affiliate_payment_id": 59,
"network_id": 1,
"network_affiliate_invoice_id": 10,
"status": "pending",
"notes": "",
"amount": 120.00,
"currency": "USD",
"unix_timestamp": 1731715200,
"payment_type": "pay"
}
]
}
}