public interface CatalogApi
| Modifier and Type | Method and Description |
|---|---|
BatchDeleteCatalogObjectsResponse |
batchDeleteCatalogObjects(BatchDeleteCatalogObjectsRequest body)
Deletes a set of [CatalogItem]($m/CatalogItem)s based on the provided list of target IDs and
returns a set of successfully deleted IDs in the response.
|
CompletableFuture<BatchDeleteCatalogObjectsResponse> |
batchDeleteCatalogObjectsAsync(BatchDeleteCatalogObjectsRequest body)
Deletes a set of [CatalogItem]($m/CatalogItem)s based on the provided list of target IDs and
returns a set of successfully deleted IDs in the response.
|
BatchRetrieveCatalogObjectsResponse |
batchRetrieveCatalogObjects(BatchRetrieveCatalogObjectsRequest body)
Returns a set of objects based on the provided ID.
|
CompletableFuture<BatchRetrieveCatalogObjectsResponse> |
batchRetrieveCatalogObjectsAsync(BatchRetrieveCatalogObjectsRequest body)
Returns a set of objects based on the provided ID.
|
BatchUpsertCatalogObjectsResponse |
batchUpsertCatalogObjects(BatchUpsertCatalogObjectsRequest body)
Creates or updates up to 10,000 target objects based on the provided list of objects.
|
CompletableFuture<BatchUpsertCatalogObjectsResponse> |
batchUpsertCatalogObjectsAsync(BatchUpsertCatalogObjectsRequest body)
Creates or updates up to 10,000 target objects based on the provided list of objects.
|
CatalogInfoResponse |
catalogInfo()
Retrieves information about the Square Catalog API, such as batch size limits that can be
used by the `BatchUpsertCatalogObjects` endpoint.
|
CompletableFuture<CatalogInfoResponse> |
catalogInfoAsync()
Retrieves information about the Square Catalog API, such as batch size limits that can be
used by the `BatchUpsertCatalogObjects` endpoint.
|
CreateCatalogImageResponse |
createCatalogImage(CreateCatalogImageRequest request,
FileWrapper imageFile)
Uploads an image file to be represented by a [CatalogImage]($m/CatalogImage) object that can
be linked to an existing [CatalogObject]($m/CatalogObject) instance.
|
CompletableFuture<CreateCatalogImageResponse> |
createCatalogImageAsync(CreateCatalogImageRequest request,
FileWrapper imageFile)
Uploads an image file to be represented by a [CatalogImage]($m/CatalogImage) object that can
be linked to an existing [CatalogObject]($m/CatalogObject) instance.
|
DeleteCatalogObjectResponse |
deleteCatalogObject(String objectId)
Deletes a single [CatalogObject]($m/CatalogObject) based on the provided ID and returns the
set of successfully deleted IDs in the response.
|
CompletableFuture<DeleteCatalogObjectResponse> |
deleteCatalogObjectAsync(String objectId)
Deletes a single [CatalogObject]($m/CatalogObject) based on the provided ID and returns the
set of successfully deleted IDs in the response.
|
ListCatalogResponse |
listCatalog(String cursor,
String types,
Long catalogVersion)
Returns a list of all [CatalogObject]($m/CatalogObject)s of the specified types in the
catalog.
|
CompletableFuture<ListCatalogResponse> |
listCatalogAsync(String cursor,
String types,
Long catalogVersion)
Returns a list of all [CatalogObject]($m/CatalogObject)s of the specified types in the
catalog.
|
RetrieveCatalogObjectResponse |
retrieveCatalogObject(String objectId,
Boolean includeRelatedObjects,
Long catalogVersion)
Returns a single [CatalogItem]($m/CatalogItem) as a [CatalogObject]($m/CatalogObject) based
on the provided ID.
|
CompletableFuture<RetrieveCatalogObjectResponse> |
retrieveCatalogObjectAsync(String objectId,
Boolean includeRelatedObjects,
Long catalogVersion)
Returns a single [CatalogItem]($m/CatalogItem) as a [CatalogObject]($m/CatalogObject) based
on the provided ID.
|
SearchCatalogItemsResponse |
searchCatalogItems(SearchCatalogItemsRequest body)
Searches for catalog items or item variations by matching supported search attribute values,
including custom attribute values, against one or more of the specified query filters.
|
CompletableFuture<SearchCatalogItemsResponse> |
searchCatalogItemsAsync(SearchCatalogItemsRequest body)
Searches for catalog items or item variations by matching supported search attribute values,
including custom attribute values, against one or more of the specified query filters.
|
SearchCatalogObjectsResponse |
searchCatalogObjects(SearchCatalogObjectsRequest body)
Searches for [CatalogObject]($m/CatalogObject) of any type by matching supported search
attribute values, excluding custom attribute values on items or item variations, against one
or more of the specified query filters.
|
CompletableFuture<SearchCatalogObjectsResponse> |
searchCatalogObjectsAsync(SearchCatalogObjectsRequest body)
Searches for [CatalogObject]($m/CatalogObject) of any type by matching supported search
attribute values, excluding custom attribute values on items or item variations, against one
or more of the specified query filters.
|
UpdateCatalogImageResponse |
updateCatalogImage(String imageId,
UpdateCatalogImageRequest request,
FileWrapper imageFile)
Uploads a new image file to replace the existing one in the specified
[CatalogImage]($m/CatalogImage) object.
|
CompletableFuture<UpdateCatalogImageResponse> |
updateCatalogImageAsync(String imageId,
UpdateCatalogImageRequest request,
FileWrapper imageFile)
Uploads a new image file to replace the existing one in the specified
[CatalogImage]($m/CatalogImage) object.
|
UpdateItemModifierListsResponse |
updateItemModifierLists(UpdateItemModifierListsRequest body)
Updates the [CatalogModifierList]($m/CatalogModifierList) objects that apply to the targeted
[CatalogItem]($m/CatalogItem) without having to perform an upsert on the entire item.
|
CompletableFuture<UpdateItemModifierListsResponse> |
updateItemModifierListsAsync(UpdateItemModifierListsRequest body)
Updates the [CatalogModifierList]($m/CatalogModifierList) objects that apply to the targeted
[CatalogItem]($m/CatalogItem) without having to perform an upsert on the entire item.
|
UpdateItemTaxesResponse |
updateItemTaxes(UpdateItemTaxesRequest body)
Updates the [CatalogTax]($m/CatalogTax) objects that apply to the targeted
[CatalogItem]($m/CatalogItem) without having to perform an upsert on the entire item.
|
CompletableFuture<UpdateItemTaxesResponse> |
updateItemTaxesAsync(UpdateItemTaxesRequest body)
Updates the [CatalogTax]($m/CatalogTax) objects that apply to the targeted
[CatalogItem]($m/CatalogItem) without having to perform an upsert on the entire item.
|
UpsertCatalogObjectResponse |
upsertCatalogObject(UpsertCatalogObjectRequest body)
Creates or updates the target [CatalogObject]($m/CatalogObject).
|
CompletableFuture<UpsertCatalogObjectResponse> |
upsertCatalogObjectAsync(UpsertCatalogObjectRequest body)
Creates or updates the target [CatalogObject]($m/CatalogObject).
|
BatchDeleteCatalogObjectsResponse batchDeleteCatalogObjects(BatchDeleteCatalogObjectsRequest body) throws ApiException, IOException
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<BatchDeleteCatalogObjectsResponse> batchDeleteCatalogObjectsAsync(BatchDeleteCatalogObjectsRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.BatchRetrieveCatalogObjectsResponse batchRetrieveCatalogObjects(BatchRetrieveCatalogObjectsRequest body) throws ApiException, IOException
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<BatchRetrieveCatalogObjectsResponse> batchRetrieveCatalogObjectsAsync(BatchRetrieveCatalogObjectsRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.BatchUpsertCatalogObjectsResponse batchUpsertCatalogObjects(BatchUpsertCatalogObjectsRequest body) throws ApiException, IOException
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<BatchUpsertCatalogObjectsResponse> batchUpsertCatalogObjectsAsync(BatchUpsertCatalogObjectsRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.CreateCatalogImageResponse createCatalogImage(CreateCatalogImageRequest request, FileWrapper imageFile) throws ApiException, IOException
request - Optional parameter: Example:imageFile - Optional parameter: Example:ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<CreateCatalogImageResponse> createCatalogImageAsync(CreateCatalogImageRequest request, FileWrapper imageFile)
request - Optional parameter: Example:imageFile - Optional parameter: Example:UpdateCatalogImageResponse updateCatalogImage(String imageId, UpdateCatalogImageRequest request, FileWrapper imageFile) throws ApiException, IOException
imageId - Required parameter: The ID of the `CatalogImage` object to update the
encapsulated image file.request - Optional parameter: Example:imageFile - Optional parameter: Example:ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<UpdateCatalogImageResponse> updateCatalogImageAsync(String imageId, UpdateCatalogImageRequest request, FileWrapper imageFile)
imageId - Required parameter: The ID of the `CatalogImage` object to update the
encapsulated image file.request - Optional parameter: Example:imageFile - Optional parameter: Example:CatalogInfoResponse catalogInfo() throws ApiException, IOException
ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<CatalogInfoResponse> catalogInfoAsync()
ListCatalogResponse listCatalog(String cursor, String types, Long catalogVersion) throws ApiException, IOException
cursor - Optional parameter: The pagination cursor returned in the previous response.
Leave unset for an initial request. The page size is currently set to be 100. See
[Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more
information.types - Optional parameter: An optional case-insensitive, comma-separated list of
object types to retrieve. The valid values are defined in the
[CatalogObjectType]($m/CatalogObjectType) enum, for example, `ITEM`,
`ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`,
`IMAGE`, etc. If this is unspecified, the operation returns objects of all the top
level types at the version of the Square API used to make the request. Object types
that are nested onto other object types are not included in the defaults. At the
current API version the default object types are: ITEM, CATEGORY, TAX, DISCOUNT,
MODIFIER_LIST, DINING_OPTION, TAX_EXEMPTION, SERVICE_CHARGE, PRICING_RULE,
PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT, SUBSCRIPTION_PLAN, ITEM_OPTION,
CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS.catalogVersion - Optional parameter: The specific version of the catalog objects to be
included in the response. This allows you to retrieve historical versions of objects.
The specified version value is matched against the
[CatalogObject]($m/CatalogObject)s' `version` attribute. If not included, results
will be from the current version of the catalog.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<ListCatalogResponse> listCatalogAsync(String cursor, String types, Long catalogVersion)
cursor - Optional parameter: The pagination cursor returned in the previous response.
Leave unset for an initial request. The page size is currently set to be 100. See
[Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more
information.types - Optional parameter: An optional case-insensitive, comma-separated list of
object types to retrieve. The valid values are defined in the
[CatalogObjectType]($m/CatalogObjectType) enum, for example, `ITEM`,
`ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`,
`IMAGE`, etc. If this is unspecified, the operation returns objects of all the top
level types at the version of the Square API used to make the request. Object types
that are nested onto other object types are not included in the defaults. At the
current API version the default object types are: ITEM, CATEGORY, TAX, DISCOUNT,
MODIFIER_LIST, DINING_OPTION, TAX_EXEMPTION, SERVICE_CHARGE, PRICING_RULE,
PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT, SUBSCRIPTION_PLAN, ITEM_OPTION,
CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS.catalogVersion - Optional parameter: The specific version of the catalog objects to be
included in the response. This allows you to retrieve historical versions of objects.
The specified version value is matched against the
[CatalogObject]($m/CatalogObject)s' `version` attribute. If not included, results
will be from the current version of the catalog.UpsertCatalogObjectResponse upsertCatalogObject(UpsertCatalogObjectRequest body) throws ApiException, IOException
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<UpsertCatalogObjectResponse> upsertCatalogObjectAsync(UpsertCatalogObjectRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.DeleteCatalogObjectResponse deleteCatalogObject(String objectId) throws ApiException, IOException
objectId - Required parameter: The ID of the catalog object to be deleted. When an
object is deleted, other objects in the graph that depend on that object will be
deleted as well (for example, deleting a catalog item will delete its catalog item
variations).ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<DeleteCatalogObjectResponse> deleteCatalogObjectAsync(String objectId)
objectId - Required parameter: The ID of the catalog object to be deleted. When an
object is deleted, other objects in the graph that depend on that object will be
deleted as well (for example, deleting a catalog item will delete its catalog item
variations).RetrieveCatalogObjectResponse retrieveCatalogObject(String objectId, Boolean includeRelatedObjects, Long catalogVersion) throws ApiException, IOException
objectId - Required parameter: The object ID of any type of catalog objects to be
retrieved.includeRelatedObjects - Optional parameter: If `true`, the response will include
additional objects that are related to the requested objects. Related objects are
defined as any objects referenced by ID by the results in the `objects` field of the
response. These objects are put in the `related_objects` field. Setting this to
`true` is helpful when the objects are needed for immediate display to a user. This
process only goes one level deep. Objects referenced by the related objects will not
be included. For example, if the `objects` field of the response contains a
CatalogItem, its associated CatalogCategory objects, CatalogTax objects, CatalogImage
objects and CatalogModifierLists will be returned in the `related_objects` field of
the response. If the `objects` field of the response contains a CatalogItemVariation,
its parent CatalogItem will be returned in the `related_objects` field of the
response. Default value: `false`catalogVersion - Optional parameter: Requests objects as of a specific version of the
catalog. This allows you to retrieve historical versions of objects. The value to
retrieve a specific version of an object can be found in the version field of
[CatalogObject]($m/CatalogObject)s. If not included, results will be from the current
version of the catalog.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<RetrieveCatalogObjectResponse> retrieveCatalogObjectAsync(String objectId, Boolean includeRelatedObjects, Long catalogVersion)
objectId - Required parameter: The object ID of any type of catalog objects to be
retrieved.includeRelatedObjects - Optional parameter: If `true`, the response will include
additional objects that are related to the requested objects. Related objects are
defined as any objects referenced by ID by the results in the `objects` field of the
response. These objects are put in the `related_objects` field. Setting this to
`true` is helpful when the objects are needed for immediate display to a user. This
process only goes one level deep. Objects referenced by the related objects will not
be included. For example, if the `objects` field of the response contains a
CatalogItem, its associated CatalogCategory objects, CatalogTax objects, CatalogImage
objects and CatalogModifierLists will be returned in the `related_objects` field of
the response. If the `objects` field of the response contains a CatalogItemVariation,
its parent CatalogItem will be returned in the `related_objects` field of the
response. Default value: `false`catalogVersion - Optional parameter: Requests objects as of a specific version of the
catalog. This allows you to retrieve historical versions of objects. The value to
retrieve a specific version of an object can be found in the version field of
[CatalogObject]($m/CatalogObject)s. If not included, results will be from the current
version of the catalog.SearchCatalogObjectsResponse searchCatalogObjects(SearchCatalogObjectsRequest body) throws ApiException, IOException
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<SearchCatalogObjectsResponse> searchCatalogObjectsAsync(SearchCatalogObjectsRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.SearchCatalogItemsResponse searchCatalogItems(SearchCatalogItemsRequest body) throws ApiException, IOException
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<SearchCatalogItemsResponse> searchCatalogItemsAsync(SearchCatalogItemsRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.UpdateItemModifierListsResponse updateItemModifierLists(UpdateItemModifierListsRequest body) throws ApiException, IOException
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<UpdateItemModifierListsResponse> updateItemModifierListsAsync(UpdateItemModifierListsRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.UpdateItemTaxesResponse updateItemTaxes(UpdateItemTaxesRequest body) throws ApiException, IOException
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.ApiException - Represents error response from the server.IOException - Signals that an I/O exception of some sort has occurred.CompletableFuture<UpdateItemTaxesResponse> updateItemTaxesAsync(UpdateItemTaxesRequest body)
body - Required parameter: An object containing the fields to POST for the request.
See the corresponding object definition for field details.Copyright © 2022. All rights reserved.