NAME

oEdtk::ECM - inject documents into the ECM and stamp their mailed date

SYNOPSIS

use oEdtk::ECM;

my $doc = oEdtk::ECM::send_document( $file, { id => 42 } );    # => decoded JSON
oEdtk::ECM::http_put_envoidate_for_iddoc( $doc->{iDoc}, '20260113' );

DESCRIPTION

Two calls against the ECM API, ported unchanged from the fork's oEUser::ECM (decision D22):

  • send_document uploads a file, with its index metadata as a JSON "text" form part, to /v1/documents/upload?apirole=EDITIQUE and returns the decoded JSON of the 201 response.

  • http_put_envoidate_for_iddoc stamps the MAILED state and an envoi_date on an existing document via PUT /v1/documents/id?apirole=EDITIQUE, and returns the decoded JSON of the 200 response.

Both authenticate with a static API key, not a token: the Authorization header is APIECM_APIKEY_EDITIQUE verbatim. The base URL is APIECM_URL; transport security comes from oEdtk::Net (verification ON by default). Each function takes an optional trailing configuration hashref -- the fork's two-argument form still works, defaulting to "config_read" in oEdtk::Config.

The fork's own name oEUser::ECM remains available as a delegate to this module.

AUTHOR

The oEdtk team.