PandaDoc (pandadoc.com API v0.1.1) View Source
Documentation for PandaDoc
which provides an API for pandadoc.com.
Installation
If available in Hex, the package can be installed
by adding pandadoc
to your list of dependencies in mix.exs
:
def deps do
[
{:pandadoc, "~> 0.1.1"}
]
end
Configuration
config :pandadoc, api_key: "<your api key>"
Link to this section Summary
Functions
Creates a new Document from the given PDF file.
Delete a document.
Get basic data about a document such as name, status, and dates.
Download a PDF of any document.
Download a signed PDF of a completed document.
List documents, optionally filter by a search query or tags.
Move a document to sent status and send an optional email.
Generate a link to share this document with a default expiry of one day.
Link to this section Functions
create_document(name, pdf_bytes, recipients, fields \\ %{}, tags \\ [], parse_form_fields \\ false)
View SourceCreates a new Document from the given PDF file.
Examples
iex> recipients = [
%{email: "jane@example.com", first_name: "Jane", last_name: "Example", role: "signer1"}
]
iex> PandaDoc.create_document("Sample PandaDoc PDF.pdf", [] = pdf_bytes, recipients)
{:ok, "msFYActMfJHqNTKH8YSvF1"}
Delete a document.
Examples
iex> PandaDoc.delete_document("msFYActMfJHqNTKH8YSvF1")
:ok
Get basic data about a document such as name, status, and dates.
Examples
iex> PandaDoc.document_status("msFYActMfJHqNTKH8YSvF1")
{:ok,
%{
id: "msFYActMfJHqNTKH8YSvF1",
name: "Sample Document",
status: "document.draft",
date_created: "2017-08-06T08:42:13.836022Z",
date_modified: "2017-09-04T02:21:13.963750Z",
expiration_date: nil,
version: "1"
}
}
Download a PDF of any document.
Examples
iex> PandaDoc.download_document("msFYActMfJHqNTKH8YSvF1", watermark_text: "WATERMARKED")
{:ok, []}
Download a signed PDF of a completed document.
Examples
iex> PandaDoc.download_protected_document("msFYActMfJHqNTKH8YSvF1")
{:ok, []}
List documents, optionally filter by a search query or tags.
Examples
iex> PandaDoc.list_documents()
{:ok,
[
%{
id: "msFYActMfJHqNTKH8YSvF1",
name: "Sample Document",
status: "document.draft",
date_created: "2017-08-06T08:42:13.836022Z",
date_modified: "2017-09-04T02:21:13.963750Z",
expiration_date: nil,
version: "1"
}
]
}
send_document(id, subject \\ nil, message \\ nil, silent \\ false)
View SourceMove a document to sent status and send an optional email.
Examples
iex> PandaDoc.send_document("msFYActMfJHqNTKH8YSvF1", "Document ready", "Hi there, please sign this document")
:ok