Retrieve Merchant Invoice Themes

Here’s the updated documentation to reflect the new response structure:


API Endpoint: Retrieve Merchant Invoice Themes

Description

This API endpoint retrieves the theme configuration for a specific merchant based on a dynamic key and value. 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

Production Environment:

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

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' \
--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' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJoYXNzYW4uYXlvdWIuMTk4MEBnbWFpbC5jb20iLCJhdXRoIjoiUk9MRV9NRVJDSEFOVCxST0xFX01FUkNIQU5UX0FDQ09VTlQsUk9MRV9QQVJUTkVSIiwiaXNzIjoiQVBJIiwiZXhwIjoxNzI1MDYwNDYwfQ.PyzoR4YCxcVlls3ne7ApvvW9wSQoURVzoPNTO7stiPuuGAsAXexFIOZJ79tXI8v-b5HGESr20K0-I2_yFbUPvQ'

Response

Content-TypeValue
JSONapplication/json

Response Example

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

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 aligns with the new response structure you provided, reflecting the updated fields and their descriptions.