Leads

Get Lead

get

Retrieve information about your leads.

Path parameters
LeadCodestringRequired

Unique code which represents an existing lead

Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

Get Lead

application/json
LeadCodestringOptionalExample: TFTF76455ee4YFCFCT6545465
GeneratedFromstringOptionalExample: API
CartIdstringOptionalExample: tstsetststs45453
CurrencystringOptionalExample: USD
LanguagestringOptionalExample: EN
ExternalReferencestringOptionalExample: REST_API_AVANGTE
MachineIdstringOptionalExample: 123
LocalTimestringOptionalExample: 2018-02-08 11:32:02
get
/leads/{LeadCode}
200

Get Lead

Update a Lead

put

Be aware that when updating a lead, all the existing data for that lead will be overwritten with the provided parameters.

Path parameters
LeadCodestringRequired

Lead's code

Example: FD86FD98
Query parameters
CartIdstringOptional

Id of the cart

Example: du8945jgd
GeneratedFromstringOptional

Source

Example: du8945jgd
CurrencystringRequired

Currency

Example: EUR
LanguagestringOptional

Lead's language

Example: EN
ExternalReferencestringOptional

Vendor's reference

Example: REST_API_AVANGTE
MachineIdstringOptional

Machine id

Example: 7df4s
FollowedUpbooleanOptional

Followed up

Example: false
LocalTimestringOptional

Local time

Example: 2019-01-08 11:46:12
Itemsobject[]Required

Purchased products

Example: [{"Code":"my_subscription_1","Quantity":"1","SKU":"df1","IsDynamic":false,"Tangible":false,"PurchaseType":"","Name":"asd","Description":"asd","PriceOptions":[{"Name":"sdfsd","Options":[{"Name":"fsdfsdf","Value":"fsdfsdf","Surcharge":10.36}]}],"RecurringOptions":{"CycleLength":23,"CycleUnit":"m","CycleAmount":23,"ContractLength":23,"ContractUnit":"m"},"MarketingCampaigns":{"Type":23,"ParentCode":"m","CampaignCode":23},"Price":{"Amount":23,"Type":"m"},"AdditionalFields":[{"Code":"f","Text":"m","Value":"m"}],"SubscriptionStartDate":"e","Trial":{"Period":2,"GrossPrice":5,"VAT":0.83,"NetPrice":4.17}}]
BillingDetailsobjectRequired

Billing details

Example: {"FirstName":"Customer","LastName":"Avangate","FiscalCode":"32423423","Email":"[email protected]","Address1":"Test Address","City":"LA","Zip":"12345","CountryCode":"us","State":"CA"}
DeliveryDetailsobjectOptional

Delivery details

Example: {"FirstName":"Customer","LastName":"Avangate","FiscalCode":"32423423","Email":"[email protected]","Address1":"Test Address","City":"LA","Zip":"12345","CountryCode":"us","State":"CA"}
DeliveryInformationobjectOptional

Delivery informations

Example: {"ShippingMethod":{"Code":"sdfsd"}}
PaymentDetailsobjectOptional

Details about payment

Example: {"Type":"CC","Currency":"EUR","RecurringEnabled":true,"PaymentMethod":{"CardPayment":{"InstallmentsNumber":32}},"CustomerIP":"1.2.3.4"}
Promotionsstring[]Optional

Promotion codes

Example: ["FJ34JK9","OIU546KH0"]
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

Add lead

application/json
put
/leads/{LeadCode}
200

Add lead

Search Leads

get
Query parameters
LeadCodestring[]Optional

Unique code which represents an existing lead

Example: ["FJE349FG"]
EmailstringOptional

Shopper's email address

Example: [email protected]
TypestringOptional

Lead type

Example: Used
StartDatestringOptional

Start date

Example: 2018-01-02
EndDatestringOptional

End date

Example: 2019-01-02
ProductCodestring[]Optional

Product code. This can be a string and contain only one code or an array with multiple codes

Example: ["653465fYVYR"]
LanguagestringOptional

Shopper cart language code

Example: FR
CountrystringOptional

Shopper billing country code

Example: BG
GeneratedFromstringOptional

Source of the generated Lead

Example: API
PageintegerOptional

Page number

Example: 2
LimitintegerOptional

Number of results on a page

Example: 25
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

Get Lead

application/json
get
/leads
200

Get Lead

Add Leads for catalog products

post
Query parameters
LeadCodestringOptional

Lead's code

Example: FD86FD98
CartIdstringOptional

Id of the cart

Example: du8945jgd
CurrencystringRequired

Currency

Example: EUR
LanguagestringOptional

Lead's language

Example: EN
ExternalReferencestringOptional

Vendor's reference

Example: REST_API_AVANGTE
SourcestringOptional

Lead's source

Example: testAPI.com
CustomerReferencestringOptional

Customer reference

Example: asdf1
MachineIdintegerOptional

Machine id

Example: 132
LocalTimestringOptional

Local time

Example: 2019-01-08 11:46:12
Itemsobject[]Required

Purchased products

Example: [{"Code":"my_subscription_1","Quantity":"1","SKU":"df1","IsDynamic":false,"Tangible":false,"PurchaseType":"","Name":"asd","Description":"asd","PriceOptions":[{"Name":"sdfsd","Options":[{"Name":"fsdfsdf","Value":"fsdfsdf","Surcharge":10.36}]}],"RecurringOptions":{"CycleLength":23,"CycleUnit":"m","CycleAmount":23,"ContractLength":23,"ContractUnit":"m"},"MarketingCampaigns":{"Type":23,"ParentCode":"m","CampaignCode":23},"Price":{"Amount":23,"Type":"m"},"AdditionalFields":[{"Code":"f","Text":"m","Value":"m"}],"SubscriptionStartDate":"e","Trial":{"Period":2,"GrossPrice":5,"VAT":0.83,"NetPrice":4.17}}]
BillingDetailsobjectRequired

Billing details

Example: {"FirstName":"Customer","LastName":"Avangate","FiscalCode":"32423423","Email":"[email protected]","Address1":"Test Address","City":"LA","Zip":"12345","CountryCode":"us","State":"CA"}
DeliveryDetailsobjectOptional

Delivery details

Example: {"FirstName":"Customer","LastName":"Avangate","FiscalCode":"32423423","Email":"[email protected]","Address1":"Test Address","City":"LA","Zip":"12345","CountryCode":"us","State":"CA"}
DeliveryInformationobjectOptional

Delivery informations

Example: {"ShippingMethod":{"Code":"sdfsd"}}
PaymentDetailsobjectOptional

Details about payment

Example: {"Type":"CC","Currency":"EUR","RecurringEnabled":true,"PaymentMethod":{"CardPayment":{"InstallmentsNumber":32}},"CustomerIP":"1.2.3.4"}
Promotionsstring[]Optional

Promotion codes

Example: ["FJ34JK9","OIU546KH0"]
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

Add lead

application/json
post
/leads
200

Add lead

Mark leads as used and stop follow-ups

put
Query parameters
Array of objectsobject[]Required

Array of objects

Example: [{"LeadCode":"FD454FDG","Used":false,"StopFollowups":true},{"LeadCode":"JI143FYU","Used":false,"StopFollowups":true}]
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

Mark Leads Response

application/json
ResponsestringOptionalExample: 4 leads have been marked successfully
put
/leads
200

Mark Leads Response

Last updated

Was this helpful?