App Submission API: replace apk endpoint returns “Maintenance” html

Hey, Amazon team

I’m trying to use the Replace API to replace the APK in an edit. The call takes significant time and then the server responds with an HTML maintenance message:

HTTP error: 500 <!DOCTYPE html>
<html>

<head>
    <title>Scheduled Maintenance</title>
    <link rel="stylesheet" type="text/css" href="https://images-na.ssl-images-amazon.com/images/G/01/mobile-apps/devportal2/res/css/reset.css">
    <link rel="stylesheet" type="text/css" href="https://images-na.ssl-images-amazon.com/images/G/01/mobile-apps/devportal2/res/css/main.css">
</head>

<body>
    <div class="container"><a id="logo" href="/"><img src="https://images-na.ssl-images-amazon.com/images/G/01/mobile-apps/devportal2/res/images/logo-dp.png" /></a>
        <div class="system-error">
            <h1 class="primary">Scheduled Maintenance</h1>
            <p>We are currently working to improve your experience.</p>
        </div>
        <div class="footer">
            <p>1996-2020, Amazon.com, Inc. or its affiliates. All Rights Reserved.<br />Amazon is trademarks of Amazon.com, Inc. or its affiliates.</p>
        </div>
    </div>
</body>

</html>

Here is the Java code making the API call (as per your documentation):

  public void replaceApk(
      final String editId, final String apkId, final String etag, final Path binaryFilePath)
      throws IOException {
    final String replaceApkUrl =
        BASE_URL + "/v1/applications/" + appId + "/edits/" + editId + "/apks/" + apkId + "/replace";
    byte[] apkBytes = Files.readAllBytes(binaryFilePath);
    final Request request =
        new Request.Builder()
            .url(replaceApkUrl)
            .addHeader("Authorization", "Bearer " + tokenService.getAccessToken())
            .addHeader("If-Match", etag)
            .put(RequestBody.create(apkBytes, MediaType.get("application/octet-stream")))
            .build();
    try (Response response = httpClient.newCall(request).execute()) {
      validateResponse(response);
    }
  }

App ID is amzn1.devportal.mobileapp.e118d262c79144508231f78cec55f6bc
This has been happening for several days.
Can you help me resolve this or confirm if there is ongoing maintenance on this endpoint?

Thanks in advance

Though after triggering the API, the APK does get replaced —I confirmed this by checking in the Amazon Appstore UI. However, since the server returns an error, it is not ideal because my code flow breaks (as it expects a successful response). Ideally, the API should return a success response when the operation completes successfully.

Hi @Shivani_Sethi_Sharma ,

Thank you for your feedback. I’ve shared it with the appropriate team and will update you as soon as we receive more information from them.