Documents

API Endpoints for Documents

List Documents get

https://relatecrm.example.com/api/documents

Headers Required headers

Content-Type (Required) string application/json
Accept (Required) string application/json
Authorization (Required) string Bearer {token}

Query Parameters

order (Optional) string Sort the results being queried.
Example: ?order=created_at or ?order=created_at\|desc
select (Optional) string Select only the provided fields, useful for query optimization.
Example: ?select=first_name;id
per_page (Optional) integer Provide the total number of records to query per page.
Example: ?per_page=20
page (Optional) integer The page number to retrieve results for.
Example: ?page=2
q (Optional) string Search records by a given query.
Example: ?q=John
search_fields (Optional) string Change the fields that the search will be performed to
Example:?search_fields=email:like;phones.number:=
search_match (Optional) string By default the search queries are performed using the OR comparison operator for each query parameter, if you need to match all parameters, you will need to use the AND comparison operator.
Example: ?search_match=and

Retrieve Document get

https://relatecrm.example.com/api/documents/{id}

Headers Required headers

Content-Type (Required) string application/json
Accept (Required) string application/json
Authorization (Required) string Bearer {token}

Path Parameters

id (Required) integer The ID of the record

Create Document post

https://relatecrm.example.com/api/documents

Headers Required headers

Content-Type (Required) string application/json
Accept (Required) string application/json
Authorization (Required) string Bearer {token}

Body Parameters

titleRequiredstringbrand_idRequiredintegerdocument_type_idRequiredintegerID of the document typeuser_idRequiredintegerOwner of the documentrequires_signatureOptionalbooleancontentOptionalstringsignersOptionalarrayExample:

[
    [
        "name" => "John Doe",
        "email" => "[email protected]",
        "send_email": true
    ]
]

recipientsOptionalarrayExample:

[
    [
        "name" => "John Doe",
        "email" => "[email protected]",
        "send_email": true
    ]
]

billableOptionalarray

products (Optional) array Array of products to be attached to the billable object

See Product Metadata
tax_type (Optional) string Any of ['exclusive', 'inclusive', 'no_tax']

If not provided, the default selected tax type in Settings->Products will be used.

#### Product metadata

id (Optional) integer Billable product ID, used to update an existing billable product. You don't need to provide such value when adding new products to the billable, provide the value when updating only.
product_id (Optional) integer The product ID from the products resource. If not provided, Concord CRM will search for an existing product with the same name and if no such product, will create new product.
name (Required) string Product name
description (Optional) string Product description
unit_price (Required) number Unit price - The price of each unit sold
qty (Optional) number Product quantity (default 1)
discount_type (Optional) string Any of ['percent', 'fixed']
discount_total (Optional) number Percentage if discount_type is percent or total discount amount if discount_type is fixed
tax_label (Optional) string
tax_rate (Optional) number
unit (Optional) string

sendOptionalbooleanIndicates whether the document should be sent to the recipients after save.send_mail_account_idOptionalintegerApplicable only if send is set as truesend_mail_bodyOptionalstringApplicable only if send is set as truesend_mail_subjectOptionalstringApplicable only if send is set as truecompaniesOptionalarrayArray of company ID's the document is associated with.contactsOptionalarrayArray of contact ID's the document is associated with.dealsOptionalarrayArray of deal ID's the document is associated with.

Update Document put

https://relatecrm.example.com/api/documents/{id}

Headers Required headers

Content-Type (Required) string application/json
Accept (Required) string application/json
Authorization (Required) string Bearer {token}

Path Parameters

id (Required) integer The ID of the record

Body Parameters

titleRequiredstringbrand_idRequiredintegerdocument_type_idRequiredintegerID of the document typeuser_idRequiredintegerOwner of the documentrequires_signatureOptionalbooleancontentOptionalstringsignersOptionalarrayExample:

[
    [
        "name" => "John Doe",
        "email" => "[email protected]",
        "send_email": true
    ]
]

recipientsOptionalarrayExample:

[
    [
        "name" => "John Doe",
        "email" => "[email protected]",
        "send_email": true
    ]
]

billableOptionalarray

products (Optional) array Array of products to be attached to the billable object

See Product Metadata
removed_products (Optional) array An array of billable product id's to remove from the record.
tax_type (Optional) string Any of ['exclusive', 'inclusive', 'no_tax']

If not provided, the default selected tax type in Settings->Products will be used.

#### Product metadata

id (Optional) integer Billable product ID, used to update an existing billable product. You don't need to provide such value when adding new products to the billable, provide the value when updating only.
product_id (Optional) integer The product ID from the products resource. If not provided, Concord CRM will search for an existing product with the same name and if no such product, will create new product.
name (Required) string Product name
description (Optional) string Product description
unit_price (Required) number Unit price - The price of each unit sold
qty (Optional) number Product quantity (default 1)
discount_type (Optional) string Any of ['percent', 'fixed']
discount_total (Optional) number Percentage if discount_type is percent or total discount amount if discount_type is fixed
tax_label (Optional) string
tax_rate (Optional) number
unit (Optional) string

sendOptionalbooleanIndicates whether the document should be sent to the recipients after save.send_mail_account_idOptionalintegerApplicable only if send is set as truesend_mail_bodyOptionalstringApplicable only if send is set as truesend_mail_subjectOptionalstringApplicable only if send is set as truecompaniesOptionalarrayArray of company ID's the document is associated with.contactsOptionalarrayArray of contact ID's the document is associated with.dealsOptionalarrayArray of deal ID's the document is associated with.

Delete Document delete

https://relatecrm.example.com/api/documents/{id}

Headers Required headers

Content-Type (Required) string application/json
Accept (Required) string application/json
Authorization (Required) string Bearer {token}

Path Parameters

id (Required) integer The ID of the record

Search Documents get

https://relatecrm.example.com/api/documents/search?q={query}

Use this endpoint to perform search without pagination and use the take parameter if you need to limit the results.

Headers Required headers

Content-Type (Required) string application/json
Accept (Required) string application/json
Authorization (Required) string Bearer {token}

Path Parameters

q (Required) string

Query Parameters

take (Optional) integer The maximum number of results to query
Example: ?take=1
order (Optional) string Sort the results being queried.
Example: ?order=created_at or ?order=created_at\|desc
select (Optional) string Select only the provided fields, useful for query optimization.
Example: ?select=first_name;id
search_fields (Optional) string Change the fields that the search will be performed to
Example:?search_fields=email:like;phones.number:=
search_match (Optional) string By default the search queries are performed using the OR comparison operator for each query parameter, if you need to match all parameters, you will need to use the AND comparison operator.
Example: ?search_match=and

Attach Associations to Document put

https://relatecrm.example.com/api/associations/documents/{id}

Headers Required headers

Content-Type (Required) string application/json
Accept (Required) string application/json
Authorization (Required) string Bearer {token}

Path Parameters

id (Required) integer The ID of the record

Make sure to provide at least one resource.

Body Parameters

companies (Optional) array Array of companies ID's to attach
contacts (Optional) array Array of contacts ID's to attach
deals (Optional) array Array of deals ID's to attach

Detach Associations From Document delete

https://relatecrm.example.com/api/associations/documents/{id}

Headers Required headers

Content-Type (Required) string application/json
Accept (Required) string application/json
Authorization (Required) string Bearer {token}

Path Parameters

id (Required) integer The ID of the record

Make sure to provide at least one resource.

Body Parameters

companies (Optional) array Array of companies ID's to detach
contacts (Optional) array Array of contacts ID's to detach
deals (Optional) array Array of deals ID's to detach

Sync Associations To Document post

https://relatecrm.example.com/api/associations/documents/{id}

Headers Required headers

Content-Type (Required) string application/json
Accept (Required) string application/json
Authorization (Required) string Bearer {token}

Path Parameters

id (Required) integer The ID of the record

Make sure to provide at least one resource.

Body Parameters

companies (Optional) array Array of companies ID's to sync
contacts (Optional) array Array of contacts ID's to sync
deals (Optional) array Array of deals ID's to sync