Escaping Issue Impacting Selling Partner API Operations
On 20 January 2022 Amazon’s SP‑API double‑escaped quotation marks and backslashes, turning "sample" into \"sample\" and breaking core endpoints such as Orders, Listings, Feeds and Reports. The fix was deployed the same afternoon, but sellers must verify that responses now contain only a single layer of escaping and clean any persisted double‑escaped data.
Overview
On 20 January 2022 Amazon’s Selling Partner API (SP‑API) experienced a defect that caused characters such as quotation marks and backslashes to be escaped twice in both inbound requests and outbound responses. The double‑escaping produced malformed JSON across most API endpoints, breaking integrations that relied on standard JSON parsing. Amazon has since corrected the behavior, but sellers need to confirm that their applications now receive properly escaped payloads and that any data stored during the outage is cleaned up.
Key Points
- Date of occurrence — The double‑escaping anomaly was first observed on 20 January 2022 and impacted the majority of SP‑API calls made that day.
- Character impact — Quote characters (
") and backslashes (\) were transformed into\"and\\, turning a string like"sample"into\\"sample\\"and a file pathC:\ImagesintoC:\\Images. - Scope of affected endpoints — Core services—including Orders, Listings, Feeds, and Reports APIs—returned double‑escaped JSON, forcing developers to adjust parsing logic for dozens of distinct operations.
- Resolution timeline – Amazon’s engineering team identified the root cause within hours, deployed a fix the same day, and confirmed that normal JSON formatting has been live since the afternoon of 20 January.
- Seller‑level consequence — Applications that performed strict JSON deserialization suffered failures in order retrieval, inventory synchronization, and price updates, which could lead to stock‑level mismatches and delayed shipments.
- Verification recommendation — Amazon advises developers to re‑execute test calls against the previously impacted endpoints and verify that responses now contain only a single layer of escaping for special characters.
How the Escaping Issue Worked
- Input handling — When a seller’s system submitted a JSON payload containing a quote, such as , the SP‑API middleware erroneously added an extra escape, resulting in .
Analysis & Recommendations
Why This Matters
Developers experienced parsing errors like “Invalid character escape sequence” which halted order retrieval, inventory sync and price updates, risking stock mismatches and delayed shipments. Confirming proper escaping restores reliable data flow and prevents lingering corrupted records in catalogs.
Key Takeaways
- The double‑escaping anomaly occurred on 20 Jan 2022 and affected quote (" ) and backslash (\) characters across SP‑API.
- Core services impacted included Orders, Listings, Feeds, and Reports APIs, causing malformed JSON in dozens of operations.
- Amazon deployed a fix the same day; normal JSON formatting has been live since the afternoon of 20 Jan 2022.
- Sellers who added temporary work‑arounds (e.g., replace(/\\/g, '\')) must now remove them to avoid stripping legitimate backslashes.
Recommended Actions
- →Re‑execute test calls to affected endpoints (e.g., GET /orders/v0/orders, GET /listings/v2021-08-01/items) via the SP‑API console or Postman and co...
- →Run a database query such as SELECT * FROM products WHERE title LIKE '%\\%'; and replace '\\' with '\' to clean persisted double‑escaped records.
- →Delete any custom escape‑strip code (e.g., replace(/\\/g, '\')) from your integration repository and redeploy the updated code.
Comments
Join the discussion
Log in or create an account to share your thoughts on this update.
No comments yet. Be the first to share your thoughts!