getCommerceStoreByStoreidListingByKeyWithHttpInfo method

Future<Response> getCommerceStoreByStoreidListingByKeyWithHttpInfo(
  1. String storeid,
  2. String key
)

Fetch one listing override, by item id or by its slug or SKU

Looks the key up in the store's listing map first and, failing that, matches it against each listing's slug and then its SKU — so a storefront holding only a product's URL slug can still resolve the override. That fallback is unique to the listing reads; the item overlay routes match by id alone. A key matching none of the three is 404, as is a store id outside the caller org's namespace. Readable with an admin token or the anonymous published storefront key.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> getCommerceStoreByStoreidListingByKeyWithHttpInfo(String storeid, String key,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/commerce/store/{storeid}/listing/{key}'
    .replaceAll('{storeid}', storeid)
    .replaceAll('{key}', key);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}