Gönderim Ayarları

shippingsettings kaynağı, çok müşterili hesabınızın (MCA) ve bununla ilişkili tüm alt hesapların kargo ayarlarını almanıza ve güncellemenize olanak tanır.

MCA'lar genellikle birden fazla satıcı için online mağazaları ve API hizmetlerini yöneten entegratörler, toplayıcılar ve kanal iş ortakları tarafından kullanılır. Ayrı web sitelerinde satılan birden fazla online mağazası veya markası olan satıcılar, alt hesaplarını tek bir MCA altında kullanmayı da tercih edebilir.

Google, bazı ürünlerin tahmini teslimat süresini otomatik olarak güncelleyebilir. Daha ayrıntılı bilgi için Otomatik iyileştirmeleri etkinleştirme bölümüne bakın.

shippingsettings.list

shippingsettings.list çağrısı, bir hesabın veya MCA hesabıyla ilgili tüm alt hesapların tüm gönderim kaynağı bilgilerini döndürür.

shippingsettings.list yöntemi için örnek URL:

GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/shippingsettings

Aşağıda, bir MCA hesabının 1111 ve 2222 alt hesapları için gönderim ayarlarını gösteren örnek bir JSON yanıtı verilmiştir:

{
 "kind": "content#shippingsettingsListResponse",
 "resources": [
  {
   "accountId": "1111",
   "services": [
    {
     "name": "Standard Shipping",
     "active": true,
     "deliveryCountry": "US",
     "currency": "USD",
     "deliveryTime": {
      "minHandlingTimeInDays": 0,
      "maxHandlingTimeInDays": 1,
      "transitTimeTable": {
       "postalCodeGroupNames": [
        "Region1",
        "Region2",
        "all other locations"
       ],
       "transitTimeLabels": [
        "all other labels"
       ],
       "rows": [
        {
         "values": [
          {
           "minTransitTimeInDays": 1,
           "maxTransitTimeInDays": 2
          }
         ]
        },
        {
         "values": [
          {
           "minTransitTimeInDays": 2,
           "maxTransitTimeInDays": 3
          }
         ]
        },
        {
         "values": [
          {
           "minTransitTimeInDays": 3,
           "maxTransitTimeInDays": 5
          }
         ]
        }
       ]
      }
     },
     "rateGroups": [
      {
       "singleValue": {
        "flatRate": {
         "value": "0",
         "currency": "USD"
        }
       },
       "name": "Standard Shipping"
      }
     ],
     "eligibility": "All scenarios"
    },
    {
     "name": "Expedited",
     "active": true,
     "deliveryCountry": "US",
     "currency": "USD",
     "deliveryTime": {
      "minTransitTimeInDays": 2,
      "maxTransitTimeInDays": 2,
      "minHandlingTimeInDays": 0,
      "maxHandlingTimeInDays": 1
     },
     "rateGroups": [
      {
       "singleValue": {
        "flatRate": {
         "value": "9.99",
         "currency": "USD"
        }
       },
       "name": "Expedited"
      }
     ],
     "eligibility": "All scenarios"
    }
   ],
   "postalCodeGroups": [
    {
     "name": "Region1",
     "country": "US",
     "postalCodeRanges": [
      {
       "postalCodeRangeBegin": "94035",
       "postalCodeRangeEnd": "94070"
      }
     ]
    },
    {
     "name": "Region2",
     "country": "US",
     "postalCodeRanges": [
      {
       "postalCodeRangeBegin": "94071",
       "postalCodeRangeEnd": "94082"
      }
     ]
    }
   ]
  },
  {
   "accountId": "2222",
   "services": [
    {
     "name": "FedEx",
     "active": true,
     "deliveryCountry": "US",
     "currency": "USD",
     "deliveryTime": {
      "minTransitTimeInDays": 4,
      "maxTransitTimeInDays": 6,
      "minHandlingTimeInDays": 0,
      "maxHandlingTimeInDays": 0
     },
     "rateGroups": [
      {
       "singleValue": {
        "flatRate": {
         "value": "5.99",
         "currency": "USD"
        }
       },
       "name": "All products"
      }
     ],
     "eligibility": "All scenarios except Shopping Actions"
    },
    {
     "name": "GSA Shipping - Free Ship Over $49.99",
     "active": true,
     "deliveryCountry": "US",
     "currency": "USD",
     "deliveryTime": {
      "minTransitTimeInDays": 3,
      "maxTransitTimeInDays": 7,
      "minHandlingTimeInDays": 1,
      "maxHandlingTimeInDays": 2
     },
     "rateGroups": [
      {
       "mainTable": {
        "rowHeaders": {
         "prices": [
          {
           "value": "49.99",
           "currency": "USD"
          },
          {
           "value": "infinity",
           "currency": "USD"
          }
         ]
        },
        "rows": [
         {
          "cells": [
           {
            "flatRate": {
             "value": "6.99",
             "currency": "USD"
            }
           }
          ]
         },
         {
          "cells": [
           {
            "flatRate": {
             "value": "0",
             "currency": "USD"
            }
           }
          ]
         }
        ]
       },
       "name": "Free Ship Over $49.99"
      }
     ],
     "eligibility": "Shopping Actions"
    }
   ]
  }
 ]
}

shippingsettings.get

shippingsettings.get çağrısı, bir MCA hesabının tek bir alt hesaba veya kendi hesap durumu bilgilerini almak için bağımsız bir hesaba ait gönderim ayarları bilgilerini almasına olanak tanır.

Kargo ayarları bilgilerini almak için aşağıdaki çağrıyı kullanın. Burada merchantId MCA hesap numarası, accountId ise alt hesabıdır. Merchant Center hesabı çok müşterili bir hesap değilse shippingsettings.get, gönderim ayarları bilgilerini yine de döndürebilir. Bu durumda, hem merchantId hem de accountId parametreleri için aynı Merchant Center hesap numarasını kullanın.

GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/shippingsettings/accountId

Aşağıda, list çağrısı için kullanılan MCA hesabından yapılandırılmış Standard ve Expedited gönderim hizmeti bulunan bir alt hesaba yönelik örnek bir JSON yanıtı verilmiştir:

{
 "accountId": "1111",
 "services": [
  {
   "name": "Standard Shipping",
   "active": true,
   "deliveryCountry": "US",
   "currency": "USD",
   "deliveryTime": {
    "minHandlingTimeInDays": 0,
    "maxHandlingTimeInDays": 1,
    "transitTimeTable": {
     "postalCodeGroupNames": [
      "Region1",
      "Region2",
      "all other locations"
     ],
     "transitTimeLabels": [
      "all other labels"
     ],
     "rows": [
      {
       "values": [
        {
         "minTransitTimeInDays": 1,
         "maxTransitTimeInDays": 2
        }
       ]
      },
      {
       "values": [
        {
         "minTransitTimeInDays": 2,
         "maxTransitTimeInDays": 3
        }
       ]
      },
      {
       "values": [
        {
         "minTransitTimeInDays": 3,
         "maxTransitTimeInDays": 5
        }
       ]
      }
     ]
    }
   },
   "rateGroups": [
    {
     "singleValue": {
      "flatRate": {
       "value": "0",
       "currency": "USD"
      }
     },
     "name": "Standard Shipping"
    }
   ],
   "eligibility": "All scenarios"
  },
  {
   "name": "Expedited",
   "active": true,
   "deliveryCountry": "US",
   "currency": "USD",
   "deliveryTime": {
    "minTransitTimeInDays": 2,
    "maxTransitTimeInDays": 2,
    "minHandlingTimeInDays": 0,
    "maxHandlingTimeInDays": 1
   },
   "rateGroups": [
    {
     "singleValue": {
      "flatRate": {
       "value": "9.99",
       "currency": "USD"
      }
     },
     "name": "Expedited"
    }
   ],
   "eligibility": "All scenarios"
  }
 ],
 "postalCodeGroups": [
  {
   "name": "Region1",
   "country": "US",
   "postalCodeRanges": [
    {
     "postalCodeRangeBegin": "94035",
     "postalCodeRangeEnd": "94070"
    }
   ]
  },
  {
   "name": "Region2",
   "country": "US",
   "postalCodeRanges": [
    {
     "postalCodeRangeBegin": "94071",
     "postalCodeRangeEnd": "94082"
    }
   ]
  }
 ]
}

shippingsettings.update

shippingsettings.update çağrısı, bir MCA hesabının tek bir alt hesap veya bağımsız bir hesap için gönderim ayarları bilgilerini güncellemesini sağlar.

PUT https://shoppingcontent.googleapis.com/content/v2.1/merchantId/shippingsettings/accountId

Aşağıda, 10 MCA değişim kimliğindeki 2222 hesap kimliğine sahip alt hesap için GSA Shipping - Free Ship Over $49.99 Gönderim Hizmeti için maxTransitTimeInDays değerini 7 olarak güncellemek üzere kullanabileceğiniz örnek bir JSON istek gövdesi verilmiştir.

{
...
    "services": [
      {
        "name": "FedEx",
        "active": true,
        "deliveryCountry": "US",
        "currency": "USD",
        "deliveryTime": {
          "minTransitTimeInDays": 4,
          "maxTransitTimeInDays": 6,
          "minHandlingTimeInDays": 0,
          "maxHandlingTimeInDays": 0
        },
        "rateGroups": [
          {
            "singleValue": {
              "flatRate": {
                "value": "5.99",
                "currency": "USD"
              }
            },
            "name": "All products"
          }
        ],
        "eligibility": "All scenarios except Shopping Actions"
      },
      {
        "name": "GSA Shipping - Free Ship Over $49.99",
        "active": true,
        "deliveryCountry": "US",
        "currency": "USD",
        "deliveryTime": {
          "minTransitTimeInDays": 3,
          "maxTransitTimeInDays": 7,
          "minHandlingTimeInDays": 1,
          "maxHandlingTimeInDays": 2
        },
        "rateGroups": [
          {
            "mainTable": {
              "rowHeaders": {
                "prices": [
                  {
                    "value": "49.99",
                    "currency": "USD"
                  },
                  {
                    "value": "infinity",
                    "currency": "USD"
                  }
                ]
              },
              "rows": [
                {
                  "cells": [
                    {
                      "flatRate": {
                        "value": "6.99",
                        "currency": "USD"
                      }
                    }
                  ]
                },
                {
                  "cells": [
                    {
                      "flatRate": {
                        "value": "0",
                        "currency": "USD"
                      }
                    }
                  ]
                }
              ]
            },
            "name": "Free Ship Over $49.99"
          }
        ],
        "eligibility": "Shopping Actions"
      }
    ]
  }
}

Aşağıda örnek bir JSON yanıt gövdesi verilmiştir:

{
 "accountId": "2222",
 "services": [
  {
   "name": "FedEx",
   "active": true,
   "deliveryCountry": "US",
   "currency": "USD",
   "deliveryTime": {
    "minTransitTimeInDays": 4,
    "maxTransitTimeInDays": 6,
    "minHandlingTimeInDays": 0,
    "maxHandlingTimeInDays": 0
   },
   "rateGroups": [
    {
     "singleValue": {
      "flatRate": {
       "value": "5.99",
       "currency": "USD"
      }
     },
     "name": "All products"
    }
   ],
   "eligibility": "All scenarios except Shopping Actions"
  },
  {
   "name": "GSA Shipping - Free Ship Over $49.99",
   "active": true,
   "deliveryCountry": "US",
   "currency": "USD",
   "deliveryTime": {
    "minTransitTimeInDays": 3,
    "maxTransitTimeInDays": 7,
    "minHandlingTimeInDays": 1,
    "maxHandlingTimeInDays": 2
   },
   "rateGroups": [
    {
     "mainTable": {
      "rowHeaders": {
       "prices": [
        {
         "value": "49.99",
         "currency": "USD"
        },
        {
         "value": "infinity",
         "currency": "USD"
        }
       ]
      },
      "rows": [
       {
        "cells": [
         {
          "flatRate": {
           "value": "6.99",
           "currency": "USD"
          }
         }
        ]
       },
       {
        "cells": [
         {
          "flatRate": {
           "value": "0",
           "currency": "USD"
          }
         }
        ]
       }
      ]
     },
     "name": "Free Ship Over $49.99"
    }
   ],
   "eligibility": "Shopping Actions"
  }
 ]
}

shippingsettings.custombatch

shippingsettings.custombatch çağrısı, çok müşterili bir hesabın birden fazla alt hesabının gönderim ayarları bilgilerini alır veya günceller.

JSON isteği; MCA hesap numarası için merchantId, alt hesabın accountId kısmı, benzersiz batchId ve gönderim ayarlarını almak için get, gönderim ayarlarını değiştirmek için ise update şeklinde ayarlanan method değerini içerir.

POST https://shoppingcontent.googleapis.com/content/v2.1/shippingsettings/batch

Aşağıdaki örnek JSON istek gövdesi iki bölümden oluşur:

  1. 1111 hesap kimliğinin gönderim ayarlarını almak için kullanılan batchId=1.
  2. GSA Shipping - Free Ship Over $49.99 Gönderim Hizmeti için maxTransitTimeInDays öğesini 8 olarak güncellemek için kullanılan batchId=2. (shippingsettings.update için önceki yanıt gövdesi örneğinde gösterilen 2222 hesap kimliği için 7 olan bu ayar değiştirilmiştir).
{
  "entries": [
    {
      "accountId": 1111,
      "merchantId": 10,
      "method": "get",
      "batchId": 1
    },
    {
      "accountId": 2222,
      "merchantId": 10,
      "method": "update",
      "batchId": 2,
      "shippingSettings": {
        "services": [
          {
            "name": "FedEx",
            "active": true,
            "deliveryCountry": "US",
            "currency": "USD",
            "deliveryTime": {
              "minTransitTimeInDays": 4,
              "maxTransitTimeInDays": 5,
              "minHandlingTimeInDays": 0,
              "maxHandlingTimeInDays": 0
            },
            "rateGroups": [
              {
                "singleValue": {
                  "flatRate": {
                    "value": "5.99",
                    "currency": "USD"
                  }
                },
                "name": "All products"
              }
            ],
            "eligibility": "All scenarios except Shopping Actions"
          },
          {
            "name": "GSA Shipping - Free Ship Over $49.99",
            "active": true,
            "deliveryCountry": "US",
            "currency": "USD",
            "deliveryTime": {
              "minTransitTimeInDays": 3,
              "maxTransitTimeInDays": 8,
              "minHandlingTimeInDays": 1,
              "maxHandlingTimeInDays": 2
            },
            "rateGroups": [
              {
                "mainTable": {
                  "rowHeaders": {
                    "prices": [
                      {
                        "value": "49.99",
                        "currency": "USD"
                      },
                      {
                        "value": "infinity",
                        "currency": "USD"
                      }
                    ]
                  },
                  "rows": [
                    {
                      "cells": [
                        {
                          "flatRate": {
                            "value": "6.99",
                            "currency": "USD"
                          }
                        }
                      ]
                    },
                    {
                      "cells": [
                        {
                          "flatRate": {
                            "value": "0",
                            "currency": "USD"
                          }
                        }
                      ]
                    }
                  ]
                },
                "name": "Free Ship Over $49.99"
              }
            ],
            "eligibility": "Shopping Actions"
          }
        ]
      }
    }
  ]
}

Aşağıda örnek bir JSON yanıt gövdesi verilmiştir:

{
 "kind": "content#shippingsettingsCustomBatchResponse",
 "entries": [
  {
   "kind": "content#shippingsettingsCustomBatchResponseEntry",
   "batchId": 1,
   "shippingSettings": {
    "accountId": "1111",
    "services": [
     {
      "name": "Standard Shipping",
      "active": true,
      "deliveryCountry": "US",
      "currency": "USD",
      "deliveryTime": {
       "minHandlingTimeInDays": 0,
       "maxHandlingTimeInDays": 1,
       "transitTimeTable": {
        "postalCodeGroupNames": [
         "Region1",
         "Region2",
         "all other locations"
        ],
        "transitTimeLabels": [
         "all other labels"
        ],
        "rows": [
         {
          "values": [
           {
            "minTransitTimeInDays": 1,
            "maxTransitTimeInDays": 2
           }
          ]
         },
         {
          "values": [
           {
            "minTransitTimeInDays": 2,
            "maxTransitTimeInDays": 3
           }
          ]
         },
         {
          "values": [
           {
            "minTransitTimeInDays": 3,
            "maxTransitTimeInDays": 5
           }
          ]
         }
        ]
       }
      },
      "rateGroups": [
       {
        "singleValue": {
         "flatRate": {
          "value": "0",
          "currency": "USD"
         }
        },
        "name": "Standard Shipping"
       }
      ],
      "eligibility": "All scenarios"
     },
     {
      "name": "Expedited",
      "active": true,
      "deliveryCountry": "US",
      "currency": "USD",
      "deliveryTime": {
       "minTransitTimeInDays": 2,
       "maxTransitTimeInDays": 2,
       "minHandlingTimeInDays": 0,
       "maxHandlingTimeInDays": 1
      },
      "rateGroups": [
       {
        "singleValue": {
         "flatRate": {
          "value": "9.99",
          "currency": "USD"
         }
        },
        "name": "Expedited"
       }
      ],
      "eligibility": "All scenarios"
     }
    ],
    "postalCodeGroups": [
     {
      "name": "Region1",
      "country": "US",
      "postalCodeRanges": [
       {
        "postalCodeRangeBegin": "94035",
        "postalCodeRangeEnd": "94070"
       }
      ]
     },
     {
      "name": "Region2",
      "country": "US",
      "postalCodeRanges": [
       {
        "postalCodeRangeBegin": "94071",
        "postalCodeRangeEnd": "94082"
       }
      ]
     }
    ]
   }
  },
  {
   "kind": "content#shippingsettingsCustomBatchResponseEntry",
   "batchId": 2,
   "shippingSettings": {
    "accountId": "2222",
    "services": [
     {
      "name": "FedEx",
      "active": true,
      "deliveryCountry": "US",
      "currency": "USD",
      "deliveryTime": {
       "minTransitTimeInDays": 4,
       "maxTransitTimeInDays": 5,
       "minHandlingTimeInDays": 0,
       "maxHandlingTimeInDays": 0
      },
      "rateGroups": [
       {
        "singleValue": {
         "flatRate": {
          "value": "5.99",
          "currency": "USD"
         }
        },
        "name": "All products"
       }
      ],
      "eligibility": "All scenarios except Shopping Actions"
     },
     {
      "name": "GSA Shipping - Free Ship Over $49.99",
      "active": true,
      "deliveryCountry": "US",
      "currency": "USD",
      "deliveryTime": {
       "minTransitTimeInDays": 3,
       "maxTransitTimeInDays": 8,
       "minHandlingTimeInDays": 1,
       "maxHandlingTimeInDays": 2
      },
      "rateGroups": [
       {
        "mainTable": {
         "rowHeaders": {
          "prices": [
           {
            "value": "49.99",
            "currency": "USD"
           },
           {
            "value": "infinity",
            "currency": "USD"
           }
          ]
         },
         "rows": [
          {
           "cells": [
            {
             "flatRate": {
              "value": "6.99",
              "currency": "USD"
             }
            }
           ]
          },
          {
           "cells": [
            {
             "flatRate": {
              "value": "0",
              "currency": "USD"
             }
            }
           ]
          }
         ]
        },
        "name": "Free Ship Over $49.99"
       }
      ],
      "eligibility": "Shopping Actions"
     }
    ]
   }
  }
 ]
}

shippingsettings.getsupportedcarriers

shippingsettings.getsupportedcarriers çağrısı, MCA hesaplarının veya bağımsız hesapların desteklenen operatörleri almasını sağlar.

GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/supportedCarriers

Aşağıda örnek bir JSON yanıt gövdesi verilmiştir:

{
 "kind": "content#shippingsettingsGetSupportedCarriersResponse",
 "carriers": [
  {
   "name": "FedEx",
   "country": "US",
   "services": [
    "Ground",
    "Home Delivery",
    "Express Saver",
    "First Overnight",
    "Priority Overnight",
    "Standard Overnight",
    "2Day"
   ]
  },
  {
   "name": "UPS",
   "country": "US",
   "services": [
    "2nd Day Air",
    "2nd Day Air AM",
    "3 Day Select",
    "Ground",
    "Next Day Air",
    "Next Day Air Early AM",
    "Next Day Air Saver"
   ]
  },
  {
   "name": "USPS",
   "country": "US",
   "services": [
    "Priority Mail Express",
    "Media Mail",
    "Retail Ground",
    "Priority Mail",
    "First Class Package Service Retail",
    "First Class Package Service Commercial Base"
   ]
  },
  {
   "name": "Australia Post",
   "country": "AU",
   "services": [
    "Regular Parcel",
    "Express Post"
   ]
  },
  {
   "name": "TNT",
   "country": "AU",
   "services": [
    "Road Express",
    "Overnight Express"
   ]
  },
  {
   "name": "TOLL",
   "country": "AU",
   "services": [
    "Road Delivery",
    "Overnight Priority"
   ]
  },
  {
   "name": "DHL",
   "country": "DE",
   "services": [
    "Paket",
    "Päckchen"
   ]
  },
  {
   "name": "DPD",
   "country": "DE",
   "services": [
    "Express 12",
    "Express",
    "Classic Parcel"
   ]
  },
  {
   "name": "Hermes",
   "country": "DE",
   "services": [
    "Päckchen",
    "Paketklasse S",
    "Paketklasse M",
    "Paketklasse L"
   ]
  },
  {
   "name": "UPS",
   "country": "DE",
   "services": [
    "Express",
    "Express Saver",
    "Standard"
   ]
  },
  {
   "name": "DHL UK",
   "country": "GB",
   "services": [
    "Express",
    "Express 12"
   ]
  },
  {
   "name": "DPD UK",
   "country": "GB",
   "services": [
    "Express 12",
    "Express Next Day",
    "Standard Parcel 12",
    "Standard Parcel Next Day",
    "Standard Parcel Two Day"
   ]
  },
  {
   "name": "RMG",
   "country": "GB",
   "services": [
    "1st Class Small Parcel",
    "1st Class Medium Parcel",
    "2nd Class Small Parcel",
    "2nd Class Medium Parcel"
   ]
  },
  {
   "name": "TNT UK",
   "country": "GB",
   "services": [
    "Express",
    "Express 10",
    "Express 12"
   ]
  },
  {
   "name": "UPS UK",
   "country": "GB",
   "services": [
    "Express",
    "Express Saver",
    "Standard"
   ]
  },
  {
   "name": "Yodel",
   "country": "GB",
   "services": [
    "B2C 48HR",
    "B2C 72HR",
    "B2C Packet"
   ]
  }
 ]
}

shippingsettings.getsupportedholidays

shippingsettings.getsupportedholidays çağrısı, desteklenen tatilleri almak için bir MCA hesabının veya bağımsız bir hesabın kullanılmasını sağlar.

GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/supportedHolidays

Aşağıda örnek bir JSON yanıtı verilmiştir:

{
 "kind": "content#shippingsettingsGetSupportedHolidaysResponse",
 "holidays": [
  {
   "id": "FR_Christmas_2019-12-25",
   "countryCode": "FR",
   "type": "Christmas",
   "date": "2019-12-25",
   "deliveryGuaranteeDate": "2019-12-24",
   "deliveryGuaranteeHour": "18"
  },
  {
   "id": "US_Easter_2019-04-21",
   "countryCode": "US",
   "type": "Easter",
   "date": "2019-04-21",
   "deliveryGuaranteeDate": "2019-04-20",
   "deliveryGuaranteeHour": "18"
  },
  {
   "id": "US_Mother's Day_2019-05-12",
   "countryCode": "US",
   "type": "Mother's Day",
   "date": "2019-05-12",
   "deliveryGuaranteeDate": "2019-05-11",
   "deliveryGuaranteeHour": "18"
  },
  {
   "id": "US_Father's Day_2019-06-16",
   "countryCode": "US",
   "type": "Father's Day",
   "date": "2019-06-16",
   "deliveryGuaranteeDate": "2019-06-15",
   "deliveryGuaranteeHour": "18"
  },
  {
   "id": "US_Independence Day (USA)_2019-07-04",
   "countryCode": "US",
   "type": "Independence Day (USA)",
   "date": "2019-07-04",
   "deliveryGuaranteeDate": "2019-07-03",
   "deliveryGuaranteeHour": "18"
  },
  {
   "id": "US_Halloween_2019-10-31",
   "countryCode": "US",
   "type": "Halloween",
   "date": "2019-10-31",
   "deliveryGuaranteeDate": "2019-10-30",
   "deliveryGuaranteeHour": "18"
  },
  {
   "id": "US_Thanksgiving_2019-11-28",
   "countryCode": "US",
   "type": "Thanksgiving",
   "date": "2019-11-28",
   "deliveryGuaranteeDate": "2019-11-27",
   "deliveryGuaranteeHour": "18"
  },
  {
   "id": "US_Christmas_2019-12-25",
   "countryCode": "US",
   "type": "Christmas",
   "date": "2019-12-25",
   "deliveryGuaranteeDate": "2019-12-24",
   "deliveryGuaranteeHour": "18"
  }
 ]
}

Posta kodu gruplarını ayarlama

Merchant Center'da bölge oluşturmak kullanışlı olsa da sık sık değişen birden fazla bölgeye sahip hesapları yönetmek için Content API'yi kullanın.

Kargo Ayarları hizmeti, kargo ayarlarını ve bölgeleri belirlemenize, almanıza ve güncellemenize olanak tanır. API'de bölgeler postalCodeGroups olarak adlandırılır.

"postalCodeGroups": [
  {
    "name": "string,
    "country": string,
    "postalCodeRanges": [
      {
        "postalCodeRangeBegin": string,
        "postalCodeRangeEnd": string
      }
    ]
  }
]

Kullanıcı arayüzünde olduğu gibi postalCodeGroups, posta kodlarının, posta kodu aralıklarının, posta kodu öneklerinin veya ön ek aralıklarının basit bir listesidir.

Bölgeler alınıp gönderim ayarlarıyla birlikte ayarlandığından, gönderim hizmetleri yalnızca mevcut Kargo Ayarları kaynağı aracılığıyla postalCodeGroups doldurulduğunda silinir.

API aracılığıyla bölgeleri ayarlamanın doğru yolu şu şekildedir:

  1. Tüm gönderim hizmetlerini ve postalCodeGroups (bölge) verilerini almak için get çağrısı yapın.
  2. get görüşmesindeki gönderim hizmetlerini update görüşmesine kopyalayın.
  3. Gönderim hizmetinizde nakliye süresi etiketlerini kullanmıyorsanız aşağıdaki girişi istek gövdesinden kaldırın:

    "transitTimeLabels": [
        "all other labels"
    ],
    
  4. update çağrısı için postalCodeGroups bölümündeki bölgeleri doldurun.

  5. update çağrısını hem gönderim hizmetleri hem de postalCodeGroups bölümleri doldurularak yapın.

Aşağıda, 94035 olan 1. Bölge için postalCodeGroups ile birlikte yukarıda kullanılan ilk get örneğindeki update çağrı isteği gövdesinin örneği verilmiştir:94036

{
  "services": [
    {
      "name": "Standard Shipping",
      "active": true,
      "deliveryCountry": "US",
      "currency": "USD",
      "deliveryTime": {
        "minHandlingTimeInDays": 0,
        "maxHandlingTimeInDays": 1,
        "transitTimeTable": {
          "postalCodeGroupNames": [
            "Region1",
            "Region2",
            "all other locations"
          ],
          "rows": [
            {
              "values": [
                {
                  "minTransitTimeInDays": 1,
                  "maxTransitTimeInDays": 2
                }
              ]
            },
            {
              "values": [
                {
                  "minTransitTimeInDays": 2,
                  "maxTransitTimeInDays": 3
                }
              ]
            },
            {
              "values": [
                {
                  "minTransitTimeInDays": 3,
                  "maxTransitTimeInDays": 5
                }
              ]
            }
          ]
        }
      },
      "rateGroups": [
        {
          "singleValue": {
            "flatRate": {
              "value": "0",
              "currency": "USD"
            }
          },
          "name": "Standard Shipping"
        }
      ],
      "eligibility": "All scenarios"
    },
    {
      "name": "Expedited",
      "active": true,
      "deliveryCountry": "US",
      "currency": "USD",
      "deliveryTime": {
        "minTransitTimeInDays": 2,
        "maxTransitTimeInDays": 2,
        "minHandlingTimeInDays": 0,
        "maxHandlingTimeInDays": 1
      },
      "rateGroups": [
        {
          "singleValue": {
            "flatRate": {
              "value": "9.99",
              "currency": "USD"
            }
          },
          "name": "Expedited"
        }
      ],
      "eligibility": "All scenarios"
    }
  ],
  "postalCodeGroups": [
    {
      "name": "Region1",
      "country": "US",
      "postalCodeRanges": [
        {
          "postalCodeRangeBegin": "94036",
          "postalCodeRangeEnd": "94070"
        }
      ]
    },
    {
      "name": "Region2",
      "country": "US",
      "postalCodeRanges": [
        {
          "postalCodeRangeBegin": "94071",
          "postalCodeRangeEnd": "94082"
        }
      ]
    }
  ]
}

Aşağıda örnek bir JSON yanıtı verilmiştir:

{
 "accountId": "1111",
 "services": [
  {
   "name": "Standard Shipping",
   "active": true,
   "deliveryCountry": "US",
   "currency": "USD",
   "deliveryTime": {
    "minHandlingTimeInDays": 0,
    "maxHandlingTimeInDays": 1,
    "transitTimeTable": {
     "postalCodeGroupNames": [
      "Region1",
      "Region2",
      "all other locations"
     ],
     "rows": [
      {
       "values": [
        {
         "minTransitTimeInDays": 1,
         "maxTransitTimeInDays": 2
        }
       ]
      },
      {
       "values": [
        {
         "minTransitTimeInDays": 2,
         "maxTransitTimeInDays": 3
        }
       ]
      },
      {
       "values": [
        {
         "minTransitTimeInDays": 3,
         "maxTransitTimeInDays": 5
        }
       ]
      }
     ]
    }
   },
   "rateGroups": [
    {
     "singleValue": {
      "flatRate": {
       "value": "0",
       "currency": "USD"
      }
     },
     "name": "Standard Shipping"
    }
   ],
   "eligibility": "All scenarios"
  },
  {
   "name": "Expedited",
   "active": true,
   "deliveryCountry": "US",
   "currency": "USD",
   "deliveryTime": {
    "minTransitTimeInDays": 2,
    "maxTransitTimeInDays": 2,
    "minHandlingTimeInDays": 0,
    "maxHandlingTimeInDays": 1
   },
   "rateGroups": [
    {
     "singleValue": {
      "flatRate": {
       "value": "9.99",
       "currency": "USD"
      }
     },
     "name": "Expedited"
    }
   ],
   "eligibility": "All scenarios"
  }
 ],
 "postalCodeGroups": [
  {
   "name": "Region1",
   "country": "US",
   "postalCodeRanges": [
    {
     "postalCodeRangeBegin": "94036",
     "postalCodeRangeEnd": "94070"
    }
   ]
  },
  {
   "name": "Region2",
   "country": "US",
   "postalCodeRanges": [
    {
     "postalCodeRangeBegin": "94071",
     "postalCodeRangeEnd": "94082"
    }
   ]
  }
 ]
}

Teslim alma/teslim alma noktalarını kullanma

Teslim alma/teslim noktası siparişleri ile bunların eve teslimat siparişleri arasındaki farkları ve teslim alma özelliğine özel hangi bilgilerin işlenmesi gerektiği dahil olmak üzere daha fazla bilgi için Teslim alma/teslim alma noktaları kılavuzunu inceleyin.

Aynı gün teslimat

Yerel envanteriniz varsa aynı gün teslimat hizmetlerini yapılandırmak için Content API for Shopping'i kullanabilirsiniz.

Aynı gün teslimatlı gönderim hizmetlerinin shipmentType numarası local_delivery olarak belirlenmiştir. Şu anda local_delivery gönderim hizmetinin tümü aynı gün teslimat olarak kabul edilmektedir. Yerel teslimatlarla ilgili deliveryTime bilgilerini değiştiremezsiniz.

Yerel envanter ürünleriniz için aynı gün teslimatı ayarlamak üzere shippingsettings.update özelliğini kullanın.

Aşağıda, hesabınızdaki tüm mağazalara aynı gün teslimat hizmeti ekleyen bir istek gövdesi örnek olarak verilmiştir:

Aşağıdaki örnekte, uygulamanızda kullanmadan önce içerdiği tüm değerleri güncelleyin.

{
   "accountId":"accountId",
   "services":[
      {
         "name": "Local Delivery",
         "active":true,
         "shipmentType":"local_delivery",
         "deliveryCountry":"US",
         "currency":"USD",
         "rateGroups":[
            {
               "singleValue":{
                  "flatRate":{
                     "value":"0",
                     "currency":"USD"
                  }
               }
            }
         ],
         "eligibility":"All scenarios",
         "storeConfig":{
            "storeServiceType":"all stores",
            "storeCodes":[
               
            ],
            "cutoffConfig":{
               "storeCloseOffsetHours":2,
               "no_delivery_post_cutoff":true
            },
            "serviceRadius":{
               "value":4,
               "unit":"Miles"
            }
         }
      }
   ]
}

Ertesi gün teslimat

Son sipariş saatinden sonra verilen siparişler için varsayılan olarak sonraki gün teslimat yapılır. Sonraki gün teslimatı devre dışı bırakmak için no_delivery_post_cutoff değerini true olarak ayarlayın. Ertesi gün teslimatı devre dışı bırakırsanız gönderim hizmetleriniz yalnızca her gün son sipariş saatinden önce gösterilir.

Ertesi gün teslimat yalnızca shipmentType local_delivery olduğunda kullanılabilir.

Test

Tüm öğeler üretimde olduğundan, yayında olan öğelerde önemli bir şeyi değiştirmemeye özen gösterilmelidir. Özellikle update() yöntemi, mevcut değerleri değiştiren tek yöntem budur.