Introduction

You can interact with the C-MES API via HTTP requests from any programming language using any commonly used libraries. The API interface is free and available for all C-MES accounts. Payment is only made for the actual usage of services consumed, which is deducted from the prepaid amount according to the tariffs.

API link

https://api.c-mes.tech

API version

v1

Final link to the method

https://api.c-mes.tech/v1/{ method }

Authentication

API Keys

The C-MES API uses API keys for authentication. You can create API keys in your personal account after registering on the site. Each API key can be assigned to a project for subsequent request accounting and analysis. The number of API keys and Projects is unlimited.

Remember that your API key is secret! Do not share it with others or expose it in any client code (browsers, applications). Production requests should be routed through your own internal server, where your API key can be securely loaded from an environment variable or key management service.

All API requests must include your API key in the Authorization HTTP header as follows:

Authorization: Bearer $API_KEY

Example request

curl https://api.c-mes.tech/v1/info/balance \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \

Making requests

You can paste the command below into your terminal to execute your first API request. Make sure to replace $API_KEY with your secret API key.

curl https://api.c-mes.tech/v1/echo \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $API_KEY" \ -d '{ "Content": "info@c-mes.co.uk", "LanguageCode": "en", "Asynch": false }'

This request calls the echo method (/v1/echo). You should receive a response that looks similar to the following:

{ "RequestType": "POST", "ApiKey": "apikey-55*******************************91", "Content-Type": "application/json", "Method": "/v1/echo", "Content-Lenght": 88, "Status": "The request was successfully completed", "IP": "xxx.xxx.xxx.xxx", "RequestBody": "{ \"Content\": \"info@c-mes.co.uk\", \"LanguageCode\": \"en\", \"Asynch\": false }" }

Now that you have generated your first request, let's break down the response object. You will receive a JSON structure containing all the information you sent to the server. This allows you to verify the correct operation of your application using the C-MES API.

Company data (CompanyData object)

Represents the response of lead generation or enrichment returned by API methods based on the provided input data.

Returns:

  • CompanyName string

    The full legal name of the company as it appears in the analyzed transmitted materials.

  • LogoLink string

    Link to the company logo.

  • Address object
    • Country string

      Country.

    • State string

      State.

    • ZIP string

      Postal code.

    • City string

      City.

    • Street1 string

      Street and house number, office, etc.

    • Street2 string

      Address continuation.

  • Phones array of objects

    Phone numbers.

    • PhoneNumber string

      Phone number in international format: + Country code and telephone number.

    • Primary boolean

      True if it's the primary phone number of the company.

  • Emails array of objects

    Email addresses.

    • Email string

      E-mail address.

    • Primary boolean

      True if this is the primary company email address.

  • Webs array of objects

    The main website domain, without repetitions or 'http://' or 'https://'.

    • Host string

      Host name to a site page, not including http:// or https://.

    • Link string

      Link to a site page, not including http:// or https://.

  • Language string

    Language of communication of the company.

  • Contacts array of objects

    Contacts.

    • Name string

      Contact's first and last name.

    • JobPosition string

      Contact's job title.

    • Email string

      Contact's email.

    • Phone string

      Contact's phone number.

  • Business string

    Types of activity, services, goods, etc.

  • CompanySize string

    Assessment of the company size based on the information received.

  • Technologies array of strings

    Technologies on which the site is based.

  • Recommendations string

    Detailed recommendations for forming a commercial proposal for this customer.

  • EstimatedBudget numeric

    Estimate of the possible sales amount to this client in the next 12 months.

  • ProbabilityOfSuccess numeric

    Estimate in percentage of the probability of successfully concluding a contract.

  • AdditionalLinks array of objects

    Links found on the page, website.

    • Host string

      Host name to a site page, not including http:// or https://.

    • Link string

      Link to a site page, not including http:// or https://.

    • Description string

      Classify the link according to its contents.

  • SocialNetsLinks array of objects

    Links found on the page that lead to the company's pages on social networks.

    • Host string

      Host name to a site page, not including http:// or https://.

    • Link string

      Link to a site page, not including http:// or https://.

Enrichment

POST https://api.c-mes.tech/v1/enrichment

The enrichment method allows you to gather additional data about potential customer or supplier based on minimal information, such as an email address, company website, and email correspondence containing internet links to the company's site.

With its help, you can obtain comprehensive information about the company, including its industry, size, location, and contact details. This is very important, as enriched leads help better segment the audience, optimize marketing campaigns, and increase sales efficiency.

When providing information about the products and services you offer to the method, it can provide useful recommendations as well as assess the potential and likelihood of a deal. This enables your business to more accurately identify which leads hold the greatest value and focus on the most promising opportunities.

Request body:

  • Content string Required

    Any string data containing a link to the enriched lead. This can include a web link, email address, body of an email with the interested company's return email address, and so on.

  • CompanyName string Optional

    Specify this if you want to exclude mentioning these companies in lead enrichment results.

  • ProductsAndServices string Optional

    You can specify in this parameter the list and specifications of the products and services offered by your company for assessing the potential of the deal (probability, amount) and generating recommendations for further engagement with the company.

  • LanguageCode string Optional

    The language code in which the enrichment results should be presented. If the materials of the enriched lead are provided in another language, they will be translated into the specified language. The default is English (en).

  • Asynch boolean Optional

    Lead enrichment mode ('true' - asynchronous mode, 'false' - synchronous mode). In synchronous mode, the enrichment result is immediately returned to the client in the response, while in asynchronous mode, the client receives a request ID, which can later be used to obtain the result of the request execution or its completion percentage. It is recommended to use asynchronous mode if a long request execution time is anticipated. The default is 'false'.

Returns

The request returns a CompanyData object: a JSON structure with the company data obtained from the enrichment results.

Example request

curl https://api.c-mes.tech/v1/enrichment \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $API_KEY" \ -d '{ "Content": "info@c-mes.co.uk", "ProductsAndServices": "Our company provides ready-made solutions for Odoo ERP and 1C:ERP WE, \ implements them, makes modifications, and offers support. We also provide consulting services \ in the field of business management.", "LanguageCode": "en", "Asynch": false }'

Response (JSON) Asynch = false

{ "CompanyName": "C-MES Solutions Ltd.", "LogoLink": "https://c-mes.co.uk/assets/images/logotop.png", "Address": { "Country": "United Kingdom", "State": "England", "ZIP": "W1U6TU", "City": "London", "Street1": "120 Baker Street", "Street2": "" }, "Phones": [ { "PhoneNumber": "+44 208 068 4673", "Primary": true } ], "Emails": [ { "Email": "info@c-mes.co.uk", "Primary": true } ], "Webs": [ { "Host": "c-mes.co.uk", "Link": "/" } ], "Language": "en", "Contacts": [], "Business": "C-MES Solutions Ltd. develops, publishes, and provides integrated business tools and innovative know-how for ERP-class systems including Odoo ERP and 1C: ERP. They offer advanced enterprise and production management methodologies, ERP implementation, system adaptation, training, and ongoing support.", "CompanySize": "Medium-sized enterprise, possibly ranging from 50 to 200 employees.", "Technologies": [ "odoo", "1C:ERP" ], "Recommendations": "Focus on offering ERP solutions, production management software, and consulting services related to the integration of these systems. Highlight the unique customization and support services that c-mes can benefit from.", "EstimatedBudget": 50000, "ProbabilityOfSuccess": 70, "AdditionalLinks": [ { "Host": "c-mes.co.uk", "Link": "/about/", "Description": "About" }, { "Host": "c-mes.co.uk", "Link": "/contacts/", "Description": "Contacts" }, { "Host": "c-mes.co.uk", "Link": "/products/", "Description": "ProductsAndServices" }, { "Host": "c-mes.co.uk", "Link": "/industries/", "Description": "Etc" }, { "Host": "c-mes.co.uk", "Link": "/legal/", "Description": "Legal" } ], "SocialNetsLinks": [ { "Host": "facebook.com", "Link": "/profile.php?id=100064998730941" }, { "Host": "linkedin.com", "Link": "/company/104615881" }, { "Host": "instagram.com", "Link": "/cmessolutionsltd/" }, { "Host": "x.com", "Link": "/c_mes_solutions" } ] }

Response (JSON) Asynch = true

{ "ID" = "57bb5a9a-e115-4a0e-a15d-85527b82a344" }

Leadgeneration

POST https://api.c-mes.tech/v1/leadgeneration

The lead generation method is a process where your arbitrary queries are used to search for information about the companies of interest on the internet.

With this method, you can quickly gather data about potential clients, their products, services, and market activity.

Lead generation allows you to find companies that may be interested in your offerings, as well as analyze their needs and preferences. The leads are provided to the client in an enriched form after generation.

Request body:

  • Content string Required

    An arbitrary query, as if you were searching for companies on the internet through search engines. The more precise the query, the more complete and relevant the generated leads will be.

  • CompanyName string Optional

    Specify this if you want to exclude mentioning these companies in lead enrichment results.

  • ProductsAndServices string Optional

    You can specify in this parameter the list and specifications of the products and services offered by your company for assessing the potential of the deal (probability, amount) and generating recommendations for further engagement with the company.

  • MaxCount numeric Optional

    Limit on the maximum number of leads generated simultaneously. The default is 10.

  • LanguageCode string Optional

    The language code in which the enrichment results should be presented. If the materials of the enriched lead are provided in another language, they will be translated into the specified language. The default is English (en).

  • Asynch boolean Optional

    Lead generation mode ('true' - asynchronous mode, 'false' - synchronous mode). In synchronous mode, the enrichment result is immediately returned to the client in the response, while in asynchronous mode, the client receives a request ID, which can later be used to obtain the result of the request execution or its completion percentage. It is recommended to use asynchronous mode if a long request execution time is anticipated. The default is 'true'.

Returns

The request returns an array of CompanyData objects: a JSON structure with the company data obtained from the generated and enrichment results.

Example request

curl https://api.c-mes.tech/v1/leadgeneration \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $API_KEY" \ -d '{ "Content": "Pipe manufacturers, USA", "ProductsAndServices": "Our company provides ready-made solutions for Odoo ERP and 1C:ERP WE, \ implements them, makes modifications, and offers support. We also provide consulting services \ in the field of business management.", "MaxCount": 10, "LanguageCode": "en", "Asynch": true }'

Response (JSON) Asynch = false

[ { "CompanyName": "CompanyName 1", "LogoLink": ".................", "Address": { "Country": "........", "State": "........", "ZIP": "....", "City": "......", "Street1": "", "Street2": "" }, ---------------------------------------- "EstimatedBudget": 50000, "ProbabilityOfSuccess": 60 } { "CompanyName": "CompanyName 2", "LogoLink": ".................", "Address": { "Country": "........", "State": "........", "ZIP": "....", "City": "......", "Street1": "", "Street2": "" }, ---------------------------------------- { "CompanyName": "CompanyName 3", "LogoLink": ".................", "Address": { "Country": "........", "State": "........", "ZIP": "....", "City": "......", "Street1": "", "Street2": "" }, ---------------------------------------- MaxCount ---------------------------------------- ]

Response (JSON) Asynch = true

{ "ID" = "57bb5a9a-e115-4a0e-a15d-85527b82a344" }

Getresult

POST https://api.c-mes.tech/v1/getresult

Returns the result of the previously sent request or the current % of completion.

Request body:

  • ID string Required

    A unique request identifier previously returned by methods using asynchronous call mode.

Returns

Returns a JSON object - the result of the previously sent request or the current % of completion.

Example request

curl https://api.c-mes.tech/v1/leadgeneration \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $API_KEY" \ -d '{ "ID" = "57bb5a9a-e115-4a0e-a15d-85527b82a344" }'

Response (JSON)

[ { "CompanyName": "CompanyName 1", "LogoLink": ".................", "Address": { "Country": "........", "State": "........", "ZIP": "....", "City": "......", "Street1": "", "Street2": "" }, ---------------------------------------- "EstimatedBudget": 50000, "ProbabilityOfSuccess": 60 } { "CompanyName": "CompanyName 2", "LogoLink": ".................", "Address": { "Country": "........", "State": "........", "ZIP": "....", "City": "......", "Street1": "", "Street2": "" }, ---------------------------------------- { "CompanyName": "CompanyName 3", "LogoLink": ".................", "Address": { "Country": "........", "State": "........", "ZIP": "....", "City": "......", "Street1": "", "Street2": "" }, ---------------------------------------- MaxCount ---------------------------------------- ]

Response (JSON)

{ "Status" = "Request in processing", "Progress" = 85 }

Balance

GET https://api.c-mes.tech/v1/info/balance

Returns the current balance of the account.

Returns

Returns a JSON object:

  • Balance numeric Required

    Current balance amount.

  • Currency string Required

    Balance currency.

Example request

curl https://api.c-mes.tech/v1/info/balance \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $API_KEY" \

Response (JSON)

{ "Balance" = 25, "Currency" = "GBP" }

Statistics

POST https://api.c-mes.tech/v1/info/statistics

Returns API usage statistics in various dimensions for the specified period.

Request body:

  • Start date Required

    Start date of the selection in ISO format.

  • End date Required

    End date of the selection in ISO format.

  • Type string Optional

    Grouping option: "Project", "Service". If the value is not specified or the value is "All," it returns all data - project, service, api_key.

  • Period string Optional

    Grouping option: "Day", "Month". If the value is not specified or the value is "All," it returns all records without grouping.

Returns

Returns a JSON object containing an array of records, each corresponding to one group of values:

  • Period date Required

    Period of resource consumption records. If the grouping is "Day," it contains the start date of the day of consumption; if "Month," it contains the start date of the month of consumption. If "All," it contains the date and time of the request.

  • Sum numeric Required

    Total resource consumption for the selected period.

  • Currency string Required

    Currency.

  • Service string Optional

    Name of the service, in case the grouping is set to "Service" or "All."

  • Project string Optional

    Name of the project, in case the grouping is set to "Project" or "All."

  • ApiKey string Optional

    Name of the ApiKey, in case the grouping is set to "All."

Example request

curl https://api.c-mes.tech/v1/info/statistics \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $API_KEY" \ -d '{ "start":"2024-11-01T17:04:56.094Z", "end":"2024-11-30T17:04:56.094Z", "type":"service", "period":"day" }'

Response (JSON)

[ { "Period": "2024-11-05T00:00:00", "Sum": 0.6, "Currency": "GBP", "Service": "/v1/enrichment" } ]

Tariffs

GET https://api.c-mes.tech/v1/info/tariffs

Returns an array of current rates in currencies GBP, EUR, USD. Authentication is not required.

Returns

Returns a JSON object containing an array of records:

  • Method string Required

    Name of the service.

  • Description string Required

    Service description.

  • PriceRules string Required

    Pricing rules, cost determination.

  • PriceGBP numeric Required

    Base price in GBP. The rate in other currencies is calculated based on it according to the current exchange rates in the system.

  • PriceEUR numeric Required

    Price in Euros.

  • PriceUSD numeric Required

    Price in Dollars.

Example request

curl https://api.c-mes.tech/v1/info/tariffs \ -H "Content-Type: application/json" \

Response (JSON)

[ { "Method": "/v1/leadgeneration", "Description": "Price per generated lead", "PriceRules" : "", "PriceGBP": 0.1, "PriceEUR": 1.196988, "PriceUSD": 1.340148 }, { "Method": "/v1/enrichment", "Description": "Price per successfully enriched lead", "PriceRules" : "", "PriceGBP": 0.1, "PriceEUR": 1.196988, "PriceUSD": 1.340148 } ]

Echo

POST https://api.c-mes.tech/v1/echo
GET https://api.c-mes.tech/v1/echo

Method for testing requests and checking the API functionality.

Request body: Any data.

Returns

Returns a JSON object:

  • RequestType string Required

    Type of the transmitted request.

  • ApiKey string Required

    API key used for authorization.

  • Content-Type string Required

    Value of Content-Type sent in the request header.

  • Content-Lenght numeric Required

    Length of the request body.

  • Method string Required

    Called request method.

  • Status string Required

    The request was successfully completed

  • IP string Required

    Client IP.

  • RequestBody string Required

    Request body sent to the server.

Example request

curl https://api.c-mes.tech/v1/echo \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $API_KEY" \ -d '{ "start":"2024-11-01T17:04:56.094Z", "end":"2024-11-30T17:04:56.094Z", "type":"service", "period":"day" }'

Response (JSON)

{ "RequestType": "POST", "ApiKey": "apikey-5*****************91", "Content-Type": "application/json", "Method": "/v1/echo", "Content-Lenght": 131, "Status": "The request was successfully completed", "IP": "xxx.xxx.xxx.xxx", "RequestBody": "{\r\n \"start\": \"2024-11-01T17:04:56.094Z\",\r\n \"end\": \"2024-11-30T17:04:56.094Z\",\r\n \"type\": \"service\",\r\n \"period\": \"day\"\r\n}" }

Server response codes

Code Description
200 OK
202 The request has been accepted, but its processing has not yet been completed
401 Authorization error
402 Not enough money
403 API Key is not valid
405 Error in request
500 Internal Server Error