Invoices payment data - celdotro/marketplace GitHub Wiki

About

Returns data about the payments done in an affiliate's account for each invoice

Class

celmarket\Admin\AdminPayments

Method

getInvoicesData

API

  • method: admininfo
  • action: getInvoicesData

Parameters

(fields written in bold characters are mandatory)

  • paymentStatus = payment status
    • 1 = all invoices (paid and unpaid)
    • 2 = unpaid invoices
    • 3 = paid invoices
  • numInvoice = invoice's number or at least the first part
  • startDate_inv = invoices start date
  • endDate_inv = invoices end date
  • numOrder = order's number or at least the first part
  • startDate_order = orders start date
  • endDate_order = orders end date
  • page = page number (default 1)

Response

An object with the following attributes

  • numPages = total number of pages
  • currPage = number of the current page
  • invoices = invoices array (exists only if numPages > 0) -> array
    • (array element) = data about an invoice whose number is specified as the key -> array
      • nr_factura = invoice's number
      • valoare_factura = invoice's value
      • numar_comanda = order's number
      • data_facturii = invoice's date
      • data_comenzii = order's date
      • ramas = amount remained unpaid
      • suma = paid amount
      • affiliate = affiliate's name

Example - PHP

https://github.com/celdotro/marketplace_examples/blob/master/Admin/1.getInvoicesData.php

Example - JSON

{
  "request": {
    "paymentStatus": 1,
    "numInvoice": 7,
    "startDate_inv": "2018-01-01",
    "endDate_inv": "2018-12-31",
    "numOrder": 1,
    "startDate_order": "2018-01-01",
    "endDate_order": "2018-12-31",
    "page": 1
  },

  "response": {
    "numPages": 1,
    "currPage": 0,
    "invoices": [
      {
        "nr_factura": 1,
        "valoare_factura": 1,
        "data_facturii": "2018-06-06",
        "data_comenzii": "2018-06-06",
        "ramas": 1,
        "suma": 1,
        "affiliate": 1
      }
    ]
  }
}
⚠️ **GitHub.com Fallback** ⚠️