Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Tip

Available from CRM.COM R14.2.0


Tip

Deprecated from CRM.COM R17.0.0. The functionality is covered by POST vouchers/purchase_evoucher


Excerpt

This method uses wallet funds to perform an electronic voucher purchase. Multiple vouchers can be bought by the same wallet owner and only if the wallet has enough money to cover the total purchase amount

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

wallet_identifier
(semi-optional)

Wallet identifier

The identifier of the wallet from which the funds will be used to purchase the voucher. The allowed wallets identifier fields are the following:

Include Page
V4:wallet_identifier
V4:wallet_identifier

accounts_receivable_identifier

(semi-optional)

Accounts Receivable Identifier

The identifier of the accounts receivable whose related wallet funds will be used to purchase the voucher. The allowed accounts receivable identifier fields are the following:

Include Page
V4:accounts_receivable_identifier
V4:accounts_receivable_identifier

rewards_participant_identifier

(semi-optional)

Rewards Participant Identifier

The identifier of the rewards participant who will purchase the voucher using the related wallet's funds. The allowed rewards participant identifier fields are the following:

Include Page
V4:rewards_participants_identifier_post
V4:rewards_participants_identifier_post

voucher_type_identifier

(mandatory)

Voucher Type Identifier

The identifier of the type of the voucher that will be purchased. Only voucher types of "Electronic Payment Vouchers" are allowed to be specified. The allowed voucher type identifier fields are the following:

Include Page
V4:voucher_type_identifier
V4:voucher_type_identifier

product

voucher_value

(

optional

mandatory on conditions)

Product Identifier
Number

The

identifier

value of the

product which will consume the purchased voucher's money. If not specified, then the specified voucher type must include a single supported product. The allowed product identifier fields are the following: Include PageV4:product_identifierV4:product_identifier

voucher that will be purchased. Available and mandatory only if the voucher type has variable value.

Tip

Available from CRM.COM R14.8.0


quantity

(optional)

NumberThe number of vouchers to be purchased.

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

Restrictions

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

Response Data

Name

Type

Description

wallet_balance

Number

The balance of the wallet after the transfer

wallet_alternative_balanceNumber

The balance of the wallet in wallet alternative currency, after the transfer

vouchers_setVouchers SetThe voucher(s) that was/were purchased

wallet_transactions_set

Wallet Transactions Set

The wallet transactions that debited the wallet because of the purchase

Anchor
use wallet funds to purchase reference data
use wallet funds to purchase reference data
Referred Objects Response Data

...

Expand
titleExample 1

HTTP Method: POST 


Request:

Body:

Code Block
languagejs
themeConfluence
languagejs
linenumberstrue
{
"token":"{{token}}",
"accounts_receivable_identifier":{"name":"ACR0000001929 Alternative Currency 2"},
"voucher_type_identifier":{"name":"Personal Fixed EVoucher Type"}
}

Response:

Code Block
languagejs
themeConfluence
languagejs
linenumberstrue
 {
    "data": {
        "wallet_transactions_set": {
            "amount": 20,
            "wallet": {
                "number": "W0000001047",
                "accounts_receivable": {
                    "number": "ACR0000001929",
                    "name": "ACR0000001929 Alternative Currency 2",
                    "id": "A4CC53867F7E43F793974D3FCD37B8D7",
                    "life_cycle_state": "ACTIVE",
                    "account_owner": {
                        "company_profile": null,
                        "company_name": null,
                        "name": null,
                        "last_name": "Currency 2",
                        "id": "4E39717387B34C95B1FCE69329D2FFB0",
                        "life_cycle_state": "FINANCIAL",
                        "middle_name": null,
                        "title": null,
                        "type": "PERSON",
                        "first_name": "Alternative",
                        "demographics": {
                            "name_day": {
                                "month": null,
                                "day": null
                            },
                            "id_number": null,
                            "passport_number_expiration_date": null,
                            "gender": null,
                            "date_of_birth": {
                                "month": null,
                                "year": null,
                                "day": null
                            },
                            "id_number_expiration_date": null,
                            "industry_sector": null,
                            "passport_number": null,
                            "industry": null,
                            "social_security_number": null,
                            "id_issued_by_country": null,
                            "passport_issued_by_country": null
                        }
                    }
                },
                "id": "1A6207BB05544E3A8ED396FA1945F182",
                "life_cycle_state": "EFFECTIVE"
            },
            "log_information": {
                "created_by_unit": {
                    "alternative_code": "adminunit",
                    "group_name": "Main Group",
                    "community_name": "Community",
                    "name": "Admin Unit",
                    "description": "admin unit",
                    "id": "1"
                },
                "updated_by_unit": {
                    "alternative_code": "adminunit",
                    "group_name": "Main Group",
                    "community_name": "Community",
                    "name": "Admin Unit",
                    "description": "admin unit",
                    "id": "1"
                },
                "created_date": "2018-06-11T07:56:50",
                "updated_date": "2018-06-11T07:56:50",
                "updated_by_user": {
                    "person_name": "CRM COM",
                    "id": "1",
                    "email": "test@crm.com",
                    "username": "MPAdministrator"
                },
                "created_by_user": {
                    "person_name": "CRM COM",
                    "id": "1",
                    "email": "test@crm.com",
                    "username": "MPAdministrator"
                }
            },
            "caused_by_entity": "VOUCHERS",
            "currency_rate_period": null,
            "life_cycle_state": "EFFECTIVE",
            "alternative_amount": 200,
            "type": {
                "alternative_code": "WD",
                "name": "Wallet Debit",
                "description": "Wallet Debit",
                "id": "486825E44D9452107C8EE6AAC6C57884",
                "classification": "DEBIT"
            },
            "caused_by_entity_id": "BC7B54EC078A4E2BAD2D2E1A19057AF1",
            "initiated_currency": {
                "suffix_symbol": "N/A",
                "prefix_symbol": "€",
                "decimal_part_name": "cents",
                "code": "EUR",
                "integer_part_name": "euro",
                "id": "2",
                "life_cycle_state": "EFFECTIVE"
            },
            "number": "5447",
            "extra_added_alternative_amount": null,
            "id": "4E8D40A7898945C798F4CACE7FBB1DE3",
            "extra_added_amount": null
        },
        "vouchers_set": [
            {
                "number": "V00248769",
                "id": "BC7B54EC078A4E2BAD2D2E1A19057AF1",
                "life_cycle_state": "ACTIVATED",
                "type": {
                    "alternative_code": "PFET",
                    "value_options": "FIXED",
                    "name": "Personal Fixed EVoucher Type",
                    "description": null,
                    "id": "78FE5E3B16794D03BA445C175E633CD1",
                    "classification": "ELECTRONIC_PAYMENT_VOUCHER"
                },
                "value": 20
            }
        ],
        "wallet_balance": 194.7,
        "wallet_alternative_balance": 1947
    },
    "status": {
        "code": "OK",
        "description": "",
        "message": ""
    }
}

 

...