Fix PCM postcard orders to use POST /order/postcard.
Deploy Beta / unit-tests (push) Successful in 12s
Deploy Beta / docker (push) Successful in 18s
Deploy Beta / deploy-beta (push) Successful in 1m38s

Plain POST /order 404s at PCM; product-specific path is required for sandbox and production sends.
This commit is contained in:
2026-08-10 14:47:10 -05:00
parent dde5b96c62
commit 7fb5317308
+3 -1
View File
@@ -309,7 +309,9 @@ def place_postcard_order(
"returnAddress": return_address_from_settings(),
"recipients": [recipient],
}
data = pcm_request("POST", "/order", json_body=payload)
# Product-specific path — plain POST /order is 404 ("Cannot POST /order").
# Docs: Place Postcard Order → POST /order/postcard
data = pcm_request("POST", "/order/postcard", json_body=payload)
if not isinstance(data, dict):
raise PcmApiError("Unexpected order response from PCM")