Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Tip

From CRM.COM R14.0.0 and onwards


Excerpt

This method allows purchasing a voucher of classification Electronic Payment Voucher, through a retailer. Single A single voucher is purchased by each call

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

type_identifier

(mandatory)

Voucher
type identifier
type identifier

The identifier of the voucher type to be purchased. Only voucher types of "Electronic Payment Voucher" can be selected. The allowed voucher type identifier fields are the following:

Include Page
V4:voucher_type_identifier
V4:voucher_type_identifier

sold_by_business_unit_identifier

(mandatory)

Business Unit Identifier

The identifier of the

voucher type to be purchased

retailer's business unit that will be selling the eVoucher. The business unit must own an accounts receivable. The allowed

voucher type

business unit identifier fields are the following:

Include Page
V4:

voucher

business_

type

unit_identifier
V4:

voucher

business_

type

unit_identifier

Tip

Available from CRM.COM R18.0.0


sold_by_unit_identifier

(mandatory)

Unit Identifier

The identifier of the retailer's

unit

organisational that will be selling the eVoucher. The unit must own an accounts receivable. The allowed unit identifier fields are the following:

Include Page
V4:unit_identifier
V4:unit_identifier

Tip

Deprecated from CRM.COM R18.0.0


purchased_by_identifier

(mandatory)

Accounts Receivable Identifier

The identifier of the accounts receivable of the customer purchasing the eVoucher. If the voucher type's usage method is "Personal" then the customer purchasing the eVoucher will also use it. The allowed accounts receivable identifier fields are the following:

Include Page
V4:accounts_receivable_identifier
V4:accounts_receivable_identifier

accounts_receivable_identifier

(optional)

Accounts Receivable Identifier

The identifier of the accounts receivable of the customer that will use the eVoucher.

Defaults to the accounts receivable of the customer who purchases the eVoucher except if the eVoucher type

If the voucher's usage method is "Personal", then this accounts receivable defaults to the account owner who purchased voucher. If the voucher's usage method is "Shareable"

and a different customer's accounts receivable can be provided

, if not specified then the accounts receivable remains empty as it can be used by any account owner. The allowed accounts receivable identifier fields are the following:

Include Page
V4:accounts_receivable_identifier
V4:accounts_receivable_identifier

voucher_value

(mandatory on conditions)

NumberThe eVoucher's value. Applicable and available only if voucher type's value options is "Variable"

description

(optional)

StringThe description of the eVoucher to be purchased

udf_string_1

(optional)

StringUser Defined Field of type String

udf_string_2

(optional)

StringUser Defined Field of type String

udf_string_3

(optional)

StringUser Defined Field of type String

udf_string_4

(optional)

StringUser Defined Field of type String

udf_string_5

(optional)

StringUser Defined Field of type String

udf_string_6

(optional)

StringUser Defined Field of type String

udf_string_7

(optional)

StringUser Defined Field of type String

udf_string_8

(optional)

StringUser Defined Field of type String

udf_float_1

(optional)

Float

User Defined Field of type Float

udf_float_2

(optional)

Float

User Defined Field of type Float

udf_float_3

(optional)

Float

User Defined Field of type Float

udf_float_4

(optional)

Float

User Defined Field of type Float

udf_date_1

(optional)

Date

User Defined Field of type Date

udf_date_2

(optional)

Date

User Defined Field of type Date

udf_date_3

(optional)

Date

User Defined Field of type Date

udf_date_4

(optional)

Date

User Defined Field of type Date

evoucher_products_set

(optional)

Set of Products and Product Types item objectsVoucher products are a set of products (services and physical goods) or product types that can consume the amount of money that was paid through the eVoucher.

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

TipAvailable from CRM.COM R10.0.0


Anchor
purchase evoucher from retailer referred parameters
purchase evoucher from retailer referred parameters
Referred Parameter Objects

...

Expand
titleExample 1

HTTP Method: POST

 


Request:

Body

Code Block
languagejs
themeConfluencelanguagejs
linenumberstrue
 {
    "token":"{{token}}",
    "type_identifier":{"name":"Private eVoucher"},
    "description":"eVoucher created through API",
    "sold_by_unit_identifier":{"name":"Secondary Unit"},
    "purchased_by_identifier":{"number":"ACR0000012236"},
    "accounts_receivable_identifier":{"name":"S. Petrou"},
    "voucher_value":"5"
}


Response:

Code Block
languagejs
themeConfluence
languagejs
linenumberstrue
 {
    "data": {
        "allowed_organisational_units_set": [],
        "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": "2017-09-18T14:45:12",
            "updated_date": "2017-09-18T14:45:13",
            "updated_by_user": {
                "person_name": "CRM COM",
                "id": "1",
                "email": "dev@crm.com",
                "username": "MPAdministrator"
            },
            "created_by_user": {
                "person_name": "CRM COM",
                "id": "1",
                "email": "dev@crm.com",
                "username": "MPAdministrator"
            }
        },
        "purchased_by": {
            "number": "ACR0000012236",
            "name": "ACR0000012236 Marios Ioan.",
            "id": "7453A591D366478F9A11177E32D367DF",
            "life_cycle_state": "ACTIVE",
            "account_owner": {
                "company_profile": null,
                "company_name": null,
                "name": null,
                "last_name": "Ioannides",
                "id": "B227C528F0834C648486604FBEAB89EA",
                "life_cycle_state": "FINANCIAL",
                "middle_name": null,
                "title": "Mr",
                "type": "PERSON",
                "first_name": "Marios",
                "demographics": {
                    "name_day": {
                        "month": 11,
                        "day": 21
                    },
                    "id_number": "4545",
                    "gender": null,
                    "country_of_residence": {
                        "alternative_code": "CYP",
                        "three_character_code": "CYP",
                        "name": "CYPRUS",
                        "id": "181",
                        "two_character_code": "CY"
                    },
                    "date_of_birth": {
                        "month": null,
                        "year": null,
                        "day": null
                    },
                    "industry_sector": null,
                    "passport_number": null,
                    "industry": null,
                    "social_security_number": null,
                    "id_issued_by_country": null,
                    "passport_issued_by_country": null
                }
            }
        },
        "description": "eVoucher created through API",
        "extra_added_value": 0,
        "expiration_date": "2017-09-28T14:45:13",
        "udf_date_2": null,
        "type": {
            "alternative_code": "PeV",
            "value_options": "FIXED",
            "name": "Private eVoucher",
            "description": null,
            "id": "2267741FD3E943EFB592AC58018B2787",
            "classification": "ELECTRONIC_PAYMENT_VOUCHER"
        },
        "udf_date_1": null,
        "udf_date_4": null,
        "products_set": [],
        "udf_date_3": null,
        "number": "V00201333",
        "udf_float_3": null,
        "udf_float_4": null,
        "sold_by": {
            "alternative_code": "G2U",
            "group_name": "Secondary Group",
            "community_name": "CommunityA",
            "name": "Secondary Unit",
            "description": null,
            "id": "3BC92704833C4285B49734CE916D055E"
        },
        "effective_date": "2017-09-18T14:45:13",
        "purchased_for": {
            "number": "ACR0000012236",
            "name": "ACR0000012236 Marios Ioan.",
            "id": "7453A591D366478F9A11177E32D367DF",
            "life_cycle_state": "ACTIVE",
            "account_owner": {
                "company_profile": null,
                "company_name": null,
                "name": null,
                "last_name": "Ioannides",
                "id": "B227C528F0834C648486604FBEAB89EA",
                "life_cycle_state": "FINANCIAL",
                "middle_name": null,
                "title": "Mr",
                "type": "PERSON",
                "first_name": "Marios",
                "demographics": {
                    "name_day": {
                        "month": 11,
                        "day": 21
                    },
                    "id_number": "4545",
                    "gender": null,
                    "country_of_residence": {
                        "alternative_code": "CYP",
                        "three_character_code": "CYP",
                        "name": "CYPRUS",
                        "id": "181",
                        "two_character_code": "CY"
                    },
                    "date_of_birth": {
                        "month": null,
                        "year": null,
                        "day": null
                    },
                    "industry_sector": null,
                    "passport_number": null,
                    "industry": null,
                    "social_security_number": null,
                    "id_issued_by_country": null,
                    "passport_issued_by_country": null
                }
            }
        },
        "payment": null,
        "id": "452B06EE76DA4DF8AFC1DFA53C008B63",
        "udf_float_1": null,
        "value": 15,
        "udf_float_2": null,
        "udf_string_2": null,
        "udf_string_3": null,
        "udf_string_4": null,
        "udf_string_5": null,
        "udf_string_1": null,
        "life_cycle_state": "ACTIVATED",
        "cancellation_reason": null,
        "udf_string_6": null,
        "udf_string_7": null,
        "udf_string_8": null
    },
    "status": {
        "code": "OK",
        "description": "",
        "message": ""
    }
}

 

...