PUT api call

YUSUF2
New Member
1 0 0

The following is the jason string

{
"product": {
"id": 6087796129976,
"product_type": "HOISERY & UNDERWEAR",
"variants": [{
"id": 37582429388984,
"option1": "XS",
"option2": "5SOCK01 004",
"price": 30.0,
"compare_at_price": 30.0,
"presentment_prices": [{
"price": {
"currency_code": "GBP",
"amount": "30"
},
"compare_at_price": 30.0
}, {
"price": {
"currency_code": "USD",
"amount": "30"
},
"compare_at_price": 30.0
}, {
"price": {
"currency_code": "EUR",
"amount": "30"
},
"compare_at_price": 30.0
}],
"inventory_quantity": 0,
"inventory_management": "Shopify",
"sku": "00004270067002",
"taxable": true,
"tax_code": "A",
"weight": 0.0
}, {
"id": 37582429421752,
"option1": "S",
"option2": "5SOCK01 004",
"price": 30.0,
"compare_at_price": 30.0,
"presentment_prices": [{
"price": {
"currency_code": "GBP",
"amount": "30"
},
"compare_at_price": 30.0
}, {
"price": {
"currency_code": "USD",
"amount": "30"
},
"compare_at_price": 30.0
}, {
"price": {
"currency_code": "EUR",
"amount": "30"
},
"compare_at_price": 30.0
}],
"inventory_quantity": 0,
"inventory_management": "Shopify",
"sku": "00004270067003",
"taxable": true,
"tax_code": "A",
"weight": 0.0
}, {
"id": 37582429454520,
"option1": "M",
"option2": "5SOCK01 004",
"price": 30.0,
"compare_at_price": 30.0,
"presentment_prices": [{
"price": {
"currency_code": "GBP",
"amount": "30"
},
"compare_at_price": 30.0
}, {
"price": {
"currency_code": "USD",
"amount": "30"
},
"compare_at_price": 30.0
}, {
"price": {
"currency_code": "EUR",
"amount": "30"
},
"compare_at_price": 30.0
}],
"inventory_quantity": 5,
"inventory_management": "Shopify",
"sku": "00004270067004",
"taxable": true,
"tax_code": "A",
"weight": 0.0
}, {
"id": 37582429487288,
"option1": "L",
"option2": "5SOCK01 004",
"price": 30.0,
"compare_at_price": 30.0,
"presentment_prices": [{
"price": {
"currency_code": "GBP",
"amount": "30"
},
"compare_at_price": 30.0
}, {
"price": {
"currency_code": "USD",
"amount": "30"
},
"compare_at_price": 30.0
}, {
"price": {
"currency_code": "EUR",
"amount": "30"
},
"compare_at_price": 30.0
}],
"inventory_quantity": 4,
"inventory_management": "Shopify",
"sku": "00004270067005",
"taxable": true,
"tax_code": "A",
"weight": 0.0
}, {
"id": 37582429520056,
"option1": "XL",
"option2": "5SOCK01 004",
"price": 30.0,
"compare_at_price": 30.0,
"presentment_prices": [{
"price": {
"currency_code": "GBP",
"amount": "30"
},
"compare_at_price": 30.0
}, {
"price": {
"currency_code": "USD",
"amount": "30"
},
"compare_at_price": 30.0
}, {
"price": {
"currency_code": "EUR",
"amount": "30"
},
"compare_at_price": 30.0
}],
"inventory_quantity": 0,
"inventory_management": "Shopify",
"sku": "00004270067006",
"taxable": true,
"tax_code": "A",
"weight": 0.0
}, {
"id": 0,
"option1": "XXL",
"option2": "5SOCK01 004",
"price": 30.0,
"compare_at_price": 30.0,
"presentment_prices": [{
"price": {
"currency_code": "GBP",
"amount": "30"
},
"compare_at_price": 30.0
}, {
"price": {
"currency_code": "USD",
"amount": "30"
},
"compare_at_price": 30.0
}, {
"price": {
"currency_code": "EUR",
"amount": "30"
},
"compare_at_price": 30.0
}],
"inventory_quantity": 0,
"inventory_management": "Shopify",
"sku": "00004270067024",
"taxable": true,
"tax_code": "A",
"weight": 0.0
}],
"options": [{
"name": "Size",
"values": ["XS", "S", "M", "L", "XL", "XXL"]
}, {
"name": "StockRef",
"values": ["5SOCK01 004"]
}]
}
}

Getting this error

The remote server returned an error: (422) Unprocessable Entity

 

 

 

0 Likes