Update a document

PUT /api/v1/document/{uuid}
application/json

Body

  • name string

    The name of the document.

  • client_uuids array[string]

    An array containing the client uuids that should be sent the document when it is built.

  • known_dependants array[string]

    Optional: The document variable dependants. Used to swap variables out for real data.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • uuid string

      The UUID of the resource.

    • The timestamp of when the resource was created.

    • The timestamp of when the resource was updated.

    • version integer

      The document builder version. Used for internal purposes only. Defaults to 3

    • name string

      The name of the document.

    • status string

      The status of the document.

    • The required dependant variables of the document.

    • The dependants submitted to the document previously.

    • The download URL of the DOCX content. This is intended for the user to download if they are signed into Plannr. You can access this data via the API using the route in /api/v1.

    • The download URL of the SFDT (SyncFusion) content. This is intended for the user to download if they are signed into Plannr. You can access this data via the API using the route in /api/v1.

    • The download URL of the PDF content. This is intended for the user to download if they are signed into Plannr. You can access this data via the API using the route in /api/v1.

    • The image preview URL of the document. This is intended for the user to preview the document before opening it. You can access this data via the API using the route in /api/v1.

PUT /api/v1/document/{uuid}
curl \
 -X PUT https://api.plannrcrm.com/api/v1/document/uuid \
 -H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
 -H "Content-Type: application/json" \
 -H "Accept: application/json" \
 -H "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
 -d '{"name":"Client Service Agreement","client_uuids":["0939f875-4c53-4d2e-bce2-39f990228d1e","fde6ece2-8700-41e3-87d8-2f9547318bd5"],"known_dependants":[{"client-1":"28ecf640-536a-4677-8e14-27b44060fdfe"}]}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}

# Payload
{
  "name": "Client Service Agreement",
  "client_uuids": [
    "0939f875-4c53-4d2e-bce2-39f990228d1e",
    "fde6ece2-8700-41e3-87d8-2f9547318bd5"
  ],
  "known_dependants": [
    {
      "client-1": "28ecf640-536a-4677-8e14-27b44060fdfe"
    }
  ]
}
Response examples (200)
{
  "name": "Welcome Template",
  "uuid": "d8ba5c13-84de-4a28-bf0e-239f686abee8",
  "status": "published",
  "version": 3,
  "created_at": "2024-10-16T11:10:15+01:00",
  "updated_at": "2024-10-16T11:10:15+01:00",
  "public_pdf_url": "https://plannr.valet/document/4948e1b7-65d7-4b9c-a211-69ac2c0edc5f/content/pdf?plannr_account_uuid=55a1af37-65c9-4160-93b4-8e21af252daf",
  "public_docx_url": "https://plannr.valet/document/4eaf6e9c-9e0e-4711-aee4-8972cae8168d/content/docx?plannr_account_uuid=0f9aa8f8-1b0a-41b5-988d-8a7711e4ade5",
  "public_sfdt_url": "https://plannr.valet/document/c1b3d671-13c8-4af6-a00d-d647886f2a4b/content/sfdt?plannr_account_uuid=1921e3b9-3fc5-44a6-9c81-4def3a74b5e3",
  "known_dependants": {
    "client-1": "83b54242-08d8-43d2-a93c-b18fd6949702"
  },
  "public_preview_url": "https://plannr.valet/document/a18b296a-629b-4001-8d82-e046da0e3de4/content/preview?plannr_account_uuid=20b4b9d4-ca3d-4423-bca2-38a6a47e00aa",
  "required_dependants": {
    "client-1": "client"
  }
}