Contents

Apply a human-selected Compare decision

Used only by the human review workspace after a person selects a decision. action=pull_to_base adds selected changes to the version identified by base_document_id. action=revert_in_compare is off for now and answers 409 DOCUMENT_COMPARE_REVERT_OFF, because it could undo edits Compare doesn't list: compare the other way round and use pull_to_base. A session's decisionAvailability says up front which decisions it can take. Omit difference_ids to apply to all unresolved differences. compare_generation is required: the compareGeneration of the response the ids came from.

POST /documents/compare/apply

Headers

  • Authorization string Required

    Bearer <session token>: the signed-in user’s Scaffold session token.

  • x-org-id string Required

Body

  • compare_id string

    Durable compare session id. Preferred for multi-step workflows.

  • base_document_id string

    Document/version id where changes should be added. Required only when compare_id is omitted.

  • compare_document_id string

    Document/version id that contains the changes. Required only when compare_id is omitted.

  • compare_generation string

    compareGeneration from the response these difference ids came from. Required.

  • action string Required

    revert_in_compare is off for now (409 DOCUMENT_COMPARE_REVERT_OFF).

    One of pull_to_base revert_in_compare

  • difference_ids string[]

    Difference ids to apply. Omit or pass [] to apply all unresolved differences.