URL to Create Purchase Order ... with quantities

URL to Create Purchase Order ... with quantities

ginav
Shopify Partner
1 0 0

I am working on an app that needs to create purchase orders. There appears to be no GraphQL or REST API to do this (cf. Solved: Is there an API Endpoint / GraphQL Mutation to create Purchase Orders? - Shopify Community).

 

In lieu of this, started poking around, and noticed a link at various places in admin to "Create purchase order" for a specific variant. This URL has the form:

 

https://admin.shopify.com/store/MY-STORE-NAME/purchase_orders/new?destination_purchase_order_location_id=MY-LOCATION-ID&variant_id=MY-VARIANT-ID

 

Visiting this URL creates a new PO populated with the variant, with quantity=1. Cool!

 

And then I discovered that I could append multiple "&variant_id=ANOTHER-VARIANT-ID" terms to create a PO populated with multiple variants. Even better!

 

Unfortunately, the user still has to enter the quantities by hand. I would dearly love to find the URL parameter to set the quantity. I've tried the obvious things (e.g. "&quantity=123") but have not stumbled across a solution.

 

Does anyone know of a way to set the quantity per variant in the URL?

 

Are these URL endpoints documented anywhere?

Replies 0 (0)