2016-06-03 3 views
0

ich folgendes zum Shopify API, um Endpunkt bin Entsendung:Steuerlinien zu erzeugen nicht automatisch in Shopify API um

{ 
    "order": { 
    "email": "[email protected]", 
    "financial_status": "paid", 
    "fulfillment_status": null, 
    "send_receipt": true, 
    "send_fulfillment_receipt": true, 
    "note": "Created by somename", 
    "line_items": [ 
     { 
     "variant_id": 21718275463, 
     "quantity": 1, 
     "price": 99, 
     "requires_shipping": true, 
     "product_id": 6820646151 
     }, 
     { 
     "variant_id": 21717700871, 
     "quantity": 1, 
     "price": 1000, 
     "requires_shipping": true, 
     "product_id": 6820646151 
     }, 
     { 
     "variant_id": 21717690055, 
     "quantity": 1, 
     "price": 555, 
     "requires_shipping": true, 
     "product_id": 6821668807 
     } 
    ], 
    "processing_method": "offsite", 
    "shipping_address": { 
     "first_name": "Chris", 
     "address1": "10101 Musick Road", 
     "phone": "9999999999", 
     "city": "St. Louis", 
     "zip": "63123", 
     "province": "MO", 
     "country": "United States", 
     "last_name": "Becker", 
     "name": "Chris Becker", 
     "country_code": "US", 
     "province_code": "MO" 
    }, 
    "source_name": "somename", 
    "taxes_included": false, 
    "shipping_lines": [ 
     { 
     "title": "standard", 
     "price": 0.00, 
     "code": null, 
     "source": "brand owner on shopify", 
     "carrier_identifier": null, 
     "tax_lines": null 
     } 
    ], 
    "tags": "some Order" 
    } 
} 

und eine Antwort ohne Steuerleitungen empfangen, die gefüllt sind. Ich habe im Shopify-Forum gesehen, dass die Taxlines dann automatisch berechnet und von shopify gefüllt werden sollen. Ich habe es auch mit einem Kunden versucht, aber das hat auch nicht funktioniert.

Antwort

0

Die Orders API wird nicht die Steuern automatisch berechnen, aber wenn Sie Ihre App weiß, wie viel sie sind, dann können Sie diese Daten umfassen tax_lines und total_tax mit:

{ 
    "order": { 
    "line_items": [{ 
     "title": "Big Brown Bear Boots", 
     "price": 74.99, 
     "quantity": 3, 
     "tax_lines": [{ 
     "price": 13.50, 
     "rate": 0.06, 
     "title": "State tax" 
     }] 
    }], 
    "total_tax": 13.50 
    } 
} 
Verwandte Themen