I have to move products from one Shopify store to another. To do this I am using the Shopify GraphQL admin API. I am transforming the data before moving it so I can't have Shopify help me.
Anyway, I take the products from Shopify's API and they're store in a JSON file. Each product is around 3,000 lines long and contains all variant types.
Do I have to define the query fields and variables? I was hoping to just pass in the entire JSON object that Shopify returns and feed that to GraphQL. Currently I'm having to do define the fields manually (NodeJS):
const addProduct = (product) => axios.post(apiPath, {
query: `
mutation productCreate($input: ProductInput!) {
productCreate(input: $input) {
userErrors {
field
message
}
product {
title
handle
descriptionHtml
...
}
}
}
`,
variables: {
input: {...product}
}
})
But having to define the query fields in this way is going to a very long process, is there any way to do without having to define the query?
Here's an example from the product object from Shopify. I've had to limit the lines:
{
"body_html": " The Air Jordan 3 Retro 'UNC' arrives in March 2020 as an homage to Michael Jordan's alma mater. The special edition presents university-inspired colors on its dual-textured leather upper and eyestays, with elephant print panels granting an iconic touch. Valor Blue hits both Jumpman logos on the tongue and heel while the visible Air unit in the midsole and rubber outsole wrap up the styling. ",
"price_min_usd": 0,
"compare_at_price_max_usd": null,
"available": false,
"review_count": 0,
"percent_sale_min_aud": 0,
"variants": [
{
"merged_options": [
"size:3 UK"
],
"price_cad": "0.00",
"price_usd": "0.00",
"presentment_prices": [
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "AED"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "AUD"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "CAD"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "DKK"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "EUR"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "GBP"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "ILS"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0",
"currency_code": "JPY"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "QAR"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "SAR"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "USD"
}
}
],
"inventory_management": "shopify",
"available": false,
"title": "UK 3 | EU 35.5 | US 3.5",
"price": "0.00",
"price_aed": "0.00",
"id": 40807884062909,
"sku": "CT8532-104.3UK",
"price_eur": "0.00",
"barcode": null,
"price_dkk": "0.00",
"inventory_quantity": 0,
"image": null,
"compare_at_price": null,
"fulfillment_service": "manual",
"price_aud": "0.00",
"price_ils": "0.00",
"price_jpy": "0",
"inventory_policy": "deny",
"price_gbp": "0.00",
"price_qar": "0.00",
"price_sar": "0.00"
},
{
"merged_options": [
"size:3.5 UK"
],
"price_cad": "0.00",
"price_usd": "0.00",
"presentment_prices": [
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "AED"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "AUD"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "CAD"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "DKK"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "EUR"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "GBP"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "ILS"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0",
"currency_code": "JPY"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "QAR"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "SAR"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "USD"
}
}
],
"inventory_management": "shopify",
"available": false,
"title": "UK 3.5 | EU 36 | US 4",
"price": "0.00",
"price_aed": "0.00",
"id": 40807884095677,
"sku": "CT8532-104.3.5UK",
"price_eur": "0.00",
"barcode": null,
"price_dkk": "0.00",
"inventory_quantity": 0,
"image": null,
"compare_at_price": null,
"fulfillment_service": "manual",
"price_aud": "0.00",
"price_ils": "0.00",
"price_jpy": "0",
"inventory_policy": "deny",
"price_gbp": "0.00",
"price_qar": "0.00",
"price_sar": "0.00"
},
{
"merged_options": [
"size:4 UK"
],
"price_cad": "0.00",
"price_usd": "0.00",
"presentment_prices": [
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "AED"
}
},
{
"compare_at_price": null,
"price": {
"amount": "0.00",
"currency_code": "AUD"
}
},
{
An easy recipe is to download a product where you get valid Shopify Product JSON. Now remove all the id keys. Send that object to the Product Create in the new store. Repeat in a loop.
You could also bulk download the products, giving you JSON, and iterate that, and build products that way, and call create.
Either way, the code to do this task is short, sweet and not hard.
#BugHunterUK - As per my understanding you're moving products data from one store to another with JSON file but you don't have do it. You can ask Shopify Support to do that. They will move all of your products from store A to B.
Related
I am needing to unnest a multidimensional array with multiple items.
My data looks like this (two rows):
Each order in this table has a fulfillments column which is a multidimensional array.
fulfilments has multiple line_items. Some orders only have 1 line_items, some orders have multiple line_items.
My goal is to get each product name and the quantity from each line_items and do a running sum/tally.
Here's a JSON export of the fulfillments column data:
"{
"fulfillments": [{
"value": {
"id": "6575674745",
"tracking_number": null,
"line_items": [{
"value": {
"properties": [{
"value": {
"name": "shipping_interval_unit_type",
"value": "Months"
}
}, {
"value": {
"name": "shipping_interval_frequency",
"value": "1"
}
}, {
"value": {
"name": "ch_item_id",
"value": "77321530"
}
}],
"product_id": "4790985097351",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"sku": “10101”,
"name": “Product1”,
"variant_id": "33433213108359",
"quantity": "1",
"taxable": "true",
"total_discount": "0",
"title": "Product1 Title",
"price_set": {
"shop_money": {
"amount": "12.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "12.00",
"currency_code": "USD"
}
},
"product_exists": "true"
}
}],
"service": "manual",
"tracking_urls": []
}
}, {
"value": {
"tracking_url": null,
"id": "3555531128967",
"tracking_company": null,
"tracking_number": null,
"name": "#3129472402.2",
"tracking_numbers": [],
"line_items": [{
"value": {
"properties": [{
"value": {
"name": "shipping_interval_frequency",
"value": "1"
}
}, {
"value": {
"name": "shipping_interval_unit_type",
"value": "Months"
}
}, {
"value": {
"name": "ch_item_id",
"value": "77321529"
}
}],
"product_id": "5216409780359",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"sku": "9005",
"name": “Product2”,
"quantity": "1",
"title": “Product2 Title”,
"price_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"product_exists": "true"
}
}],
"service": "manual",
"tracking_urls": []
}
}]
}"
SELECT
fulfillments[ safe_OFFSET (0)].value.line_items[ safe_OFFSET (0)].value.name AS name,
fulfillments[ safe_OFFSET (0)].value.line_items[ safe_OFFSET (0)].value.quantity AS quantity
FROM
`mydatabase`
isn't ideal in the event the order has more than one array in line_items
How can I unnest a multidimensional array when I don't know how large each array is?
SELECT
*
FROM
`mydatabase`,
UNNEST(fulfillments) as a
Only gives me another array to flatten
Given your scenario, you may try to use this query to unnest line_items with product name and the quantity:
SELECT
line_items.value.name,
line_items.value.quantity,
line_items.value.product_id
from `mydatabase`,
unnest(fulfillments) fulfillments,
unnest(fulfillments.value.line_items) line_items
Output:
I'm testing self-service APIs. I wonder if this is a bug:
I make a search request, and the response contains the extra bag information in the flight-offer/price/additionalServices
Then I make the offer price request by adding include=bags parameter in the path of Flight Offers Price API.
However there is no any bags information in the response, neither in the offer/price/additionalServices, nor in the included/.
I still try to create order by adding the extra bag. So I use the extra bag information that I got at step 1 (search response). And the order is created successfully.
It seems that the extra bag information is missing in step 2 (response of flight offer price), is it a bug?
Here is an example of my test to reproduce the issue:
search request
{
"currencyCode": "EUR",
"originDestinations": [
{
"id": "1",
"originLocationCode": "PAR",
"destinationLocationCode": "NYC",
"departureDateTimeRange": {
"date": "2020-08-20",
"time": "10:00:00"
}
}
],
"travelers": [
{
"id": "1",
"travelerType": "ADULT"
}
],
"sources": [
"GDS"
],
"searchCriteria": {
"maxFlightOffers": 3
}
}
Then I select the second offer in the response to make a offer price request using include=bags parameter
{
"type": "flight-offer",
"id": "2",
"source": "GDS",
"instantTicketingRequired": false,
"nonHomogeneous": false,
"oneWay": false,
"lastTicketingDate": "2020-08-13",
"numberOfBookableSeats": 8,
"itineraries": [
{
"duration": "PT8H15M",
"segments": [
{
"departure": {
"iataCode": "ORY",
"terminal": "4",
"at": "2020-08-20T19:45:00"
},
"arrival": {
"iataCode": "EWR",
"terminal": "B",
"at": "2020-08-20T22:00:00"
},
"carrierCode": "TX",
"number": "6720",
"aircraft": {
"code": "359"
},
"operating": {
"carrierCode": "BF"
},
"duration": "PT8H15M",
"id": "3",
"numberOfStops": 0,
"blacklistedInEU": false
}
]
}
],
"price": {
"currency": "EUR",
"total": "149.44",
"base": "41.00",
"fees": [
{
"amount": "0.00",
"type": "SUPPLIER"
},
{
"amount": "0.00",
"type": "TICKETING"
}
],
"grandTotal": "149.44",
"additionalServices": [
{
"amount": "70.00",
"type": "CHECKED_BAGS"
}
]
},
"pricingOptions": {
"fareType": [
"PUBLISHED"
],
"includedCheckedBagsOnly": false
},
"validatingAirlineCodes": [
"TX"
],
"travelerPricings": [
{
"travelerId": "1",
"fareOption": "STANDARD",
"travelerType": "ADULT",
"price": {
"currency": "EUR",
"total": "149.44",
"base": "41.00"
},
"fareDetailsBySegment": [
{
"segmentId": "3",
"cabin": "ECONOMY",
"fareBasis": "ULBCOWFR",
"brandedFare": "EBASIC",
"class": "U",
"includedCheckedBags": {
"quantity": 0
}
}
]
}
]
}
There is no extra bag in the response.
Thanks
First off, I created an order and doing an order search, the string below shows the order details from the response.
Next, I used the API Explorers for Payments->CreatePayment:
https://developer.squareup.com/reference/square/payments-api/create-payment/explorer
I put in my sandbox Access Token at the top.
As for the other info I entered, please refer to the Request String:
curl https://connect.squareup.com/v2/payments \
-X POST \
-H 'Content-Type: application/json' \
-H 'Square-Version: 2020-01-22' \
-H 'Authorization: Bearer {{access_token}}' \
-d '{
"source_id": "cnon:CBASEBbXLsTfPIy04J18kMjfbRo",
"idempotency_key": "5e42534d06257",
"location_id": "DWK1VQ391ZARF",
"order_id": "fQZM8ekWkcAo7fRRBvUj2G2pY5EZY",
"amount_money": {
"amount": 3649,
"currency": "USD"
}
}'
Here is the Order Details:
{
"id": "fQZM8ekWkcAo7fRRBvUj2G2pY5EZY",
"location_id": "DWK1VQ391ZARF",
"line_items": [
{
"uid": "iLVwmNInonSV2Twc9G84fD",
"catalog_object_id": "B57CGCIAGUTLBQMAMEEI5WBC",
"quantity": "1",
"name": "Athletic Heather Pullover Hooded Sweatshirt",
"variation_name": "X-Large",
"base_price_money": {
"amount": 2699,
"currency": "USD"
},
"taxes": [
{
"uid": "f9euLpXOOEWKd2bV7AgOdD",
"name": "Sales Tax",
"percentage": "9.0",
"type": "ADDITIVE",
"applied_money": {
"amount": 243,
"currency": "USD"
},
"scope": "LINE_ITEM"
}
],
"gross_sales_money": {
"amount": 2699,
"currency": "USD"
},
"total_tax_money": {
"amount": 243,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 2942,
"currency": "USD"
},
"variation_total_price_money": {
"amount": 2699,
"currency": "USD"
},
"applied_taxes": [
{
"uid": "f9euLpXOOEWKd2bV7AgOdD",
"tax_uid": "f9euLpXOOEWKd2bV7AgOdD",
"applied_money": {
"amount": 243,
"currency": "USD"
}
}
]
},
{
"uid": "dQS0tXEW46ERhQlLdPAxgC",
"catalog_object_id": "PY7V64HVFKSE6O7SW6RBQZ7U",
"quantity": "1",
"name": "2nd Amendment",
"variation_name": "Small Print",
"base_price_money": {
"amount": 300,
"currency": "USD"
},
"taxes": [
{
"uid": "RAD93NhnUa9E6XBy7NYWG",
"name": "Sales Tax",
"percentage": "9.0",
"type": "ADDITIVE",
"applied_money": {
"amount": 27,
"currency": "USD"
},
"scope": "LINE_ITEM"
}
],
"gross_sales_money": {
"amount": 300,
"currency": "USD"
},
"total_tax_money": {
"amount": 27,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 327,
"currency": "USD"
},
"variation_total_price_money": {
"amount": 300,
"currency": "USD"
},
"applied_taxes": [
{
"uid": "RAD93NhnUa9E6XBy7NYWG",
"tax_uid": "RAD93NhnUa9E6XBy7NYWG",
"applied_money": {
"amount": 27,
"currency": "USD"
}
}
]
},
{
"uid": "mIae9M46tMvTCpzgNvyNW",
"catalog_object_id": "Q4OPKIJ2BMG5LY35SUMHFG7S",
"quantity": "1",
"name": "2nd Amendment",
"variation_name": "Large",
"base_price_money": {
"amount": 0,
"currency": "USD"
},
"taxes": [
{
"uid": "IFLJKtYmIiEvXTLZ5FLaJD",
"name": "Sales Tax",
"percentage": "9.0",
"type": "ADDITIVE",
"applied_money": {
"amount": 0,
"currency": "USD"
},
"scope": "LINE_ITEM"
}
],
"gross_sales_money": {
"amount": 0,
"currency": "USD"
},
"total_tax_money": {
"amount": 0,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 0,
"currency": "USD"
},
"variation_total_price_money": {
"amount": 0,
"currency": "USD"
},
"applied_taxes": [
{
"uid": "IFLJKtYmIiEvXTLZ5FLaJD",
"tax_uid": "IFLJKtYmIiEvXTLZ5FLaJD",
"applied_money": {
"amount": 0,
"currency": "USD"
}
}
]
},
{
"uid": "w3HK68X6MEpXHIxQDyTZ5",
"quantity": "1",
"name": "Shipping",
"base_price_money": {
"amount": 380,
"currency": "USD"
},
"gross_sales_money": {
"amount": 380,
"currency": "USD"
},
"total_tax_money": {
"amount": 0,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 380,
"currency": "USD"
},
"variation_total_price_money": {
"amount": 380,
"currency": "USD"
}
}
],
"taxes": [
{
"uid": "IFLJKtYmIiEvXTLZ5FLaJD",
"name": "Sales Tax",
"percentage": "9.0",
"type": "ADDITIVE",
"applied_money": {
"amount": 0,
"currency": "USD"
},
"scope": "LINE_ITEM"
},
{
"uid": "RAD93NhnUa9E6XBy7NYWG",
"name": "Sales Tax",
"percentage": "9.0",
"type": "ADDITIVE",
"applied_money": {
"amount": 27,
"currency": "USD"
},
"scope": "LINE_ITEM"
},
{
"uid": "f9euLpXOOEWKd2bV7AgOdD",
"name": "Sales Tax",
"percentage": "9.0",
"type": "ADDITIVE",
"applied_money": {
"amount": 243,
"currency": "USD"
},
"scope": "LINE_ITEM"
}
],
"created_at": "2020-02-11T07:46:54.962Z",
"updated_at": "2020-02-11T07:46:54.962Z",
"state": "OPEN",
"version": 1,
"total_tax_money": {
"amount": 270,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_tip_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 3649,
"currency": "USD"
},
"total_service_charge_money": {
"amount": 0,
"currency": "USD"
},
"net_amounts": {
"total_money": {
"amount": 3649,
"currency": "USD"
},
"tax_money": {
"amount": 270,
"currency": "USD"
},
"discount_money": {
"amount": 0,
"currency": "USD"
},
"tip_money": {
"amount": 0,
"currency": "USD"
},
"service_charge_money": {
"amount": 0,
"currency": "USD"
}
},
"source": {
"name": "Sandbox for sq0idp-0WcmbRcdTbsMGg5UjGvifQ"
}
}
Please note the order_id and location_id both match what's in the order details. What also matches is the amount entered in the create payment request and the total_money in the order details: 3649.
So then why do I get the following response for the Create Payment request?
cache-control: no-cache
content-length: 136
content-type: application/json
date: Tue, 11 Feb 2020 07:48:48 GMT
square-version: 2020-01-22
{
"errors": [
{
"code": "BAD_REQUEST",
"detail": "The payment total does not match the order total.",
"category": "INVALID_REQUEST_ERROR"
}
]
}
Using Square API v2.
I need make payments with square, I used square_in_app_payments plugin but it only give me a nonce string that seems I have to send it to checkout api with items information inside JSON in http request, but I don't understand how to make it.
I only tried from postman make some samples fo square.
POST /v2/locations/{{location_id}}/checkouts HTTP/1.1
Host: connect.squareup.com
Authorization: Bearer {{access_token}}
Content-Type: application/json
cache-control: no-cache
Postman-Token: 5d2c05ae-11d6-42bd-bd1e-47fa44621a98
{
"idempotency_key": "60f919ba-2042-4402-bc66-e6455ec32349",
"order": {
"reference_id": "reference_id",
"line_items": [
{
"name": "Printed T Shirt",
"quantity": "2",
"base_price_money": {
"amount": 1500,
"currency": "USD"
},
"discounts": [
{
"name": "7% off previous season item",
"percentage": "7"
},
{
"name": "$3 off Customer Discount",
"amount_money": {
"amount": 300,
"currency": "USD"
}
}
]
},
{
"name": "Slim Jeans",
"quantity": "1",
"base_price_money": {
"amount": 2500,
"currency": "USD"
}
},
{
"name": "Woven Sweater",
"quantity": "3",
"base_price_money": {
"amount": 3500,
"currency": "USD"
},
"discounts": [
{
"name": "$11 off Customer Discount",
"amount_money": {
"amount": 1100,
"currency": "USD"
}
}
],
"taxes": [
{
"name": "Fair Trade Tax",
"percentage": "5"
}
]
}
],
"discounts": [
{
"name": "Father's day 12% OFF",
"percentage": "12"
},
{
"name": "Global Sales $55 OFF",
"amount_money": {
"amount": 5500,
"currency": "USD"
}
}
],
"taxes": [
{
"name": "Sales Tax",
"percentage": "8.5"
}
]
},
"ask_for_shipping_address": true,
"merchant_support_email": "merchant+support#website.com",
"pre_populate_buyer_email": "example#email.com",
"pre_populate_shipping_address": {
"address_line_1": "1455 Market St.",
"address_line_2": "Suite 600",
"locality": "San Francisco",
"administrative_district_level_1": "CA",
"postal_code": "94103",
"country": "US",
"first_name": "Jane",
"last_name": "Doe"
}
}
I need to know how to take the nonce string from card form of square_in_app_payments plugin and send it in http request for complete the payment.
I am posting the following Order to the shopify api Order endpoint. The Order shows up in the shop and everything works as it should, except that the stock quantity of the variants in orders placed via the API are not decreased automatically by shopify. When I place an order within the admin console, they are decreased automatically. Shopify inventory tracking is turned on for the products. Any ideas would be greatly appreciated.
{
"order": {
"email": "someName#yahoo.com",
"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": "111 Love 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": "someName"
}
}
{
"variant": {
"id": 21718275463,
"product_id": 6820646151,
"title": "m / red",
"price": "99.00",
"sku": "",
"position": 2,
"grams": 0,
"inventory_policy": "deny",
"compare_at_price": "900.00",
"fulfillment_service": "manual",
"inventory_management": "shopify",
"option1": "m",
"option2": "red",
"option3": null,
"created_at": "2016-05-27T13:16:26-04:00",
"updated_at": "2016-05-28T13:28:20-04:00",
"taxable": false,
"barcode": "",
"image_id": 13217378823,
"inventory_quantity": 1,
"weight": 0,
"weight_unit": "lb",
"old_inventory_quantity": 1,
"requires_shipping": true
}
}
{
"variant": {
"id": 21717700871,
"product_id": 6820646151,
"title": "s / green",
"price": "1000.00",
"sku": "",
"position": 1,
"grams": 0,
"inventory_policy": "deny",
"compare_at_price": "1111.00",
"fulfillment_service": "manual",
"inventory_management": "shopify",
"option1": "s",
"option2": "green",
"option3": null,
"created_at": "2016-05-27T13:05:56-04:00",
"updated_at": "2016-05-28T12:17:22-04:00",
"taxable": true,
"barcode": "",
"image_id": 13160712135,
"inventory_quantity": 2,
"weight": 0,
"weight_unit": "lb",
"old_inventory_quantity": 2,
"requires_shipping": true
}
}
{
"variant": {
"id": 21717690055,
"product_id": 6821668807,
"title": "Default Title",
"price": "555.00",
"sku": "",
"position": 1,
"grams": 0,
"inventory_policy": "deny",
"compare_at_price": "666.00",
"fulfillment_service": "manual",
"inventory_management": "shopify",
"option1": "Default Title",
"option2": null,
"option3": null,
"created_at": "2016-05-27T13:05:39-04:00",
"updated_at": "2016-05-28T12:17:22-04:00",
"taxable": true,
"barcode": "",
"image_id": null,
"inventory_quantity": 2,
"weight": 0,
"weight_unit": "lb",
"old_inventory_quantity": 2,
"requires_shipping": true
}
}
You created a fake order using the API. Fake orders like that don't transact money or trigger the usual internal checks and balances without some extra effort. Maybe if you tried adding a fulfillment to the order, Shopify might ding inventory levels? Seems like something to try anyway.