Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Excerpt

This method is used to get the latest payments that were submitted against a specific accounts receivable

Resource URL

http://host_name/crmapi/rest/$version/payments/get_latest

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

accounts_receivable_identifier

(mandatory)

Accounts receivable identifier  

The identifier of the accounts receivable in which the payments that should be returned as a result should be allocated. The allowed accounts receivable identifier fields are the following:

Include Page
V4:accounts_receivable_identifier
V4:accounts_receivable_identifier

Tip

For releases prior CRM.COM R14.0.0, this parameter is mandatory

wallet_identifier

(semi-optional)

Wallet Identifier

The identifier of the wallet in which the payment should be allocated to. The allowed wallet identifier fields are the following:

Include Page
V4:wallet_identifierV4:wallet_identifier
Tip

Available from CRM.COM R14.0.0

If the payment using Wallet funds functionality is not enabled through the Wallet Definition, then this parameter is not applicable

type_identifier

(optional)

Financial transaction type identifier

The financial transaction type of the payment that should be returned as a result. The allowed financial transaction type identifier field are the following:

Include Page
V4:financial_transaction_type_identifier
V4:financial_transaction_type_identifier

category_identifier

(optional)

Financial transaction category identifier

The financial transaction category of the payment that should be returned as a result. The allowed financial transaction category identifier fields are the following:

Include Page
V4:financial_transaction_category_identifier
V4:financial_transaction_category_identifier

payment_method_identifier

(optional)

Payment method identifier

The payment method of the payment that should be returned as a result. The allowed payment method identifier fields are the following:

Include Page
V4:payment_method_identifier
V4:payment_method_identifier

number

(mandatory)

 Number

The number of payments to be retrieved, starting from the latest one

fields_set

(optional)

List of Strings, comma separated 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

...

Expand
titleExample 1

HTTP Method: GET 


Request:

http://host_name/crmapi/rest/$version/payments/get_latest?token=B8D7A12E9F91AFADE914B7330AFD08CB&accounts_receivable_identifier=number=192&type_identifier=name=Invoices Balance Payment&number=2&fields_set=id,number,reference_number

Response:

Code Block
languagejavascript
themeConfluencelanguagejavascript
linenumberstrue
{
    "status":
    {
        "message": null,
        "description": null,
        "code": "OK"
    },
    "data":
    [
        {
            "number": "98",
            "id": "F29426EFD767C7F35AC5BB179B8F7669",
            "reference_number": "113"
        },
        {
            "number": "96",
            "id": "830C6B800A1EAB42EA8D670ED6871E41",
            "reference_number": "111"
        }
    ]
}


...

Expand
titleExample 2

HTTP Method: GET 


Request:

{{server}}/crmapi/rest/v2/payments/get_latest?token={{token}}&accounts_receivable_identifier=number=ACR0000000120&number=2&fields_set=id,number,currency_rate_period

Response:

Code Block
languagejavascript
themeConfluencelanguagejavascript
linenumberstrue
{
  "data": [
    {
      "number": "205",
      "currency_rate_period": null,
      "id": "3B4264EDB4F64B3DB87B945F1A76A2AA"
    },
    {
      "number": "186",
      "currency_rate_period": {
        "from_date": "C7D7ED57F21B47028144967E015DCBE5",
        "to_date": 2.3,
        "rate": 2.3,
        "inverse_rate": 0.23000000417232513,
        "currency": {
          "suffix_symbol": null,
          "prefix_symbol": "£",
          "decimal_part_name": null,
          "code": "GBP",
          "integer_part_name": null,
          "id": "9"
        },
        "id": "C7D7ED57F21B47028144967E015DCBE5"
      },
      "id": "9E14DCB9276145CBB933D76606179DF1"
    }
  ],
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}


...