Hello!
Thanks for the response, i have made some progression since i last created the post.
I am using a App that has sales channel enabled, creating the checkout with the checkout API.
Now i am getting the error (see code below), that occurs when using an invalid variant_id. But the thing is.. Its not an invalid id.
{
"errors": {
"line_items": {
"0": {
"variant_id": [
{
"code": "invalid",
"message": "is invalid",
"options": {}
}
]
}
}
}
}
I have another request where i create a order with the exact same variant id. It works perfectly fine.. I get an order confirm mail and can see the created order in the shopify admin witch the correct product.
Ill show some more info for clarification
This works perfectly fine when posting to: /admin/api/2021-01/orders.json
{
"order": {
"email": "test@gmail.com",
"fulfullment_status": "fulfilled",
"send_receipt": true,
"send_fulfillment_receipt": true,
"line_items": [
{
"variant_id": 39494215336089,
"quantity": 1
}
]
}
}
But when posting (see body bellow) to: /admin/api/2021-01/checkouts.json
I get the invalid variant id (see first code section)
{
"checkout": {
"email": "john.smith@example.com",
"line_items": [{
"variant_id": 39494215336089,
"quantity": 1
}],
"shipping_address": {
"first_name": "John",
"last_name": "Smith",
"address1": "126 York St.",
"city": "Ottawa",
"province_code": "ON",
"country_code": "CA",
"phone": "(123)456-7890",
"zip": "K1N 5T5"
}
}
}
And yes content-type is application/json. I have tried everything, i have a relativly smooth experience developing shopify programs so far but this has broken me..