McMain icon

McMain

Interact with McMain API

Contract → Add Documents

AI-generated

Summary

Add Documents to a contract via a POST request

Inputs

  • id (required) — Contract ID
  • documents (required) — Array of document objects, each containing fileName and data
  • requestOptions — Additional request settings such as batching, SSL verification, proxy, and timeout

Output shape

a JSON object representing the operation result

The response body is returned; may include success status and any server-provided data; no pagination; optional fields may be omitted on errors

Examples

Example 1: Add two files to contract XYZ123 in a single batch

id: XYZ123, documents: [{fileName: "spec.pdf", data: "..."}, {fileName: "terms.docx", data: "..."}], requestOptions: {batching: {batchSize: 2}, timeout: 15000}

Discussion