Proposals

Proposals

The proposal object represents a proposal that has been created in the app.

{
    "id": string,
    "name": string,
    "description": string,
    "has_accepted": boolean,
    "has_callback": boolean,
    "accepted_at": datetime,
    "callback_at": datetime,
    "live_at": datetime,
    "views": number,
    "preview_title": string,
    "preview_image": string,
    "enable_password": boolean,
    "enable_expires": boolean,
    "expires_type": string,
    "expires_in": number,
    "enable_view_limit": boolean,
    "view_limit_type": string,
    "view_limit": number,
    "enable_email_verification": boolean,
    "email_verification_type": string,
    "email_verification_address": string,
    "enable_search_engine": boolean,
    "view_limit_reached": boolean,
    "expired": boolean,
    "owner": User,
    "collaborators": { data: User[] },
    "team_wide_access": boolean,
    "favourite": boolean,
    "payment_captured": boolean,
    "archived_at": datetime,        
    "created_at": datetime,
    "updated_at": datetime,
}

id string The unique identifier for the proposal.


name string The name of the proposal.


description string The description of the proposal.


has_accepted boolean Whether the proposal contains an Accept button.


has_callback boolean Whether the proposal contains a Callback button.


accepted_at datetime The date and time when the proposal was accepted.


callback_at datetime The date and time the client requested a callback.


live_at datetime The date and time when the proposal was published.


views number The number of views the proposal has received via the public shared link.


preview_title string The title used when the proposal link is previewed (on social media posts, sms messages, etc).


preview_image string The image used when the proposal link is previewed.


enable_password boolean Indicates whether password protection is enabled for the proposal.


enable_expires boolean Indicates whether an expiry is set for the proposal.


expires_type string e.g. from_live, from_first_view The type of expiry set for the proposal.


expires_in number The time in days until the proposal expires from the configured expires_type.


enable_view_limit boolean Indicates whether a view limit is set for the proposal.


view_limit_type string max, max_browsers The type of view limit set for the proposal.


view_limit number The maximum number of views allowed for the proposal for the configured view_limit_type.


enable_email_verification boolean Indicates whether email verification is required for viewing the proposal.


email_verification_type string e.g. any, domain or specific The type of email verification required.


email_verification_address string The email address or doamin to which verification is restricted.


enable_search_engine boolean Indicates whether the proposal is accessible to search engines.


view_limit_reached boolean Indicates whether the view limit for the proposal has been reached.


expired boolean Indicates whether the proposal has expired.


owner User The owner of the proposal.


collaborators A list of users collaborating on the proposal.


team_wide_access boolean Indicates whether the proposal is accessible to the entire team.


favourite boolean Indicates whether the proposal is marked as a favorite.


payment_captured boolean Indicates whether payment information has been captured for the proposal.


archived_at datetime The date and time when the proposal was archived.

Retrieving a list of proposals
curl https://example.api.pxmo.com/api/proposals?page=1&page_size=15 \
    -H 'Authorization: Bearer {access_token}' \
    -H 'Accept: application/json'
Retrieving a single proposal
curl https://example.api.pxmo.com/api/proposals/{id} \
    -H 'Authorization: Bearer {access_token}' \
    -H 'Accept: application/json'
Deleting a proposal
curl -X DELETE https://example.api.pxmo.com/api/proposals/{id} \
    -H 'Authorization: Bearer {access_token}' \
    -H 'Accept: application/json'
Creating a new proposal
curl -X POST https://example.api.pxmo.com/api/proposals/{id} \
    -H 'Authorization: Bearer {access_token}' \
    -H 'Accept: application/json'
Creating a new proposal from a template
curl -X POST https://example.api.pxmo.com/api/proposals/create-from-template \
    -H 'Authorization: Bearer {access_token}' \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '{ \
        "template_id": "{template_id}", \
        "type": "{system|custom}", \
        "state": { \
            "fields": [ \
                { "key": "client", "value": "Aaron" }, \
                { "key": "mobile", "value": "555-5555" } \
            ]\
        }\
    }'

Note: when creating a proposal from template, the type parameter must be system for using a system template or custom for using a custom template.

Note: To pass variables to the template, you must pass an array of objects with a key and value property. The key must match the key of a variable in the template. The key can be retrieved from the designer under Variables > Your variable > Edit.