Content API를 사용하면 배송 설정 및 계정세 서비스를 통해 계정 내의 모든 제품에 적용될 세금 및 배송비를 지정할 수 있습니다. 더 정확하게 분류하려면 제품 서비스를 통해 상품 수준에서 세금 및 배송을 지정하세요.
Google 정책 및 세금 및 배송 지정에 관한 전체 옵션에 대한 자세한 내용은 다음 고객센터 도움말을 참고하세요.
tax
속성(따라서 계정 세금 서비스 사용)은 미국을 타겟팅하는 제품에만 적용됩니다.
계정 세금 및 배송 설정 Content API 서비스는 판매자 센터 UI의 기능을 반영합니다.
간단한 예시
프랑스의 경우 배송료 8유로, 미국의 운송업체 요금 기준, 배송 서비스별로 3~7일이 소요됨:
PUT /content/v2.1/<merchant_id>/shippingsettings/<account_id> { "accountId": <account_id>, "services": [ { "name": "Livraison Prioritaire", "deliveryCountry": "FR", "currency": "EUR", "rateGroups": [ { "singleValue": { "flatRate": { "currency": "EUR", "value": "8" } } } ], "active": true, "deliveryTime": { "minTransitTimeInDays": 3, "maxTransitTimeInDays": 7 } }, { "name": "UPS in US", "deliveryCountry": "US", "currency": "USD" "rateGroups": [ { "singleValue": { "carrierRateName": "ups" }, "carrierRates": [ { "name": "ups", "carrierName": "UPS", "carrierService": "Ground", "originPostalCode": "10011" } ] } ], "active": true, "deliveryTime": { "minTransitTimeInDays": 3, "maxTransitTimeInDays": 7 }, } ] }
사용 가능한 이동통신사 이름과 서비스를 검색하려면 getsupportedcarriers 메서드를 사용합니다.
복잡한 예
배송비를 청구하지 않고 뉴욕 주 전역에서 무료 배송 프로모션을 만들려면 미국의 나머지 지역에 UPS를 사용하고 다음과 같이 Content API의 accounttax 및 shippingsettings 서비스에 대한 요청을 사용하여 미국의 각 주에 다른 세금을 적용합니다. 먼저 배송 설정을 구성합니다.
PUT /content/v2.1/<merchant_id>/shippingsettings/<account_id> { "accountId": <account_id>, "services": [ { "name": "Eligible for free shipping", "deliveryCountry": "US", "rateGroups": [ { "mainTable": { "rowHeaders": { "locations": [ { "locationIds": ["21167"] }, // NY { "locationIds": ["21164", "21139"] } // NJ, CT ] }, "rows": [ { "cells": [ { "flatRate": { "currency": "USD", "value": "0" } } ] }, { "cells": [ { "flatRate": { "currency": "USD", "value": "0" } } ] } ] } } ], "active": true, "deliveryTime": { "minTransitTimeInDays": 3, "maxTransitTimeInDays": 7 }, "currency": "USD" }, { "name": "UPS in US", "deliveryCountry": "US", "rateGroups": [ { "singleValue": { "carrierRateName": "UPS mainland" }, "carrierRates": [ { "name": "UPS mainland", "carrierName": "UPS", "carrierService": "Ground", "originPostalCode": "10011", // currently only US, AU, and DE postal codes "percentageAdjustment": "1.05", "flatAdjustment": { "currency": "USD", "value": "0.75" } } ] } ], "active": true, "deliveryTime": { "minTransitTimeInDays": 3, "maxTransitTimeInDays": 7 }, "currency": "USD" } ], "postalCodeGroups": [ { "name": "More cities", // An alternative using postal codes "country": "US", "postalCodeRanges": [ { "postalCodeRangeBegin": "94041" }, { "postalCodeRangeBegin": "94042" }, { "postalCodeRangeBegin": "94043", "postalCodeRangeEnd": "94045" }, { "postalCodeRangeBegin": "9405*" }, { "postalCodeRangeBegin": "9406*", "postalCodeRangeEnd": "9408*" } ] } ] }
위치 ID는 행정 구역을 나타내는 데 사용할 수 있습니다.
이제 다음과 같이 세금을 구성합니다.
PUT /content/v2.1/<merchant_id>/accounttax/<account_id> { "accountId": <account_id>, "rules": [ { "country": "US", // currently only US is supported, may be omitted "locationId": 21167, "useGlobalRate": true, "shippingTaxed": false }, { "locationId": 21137, "useGlobalRate": false, "shippingTaxed": true, "ratePercent": "2.15" } // ... ] }
참고: 운송업체 요금은 미국, 독일, 오스트레일리아에서만 사용할 수 있습니다. 위치 그룹은 현재 미국과 오스트레일리아에서 지원됩니다.
복잡한 배송 규칙: 2차원 표 및 하위 표
미국에서는 $7, 배송비가 10파운드를 초과하는 주문에 대해 $3 또는 $5의 배송 프로모션을 정의하며 주문 중량에 따라 다음과 같이 무료 배송합니다.
PUT /content/v2.1/<merchant_id>/shippingsettings/<account_id> { "accountId": <account_id>, "services": [ { "name": "Custom shipping rules", "deliveryCountry": "US", "rateGroups": [ { "mainTable": { "rowHeaders": { "postalCodeGroupNames": [ "NYC", "all other locations" ] }, "columnHeaders": { "weights": [ { "unit": "lb", "value": "10" }, { "unit": "lb", "value": "infinity" } ] }, "rows": [ { "cells": [ { "flatRate": { "value": "0", "currency": "USD" } }, { "subtableName": "NYC large packages" } ] }, { "cells": [ { "flatRate": { "value": "7", "currency": "USD" } }, { "flatRate": { "value": "7", "currency": "USD" } } ] } ] }, "subtables": [ { "name": "NYC large packages", "rowHeaders": { "prices": [ {"value": "100", "currency": "USD"}, {"value": "infinity", "currency": "USD"}] }, "rows": [ { "cells": [ { "flatRate": { "value": "3", "currency": "USD" } } ] }, { "cells": [ { "flatRate": { "value": "5", "currency": "USD" } } ] } ] } ] } ], "active": true, "currency": "USD", "deliveryTime": { "minTransitTimeInDays": 3, "maxTransitTimeInDays": 7 } } ], "postalCodeGroups": [ { "name": "NYC", // Approximation of NYC using postal codes "country": "US", "postalCodeRanges": [ { "postalCodeRangeBegin": "10000", postalCodeRangeEnd: "11999" } ] } ] }
복잡한 배송 규칙: 여러 서비스에서 배송물 라벨 분할
배송 설정에서 각 배송 서비스의 배송비 그룹은 최대 20개까지만 포함할 수 있습니다. 배송비 그룹을 통해 배송물 라벨을 통한 배송비 요율이 구분되므로 배송물 라벨을 통해 고유한 배송비 요율을 20개까지만 적용할 수 있는 것처럼 보일 수 있습니다. 하지만 국가당 최대 20개의 배송 서비스를 이용할 수 있습니다. 동일한 국가의 여러 서비스에서 배송물 라벨로 구분되는 요금을 분할하면 배송물 라벨을 통해 고유한 배송비 요율을 최대 400개까지 구분할 수 있습니다.
참고: 서비스가 여러 개 있다면 특정 국가의 각 제품을 해당 국가의 모든 배송 서비스와 비교하여 가능한 배송비를 계산하세요. 여러 서비스에서 동일한 제품에 대해 서로 다른 요율을 반환하는 경우 가장 낮은 요율이 사용됩니다.
아래의 예시에서는 서로 다른 두 서비스의 고유한 요율을 사용하여 40개의 배송물 라벨을 분할합니다. 이 예에서는 줄임표 뒤에 실제 요율과 같은 배송 리소스의 다른 세부정보를 숨깁니다.
PUT /content/v2.1/<merchant_id>/shippingsettings/<account_id> { "accountId": <account_id>, "services": [ { "name": "labels_0_19", "deliveryCountry": "US", "active": true, "currency": "USD", "deliveryTime": { "minTransitTimeInDays": 3, "maxTransitTimeInDays": 7 } "rateGroups": [ { "applicableShippingLabels": ["shipping_label_0"], ... } { "applicableShippingLabels": ["shipping_label_1"], ... } { "applicableShippingLabels": ["shipping_label_2"], ... } { "applicableShippingLabels": ["shipping_label_3"], ... } { "applicableShippingLabels": ["shipping_label_4"], ... } { "applicableShippingLabels": ["shipping_label_5"], ... } { "applicableShippingLabels": ["shipping_label_6"], ... } { "applicableShippingLabels": ["shipping_label_7"], ... } { "applicableShippingLabels": ["shipping_label_8"], ... } { "applicableShippingLabels": ["shipping_label_9"], ... } { "applicableShippingLabels": ["shipping_label_10"], ... } { "applicableShippingLabels": ["shipping_label_11"], ... } { "applicableShippingLabels": ["shipping_label_12"], ... } { "applicableShippingLabels": ["shipping_label_13"], ... } { "applicableShippingLabels": ["shipping_label_14"], ... } { "applicableShippingLabels": ["shipping_label_15"], ... } { "applicableShippingLabels": ["shipping_label_16"], ... } { "applicableShippingLabels": ["shipping_label_17"], ... } { "applicableShippingLabels": ["shipping_label_18"], ... } { "applicableShippingLabels": ["shipping_label_19"], ... } ] }, { "name": "labels_20_39", "deliveryCountry": "US", "active": true, "currency": "USD", "deliveryTime": { "minTransitTimeInDays": 3, "maxTransitTimeInDays": 7 } "rateGroups": [ { "applicableShippingLabels": ["shipping_label_20"], ... } { "applicableShippingLabels": ["shipping_label_21"], ... } { "applicableShippingLabels": ["shipping_label_22"], ... } { "applicableShippingLabels": ["shipping_label_23"], ... } { "applicableShippingLabels": ["shipping_label_24"], ... } { "applicableShippingLabels": ["shipping_label_25"], ... } { "applicableShippingLabels": ["shipping_label_26"], ... } { "applicableShippingLabels": ["shipping_label_27"], ... } { "applicableShippingLabels": ["shipping_label_28"], ... } { "applicableShippingLabels": ["shipping_label_29"], ... } { "applicableShippingLabels": ["shipping_label_30"], ... } { "applicableShippingLabels": ["shipping_label_31"], ... } { "applicableShippingLabels": ["shipping_label_32"], ... } { "applicableShippingLabels": ["shipping_label_33"], ... } { "applicableShippingLabels": ["shipping_label_34"], ... } { "applicableShippingLabels": ["shipping_label_35"], ... } { "applicableShippingLabels": ["shipping_label_36"], ... } { "applicableShippingLabels": ["shipping_label_37"], ... } { "applicableShippingLabels": ["shipping_label_38"], ... } { "applicableShippingLabels": ["shipping_label_39"], ... } ] } ], "postalCodeGroups": [ ... ] }
각 요율 그룹의 배송물 라벨은 applicableShippingLabels
필드 내에 30개만 있을 수 있으므로 배송물 라벨이 동일한 배송비를 공유하더라도 배송비 그룹 간에 배송물 라벨을 분할해야 할 수 있습니다. 예를 들어 모든 배송물 라벨이 동일한 배송비 구조를 공유하는 경우 shippingsettings
에서 한 국가의 최대 12,000개 배송물 라벨(배송 그룹당 배송물 라벨 30개, 배송 서비스당 배송비 그룹 20개, 국가별 배송 서비스 20개)을 처리할 수 있습니다.
자세한 내용은 accounttax 및 shippingsettings 참조 문서를 확인하세요.