API for building a custom item in an iOS app

Hi,

I’m working on building an iOS app for a custom item. The customer will build the item in the app and I want the app to send the data to shopify so shopify pulls what’s been added to the item. Is there a common way of doing this?

If my question is confusing, please let me know and i’ll try to elaborate more.

Thanks in advance!

Bit confusing, not going to lie :slight_smile:

The main question is going to be whether this product needs to be able to be purchased more than once. If it does, you can use one of the admin mutations to create a product in the store background.

What seems more likely though is that you just want to be able to create a one-time purchase with some number of custom properties that results in a custom price. That’s a relatively common use case that’s supported on the draft order API in particular.

You’d need to use the draftOrderCreate mutation and then potentially redirect to the checkout url you can get back from that

Going to need to use an installed app on the store though, in either case - these are authenticated actions.

i agree, a bit confusing. i’m definitely not describing it clearly. thank you for your response! the draftOrderCreate, where can i find more information about it and will it be able to mutate my Shopify item as a MITM between the iOS app and Shopify?

Hi @rightrice

There’s documentation on the draftOrderCreate mutation here:

For your use case, you could use the draftOrderCreate mutation to send custom configuration data for an item from an external app to Shopify.

For most custom item builders, sending the custom configuration as line item properties in a draft order is the standard and recommended approach.

this is awesome. thank you! i’ll take a look at this and see how it works for me.

You can try API2Cart for this. It allows you to connect to and work with needed Shopify store data. For example, via API2Cart you can add, update, retrieve and sync products, orders, categories, and other store data with ease.