Tip |
---|
Available from CRM.COM R16.12.0 |
Excerpt |
---|
This method is used to create a purchase customer event in a posted life cycle state |
Resource URL
...
Path Variables
N/A
Headers
Name | Type | Description | |
---|---|---|---|
tokenapi_key | String | The token retrieved from the login method | idapi key for API calls to ensure that the client is trusted
|
Body
Name | Type | Description | ||||||||||||||||||
id (optional) | String | The customer event unique Identifier (GUID)
| ||||||||||||||||||
contact_id (semi-optional) | String | The contact unique identifier (GUID) that the customer event is created for | classification_identifier (optional) | Customer Event Classification Identifier
| accounts_receivable_identifier (mandatory) | Accounts receivable Identifier | ||||||||||||||
Include Page | V4:accounts_receivable_identifier_post | V4:accounts_receivable_identifier_post |
---|
Tip |
---|
From CRM.COM R15.0.0, access_token_identifier is supported For releases prior CRM.COM R17.0.0, this field was semi-optional |
- If a contact has multiple accounts, then the purchase customer event will be created against the primary one
cim
(semi-optional)
The value for a single contact identification medium representing the customer event is created for
- Conditions: Either contact_id or cim must be specified
- Customer Identification Medium will be mapped to the Access Token Authentication Code
reference_number
(mandatory)
classification
(optional)
Name | Type | Description |
---|---|---|
id (semi-optional) | String | The ID of the customer event classification |
code (semi-optional) | String | The code of the customer event classification |
performed_by_business_unit_identifiercurrency_code
(semi-optional)
Tip |
---|
For releases prior CRM.COM R17.0.0, this attribute was mandatory From CRM.COM R17.0.0, this attribute will be set automatically if the performed_by_tap_identifier is specified Deprecated from CRM.COM R18.0.0 |
The
business unitcurrency code that
initiatedthe customer event
. The allowed identifier fields are the followingTip |
---|
Available from CRM.COM R18.0.0 |
performed_by_unit_identifier
(semi-optional)
is created against
- Mapped to previous intended_currency_identifier, but only the "code" attribute will be used for identification purposes
payment_medium_identifier
(optional)
The payment medium identifier with which the purchase customer event has been made (e.g. first credit card digits)
performed_on
(optional)
The date that the customer event was actually performed (in epoch format)
- If not specified, then the current date-time will be set
merchant_tap
(semi-optional)
The
unit's transaction acquiring point that initiated the customer event.merchant that captured the purchase customer event
- Conditions: At least merchant_tap or outlet_tap should be specified
The allowed identifier fields are the following
Tip |
---|
Available from CRM.COM R17.0.0 From CRM.COM R17.0.0, this attribute will be set automatically if the performed_by_unit_identifier is specified From CRM.COM R18.0.0, this attribute will be set automatically if the performed_by_business_unit_identifier is specified |
performed_on
(mandatory)
reference_number
(mandatory)
payment_medium_identifier
(optional)
The payment medium identifier with which the purchase customer event has been made (e.g. first credit card digits)
authorized_by_access_token_identifier
(optional)
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:
Tip |
---|
Available from CRM.COM R15.0.0 Deprecated from CRM.COM R18.0.0 |
currency_code
(optional)
The currency code that the customer event is created against (mapped to intended_currency_identifier)
Name | Type | Description |
---|---|---|
id (semi-optional) | String | The merchant identifier that captured the purchase customer event
|
code (semi-optional) | String | The merchant code that captured the purchase customer event
|
outlet_tap
(semi-optional)
The merchant's outlet that captured the purchase customer event
- Conditions: At least merchant_tap or outlet_tap should be specified. The outlet (business unit) should have the specified merchant as parent business unit
The allowed identifier fields are the following
Name | Type | Description |
---|---|---|
id (semi-optional) | String | The outlet identifier that captured the purchase customer event
|
code (semi-optional) | String | The outlet code that captured the purchase customer event
|
products
(mandatory)
The purchased items of this customer event
Name | Type | Description |
---|---|---|
product_sku (mandatory) |
String | The purchased product sku (code) | |
quantity (optional) | Number | The quantity of the specified purchase customer event product (defaults to 1, if not specified) |
net_amount (mandatory) | Number | The net amount of the specified purchase customer event product |
tax_amount (mandatory) | Number | The Tax amount of the specified purchase customer event product |
total_amount (mandatory) | Number | The total amount of the specified purchase customer event product |
spend_request
(optional)
Information related with the spend request that should be created as part of the purchase customer event
Name | Type | Description |
---|---|---|
amount (semi-optional) | Number | The amount in real currency that is requested to be spend |
alternative_amount (semi-optional) | Number | The amount in alternative currency that is requested to be spend |
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 purchase customer event identifier (GUID) |
Examples
Expand | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||
HTTP Method: POST Request Header
Body:
Response
|