def create_offer_on_existing_asin(sku, asin, price, quantity, fulfillment_channel): # API endpoint and URL endpoint = "https://sellingpartnerapi-eu.amazon.com" request_url = f"{endpoint}/listings/2021-08-01/items/{seller_id}/{sku}" # Headers headers = { "x-amz-access-token": access_token, "Content-Type": "application/json" } # Query parameters (marketplace ID in query string) params = { "marketplaceIds": marketplace_id, "includedData": "issues" # Optional, can include other sets } # Payload for creating/updating an offer on an existing ASIN payload = { "productType": "PRODUCT", "requirements": "LISTING_OFFER_ONLY", "attributes": { "merchant_suggested_asin": [ { "value": asin, "marketplace_id": marketplace_id } ], "condition_type": [ { "value": "new_new", "marketplace_id": marketplace_id } ], "fulfillment_availability": [ { "fulfillment_channel_code": fulfillment_channel, # Use the correct fulfillment channel "is_inventory_available": "false" } ], "purchasable_offer": [ { "currency": "GBP", "marketplace_id": marketplace_id, "our_price": [ { "schedule": [ { "value_with_tax": price } ] } ] } ] } } # Send the PUT request to create/update the offer response = requests.put(request_url, headers=headers, params=params, data=json.dumps(payload)) return response sku = "***" # The SKU for your offer asin = "***" # The ASIN of the product you want to list your offer under price = 22.99 quantity = 24 # The quantity you're listing fulfillment_channel = "AMAZON_EU" # MFN for Merchant Fulfilled or FBA for Fulfilled by Amazon