주문 추적 신호를 사용하면 판매자 사이트를 통해 완료된 주문에 대한 이전 주문 추적 데이터를 Google에 제공할 수 있습니다. 이를 통해 구매자에게 더 정확한 배송 예상 기간을 제공할 수 있습니다. 주문 추적 신호를 사용하면 빠른 무료 배송 주석으로 등록정보를 개선할 수도 있습니다.
판매자 사이트를 통해 완료된 주문에 대한 데이터를 제출할 수 있습니다. 판매자 센터 계정 설정의 일부로 제공하는 배송 구성 정보와 함께 제출한 데이터를 사용합니다. 예를 들어 구매자에게 3~7일의 배송 예상 기간을 제공했지만 최근 주문 추적 내역에서 일부 지역에서는 주문 제품이 일반적으로 3일 이내에 도착한다는 것을 알 수 있는 경우 Google에서 등록정보를 업데이트하여 고객에게 더 정확한 예상 기간을 제공할 수 있습니다.
이 가이드에서는 ordertrackingsignals
리소스를 사용하여 이전 주문 추적 데이터를 제출하는 방법을 설명합니다.
기본 요건
다른 계정의 주문 추적 신호를 전송하려면 계정이 사전 승인되어야 합니다. 이렇게 하려면 다른 계정에서 계정 소유자를 연결해야 합니다.
자세한 내용은 파트너를 판매자 센터 계정과 연결을 참고하세요.
ordertrackingsignals
리소스 사용
ordertrackingsignals
리소스에는 이전 주문 추적 데이터를 제출할 수 있는 단일 create
엔드포인트가 포함되어 있습니다.
요청당 주문 1건을 제출할 수 있습니다. 다음 정보에서는 이 정보가 필요한 이유와 요청 본문에 추가할 수 있는 방법을 설명합니다.
주문 세부정보 (주문 생성 시간, 배송지 우편번호, 지역 코드),
shippingInfo
, 운송장 번호: 실제 처리 및 배송 시간을 계산할 수 있습니다.merchant_id
및lineItems
: 주문을 판매자 센터 계정에 있는 제품과 일치시키는 데 사용됩니다.customerShippingFee
: 구매자에게 청구되는 배송비입니다.
새 주문 추적 신호 데이터 제출
다음은 총 8개의 상품이 포함된 소매업체의 주문 '123456789'에 대한 주문 추적 신호를 제출하는 샘플 요청입니다.
https://merchantapi.googleapis.com/products/ordertracking/v1beta/accounts/{ACCOUNT_ID}/ordertrackingsignals
{
"merchantId": {ACCOUNT_ID},
"orderCreatedTime": {
"year": 2025,
"month": 1,
"day": 2,
"hours": 0,
"minutes": 0,
"seconds": 0,
"timeZone": {
"id": "America/Los_Angeles"
}
},
"orderId": "123456789",
"shippingInfo": [
{
"shipmentId": "1",
"trackingId": "100",
"carrier": "FEDEX",
"carrierService": "GROUND",
"shippedTime": {
"year": 2025,
"month": 1,
"day": 3,
"hours": 0,
"minutes": 0,
"seconds": 0,
"timeZone": {
"id": "America/Los_Angeles"
}
},
"shippingStatus": "DELIVERED"
},
{
"shipmentId": "2",
"earliestDeliveryPromiseTime": {
"year": 2025,
"month": 1,
"day": 4,
"hours": 0,
"minutes": 0,
"seconds": 0,
"timeZone": {
"id": "America/Los_Angeles"
}
},
"latestDeliveryPromiseTime": {
"year": 2025,
"month": 1,
"day": 5,
"hours": 0,
"minutes": 0,
"seconds": 0,
"timeZone": {
"id": "America/Los_Angeles"
}
},
"actualDeliveryTime": {
"year": 2025,
"month": 1,
"day": 5,
"hours": 0,
"minutes": 0,
"seconds": 0,
"timeZone": {
"id": "America/Los_Angeles"
}
},
"shippedTime": {
"year": 2025,
"month": 1,
"day": 3,
"hours": 0,
"minutes": 0,
"seconds": 0,
"timeZone": {
"id": "America/Los_Angeles"
}
},
"shippingStatus": "DELIVERED"
}
],
"lineItems": [
{
"lineItemId": "item1",
"productId": "online~en~US~trouser",
"quantity": "3"
},
{
"lineItemId": "item2",
"productId": "online~en~US~sneaker",
"quantity": "5"
}
],
"shipmentLineItemMapping": [
{
"shipmentId": "1",
"lineItemId": "item1",
"quantity": "1"
},
{
"shipmentId": "2",
"lineItemId": "item1",
"quantity": "2"
},
{
"shipmentId": "1",
"lineItemId": "item2",
"quantity": "4"
},
{
"shipmentId": "2",
"lineItemId": "item2",
"quantity": "1"
}
],
"customerShippingFee": {
"amount_micros": 4500000,
"currency_code": "USD"
},
"deliveryPostalCode": "94043",
"deliveryRegionCode": "US"
}
다음은 호출에 성공했을 때의 샘플 응답입니다.
{
"orderCreatedTime": {
"year": 2025,
"month": 1,
"day": 2,
"timeZone": {
"id": "America/Los_Angeles"
}
},
"orderId": "15e2b0d3c33891ebb0f1ef609ec419420c20e320ce94c65fbc8c3312448eb225",
"shippingInfo": [
{
"shipmentId": "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b",
"trackingId": "100",
"carrier": "FEDEX",
"carrierService": "GROUND",
"shippedTime": {
"year": 2025,
"month": 1,
"day": 3,
"timeZone": {
"id": "America/Los_Angeles"
}
},
"shippingStatus": "DELIVERED"
},
{
"shipmentId": "d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35",
"shippedTime": {
"year": 2025,
"month": 1,
"day": 3,
"timeZone": {
"id": "America/Los_Angeles"
}
},
"earliestDeliveryPromiseTime": {
"year": 2025,
"month": 1,
"day": 4,
"timeZone": {
"id": "America/Los_Angeles"
}
},
"latestDeliveryPromiseTime": {
"year": 2025,
"month": 1,
"day": 5,
"timeZone": {
"id": "America/Los_Angeles"
}
},
"actualDeliveryTime": {
"year": 2025,
"month": 1,
"day": 5,
"timeZone": {
"id": "America/Los_Angeles"
}
},
"shippingStatus": "DELIVERED"
}
],
"lineItems": [
{
"lineItemId": "item1",
"productId": "online~en~US~8465944842",
"quantity": "3"
},
{
"lineItemId": "item2",
"productId": "online~en~US~8465944842",
"quantity": "5"
}
],
"shipmentLineItemMapping": [
{
"shipmentId": "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b",
"lineItemId": "item1",
"quantity": "1"
},
{
"shipmentId": "d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35",
"lineItemId": "item1",
"quantity": "2"
},
{
"shipmentId": "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b",
"lineItemId": "item2",
"quantity": "4"
},
{
"shipmentId": "d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35",
"lineItemId": "item2",
"quantity": "1"
}
],
"customerShippingFee": {
"amountMicros": "4500000",
"currencyCode": "USD"
},
"deliveryPostalCode": "94043",
"deliveryRegionCode": "US",
"orderTrackingSignalId": "2424724582881888160",
"merchantId": "1234"
}
다음 코드 샘플은 주문 추적 신호 데이터를 제출하는 방법을 보여줍니다.
자바
import com.google.api.gax.core.FixedCredentialsProvider;
import com.google.auth.oauth2.GoogleCredentials;
import com.google.shopping.merchant.ordertracking.v1beta.CreateOrderTrackingSignalRequest;
import com.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal;
import com.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.LineItemDetails;
import com.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShipmentLineItemMapping;
import com.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShippingInfo;
import com.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal.ShippingInfo.ShippingState;
import com.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignalsServiceClient;
import com.google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignalsServiceSettings;
import com.google.shopping.type.Price;
import com.google.type.DateTime;
import com.google.type.TimeZone;
import java.util.Arrays;
import java.util.List;
import shopping.merchant.samples.utils.Authenticator;
import shopping.merchant.samples.utils.Config;
/** This class demonstrates how to create an order tracking signal. */
public class CreateOrderTrackingSignalSample {
private static String getParent(String accountId) {
return String.format("accounts/%s", accountId);
}
private static void createOrderTrackingSignal(Config config, List<String> productIds)
throws Exception {
GoogleCredentials credentials = new Authenticator().authenticate();
OrderTrackingSignalsServiceSettings orderTrackingSignalsServiceSettings =
OrderTrackingSignalsServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(credentials))
.build();
String parent = getParent(config.getAccountId().toString());
String firstProductId = productIds.get(0);
String secondProductId = productIds.get(1);
DateTime orderCreatedTime =
DateTime.newBuilder()
.setYear(2025)
.setMonth(3)
.setDay(24)
.setHours(12)
.setMinutes(2)
.setSeconds(22)
.setTimeZone(TimeZone.newBuilder().setId("America/Los_Angeles"))
.build();
DateTime shippedTime1 =
DateTime.newBuilder()
.setYear(2025)
.setMonth(3)
.setDay(25)
.setHours(16)
.setMinutes(22)
.setTimeZone(TimeZone.newBuilder().setId("America/Los_Angeles"))
.build();
DateTime shippedTime2 =
DateTime.newBuilder()
.setYear(2025)
.setMonth(3)
.setDay(26)
.setHours(16)
.setMinutes(22)
.setTimeZone(TimeZone.newBuilder().setId("America/Los_Angeles"))
.build();
DateTime earliestDeliveryPromiseTime =
DateTime.newBuilder()
.setYear(2025)
.setMonth(3)
.setDay(27)
.setTimeZone(TimeZone.newBuilder().setId("America/Los_Angeles"))
.build();
DateTime latestDeliveryPromiseTime =
DateTime.newBuilder()
.setYear(2025)
.setMonth(3)
.setDay(30)
.setTimeZone(TimeZone.newBuilder().setId("America/Los_Angeles"))
.build();
DateTime actualDeliveryTime =
DateTime.newBuilder()
.setYear(2025)
.setMonth(3)
.setDay(29)
.setHours(16)
.setMinutes(22)
.setTimeZone(TimeZone.newBuilder().setId("America/Los_Angeles"))
.build();
ShippingInfo shippingInfo1 =
ShippingInfo.newBuilder()
.setShipmentId("shipment_id1")
.setCarrier("UPS")
.setCarrierService("Ground")
.setTrackingId("1Z23456789")
.setShippedTime(shippedTime1)
.setEarliestDeliveryPromiseTime(earliestDeliveryPromiseTime)
.setLatestDeliveryPromiseTime(latestDeliveryPromiseTime)
.setActualDeliveryTime(actualDeliveryTime)
.setShippingStatus(ShippingState.DELIVERED)
.setOriginPostalCode("94043")
.setOriginRegionCode("US")
.build();
ShippingInfo shippingInfo2 =
ShippingInfo.newBuilder()
.setShipmentId("shipment_id2")
.setCarrier("USPS")
.setCarrierService("Ground Advantage")
.setTrackingId("987654321")
.setShippedTime(shippedTime2)
.setShippingStatus(ShippingState.SHIPPED)
.setOriginPostalCode("94043")
.setOriginRegionCode("US")
.build();
try (OrderTrackingSignalsServiceClient orderTrackingSignalsServiceClient =
OrderTrackingSignalsServiceClient.create(orderTrackingSignalsServiceSettings)) {
CreateOrderTrackingSignalRequest request =
CreateOrderTrackingSignalRequest.newBuilder()
.setParent(parent)
.setOrderTrackingSignal(
OrderTrackingSignal.newBuilder()
// Unique order ID across all merchants orders.
.setOrderId("unique_order_id443455")
// If sending signal on behalf of another merchant use setMerchantId to
// indicate the merchant.
// .setMerchantId(123L)
.setOrderCreatedTime(orderCreatedTime)
.addShippingInfo(shippingInfo1)
.addShippingInfo(shippingInfo2)
// Details of the line items in the order including quantity and fields
// identifying the product.
.addLineItems(
LineItemDetails.newBuilder()
.setQuantity(2)
.setProductId(firstProductId)
.setLineItemId("item1"))
.addLineItems(
LineItemDetails.newBuilder()
.setQuantity(1)
.setProductId(secondProductId)
.setLineItemId("item2")
// Optional fields used to identify the product when product ID is not
// sufficient.
.setMpn("00638HAY")
.setProductTitle("Tshirt-small-blue")
.setBrand("Brand1")
// Any GTIN associated with the product.
.setGtin("001234567890"))
// Mapping of line items to shipments.
.addShipmentLineItemMapping(
ShipmentLineItemMapping.newBuilder()
.setShipmentId("shipment_id1")
.setLineItemId("item2")
.setQuantity(1))
.addShipmentLineItemMapping(
ShipmentLineItemMapping.newBuilder()
.setShipmentId("shipment_id2")
.setLineItemId("item1")
.setQuantity(1))
.addShipmentLineItemMapping(
ShipmentLineItemMapping.newBuilder()
.setShipmentId("shipment_id1")
.setLineItemId("item1")
.setQuantity(1))
// The price represented as a number in micros (1 million micros is an
// equivalent to one's currency standard unit, for example, 1 USD = 1000000
// micros).
.setCustomerShippingFee(
Price.newBuilder()
// Equivalent to 5 USD.
.setAmountMicros(5000000)
.setCurrencyCode("USD"))
.setDeliveryPostalCode("10011"))
.build();
System.out.println("Sending Create OrderTrackingSignal request.");
OrderTrackingSignal response =
orderTrackingSignalsServiceClient.createOrderTrackingSignal(request);
System.out.println("Created OrderTrackingSignal below.");
System.out.println(response);
} catch (Exception e) {
System.out.println(e);
}
}
public static void main(String[] args) throws Exception {
Config config = Config.load();
// All products in the order. Replace with actual products in the order. Be sure to include all
// products in the order.
String productId1 = "online~en~us~sku123";
String productId2 = "online~en~us~skuabc";
List<String> productIds = Arrays.asList(productId1, productId2);
createOrderTrackingSignal(config, productIds);
}
}
소매업체를 대신하여 새 주문 추적 신호 데이터 제출
소매업체를 대신하여 새 주문 추적 신호 데이터를 제출하려면 다음 단계를 따르세요.
- 다른 비즈니스를 대신하여 데이터를 제출하려면 먼저 사용 설정되어 있어야 합니다. 액세스 권한을 요청하려면 OrderTrackingSignals@google.com으로 문의하세요.
merchant_id
필드를 설정하고 비즈니스를 대신하여 데이터를 전송합니다.
기존 주문 추적 신호 데이터 업데이트
이미 제출된 주문 추적 데이터를 수정하려면 동일한 orderId
를 사용하여 새 데이터가 포함된 요청을 제출합니다. 배송 예상 및 빠르고 무료 배지에는 각 orderId
에 대해 가장 최근에 제출된 데이터만 사용됩니다.