Store Settings/
Update Settings

Update Settings

You can use the Settings endpoint to update your project settings at any time. These global settings take immediate effect.

PUT Update project settings

https://api.moltin.com/v2/settings

Parameters

Headers

NameRequiredTypeDescription
AuthorizationRequiredstringThe Bearer token required to get access to the API.

Body

NameRequiredTypeDescription
calculation_methodOptionalstringThe method used to calculate card and order totals.
additional_languagesOptionalarrayAn array of alpha2 codes for supported languages.
list_child_productsOptionalbooleanDisplay child products or not in product listings.
page_lengthOptionalintegerNumber of results per page (max: 100).
typeRequiredstringThis describes the type of request payload you’re sending.
address_mandatory_fieldsOptionalarrayAn array of fields that are required for creating an address.

Request Example

Curl

curl -X PUT https://api.moltin.com/v2/settings \
     -H "Authorization: Bearer XXXX" \
     -H "Content-Type: application/json" \
     -d $'{
       "data": {
         "type": "settings",
         "page_length": 70,
         "list_child_products": false,
         "additional_languages": ["es","fr","de"],
         "calculation_method": "line",
         "address_mandatory_fields": [
            "first_name",
            "last_name",
            "line_1",
            "city",
            "region",
            "postcode",
            "country",
            "instructions"
        ]
       }
     }'

JavaScript SDK

const data = {
    type: "settings",
    page_length: 70,
    list_child_products: false,
    additional_languages: ["es", "fr", "de"],
    calculation_method: "line",
    address_mandatory_fields: [
        "first_name",
        "last_name",
        "line_1",
        "city",
        "region",
        "postcode",
        "country",
        "instructions",
    ],
};


// Where `EPCC` is an authenticated client
await EPCC.Settings.Update(data);

Response Example

200 OK

{
    "id": "XXX-XXX-XXX",
    "data": {
        "type": "settings",
        "page_length": 70,
        "list_child_products": true,
        "additional_languages": ["es", "fr", "de"],
        "calculation_method": "line",
        "currency_limit": 10,
        "field_limit": 100,
        "integration_limit": 100,
        "event_limit": 5,
        "filter_limit": 10,
        "tax_item_limit": 5,
        "promotions_limit": 1000,
        "promotion_codes_limit": 1000,
        "page_offset_limit": 10000,
        "address_mandatory_fields": [
            "first_name",
            "last_name",
            "line_1",
            "city",
            "region",
            "postcode",
            "country",
            "instructions"
        ]
    }
}

Was this helpful?

Previous
Get all Settings

Learn

Docs