# Any way to upload CatalogItem and CatalogImage instances simultaneously?

**URL:** <https://developer.squareup.com/forums/t/any-way-to-upload-catalogitem-and-catalogimage-instances-simultaneously/1459>\
**Category:** Feature Requests\
**Tags:** catalog-api\
**Created:** [December 18, 2020, 3:25pm UTC](https://developer.squareup.com/forums/t/any-way-to-upload-catalogitem-and-catalogimage-instances-simultaneously/1459 "2020-12-18T15:25:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JasonFil](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/jasonfil/32/321_2.png) [@JasonFil](https://developer.squareup.com/forums/u/JasonFil)\
**Post date:** [December 18, 2020, 3:25pm UTC](https://developer.squareup.com/forums/t/any-way-to-upload-catalogitem-and-catalogimage-instances-simultaneously/1459/1 "2020-12-18T15:25:12Z")

</div>

Hello Square,

I am studying the `CreateCatalogImage` endpoint of the API, and, in particular, [the Java SDK](https://github.com/square/square-java-sdk/blob/master/doc/api/catalog.md). Based on what I am seeing, if we have a certain image to associate with a `CatalogItem` that we want to POST, we would first have to make a `CreateCatalogImage` API call, retrieve the ID provided to us by Square, build a `CatalogItemVariation` from it, and make an `UpsertCatalogObject` request, where we have prepared a `CatalogItemVariation` for every returned image ID.

This means that, for a `CatalogItem` that we want to create from scratch, for which we want `n` images, this would result in `n + 1` API calls.

I just wanted to confirm that there is _no_ way to make a _single_ API call for all of those images.

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [December 18, 2020, 6:28pm UTC](https://developer.squareup.com/forums/t/any-way-to-upload-catalogitem-and-catalogimage-instances-simultaneously/1459/2 "2020-12-18T18:28:39Z")

</div>

Yes, unfortunately since `CreateCatalogImage` is its own separate endpoint, it can’t be utilized with the `BatchUpsertCatalogObjects` endpoint to create images and items at the same time. Thus, for each image, you’ll need to hit the `CreateCatalogImage` endpoint, and then for each item make another API call to attach the image.

---

<div class="post-metadata">

**Author:** ![JasonFil](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/jasonfil/32/321_2.png) [@JasonFil](https://developer.squareup.com/forums/u/JasonFil)\
**Post date:** [December 18, 2020, 9:49pm UTC](https://developer.squareup.com/forums/t/any-way-to-upload-catalogitem-and-catalogimage-instances-simultaneously/1459/3 "2020-12-18T21:49:23Z")

</div>

Thank you for the info!
