Skip to content

Square: Update Catalog Image

Square catalog.updateCatalogImage: arguments, response, policy and SDK examples.

← Catalog operations · Get started

Operation square.updatecatalogimage

Provider route: PUT /v2/catalog/images/{image_id}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/square with npm, or alter-sdk-square with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { SquareIntegration } from "@alter-ai/square";
async function execute(input: Parameters<SquareIntegration["catalog"]["updateCatalogImage"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new SquareIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.catalog.updateCatalogImage(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_square import SquareIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = SquareIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.catalog.update_catalog_image(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.image_idstringRequired within parent
bodyobjectRequired within parent
body.requestModelRequired within parentExpand Update Catalog Image — request body — body request
body.fileobjectRequired within parentAdditional keys: not allowed
body.file.filenamestringRequired within parentMinimum length: 1
body.file.content_typestringRequired within parentOne of: image/gif, image/jpeg, image/pjpeg, image/png
body.file.content_base64stringRequired within parent

Referenced models: Update Catalog Image — request body — body request

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Update Catalog Image — response body

Referenced models: Update Catalog Image — response body

45 more schemas are linked from the tables above, on the schema pages.

Update Catalog Image — response body
FieldTypePresenceDescription and constraints
$objectRoot
errorsarrayOptionalAny errors that occurred during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item
imageModelOptionalExpand Create Catalog Image — response body — image
The newly updated `CatalogImage` including a Square-generated
URL for the encapsulated image file.

Referenced models: Create Catalog Image — response body — image, Get Shift — response body — errors item

Update Catalog Image — request body — body request
FieldTypePresenceDescription and constraints
$objectRoot
idempotency_keystringRequired within parentA unique string that identifies this UpdateCatalogImage request.
Keys can be any valid string but must be unique for every UpdateCatalogImage request.

See [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information.
Maximum length: 128
Minimum length: 1
Get Shift — response body — errors item
FieldTypePresenceDescription and constraints
$objectRootRepresents an error encountered during a request to the Connect API.

See [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information.
categorystringRequired within parentIndicates which high-level category of error has occurred during a
request to the Connect API.
The high-level category for the error.
See [ErrorCategory](#type-errorcategory) for possible values
Known values: API_ERROR, AUTHENTICATION_ERROR, INVALID_REQUEST_ERROR, RATE_LIMIT_ERROR, PAYMENT_METHOD_ERROR, REFUND_ERROR, MERCHANT_SUBSCRIPTION_ERROR, EXTERNAL_VENDOR_ERROR
codeModelRequired within parentExpand Get Shift — response body — errors item code
The specific code of the error.
See [ErrorCode](#type-errorcode) for possible values
detailstringOptionalA human-readable description of the error for debugging purposes.
fieldstringOptionalThe name of the field provided in the original request (if any) that
the error pertains to.

Referenced models: Get Shift — response body — errors item code

Create Catalog Image — response body — image image data caption, name, photo studio order id, url
FieldTypePresenceDescription and constraints
$objectRootAn image file to use in Square catalogs. It can be associated with
`CatalogItem`, `CatalogItemVariation`, `CatalogCategory`, and `CatalogModifierList` objects.
Only the images on items and item variations are exposed in Dashboard.
Only the first image on an item is displayed in Square Point of Sale (SPOS).
Images on items and variations are displayed through Square Online Store.
Images on other object types are for use by 3rd party application developers.
captionJSONOptional
caption (anyOf 1)stringAlternativeA caption that describes what is shown in the image. Displayed in the
Square Online Store. This is a searchable attribute for use in applicable query filters
using the [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects).
caption (anyOf 2)nullAlternative
nameJSONOptional
name (anyOf 1)stringAlternativeThe internal name to identify this image in calls to the Square API.
This is a searchable attribute for use in applicable query filters
using the [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects).
It is not unique and should not be shown in a buyer facing context.
name (anyOf 2)nullAlternative
photo_studio_order_idJSONOptional
photo_studio_order_id (anyOf 1)stringAlternativeThe immutable order ID for this image object created by the Photo Studio service in Square Online Store.
photo_studio_order_id (anyOf 2)nullAlternative
urlJSONOptional
url (anyOf 1)stringAlternativeThe URL of this image, generated by Square after an image is uploaded
using the [CreateCatalogImage](api-endpoint:Catalog-CreateCatalogImage) endpoint.
To modify the image, use the UpdateCatalogImage endpoint. Do not change the URL field.
url (anyOf 2)nullAlternative
Create Catalog Image — response body — image time period data event
FieldTypePresenceDescription and constraints
$objectRootRepresents a time period - either a single period or a repeating period.
eventJSONOptional
event (anyOf 1)stringAlternativeAn iCalendar (RFC 5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which
specifies the name, timing, duration and recurrence of this time period.

Example:

```
DTSTART:20190707T180000
DURATION:P2H
RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR
```

Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported.
`DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT`
and `END:VEVENT` is not required in the request. The response will always
include them.
event (anyOf 2)nullAlternative
Create Catalog Image — response body — image catalog v1 ids array item
FieldTypePresenceDescription and constraints
$objectRootA Square API V1 identifier of an item, including the object ID and its associated location ID.
catalog_v1_idJSONOptional
catalog_v1_id (anyOf 1)stringAlternativeThe ID for an object used in the Square API V1, if the object ID differs from the Square API V2 object ID.
catalog_v1_id (anyOf 2)nullAlternative
location_idJSONOptional
location_id (anyOf 1)stringAlternativeThe ID of the `Location` this Connect V1 ID is associated with.
location_id (anyOf 2)nullAlternative
Create Catalog Image — response body — image availability period data Represents a time period of availability
FieldTypePresenceDescription and constraints
$objectRootRepresents a time period of availability.
day_of_weekJSONOptional
day_of_week (anyOf 1)stringAlternativeIndicates the specific day of the week.
The day of the week for this availability period.
See [DayOfWeek](#type-dayofweek) for possible values
Known values: SUN, MON, TUE, WED, THU, FRI, SAT
day_of_week (anyOf 2)nullAlternative
end_local_timeJSONOptional
end_local_time (anyOf 1)stringAlternativeThe end time of an availability period, specified in local time using partial-time
RFC 3339 format. For example, `21:00:00` for a period ending at 9:00 in the evening.
Note that the seconds value is always :00, but it is appended for conformance to the RFC.
end_local_time (anyOf 2)nullAlternative
start_local_timeJSONOptional
start_local_time (anyOf 1)stringAlternativeThe start time of an availability period, specified in local time using partial-time
RFC 3339 format. For example, `8:30:00` for a period starting at 8:30 in the morning.
Note that the seconds value is always :00, but it is appended for conformance to the RFC.
start_local_time (anyOf 2)nullAlternative
Create Catalog Image — response body — image custom attribute values object value
FieldTypePresenceDescription and constraints
$objectRootAn instance of a custom attribute. Custom attributes can be defined and
added to `ITEM` and `ITEM_VARIATION` type catalog objects.
[Read more about custom attributes](https://developer.squareup.com/docs/catalog-api/add-custom-attributes).
boolean_valueJSONOptional
boolean_value (anyOf 1)booleanAlternativeA `true` or `false` value. Populated if `type` = `BOOLEAN`.
boolean_value (anyOf 2)nullAlternative
custom_attribute_definition_idstringOptionalThe id of the [CatalogCustomAttributeDefinition](entity:CatalogCustomAttributeDefinition) this value belongs to.
Read only: true
keystringOptionalIf the associated `CatalogCustomAttributeDefinition` object is defined by another application, this key is prefixed by the defining application ID.
For example, if the CatalogCustomAttributeDefinition has a key attribute of "cocoa_brand" and the defining application ID is "abcd1234", this key is "abcd1234:cocoa_brand"
when the application making the request is different from the application defining the custom attribute definition. Otherwise, the key is simply "cocoa_brand".
Read only: true
nameJSONOptional
name (anyOf 1)stringAlternativeThe name of the custom attribute.
name (anyOf 2)nullAlternative
number_valueJSONOptional
number_value (anyOf 1)stringAlternativePopulated if `type` = `NUMBER`. Contains a string
representation of a decimal number, using a `.` as the decimal separator.
number_value (anyOf 2)nullAlternative
selection_uid_valuesJSONOptional
selection_uid_values (anyOf 1)arrayAlternativeOne or more choices from `allowed_selections`. Populated if `type` = `SELECTION`.
selection_uid_values (anyOf 1)[]stringEach item
selection_uid_values (anyOf 2)nullAlternative
string_valueJSONOptional
string_value (anyOf 1)stringAlternativeThe string value of the custom attribute. Populated if `type` = `STRING`.
string_value (anyOf 2)nullAlternative
typestringOptionalDefines the possible types for a custom attribute.
A copy of type from the associated `CatalogCustomAttributeDefinition`.
See [CatalogCustomAttributeDefinitionType](#type-catalogcustomattributedefinitiontype) for possible values
Known values: STRING, BOOLEAN, NUMBER, SELECTION
Read only: true

SDK function policy ID: square.updatecatalogimage. Catalog operation: UpdateCatalogImage. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["ITEMS_WRITE"]

Pinned headers: {"Square-Version": "2026-11-18"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.