woocommerce api add product with custom id - api

I'm looking for a way to add products from another system into WooCommerce using the API while maintaining the old system's reference id.
The other system has a unique key for each product which I would like to use for accessing the products in WooCommerce through the WooCommerce API.
What would be the easiest way to do this?
I'm considering repurposing the slug field in Woocommerce to hold the old system id and then doing a filter on that when retrieving products. Is this an appropriate solution?

I used the slug field like I suggested in the question above and it's working fine.
Would recommend this approach to others, as it allows your key to be accessible via the API.

Related

Does ebay API allows to create a listing draft?

I would like to create a listing ebay draft as it is possible to do manually using this flow:
Go to the new listing sell creation page
Choose category id
Put some random data (title, description, etc.)
Close tab
You will see now unfinished draft, when you go to the new listing sell creation page.
Can I do the same thing using eBay api?
The reason of it is that I don't want to implement all functionality of addItem, currently.
eBay API will not allow to create draft listing.
when you call API for creating new listing, API needs all required fields value.
eBay Listing API provide one attribute PrivateListing.it will hide your product for selling.
If PrivateListing is true, designates the listing as private.customer can't see private listing.
eBay Listing API provide one more attribute ScheduleTime.
When you export product in eBay via API you can give ScheduleTime as well, eBay will active product for selling based on ScheduleTime.
You can make product inactive/draft using this alternative way.
http://developer.ebay.com/devzone/xml/docs/Reference/eBay/AddItem.html#AddItem
You can refer above link for eBay API.
As of now, I can confirm eBay does provide the API to create listing draft, though it's in beta at the moment.
POST - /item_draft/
Official doc is here
To my knowledge this cannot be done, since there are some pretty strict constraints around using the addItem API call, and eBay will throw an error if you don't complete the all the required fields. The required fields of addItem are numerous enough that if you could populate these fields, then you are already 90% of the way to completing your listing anyways.
If you are using Selling Manager Pro, you can create product templates which may be a way to accomplish what you are looking for.

How to get value from customer's notes field?

I am working on shopify and my requirement is to add some extra information of user and I did that following this link :-
http://docs.shopify.com/manual/configuration/store-customization/communicating-with-customers/accounts-and-newsletters/capture-additional-information-in-the-account-registration-form
But now I want to know how to get values from customer[note][label] field in my liquid code.
Like I am able to get customer's name using {{customer.name}} which is store in customer[name] field but unable to get values from customer[note][label] field.
customer.note is not exposed via the the customer Liquid object. It is currently only available via the Shopify API. This is because customer notes are not meant for displaying in your store, they are for shop owners to manage customers in the admin area. An alternative is to use metafields instead.
Relevant discussions on the Shopify forums:
Accessing Customer Note in Account.liquid template
how to access to the customer.note with Liquid

POST Order with values for configurable product fields?

I've successfully got 3rd party merchant orders posting new orders to my client's BigCommerce store programmatically. I've even got product options posting as part of the order (product->option set-> option relationships are a total cluster).
My client relies heavily on configurable fields. I'm able to pull the definitions of the configurable fields for each product, but can't find a way to POST or update the configurable field values through the API.
Is it possible to manipulate an order's configurable fields through the API?
Got a response from the support team # BigCommerce. Manipulating configurable fields via the API is not currently possible and not currently on the roadmap.
Original reply below:
Unfortunately that is a product limitation with the API, it will not tie to configurable fields on the product. The best you can do is attach that information through a generic text field like 'staff_notes'. Honestly I have not heard of any talk of adding a way to add products with configurable fields to orders via the API. I think this may be because anything that can be done with configurable fields can be done with options and options are what is being pushed for the future. I have noted this feedback down though and will pass it along to our Product Manager for the API. Best case scenario is that it may be seen in a future version of the API which is at least several months away.

BigCommerce Products API - "Product Tags" field

I have been using the BgCommerce API for some time. We use the product API among others.
Using the regular admin user interface, I added some text to the "Product Tags" field for a particular product in our store. When I retrieve the product using the product API, I do not see that field / data.
Is this data missing from the API?
Thanks for any help.
I heard from BigCommerce support via email on this question. I am pasting here for future searchers / readers.
===========
Unfortunately the 'product tags' is not available through the API or even from an export of your store. That field can only be accessed manually through the Control Panel and editing the product.
If you need some data to be accessible through the API then you might try using 'Search Keywords' instead of 'Tags'. Search Keywords serves about the same purpose as tags....there are other fields you could use as well if you are already using search keywords.

Is there a way to tag or identify specific orders?

Using the webhook api to retrieve orders, I'm wondering if there's some way that the orders can be tagged in some form so I can attribute them to certain objects in a shopify app. The scenario is a client wishes to be able to attribute certain orders to different charities. Is there a way they can identify the orders as such?
One thing I can think of is the visitor chooses a "product" which simply dictates which charity they wish the order sale to be donated to, and I look for that product in the webhook. But i wonder if there's another way.
You could use a cart.note or cart.attributes. They allow you to store custom properties with your order.
If you need a per product attribute, you can use Line Item Properties.