Shopify create order in Orders API

Smartify
New Member
1 0 0

Hi there all

I have a few issues while creating an order by API, 

Request url:

/admin/api/2021-10/orders.json

Request body:

{"order":{"financial_status":"pending","billing_address":{"first_name":"name","last_name":" name2","address1":"some address","city":"some, city","province":"some, city","zip":"0000-123","address2":"","company":"123456789","country_code":"PT","phone":"123987456"},"line_items":[{"variant_id":"404320993431","fulfillable_quantity":0,"quantity":1,"price":159.99,"price_set":{"shop_money":{"amount":"159.99","currency_code":"EUR"},"presentment_money":{"amount":"159.99","currency_code":"EUR"}}}],"shipping_address":{"first_name":"Sandra","last_name":" Isabel Oliveira Mendes","address1":"Rua do Picoto nº580 Zona Industrial nº2","city":"Penafiel, Porto","province":"Penafiel, Porto","zip":"4560-567","address2":"","company":"222891041","country_code":"PT","phone":"938577037"},"tax_lines":[{"channel_liable":false,"price":"29.92","rate":0.23,"title":"PT VAT","price_set":{"shop_money":{"amount":"29.92","currency_code":"EUR"},"presentment_money":{"amount":"29.92","currency_code":"EUR"}}}],"phone":"123456789","inventory_behaviour":"decrement_obeying_policy","buyer_accepts_marketing":true}}

Response body:

Same as request with differences in orderId and channel_liable = null (should be false same as request)

There I get two. issues that need your help to solve:

1. When the order is created, it has a total value of 159.99 that  is the final price with taxes included. However, it adds the tax amount again to the total.

1.1 I do not want to deduct the amount and make it plus vat. 

 

2. The order is created without a customer. I want to be able to have a customer associated like any normal on store checkout, even if the client didnt register

 

Thank you all!

 
 
Replies 0 (0)