image
send
API
webservice
Studio_Creatio
8.0
Hello. 
Hello.

I need to send an image through an API to convert it to base 64, I tried to do it using the Web service tool but it does not allow me to place an image or file field to use it from the bpm, I was looking for some information and I saw that it could be done using a script, I just haven't found a way to do it. Could you help me with some example or idea so I can do this please?

 

 

 

Like 0

Like

1 comments

Hello Laura, 

 

Please refer to this article for more detailed information about such functionality.  

Also, similar questions have already been discussed in the below posts, please review them for the detailed information:

https://community.creatio.com/questions/there-option-send-image-file-re…

https://community.creatio.com/questions/file-type-request-parameter-res…

Please inform us in case of any questions!

Best regards,

Anastasiia

Show all comments
API
authentication
webservice
Sales_Creatio_enterprise_edition
8.0

Hi community!

 

I have to integrate with a third-party tool that cannot send a request to the auth service and handle the cookies correctly.

 

Is there another method similar to webhooks using an API key in the URL or in the data itself?

 

Thanks in advance,

Robert

Like 1

Like

1 comments

Greetings, 

 

Possibly only through Oauth. 



Link to documentation: https://academy.creatio.com/docs/user/on_site_deployment/deployment_add…;



Best regards, 

Okrhan

Show all comments
RESTAPI
API
crm
Studio_Creatio

We are trying to integrate our service with Creatio CRM and one of our needs is adding custom fields to such entities as Lead, Contact, Order after getting an access token to customer's CRM account

 

Is there any possibility to use Creatio Rest API to add such fields? 

If yes, I would be glad to get an example of such request

 

Thank you

Like 0

Like

0 comments
Show all comments
API
oData
Studio_Creatio_enterprise_edition
8.0

Hi,

We need to integrate 3rd party web application with Creatio DataBase using OData4.

Our question is:

How many concurrent connections with the same Creatio user does Creatio system support?

 

Is it OK to set "ApiUser" Creatio user, and use this user to interact with Creatio with LOTS of concurrent  API requests to  Creatio?

 

Thanks,

Eran.

 

Like 0

Like

1 comments

Good day,

 

Sadly, we do not have exact specifications and limits on the number of connections to Creatio.

You should only be limited by the specs of your Redis server that will have to process those connections.

 

We would additionally recommend you use a header of ForceUseSession: true.

Using a system user through whom you will pass the API request should also work fine.

 

Thank you.

Show all comments
API
webservice
minipage
Studio_Creatio
8.0

I want to build an 'add' client wizard for our customer service to make it easy for them and also to prevent mistakes.

 

The first step would be to insert zipcode and housenumber, then it will make an API call to see how many adresses match these two parameter. 

 

The list that is returned, if the list is > 1 it should show you the information from the array and make you able to choose 1 of the options. 

 

If the list is 1 it should automatically pick the only available option.

 

I understand how to create the business process but combining this with a user interface is still difficult for me, is this even possible? 

Like 1

Like

3 comments

Hi, take a look at this article, I believe that there you can find a piece of useful information. It is written for the Freedom UI page, however, in earlier versions, you can just use XMLHttpRequest for sending the request, wait for a response, and process it.

The link somehow is broken now.

Pascal,

Here you are - link

Show all comments
oData
json
API
Collections
Sales_Creatio
8.0

Hi Team,

We want to retrieve a specific record by Id along with all the related elements (eg - Retrieve Account A with all of its related Contacts). 

What we already know:

We can retrieve the account record itself along with related records that are linked with lookupfields, like the PrimaryContact

 

Account(0001111-1111-1111-1111-111111231123)?$expand=PrimaryContact($select=Name)

This works, but it returns only one contact, the primary one.

 

Instead, we need an embedded list of contacts, like

{
    "@odata.context": myurl.creatio.com/0/odata/$metadata#Account(PrimaryContact(Name))/$entity,
    "Id": "22222-222222-2222-222222-22222207ba6",
    "Name": "somename",
    "OwnerId": "111111-11111-11111-11111-1111111",
    "CreatedOn": "2022-11-16T21:11:57.214167Z",
    "Contacts“ : [
{object}, {object}
]
}

Given the first URL in the response, we expected that all NavigationProperties would behave the same:

But this collection:

Is not accessible. If we call for :

Account(0002204c-d255-46c0-bea6-0f32e2e07ba6)?$expand=ContactCollectionByAccount

 

We get this error in return:

{
    "error": {
        "code": "",
        "message": "An error has occurred."
    }
}

If we use other expand values, we retrieve meaningful errors like „Could not find a property named xy“, but this error is not self explaining. How can we return an object with an embedded list of children? I know that in this example we also could ask for a list of Contacts filtered by their account, but we cannot do that in all scenarios we have in mind.

Thank you

Petrika

Like 3

Like

1 comments

Hello Petrika,

 

This property cannot be used to retrieve all contacts related to the account and can be used in filtration only. To retrieve related contacts you need to perform the GET query to the Contact object with the correspondent AccountId filter. Using this approach you will be able to get contacts needed.

Show all comments
web service
API
404
Sales_Creatio
8.0

Hello team,

I have exposed an endpoint, but keep recieveing the 404 (Endpoint not found) when i call it from postman.

I have followed: https://academy.creatio.com/docs/developer/getting_started/develop_appl…

Is there any other prior configurations that need to be done in order to recieve a status 200?

Thank you

Sasori

Like 0

Like

3 comments
Best reply

Hello,

 

404 error means that there is no issue with the authorization or with the request type (GET\POST etc), it means that the endpoint you are calling doesn't exist (either because the link is not valid or because there is nothing behind this link). Also please try configuring the service as it's described here.

PS:

I am able to login. I recieve a status 200 when calling 

ServiceModel/AuthService.svc/Login.

I copy the generated BPMCSRF and place it to the Headers of the Custom web-service. But i keep recieving status 404

Hello,

 

404 error means that there is no issue with the authorization or with the request type (GET\POST etc), it means that the endpoint you are calling doesn't exist (either because the link is not valid or because there is nothing behind this link). Also please try configuring the service as it's described here.

Thank you for you advice Oleg. Issue was resolved

Show all comments
cookie
API
Sales_Creatio_enterprise_edition
8.0

Hey all, 

 

Does anyone know how long a cookie auth token is valid for, and is it best practice to call and create another one for each call to the API? 

 

Also, is there anyway to request an Auth Token without having to use an email and password? It doesn't seem so safe to share this information with 3rd party systems (in my case, Make.com). 

 

Thanks!

Like 0

Like

1 comments

Hello,

 

The validity of Cookie Auth depends on the user session.

This information can be found in the "User session timeout" system setting.

Show all comments

Hi, I am working on a product. I made a postman collection for Creatio. Everything works fine inside postman. I am successfully creating leads using the API. Now I am creating a PHP script with the same procedure. After authentication, I am getting the BMPCSRF token in Curl headers. When I try to create a lead, or contact using the updated BMPCSRF token, I am getting "400 bad request" error. I am passing all the required parameters in CURL headers. This is the CURL request.

$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://'.  $creatioUrl .'.creatio.com/0/odata/Lead',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>json_encode($data->data),
  CURLOPT_HTTPHEADER => array(
    'ForceUseSession: true',
    'BPMCSRF: '.$arr['BPMCSRF'],
    'Content-Type: application/json',
    'Content-Length: 0'
  ),
));
$response = curl_exec($curl);
curl_close($curl);

Kindly guide me on what I am doing wrong here because nothing is working after the Authentication.

Like 0

Like

4 comments

I assume since this is a POST that this is attempting to add a lead, correct? 

Can you show what the data you're posting looks like? Any Lookup fields would be "LookupNameId" (not just "LookupName"). Also be sure you're including any required fields etc.

Also, maybe try including the Accept header with value "application/json"?

Ryan Farley,

Hi, thanks for the response. Yes, I am using POST to submit a lead. I am sending this data:

{
        "Account": "Awais Khalid",
        "Contact": "Test User",
        "FullJobTitle": "Developer",
        "Email": "testuser1@gmail.com",
        "MobilePhone": "9230068367253",
        "LeadName": "Need for our products / Alexander Wilson, Alpha Business"
    }

I also added the accept header, but getting same error:

400 Bad request - Your browser sent an invalid request.

Here is my PHP code: 

 

$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://'.  $creatioUrl .'.creatio.com/0/odata/Lead',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => json_encode($data->data),
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Accept: application/json',
    'Content-Length: 0',
    'ForceUseSession: true',
    'BPMCSRF: '.$arr['BPMCSRF']
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

I am running this script through postman. This is the payload:

 

I am successfully getting the BPMCSRF token after authentication. But Leads API is not working. I will appreciate your response. Thanks

Awais,

There must be something else wrong with the code. I took your exact same payload and posted it and I can create a lead. I'm just doing it though Postman. 

Headers: 

Body:

Result:

 

I usually bring over the cookies from the auth request as well, not just the BPMCSRF header.

 

Ryan

Hi @Awais, did you ever figure out what was wrong with this code?  We are having a similar issue.

Show all comments
API
integration

Can Creatio send data to API?

like two-way integration?

get data from API and store it in Creatio then send the data to another API?

 

thanks.

Like 0

Like

1 comments

Hello,



You can do that by adding the desired web services in the "Web services" section in the system settings. Then you can create a business process that will call those API, receive the information from them, store it in the system creating new records (You can create a new object and store the information inside, which will be basically storing information inside an SQL table) ,  or just keep it as parameters inside the same business process, and then send it again to another web service. 



I would suggest you reading our academy instructions regarding business processes and web services to understand how you can combine them:

https://academy.creatio.com/docs/8-0/user/bpm_tools/business_process_se…

https://academy.creatio.com/docs/user/customization_tools/web_services/…

Here is an example of implementation:

https://community.creatio.com/questions/call-creatio-web-service-inside…

 

Best regards,

Dariy

Show all comments