Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Available from CRM.COM R9.0.0

Excerpt

This method is used to create a purchase customer event in a posted life cycle state, and a spend request customer event related with that purchase customer event. In case of an error none of the customer events is created

Resource URL

Parameters

...

Name

...

Type

...

Description

...

token

...

String

...

The token retrieved from the login method

...

accounts_receivable_identifier

(semi-optional)

...

The accounts receivable that will be related with both the purchase customer event and the spend request customer event that will be created. The allowed accounts receivable identifier fields are the following:

...

rewards_participant_identifier

(semi-optional)

...

performed_by_unit_identifier

(mandatory)

...

performed_on

(mandatory)

...

process_immediately

(optional)

...

Defines if the customer events should be processed immediately by various business processes or not

Tip

Deprecated from CRM.COM R15.0.0

...

external_system

(optional)

...

Defines the third party system that generates the customer event

Tip

Available from CRM.COM R10.0.0

...

intended_currency_identifier

(optional)

...

The currency that the user was intended to use for the customer event. If specified then it is validated against the currency of the related performed by unit (i.e. the default currency) and if they don't match then an error is throw. Note that the intended currency is not saved within CRM.COM; it is just used for validation purposes. The allowed currency identifier fields are the following:

...

Tip

Available from CRM.COM R11.0.0

...

purchase_customer_event

(mandatory)

...

spend_request_customer_event

(mandatory)

...

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:

...

themeConfluence
languagejavascript
linenumberstrue

...


Tip

Available from CRM.COM R9.0.0

Deprecate from CRM.COM R17.0.0


Excerpt

This method is used to create a purchase customer event in a posted life cycle state, and a spend request customer event related with that purchase customer event. In case of an error none of the customer events is created

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

accounts_receivable_identifier

(semi-optional)

Accounts receivable Identifier

The accounts receivable that will be related with both the purchase customer event and the spend request customer event that will be created. The allowed accounts receivable identifier fields are the following:

Include Page
V4:accounts_receivable_identifier_post
V4:accounts_receivable_identifier_post

Tip

From CRM.COM R15.0.0, access_token_identifier is supported


rewards_participant_identifier

(semi-optional)

Rewards Participant IdentifierThe rewards participant that will be related with both the purchase customer event and the spend request customer event that will be created. The allowed rewards participant identifier fields are the following:

Include Page
V4:rewards_participants_identifier_post
V4:rewards_participants_identifier_post

performed_by_unit_identifier

(mandatory)

Unit IdentifierThe unit that initiated both the purchase customer event and the spend request customer event that will be created. The allowed unit identifier fields are the following:

Include Page
V4:unit_identifier
V4:unit_identifier

performed_on

(mandatory)

DateThe date that both the purchase customer event and the spend request customer event that will be created were actually performed

process_immediately

(optional)

boolean

Defines if the customer events should be processed immediately by various business processes or not

Tip

Deprecated from CRM.COM R15.0.0


external_system

(optional)

String

Defines the third party system that generates the customer event

Tip

Available from CRM.COM R10.0.0


authorized_by_access_token_identifier

(optional)

Access Token Identifier

The access token that was used to identify and authorized the customer. This information will be overridden if the customer was identified via an access token through this Web API call. The allowed access token identifier fields are the following:

Include Page
V4:access_token_identifier
V4:access_token_identifier

Tip

Available from CRM.COM R15.0.0


intended_currency_identifier

(optional)

Currency Identifier

The currency that the user was intended to use for the customer event. If specified then it is validated against the currency of the related performed by unit (i.e. the default currency) and if they don't match then an error is throw. Note that the intended currency is not saved within CRM.COM; it is just used for validation purposes. The allowed currency identifier fields are the following:

Include Page
V4:currency_identifier
V4:currency_identifier

Tip

Available from CRM.COM R11.0.0


purchase_customer_event

(mandatory)

Purchase Customer Event ObjectInformation related with the purchase customer event to be created

spend_request_customer_event

(mandatory)

Spend Request Customer Event ObjectInformation related with the spend request that should be created. The spend request will automatically be related with the specified purchase customer event.

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

Tip

Available from CRM.COM R10.0.0


Anchor
create spend purchase customer event referred parameters
create spend purchase customer event referred parameters
Referred Parameter Objects

Include Page
V4:purchase_customer_event_create_spend_parameters
V4:purchase_customer_event_create_spend_parameters

Include Page
V4:spend_request_customer_event_create_spend_parameters
V4:spend_request_customer_event_create_spend_parameters

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:purchase_customer_event_create_spend_complete
V4:purchase_customer_event_create_spend_complete

Examples

Expand
titleExample 1

HTTP Method: POST


Request:

Body:

Code Block
languagejavascript
themeConfluence
linenumberstrue
{
    "token":"{{token}}",
    "accounts_receivable_identifier":{"number":"ACR001101"},
    "performed_by_unit_identifier":{"name":"Admin Unit"},
    "performed_on":"2016-06-22T15:00:00",
    "process_immediately":1,
    "purchase_customer_event":
    {
        "reference_number":"RF00002",
        "payment_medium_brand_identifier":{"id":"A01DB55EE5624E80ADA3CD7AF166AF30"},
        "payment_medium_type_identifier":{"alternative_code":"CC"},
        "payment_medium_identifier":"PI000003",
        "total_amount":88,
        "net_amount":80,
        "vat_amount":8,
        "products_set":
        [
            {
                "product_identifier":{"code":"Serendipity"},
                "total_amount":88,
                "net_amount":80,
                "vat_amount":8
            }
        ]
    },
    "spend_request_customer_event":
    {
        "product_identifier":{"name":"Spend Request Classification"}
    }
}


Response:

Code Block
languagejavascript
themeConfluence
linenumberstrue
 {
  "status": {
    "message": "",
    "description": "",
    "code": "OK"
  },
  "data": {
    "purchase_customer_event": {
      "award_reward_transactions_set": [],
      "classification": null,
      "number": "862",
      "payment_medium_type": {
        "id": "0EC912D6358341B4BAE55CFA70FE0F2D",
        "name": "Credit Card",
        "description": "Payment Medium Type 1: Credit Card",
        "alternative_code": "CC"
      },
      "performed_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"
      },
      "process_immediately": 1,
      "vat_amount": 8,
      "log_information": {
        "updated_date": "2016-06-22T16:18:25",
        "created_date": "2016-06-22T16:18:25",
        "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": "Marios Lannister",
          "username": "MPAdministrator",
          "id": "1",
          "email": "sakkascy1986@hotmail.com"
        },
        "updated_by_user": {
          "person_name": "Marios Lannister",
          "username": "MPAdministrator",
          "id": "1",
          "email": "sakkascy1986@hotmail.com"
        }
      },
      "total_amount": 88,
      "accounts_receivable": {
        "account_owner": {
          "last_name": "Ioannou212",
          "middle_name": null,
          "life_cycle_state": "FINANCIAL",
          "company_profile": null,
          "title": null,
          "first_name": "Marios",
          "type": "PERSON",
          "id": "028657D9E5E74F4EAAB25C9DD0EBB69C",
          "name": null,
          "company_name": null,
          "demographics": {
            "gender": null,
            "passport_issued_by_country": null,
            "social_security_number": null,
            "passport_number": null,
            "industry_sector": null,
            "country_of_residence": {
              "three_character_code": "CYP",
              "two_character_code": "CY",
              "id": "181",
              "name": "CYPRUS",
              "alternative_code": null
            },
            "name_day": {
              "month": null,
              "day": null
            },
            "date_of_birth": {
              "month": null,
              "day": null,
              "year": null
            },
            "id_number": null,
            "industry": null,
            "id_issued_by_country": null
          }
        },
        "life_cycle_state": "ACTIVE",
        "number": "ACR001101",
        "id": "0F0638457F2D4133BC6FAD1A4DBACF26",
        "name": "ACR001101"
      },
      "life_cycle_state": "POSTED",
      "payment_medium_brand": {
        "id": "A01DB55EE5624E80ADA3CD7AF166AF30",
        "name": "AMERICAN EXPRESS",
        "description": "Payment Medium Brand 2: American Express",
        "alternative_code": "AE"
      },
      "net_amount": 80,
      "payment_medium_identifier": "PI000003",
      "type": "PURCHASE",
      "id": "E295AE4AFA15410DBAF8B17E502785AD",
      "description": null,
      "reference_number": "RF00002",
      "performed_on": "2016-06-22T15:00:00"
    },
    "spend_request_customer_event": {
      "classification": null,
      "number": "105",
      "performed_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"
      },
      "process_immediately": 1,
      "spend_reward_transaction": null,
      "log_information": {
        "updated_date": "2016-06-22T16:18:25",
        "created_date": "2016-06-22T16:18:25",
        "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": "Marios Lannister",
          "username": "MPAdministrator",
          "id": "1",
          "email": "sakkascy1986@hotmail.com"
        },
        "updated_by_user": {
          "person_name": "Marios Lannister",
          "username": "MPAdministrator",
          "id": "1",
          "email": "sakkascy1986@hotmail.com"
        }
      },
      "life_cycle_state": "POSTED",
      "accounts_receivable": {
        "account_owner": {
          "last_name": "Ioannou212",
          "middle_name": null,
          "life_cycle_state": "FINANCIAL",
          "company_profile": null,
          "title": null,
          "first_name": "Marios",
          "type": "PERSON",
          "id": "028657D9E5E74F4EAAB25C9DD0EBB69C",
          "name": null,
          "company_name": null,
          "demographics": {
            "gender": null,
            "passport_issued_by_country": null,
            "social_security_number": null,
            "passport_number": null,
            "industry_sector": null,
            "country_of_residence": {
              "three_character_code": "CYP",
              "two_character_code": "CY",
              "id": "181",
              "name": "CYPRUS",
              "alternative_code": null
            },
            "name_day": {
              "month": null,
              "day": null
            },
            "date_of_birth": {
              "month": null,
              "day": null,
              "year": null
            },
            "productsid_setnumber": null,
        [    "industry": null,
       {     "id_issued_by_country": null
          "product_identifier":{"code":"Serendipity"},}
        },
        "totallife_cycle_amountstate":88,
       "ACTIVE",
        "number": "net_amountACR001101":80,
        "id": "0F0638457F2D4133BC6FAD1A4DBACF26",
        "vat_amountname":8 "ACR001101"
      },
    }  "spend_amount": null,
     ]   "type": "SPEND_REQUEST",
 },     "spend_request_customer_eventid": "27277BB77DCC44F28307419D57BAB750",
   {   "description": null,
      "productperformed_identifieron":{"name":"Spend Request Classification"}
  "2016-06-22T15:00:00"
    }
  }
}

Response:

Confluence
Code Block
theme



Expand
titleExample 2

HTTP Method: POST


Request:

Body:

Code Block
languagejavascript
themeConfluence
linenumberstrue
 {
  	"statustoken": {
    "message": "",
    "description": "",
    "code": "OK"
  },
  "data": {
    "{{token}}",
	"accounts_receivable_identifier":{"name":"0000000001 Eleni M"},
	"performed_by_unit_identifier":{"name":"Merchant A unit"},
	"performed_on":"2018-09-07T13:09:00",
	"process_immediately":1,
	"purchase_customer_event":
	{
      "award_reward_transactions_set": [],
      "classification": null,
      "number": "862",
      "payment_medium_type": {
        "id": "0EC912D6358341B4BAE55CFA70FE0F2D",	"disable_instant_spend":true,
		"reference_number":"RF00002",
		"total_amount":3,
		"net_amount":3,
		"vat_amount":0,
	  "products_set":
	   [
	     {
	         "name"product_identifier":{"code": "Credit CardSerendipity"},
  	      "descriptiontotal_amount":3,
"Payment Medium Type 1: Credit Card",
 			"net_amount":3,
			"vat_amount":0,
	       "alternative_codequantity":1
"CC"	       },
	   ]
	},
 	"performedspend_request_bycustomer_unitevent":
	{
        "community_		"product_identifier":{"name":"Spend "InternalRequest CommunityClassification",}
        "id": "48305F8849E3C18B227C5BE3A27BA6DF",
 	}
}


Response:

Code Block
languagejavascript
themeConfluence
linenumberstrue
 {
      "namedata": "Admin{
Unit",         "grouppurchase_customer_nameevent": "Main Group",{
            "descriptionlog_information": "r1 Test{
Description for resource  request tab.Test Description for resource  request tab.",
        "alternative_code"created_by_unit": "MG"
      },{
      "process_immediately": 1,       "vat_amount": 8,       "logalternative_informationcode": {"adminunit",
          "updated_date": "2016-06-22T16:18:25",         "createdgroup_datename": "2016-06-22T16:18:25Main Group",
        "created_by_unit": {           "community_name": "Internal Community",
          "id": "48305F8849E3C18B227C5BE3A27BA6DF",           "name": "Admin Unit",
 
        "group_name": "Main Group",           "description": "r1admin Testunit",
Description for resource  request tab.Test Description for resource  request tab.",           "alternative_codeid": "MG"1"
                },
                "updated_by_unit": {
                    "communityalternative_namecode": "Internal Communityadminunit",
          "id": "48305F8849E3C18B227C5BE3A27BA6DF",           "group_name": "AdminMain Unit",Group",
                    "groupcommunity_name": "Main GroupCommunity",
            "description        "name": "r1Admin TestUnit",
Description for resource  request tab.Test Description for resource  request tab.",           "alternative_codedescription": "MG"admin unit",
           },         "created_by_userid": {"1"
          "person_name": "Marios Lannister",      },
    "username": "MPAdministrator",            "idcreated_date": "12018-09-07T15:18:52",
          "email      "updated_date": "sakkascy1986@hotmail.com"2018-09-07T15:18:56",
        },         "updated_by_user": {
  
       "person_name": "Marios Lannister",           "usernameperson_name": "MPAdministrator",
          "id": "1CRM COM",
          "email": "sakkascy1986@hotmail.com"         }
"id": "1",
     },       "total_amount": 88,       "accounts_receivableemail": {"test@crm.com",
        "account_owner": {           "last_nameusername": "Ioannou212MPAdministrator",
          "middle_name": null,     },
     "life_cycle_state": "FINANCIAL",           "companycreated_by_profileuser": null,
 {
        "title": null,           "firstperson_name": "MariosCRM COM",
 
        "type": "PERSON",           "id": "028657D9E5E74F4EAAB25C9DD0EBB69C1",
          "name": null,           "company_nameemail": null,
  "test@crm.com",
       "demographics": {            "username": "genderMPAdministrator":
 null,             "passport_issued_by_country": null, }
           "social_security_number": null },
            "passportpayment_medium_numberbrand": null,
            "industry_sectordescription": null,
            "countryaccounts_of_residencereceivable": {
                "three_character_codenumber": "CYP0000000001",
                "two_character_codename": "CY0000000001 Eleni M",
                "id": "1818DDDA5F17D9641FC97A32FEAEE1F8AC6",
                "namelife_cycle_state": "CYPRUSACTIVE",
                "alternativeaccount_codeowner": null {
                    }"company_profile": null,
                    "company_name_day": { null,
                    "monthname": null,
                    "daylast_name": null"Mich",
            },        "id": "EE15F92F5AD9487692DA4DD34D35CA09",
   "date_of_birth": {                 "monthlife_cycle_state": null,"FINANCIAL",
                    "daymiddle_name": null,
              "year": null     "title": null,
       },             "id_numbertype": null"PERSON",

           "industry": null,             "id_issued_by_countryfirst_name": null"Eleni",
          }         }, "demographics": {
      "life_cycle_state": "ACTIVE",
        "number": "ACR001101",         "id_number": "0F0638457F2D4133BC6FAD1A4DBACF26451232",
        "name": "ACR001101"         },       "life_cycle_stategender": "POSTED"null,
      "payment_medium_brand": {         "id": "A01DB55EE5624E80ADA3CD7AF166AF30",         "namecountry_of_residence": {
   "AMERICAN EXPRESS",         "description": "Payment Medium Brand 2: American Express",         "alternative_code": "AEIRN",
      },              "net_amount": 80,       "paymentthree_mediumcharacter_identifiercode": "PI000003"null,
      "type": "PURCHASE",       "id": "E295AE4AFA15410DBAF8B17E502785AD",       "description": null,       "reference_numbername": "RF00002",IRAN (ISLAMIC    REPUBLIC OF)",
 "performed_on": "2016-06-22T15:00:00"     },     "spend_request_customer_event": {       "classification": null,       "numberid": "105231",
      "performed_by_unit": {           "community_name": "Internal Community",         "idtwo_character_code": "48305F8849E3C18B227C5BE3A27BA6DF",null
        "name": "Admin Unit",         "group_name": "Main Group",          },
 "description": "r1 Test Description for resource  request tab.Test Description for resource  request tab.",         "alternativedate_of_codebirth": "MG" {
             },       "process_immediately": 1,       "spend_reward_transactionmonth": null,
      "log_information": {           "updated_date": "2016-06-22T16:18:25",           "created_dateyear": "2016-06-22T16:18:25"null,
        "created_by_unit": {                    "community_nameday": "Internal Community",null
          "id": "48305F8849E3C18B227C5BE3A27BA6DF",           "name": "Admin Unit"},
          "group_name": "Main Group",              "descriptionindustry_sector": "r1null,
Test Description for resource  request tab.Test  Description for resource  request tab.",           "alternative_codeindustry": "MG" null,
               },         "updatedname_by_unitday": {
              "community_name": "Internal Community",              "idmonth": "48305F8849E3C18B227C5BE3A27BA6DF"5,
          "name": "Admin Unit",           "group_name": "Main Group",   "day": 21
      "description": "r1 Test Description for resource  request tab.Test Description for resource  request tab.",     },
     "alternative_code": "MG"         },         "createdpassport_number_byexpiration_userdate": null,
{           "person_name": "Marios Lannister",           "usernameid_number_expiration_date": "MPAdministrator"null,
          "id": "1",              "emailpassport_number": "sakkascy1986@hotmail.com"null,
        },         "updated_by_user": {           "personsocial_security_namenumber": "Marios Lannister",null,
            "username": "MPAdministrator",           "id_issued_by_country": "1"null,
          "email": "sakkascy1986@hotmail.com"         }       },"passport_issued_by_country": null
      "life_cycle_state": "POSTED",       "accounts_receivable": {     }
   "account_owner": {             "last_name": "Ioannou212",}
           "middle_name": null },
            "life_cycle_state": "FINANCIALPOSTED",
            "company_profiletype": null"PURCHASE",
            "titleclassification": null,
            "firstperformed_nameon": "Marios2018-09-07T13:09:00",
            "typereference_number": "PERSONRF00002",
            "idprocess_immediately": "028657D9E5E74F4EAAB25C9DD0EBB69C"true,
            "namenumber": null"1612",
            "companypayment_medium_nametype": null,
            "demographicspayment_medium_identifier": {null,
            "gendervat_amount": null0,
            "passportaward_issuedreward_bytransactions_countryset": null[],
            "socialtotal_security_numberamount": null3,
            "passportinstant_spend_numberrequest": null,
            "industrydisable_instant_sectorspend": nulltrue,
            "countryautomatic_ofspend_residencerequest": {
null,
             "three_character_codecurrency": "CYP",{
                "twosuffix_character_codesymbol": "CYN/A",
              "id  "prefix_symbol": "181",
                "decimal_part_name": "CYPRUScents",
                "alternative_code": null"EUR",
            },
            "name_day": {"integer_part_name": "euro",
                "monthid": null"2",
                "daylife_cycle_state": null"EFFECTIVE"
            },
            "date_of_birthid": {
              "monthCBA94D9893744161862EFE34006C26CB": null,
 
            "daynet_amount": null3,

             "yearperformed_by_unit": null{
            },    "alternative_code": "MRAU",
       "id_number": null,        "group_name": "Merchant ABCD",
  "industry": null,             "id_issued_by_countrycommunity_name": null"CommunityB",
          }      "name": "Merchant A }unit",
 
      "life_cycle_state": "ACTIVE",         "numberdescription": "ACR001101"null,
                "id": "0F0638457F2D4133BC6FAD1A4DBACF26",AB18F69E3CA84413BABEF07713D410CB"
            }
"name": "ACR001101"       },
        "spend_request_amountcustomer_event": null, {}
    },
    "typestatus": "SPEND_REQUEST", {
        "idcode": "27277BB77DCC44F28307419D57BAB750OK",
        "description": null"",
        "performed_onmessage": "2016-06-22T15:00:00"
    }   }
}