taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

delete-private-orders-ORDER_ID.rst (1825B)


      1 .. http:delete:: [/instances/$INSTANCE]/private/orders/$ORDER_ID
      2 
      3   Delete information about an order.  Fails if the order was paid in the
      4   last 10 years (or whatever ``TAX_RECORD_EXPIRATION`` is set to) or was
      5   claimed but is unpaid and thus still a valid offer.
      6 
      7   Since protocol **vMixedPayments**, an order that carries externally
      8   settled payments (``amount_external``) can only be deleted by explicitly
      9   passing ``force``, as such an order may have received payments outside of
     10   Taler that the merchant should resolve manually first.
     11 
     12   **Required permission:** ``orders-write`` (see :ref:`Scopes <merchant-api-scopes>`)
     13 
     14   **Request:**
     15 
     16   :query force: *Optional*. If set to YES, the order will be deleted
     17       even if it was already claimed or carries externally settled
     18       payments. Note that even with force, a paid order cannot be deleted.
     19 
     20   **Response:**
     21 
     22   :http:statuscode:`204 No content`:
     23     The backend has successfully deleted the order.
     24   :http:statuscode:`401 Unauthorized`:
     25     The request is unauthorized.
     26   :http:statuscode:`404 Not found`:
     27     The backend does not know the instance or the order.
     28     Returned with ``TALER_EC_MERCHANT_GENERIC_ORDER_UNKNOWN``.
     29   :http:statuscode:`409 Conflict`:
     30     The backend refuses to delete the order.
     31     Returned with ``TALER_EC_MERCHANT_PRIVATE_DELETE_ORDERS_ALREADY_PAID``,
     32     ``TALER_EC_MERCHANT_PRIVATE_DELETE_ORDERS_AWAITING_PAYMENT`` or
     33     ``TALER_EC_MERCHANT_PRIVATE_DELETE_ORDERS_EXTERNALLY_PAID`` (the latter
     34     since protocol **vMixedPayments**, when the order carries externally
     35     settled payments and ``force`` was not set).
     36   :http:statuscode:`500 Internal Server Error`:
     37     The server experienced an internal failure.
     38     Returned with ``TALER_EC_GENERIC_DB_COMMIT_FAILED`` or
     39     ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE``.