diff --git a/docs/API.en.epub b/docs/API.en.epub index 499bfc5..1447812 100644 Binary files a/docs/API.en.epub and b/docs/API.en.epub differ diff --git a/docs/API.en.html b/docs/API.en.html index 669872b..29b3469 100644 --- a/docs/API.en.html +++ b/docs/API.en.html @@ -5198,18 +5198,7 @@ Location: /v1/orders/{id} -

Approach #2 is rarely used in modern systems as it requires trusting the client to generate identifiers properly. If we consider options #1 and #3, we must note that the latter conforms to HTTP semantics better as POST requests are considered non-idempotent by default and should not be repeated in case of a timeout or server error. Therefore, repeating a request would appear as a mistake from an external observer's perspective, and it could indeed become one if the server changes the If-Match header check policy to a more relaxed one. Conversely, repeating a PUT request (assuming that getting a timeout or an error while performing a “heavy” order creation operation is much more probable than in the case of a “lightweight” draft creation) could be automated and would not result in order duplication even if the revision check is disabled. However, instead of two URLs and two operations (POST /v1/orders / GET /v1/orders/{id}), we now have four URLs and five operations:

-
    -
  1. -

    The draft creation URL (POST /v1/drafts), which additionally requires a method of retrieving pending drafts through something like GET /v1/drafts/?user_id=<user_id>.

    -
  2. -
  3. -

    The URL to confirm a draft, and perhaps the symmetrical operation of getting draft status (though the GET /drafts resource mentioned above might serve this purpose as well).

    -
  4. -
  5. -

    The URL of an order (GET /v1/orders/{id}).

    -
  6. -
+

Approach #2 is rarely used in modern systems as it requires trusting the client to generate identifiers properly. If we consider options #1 and #3, we must note that the latter conforms to HTTP semantics better as POST requests are considered non-idempotent by default and should not be repeated in case of a timeout or server error. Therefore, repeating a request would appear as a mistake from an external observer's perspective, and it could indeed become one if the server changes the If-Match header check policy to a more relaxed one. Conversely, repeating a PUT request (assuming that getting a timeout or an error while performing a “heavy” order creation operation is much more probable than in the case of a “lightweight” draft creation) could be automated and would not result in order duplication even if the revision check is disabled.

2. Reading

Let's continue. The reading operation is at first glance straightforward: