Visit Main Site
Join Partner Program
Login
     
Introduction
Authentication
Documentation
Category
GET
POST
PUT
DELETE
Products
GET
POST
PUT
DELETE
Carts
GET
POST
PATCH
DELETE
Variations
GET
POST
PUT
DELETE
Currency
GET
POST
PUT
DELETE
Tax
Tax Profile
GET
POST
PUT
DELETE
Tax Rule
GET
POST
PUT
DELETE
Tax Code
GET
POST
PUT
DELETE
Tax Zone
GET
POST
PUT
DELETE
Discount
GET
POST
PUT
DELETE
Shipping
Shipping Profile
GET
POST
PUT
DELETE
Shipping Rate
GET
POST
PUT
DELETE
Shipping Rules
GET
POST
PUT
DELETE
Customer
GET
POST
PUT
DELETE
Orders
GET
POST
PATCH
Blog
GET
POST
PUT
DELETE
Settings
GET
» Shipping Profile POST API Documentation

Creating Specific Shipping Profiles

Endpoint:   POST /admin/shipping_profiles

Purpose

The POST /admin/shipping_profiles endpoint is used to create a new shipping profile, defining how shipping rules are applied to orders. It allows specifying profile types, associating shipping rules, and setting a preference for rule application. This is essential for managing different shipping strategies efficiently.

Path Parameters

No path parameters for this endpoint.

Query Parameters 

This endpoint does not have any query parameters.

Use Case

Use the POST /admin/shipping_profiles endpoint when setting up a new shipping profile with specific rules and configurations. This is useful when adding new shipping methods, defining cost-based rule preferences, or structuring profiles for different geographical regions.

Request Body

Key Type Description
id String Unique identifier for the shipping profile.
default Boolean Indicates if this is the default shipping profile.
profile_type Object Object containing the type, selector, and rule of the profile.
name String Name of the shipping profile.
shipping_rules Array of Strings List of IDs referencing associated shipping rules.
rule_preference String How shipping rules are prioritized or selected.
description String Description of the shipping profile.
JSON
{
    "shipping_profile": {
        "id": SHIPPING_PROFILE_ID,
        "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 POST /admin/shipping_profiles request returns the newly created shipping profile, including its unique identifier (id), name, rule preference, associated shipping rules, and timestamps (created_at and updated_at)

POST
https://{your_site_domain}/api/v4/admin/shipping_profiles/
Try It Out
JSON
{
    "shipping_profile": {
        "id": SHIPPING_PROFILE_ID,
        "name": SHIPPING_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": SHIPPING_PROFILE_DESCRIPTION,
        "created_at": CREATED_AT,
        "updated_at": UPDATED_AT
    }
}
Terms and Conditions
Privacy Policy

© 2024 WebCommander | All Rights Reserved

contact@webcommander.com
1300 797 571

WebCommander
About Us
Features
Pricing
Compare
Partners
Contact Us
Resource
Find a Partner
Help Centre
Community
Blog
Solutions
Inventory Management
Omnichannel Sales
Ecommerce Automation
B2B Ecommerce
Headless Commerce
Website Design and Performance