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

...

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

...

titleExample 1

HTTP Method: GET

 

Request:

Response:

...

themeConfluence
languagejs
linenumberstrue

...

voucher is returned by each call

Resource URL

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.

Response Data

Include Page
V4:voucher_complete
V4:voucher_complete

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-22T12:28:30",
            "life_cycle_state": "POSTED",
            "number": "120",
            "id": "780EC0BBD82BAF7B40A6B3C5FD555C42",
            "reference_number": "141",
            "posted_on": "2014-08-22T12:28:30"
        },
        "effective_date": "2014-08-01T00:00:00",
        "udf_float_1": null,
        "products_set":
        [
            {
                "id": "B2C3C187A2B9D76BCF15AC1DF56C50DA",
                "product":
                {
                    "messageproduct_type":
 null,         "description": null,         "code": "OK"{
     },     "data":     {         "extraphysical_addedgood_valuetype": 10null,
             "payment":           "service_type": "USAGE",
           {             "paymentused_for_amountprovisioning": 12true,
            "issued_on": "2014-08-22T12:28:30",             "lifecomposition_cycle_statemethod": "POSTEDFLAT",

           "number": "120",             "idclassification": "780EC0BBD82BAF7B40A6B3C5FD555C42SERVICES",

           "reference_number": "141",             "posted_onname": "2014-08-22T12:28:30"Subscription",
               },         "effective_dateid": "2014-08-01T00:00:002B0EC029035C637200648C9B2D6A2FFB",
        "udf_float_1": null,                "products_setdescription": "Subscription channels",
      [             {     "alternative_code": "SUBSCRIPTION"
          "id": "B2C3C187A2B9D76BCF15AC1DF56C50DA",         },
       "product":                 {"id": "E7558FAB3E126741558578B6471C07C9",
                     "product_typedescription": "Sports ",
                  {  "code": "Sports ",
                    "physicalalternative_good_typecode": null,
                }
           "service_type": "USAGE", },
            {
                "used_for_provisioningid": true"769B8BC241302A7BC122F25D0EE81F11",
                "product":
       "composition_method": "FLAT",        {
                "classification": "SERVICES",   "product_type":
                    {
"name": "Subscription",
                        "idphysical_good_type": "2B0EC029035C637200648C9B2D6A2FFB"null,
                        "descriptionservice_type": "Subscription channelsUSAGE",
               
        "alternative_code": "SUBSCRIPTION"                 "used_for_provisioning": true,
   },                     "idcomposition_method": "E7558FAB3E126741558578B6471C07C9FLAT",
                        "descriptionclassification": "Sports SERVICES",
                        "codename": "Sports Subscription",
                    "alternative_code    "id": null"2B0EC029035C637200648C9B2D6A2FFB",
                }        "description": "Subscription channels",
  },             {         "alternative_code": "SUBSCRIPTION"
       "id": "769B8BC241302A7BC122F25D0EE81F11",            },
    "product":                 {"id": "DE37CF1696E3CD4E8EF89F522019D385",
                    "product_typedescription": "Documentaries",
                   {    "code": "Documentaries",
                    "physicalalternative_good_typecode": null,
                }
           "service_type": "USAGE" },
            {
           "used_for_provisioning     "id": true"2F4CCAB93A98AAE631527584B214F6D5",
                "product":
       "composition_method": "FLAT",        {
                "classification": "SERVICES",   "product_type":
                     "name": "Subscription",{
                         "idphysical_good_type": "2B0EC029035C637200648C9B2D6A2FFB"null,
                        "descriptionservice_type": "Subscription channelsUSAGE",
                        "alternative_code": "SUBSCRIPTION"
                used_for_provisioning": true,
   },                     "idcomposition_method": "DE37CF1696E3CD4E8EF89F522019D385FLAT",
                        "descriptionclassification": "DocumentariesSERVICES",
                        "codename": "DocumentariesSubscription",
                        "alternative_codeid": null"2B0EC029035C637200648C9B2D6A2FFB",
                }        "description": "Subscription channels",
  },             {         "alternative_code": "SUBSCRIPTION"
      "id": "2F4CCAB93A98AAE631527584B214F6D5",             },
   "product":                 {"id": "CA05E389D3874A44278047A6109AC975",
                    "product_typedescription": "International",
                   { "code": "International",
                      "physicalalternative_good_typecode": null,
                 }
      "service_type": "USAGE",       }
        ],
        "usedudf_forfloat_provisioning2": truenull,
               "udf_float_3": null,
        "composition_methodnumber": "FLAT900",
        "udf_float_4": null,
        "udf_string_1": null,
     "classification   "udf_string_2": "SERVICES"null,
             "udf_string_3": null,
          "name"udf_string_4": "Subscription"null,
        "udf_string_5": null,
          "allowed_organisational_units_set":
   "id": "2B0EC029035C637200648C9B2D6A2FFB",    [
            {
       "description": "Subscription channels",       "community_name": null,
                "alternativegroup_codename": "SUBSCRIPTIONDevelopers Group",
                    },
   "name": null,
                "id": "CA05E389D3874A44278047A6109AC97550419727229B1243340E9C1F66D1975A",
                    "description": "International"null,
                "alternative_code": null
  "code": "International",          }
        ],
        "alternativeudf_string_code6": null,
        "udf_string_7": null,
        }"lot":
        {
    }         ],"number": "37",
         "udf_float_2   "id": null,"83219EA73671E800298CAC49DB1A3F58",
            "udf_float_3description": null,
        "number    "alternative_code": "900TEST2",
        "udf_float_4": null},
        "udf_string_18": null,
        "udf_string_2id": null"28CC7CBCC1F267A83C9AC0BBCD03FE16",
        "udf_stringdate_31": null,
        "udf_stringdate_42": null,
        "udf_stringdate_53": null,
        "allowedudf_organisationaldate_units_set4": null,
       [ "log_information":
           {
   
            "communityupdated_namedate": null"2014-08-22T12:28:31",
                "group_name": "Developers Group",
    "created_by_unit":
           "name": null, {
                "idcommunity_name": "50419727229B1243340E9C1F66D1975AMain Community",
                "descriptiongroup_name": "Main nullGroup",
                "alternative_codename": null
         "Admin Unit",
  }         ],         "udf_string_6"id": null"48305F8849E3C18B227C5BE3A27BA6DF",
        "udf_string_7": null,
        "lotdescription":     "r1",
   {             "numberalternative_code": "37MG",
            "id": "83219EA73671E800298CAC49DB1A3F58"},
            "descriptioncreated_date": null"2014-08-21T12:41:34",
            "alternativeupdated_by_codeunit":
 "TEST2"         },  {
      "udf_string_8": null,         "idcommunity_name": "28CC7CBCC1F267A83C9AC0BBCD03FE16Main Community",
        "udf_date_1": null,         "udfgroup_date_2name": "Main nullGroup",
        "udf_date_3": null,         "udf_date_4name": "Admin null,Unit",
            "log_information":    "id": "48305F8849E3C18B227C5BE3A27BA6DF",
   {             "updated_datedescription": "2014-08-22T12:28:31r1",
                "createdalternative_by_unitcode": "MG"
           {    },
            "communitycreated_by_nameuser": "Main Community",
                "group_name": "Main Group",{
                "person_name": "Admin UnitMPAdministrator",
                "idusername": "48305F8849E3C18B227C5BE3A27BA6DFMPAdministrator",
                "descriptionid": "r11",
                "alternative_codeemail": "MGmp@ministrator.com"
            },
            "created_date": "2014-08-21T12:41:34",
            "updated_by_unituser":
            {
                "communityperson_name": "Main Community",
                "group_name": "Main GroupMPAdministrator",
                "nameusername": "Admin UnitMPAdministrator",
                "id": "48305F8849E3C18B227C5BE3A27BA6DF1",
                "descriptionemail": "r1mp@ministrator.com",
            }
    "alternative_code": "MG"   },
        "value": }12,
   
        "createdlife_bycycle_userstate": "USED",
        "type":
    {    {
            "personvalue_nameoptions": "MPAdministratorFIXED",
            "name": "Fixed Voucher Type",
     "username       "id": "MPAdministrator3F1F84F4195B7804483B0C6823A90AD3",
                "iddescription": "1Fixed Voucher Type",
            "alternative_code": "FVT"
        },
"email": "mp@ministrator.com"       "description": null,
    },    "expiration_date": "2015-08-01T00:00:00"
        "updated_by_user":
            {
                "person_name": "MPAdministrator",
                "username": "MPAdministrator",
                "id": "1",
                "email": "mp@ministrator.com"
            }
        },
        "value": 12,
        "life_cycle_state": "USED",
        "type":
        {
            "value_options": "FIXED",
            "name": "Fixed Voucher Type",
            "id": "3F1F84F4195B7804483B0C6823A90AD3",
            "description": "Fixed Voucher Type",
            "alternative_code": "FVT"}
}

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)

Voucher type identifier

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:

Include Page
V4:voucher_type_identifier
V4:voucher_type_identifier

lot_identifier
(semi-optional)
Lot identifier

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

Include Page
V4:lot_identifier
V4:lot_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.

Response Data

Include Page
V4:voucher_complete
V4:voucher_complete

Examples

Expand
titleExample 1

HTTP Method: GET

 

Request:

Response:

Code Block
themeConfluence
languagejs
linenumberstrue
{
   "status":
   {
       "message": }null,

       "description": null,

       "expiration_datecode": "2015-08-01T00:00:00OK"
   },
}
}

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 job type related with the jobs 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:

...

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":
   {   "data":
   [
       {
           "extra_added_value": 10,
           "payment":
           {
               "payment_amount": 12,
               "issued_on": "2014-08-21T13:04:13",
               "life_cycle_state": "POSTED",
               "number": "115",
               "id": "5925B02446333B54F477A4461E4122BE",
               "messagereference_number": null"136",

      "description": null,        "codeposted_on": "OK"2014-08-21T13:04:14"
           },
           "dataeffective_date": "2014-08-01T00:00:00",
  [          {"udf_float_1": null,
           "extraproducts_added_valueset":
  10,         [
  "payment":             {
               "payment_amount    "id": 12"A9BFE06631992AF483AC01AF6F77B7A4",
                "issued_on   "product": "2014-08-21T13:04:13",
                   {
      "life_cycle_state": "POSTED",                "numberproduct_type": "115",null,
                       "id": "5925B02446333B54F477A4461E4122BEDE37CF1696E3CD4E8EF89F522019D385",
                    "reference_number   "description": "136Documentaries",
               "posted_on        "code": "2014-08-21T13:04:14"Documentaries",
           },            "effectivealternative_datecode": "2014-08-01T00:00:00",null
           "udf_float_1": null,       }
    "products_set":           },
[
               {
                   "id": "A9BFE06631992AF483AC01AF6F77B7A43C7F7CD1FB22903A1DFCD2DC971D6265",
                   "product":
                   {
                       "product_type": null,
                       "id": "DE37CF1696E3CD4E8EF89F522019D385CA05E389D3874A44278047A6109AC975",
                       "description": "DocumentariesInternational",
                       "code": "DocumentariesInternational",
                       "alternative_code": null
                   }
               },
               {
                   "id": "3C7F7CD1FB22903A1DFCD2DC971D62658192A1B943819B139AD48035EC57BFAD",
                   "product":
                   {
                       "product_type": null,
                       "id": "CA05E389D3874A44278047A6109AC975E7558FAB3E126741558578B6471C07C9",
                       "description": "InternationalSports ",
                       "code": "InternationalSports ",
                       "alternative_code": null
                   }
               },
           ],
   {        "udf_float_2": null,
           "idudf_float_3": "8192A1B943819B139AD48035EC57BFAD",
       null,
           "productnumber": "889",
           "udf_float_4": null,
     {           "udf_string_1": null,
            "productudf_string_type2": null,
           "udf_string_3": null,
           "idudf_string_4": "E7558FAB3E126741558578B6471C07C9"null,
           "udf_string_5": null,
           "descriptionallowed_organisational_units_set": "Sports
",           [
            "code": "Sports ", {
                      "alternativecommunity_codename": null,
                   "group_name": "Developers Group",
}                }   "name": null,
       ],            "udf_float_2id": null"46BEFE093BA3B5864602FA016D3CFFC2",
           "udf_float_3        "description": null,
           "number": "889",
           "udfalternative_float_4code": null,
             "udf_string_1": null, }
          "udf_string_2": null ],
           "udf_string_36": null,
           "udf_string_47": null,
           "udf_string_5"lot":
 null,          {
 "allowed_organisational_units_set":            [  "number": "37",
            {   "id": "83219EA73671E800298CAC49DB1A3F58",
               "community_namedescription": null,
   
               "groupalternative_namecode": "TEST2"Developers Group",
           },
           "nameudf_string_8": null,
           "id": "19B3FAF60C0BFFC3E756D7DAFD4F180D",
           "idudf_date_1": "46BEFE093BA3B5864602FA016D3CFFC2"null,
           "udf_date_2": null,
        "description   "udf_date_3": null,
             "udf_date_4": null,
           "alternativelog_codeinformation":
null           {
    }            ],"updated_date": "2014-08-21T13:04:16",
               "udfcreated_stringby_6unit":
null,            "udf_string_7": null,  {
         "lot":          "group_name": null,
   {                "numbername": "37Admin Unit",
                   "id": "83219EA73671E800298CAC49DB1A3F5848305F8849E3C18B227C5BE3A27BA6DF",
                   "description": null"r1",
                   "alternative_code": "TEST2MG"
               },
               "udfcreated_string_8date": null,"2014-08-21T12:41:31",
               "idupdated_by_unit":
"19B3FAF60C0BFFC3E756D7DAFD4F180D",            "udf_date_1": null,    {
       "udf_date_2": null,            "udfgroup_date_3name": null,
                 "udf_date_4  "name": null"Admin Unit",
           "log_information":        "id": "48305F8849E3C18B227C5BE3A27BA6DF",
   {                "updated_datedescription": "2014-08-21T13:04:16r1",
                   "createdalternative_by_unitcode": "MG"
              {    },
               "groupcreated_by_name": null,
   user":
               "name": "Admin Unit",{
                   "idperson_name": "48305F8849E3C18B227C5BE3A27BA6DFMPAdministrator",
                   "descriptionusername": "r1MPAdministrator",
                   "alternative_codeid": "MG1",
                   },
"email": null
              "created_date": "2014-08-21T12:41:31" },
               "updated_by_unituser":
               {
                   "groupperson_name": null,
                   "name": "Admin Unit""MPAdministrator",
                   "idusername": "48305F8849E3C18B227C5BE3A27BA6DFMPAdministrator",
                   "descriptionid": "r11",
            
      "alternative_code": "MG"              "email": null
},                "created_by_user":}
           },
    {       "value": 12,
           "personlife_cycle_namestate": "MPAdministratorUSED",
           "type":
       "username": "MPAdministrator",    {
               "idname": "1Fixed Voucher Type",
                   "emailid": null"3F1F84F4195B7804483B0C6823A90AD3",
               },
"alternative_code": "FVT"
           },
  "updated_by_user":         "description": null,
     {      "expiration_date": "2015-08-01T00:00:00",
            "personalternative_namecode": "MPAdministrator",null
       },
       {
   "username": "MPAdministrator",       "extra_added_value": 10,
           "idpayment": "1"null,
           "effective_date": "2014-08-01T00:00:00",
      "email": null    "udf_float_1": null,
          } "products_set":
          }, [
          "value": 12,    {
       "life_cycle_state": "USED",           "id": "typeAB67EA03C9BB8C3B5772AB6C02AB1ECA":,
           {        "product":
       "name": "Fixed Voucher Type",         {
      "id": "3F1F84F4195B7804483B0C6823A90AD3",                "alternativeproduct_codetype": "FVT"null,
           },            "descriptionid": null"DE37CF1696E3CD4E8EF89F522019D385",

          "expiration_date": "2015-08-01T00:00:00",            "alternative_codedescription": null"Documentaries",
       },        {
           "extra_added_valuecode": 10"Documentaries",
           "payment": null,            "effectivealternative_datecode": "2014-08-01T00:00:00",null
           "udf_float_1": null,       }
    "products_set":           },
[                {
                   "id": "AB67EA03C9BB8C3B5772AB6C02AB1ECAC787C7981AD83013D5522E4DC8F53109",
                   "product":
                   {
                       "product_type": null,
                       "id": "DE37CF1696E3CD4E8EF89F522019D385E7558FAB3E126741558578B6471C07C9",
                       "description": "DocumentariesSports ",
                       "code": "DocumentariesSports ",
                       "alternative_code": null
                   }
               },
               {
                   "id": "C787C7981AD83013D5522E4DC8F531098610C38D9D0C02F312DF94F580910171",
                   "product":
                   {
                       "product_type": null,
                       "id": "E7558FAB3E126741558578B6471C07C9CA05E389D3874A44278047A6109AC975",
                       "description": "Sports International",
                       "code": "Sports International",
                       "alternative_code": null
                   }
               },
           ],
   {        "udf_float_2": null,
           "idudf_float_3": "8610C38D9D0C02F312DF94F580910171",
       null,
           "productnumber": "890",
           "udf_float_4": null,
     {            "udf_string_1": null,
           "productudf_string_type2": null,
 
                     "id"udf_string_3": "CA05E389D3874A44278047A6109AC975"null,
           "udf_string_4": null,
          "description": "International",
     udf_string_5": null,
           "allowed_organisational_units_set":
     "code": "International",     [
               {
  "alternative_code": null                "community_name": null,
  }                } "group_name": "Developers  Group",
       ],            "udf_float_2name": null,
           "udf_float_3": null,
           "numberid": "890C9E14991CDE10569F4680EDBC28C5BF1",
                 "udf_float_4  "description": null,
           "udf_string_1": null,
           "udfalternative_string_2code": null,
            "udf_string_3": null,
   }
          "udf_string_4": null ],
           "udf_string_56": null,
           "allowedudf_organisationalstring_units_set7": null,
          [
    "lot":
           {
   
               "community_namenumber": null"37",
                   "group_name"id": "Developers Group83219EA73671E800298CAC49DB1A3F58",
                   "namedescription": null,
   
               "idalternative_code": "C9E14991CDE10569F4680EDBC28C5BF1",TEST2"
           },
           "descriptionudf_string_8": null,

                  "alternative_code"id": null"D9308C6A7996E5E79B01BE60E5826128",
           "udf_date_1": null,
  }            ]"udf_date_2": null,
           "udf_stringdate_63": null,
           "udf_stringdate_74": null,
           "lotlog_information":
           {
               "numberupdated_date": "372014-08-21T12:45:54",
               "idcreated_by_unit":
  "83219EA73671E800298CAC49DB1A3F58",             {
  "description": null,                "alternativegroup_codename": "TEST2"null,
           },            "udf_string_8"name": "Admin nullUnit",
           "id": "D9308C6A7996E5E79B01BE60E5826128",            "udf_date_1"id": null"48305F8849E3C18B227C5BE3A27BA6DF",
           "udf_date_2": null,            "udf_date_3description": null"r1",
           "udf_date_4": null,       "alternative_code": "MG"
   "log_information":            {},
               "updatedcreated_date": "2014-08-21T12:4541:5431",
               "createdupdated_by_unit":
               {
                   "group_name": null,
                   "name": "Admin Unit",
                   "id": "48305F8849E3C18B227C5BE3A27BA6DF",
                   "description": "r1",
                   "alternative_code": "MG"
               },
               "created_date": "2014-08-21T12:41:31",
               "updated_by_unitby_user":
               {
                   "groupperson_name": null,
                   "name": "Admin Unit"MPAdministrator",
                   "idusername": "48305F8849E3C18B227C5BE3A27BA6DFMPAdministrator",
                   "descriptionid": "r11",
                   "alternative_codeemail": "MG"null
               },
               "createdupdated_by_user":
               {
                   "person_name": "MPAdministrator",
                   "username": "MPAdministrator",
                   "id": "1",
                   "email": null
               },
           },
   "updated_by_user":        "value": 12,
      {        "life_cycle_state": "ACTIVATED",
           "person_nametype": "MPAdministrator",
           {
               "usernamename": "MPAdministratorFixed Voucher Type",
                   "id": "13F1F84F4195B7804483B0C6823A90AD3",
               "alternative_code": "FVT"
      "email": null    },
           }"description": null,
            }"expiration_date": "2015-08-01T00:00:00",
           "valuealternative_code": 12,
  null
       },....
    ]
}    "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

...

 

 

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

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.

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
 

GET vouchers/get_available

This method returns a random list of activated vouchers, that are available to be used. The random selection is done based on the reservoir sampling algorithm. A list of vouchers is retrieved by each call.

Tip

Available from CRM.COM R5.0.0

Resource URL

Parameters

mandatory vouchers fieldsset

Name

Type

Description

token

String

The token retrieved from the login method

voucher

type_identifier
(

semi-optional)

Voucher type identifier

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:

Include Page
V4:voucher_type_identifier
V4:voucher_type_identifier

lot_identifier
(semi-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
 

GET vouchers/get_available

This method returns a random list of vouchers, that are available to be used. The random selection is done based on the reservoir sampling algorithm. A list of vouchers is retrieved by each call.

Tip

Available from CRM.COM R5.0.0

Resource URL

Parameters

The identifier of the voucher that should be returned as a result. The allowed vouchers vouchervoucher

Name

Type

Description

token

String

The token retrieved from the login method

voucher_identifier

(mandatory)

Voucher identifier

Lot identifier

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

Include Page
V4:lot_identifier
V4:lot_identifier

accounts_receivable_identifier

(optional)

Accounts Receivable Identifier

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:

Include Page
V4:accounts_receivable_identifier
V4:accounts_receivable_identifier

group_identifier

(optional)

Group Identifier

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:

Include Page
V4:group_identifier
V4:group_identifier

unit_identifier

(optional)

Unit Identifier

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:

Include Page
V4:

unit_identifier
V4:

unit_identifier

number

(mandatory)

NumberThe number of available vouchers that should be returned by this call

pool_size

(mandatory)

NumberThe number of vouchers that will be retrieved and used as a pool in order to generate the specified number of random vouchers.

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

...

  • 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

...

Include Page
V4:voucher_complete
V4:voucher_complete

Examples

Expand
titleExample 1

HTTP Method: GET

 

Request:

Response:

Code Block
themeConfluence
languagejs
linenumberstrue
 

...

Name

Type

Description

token

String

The token retrieved from the login method

secret_number

(mandatory)

String

The secret number of the voucher that will be used

accounts_receivable_identifier
(mandatory)

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

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

notes
(optional)

Notes Object

The notes for the payment to be created

...