Remove line item from order by API - shopify

I want to remove line item from order and add new variant in the order when order is placed. but there is no api for deleting line item from order
I have tried with below article
https://shopify.dev/apps/fulfillment/order-management-apps/order-editing#add-a-new-variant
Did not find any API for removing line item

Like #FabioFilippi said, you can't do that without a refund. From the customer perspective, imagine you have paid for items A and B, and as a result of some backend service, you get only A or A & C. That could be considered a scam.
From the Shopify perspective that would mess up their backend badly because there are such things as webhooks and email notifications. That could probably affect negatively analytics.
Your best option is to refund items. A better choice would be to revalidate business requirements.
Side note: please do not spam.

Related

how do i add additional line items to a NetSuite order via API

our Shopify store syncs with NetSuite and we send orders with line items from Shopify to NS. However there are often situations where we need to enrich the orders in NS with zero value items that we don't want on the shopify order. E.g. marketing materials that we want to send out to the customer.
SuiteQL isn't an option as there is no way to add / update
SOAP API seems like a winner but good-god it's complicated
Could i build a complex rules engine in suite script that looks at the order and based on whatever it add line items?
any advice from someone who has done it before would be great?
You can use User-Event/Workflow or Map-Reduce/Scheduled/Mass-Update scripts which will filter orders, and update orders.

VirtoCommerce API getting item prices

I am using VirtoCommerce 2.9 and have some questions regarding the API and what would be the best way to get all the information I need, while keeping the number of API requests down.
Right now I am using the endpoint /api/catalog/search to find items that matches a number of attributes. But the response does not include prices and product texts. Both I would like to present to the end user. What would be the correct or best way to retrieve this information?
Thanks!
Cheers!
Currently search service does not return the description and price for the products.
To get this details you need to use separate queries
api/catalog/product/ids?respGroup='ItemSmall'
to get product detail with description and
api/pricing/evaluate
to retrieve actual products prices. You can call them in parallel for better performance.
Be aware to use WithProperties response group because it may cause
perfomance problem. Anyway product returned with all properties values
and this 'response group' is only responsible for retrieving properties meta-information
(as possible dictionary values, multilingual, required or optional flag etc) this information often used in admin area and in storefront almost not used.
Indexed search module will be serious changed in future versions, and you will be able to have more control over the product details in the search index.

Big Commerce Integration for custom Email Invoice

I've looked into different ways to put or get order info from BC to different systems including the BC API, BC Webhooks, Zapier, and other systems like Shipworks.... in the end what I need to do is this:
We need orders placed on BigCommerce to send out a special invoice to the customer. The items that the customer purchased will have custom attributes, a "Tier" and a separate "Unit QTY" which is not the same as the item quantity.
We need to group the items by Tier, and show subtotals of the Unit Qty and Cost. Send this in an invoice as soon as the order is placed on the website.
We are already syncing to Quickbooks online, which does not have the functionality.
Looking for suggestions on different platforms/languages/email services like mailgun/and even shipping integration tools like shipworks, ordoro etc. that might have the ability to code a custom email template like this.
My customer is keeping bigcommerce, no option to switch this out.
I am mainly a Salesforce developer so my strong suit would be to sync the orders to SFDC and code in apex, send the invoice. But before investing in the time, wanted to see if I'm missing some quick potential solutions.
Anyone use Zapier Javascript/Python code platform?
Apologies if this is too open-ended. I feel that this could be a good reference for others in the community about options and best practices.
Hmm your question is pretty broad. Maybe a few links to API documentation could help?
Bigcommerce API - https://developer.bigcommerce.com/api
Ordoro API - https://www.ordoro.com/developer
Send this in an invoice as soon as the order is placed on the website.
I think what you need is a Bigcommerce webhook for store/order/created. See https://developer.bigcommerce.com/api/webhooks-getting-started.
Alternatively, you could set up a cron job that polls BigCommerce for new orders and then sends the email notification.

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.

Querying the API for orders with more complex search queries?

Is there a way to query the API to find a Shop's orders with more detailed query parameters? For example I would like to be able to find an order by entering the client's name or the date of the order.
The available URL query parameters don't allow anything like that.
I realize I could just request all the orders and then filter that data, but I would rather do it directly in the API instead of locally to avoid any overhead.
Edit: Actually I just realized that the only way to query for a specific order is to enter its internally used order ID that the shop owner has no knowledge of. It would be really neat if I could query the API instead by the order "name" which is shown as the order's ID to the shop owner and the order recipient. Any ideas?
I look at it like this. Let's say you're poor and cannot afford a data store for orders in your App, but you have API access and you want to provide a search for merchants.
You get 250 orders per call and 500 API calls with zero troubles, so that is 125,000 orders. The API provides you with 125,000 objects that you are free to query any way you want. Want to show the merchant just orders with last name Smith and a line item of dingo balls with a chaser of a cart note set to "no saturday delivery please"... you can do that. Has nothing to do with Shopify, just your code. I think it is pretty easy to query orders for anything of interest, your mileage may vary.
Me, I keep interesting aspects of orders in a data store in my Apps, and then provide merchants with search results that way... cuts down on API calls, and keeps interesting facets closer at hand.