» Shipping Profile PUT API Documentation

Updating a Specific Shipping Profiles

Endpoints:  PUT /admin/shipping_profiles/{id}

Purpose

The /admin/shipping_profiles/{id} endpoint is used to fully update an existing shipping profile. This replaces all fields within the profile, ensuring that any modifications—such as renaming, changing rule preferences, or updating descriptions—are applied consistently.

Path Parameters

ParameterType
Description
id
Integer
The unique identifier of the categories

Query Parameters 

This endpoint does not have any query parameters.

Use Case

Use the /admin/shipping_profiles/{id} endpoint when a shipping profile needs a complete update. For example, if a business changes its shipping policy from lowest-cost-based rules to fastest-delivery rules, this endpoint ensures a seamless transition by replacing the existing profile data.

Request Body

KeyTypeDescription
idStringUnique identifier for the shipping profile.
defaultBooleanIndicates if this is the default shipping profile.
profile_typeObjectObject containing the type, selector, and rule of the profile.
nameStringName of the shipping profile.
shipping_rulesArray of StringsList of IDs referencing associated shipping rules.
rule_preferenceStringHow shipping rules are prioritized or selected.
descriptionStringDescription of the shipping profile.
{
    "shipping_profile": {
        "default": IS_DEFAULT,
        "profile_type": {
            "type": PROFILE_TYPE,
            "select": MODULE_NAME,
            "rule": RULE_TYPE
        },
        "name": PROFILE_NAME,
        "shipping_rules": [SHIPPING_RULE_IDS],
        "rule_preference": RULE_PREFERENCE,
        "description": PROFILE_DESCRIPTION
    }
}

Response

a successful PUT /admin/shipping_profiles/{id} request returns the fully updated profile  including its unique identifier (id), name, rule preference, associated shipping rules, and timestamps (created_at and updated_at)

PUT
https://{your_site_domain}/api/v4/admin/shipping_profiles/{id}
Try It Out
{
    "shipping_profile": {
        "id": SHIPPING_PROFILE_ID,
        "name": PROFILE_NAME,
        "rule_preference": RULE_PREFERENCE,
        "shipping_rules": [
            {
                "id": SHIPPING_RULE_ID,
                "name": SHIPPING_RULE_NAME,
                "shipping_policy": {
                    "id": SHIPPING_POLICY_ID,
                    "name": SHIPPING_POLICY_NAME
                }
            }
        ],
        "description": PROFILE_DESCRIPTION,
        "created_at": CREATED_TIMESTAMP,
        "updated_at": UPDATED_TIMESTAMP
    }
}