Versions Compared

Key

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

Available from CRM.COM R4.0.0

 

Table of Contents
maxLevel2

GET vouchers/show

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

Resource URL

Parameters

...

Name

...

Type

...

Description

...

token

...

String

...

The token retrieved from the login method

...

(mandatory)

...

Voucher identifier

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

...

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

...

Examples

Expand
titleExample 1

HTTP Method: GET

 

Request:

Response:

Code Block
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"
    }
}

GET vouchers/list

This method returns information related with vouchers. Multiple vouchers are returned by each call.

Resource URL

Parameters

...

Name

...

Type

...

Description

...

token

...

String

...

The token retrieved from the login method

...

type_identifier
(semi-optional)

...

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

...

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

...

number_of_results

(optional)

...

The number of results that can be retrieved through each call

Tip

Available from CRM.COM R13.0.0

...

offset

(optional)

...

Defines the number of entities that should be skipped from the results. If it is set to 0 then none results should be skipped, otherwise the results will begin from the provided offset number

Tip

Available from CRM.COM R13.0.0

...

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

...

Examples

Expand
titleExample 1

HTTP Method: GET

 

Request:

Response:

Code Block
themeConfluence
languagejs
linenumberstrue
{
   "status":
   {
       "message": null,
       "description": null,
       "code": "OK"
   },
   "data":
   [
       {
           "extra_added_value": 10,
           "payment":
           {
               "payment_amount": 12,
               "issued_on": "2014-08-21T13:04:13",
               "life_cycle_state": "POSTED",
               "number": "115",
               "id": "5925B02446333B54F477A4461E4122BE",
               "reference_number": "136",
               "posted_on": "2014-08-21T13:04:14"
           },
           "effective_date": "2014-08-01T00:00:00",
           "udf_float_1": null,
           "products_set":
           [
               {
                   "id": "A9BFE06631992AF483AC01AF6F77B7A4",
                   "product":
                   {
                       "product_type": null,
                       "id": "DE37CF1696E3CD4E8EF89F522019D385",
                       "description": "Documentaries",
                       "code": "Documentaries",
                       "alternative_code": null
                   }
               },
               {
                   "id": "3C7F7CD1FB22903A1DFCD2DC971D6265",
                   "product":
                   {
                       "product_type": null,
                       "id": "CA05E389D3874A44278047A6109AC975",
                       "description": "International",
                       "code": "International",
                       "alternative_code": null
                   }
               },
               {
                   "id": "8192A1B943819B139AD48035EC57BFAD",
                   "product":
                   {
                       "product_type": null,
                       "id": "E7558FAB3E126741558578B6471C07C9",
                       "description": "Sports ",
                       "code": "Sports ",
                       "alternative_code": null
                   }
               }
           ],
           "udf_float_2": null,
           "udf_float_3": null,
           "number": "889",
           "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": "46BEFE093BA3B5864602FA016D3CFFC2",
                   "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": "19B3FAF60C0BFFC3E756D7DAFD4F180D",
           "udf_date_1": null,
           "udf_date_2": null,
           "udf_date_3": null,
           "udf_date_4": null,
           "log_information":
           {
               "updated_date": "2014-08-21T13:04:16",
               "created_by_unit":
               {
                   "group_name": null,
                   "name": "Admin Unit",
                   "id": "48305F8849E3C18B227C5BE3A27BA6DF",
                   "description": "r1",
                   "alternative_code": "MG"
               },
               "created_date": "2014-08-21T12:41:31",
               "updated_by_unit":
               {
                   "group_name": null,
                   "name": "Admin Unit",
                   "id": "48305F8849E3C18B227C5BE3A27BA6DF",
                   "description": "r1",
                   "alternative_code": "MG"
               },
               "created_by_user":
               {
                   "person_name": "MPAdministrator",
                   "username": "MPAdministrator",
                   "id": "1",
                   "email": null
               },
               "updated_by_user":
               {
                   "person_name": "MPAdministrator",
                   "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
       },
       {
           "extra_added_value": 10,
           "payment": null,
           "effective_date": "2014-08-01T00:00:00",
           "udf_float_1": null,
           "products_set":
           [
               {
                   "id": "AB67EA03C9BB8C3B5772AB6C02AB1ECA",
                   "product":
                   {
                       "product_type": null,
                       "id": "DE37CF1696E3CD4E8EF89F522019D385",
                       "description": "Documentaries",
                       "code": "Documentaries",
                       "alternative_code": null
                   }
               },
               {
                   "id": "C787C7981AD83013D5522E4DC8F53109",
                   "product":
                   {
                       "product_type": null,
                       "id": "E7558FAB3E126741558578B6471C07C9",
                       "description": "Sports ",
                       "code": "Sports ",
                       "alternative_code": null
                   }
               },
               {
                   "id": "8610C38D9D0C02F312DF94F580910171",
                   "product":
                   {
                       "product_type": null,
                       "id": "CA05E389D3874A44278047A6109AC975",
                       "description": "International",
                       "code": "International",
                       "alternative_code": null
                   }
               }
           ],
           "udf_float_2": null,
           "udf_float_3": null,
           "number": "890",
           "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": "C9E14991CDE10569F4680EDBC28C5BF1",
                   "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": "D9308C6A7996E5E79B01BE60E5826128",
           "udf_date_1": null,
           "udf_date_2": null,
           "udf_date_3": null,
           "udf_date_4": null,
           "log_information":
           {
               "updated_date": "2014-08-21T12:45:54",
               "created_by_unit":
               {
                   "group_name": null,
                   "name": "Admin Unit",
                   "id": "48305F8849E3C18B227C5BE3A27BA6DF",
                   "description": "r1",
                   "alternative_code": "MG"
               },
               "created_date": "2014-08-21T12:41:31",
               "updated_by_unit":
               {
                   "group_name": null,
                   "name": "Admin Unit",
                   "id": "48305F8849E3C18B227C5BE3A27BA6DF",
                   "description": "r1",
                   "alternative_code": "MG"
               },
               "created_by_user":
               {
                   "person_name": "MPAdministrator",
                   "username": "MPAdministrator",
                   "id": "1",
                   "email": null
               },
               "updated_by_user":
               {
                   "person_name": "MPAdministrator",
                   "username": "MPAdministrator",
                   "id": "1",
                   "email": null
               }
           },
           "value": 12,
           "life_cycle_state": "ACTIVATED",
           "type":
           {
               "name": "Fixed Voucher Type",
               "id": "3F1F84F4195B7804483B0C6823A90AD3",
               "alternative_code": "FVT"
           },
           "description": null,
           "expiration_date": "2015-08-01T00:00:00",
           "alternative_code": null
       },....
    ]
}     

 

GET vouchers/retrieve_secret_number

This method returns a voucher's secret number. The secret number of a single voucher is returned by each call

Tip

Available from CRM.COM R5.0.0

Resource URL

Parameters

...

Name

...

Type

...

Description

...

token

...

String

...

The token retrieved from the login method

...

(mandatory)

...

Voucher identifier

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

...

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

id

String

The ID of the retrieved voucher

secret_number

String

The secret_number of the retrieved voucher

Examples

Expand
titleExample 1

HTTP Method: GET

 

Request:

Response:

Code Block
themeConfluence
languagejs
linenumberstrue
{
	"status":
	{
		"message": null,
		"description": null,
		"code": "OK"
	},
	"data":
	{
		"secret_number": "0977835",
		"id": "87DB0829834D1AC4B38B64616BF8855D"
	}
}

POST vouchers/use

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

Tip

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 "Payment Voucher", then a payment will be created in the system
  • If the voucher of a type with classification of "Refund Voucher", then no payment will be created

Resource URL

Parameters

...

Name

...

Type

...

Description

...

token

...

String

...

The token retrieved from the login method

...

(mandatory)

...

The secret number of the voucher that will be used

...

accounts_receivable_identifier
(mandatory)

...

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

...

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

...

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)

...

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.

Response Data

...

Examples

...

titleExample 1

HTTP Method: POST

 

Request:

Body

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

Response:

Code Block
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
    }
} 

...

titleExample 1

HTTP Method: POST

 

Request:

Body

Code Block
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
themeConfluence
languagejs
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": []
  }
}

GET vouchers/get_available_accepted_for_activation

This method returns a random accepted for activation voucher, which is can be selected by the user that is requesting the voucher, and sets the voucher life cycle state to activated. A single voucher is retrieved by each call

Tip

Available from CRM.COM R5.0.0

Resource URL

Parameters

...

Name

...

Type

...

Description

...

token

...

String

...

The token retrieved from the login method

...

type_identifier
(semi-optional)

...

The identifier of the voucher type related with the voucher that should be returned as a result. The allowed job type identifier fields are the following:

...

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

...

accounts_receivable_identifier

(optional)

...

The identifier of the accounts receivable that the voucher will be submitted to. The group owning the accounts receivable is filtered against the available vouchers' allowed organisational units. The allowed accounts receivable identifier fields are the following:

...

group_identifier

(optional)

...

The identifier of the group that will be using the voucher. The group is filtered against the available vouchers' allowed organisational units. The allowed group identifier fields are the following:

...

unit_identifier

(optional)

...

The identifier of the unit that will be using the voucher. The unit is filtered against the available vouchers' allowed organisational units. The allowed unit identifier fields are the following:

...

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

...

Examples

Expand
titleExample 1

HTTP Method: GET

 

Request:

Response:

Code Block
themeConfluence
languagejs
linenumberstrue
{
    "status":
    {
       "message": null,
       "description": null,
       "code": "OK"
    },
    "data":
    {
       "extra_added_value": 11,
       "payment": null,
       "effective_date": "2014-08-21T00:00:00",
       "udf_float_1": null,
       "products_set":
       [
           {
           "id": "FED380CC894ABEF2324FD3063D62E7A8",
           "product":
           {
               "product_type":
               {
                   "physical_good_type": null,
                   "service_type": "USAGE",
                   "used_for_provisioning": true,
                   "composition_method": "FLAT",
                   "classification": "SERVICES",
                   "name": "3Play ",
                   "id": "92F0AFC840E91633C5212162303BE8DF",
                   "description": "3Play Packages (Gold, Silver etc)",
                   "alternative_code": "3PLAY"
               },
               "id": "F43EBDCE48CAADEC32CB26F59904ECCD",
               "description": "Smart Card",
               "code": "Smart Card",
               "alternative_code": null
           }
           },
           {
           "id": "3DB744C60B6AC98A3067A505AA9CB1F1",
           "product":
           {
               "product_type":
               {
                   "physical_good_type": null,
                   "service_type": "USAGE",
                   "used_for_provisioning": true,
                   "composition_method": "FLAT",
                   "classification": "SERVICES",
                   "name": "3Play ",
                   "id": "92F0AFC840E91633C5212162303BE8DF",
                   "description": "3Play Packages (Gold, Silver etc)",
                   "alternative_code": "3PLAY"
               },
               "id": "F4C4D0B88F3770588AE9A7587C5314A8",
               "description": "Set Top Box",
               "code": "Set Top Box",
               "alternative_code": null
           }
           }
       ],
       "udf_float_2": null,
       "udf_float_3": null,
       "number": "920",
       "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": "B95109370D6A44D9CA9ED5BD2E4592E4",
           "description": null,
           "alternative_code": null
           },
           {
           "community_name": "Main Community",
           "group_name": null,
           "name": null,
           "id": "02D225E673E52B6A9AF8AADE6D7C832F",
           "description": null,
           "alternative_code": null
           },
           {
           "community_name": null,
           "group_name": "TGFinal",
           "name": null,
           "id": "B95109370D6A44D9CA9ED5BD2E4592E1",
           "description": null,
           "alternative_code": null
           },
           {
           "community_name": null,
           "group_name": null,
           "name": "Developers Unit",
           "id": "4F397713E3EB3B2078E5A5CE462FB42C",
           "description": null,
           "alternative_code": null
           }
       ],
       "udf_string_6": null,
       "udf_string_7": null,
       "lot":
       {
           "number": "38",
           "id": "700A708B2C011BAA906BBBDDAC23688C",
           "description": null,
           "alternative_code": "TEST3"
       },
       "udf_string_8": null,
       "id": "08297F60FB67A15CA970320A6C04855C",
       "udf_date_1": null,
       "udf_date_2": null,
       "udf_date_3": null,
       "udf_date_4": null,
       "log_information":
       {
           "updated_date": "2015-03-13T09:03:15",
           "created_by_unit":
           {
           "name": "Admin Unit",
           "id": "48305F8849E3C18B227C5BE3A27BA6DF",
           "description": "r1",
           "alternative_code": "MG"
           },
           "created_date": "2014-08-21T14:20:15",
           "updated_by_unit":
           {
           "community_name": "Main Community",
           "group_name": "TGFinal",
           "name": "TGFinal",
           "id": "6FCD5D179040C797D2B4A05104C15DD9",
           "description": null,
           "alternative_code": null
           },
           "created_by_user":
           {
           "person_name": "mpadministrator",
           "username": "mpadministrator",
           "id": "1"
           },
           "updated_by_user":
           {
           "person_name": "mm mm",
           "username": "mariosmtest",
           "id": "C2730E7C873AB4F5425218BA01378251",
           "email": null
           }
       },
       "value": 34,
       "life_cycle_state": "ACTIVATED",
       "type":
       {
           "value_options": "VARIABLE",
           "name": "Variable Voucher Type",
           "id": "98E333F3122CCFCB2B36747EF58FE925",
           "description": "Variable Voucher Type",
           "alternative_code": "VVT"
       },
       "description": null,
       "expiration_date": "2015-08-21T00:00:00"
    }
}  

POST vouchers/retrieve_based_on_secret_number

Tip

Available from CRM.COM R11.0.0

This method returns information related with a voucher by specifying the voucher secret number.  A single voucher is returned by each call

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

secret_number

(mandatory)

String

The secret number of the voucher that should be returned as a result.

 

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

...

Examples

HTTP Method: POST

 

Request:

Body

Expand
titleExample 1
Code Block
themeConfluence
languagejs
linenumberstrue
 {
  "token":"FE9505133D414867A3B8C5DF14033CB6",
  "secret_number":"7120250219333310"
}

Response:

Code Block
themeConfluence
languagejs
linenumberstrue
 {
  "data": {
    "allowed_organisational_units_set": [],
    "log_information": {
      "created_by_unit": {
        "alternative_code": "AU",
        "group_name": "EKO  Group",
        "community_name": "Internal Community",
        "name": "Admin Unit",
        "description": "Admin Unit",
        "id": "30DCAB2BEE60E08D3466CF23CA406201"
      },
      "updated_by_unit": {
        "alternative_code": "AU",
        "group_name": "EKO  Group",
        "community_name": "Internal Community",
        "name": "Admin Unit",
        "description": "Admin Unit",
        "id": "30DCAB2BEE60E08D3466CF23CA406201"
      },
      "created_date": "2014-10-31T09:47:26",
      "updated_date": "2014-10-31T09:47:26",
      "updated_by_user": {
        "person_name": "MPAdministrator",
        "id": "1",
        "email": "dev@crm.com",
        "username": "MPAdministrator"
      },
      "created_by_user": {
        "person_name": "MPAdministrator",
        "id": "1",
        "email": "dev@crm.com",
        "username": "MPAdministrator"
      }
    },
    "description": null,
    "extra_added_value": 0,
    "expiration_date": "2017-10-31T09:46:25",
    "udf_date_2": null,
    "type": {
      "alternative_code": "EV5000",
      "value_options": "FIXED",
      "name": "ACTV Premium",
      "description": "ACTV Premium E-Voucher of 5.000NGN",
      "id": "CC323E450BB297B9B32C6FFA6FF2D3D6"
    },
    "udf_date_1": null,
    "udf_date_4": null,
    "products_set": [],
    "udf_date_3": null,
    "lot": {
      "number": "3",
      "alternative_code": "1001212",
      "description": null,
      "id": "925E877484518ECAAED7240B549E1000"
    },
    "number": "54",
    "udf_float_3": null,
    "udf_float_4": null,
    "effective_date": "2014-10-31T09:46:24",
    "payment": null,
    "id": "D54DC78CFB45922080A7E940D01C44FE",
    "udf_float_1": null,
    "value": 7500,
    "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": "DRAFT",
    "udf_string_6": null,
    "udf_string_7": null,
    "udf_string_8": null
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}
Expand
titleExample 2

HTTP Method: POST

 

Request:

Body

Code Block
themeConfluence
languagejs
linenumberstrue
 {
  "token":"FE9505133D414867A3B8C5DF14033CB6",
  "secret_number":"247136",
  "fields_set":"id,number,lot,value,extra_added_value,type,life_cycle_state,allowed_organisational_units_set"
}

Response:

Code Block
themeConfluence
languagejs
linenumberstrue
{ "data": { "lot": { "number": "L00000010", "alternative_code": "Testing Basic Voucher Lot", "description": null, "id": "882D7FBB00444EB987189ABBACB66C3E" }, "number": "V00200152", "allowed_organisational_units_set": [ { "alternative_code": "adminunit", "group_name": null, "community_name": null, "name": "Admin Unit", "description": "admin unit", "id": "110BC276C63245049771A4728E4E5DF3" }, { "alternative_code": "MG", "group_name": "Main Group", "community_name": null, "name": null, "description": "Main Group", "id": "C8E6619FCEF44D1C972B995870727539" } ], "id": "064A5B5FA3064414941B013DA8CEC050", "extra_added_value": 10, "life_cycle_state": "ACTIVATED", "type": { "alternative_code": "TBV", "value_options": "VARIABLE", "name": "Testing Basic Voucher", "description": null, "id": "6067BB55747D4358B8082DA89CC18519" }, "value": 100 }, "status": { "code": "OK", "description": "", "message": "" } } Panel
nameblue

Child pages (Children Display)
alltrue
excerpttrue