Enabling your cielo24 end-to-end integration within Canvas Studio:

  • Authentication
  • Endpoint
  • GET /api/integrations/canvas/v1/white_label_account
  • Description
  • Body
  • Response
  • POST /api/integrations/canvas/v1/white_label_account
  • Description
  • Body
  • Response
  • PATCH /api/integrations/canvas/v1/white_label_account
  • Description
  • Body
  • Response
  • DELETE /api/integrations/canvas/v1/white_label_account
  • Description
  • Body
  • Response


The Canvas team approached us with a request to facilitate the creation and modification of customer accounts utilizing the white-label integration. In response, we developed new API routes to accommodate this requirement.


Authentication

To interact with the Canvas endpoints, the request must be accompanied by a Bearer authorization token.


Endpoint

We have introduced an endpoint employing distinct HTTP methods to enable the Canvas team to observe, create, adjust, and delete
integrated customer profiles. To utilize the Cielo24 endpoint for making modifications to integrated customers, the base URL is set as
https://api.cielo24.com .


GET /api/integrations/canvas/v1/white_label_account


Description

This endpoint furnishes information about integrated customers employing white-label integration. By default, it fetches data for all integrated customers. However, if you intend to acquire information pertaining to a specific customer, you can incorporate the Canvas space name in the URL. To achieve this, submit a request to /api/integrations/canvas/v1/white_label_account/<canvas_space_name> .

Body

No request body is necessary for this endpoint.

Response

 

POST /api/integrations/canvas/v1/white_label_account


Description

This endpoint facilitates the integration of a new customer using white-label integration.


Body

The request body must contain the Canvas space name acquired through the canvas_space_name key, along with API credentials using
the api_secret and api_key keys. You also have the option to indicate the source’s active status by utilizing the is_active key (with
the default value being true), and you can specify the customer’s name using the customer_name key (with the default being “Canvas”).
Here is an example:


Response


200 Provides information about integrated customers.
400 Indicates that the source is not yet integrated.
403 Invalid authorization token.
CodeDescription

{
“customers”: [
{
“api_secret”: “testing_api_secret”,
“canvas_space_name”: “cielo24-test”,
“api_key”: “testing_api_key”,
“is_active”: true,
“customer_name”: “Cielo24”
}
]
}
{
“error”: “The ‘cielo24-2023’ space name is not integrated.”
}
{
“detail”: “Unauthorized Request: Bearer <token>”
}

{
“canvas_space_name”: “cielo24-test”,
“api_secret”: “testing_api_secret”,
“api_key”: “testing_api_key”,
“is_active”: true,
“customer_name”: “Cielo24 Test”
}
200 Provides details about the newly integrated customer.
Code Description

PATCH /api/integrations/canvas/v1/white_label_account


Description

This endpoint simplifies the process of modifying an existing customer utilizing the white-label integration.


Body

For this endpoint, you need to specify the Canvas space name associated with the customer you wish to modify. To enact modifications, the
request body should encompass the specific fields you intend to update, which could include api_secret , api_key , is_active , and/or
customer_name . Notably, only the supplied fields will undergo alteration.
400 Indicates that the request is missing required information about the new customer or that the source is already integrated.
or
or
403 Invalid authorization token.
500 An internal server error has occurred. If you encounter this issue, please don’t hesitate to reach out to Cielo24 support for
assistance.
{
“new_customer”: {
“api_secret”: “testing_api_secret-4”,
“canvas_space_name”: “cielo24-test-4”,
“api_key”: “testing_api_key-4”,
“is_active”: true,
“customer_name”: “Cielo24 Test 4”
}
}

{
“error”: “Request body is missing the ‘canvas_space_name’ key or its value.”
}

{
“error”: “Request body is missing the ‘api_key’ and/or ‘api_secret’ key.”
}

{
“error”: “The ‘cielo24-test-4’ space name is already integrated. Please modify or delete it.”
}

{
“detail”: “Unauthorized Request: Bearer <token>”
}

{
“canvas_space_name”: “cielo24-test”,
“api_secret”: “testing_new_api_secret”,
“api_key”: “testing_new_api_key”,
“is_active”: true,
“customer_name”: “Cielo24 Test New”
}

Response

 

DELETE /api/integrations/canvas/v1/white_label_account


Description

This endpoint facilitates the deletion of an existing customer that utilizes the white-label integration.


Body

To utilize this endpoint, you must provide the Canvas space name belonging to the customer you intend to delete. To achieve this, employ
the canvas_space_name key within the example request body displayed below:


Response

200 Provides detailed information about the modified integrated customer.
400 Indicates that the request lacks necessary information about the existing customer or that the source is not yet integrated.
or
403 Invalid authorization token.
500 An internal server error has occurred. If you encounter this issue, please don’t hesitate to reach out to Cielo24 support for
assistance.
CodeDescription
{
“modified_customer”: {
“api_secret”: “testing_new_api_secret”,
“canvas_space_name”: “cielo24-test-2”,
“api_key”: “testing_new_api_key”,
“is_active”: false,
“customer_name”: “Cielo24 Test – 2”
}
}

{
“error”: “Request body is missing the ‘canvas_space_name’ key or its value.”
}

{
“error”: “The ‘cielo24-2’ space name is not integrated, so it can not be changed.”
}

{
“detail”: “Unauthorized Request: Bearer <token>”
}

{
“canvas_space_name”: “cielo24-test”
}
CodeDescription
200 Offers comprehensive details regarding the successfully deleted integrated customer.
400 Indicates that the request lacks necessary information about the existing customer or that the source is not yet integrated.
or
403 Invalid authorization token.
500 An internal server error has occurred. If you encounter this issue, please don’t hesitate to reach out to Cielo24 support for
assistance.

{
“deleted_customer”: {
“api_secret”: “testing_api_secret”,
“canvas_space_name”: “cielo24-test”,
“api_key”: “testing_api_key”,
“is_active”: true,
“customer_name”: “Cielo24”
}
}

{
“error”: “Request body is missing the ‘canvas_space_name’ key or its value.”
}

{
“error”: “The ‘cielo24-2’ space name is not integrated, so it can not be changed.”
}
{
“detail”: “Unauthorized Request: Bearer <token>”