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
Header | Value |
---|---|
Authorization | Bearer <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
orfreelancer
: 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
curl
RequestTesting 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-Type | Value |
---|---|
JSON | application/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
Field | Type | Description |
---|---|---|
primaryColor | String | The primary color used in the default theme. |
secondaryColor | String | The secondary color used in the default theme. |
footerColor | String | The color of the footer text in the default theme. |
footerBackgroundColor | String | The background color of the footer in the default theme. |
primaryLightColor | String | A lighter variation of the primary color in the default theme. |
primaryHoverColor | String | The color used when an element is hovered over in the default theme. |
defaultLanguage | String | The default language of the theme, represented as an ISO code (e.g., "ar" for Arabic). |
showLogo | String | Indicates which logo to show in the default theme. Possible values are: paylink , merchant , or none . |
textColor | String | The color of the text used in the default theme. |
menuTextColor | String | The color of the menu text in the default theme. |
buttonHoverTextColor | String | The color of the button text when hovered in the default theme. |
fontUrl | String | The URL to the font used in the default theme. |
fontFamily | String | The font family used in the default theme. |
backgroundColor | String | The background color used in the default theme. |
foregroundColor | String | The foreground color used in the default theme. |
progressModalBackground | String | The background color of the progress modal in the default theme. |
titlePanelBackground | String | The background color of the title panel in the default theme. |
paymentFormBackground | String | The background color of the payment form in the default theme. |
buttonTextColor | String | The color of the text on buttons in the default theme. |
paymentDeclineColor | String | The color used to indicate payment decline in the default theme. |
paymentApprovedColor | String | The color used to indicate payment approval in the default theme. |
invoiceHeaderTextColor | String | The color of the text in the invoice header in the default theme. |
Security
Code | Meaning |
---|---|
401 | Unauthorized: If the provided token is invalid or expired. |
403 | Forbidden: If the user does not have the required PARTNER role. |
404 | Not 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.
Updated 4 months ago