postCommerceStoreByStoreidListingByKeyWithHttpInfo method

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

Add a listing override under a new key

Creates the override and answers the store's ENTIRE listing map at 201 with a Location header — not just the entry that was added. A key already present is refused 400: creation never silently overwrites, so changing an existing listing has to be an explicit replace. The stored listing has its currency stamped from the store's own, which the replace path does not do. The key is matched exactly here, with none of the slug or SKU fallback the read allows. Admin-gated and resolved inside the caller org's namespace.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> postCommerceStoreByStoreidListingByKeyWithHttpInfo(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,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}