Tip |
---|
Available from CRM.COM R4.0.0 |
Table of Contents | ||
---|---|---|
|
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 | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
HTTP Method: GET
Request: Response:
|
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:
...
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 | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
HTTP Method: GET
Request: Response:
|
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 | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
HTTP Method: GET
Request: Response:
|
POST vouchers/use
This method uses a voucher. Single voucher is used by each call
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:
...
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
...
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
...
title | Example 1 |
---|
HTTP Method: POST
Request:
Body
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token":"06A278ADF70A9571B39C63821E39F45A",
"secret_number":"58978583",
"accounts_receivable_identifier":{"id":"00F04DC1D3F923A15630751530EC1670"}
} |
Response:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"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
}
} |
...
title | Example 1 |
---|
HTTP Method: POST
Request:
Body
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"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 | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"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 | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
HTTP Method: GET
Request: Response:
|
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
Expand | ||||||
---|---|---|---|---|---|---|
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token":"FE9505133D414867A3B8C5DF14033CB6",
"secret_number":"7120250219333310"
} |
Response:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"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": ""
}
} |
title | Example 2 |
---|
HTTP Method: POST
Request:
Body
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"token":"FE9505133D414867A3B8C5DF14033CB6",
"secret_number":"247136",
"fields_set":"id,number,lot,value,extra_added_value,type,life_cycle_state,allowed_organisational_units_set"
} |
Response:
theme | Confluence |
---|---|
language | js |
linenumbers | true |
name | blue |
---|
Child pages (Children Display) | ||||
---|---|---|---|---|
|