Finance

Retrieve a last charge info

View last charge info or cancel last charged invoice.Returns a last charge information of a desired customer

get/admin/finance/cancel-last-charge/{id}

Request

  • Base URL: https://demo.splynx.com/api/2.0
  • URL: https://demo.splynx.com/api/2.0/admin/finance/cancel-last-charge/{id}
  • Auth: HTTP basic

Path parameters

idnumber double required
Example:1

The Id of the desired customer.

Response

lastChargeExistboolean required

Values: true or false. Whether a last charge exists.

Example response

{
  "lastChargeExist": true,
  "info": {
    "date": "2016-01-01",
    "maxPeriodTo": "2016-01-01",
    "countTransactions": 1,
    "totalSum": 10,
    "emptyCharge": true,
    "invoices": [
      {
        "id": 1,
        "customer_id": 1,
        "date_created": "2016-01-01",
        "date_updated": "",
        "date_till": "",
        "date_payment": "",
        "status": "not_paid",
        "number": "201601010003",
        "payment_id": 0,
        "payd_from_deposit": 0,
        "total": 123,
        "due": 100
      }
    ],
    "ipi_invoices": [
      {
        "id": 1,
        "customer_id": 1,
        "date_created": "2016-01-01",
        "date_updated": "",
        "date_till": "",
        "date_payment": "",
        "status": "not_paid",
        "number": "201601010003",
        "payment_id": 0,
        "payd_from_deposit": 0,
        "total": 123,
        "due": 100
      }
    ],
    "requests": [
      {
        "id": 1,
        "customer_id": 1,
        "date_created": "2016-01-01",
        "date_updated": "",
        "date_till": "",
        "date_payment": "",
        "status": "not_paid",
        "number": "201601010003",
        "payment_id": 0,
        "total": 123
      }
    ],
    "transactions": [
      {
        "type": "debit",
        "customer_id": 1,
        "quantity": 1,
        "unit": "",
        "price": 158.25,
        "tax_percent": 19,
        "remind_amount": 0,
        "date": "2016-01-01",
        "category": "1",
        "description": "Description",
        "period_from": "",
        "period_to": "",
        "service_id": null,
        "payment_id": null,
        "credit_note_id": 0,
        "invoice_id": null,
        "invoiced_by_id": null,
        "comment": "",
        "to_invoice": false,
        "service_type": "internet",
        "source": "manual",
        "tax_id": 1,
        "sub_account_id": 0,
        "id": 1,
        "total": 10
      }
    ],
    "toBillRecords": [
      {
        "id": 1,
        "customer_id": 1,
        "date": "2016-01-02",
        "real_date_time": "2016-01-02 09:48:12",
        "transactions_id": "2,3,1",
        "invoice_id": 43,
        "request_id": 54,
        "next_request_before": "2016-02-02",
        "history_id": 1,
        "transactions_sum": 123,
        "max_period_to": "2016-02-02"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.