question

Mohammed Hemaid avatar image
Mohammed Hemaid asked

Error when replace APK, Amazon app submission API "httpCode"=>412

Hey everyone,

I used this URL to replace the APK
"/v1/applications/#{app_id}/edits/#{edit_id}/apks/#{apk_id}/replace"

and I have add the etag in the header from this edit response
"/v1/applications/#{app_id}/edits"

But I am always having the same error

{"httpCode"=>412, "message"=>"Precondition Failed", "errors"=>[{"errorCode"=>"error_if_match_incorrect", "errorMessage"=>"'If-Match' header does not match. Conflicts exist with changes on the server."}]}

Any help with this would be appreciated!

Thank you!

app submission and updates
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Levon@Amazon avatar image
Levon@Amazon answered

Hi Mohammed,

I believe you have already resolved this issue, which was caused by using a wrong ETag. For reference, here is the Submission API documentation for the Edit Lifecycle:

https://developer.amazon.com/docs/app-submission-api/flows.html#the-edit-lifecycle

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.