Invoices

Get all or individual invoices of all status

The “Invoice” Object

The base invoice object is returned on both endpoints documented here.

network_affiliate_invoice_id int

The invoices’ unique identifier

network_id int

The identifier of the network associated with the invoice

affiliate_invoice_status string

The status of the invoice. Can be paid or unpaid

start_time date_time

The start of the period covered by the invoice. YYYY-MM-DD HH:MM:SS format

end_time date_time

The end of the period covered by the invoice. YYYY-MM-DD HH:MM:SS format

timezone_id int

The timezone associated with the invoice period

billed decimal

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

paid decimal

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

balance decimal

The amount of the invoice that has not yet been paid

payment_terms string

Conditions of the invoice, e.g. "Net 30"

currency_id string

Currency that applies to the invoice, e.g. "USD"

time_created int

Unix timestamp that represents the invoice’s creation date

time_saved int

Unix timestamp that represents the last time the invoice was modified


Get All Invoices

POST /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.

This endpoint supports query filters but the filters are optional

filters object
affiliate_invoice_status string

Only return invoices that match the status specified. Can be paid or unpaid

min_start_time string

Only return invoices with a period that starts on or after this date. YYYY-MM-DD format

max_end_time string

Only return invoices with a period that ends on or before this date. YYYY-MM-DD format

min_balance decimal

Only return invoices with a balance above the amount specified

max_balance decimal

Only return invoices with a balance below the amount specified

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

GET /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 be referral, offer_detail, vat or adjustment
  • The payment_type of each payment can be pay for Everflow Pay, paypal, direct_deposit, wire, check, tipalti, veem, masspay, paxum, payoneer, bitcoin, webmoney, capitalist, gift_card, skrill, transferwise or none. Not all payment methods are supported by all networks so possible values are likely a subset of the previous enumeration.

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"
      }
    ]
  }
}