Skip to main content
Version: 8.0

Retrieve data from Creatio using OAuth 2.0 authorization and OData 4

Level: intermediate

To implement the example:

Step 1: Set up the integration of a third-party app with Creatio using Identity Service. Read more >>>

Step 2: Retrieve a Bearer token. Read more >>>

Step 3: Retrieve data from Creatio. Read more >>>

Example

Retrieve the list of all accounts from the Accounts section. Use OAuth 2.0 authorization and OData 4 protocol to integrate the app with Creatio.

Response
Status: 200 OK

{
"@odata.context": "http://mycreatio.com/0/odata/$metadata#Account",
"value": [
{
"Id": "405947d0-2ffb-4ded-8675-0475f19f5a81",
"Name": "Accom (sample)",
"OwnerId": "410006e1-ca4e-4502-a9ec-e54d922d2c00",
"CreatedOn": "2022-12-02T08:52:59Z",
"CreatedById": "410006e1-ca4e-4502-a9ec-e54d922d2c00",
"ModifiedOn": "2023-08-07T18:36:28.92Z",
"ModifiedById": "410006e1-ca4e-4502-a9ec-e54d922d2c00",
"ProcessListeners": 0,
"OwnershipId": "f7af2e24-f46b-1410-fb98-00155d043204",
"PrimaryContactId": "c4ed336c-3e9b-40fe-8b82-5632476472b4",
"ParentId": "00000000-0000-0000-0000-000000000000",
"IndustryId": "fbbf0e52-f36b-1410-c493-00155d043205",
"Code": "1",
"TypeId": "03a75490-53e6-df11-971b-001d60e938c6",
"Phone": "+1 617 440 2498",
"AdditionalPhone": "",
"Fax": "",
"Web": "ac.com",
"AddressTypeId": "780bf68c-4b6e-df11-b988-001d60e938c6",
"Address": "31 Union Street",
"CityId": "74144617-a288-4984-bcac-e78733277a61",
"RegionId": "658acfe7-09ae-4747-b1b3-541e2dfa1b9e",
"Zip": "02111",
"CountryId": "e0be1264-f36b-1410-fa98-00155d043204",
"AccountCategoryId": "38ea507c-55e6-df11-971b-001d60e938c6",
"EmployeesNumberId": "ef7f0eb0-f36b-1410-849f-0026185bfcd3",
"AnnualRevenueId": "bc30bdaa-55e6-df11-971b-001d60e938c6",
"Notes": "",
"Logo@odata.mediaEditLink": "Account(405947d0-2ffb-4ded-8675-0475f19f5a81)/Logo",
"Logo@odata.mediaReadLink": "Account(405947d0-2ffb-4ded-8675-0475f19f5a81)/Logo",
"Logo@odata.mediaContentType": "application/octet-stream",
"AlternativeName": "Accom-Westhouse Company",
"GPSN": "",
"GPSE": "",
"PriceListId": "00000000-0000-0000-0000-000000000000",
"Completeness": 95,
"AccountLogoId": "00000000-0000-0000-0000-000000000000",
"AUM": ""
},
{
"Id": "e308b781-3c5b-4ecb-89ef-5c1ed4da488e",
"Name": "Our company",
"OwnerId": "00000000-0000-0000-0000-000000000000",
"CreatedOn": "2011-01-30T15:22:43.771Z",
"CreatedById": "22c5540c-d9b1-49ef-8eb7-72419b78e57c",
"ModifiedOn": "2023-08-07T18:36:28.92Z",
"ModifiedById": "410006e1-ca4e-4502-a9ec-e54d922d2c00",
"ProcessListeners": 0,
"OwnershipId": "00000000-0000-0000-0000-000000000000",
"PrimaryContactId": "00000000-0000-0000-0000-000000000000",
"ParentId": "00000000-0000-0000-0000-000000000000",
"IndustryId": "00000000-0000-0000-0000-000000000000",
"Code": "43",
"TypeId": "57412fad-53e6-df11-971b-001d60e938c6",
"Phone": "",
"AdditionalPhone": "",
"Fax": "",
"Web": "",
"AddressTypeId": "00000000-0000-0000-0000-000000000000",
"Address": "",
"CityId": "00000000-0000-0000-0000-000000000000",
"RegionId": "00000000-0000-0000-0000-000000000000",
"Zip": "",
"CountryId": "00000000-0000-0000-0000-000000000000",
"AccountCategoryId": "00000000-0000-0000-0000-000000000000",
"EmployeesNumberId": "00000000-0000-0000-0000-000000000000",
"AnnualRevenueId": "00000000-0000-0000-0000-000000000000",
"Notes": "",
"Logo@odata.mediaEditLink": "Account(e308b781-3c5b-4ecb-89ef-5c1ed4da488e)/Logo",
"Logo@odata.mediaReadLink": "Account(e308b781-3c5b-4ecb-89ef-5c1ed4da488e)/Logo",
"Logo@odata.mediaContentType": "application/octet-stream",
"AlternativeName": "",
"GPSN": "",
"GPSE": "",
"PriceListId": "00000000-0000-0000-0000-000000000000",
"Completeness": 0,
"AccountLogoId": "00000000-0000-0000-0000-000000000000",
"AUM": ""
}
]
}

This example uses Postman to test requests.

1. Set up the integration of a third-party app with Creatio using Identity Service

  1. Set up the Identity Service. Instructions: Set up the Identity Service.
  2. Set up the OAuth 2.0 authorization. Instructions: Set up the OAuth 2.0 authorization.
  3. Make sure the Identity Service is running. Instructions: Set up the integration of a third-party app with Creatio using Identity Service (step 3).

2. Retrieve a Bearer token

Instructions: Retrieve a Bearer token.

You can now integrate third-party apps or web services with Creatio using OAuth 2.0 authorization. Authorize all external requests to Creatio using the Bearer token.

3. Retrieve data from Creatio

  1. Create a request to retrieve data using OData 4.

    1. Add a request to the collection. Instructions: Adding requests to the collection.

    2. Fill out the request parameters.

      Parameter

      Parameter description

      Parameter value

      Request method

      GET

      Request URL

      The URL of the Creatio instance to retrieve data.

      http://mycreatio.com/0/odata/Account

      Request
      GET http://mycreatio.com/0/odata/Account
    3. Save the request.

  2. Set up the authorization. Instructions: Retrieve data from Creatio (step 2).

  3. Execute the request.

As a result, you will retrieve the list of all accounts. View result >>>


Resources

Creatio API documentation