Download the PHP package smarkio/smarkio-supplier-api-client without Composer

On this page you can find all versions of the php package smarkio/smarkio-supplier-api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package smarkio-supplier-api-client

Smarkio Supplier - API

=========================

An accelerator to communicate with © Smarkio API to create Leads

Installation and usage with Composer

Add the following to your composer.json file in order to fetch the latest stable version of the project:

Then, in order to use the accelerator on your own PHP file, add the following:

Contents

Before you start

You need to obtain one API token to use the API. This token is bound to each user of the Smarkio system details.

Usage

Send a Lead

Send a Lead with Files associated

Send a Lead with additional fields

Force new Lead creation

If you want to force the creation of a new Lead, bypassing the conditions that would update an existing one, use the method setForceNewLeadCreation():

Dump lead Info

If you want to receive lead info on response, use the method setDumpLeadInfo():

In this case, the $response will contain a new field called lead_info.

User custom API URL

European API URL (Default):

or

Brazilian API URL:
Custom API URL:

Response format

The response is a JSON containing at least a 'code' and 'message' fields. The code 200 indicates that the lead was integrated successfully.

Fields available

The following lead fields are available:

Parameter name Max size Properties Description / Values
lead[external_id] Varchar(48) Mandatory Identifier of the lead in the supplier system
lead[campaign_external_id] Varchar(48) Mandatory Identifier of the campaign in the supplier system. This will then be mapped to the client campaign in LeadOffice.
lead[df_uid] Varchar(255) Mandatory Digital Fingerprint unique identifier.
lead[ip_address] Varchar(48) Mandatory IP Address of the client when registered the lead.
lead[payout] Decimal(20) Optional The cost that is charged by the supplier to the client for this lead[creation_at] Datetime Optional The moment where the lead was created
lead[title] Optional-closed One of the following:Miss , Mrs. , Mr.
lead[gender] Optional-closed One of the following: M, F
lead[first_name] Varchar(255) Optional First Name
lead[last_name] Varchar(255) Optional Last Name
lead[email] Varchar(255) Mandatory E-mail address
lead[phone] Varchar(20) Optional Phone Number
lead[birth_date] Date Optional Date of birth. Format:YYYY-MM-DD
lead[age] Int (3) Optional Age when lead was generated
lead[address] Varchar(255) Optional Postal address
lead[city] Varchar(255) Optional City
lead[zip_code] Varchar(31) Optional Zip Code
lead[identification_number1] Int Optional Number of document to identify the Lead
lead[identification_number2] Int Optional Number of document to identify the Lead
lead[domain] Varchar(255) Optional Website domain where lead was generated
lead[integration_response] Varchar(4096) Optional The response provided by the client when lead was integrated with client. Useful to include the rejection reason when lead was rejected.
lead[user_agent] Varchar(255) Optional HTTP_USER_AGENT of the browser the user has used when lead was captured
lead[browser_language] Varchar(40) Optional The main/default language of the browser.Can be obtained from HTTP_ACCEPT_LANGUAGE
lead[browser_name] Varchar(40) Optional The name of the browser.
lead[browser_version] Varchar(40) Optional The version of the browser
lead[operating_system] Varchar(40) Optional
lead[operating_system_full_name] Varchar(40) Optional
lead[is_mobile] Varchar(40) Optional
lead[device_type] Varchar(40) Optional
lead[source] Varchar(40) Optional
lead[source_reference] Varchar(40) Optional
lead[site_hash] Varchar(255) Optional
lead[utm_source] Varchar(255) Optional Campaign source
lead[utm_campaign] Varchar(255) Optional Campaign name
lead[utm_medium] Varchar(255) Optional Campaign medium
lead[utm_content] Varchar(255) Optional Campaign content
lead[utm_term] Varchar(255) Optional Campaign term
lead[click_uid] Varchar(255) Optional Click' unique ID
lead[smkid] Varchar(255) Optional
lead[rt_parent_cuid] Varchar(255) Optional
lead[rt_list_id] Varchar(255) Optional
lead[rt_list_name] Varchar(255) Optional
lead[rt_list_external_id] Varchar(255) Optional
lead[smk_category] Varchar(255) Optional
lead[smk_subcategory] Varchar(255) Optional
lead[smk_create_new] Int Optional Use the value '1' to force the creation of a new lead
lead[smk_dump_lead_info] Int Optional Use the value '1' to receive lead info on response
lead[geo_country] Varchar(50) Optional Country name
lead[geo_country_code] Varchar(10) Optional Country Code, according to ISO 3166
lead[geo_region] Varchar(50) Optional Region name
lead[geo_region_code] Varchar(10) Optional Region code - This should come in a format "country_code"-"region_code", for instance PT-13 (Porto, Portugal)
lead[geo_city] Varchar(50) Optional City name
lead[files][filename] string Optional Values in this field will be uploaded and attached as files related to lead

Extra parameters can be sent via:

Parameter name Max size Properties Description / Values
extra[field_name] Varchar(255) Optional extra field and value.

Processing flags (NOTE: if both lead field and flag with same name are filled, lead field will have precedence):

Parameter name Max size Properties Description / Values
flag[smk_update_different_campaign] Int Optional Use the value '1' to force the creation of a new lead
flag[smk_create_new] Int Optional Use the value '1' to force the creation of a new lead
flag[smk_dump_lead_info] Int Optional Use the value '1' to receive lead info on response

All versions of smarkio-supplier-api-client with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package smarkio/smarkio-supplier-api-client contains the following files

Loading the files please wait ...