- PATCH [/instances/$INSTANCE]/private/orders/$ORDER_ID/forget#
Forget fields in an order’s contract terms that the merchant no longer needs.
Required permission:
orders-writeRequest:
The request must be a forget request. The fields specified must have been marked as forgettable when the contract was created. Fields in the request that are not in the contract terms are ignored.
A valid JSON path is defined as a string beginning with
$.that follows the dot notation:$.wire_fee, for example. The$represents the contract terms object, and an identifier following a.represents the field of that identifier belonging to the object preceding the dot. Arrays can be indexed by an non-negative integer within brackets:$.products[1]. An asterisk*can be used to index an array as a wildcard, which expands the path into a list of paths containing one path for each valid array index:$.products[*].description. For a path to be valid, it must end with a reference to a field of an object (it cannot end with an array index or wildcard).Response:
- 200 OK:
The merchant deleted the specified fields from the contract of order $ORDER_ID.
- 204 No content:
The merchant had already deleted the specified fields from the contract of order $ORDER_ID.
- 400 Bad request:
The request is malformed or one of the paths is invalid. Returned with
TALER_EC_MERCHANT_PRIVATE_PATCH_ORDERS_ID_FORGET_PATH_SYNTAX_INCORRECT.- 404 Not found:
The merchant backend could not find the order or the instance and thus cannot process the forget request. Returned with
TALER_EC_MERCHANT_GENERIC_ORDER_UNKNOWNorTALER_EC_MERCHANT_GENERIC_INSTANCE_UNKNOWN.- 409 Conflict:
The request includes a field that was not marked as forgettable, so the merchant cannot delete that field. Returned with
TALER_EC_MERCHANT_PRIVATE_PATCH_ORDERS_ID_FORGET_PATH_NOT_FORGETTABLE.- 500 Internal Server Error:
The server experienced an internal failure. Returned with
TALER_EC_GENERIC_DB_START_FAILED,TALER_EC_GENERIC_DB_FETCH_FAILED, orTALER_EC_GENERIC_DB_COMMIT_FAILED.
Details:
interface ForgetRequest { // Array of valid JSON paths to forgettable fields in the order's // contract terms. fields: string[]; }