customer_portal_settings

Description

This resource controls all aspects of the Foxy customer portal and /s/customer endpoint. Please see the corresponding Foxy documentation for additional information on what each parameter does.

Interact with this resource

To interact with this resource and see it in the context of the API, you can utilise Postman or your Terminal/Console to perform requests. If you have a Foxy store, you can also use the API browser in the admin to interact with resources connected to your store.

Actions

GET
View a customer_portal_settings
PATCH
Update a customer_portal_settings (send only the properties you want to modify)
PUT
Replace a customer_portal_settings (send the entire representation)
DELETE
Delete a customer_portal_settings
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Properties

Property Description Type Constraints
sessionLifespanInMinutes Life span of session in minutes. Integer Maximum 40320 (4 weeks)
allowedOrigins An array of domains. No trailing slashes, must be https unless it's localhost. Can accept a port. Array of Strings Allow up to 10 entries.
sso If this field is true we get legacy API key or sso key from store and save it in settings. For false value we drop it. Boolean true or false, 1 or 0.
jwtSharedSecret Shared secret key. String More than 40 and less than 100.
signUp Object with settings to allow customers to register / sign-up / create new accounts. See below for more details. Object Self-service signup config. Optional.
signUp.enabled True to allow customers to create a user from the front end, in the customer portal (or separately). Default false. Boolean true or false, 1 or 0.
signUp.verification Object with settings for customer verification (ie. CAPTCHA) on the signup form. Optional. A Foxy-provided default hcaptcha account is used for convenience, but you can use your own hCaptcha account if desired. Object Optional.
signUp.verification.type The type of verification. Currently only supports hcaptcha. If you'd like to use a different provider, let us know. String string
signUp.verification.siteKey The site key from hCaptcha. Note that site_key is also accepted. String Max length 100 characters
signUp.verification.secretKey The secret key from hCaptcha. Note that secret_key is also accepted. String Max length 100 characters
subscriptions Object which contains "allowFrequencyModification" and "allowNextDateModification" fields Object Subscription modification data
subscriptions.allowFrequencyModification An array that contains objects with jsonataQuery and values Array Max length 10 (items)
subscriptions.allowFrequencyModification.jsonataQuery A string that should be a valid JSONata query String max length 200 characters
subscriptions.allowFrequencyModification.values These strings should match the sub_frequency regex sanitization. Array of Strings Max array length 20, max length per string 4 characters.
subscriptions.allowNextDateModification We can forbid modify subscription next date Boolean or Object true or false, 1 or 0 or object
subscriptions.allowNextDateModification.min Beginning of the time period this rule applies to as frequency. Example: 2w – apply to dates at least 2 weeks from now. String max length 50 characters
subscriptions.allowNextDateModification.max End of the time period this rules applies to as frequency. Example: 1y – apply to dates at most 1 year from now. String max length 50 characters
subscriptions.allowNextDateModification.jsonataQuery Subscription selector that should be a valid [JSONata](https://jsonata.org/) query. String max length 200 characters
subscriptions.allowNextDateModification.disallowedDates List of dates (YYYY-MM-DD) that customers can't pick as next payment date.
NOTE: Should accept YYYY-MM-DD..YYYY-MM-DD as a range as well
Array of Strings Max length 10 (items)
subscriptions.allowNextDateModification.allowedDays A pattern defining the days that will be available for customers to pick as the next payment date. Object Days
subscriptions.allowNextDateModification.allowedDays.type Constraint type. If day, then this rule contains days of week only.
If month, then this rule contains days of month only.
String Can be day or month
subscriptions.allowNextDateModification.allowedDays.days Days of week, 1-7, where 1 is Monday and 7 is Sunday or days of month, 1-31. Array of Numbers List of days
date_created The date this resource was created. Date Read only
date_modified The date this resource was last modified. Date Read only

Example Representation

{
    "_links": {
        "curies": [
            {
                "name": "fx",
                "href": "https://api.foxycart.com/rels/{rel}",
                "templated": true
            }
        ],
        "self": {
            "href": "https://api.foxycart.test/stores/123/customer_portal_settings",
            "title": "Store Customer Portal Settings"
        },
        "fx:store": {
            "href": "https://api.foxycart.test/stores/123",
            "title": "This Store"
        }
    },
    "sessionLifespanInMinutes": 90,
    "allowedOrigins": [
        "https://themancan.com"
    ],
    "subscriptions": {
        "allowFrequencyModification": [
            {
                "jsonataQuery": "$contains(frequency, \"w\")",
                "values": [
                    "1w",
                    "2w",
                    "3w",
                    "4w",
                    "5w",
                    "6w",
                    "7w",
                    "8w",
                    "9w",
                    "10w",
                    "11w",
                    "12w"
                ]
            }
        ],
        "allowNextDateModification": [
            {
                "allowedDays": {
                    "days": [
                        1,
                        2,
                        3
                    ],
                    "type": "day"
                },
                "disallowedDates": [
                    "2020-09-02",
                    "2020-09-01..2020-09-03",
                    "2020-09-01"
                ],
                "jsonataQuery": "$contains(frequency, \"w\")",
                "max": "1y",
                "min": "2w"
            },
            {
                "allowedDays": {
                    "days": [
                        5,
                        6,
                        7
                    ],
                    "type": "month"
                },
                "disallowedDates": [
                    "2021-09-02",
                    "2021-09-03",
                    "2021-09-01"
                ],
                "jsonataQuery": "$contains(frequency, \"w\")",
                "max": "2y",
                "min": "1w"
            }
        ]
    },
    "jwtSharedSecret": "ac733fbd-76c0-4cde-8a4c-5c1842e4fb9a-df5d119e-eaec-4967-9fc9-1d4414c55adb",
    "sso": true,
    "date_created": "2020-04-13T08:44:09-0700",
    "date_modified": "2020-04-13T08:46:03-0700"
}

    

    

Zoomable Resources

This resource has no linked resources which can be "zoomed" in on, filtered and embedded within this resource.