# Update city distribution template

# Interface call request specification

Http request method: POST
https://api.weixin.qq.com/product/offline/update_same_city_template?access_token=xxxxxxxxx

# Request Parameter Sample

{
    "same_city_template":{
        "template_id":60114,
        "shipper":1,
        "scope":5000,
        "same_city_valuation":{
            "type":0
        },
        "special_time":{
            "type":0
        },
        "delivery_time":{
            "start_business_hour":9,
            "start_business_minute":30,
            "end_business_hour":22,
            "end_business_minute":0,
            "book_time":1440,
            "first_val_meters":3000,
            "first_val_minutes":30,
            "second_val_meters":1000,
            "second_val_minutes":10
        }
    }
}

# Return Package Example

{
    "errcode" : 0,
    "errcode" : "",
}

# Request Parameter Dxplaination

parameter type Is it necessary to fill out Introductions
same_city_template.template_id number yes City distribution template ID
same_city_template.shipper number yes Distribution party
same_city_template.scope number yes Distribution range, per meter
same_city_template.same_city_valuation object yes Valuation method
same_city_template.special_time object yes Special period
same_city_template.delivery_time object yes Distribution time

# Return parameter specification

parameter type Introductions
Errcode string Error code
errmsg string Error message

# object-same_city_valuation

parameter type Is it necessary to fill out Introductions
type number yes Billing Type
condition_free_valuation object no Freight free condition
tiered_billing_valuation object no Ladder accounting method

# object-same_city_valuation.condition_free_valuation

parameter type Is it necessary to fill out Introductions
min_free_price number yes Minimum Amount for Conditional Free Freight

# object-same_city_valuation.tiered_billing_valuation

parameter type Is it necessary to fill out Introductions
min_send_price number yes Minimum starting and delivery amount, points
first_val_metre number yes Xx miner xx score
first_price number yes Xx miner xx score
second_val_metre number yes Each additional xx meter
second_price number yes Increase xx points

# object-special_time

parameter type Is it necessary to fill out Introductions
type number yes type
extra_fee_valuation object no Special Time Surcharge

# object-special_time.extra_fee_valuation

parameter type Is it necessary to fill out Introductions
fee_details[].start_hour number yes Start time, hour
fee_details[].start_minute number yes Start time, minutes
fee_details[].end_hour number yes End time, hour
fee_details[].end_minute number yes End time, minutes
fee_details[].fee number yes Cost for the period

# object-delivery_time

first_val_meter内first_val_minutes, Every second added_val_metre Need to add second_val_minutes

parameter type Is it necessary to fill out Introductions
start_business_hour number yes Opening hours, hours
start_business_minute number yes Opening time, minutes
end_business_hour number yes Closing time, hours.
end_business_minute number yes Closing time, minutes
book_time number yes Available time, minutes
first_val_metre number yes Scope of delivery, m
first_val_minutes number yes Time of delivery, minutes
second_val_metre number yes Delivery Range Increments, Meters
second_val_minutes number yes Incremental delivery time, minutes

# Enumeration values - shipper

Enumeration value string Introductions
0 Shipper_Unknown Unknown
1 Shipper_MerchantSend Merchant delivery
2 Shipper_ThirdPartySend Third party distribution

# Enumeration value - same_city_valuation.type

Enumeration value string Introductions
0 ValuationType_Free Free freight
1 ValuationType_ConditionFree Conditional Free Freight
2 ValuationType_TieredBilling Ladder charging

# Enumeration value - special_time.type

Enumeration value string Introductions
0 ValuationType_Free No surcharge
1 ValuationType_ExtraFee Additional cost

# Return code

Return code Type of error
-1 System exception
-2 Token is too long