Contents

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-write

Request:

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.

404 Not found:

The merchant backend could not find the order or the instance and thus cannot process the forget request.

409 Conflict:

The request includes a field that was not marked as forgettable, so the merchant cannot delete that field.

Details:

interface ForgetRequest {

  // Array of valid JSON paths to forgettable fields in the order's
  // contract terms.
  fields: string[];
}