How to set the optional product fields while using api-clients (PHP)

36 views
Skip to first unread message

Gitsbyash

unread,
Sep 17, 2021, 2:26:37 AM9/17/21
to Google Content API for Shopping
Hi, 

I am using Google Content API 2.1 with PHP API Clients. 

I would like to set some optional fields for the product data. For example, I would like to set Ships from Country for a product. There are no functions for setting these optional fields in the PHP client. How can I do that? 

Shopping API Forum Advisor

unread,
Sep 21, 2021, 2:26:52 AM9/21/21
to gitb...@gmail.com, google-content-...@googlegroups.com

Hello,

 

James here, from the Content API Team. Thank you for reaching out to us.

 

I completely understand your concern. From the Content API’s perspective in order to supply optional fields to your product data, you can either use the Supplemental feed(Content API input method) or products.update method that allows you to programmatically make partial updates to your product data, and can be used to provide additional attributes, both required and optional, that may be missing from your primary feed.

 

Since you’re currently looking at how you can include ships_from_country field to your product data, I’m afraid that the ships_from_country field is currently not yet supported via API. As an alternative, you may try using `originCountry` attribute under WarehouseBasedDeliveryTime object within Shippingsetting service if it will be suited in your case.

 

However, allow me to check this with the rest of the team if it’s possible to include the ships_from_country field within the API. For any updates, you may keep an eye to our blog and release notes.

 

Regards,

Google Logo
James Howell Abarsoza
Content API for Shopping Team
 


ref:_00D1U1174p._5004Q2NUz9X:ref

Gits By Ash

unread,
Sep 23, 2021, 1:15:43 AM9/23/21
to Google Content API for Shopping
Hi James, 
Thanks for the response. 

Shopping API Forum Advisor

unread,
Sep 24, 2021, 6:44:48 AM9/24/21
to gitb...@gmail.com, google-content-...@googlegroups.com

Hello,

 

I got feedback from the team and we are now looking to add the ships_from_country attribute within the API. That said, you may follow our blog and release notes for any updates on this. Also, another workaround would be to set the ships_from_country as a custom attribute and it will be treated as a regular attribute.

Reply all
Reply to author
Forward
0 new messages