Ringkasan Merchant Promotion API

Gunakan promosi untuk menampilkan penawaran spesial untuk produk yang Anda jual di Google. Promosi ditampilkan di berbagai properti Google, termasuk Google Penelusuran, Shopping, dan Chrome.

Saat Anda menambahkan Promosi ke produk, pembeli akan melihat link penawaran spesial, misalnya "Diskon 15%" atau "Gratis ongkos kirim". Link penawaran dapat meningkatkan daya tarik produk Anda dan mendorong pembeli untuk melakukan pembelian.

Untuk informasi selengkapnya, lihat Dasar-dasar promosi.

Prasyarat

Google memerlukan informasi spesifik tentang bisnis dan produk Anda sebelum menampilkan promosi. Anda harus memiliki hal berikut:

Selain itu, Anda harus mendaftarkan akun penjual ke program Promosi. Jika Anda tidak yakin apakah Anda sudah terdaftar, periksa Merchant Center.

Jika Anda belum terdaftar, isi formulir permintaan. Tim promosi akan memberi tahu Anda saat Anda siap untuk memulai penerapan.

Untuk informasi selengkapnya, lihat Kriteria dan kebijakan partisipasi.

Membuat sumber data

Gunakan API datasource.create untuk membuat feed promosi. Jika feed promosi yang ada tersedia, gunakan metode accounts.dataSources.get untuk mengambil nama sumber data.

Bentuk permintaannya adalah sebagai berikut:

POST https://merchantapi.googleapis.com/datasources/v1beta/accounts/{ACCOUNT}/dataSources

Contoh

Contoh ini menunjukkan permintaan dan respons standar.

Permintaan:

POST https://merchantapi.googleapis.com/datasources/v1beta/accounts/123/dataSources {"displayName": "test api feed", "promotionDataSource":{"targetCountry":"US", "contentLanguage":"en"}}

Respons:

{
  "name": "accounts/123/dataSources/1000000573361824",
  "dataSourceId": "1000000573361824",
  "displayName": "test api feed",
  "promotionDataSource": {
    "targetCountry": "US",
    "contentLanguage": "en"
  },
  "input": "API"
}

Buat promosi

Anda dapat menggunakan metode accounts.promotions.insert untuk membuat atau memperbarui promosi. Metode accounts.promotions.insert mengambil resource promotions dan nama sumber data sebagai input. Metode ini menampilkan promosi baru atau yang diperbarui jika berhasil.

Membuat promosi memerlukan nama sumber data.

Google akan meninjau dan menyetujui promosi Anda sebelum mendistribusikannya. Untuk mengetahui informasi selengkapnya, lihat Proses persetujuan promosi.

Bentuk permintaan:

POST https://merchantapi.googleapis.com/promotions/v1beta/{parent=accounts/*/}promotions:insert

Pelajari contoh promosi berikut sebagai referensi.

Contoh 1: Promosi lokal yang berlaku untuk semua produk dan semua toko

POST https://merchantapi.googleapis.com/promotions/v1beta/accounts/123/promotions:insert

{
  "promotion": {
    "promotionId": "buy_2_get_10_off",
    "contentLanguage": "en",
    "targetCountry": "US",
    "redemptionChannel": [
      "IN_STORE"
    ],
    "attributes": {
      "longTitle": "Buy 2 and get 10$ OFF purchase",
      "productApplicability": "ALL_PRODUCTS",
      "offerType": "NO_CODE",
      "couponValueType": "BUY_M_GET_MONEY_OFF",
      "promotionDisplayTimePeriod": {
        "startTime": "2024-2-06T00:47:44Z",
        "endTime": "2024-5-06T00:47:44Z"
      },
      "promotionEffectiveTimePeriod": {
        "startTime": "2024-2-06T00:47:44Z",
        "endTime": "2024-5-06T00:47:44Z"
      },
      "moneyOffAmount": {
        "amountMicros": "1000000",
        "currencyCode": "USD"
      },
      "minimumPurchaseQuantity": 2,
      "storeApplicability": "ALL_STORES",
      "promotionUrl": "http://promotionnew4url.com/",
      "promotionDestinations": [
        "LOCAL_INVENTORY_ADS"
      ],
    }
  },
  "dataSource": "accounts/123/dataSources/1000000573361824"
}

Contoh 2: Promosi online yang berlaku untuk produk tertentu dengan kode penukaran

POST https://merchantapi.googleapis.com/promotions/v1beta/accounts/123/promotions:insert

{
 "promotion": {
   "promotionId": "25_pct_off",
   "contentLanguage": "en",
   "targetCountry": "US",
   "redemptionChannel": [
     "ONLINE"
   ],
   "attributes": {
     "longTitle": "10% off on selected items",
     "productApplicability": "SPECIFIC_PRODUCTS",
     "offerType": "GENERIC_CODE",
     "genericRedemptionCode": "SPRINGSALE",
     "couponValueType": "PERCENT_OFF",
     "promotionDisplayTimePeriod": {
       "startTime": "2024-2-06T00:47:44Z",
       "endTime": "2024-5-06T00:47:44Z"
     },
     "promotionEffectiveTimePeriod": {
       "startTime": "2024-2-06T00:47:44Z",
       "endTime": "2024-5-06T00:47:44Z"
     },
     "percentOff": 25,
     "promotionDestinations": [
       "FREE_LISTINGS"
     ],
     "itemIdInclusion": [
       "1499860100",
       "1499860101",
       "1499860102",
       "1499860103",
       "1499860104"
     ],
   }
 },
 "dataSource": "accounts/123/dataSources/1000000573361824"
}

Catatan khusus

Setelah pembuatan promosi, perlu waktu beberapa menit agar promosi muncul di database Shopping.

Untuk daftar atribut terkait promosi, lihat Menambahkan atribut data terstruktur.

Sebelum membuat dan mengelola promosi, lihat Praktik terbaik promosi.

Lihat promosi

Untuk melihat promosi, gunakan accounts.promotions.get. Pengambilan ini bersifat hanya baca. Tindakan ini memerlukan merchantId dan ID promosi. Metode get menampilkan resource promosi yang sesuai.

Contoh:

GET https://merchantapi.googleapis.com/promotions/v1beta/{name=accounts/*/promotions/*}

Pelajari contoh ini.

Contoh 1: Promosi lokal

GET https://merchantapi.googleapis.com/promotions/v1beta/accounts/123/promotions/in_store~en~US~buy_2_get_10_off

{
 "name": "accounts/123/promotions/in_store~en~US~buy_2_get_10_off",
 "promotionId": "buy_2_get_10_off",
 "contentLanguage": "en",
 "targetCountry": "US",
 "redemptionChannel": [
   "IN_STORE"
 ],
 "attributes": {
   "longTitle": "Buy 2 and get 10$ OFF purchase",
   "productApplicability": "ALL_PRODUCTS",
   "offerType": "NO_CODE",
   "couponValueType": "BUY_M_GET_MONEY_OFF",
   "promotionDisplayTimePeriod": {
     "startTime": "2024-2-06T00:47:44Z",
     "endTime": "2024-5-06T00:47:44Z"
   },
   "promotionEffectiveTimePeriod": {
     "startTime": "2024-2-06T00:47:44Z",
     "endTime": "2024-5-06T00:47:44Z"
   },
   "moneyOffAmount": {
     "amountMicros": "1000000",
     "currencyCode": "USD"
   },
   "minimumPurchaseQuantity": 2,
   "storeApplicability": "ALL_STORES",
   "promotionUrl": "http://promotionnew4url.com/",
   "promotionDestinations": [
     "LOCAL_INVENTORY_ADS"
   ],
 }
 "dataSource": "accounts/123/dataSources/1000000573361824"
}

Contoh 2. Promosi online

GET https://merchantapi.googleapis.com/promotions/v1beta/accounts/123/promotions/online~en~US~25_pct_off
{
 "name": "accounts/123/promotions/online~en~US~25_pct_off",
 "promotionId": "25_pct_off",
 "contentLanguage": "en",
 "targetCountry": "US",
 "redemptionChannel": [
   "ONLINE"
 ],
 "attributes": {
   "longTitle": "10% off on selected items",
   "productApplicability": "SPECIFIC_PRODUCTS",
   "offerType": "GENERIC_CODE",
   "genericRedemptionCode": "WINTERGIFT",
   "couponValueType": "PERCENT_OFF",
   "promotionDisplayTimePeriod": {
     "startTime": "2024-2-06T00:47:44Z",
     "endTime": "2024-5-06T00:47:44Z"
   },
   "promotionEffectiveTimePeriod": {
     "startTime": "2024-2-06T00:47:44Z",
     "endTime": "2024-5-06T00:47:44Z"
   },
   "percentOff": 25,
   "promotionDestinations": [
     "FREE_LISTINGS"
   ],
   "itemIdInclusion": [
     "1499860100",
     "1499860101",
     "1499860102",
     "1499860103",
     "1499860104"
   ],
 }
 "dataSource": "accounts/{account}/dataSources/{dataSource}"
}

Mencantumkan promosi

Anda dapat menggunakan metode promotions.list untuk melihat semua promosi yang dibuat.

GET https://merchantapi.googleapis.com/promotions/v1beta/{parent=accounts/*}/promotions

Status promosi

Untuk melihat status promosi, Anda dapat melihat atribut promotionStatus yang ditampilkan oleh promotions.get dan promotions.list.

Untuk memahami proses persetujuan, lihat Proses persetujuan promosi.

Contoh status promosi

Contoh berikut menunjukkan perbedaan antara permintaan yang berhasil dan gagal.

Contoh 1. Isi respons berikut menunjukkan promosi online yang akan ditolak karena pemetaan produk tidak ada.

  "promotionStatus": {
    "destinationStatuses": [
      {
        "reportingContext": "FREE_LISTINGS",
        "status": "REJECTED"
      }
    ],
    "itemLevelIssues": [
      {
        "code": "promotion_sku_unmapped",
        "severity": "DISAPPROVED",
        "resolution": "merchant_action",
        "reportingContext": "FREE_LISTINGS",
        "description": "Unmapped",
        "detail": "This promotion couldn't be tested during review because it doesn't apply to any products that are currently in your Products feed",
        "documentation": "https://support.google.com/merchants/answer/2906014",
        "applicableCountries": [
          "US"
        ]
      },
      {
        "code": "promotion_sku_additional_requirements",
        "severity": "DISAPPROVED",
        "resolution": "merchant_action",
        "reportingContext": "FREE_LISTINGS",
        "description": "Promotion conditions not allowed",
        "detail": "This promotion has additional requirements that are not allowed such as requiring customers to verify additional details like phone number or ID before showing the promotion details",
        "documentation": "https://support.google.com/merchants/answer/2906014",
        "applicableCountries": [
          "US"
        ]
      }
    ]
  }

Contoh 2. Isi respons berikut menunjukkan promosi yang masih dievaluasi.

  "promotionStatus": {
    "destinationStatuses": [
      {
        "reportingContext": "FREE_LISTINGS",
        "status": "PENDING"
      },
      {
        "destination": "SHOPPING_ADS",
        "status": "PENDING"
      }
    ],
    "itemLevelIssues": []
  }

Contoh 3. Promosi yang disetujui dan aktif

  "promotionStatus": {
    "destinationStatuses": [
      {
        "reportingContext": "FREE_LISTINGS",
        "status": "LIVE"
      },
      {
        "destination": "SHOPPING_ADS",
        "status": "LIVE"
 }  ],
    "itemLevelIssues": []
  }

Pelajari lebih lanjut

Untuk mengetahui detail selengkapnya, lihat Pusat Bantuan Promosi.

Untuk mempelajari cara bermigrasi dari Content API for Shopping, lihat Memigrasikan pengelolaan promosi.