squareconnect.apis.catalog_api
All endpoints are relative to Square Connect V2 Documentation
| Method | HTTP request |
|---|---|
| batch_delete_catalog_objects | POST /v2/catalog/batch-delete |
| batch_retrieve_catalog_objects | POST /v2/catalog/batch-retrieve |
| batch_upsert_catalog_objects | POST /v2/catalog/batch-upsert |
| catalog_info | GET /v2/catalog/info |
| delete_catalog_object | DELETE /v2/catalog/object/{object_id} |
| list_catalog | GET /v2/catalog/list |
| retrieve_catalog_object | GET /v2/catalog/object/{object_id} |
| search_catalog_objects | POST /v2/catalog/search |
| update_item_modifier_lists | POST /v2/catalog/update-item-modifier-lists |
| update_item_taxes | POST /v2/catalog/update-item-taxes |
| upsert_catalog_object | POST /v2/catalog/object |
BatchDeleteCatalogObjectsResponse batch_delete_catalog_objects(body)
Deletes a set of CatalogItems based on the provided list of target IDs and returns a set of successfully deleted IDs in the response. Deletion is a cascading event such that all children of the targeted object are also deleted. For example, deleting a CatalogItem will also delete all of its CatalogItemVariation children. BatchDeleteCatalogObjects succeeds even if only a portion of the targeted IDs can be deleted. The response will only include IDs that were actually deleted.
| Name | Type | Notes | Default Value |
|---|---|---|---|
| body | BatchDeleteCatalogObjectsRequest |
BatchDeleteCatalogObjectsResponse
Assign your Access Token from developer portal to the authorization parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BatchRetrieveCatalogObjectsResponse batch_retrieve_catalog_objects(body)
Returns a set of objects based on the provided ID. Each CatalogItem returned in the set includes all of its child information including: all of its CatalogItemVariation objects, references to its CatalogModifierList objects, and the ids of any CatalogTax objects that apply to it.
| Name | Type | Notes | Default Value |
|---|---|---|---|
| body | BatchRetrieveCatalogObjectsRequest |
BatchRetrieveCatalogObjectsResponse
Assign your Access Token from developer portal to the authorization parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BatchUpsertCatalogObjectsResponse batch_upsert_catalog_objects(body)
Creates or updates up to 10,000 target objects based on the provided list of objects. The target objects are grouped into batches and each batch is inserted/updated in an all-or-nothing manner. If an object within a batch is malformed in some way, or violates a database constraint, the entire batch containing that item will be disregarded. However, other batches in the same request may still succeed. Each batch may contain up to 1,000 objects, and batches will be processed in order as long as the total object count for the request (items, variations, modifier lists, discounts, and taxes) is no more than 10,000.
| Name | Type | Notes | Default Value |
|---|---|---|---|
| body | BatchUpsertCatalogObjectsRequest |
BatchUpsertCatalogObjectsResponse
Assign your Access Token from developer portal to the authorization parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CatalogInfoResponse catalog_info()
Returns information about the Square Catalog API, such as batch size limits for BatchUpsertCatalogObjects.
This endpoint does not need any parameter.
Assign your Access Token from developer portal to the authorization parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteCatalogObjectResponse delete_catalog_object(object_id)
Deletes a single CatalogObject based on the provided ID and returns the set of successfully deleted IDs in the response. Deletion is a cascading event such that all children of the targeted object are also deleted. For example, deleting a CatalogItem will also delete all of its CatalogItemVariation children.
| Name | Type | Notes | Default Value |
|---|---|---|---|
| object_id | str |
Assign your Access Token from developer portal to the authorization parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListCatalogResponse list_catalog(cursor=cursor, types=types)
Returns a list of CatalogObjects that includes all objects of a set of desired types (for example, all CatalogItem and CatalogTax objects) in the catalog. The types parameter is specified as a comma-separated list of valid CatalogObject types: ITEM, ITEM_VARIATION, MODIFIER, MODIFIER_LIST, CATEGORY, DISCOUNT, TAX. Important: ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use SearchCatalogObjects and set include_deleted_objects to true.
| Name | Type | Notes | Default Value |
|---|---|---|---|
| cursor | str | [optional] | |
| types | str | [optional] |
Assign your Access Token from developer portal to the authorization parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RetrieveCatalogObjectResponse retrieve_catalog_object(object_id, include_related_objects=include_related_objects)
Returns a single CatalogItem as a CatalogObject based on the provided ID. The returned object includes all of the relevant CatalogItem information including: CatalogItemVariation children, references to its CatalogModifierList objects, and the ids of any CatalogTax objects that apply to it.
| Name | Type | Notes | Default Value |
|---|---|---|---|
| object_id | str | ||
| include_related_objects | bool | [optional] |
Assign your Access Token from developer portal to the authorization parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SearchCatalogObjectsResponse search_catalog_objects(body)
Queries the targeted catalog using a variety of query types: CatalogQuerySortedAttribute, CatalogQueryExact, CatalogQueryRange, CatalogQueryText, CatalogQueryItemsForTax, and CatalogQueryItemsForModifierList.
| Name | Type | Notes | Default Value |
|---|---|---|---|
| body | SearchCatalogObjectsRequest |
Assign your Access Token from developer portal to the authorization parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateItemModifierListsResponse update_item_modifier_lists(body)
Updates the CatalogModifierList objects that apply to the targeted CatalogItem without having to perform an upsert on the entire item.
| Name | Type | Notes | Default Value |
|---|---|---|---|
| body | UpdateItemModifierListsRequest |
UpdateItemModifierListsResponse
Assign your Access Token from developer portal to the authorization parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateItemTaxesResponse update_item_taxes(body)
Updates the CatalogTax objects that apply to the targeted CatalogItem without having to perform an upsert on the entire item.
| Name | Type | Notes | Default Value |
|---|---|---|---|
| body | UpdateItemTaxesRequest |
Assign your Access Token from developer portal to the authorization parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpsertCatalogObjectResponse upsert_catalog_object(body)
Creates or updates the target CatalogObject.
| Name | Type | Notes | Default Value |
|---|---|---|---|
| body | UpsertCatalogObjectRequest |
Assign your Access Token from developer portal to the authorization parameter.
[Back to top] [Back to API list] [Back to Model list] [Back to README]