Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Tip

From CRM.COM R13.1.0 and onwards the process of using a voucher is enhanced as follows:

  • If the voucher of a type with classification of "Payment Voucher" or "Electronic Voucher", then a payment will be created in the system

From CRM.COM R14.0.0 and onwards the process of using a voucher is enhanced as follows:

  • If the voucher of a type with classification of "Refund Voucher", then no payment will be created


Excerpt

This method uses a voucher. Single voucher is used by each call

Resource URL

http://host_name/crmapi/rest/$version/vouchers/use 

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

secret_number

(mandatory on conditions)

String

The secret number of

the voucher that will be used

the voucher that will be used

Tip

From CRM.COM R18.0.0, secret_number is not applicable for vouchers of type category "gift card"


accounts_receivable_identifier
(mandatory on conditions)

Accounts receivable identifier

The identifier of the account receivable that the payment should be allocated in. The allowed accounts receivable identifier fields are the following:

Include Page
V4:accounts_receivable_identifier
V4:accounts_receivable_identifier

Tip

From CRM.COM R18.0.0, accounts_receivable_identifier is not applicable for vouchers of type category "gift card"


payment_category_identifier
(optional)
Payment category identifier

The identifier of the payment category related with the payment that will be created. The allowed payment category identifier fields are the following:

Include Page
V4:financial_transaction_category_identifier
V4:financial_transaction_category_identifier

Tip

From CRM.COM R14.0.0, if the payment_category_identifier is provided and the voucher is of type with classification "Refund Voucher", then the payment_category_identifier will be ignored


notes
(optional)

Notes Object

The notes for the payment to be created

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

Tip

Available from CRM.COM R10.0.0


Restrictions

  • It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.

...

Expand
titleExample 1

HTTP Method: POST 


Request:

Body

Code Block
language
languagejs
themeConfluence
jslinenumberstrue
{
    "token":"06A278ADF70A9571B39C63821E39F45A",
    "secret_number":"58978583",
    "accounts_receivable_identifier":{"id":"00F04DC1D3F923A15630751530EC1670"}
}


Response:

Code Block
languagejs
themeConfluence
languagejs
linenumberstrue
{
    "status":
    {
        "message": null,
        "description": null,
        "code": "OK"
    },
    "data":
    {
        "extra_added_value": 10,
        "payment":
        {
            "payment_amount": 12,
            "issued_on": "2014-08-26T14:29:44",
            "life_cycle_state": "POSTED",
            "number": "121",
            "id": "E62357633EBCA8C6205D53C102AE08AB",
            "reference_number": "143",
            "posted_on": "2014-08-26T14:29:44"
        },
        "effective_date": "2014-08-01T00:00:00",
        "udf_float_1": null,
        "products_set":
        [
            {
                "id": "A96F5EB7F7685BB89B92FA439C0485D6",
                "product":
                {
                    "product_type": null,
                    "id": "DE37CF1696E3CD4E8EF89F522019D385",
                    "description": "Documentaries",
                    "code": "Documentaries",
                    "alternative_code": null
                }
            },
            {
                "id": "82C3FA8E63B0661FCA220A2AF8D622A2",
                "product":
                {
                    "product_type": null,
                    "id": "CA05E389D3874A44278047A6109AC975",
                    "description": "International",
                    "code": "International",
                    "alternative_code": null
                }
            },
            {
                "id": "D4EFF2E62087DF447A82FE5CBCF0A464",
                "product":
                {
                    "product_type": null,
                    "id": "E7558FAB3E126741558578B6471C07C9",
                    "description": "Sports ",
                    "code": "Sports ",
                    "alternative_code": null
                }
            }
        ],
        "udf_float_2": null,
        "udf_float_3": null,
        "number": "899",
        "udf_float_4": null,
        "udf_string_1": null,
        "udf_string_2": null,
        "udf_string_3": null,
        "udf_string_4": null,
        "udf_string_5": null,
        "allowed_organisational_units_set":
        [
            {
                "community_name": null,
                "group_name": "Developers Group",
                "name": null,
                "id": "5AD3ED1C988E060FF4CC892C024A8312",
                "description": null,
                "alternative_code": null
            }
        ],
        "udf_string_6": null,
        "udf_string_7": null,
        "lot":
        {
            "number": "37",
            "id": "83219EA73671E800298CAC49DB1A3F58",
            "description": null,
            "alternative_code": "TEST2"
        },
        "udf_string_8": null,
        "id": "136FFCCC86B0FEA1F518ABFCD675666E",
        "udf_date_1": null,
        "udf_date_2": null,
        "udf_date_3": null,
        "udf_date_4": null,
        "log_information":
        {
            "updated_date": "2014-08-26T14:29:46",
            "created_by_unit":
            {
                "community_name": "Main Community",
                "group_name": "Main Group",
                "name": "Admin Unit",
                "id": "48305F8849E3C18B227C5BE3A27BA6DF",
                "description": "r1",
                "alternative_code": "MG"
            },
            "created_date": "2014-08-21T12:41:33",
            "updated_by_unit":
            {
                "community_name": "Main Community",
                "group_name": "Main Group",
                "name": "Admin Unit",
                "id": "48305F8849E3C18B227C5BE3A27BA6DF",
                "description": "r1",
                "alternative_code": "MG"
            },
            "created_by_user":
            {
                "person_name": "MPAdministrator",
                "username": "MPAdministrator",
                "id": "1",
                "email": "mp@ministrator.com"
            },
            "updated_by_user":
            {
                "person_name": "Marios Lannister",
                "username": "MPAdministrator",
                "id": "1",
                "email": null
            }
        },
        "value": 12,
        "life_cycle_state": "USED",
        "type":
        {
            "name": "Fixed Voucher Type",
            "id": "3F1F84F4195B7804483B0C6823A90AD3",
            "alternative_code": "FVT"
        },
        "description": null,
        "expiration_date": "2015-08-01T00:00:00",
        "alternative_code": null
    }
} 


...

Expand
titleExample 1

HTTP Method: POST

 


Request:

Body

Code Block
languagejs
themeConfluence
languagejs
linenumberstrue
{
    "token":"06A278ADF70A9571B39C63821E39F45A",
    "secret_number":"4100343",
    "fields_set":"type,lot,payment,log_information,products_set,allowed_organisational_units_set",
    "accounts_receivable_identifier":{"number":"ACR000929"}
}


Response:

Code Block
languagejs
themeConfluencelanguagejs
linenumberstrue
{
  "status": {
    "message": "",
    "description": "",
    "code": "OK"
  },
  "data": {
    "log_information": {
      "updated_date": "2016-06-09T14:29:11",
      "created_date": "2016-04-22T12:18:10",
      "created_by_unit": {
        "community_name": "Internal Community",
        "id": "48305F8849E3C18B227C5BE3A27BA6DF",
        "name": "Admin Unit",
        "group_name": "Main Group",
        "description": "r1 Test Description for resource  request tab.Test Description for resource  request tab.",
        "alternative_code": "MG"
      },
      "updated_by_unit": {
        "community_name": "Internal Community",
        "id": "48305F8849E3C18B227C5BE3A27BA6DF",
        "name": "Admin Unit",
        "group_name": "Main Group",
        "description": "r1 Test Description for resource  request tab.Test Description for resource  request tab.",
        "alternative_code": "MG"
      },
      "created_by_user": {
        "person_name": "MPAdministrator",
        "username": "MPAdministrator",
        "id": "1",
        "email": "sakkascy1986@hotmail.com"
      },
      "updated_by_user": {
        "person_name": "Marios Lannister",
        "username": "MPAdministrator",
        "id": "1",
        "email": "sakkascy1986@hotmail.com"
      }
    },
    "lot": {
      "number": "87",
      "id": "D2276206B2B14323B1B53A446A3480DB",
      "description": null,
      "alternative_code": "Test EM 2"
    },
    "payment": {
      "payment_amount": 50,
      "issued_on": "2016-06-09T14:29:10",
      "life_cycle_state": "POSTED",
      "number": "370",
      "id": "10B4278746A94C37B36C791E5A6BCF8B",
      "reference_number": "390",
      "posted_on": "2016-06-09T14:29:10"
    },
    "products_set": [
      {
        "product_type": null,
        "id": "9B9724AF0D9D4B26BEE0F3363B6B2377",
        "product": {
          "product_type": {
            "service_type": "TERMED",
            "physical_good_type": null,
            "used_for_provisioning": true,
            "classification": "SERVICES",
            "composition_method": "FLAT",
            "id": "BC954969D3172372D498D3BB2BA590A0",
            "name": "Subscription Packages",
            "description": "Subscription main packages",
            "alternative_code": "SP"
          },
          "id": "17540C21EAB9C50D0945F12313B79875",
          "description": "Silver Basic Package",
          "code": "Silver",
          "alternative_code": "SBP"
        }
      },
      {
        "product_type": null,
        "id": "243FD3BDCF2941B3BCCECE16D2182734",
        "product": {
          "product_type": {
            "service_type": "TERMED",
            "physical_good_type": null,
            "used_for_provisioning": true,
            "classification": "SERVICES",
            "composition_method": "FLAT",
            "id": "BC954969D3172372D498D3BB2BA590A0",
            "name": "Subscription Packages",
            "description": "Subscription main packages",
            "alternative_code": "SP"
          },
          "id": "6DF884D00A643D9E5E3E95A5ABCCFDF8",
          "description": "Gold Premium Package",
          "code": "Gold",
          "alternative_code": "GPP"
        }
      },
      {
        "product_type": null,
        "id": "E0C64303517E426FB2097FB9CA8CDA1E",
        "product": {
          "product_type": {
            "service_type": "TERMED",
            "physical_good_type": null,
            "used_for_provisioning": true,
            "classification": "SERVICES",
            "composition_method": "FLAT",
            "id": "BC954969D3172372D498D3BB2BA590A0",
            "name": "Subscription Packages",
            "description": "Subscription main packages",
            "alternative_code": "SP"
          },
          "id": "2C0E72A735F71582FFC765F3421CE6A5",
          "description": "Platinum Premium Package",
          "code": "Platinum",
          "alternative_code": "PS"
        }
      }
    ],
    "type": {
      "value_options": "FIXED",
      "id": "2335CA000FDFBA82201E679B1251BD79",
      "name": "Premium Services",
      "description": null,
      "alternative_code": "PS"
    },
    "allowed_organisational_units_set": []
  }
}


...