FROM CACHE - zh-cn_header
此社区已转向点对点支持。Shopify 支持团队将不再为此社区提供服务。我们建议您与其他商家和合作伙伴建立联系以获取帮助,并分享您的经验! 如发现有任何违反我们行为准则的行为或您希望删除的内容,欢迎继续举报。

The returnCreate GQL API always return "invalid id"

The returnCreate GQL API always return "invalid id"

westyle
访客
2 0 0

Can someone help me? I use GQL API to create a return, but I always got error: "invalid id", the following is my code:

 

my query:

mutation returnCreate($returnInput: ReturnInput!) {
  returnCreate(returnInput: $returnInput) {
    return {
      name
      status
      totalQuantity
    }
    userErrors {
      field
      message
    }
  }
}

and my variables:

{
  "returnInput": {
    "notifyCustomer": true,
    "orderId": "gid://shopify/Order/xxxxx",
    "returnLineItems": [
      {
        "fulfillmentLineItemId": "gid://shopify/LineItem/xxxxx",
        "quantity": 1,
        "returnReason": "SIZE_TOO_SMALL",
        "returnReasonNote": ""
      }
    ]
  }
}

and the return of api:

{
  "data": {
    "returnCreate": null
  },
  "errors": [
    {
      "message": "invalid id",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "returnCreate"
      ]
    }
  ],
  "extensions": {
    "cost": {
      "requestedQueryCost": 10,
      "actualQueryCost": 1,
      "throttleStatus": {
        "maximumAvailable": 10000,
        "currentlyAvailable": 9999,
        "restoreRate": 500
      }
    }
  }
}

 

1 条回复1

Stephen49
访客
2 0 0

Hello, I have also encountered the same problem. Have you resolved it now?