Skip to content

Latest commit

 

History

History
317 lines (214 loc) · 10.9 KB

CustomisationProfilesApi.md

File metadata and controls

317 lines (214 loc) · 10.9 KB

OpenAPIWebForm\Client\CustomisationProfilesApi

All URIs are relative to https://webform-sandbox.finapi.io, except if the operation defines another base path.

Method HTTP request Description
createProfile() POST /api/profiles Create a profile
deleteProfile() DELETE /api/profiles/{id} Delete a profile
editProfile() PATCH /api/profiles/{id} Edit a profile
getProfile() GET /api/profiles/{id} Get a profile
getProfiles() GET /api/profiles Get profiles

createProfile()

createProfile($create_profile_details): \OpenAPIWebForm\Client\Model\Profile

Create a profile

The endpoint provides a list of parameters which customers can personalize to be in line with their brand's styling.
The endpoint triggered with a list of values, will create a profile with a unique profileId. When the customer passes the profileId on an API call, the values from the profile are applied on the web form while rendering to end-users. We welcome customers to set up a default profile, so that they do not need to pass the profileId as a parameter for every API call.

In case the API request is syntactically correct, the service will respond with HTTP return code 201 and a profile object.

Must pass the mandator admin client's access_token.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: BearerAccessToken
$config = OpenAPIWebForm\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPIWebForm\Client\Api\CustomisationProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$create_profile_details = new \OpenAPIWebForm\Client\Model\CreateProfileDetails(); // \OpenAPIWebForm\Client\Model\CreateProfileDetails

try {
    $result = $apiInstance->createProfile($create_profile_details);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomisationProfilesApi->createProfile: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
create_profile_details \OpenAPIWebForm\Client\Model\CreateProfileDetails

Return type

\OpenAPIWebForm\Client\Model\Profile

Authorization

BearerAccessToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteProfile()

deleteProfile($id)

Delete a profile

Delete a single profile by its id.

Must pass the mandator admin client's access_token.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: BearerAccessToken
$config = OpenAPIWebForm\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPIWebForm\Client\Api\CustomisationProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string | Identifier of the profile

try {
    $apiInstance->deleteProfile($id);
} catch (Exception $e) {
    echo 'Exception when calling CustomisationProfilesApi->deleteProfile: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string Identifier of the profile

Return type

void (empty response body)

Authorization

BearerAccessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

editProfile()

editProfile($id, $edit_profile_details): \OpenAPIWebForm\Client\Model\Profile

Edit a profile

Edit a single profile by its id.

Must pass the mandator admin client's access_token.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: BearerAccessToken
$config = OpenAPIWebForm\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPIWebForm\Client\Api\CustomisationProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string | Identifier of the profile
$edit_profile_details = new \OpenAPIWebForm\Client\Model\EditProfileDetails(); // \OpenAPIWebForm\Client\Model\EditProfileDetails

try {
    $result = $apiInstance->editProfile($id, $edit_profile_details);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomisationProfilesApi->editProfile: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string Identifier of the profile
edit_profile_details \OpenAPIWebForm\Client\Model\EditProfileDetails

Return type

\OpenAPIWebForm\Client\Model\Profile

Authorization

BearerAccessToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getProfile()

getProfile($id): \OpenAPIWebForm\Client\Model\Profile

Get a profile

Get a single profile by its id.

Must pass the mandator admin client's access_token.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: BearerAccessToken
$config = OpenAPIWebForm\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPIWebForm\Client\Api\CustomisationProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 'id_example'; // string | Identifier of the profile

try {
    $result = $apiInstance->getProfile($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomisationProfilesApi->getProfile: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id string Identifier of the profile

Return type

\OpenAPIWebForm\Client\Model\Profile

Authorization

BearerAccessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getProfiles()

getProfiles($order, $page, $per_page): \OpenAPIWebForm\Client\Model\ProfilesPage

Get profiles

Get all profiles.

Must pass the mandator admin client's access_token.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: BearerAccessToken
$config = OpenAPIWebForm\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPIWebForm\Client\Api\CustomisationProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$order = createdAt,desc; // string | Determines the order of the results. You can order by <code>createdAt</code> field ascending or descending. The general format is <code>property[,asc|desc]</code>, with <code>asc</code> being the default value.The default order is <code>createdAt,asc</code>.
$page = 1; // int | Page to load
$per_page = 20; // int | The number of items on the page

try {
    $result = $apiInstance->getProfiles($order, $page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomisationProfilesApi->getProfiles: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
order string Determines the order of the results. You can order by <code>createdAt</code> field ascending or descending. The general format is <code>property[,asc desc]</code>, with <code>asc</code> being the default value.The default order is <code>createdAt,asc</code>.
page int Page to load [optional] [default to 1]
per_page int The number of items on the page [optional] [default to 20]

Return type

\OpenAPIWebForm\Client\Model\ProfilesPage

Authorization

BearerAccessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]