Reporting

Get performance

GET reports/performance Deprecated; will be removed as of January 1, 2019

Query string parameters

  • start_date date
    • Y-m-d H:i:s format
    • default: now minus 1 month
  • end_date date
    • Must be after start_date
    • Y-m-d H:i:s format
    • default: now plus 1 month
  • users integer - Comma separated list of ids.
  • teams integer - Comma separated list of ids.
  • products UUID - Comma separated list of ids.
  • categories integer - Comma separated list ids.
  • relations_path_id UUID - Comma separated list of ids.
  • lead_type_id UUID - Comma separated list of lead ids.

Return value depends on your company.settings.product_mode

Response
Status code 200

{
  "past": [
    {
      "date": "2015-05-23 00:00:00",
      "value": 89619
    }
  ],
  "future": [
    {
      "date": "2015-06-22 00:00:00",
      "value": 6990.5935065777
    }
  ]
}

Notify

POST /reports/performance/notify Deprecated; will be removed as of January 1, 2019

Parameters

  • notify.users array
    • Required without notify.teams
    • notify.users.* integer
  • notify.teams array
    • Required without notify.users
    • notify.teams.* integer
  • message string - Message to display in notification.
    • Required

Payload

{
  "notify": {
      "users": [1,2],
      "teams": [1]
  },
  "message": "Some content"
}

Response
Status code 204

Export

GET /reports/performance/export/pdf Deprecated; will be removed as of January 1, 2019

Query string parameters

  • start_date date
    • Y-m-d H:i:s format
    • default: now minus 1 month
  • end_date date
    • Must be after start_date
    • Y-m-d H:i:s format
    • default: now plus 1 month
  • users integer - Comma separated list of ids.
  • teams integer - Comma separated list of ids.
  • products UUID - Comma separated list of ids.
  • categories integer - Comma separated list ids.
  • relations_path_id UUID - Comma separated list of ids.
  • lead_type_id UUID - Comma separated list of lead ids.

The URL returned is valid for 5 minutes.

Response
Status code 200

{
  "url": "*URL TO PDF*"
}

Pipeline

Get pipeline

GET /reports/pipeline Deprecated; will be removed as of January 1, 2019

Returns the value in your pipeline by relations paths

Response
Status code 200

{
  "data": [
    {
      "id": "1eae431b-3d0f-4528-9c59-e9d1a40fcd04",
      "name": "Relations path",
      "value": 248,
      "sum": 574493.76266962
    },
    {
      "id": "9eae431b-3d0f-4528-9c59-e9d1a40fcd04",
      "name": "Second relations path",
      "value": 245,
      "sum": 594525.37285339
    }
  ]
}

Get pipeline by relations path

GET /reports/pipeline/:relations_path_id Deprecated; will be removed as of January 1, 2019

Query string parameters

  • start_date date
    • Y-m-d H:i:s format
    • default: now minus 1 month
  • end_date date
    • Must be after start_date
    • Y-m-d H:i:s format
    • default: now plus 1 month
  • users integer - Comma separated list of ids.
  • teams integer - Comma separated list of ids.
  • products uuid - Comma separated list of ids.
  • categories integer - Comma separated list ids.

Returns your milestones and the predicted revenue. Return value depends on your company.settings.product_mode

Response
Status code 200

{
  "data": [
    {
      "id": "143cef92-f9b4-4fcb-b4e4-834f34915973",
      "name": "Milestone 2",
      "chance_of_success": 30,
      "value": 149,
      "sum": 412428.89628741
    },
    {
      "id": "1203539b-f06c-442c-8ad0-f5a56f0615f6",
      "name": "Contract",
      "chance_of_success": 100,
      "value": 144,
      "sum": 358156.1110869
    }
  ]
}

Get cases from milestone in pipeline

GET /reports/pipeline/relations_path_id/activities/:activity_id Deprecated; will be removed as of January 1, 2019

Query string parameters

Response
Status code 200

{
  "data": [
    {
      "id": "de422243-645b-3111-a832-9ede3c2e41ae",
      "case_number": 10,
      "status": "open",
      "account": {
        "id": "76f3b0b7-5026-36d9-bdd3-622e27a2a917",
        "name": "Sandberg A/S"
      },
      "contact": {
        "id": "d6c702ef-1806-36c7-81bc-1a4f9555ed8b",
        "name": "Alice Brandt"
      },
      "user": {
        "id": 20,
        "name": "Demarcus Adams"
      },
      "relations_path": {
        "id": "9eae431b-3d0f-4528-9c59-e9d1a40fcd04",
        "name": null
      },
      "chance_of_success": 56,
      "milestones": [
        {
          "id": "a203539b-f06c-442c-8ad0-f5a56f0615f6",
          "name": "Contract",
          "done": false
        },
        {
          "id": "943cef92-f9b4-4fcb-b4e4-834f34915973",
          "name": "Milestone 2",
          "done": true
        }
      ],
      "latest_activity_at": "2015-05-16 06:24:46",
      "estimated_close_date": "2016-03-08",
      "created_at": "2015-02-24 12:34:56",
      "updated_at": "2015-02-24 12:34:56"
    }
  ],
  "pagination": {
    "total": 10,
    "page": 1,
    "per_page": 15,
    "urls": {
      "previous": null,
      "next": "null"
    }
  }
}

Relations

GET /reports/relations Deprecated; will be removed as of January 1, 2019

For all relations endpoints you can use these query parameters

Query string parameters

  • start_date date
    • Y-m-d H:i:s format
    • default: now minus 1 month
  • end_date date
    • Must be after start_date
    • Y-m-d H:i:s format
    • default: now
  • users integer - Comma separated list of ids.
  • teams integer - Comma separated list of ids.
  • products UUID - Comma separated list of ids.
  • categories integer - Comma separated list ids.
  • group_by string - This will change the output slightly, and nest the data.
    • user or team
    • default: null
  • lead_type_id UUID - Comma separated list of lead ids.

Response
Status code 200

{
  "statuses": {
    "total": 1502,
    "closed": 490,
    "open": 493,
    "declined": 519
  },
  "relations_paths": [
    {
      "id": "9eae431b-3d0f-4528-9c59-e9d1a40fcd04",
      "name": "Nam lacinia malesuada tellus",
      "value": 741
    }
  ]
}

For a specific relations path

GET /reports/relations/:relations_path_id Deprecated; will be removed as of January 1, 2019

Response
Status code 200

{
  "activities": [
    {
      "id": "943cef92-f9b4-4fcb-b4e4-834f34915973",
      "name": "Milestone 2",
      "value": 505,
      "closed": 158,
      "conversion_rate": 31.287128712871
    },
    {
      "id": "a203539b-f06c-442c-8ad0-f5a56f0615f6",
      "name": "Contract",
      "value": 485,
      "closed": 154,
      "conversion_rate": 31.752577319588
    }
  ]
}

Get a list of cases/contacts for a given activity-type

GET /reports/relations/:relations_path_id/activities/:activity_type_id Deprecated; will be removed as of January 1, 2019

Parameters

  • user_id integer - Show only activities for this user.
  • team_id integer - Show only activities for this team.
  • lead_type_id UUID - Comma separated list of lead type ids.

Response
Status code 200

{
  "data": [
    {
      "id": "0a963440-e98b-3236-aada-bef846c610db",
      "case_number": 4,
      "status": "closed",
      "account": {
        "id": "3cb87c2f-0feb-3b10-90a1-b5d01bb3eb69",
        "name": "B2C - Krogh & Vester"
      },
      "contact": {
        "id": "068c7b4e-0bf5-3b97-9978-2be606e83df2",
        "name": "Anton Dalsgaard"
      },
      "user": {
        "id": 2,
        "name": "Gisselle Wisoky"
      },
      "relations_path": {
        "id": "9eae431b-3d0f-4528-9c59-e9d1a40fcd04",
        "name": null
      },
      "chance_of_success": 82,
      "milestones": [
        {
          "id": "a203539b-f06c-442c-8ad0-f5a56f0615f6",
          "name": "Contract",
          "done": true
        },
        {
          "id": "943cef92-f9b4-4fcb-b4e4-834f34915973",
          "name": "Milestone 2",
          "done": true
        }
      ],
      "latest_activity_at": "2015-02-24 12:34:56",
      "estimated_close_date": "2015-02-24",
      "created_at": "2015-02-24 12:34:56",
      "updated_at": "2015-05-30 07:11:35"
    }
  ],
  "pagination": {
    "total": 10,
    "page": 1,
    "per_page": 15,
    "urls": {
      "previous": null,
      "next": null
    }
  }
}

Export

You can export from 2 endpoints

GET /reports/relations/export/pdf Deprecated; will be removed as of January 1, 2019
GET /reports/relations/:relations_path_id/export/pdf Deprecated; will be removed as of January 1, 2019

The URL returned is valid for 5 minutes.

Response
Status code 200

{
  "url": "*URL TO PDF*"
}

Notify

You can export from 2 endpoints

POST /reports/relations/notify Deprecated; will be removed as of January 1, 2019
POST /reports/relations/:relations_path_id/notify Deprecated; will be removed as of January 1, 2019

Parameters

You can use the same params as for GET /reports/relations and GET /reports/relations/:relations_path_id

  • notify.users array
    • Required without notify.teams
    • notify.users.* integer
  • notify.teams array
    • Required without notify.users
    • notify.teams.* integer
  • message string - Message to display in notification.
    • Required

Payload

{
  "notify": {
    "users": [1, 2],
    "teams": [1]
  },
  "message": "Some content"
}

Response
Status code 204

Avg process time

GET /reports/relations/:relations_path_id/process-time Deprecated; will be removed as of January 1, 2019

Response
Status code 200

{
  "data": [
    {
      "process_time": {
        "diff_in_seconds": 16283,
        "years": 0,
        "months": 0,
        "days": 0,
        "hours": 4,
        "minutes": 31,
        "seconds": 23
      },
      "milestones": {
        "from": {
          "id": "943cef92-f9b4-4fcb-b4e4-834f34915973",
          "name": "Milestone 2",
          "sort_order": 2,
          "set_status": "open",
          "suggest_task_after": 172800,
          "template_id": null,
          "content_suggestions": null,
          "extra_step": null,
          "additional_steps": null,
          "chance_of_success": 30
        },
        "to": {
          "id": "a203539b-f06c-442c-8ad0-f5a56f0615f6",
          "name": "Contract",
          "sort_order": 1,
          "set_status": "closed",
          "suggest_task_after": 172800,
          "template_id": null,
          "content_suggestions": null,
          "extra_step": null,
          "additional_steps": [
            "product_details",
            "correspondence",
            "automations"
          ],
          "chance_of_success": 100
        }
      }
    }
  ]
}

Campaign

Campaign report

You can get a report on your sent email campaigns.

GET /campaigns/:campaign_id/report Deprecated; will be removed as of January 1, 2019

Query string parameters

  • start_date date
    • Y-m-d H:i:s format
    • default: campaign start_date
  • end_date date
    • Must be after start_date
    • Y-m-d H:i:s format
    • default: campaign start_date plus 1 month

Response
Status code 200

{
  "stats": {
    "sent": 415,
    "click": 40,
    "open": 214
  },
  "links": [
    {
      "url": "http://example.com",
      "value": 13
    }
  ],
  "date_histogram": [
    {
      "date": "2015-05-01 00:00:00",
      "open": 2,
      "click": 0
    }
  ]
}

Leads

For all leads endpoints you can use these query parameters

Query string parameters

  • start_date date
    • Y-m-d H:i:s format
    • default: now minus 1 month
  • end_date date
    • Must be after start_date
    • Y-m-d H:i:s format
    • default: now
  • teams integer - Comma separated list of ids.

Overview

GET /reports/leads Deprecated; will be removed as of January 1, 2019

Query string parameters

  • Supported query string parameters Leads

Response
Status code 200

{
  "data": [
    {
      "name": "Magazine order",
      "id": "2acb4738-dcd6-4e6e-aeb6-ed45ddeb9ab6",
      "value": 6
    },
    {
      "name": "Interested Buyer",
      "id": "31401e63-3c07-4035-b727-5040dc55ff8c",
      "value": 15
    },
    {
      "name": "Test drive",
      "id": "990f3e13-d891-460e-82da-5af3a223b6b3",
      "value": 23
    },
    {
      "name": "all",
      "id": "all",
      "value": 44
    }
  ]
}

For a specific lead type

GET /reports/leads/:lead_type_id Deprecated; will be removed as of January 1, 2019

Query string parameters

  • lead_type_id UUID - Can also be all, if you want to see all lead types.
  • Supported query string parameters Leads

Response
Status code 200

{
  "data": [
    {
      "escalated": 4,
      "accepted": 8,
      "rejected": 10,
      "assigned": 18,
      "received": 30,
      "escalated_no_first_activity": 4,
      "revoked": 15,
      "date_histogram": [
        {
          "date": "2015-10-01 00:00:00",
          "escalated": {
            "value": 0
          },
          "accepted": {
            "value": 0,
            "avg_process_time": {
              "diff_in_seconds": 0,
              "years": 0,
              "months": 0,
              "days": 0,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            },
            "avg_first_activity_time": {
              "diff_in_seconds": 0,
              "years": 0,
              "months": 0,
              "days": 0,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            }
          },
          "rejected": {
            "value": 0,
            "avg_process_time": {
              "diff_in_seconds": 0,
              "years": 0,
              "months": 0,
              "days": 0,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            }
          },
          "assigned": {
            "value": 0
          },
          "received": {
            "value": 0
          },
          "escalated_no_first_activity": {
            "value": 0
          },
          "revoked": {
            "value": 0
          }
        },
        {
          "date": "2015-11-01 00:00:00",
          "escalated": {
            "value": 0
          },
          "accepted": {
            "value": 0,
            "avg_process_time": {
              "diff_in_seconds": 0,
              "years": 0,
              "months": 0,
              "days": 0,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            },
            "avg_first_activity_time": {
              "diff_in_seconds": 0,
              "years": 0,
              "months": 0,
              "days": 0,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            }
          },
          "rejected": {
            "value": 0,
            "avg_process_time": {
              "diff_in_seconds": 0,
              "years": 0,
              "months": 0,
              "days": 0,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            }
          },
          "assigned": {
            "value": 0
          },
          "received": {
            "value": 0
          },
          "escalated_no_first_activity": {
            "value": 0
          },
          "revoked": {
            "value": 0
          }
        },
        {
          "date": "2015-12-01 00:00:00",
          "escalated": {
            "value": 0
          },
          "accepted": {
            "value": 0,
            "avg_process_time": {
              "diff_in_seconds": 0,
              "years": 0,
              "months": 0,
              "days": 0,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            },
            "avg_first_activity_time": {
              "diff_in_seconds": 0,
              "years": 0,
              "months": 0,
              "days": 0,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            }
          },
          "rejected": {
            "value": 0,
            "avg_process_time": {
              "diff_in_seconds": 0,
              "years": 0,
              "months": 0,
              "days": 0,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            }
          },
          "assigned": {
            "value": 0
          },
          "received": {
            "value": 0
          },
          "escalated_no_first_activity": {
            "value": 0
          },
          "revoked": {
            "value": 0
          }
        },
        {
          "date": "2016-01-01 00:00:00",
          "escalated": {
            "value": 0
          },
          "accepted": {
            "value": 0,
            "avg_process_time": {
              "diff_in_seconds": 0,
              "years": 0,
              "months": 0,
              "days": 0,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            },
            "avg_first_activity_time": {
              "diff_in_seconds": 0,
              "years": 0,
              "months": 0,
              "days": 0,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            }
          },
          "rejected": {
            "value": 0,
            "avg_process_time": {
              "diff_in_seconds": 0,
              "years": 0,
              "months": 0,
              "days": 0,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            }
          },
          "assigned": {
            "value": 0
          },
          "received": {
            "value": 0
          },
          "escalated_no_first_activity": {
            "value": 0
          },
          "revoked": {
            "value": 0
          }
        },
        {
          "date": "2016-02-01 00:00:00",
          "escalated": {
            "value": 4
          },
          "accepted": {
            "value": 8,
            "avg_process_time": {
              "diff_in_seconds": 172800,
              "years": 0,
              "months": 0,
              "days": 2,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            },
            "avg_first_activity_time": {
              "diff_in_seconds": 86400,
              "years": 0,
              "months": 0,
              "days": 1,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            }
          },
          "rejected": {
            "value": 10,
            "avg_process_time": {
              "diff_in_seconds": 172800,
              "years": 0,
              "months": 0,
              "days": 2,
              "hours": 0,
              "minutes": 0,
              "seconds": 0
            }
          },
          "assigned": {
            "value": 18
          },
          "received": {
            "value": 30
          },
          "escalated_no_first_activity": {
            "value": 4
          },
          "revoked": {
            "value": 20
          }
        }
      ]
    }
  ]
}

Tasks

Current

GET /reports/tasks/current Deprecated; will be removed as of January 1, 2019

Query string parameters

  • users integer - Comma separated list of ids.
  • group_by string - This will change the output slightly, and nest the data.
    • user or team
    • default: null
  • lead_type_id UUID - Comma separated list of ids
  • relations_path_id UUID - Comma separated list of ids.

Response
Status code 200

Without grouping

{
  "tasks": {
    "pending": 0,
    "later": 2,
    "overdue": 0
  }
}

With grouping

{
  "tasks": [
    {
      "id": 1,
      "name": "Jane Doe",
      "data": {
        "pending": 0,
        "later": 2,
        "overdue": 0
      }
    }
  ]
}

Overview

GET /reports/tasks Deprecated; will be removed as of January 1, 2019

Query string parameters

  • users integer - Comma separated list of ids.
  • teams integer - Comma separated list of ids.
  • group_by string - This will change the output slightly, and nest the data.
    • user or team
    • default: null
  • lead_type_id UUID - Comma separated list of ids
  • relations_path_id UUID - Comma separated list of ids.

Response
Status code 200

{
  "tasks": {
    "in_date_range": {
      "overdue_completed": 1,
      "created": 460,
      "completed": 142
    },
    "type_count": [
      {
        "name": "meeting",
        "value": 700
      },
      {
        "name": "call",
        "value": 650
      },
      {
        "name": "email",
        "value": 650
      }
    ]
  }
}

Notify

POST /reports/tasks/notify

Parameters

  • notify.users array
    • Required with out notify.teams
    • notify.users.* integer
  • notify.teams array
    • Required without notify.users
    • notify.teams.* integer
  • message string - Message to display in notification.
    • Required

Payload

{
  "notify": {
    "users": [1, 2],
    "teams": [1]
  },
  "message": "Content of the message"
}

Response
Status code 204

Notified report

GET /reports/notified/:notified_report_id

The returned url is valid for 5 minutes.

Response
Status code 200

{
  "url": "*URL TO PDF*"
}

Scheduled reports

Get all reports

GET /reports/scheduled-reports Deprecated; will be removed as of January 1, 2019

Query string parameters

  • mine bolean - Show your own reports.
  • Supports Pagination

Response
Status code 200

{
  "data": [
    {
      "id": "e3666d8b-0d5a-4706-9553-c607c2d33345",
      "name": "Second scheduled report",
      "type": "tasks",
      "user": {
        "id": 1,
        "first_name": "Doe",
        "last_name": "John",
        "phone_number": "+4588888888",
        "job_title": "Animal",
        "email": "info@easir.com",
        "profile_picture": "http://api.randomuser.me/portraits/thumb/women/5.jpg",
        "created_at": "2014-01-01 12:45:56",
        "updated_at": "2014-01-02 00:11:22"
      },
      "team": {
        "id": 1,
        "name": "Team 1",
        "address_1": "Savannah 123",
        "address_2": "Under the tree on the left",
        "zip_code": "4730",
        "city": "Umzimkulu",
        "state": "KwaZulu-Natal",
        "country": null,
        "phone_number": "031 308 7900",
        "website": "https://easir.com",
        "vat": "1234567890123456",
        "group": null,
        "created_at": "2014-01-01 12:45:56",
        "updated_at": "2014-01-02 00:11:22"
      },
      "schedule": {
        "occurs": "daily",
        "hour": 8
      },
      "created_at": "2015-06-16 12:13:00",
      "updated_at": "2015-06-16 12:13:00"
    }
  ],
  "pagination": {
    "total": 2,
    "page": 1,
    "per_page": 15,
    "urls": {
      "previous": null,
      "next": null
    }
  }
}

Get a report

GET /reports/scheduled-reports/:scheduled_report_id Deprecated; will be removed as of January 1, 2019

If you have a filter on your report it can be quiet verbose.

Response
Status code 200

{
  "id": "e3666d8b-0d5a-4706-9553-c607c2d33345",
  "name": "Second scheduled report",
  "type": "tasks",
  "user": {
    "id": 1,
    "first_name": "Doe",
    "last_name": "John",
    "phone_number": "+4588888888",
    "job_title": "Animal",
    "email": "info@easir.com",
    "profile_picture": "http://api.randomuser.me/portraits/thumb/women/5.jpg",
    "created_at": "2014-01-01 12:45:56",
    "updated_at": "2014-01-02 00:11:22"
  },
  "team": {
    "id": 1,
    "name": "Team 1",
    "address_1": "Savannah 123",
    "address_2": "Under the tree on the left",
    "zip_code": "4730",
    "city": "Umzimkulu",
    "state": "KwaZulu-Natal",
    "country": null,
    "phone_number": "031 308 7900",
    "website": "https://easir.com",
    "vat": "1234567890123456",
    "group": null,
    "created_at": "2014-01-01 12:45:56",
    "updated_at": "2014-01-02 00:11:22"
  },
  "schedule": {
    "occurs": "daily",
    "hour": 8
  },
  "filter": [],
  "created_at": "2015-06-16 12:13:00",
  "updated_at": "2015-06-16 12:13:00"
}

Create a report

POST /reports/scheduled-reports

Parameters

  • name string
    • Between 1 and 255 characters
    • Required
  • type string
    • relations,leads,tasks or performance
    • Required
  • users array - Users to receive the report.
    • users.* integer
  • schedule.occurs string
    • daily, weekly or monthly
    • Required
    • schedule.week_day integer
      • Required if schedule.occurs is weekly
      • 0 sunday - 6 saturday
    • schedule.month_day string
      • Required if schedule.occurs is monthly
      • start or end
  • schedule.hour integer
    • Between 0 and 23
    • Required
  • filter.users array
    • filter.users.* integer
  • filter.teams array
    • filter.teams.* integer
  • filter.products array
    • filter.products.* UUID
  • filter.categories array
    • filter.categories.* integer
  • filter.group_by string
    • If type is relations or leads
    • Can be team, user or activities
  • filter.relations_path_id UUID - You can filter with a relations path id.
    • If type is relations or tasks
  • filter.lead_type_id UUID - You can filter with a lead type id.
    • If type is leads, relations or tasks

Payload

{
  "name": "My report",
  "type": "relations",
  "users": [
    1,
    2,
    4
  ],
  "schedule": {
    "occurs": "daily",
    "month_day": "end",
    "hour": 14
  },
  "filter": {
    "users": [
      1
    ],
    "teams": [
      1
    ],
    "group_by": "team",
    "products": [
      "f066bc3e-347f-3768-a280-b24aab19318f"
    ],
    "categories": [
      2
    ],
    "relations_path_id": "1eae431b-3d0f-4528-9c59-e9d1a40fcd04"
  }
}

Response
Status code 201

{
  "id": "2d8818f7-ec90-4bd7-9855-f92b0d62b276",
  "name": "My report",
  "type": "relations",
  "user": {
    "id": 1,
    "first_name": "Doe",
    "last_name": "John",
    "phone_number": "+4588888888",
    "job_title": "Animal",
    "email": "info@easir.com",
    "profile_picture": "http://api.randomuser.me/portraits/thumb/women/5.jpg",
    "created_at": "2014-01-01 12:45:56",
    "updated_at": "2014-01-02 00:11:22"
  },
  "team": {
    "id": 1,
    "name": "Team 1",
    "address_1": "Savannah 123",
    "address_2": "Under the tree on the left",
    "zip_code": "4730",
    "city": "Umzimkulu",
    "state": "KwaZulu-Natal",
    "country": null,
    "phone_number": "031 308 7900",
    "website": "https://easir.com",
    "vat": "1234567890123456",
    "group": null,
    "created_at": "2014-01-01 12:45:56",
    "updated_at": "2014-01-02 00:11:22"
  },
  "users": [
    {
      "id": 1,
      "first_name": "Doe",
      "last_name": "John",
      "phone_number": "+4588888888",
      "job_title": "Animal",
      "email": "info@easir.com",
      "profile_picture": "http://api.randomuser.me/portraits/thumb/women/5.jpg",
      "created_at": "2014-01-01 12:45:56",
      "updated_at": "2014-01-02 00:11:22"
    },
    {
      "id": 2,
      "first_name": "Larue",
      "last_name": "Ruecker",
      "phone_number": "(521)317-9044x4393",
      "job_title": "Business Insights Analyst",
      "email": "0@example.com",
      "profile_picture": null,
      "created_at": "2014-07-02 03:45:53",
      "updated_at": "2015-06-16 12:13:34"
    },
    {
      "id": 4,
      "first_name": "Charley",
      "last_name": "Reilly",
      "phone_number": "052.033.5256x688",
      "job_title": "Data Analyst",
      "email": "contacts@easir.com",
      "profile_picture": null,
      "created_at": "2015-06-03 19:10:13",
      "updated_at": "2015-06-16 05:25:42"
    }
  ],
  "schedule": {
    "occurs": "daily",
    "month_day": "end",
    "hour": 14
  },
  "filter": {
    "users": [
      {
        "id": 1,
        "first_name": "Doe",
        "last_name": "John",
        "phone_number": "+4588888888",
        "job_title": "Animal",
        "email": "info@easir.com",
        "profile_picture": "http://api.randomuser.me/portraits/thumb/women/5.jpg",
        "created_at": "2014-01-01 12:45:56",
        "updated_at": "2014-01-02 00:11:22"
      }
    ],
    "teams": [
      {
        "id": 1,
        "name": "Team 1",
        "address_1": "Savannah 123",
        "address_2": "Under the tree on the left",
        "zip_code": "4730",
        "city": "Umzimkulu",
        "state": "KwaZulu-Natal",
        "country": null,
        "phone_number": "031 308 7900",
        "website": "https://easir.com",
        "vat": "1234567890123456",
        "group": null,
        "created_at": "2014-01-01 12:45:56",
        "updated_at": "2014-01-02 00:11:22"
      }
    ],
    "products": [
      {
        "id": "f066bc3e-347f-3768-a280-b24aab19318f",
        "category": {
          "id": 4,
          "name": "Category 4",
          "created_at": "2015-02-03 12:00:00",
          "updated_at": "2015-02-03 12:00:00"
        },
        "fixed_fields": [
          {
            "id": 29,
            "type": "text",
            "name": "product_id",
            "label": "Product id",
            "value": "PRODUCT_ID",
            "validation": null,
            "required": false,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          },
          {
            "id": 30,
            "type": "text",
            "name": "name",
            "label": "Name",
            "value": "dolor",
            "validation": null,
            "required": true,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          },
          {
            "id": 31,
            "type": "numeric",
            "name": "list_price",
            "label": "List price",
            "value": 331.35,
            "validation": "numeric",
            "required": true,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          },
          {
            "id": 32,
            "type": "numeric",
            "name": "purchase_price",
            "label": "Purchase price",
            "value": 6.86,
            "validation": "numeric",
            "required": true,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          },
          {
            "id": 33,
            "type": "single_choice",
            "name": "type",
            "label": "Type",
            "value": {
              "id": 501,
              "value": "Hours"
            },
            "validation": null,
            "required": true,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          },
          {
            "id": 34,
            "type": "numeric",
            "name": "vat",
            "label": "VAT",
            "value": 26,
            "validation": "numeric",
            "required": true,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          }
        ],
        "custom_fields": [
          {
            "id": 14,
            "type": "text",
            "name": "custom_product_field",
            "label": "Custom product field",
            "value": null,
            "validation": null,
            "required": false,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          }
        ],
        "created_at": "2015-02-24 12:34:56",
        "updated_at": "2015-02-24 12:34:56"
      }
    ],
    "categories": [
      {
        "id": 2,
        "name": "Category 2",
        "created_at": "2015-02-03 12:00:00",
        "updated_at": "2015-02-03 12:00:00"
      }
    ]
  },
  "created_at": "2015-06-16 12:50:09",
  "updated_at": "2015-06-16 12:50:09"
}

Update a report

PUT /reports/scheduled-reports/:scheduled_report_id Deprecated; will be removed as of January 1, 2019

Parameters

Payload

{
  "name": "Donec ultricies turpis ut cursus semper",
  "type": "relations",
  "users": [
    1,
    2,
    4
  ],
  "schedule": {
    "occurs": "daily",
    "month_day": "end",
    "hour": 14
  },
  "filter": {
    "users": [
      1
    ],
    "teams": [
      1
    ],
    "group_by": "team",
    "products": [
      "f066bc3e-347f-3768-a280-b24aab19318f"
    ],
    "categories": [
      2
    ],
    "relations_path_id": "1eae431b-3d0f-4528-9c59-e9d1a40fcd04"
  }
}

Response
Status code 200

{
  "id": "2d8818f7-ec90-4bd7-9855-f92b0d62b276",
  "name": "Donec ultricies turpis ut cursus semper",
  "type": "relations",
  "user": {
    "id": 1,
    "first_name": "Doe",
    "last_name": "John",
    "phone_number": "+4588888888",
    "job_title": "Animal",
    "email": "info@easir.com",
    "profile_picture": "http://api.randomuser.me/portraits/thumb/women/5.jpg",
    "created_at": "2014-01-01 12:45:56",
    "updated_at": "2014-01-02 00:11:22"
  },
  "team": {
    "id": 1,
    "name": "Team 1",
    "address_1": "Savannah 123",
    "address_2": "Under the tree on the left",
    "zip_code": "4730",
    "city": "Umzimkulu",
    "state": "KwaZulu-Natal",
    "country": null,
    "phone_number": "031 308 7900",
    "website": "https://easir.com",
    "vat": "1234567890123456",
    "group": null,
    "created_at": "2014-01-01 12:45:56",
    "updated_at": "2014-01-02 00:11:22"
  },
  "users": [
    {
      "id": 1,
      "first_name": "Doe",
      "last_name": "John",
      "phone_number": "+4588888888",
      "job_title": "Animal",
      "email": "info@easir.com",
      "profile_picture": "http://api.randomuser.me/portraits/thumb/women/5.jpg",
      "created_at": "2014-01-01 12:45:56",
      "updated_at": "2014-01-02 00:11:22"
    },
    {
      "id": 2,
      "first_name": "Larue",
      "last_name": "Ruecker",
      "phone_number": "(521)317-9044x4393",
      "job_title": "Business Insights Analyst",
      "email": "0@example.com",
      "profile_picture": null,
      "created_at": "2014-07-02 03:45:53",
      "updated_at": "2015-06-16 12:13:34"
    },
    {
      "id": 4,
      "first_name": "Charley",
      "last_name": "Reilly",
      "phone_number": "052.033.5256x688",
      "job_title": "Data Analyst",
      "email": "contacts@easir.com",
      "profile_picture": null,
      "created_at": "2015-06-03 19:10:13",
      "updated_at": "2015-06-16 05:25:42"
    }
  ],
  "schedule": {
    "occurs": "daily",
    "month_day": "end",
    "hour": 14
  },
  "filter": {
    "users": [
      {
        "id": 1,
        "first_name": "Doe",
        "last_name": "John",
        "phone_number": "+4588888888",
        "job_title": "Animal",
        "email": "info@easir.com",
        "profile_picture": "http://api.randomuser.me/portraits/thumb/women/5.jpg",
        "created_at": "2014-01-01 12:45:56",
        "updated_at": "2014-01-02 00:11:22"
      }
    ],
    "teams": [
      {
        "id": 1,
        "name": "Team 1",
        "address_1": "Savannah 123",
        "address_2": "Under the tree on the left",
        "zip_code": "4730",
        "city": "Umzimkulu",
        "state": "KwaZulu-Natal",
        "country": null,
        "phone_number": "031 308 7900",
        "website": "https://easir.com",
        "vat": "1234567890123456",
        "group": null,
        "created_at": "2014-01-01 12:45:56",
        "updated_at": "2014-01-02 00:11:22"
      }
    ],
    "products": [
      {
        "id": "f066bc3e-347f-3768-a280-b24aab19318f",
        "category": {
          "id": 4,
          "name": "Category 4",
          "created_at": "2015-02-03 12:00:00",
          "updated_at": "2015-02-03 12:00:00"
        },
        "fixed_fields": [
          {
            "id": 29,
            "type": "text",
            "name": "product_id",
            "label": "Product id",
            "value": "PRODUCT_ID",
            "validation": null,
            "required": false,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          },
          {
            "id": 30,
            "type": "text",
            "name": "name",
            "label": "Name",
            "value": "dolor",
            "validation": null,
            "required": true,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          },
          {
            "id": 31,
            "type": "numeric",
            "name": "list_price",
            "label": "List price",
            "value": 331.35,
            "validation": "numeric",
            "required": true,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          },
          {
            "id": 32,
            "type": "numeric",
            "name": "purchase_price",
            "label": "Purchase price",
            "value": 6.86,
            "validation": "numeric",
            "required": true,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          },
          {
            "id": 33,
            "type": "single_choice",
            "name": "type",
            "label": "Type",
            "value": {
              "id": 501,
              "value": "Hours"
            },
            "validation": null,
            "required": true,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          },
          {
            "id": 34,
            "type": "numeric",
            "name": "vat",
            "label": "VAT",
            "value": 26,
            "validation": "numeric",
            "required": true,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          }
        ],
        "custom_fields": [
          {
            "id": 14,
            "type": "text",
            "name": "custom_product_field",
            "label": "Custom product field",
            "value": null,
            "validation": null,
            "required": false,
            "hidden": false,
            "read_only": false,
            "sort_order": 0
          }
        ],
        "created_at": "2015-02-24 12:34:56",
        "updated_at": "2015-02-24 12:34:56"
      }
    ],
    "categories": [
      {
        "id": 2,
        "name": "Category 2",
        "created_at": "2015-02-03 12:00:00",
        "updated_at": "2015-02-03 12:00:00"
      }
    ]
  },
  "created_at": "2015-06-16 12:50:09",
  "updated_at": "2015-06-16 12:50:50"
}

Delete a report

DELETE /reports/scheduled-reports/:scheduled_report_id Deprecated; will be removed as of January 1, 2019

Response
Status code 204