BigCommerce API v2 Product Add with SKU - api

We are trying to implement the v2 API in BigCommerce to be able to add products to BigCommerce from our system.
It seems that you cannot set the Product SKU field when adding a product. This makes the product API totally meaningless. Is this by design?
How are we supposed to know if a product is already added if it does not have a SKU? SKU should be updateable for ADD product case, it can be ready only for UPDATE product case. I think this is a serious bug in the API.
https://developer.bigcommerce.com/api/stores/v2/products#create-product
Please advise how to add product with API with SKU.

If you look at the API documentation for the SKU resource under Create Product, https://developer.bigcommerce.com/api/stores/v2/products/skus#create-product-sku, you will see that you first have to add the base SKU or the parent and then the options, or Skus. The call to add the Sku must contain the parent product ID, POST /api/v2/products/{product_id}/skus. You cannot do it in one API call to my knowledge

Related

Fetching Product Options/Attributes on Product Listing Page

On this page https://stencil.bigcommerce.com/docs/product-resources BigCommerce has mentioned that Product Object has "Options" but in the theme, I am not able to retrieve anything from options property. I am trying to access this in Category Page.
I want to do above because I have to add product attributes on product listing page "templates\components\products\card.html". I need this here because I have to remove quick view option and directly put the product option under product title on this page. Over here I am able to get product's id, name, sku etc but not getting any properties from product options.
I have already asked to BigCommerce Support team and they don't have any solutions and referred me to check here.
The category page calls the common product card model, which does not include the product options property:
https://stencil.bigcommerce.com/docs/common-product-card-model
To get product option data on the category page, you'll need to call the API. One lightweight solution for handling this is to use AWS Lambda with Amazon API Gateway. API Gateway defines an endpoint URL that you can use to trigger a Lambda function that runs a request to the BigCommerce API for product data.
https://docs.aws.amazon.com/lambda/latest/dg/with-on-demand-https.html

Shopify Product images of an order items

I want to show the images of products in an order for the plugin I'm developing. But with the response returned for orders(from shopify admin API), in it line_items doesn't contain a product object or any other object that have the link for shopify cdn link of a product image, but the product id.
What I'm planning now is to call the admin api again with product id to get images which looks costly as I have to do it to all the items in an order and do that for all orders.
My question is whether any other way to derive the cdn link for product image given the product id or what could be the best approach for this?
Thanks in advance.
Let check the shopify Product API Docs. You can get a list of products by Product API, which is not costly.
Get a list of specific products
GET /admin/products.json?ids=632910392,921728736

Link Shippo Transaction to Shopify Order

I am attempting to work on some integration with Shopify and Shippo, part of the process is sending an email to our warehouse including the order line items with the Shipping Label attached as a PDF.
When we create the label in Shippo, the fulfillment information is updated in Shopify correctly, but I was wondering if there was any way to link the two back up reliably from an API perspective since the Shippo API appears to not include any invoice information. I see a link to an internal order object, but the API docs don't seem to stipulate any further information and the Shopify Fulfillment record does not appear to include any Shippo object id.
The only thing I see if the Shippo Order Metadata field which includes the order number, so I suppose I could parse this and make the request to Shopify's API but I would prefer a more concrete link if one is available.
We (I'm working on Shippo's product team) currently don't officially support Shopify Fulfillments with Shippo API label purchases.
That said, we have an Orders API endpoint in beta. The Orders endpoint allows you to retrieve all Orders of a Shippo account, including those imported automatically from Shopify. Each order, like all other Shippo resources, has an object_id field.
When you create a label through the Shippo API's Transaction endpoint, you can link the Order to the Transaction by sending the additional flag order, setting it to the object_id of the corresponding Order (e.g.: { ... "order": "<order-object-id>" ... }). This will trigger the corresponding Fulfillment of the order on its shopping cart platform, in your case Shopify.
Feel free to reach out to product#goshippo.com if you have more questions about this endpoint. Please keep in mind that it is still in closed beta and the endpoint might change in the future.

woocommerce api add product with custom id

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.

Need to modify Shopify products API BY Shopify team then return back to me

It is necessary to modify Shopify products API as per my client requirement.
For example the below products API is available in Shopify API reference document.
GET /admin/products.json
I am able to get list of products from above API. But i want to filter products based on price by sending price as input parameter and get related products as a response.
For that post API is needed. Do shopify team provide Products API for filtering products by sending input parameter as that is not available in API reference?
Kindly give me the information. Thanks in advance
No, there is no way to filter on a price range using /admin/products.json. You can page through all of the products, 250 at a time, and find the products that meet your criteria that way.