All things Shopify and commerce
See documentation here: https://shopify.dev/docs/api/admin-graphql/2024-10/mutations/inventoryMoveQuantities
There is no documentation ANYWHERE what referenceDocumentUri should be.
The explanation there tells me NOTHING:
A freeform URI that represents why the inventory change happened. This can be the entity adjusting inventory quantities or the Shopify resource that's associated with the inventory adjustment. For example, a unit in a draft order might have been previously reserved, and a merchant later creates an order from the draft order. In this case, the referenceDocumentUri for the inventory adjustment is a URI referencing the order ID.
I simply want to make inventory adjustments, for safety stock. I don't have a "document" to point to. What should I put here? I tried to fill in just the public https URL of our online store to have something in this required field, but of course get the error "The specified reference document is invalid."
Where the hell am I supposed to come up with some bogus document ID that is accepted?
Also: This forum is just as terribly organized as the documentation. Where am I supposed to post this? I now put it in the general "Shopify Discussion" with the label "Troubleshooting". I thought "Shopify Apps" could be fitting as well, or "Shopify Plus" since we are using Shopify Plus. But there I could not choose fitting labels. I hope this is in a place where I can find answers.
Solved! Go to the solution
This is an accepted solution.
Okay, through trial and error I found that I can use the app's id "gid://shopify/App/..." for "referenceDocumentUri".
This can be retrieved like this:
{
currentAppInstallation {
app {
id
}
}
}
}
Another question mark was then the "ledgerDocumentUri" required in quantity changes other than for "available". I just took "uri://example.com/some/external/reference" from some unexplained examples given by others in this forum. But I find it quite annoying that I have to put some bogus "URI" there with some schema that makes no sense to me and there is no documentation about what it is supposed to mean. It works, but it's bull**bleep**.
Shopify should document their APIs.
This is an accepted solution.
Okay, through trial and error I found that I can use the app's id "gid://shopify/App/..." for "referenceDocumentUri".
This can be retrieved like this:
{
currentAppInstallation {
app {
id
}
}
}
}
Another question mark was then the "ledgerDocumentUri" required in quantity changes other than for "available". I just took "uri://example.com/some/external/reference" from some unexplained examples given by others in this forum. But I find it quite annoying that I have to put some bogus "URI" there with some schema that makes no sense to me and there is no documentation about what it is supposed to mean. It works, but it's bull**bleep**.
Shopify should document their APIs.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024