Retrieve Default Merchant Invoice Themes

Here's the updated documentation with the correct default colors provided in the response:


API Endpoint: Retrieve Default Merchant Invoice Themes

Description

This API endpoint allows retrieving the default theme colors of Paylink, which can be used to reset the theme configuration for a specific merchant. It is secured and can only be accessed by users with the PARTNER role.

HTTP Request

Testing Environment:

GET https://restpilot.paylink.sa/rest/partner/v2/merchant/{key}/{value}/themes-default

Production Environment:

GET https://restapi.paylink.sa/rest/partner/v2/merchant/{key}/{value}/themes-default

Headers

HeaderValue
AuthorizationBearer <your_token_here>

Note: To obtain the Bearer token required for authentication, refer to the Partner Authentication Guide.

Path Parameters

  • key: The key used to identify the merchant attribute. Possible values:

    • cr or freelancer: Search by the merchant's license number.
    • mobile: Search by the merchant's phone number.
    • email: Search by the merchant's email address.
    • accountNo: Search by the merchant's account number.
  • value: The value associated with the key (e.g., specific license number, phone number, email, or account number).

Example curl Request

Testing Environment:

curl --location 'https://restpilot.paylink.sa/rest/partner/v2/merchant/email/[email protected]/themes-default' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJoYXNzYW4uYXlvdWIuMTk4MEBnbWFpbC5jb20iLCJhdXRoIjoiUk9MRV9NRVJDSEFOVCxST0xFX01FUkNIQU5UX0FDQ09VTlQsUk9MRV9QQVJUTkVSIiwiaXNzIjoiQVBJIiwiZXhwIjoxNzI1MDYwNDYwfQ.PyzoR4YCxcVlls3ne7ApvvW9wSQoURVzoPNTO7stiPuuGAsAXexFIOZJ79tXI8v-b5HGESr20K0-I2_yFbUPvQ'

Production Environment:

curl --location 'https://restapi.paylink.sa/rest/partner/v2/merchant/email/[email protected]/themes-default' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJoYXNzYW4uYXlvdWIuMTk4MEBnbWFpbC5jb20iLCJhdXRoIjoiUk9MRV9NRVJDSEFOVCxST0xFX01FUkNIQU5UX0FDQ09VTlQsUk9MRV9QQVJUTkVSIiwiaXNzIjoiQVBJIiwiZXhwIjoxNzI1MDYwNDYwfQ.PyzoR4YCxcVlls3ne7ApvvW9wSQoURVzoPNTO7stiPuuGAsAXexFIOZJ79tXI8v-b5HGESr20K0-I2_yFbUPvQ'

Response

Content-TypeValue
JSONapplication/json

Response Example

The response will return the default theme colors that can be used to reset the current theme configuration.

{
    "primaryColor": "#3087de",
    "secondaryColor": "#8C60E2",
    "footerColor": "#f2f0f5",
    "footerBackgroundColor": "#110f15",
    "primaryLightColor": "#4f99e3",
    "primaryHoverColor": "#1b61a7",
    "defaultLanguage": "ar",
    "showLogo": "paylink",
    "textColor": "#000",
    "menuTextColor": "#FFF",
    "buttonHoverTextColor": "#FFF",
    "fontUrl": "https://fonts.googleapis.com/icon?family=Montserrat",
    "fontFamily": "\"dinnext-r\", sans-serif",
    "backgroundColor": "#898989",
    "foregroundColor": "#FFF",
    "progressModalBackground": "#FFF",
    "titlePanelBackground": "#e9ecef",
    "paymentFormBackground": "#FFF",
    "buttonTextColor": "#FFF",
    "paymentDeclineColor": "#ffc107",
    "paymentApprovedColor": "#44781a",
    "invoiceHeaderTextColor": "#FFF"
}

Response Details

FieldTypeDescription
primaryColorStringThe primary color used in the default theme.
secondaryColorStringThe secondary color used in the default theme.
footerColorStringThe color of the footer text in the default theme.
footerBackgroundColorStringThe background color of the footer in the default theme.
primaryLightColorStringA lighter variation of the primary color in the default theme.
primaryHoverColorStringThe color used when an element is hovered over in the default theme.
defaultLanguageStringThe default language of the theme, represented as an ISO code (e.g., "ar" for Arabic).
showLogoStringIndicates which logo to show in the default theme. Possible values are: paylink, merchant, or none.
textColorStringThe color of the text used in the default theme.
menuTextColorStringThe color of the menu text in the default theme.
buttonHoverTextColorStringThe color of the button text when hovered in the default theme.
fontUrlStringThe URL to the font used in the default theme.
fontFamilyStringThe font family used in the default theme.
backgroundColorStringThe background color used in the default theme.
foregroundColorStringThe foreground color used in the default theme.
progressModalBackgroundStringThe background color of the progress modal in the default theme.
titlePanelBackgroundStringThe background color of the title panel in the default theme.
paymentFormBackgroundStringThe background color of the payment form in the default theme.
buttonTextColorStringThe color of the text on buttons in the default theme.
paymentDeclineColorStringThe color used to indicate payment decline in the default theme.
paymentApprovedColorStringThe color used to indicate payment approval in the default theme.
invoiceHeaderTextColorStringThe color of the text in the invoice header in the default theme.

Security

CodeMeaning
401Unauthorized: If the provided token is invalid or expired.
403Forbidden: If the user does not have the required PARTNER role.
404Not Found: If no merchant or theme is found for the specified key and value.

This documentation now includes the correct default colors returned in the response, which can be used to reset the theme configuration for a merchant.