Versions Compared

Key

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

...

...

...

...


Excerpt

This method returns information related with a voucher.  Single voucher is returned by each call

Resource URL

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

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

voucher_identifier

(mandatory)

Voucher identifier

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

Include Page
V4:voucher_identifier
V4:voucher_identifier

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.

...

Expand
titleExample 1

HTTP Method: GET 


Request:

http://localhost:9080/crmapi/rest/v2/vouchers/show?token=06A278ADF70A9571B39C63821E39F45A&voucher_identifier=number=1946

Response:

Code Block
languagejs
themeConfluence
languagejs
linenumberstrue
{
    "status":
    {
        "message": "",
        "description": "",
        "code": "OK"
    },
    "data":
    {
        "extra_added_value": 20,
        "payment":
        {
            "payment_amount": 10,
            "issued_on": "2015-09-23T12:28:48",
            "life_cycle_state": "POSTED",
            "number": "290",
            "id": "DFB1C885EE9F4161867E4E5342C4C9C0",
            "reference_number": "318",
            "posted_on": "2015-09-23T12:29:35"
        },
        "effective_date": "2015-09-23T11:58:51",
        "udf_float_1": null,
        "products_set":
        [
            {
                "product_type":
                {
                    "service_type": null,
                    "physical_good_type": "NONTRACEABLE",
                    "used_for_provisioning": false,
                    "classification": "PHYSICALGOODS",
                    "composition_method": "FLAT",
                    "id": "0F94B51F175F06A475EB2948B4030074",
                    "name": "Accessories",
                    "description": "A type which is used for accessories physical goods",
                    "alternative_code": "005"
                },
                "id": "6DE4DD83F5424E2EAE22F457A0700315",
                "product": null
            },
            {
                "product_type": null,
                "id": "6B669397A8DD4427B99B568B40CC2DCD",
                "product":
                {
                    "product_type":
                    {
                        "service_type": null,
                        "physical_good_type": "TRACEABLE",
                        "used_for_provisioning": false,
                        "classification": "PHYSICALGOODS",
                        "composition_method": "FLAT",
                        "id": "6173FC99331504AD1ACB5D697D54DA8C",
                        "name": "Smartcards",
                        "description": "Smartcards",
                        "alternative_code": "SC"
                    },
                    "id": "EAC7A30429364176616CFEF5DF709941",
                    "description": "Smartcard 1",
                    "code": "Smartcard 1",
                    "alternative_code": "SC1"
                }
            },
            {
                "product_type":
                {
                    "service_type": "TERMED",
                    "physical_good_type": null,
                    "used_for_provisioning": true,
                    "classification": "SERVICES",
                    "composition_method": "FLAT",
                    "id": "87CCEDE0A717DC5863EAA01625BD8727",
                    "name": "Add-ons",
                    "description": "Additional products",
                    "alternative_code": "AO"
                },
                "id": "ADC336F40F674E00886E925118D5F267",
                "product": null
            },
            {
                "product_type": null,
                "id": "847ED5B04D7A46A3A52B08673875C3B9",
                "product":
                {
                    "product_type":
                    {
                        "service_type": null,
                        "physical_good_type": "NONTRACEABLE",
                        "used_for_provisioning": false,
                        "classification": "PHYSICALGOODS",
                        "composition_method": "FLAT",
                        "id": "1FFC6C62DABA4C7BAA3536C24104E58A",
                        "name": "Software Product",
                        "description": null,
                        "alternative_code": "SP_1"
                    },
                    "id": "6F5CCD94E04D1CCBF8F2A090588280C9",
                    "description": "Basic: Local + Documentaries

Used for API unit testing, please do not modify.",
                    "code": "Product A",
                    "alternative_code": "P"
                }
            }
        ],
        "udf_float_2": null,
        "udf_float_3": null,
        "number": "1946",
        "udf_float_4": null,
        "udf_string_1": null,
        "udf_string_2": null,
        "udf_string_3": null,
        "udf_string_4": null,
        "allowed_organisational_units_set":
        [
            {
                "community_name": null,
                "id": "3610DD6044854DEBBB6E7DF8427222A0",
                "name": null,
                "group_name": "Finance Group",
                "description": null,
                "alternative_code": null
            },
            {
                "community_name": null,
                "id": "89758E0D06FB4803A6716B8A914BF676",
                "name": "Team Leaders SB2",
                "group_name": null,
                "description": null,
                "alternative_code": null
            }
        ],
        "udf_string_5": null,
        "udf_string_6": null,
        "lot":
        {
            "number": "55",
            "id": "756B505F1E9646799F68EC422A367E0A",
            "description": "Test Voucher Product -  Type",
            "alternative_code": "Test Voucher Product -  Type"
        },
        "udf_string_7": null,
        "udf_string_8": null,
        "id": "2087CAD625A748BC9572843129E6909E",
        "udf_date_1": null,
        "udf_date_2": null,
        "udf_date_3": null,
        "udf_date_4": null,
        "log_information":
        {
            "updated_date": "2015-09-23T12:30:37",
            "created_date": "2015-09-23T11:59:53",
            "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": "MPAdministrator",
                "username": "MPAdministrator",
                "id": "1",
                "email": "sakkascy1986@hotmail.com"
            }
        },
        "value": 10,
        "life_cycle_state": "USED",
        "type":
        {
            "value_options": "VARIABLE",
            "id": "03624A0BF6FEFA560C8886B8A429D316",
            "name": "All Services - No Value",
            "description": null,
            "alternative_code": "ASNV"
        },
        "description": null,
        "expiration_date": "2015-10-31T00:00:00"
    }
}




Expand
titleExample 2

HTTP Method: GET


Request:

http://localhost:9080/crmapi/rest/v2/vouchers/show?token={{token}}&voucher_identifier=number=V00201311

Response:

Code Block
languagejs
themeConfluence
linenumberstrue
{
    "data": {
        "allowed_organisational_units_set": [
            {
                "alternative_code": "adminunit",
                "group_name": null,
                "community_name": null,
                "name": "Admin Unit",
                "description": "admin unit",
                "id": "D49B3607476748AB9EAAF598351D06CB"
            },
            {
                "alternative_code": "C_2",
                "group_name": null,
                "community_name": "CommunityB",
                "name": null,
                "description": null,
                "id": "29E486066C88437F938024BC5F4F17EF"
            }
        ],
        "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-16T15:38:19",
            "updated_date": "2017-09-16T15:39:54",
            "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": "Shareable eVoucher",
        "extra_added_value": 2,
        "expiration_date": "2018-02-16T15:38:22",
        "udf_date_2": null,
        "type": {
            "alternative_code": "J",
            "value_options": "VARIABLE",
            "name": "Shareable eVoucher",
            "description": null,
            "id": "7C1A3D41F4FE450AA1B10D25ED3AA3C1",
            "classification": "ELECTRONIC_PAYMENT_VOUCHER"
        },
        "udf_date_1": null,
        "udf_date_4": null,
        "products_set": [
            {
                "product": null,
                "product_type": {
                    "service_type": "TERMED",
                    "used_for_provisioning": true,
                    "alternative_code": "AS",
                    "udr_type": null,
                    "composition_method": "FLAT",
                    "name": "Additional Services",
                    "description": null,
                    "id": "C8321F0BCA8A4051857BC35CEEE41555",
                    "classification": "SERVICES",
                    "physical_good_type": null
                },
                "id": "22514EFE824B4DD18BEABF987939933E"
            },
            {
                "product": {
                    "code": "Serendipity",
                    "product_type": {
                        "service_type": "USAGE",
                        "used_for_provisioning": true,
                        "alternative_code": "V",
                        "udr_type": {
                            "unit_of_measurement": {
                                "alternative_code": "A",
                                "name": "Amount",
                                "description": null,
                                "id": "0F24D08950AA4B5DB5C5F52FA5A4A7D1"
                            },
                            "alternative_code": "V",
                            "name": "VOD",
                            "description": null,
                            "id": "B3CFC986221548279752B1ABC6F4C480"
                        },
                        "composition_method": "FLAT",
                        "name": "Usage Services",
                        "description": "Used for VOD , PPV, TELEPHONE CALLS ETC",
                        "id": "751C638AA3534B768408AAC4D73CF516",
                        "classification": "SERVICES",
                        "physical_good_type": null
                    },
                    "alternative_code": "S_1",
                    "description": "VOD: Serendipity ",
                    "id": "BD3ACEE7D6244DCAA375D0744DA75540",
                    "priority_level": null
                },
                "product_type": null,
                "id": "4B4AB6BA85A4403EA5F230C52EF1A0C3"
            }
        ],
        "udf_date_3": null,
        "number": "V00201311",
        "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-16T15:38:22",
        "purchased_for": {
            "number": "ACR0000000489",
            "name": "S. Petrou",
            "id": "7904180094C64BDCB88C5B31CAE0B684",
            "life_cycle_state": "ACTIVE",
            "account_owner": {
                "company_profile": null,
                "company_name": null,
                "name": null,
                "last_name": "Petrou",
                "id": "57ADCEBB666344D09F1E7C035368785E",
                "life_cycle_state": "FINANCIAL",
                "middle_name": null,
                "title": null,
                "type": "PERSON",
                "first_name": "Savvas",
                "demographics": {
                    "name_day": {
                        "month": 12,
                        "day": 5
                    },
                    "id_number": null,
                    "gender": "FEMALE",
                    "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": {
            "posted_on": "2017-09-16T15:39:53",
            "number": "3876",
            "payment_amount": 21,
            "issued_on": "2017-09-16T15:39:53",
            "currency_rate_period": {
                "from_date": "2017-08-21 18:02:15.0",
                "to_date": null,
                "rate": 0.84,
                "inverse_rate": 1.190476,
                "currency": {
                    "suffix_symbol": null,
                    "prefix_symbol": "£",
                    "decimal_part_name": null,
                    "code": "GBP",
                    "integer_part_name": null,
                    "id": "9",
                    "life_cycle_state": "EFFECTIVE"
                },
                "id": "99D527123ADE4116B72689B157EB7166"
            },
            "id": "7CCE7F404BD84547A04A239E95A3E225",
            "life_cycle_state": "POSTED",
            "reference_number": "4886"
        },
        "id": "86462E56B82E4DCFBB7E62F57861EDC5",
        "udf_float_1": null,
        "value": 25,
        "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": "USED",
        "cancellation_reason": null,
        "udf_string_6": null,
        "udf_string_7": null,
        "udf_string_8": null
    },
    "status": {
        "code": "OK",
        "description": "",
        "message": ""
    }
}