REST API modify elements

Highlighted
Tourist
4 0 1

Hello,

we try to operate api through shopify and here we encounter some problems with which we could use some help.

  1. How can we set different amounts for delivery, depending on the chosen payment option when creating DraftOrder via REST API, e.g.

PayPal - 10 $

Payment on delivery - $ 30

Payment card - 20 $

 

  1. How can we modify the price for an existing product in the store when creating DraftOrder via the REST API?

We try to do so through:

"line_items" => [

                               [

                                   "variant_id" => ***********,

                                   "price"   => "1666.00",

                                  "quantity" => 1

                                   ],

                             ],
We encounter a problem here, the price is not correct. On the check, the price is exactly as it was given in shopify, not as it came through the API.

 

  1. How to set the default payment method on the checkout using the REST API?
0 Likes
Highlighted
Tourist
4 0 1

Is it possible to edit draft orders via the API? Does this require additional elements? Is the current plan available enough for this? If the problem is with the plan, can a higher one be activated for test period in order to check if it would provide us with such a possibility?

 

  1. Do we have the right approach to building the system using the REST API

- The user places an order on our landingPage

- We create DraftOrder through the REST API

- The user on the checkot (shopify) page chooses the payment method and creates an order

- We receive it through a webhook

  1. In addition, CallCenter service is necessary for us, which in its operation will have to modify DraftOrder by adding other products or changing current price. How can we do this?
  2. Using DraftOrder via the REST API we must be able to edit the product price for a specific varian_id. How to get there?
  3. Is it possible to define a list of countries available for delivery using DraftOrder and Rest API? If so, how?
  4. DraftOrder must be marked with our unique ID, which is then sent to us using a webhook when creating a real order from it. How can we achieve it?
  5. Is it possible to set the same product id in 2 different stores?
  6. Is it possible to assign our own statuses for orders? We absolutely need to add our own, which will be the final acceptance of the order. It must be possible for ordering, also via the API. How can we do this?
0 Likes
Highlighted
Shopify Staff
Shopify Staff
491 97 88

Hi @Kicor 

 

 

  1. You can add products to your draft order. As soon as the customer pays the invoice however, the draft order is converted into an order. You would need to use the new order editing API in order to change anything at this point. 
  2. You are not able to modify the price of a product upon the creation of an order. In order to add a different fee, you will want to use a custom line item, or a shipping cost 
  3. Your created draft order will only have the shipping options you have available in your store. If you do not want to ship to specific locations you will want to not create shipping rates. 
  4. The draft order has a unique ID and when converted into an order it will have a unique order ID. The `source_name` will appear as "shopify_draft_order" for any orders which are created from draft orders via the admin. If the order is completed (PUT /admin/draft_orders/#{draft_order_id}/complete.jsonusing the DraftOrders API, then the "source_name" value will be set to the API client which completed the order.
  5. A product ID is automatically generated by Shopify and is a unique ID.
  6. You can look into a custom status app such as https://apps.shopify.com/ultimate-order-status or more often merchants will utilize tags for customization and filtering. You can create views/groups in order to see orders in each status. 

Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 


0 Likes