• Resolved xzacha01

    (@xzacha01)


    Hello!

    The Request for getting the events says that Retrieves a list of the last 20 Events generated by the CRM owner.?However it always brings the first events instead. We are using the Jetpack API for our integration with 3cx.

    The url for the request is the following

    const url = https://${CommonCredentials.<em>jetpack</em>.Domain}/zbs_api/events?api_key=${CommonCredentials.<em>jetpack</em>.PublicKey}&api_secret=${CommonCredentials.<em>jetpack</em>.PrivateKey};

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Stef (a11n)

    (@erania-pinnera)

    Hi there, @xzacha01,

    We do provide very limited assistance on API related enquiries, due to the scope of our support not being focused on that.

    I have, however, asked our developers whether they can provide more insights for you.

    Plugin Support Stef (a11n)

    (@erania-pinnera)

    Hi there, @xzacha01,

    Our developers were able to create three tasks and retrieve three task – no issues at all.

    [
    {
    "id": "1",
    "owner": "1",
    "title": "Test task 1",
    "desc": "fasdfasd fasd",
    "start": 1722119400,
    "start_date": "2024-07-27 22:30:00",
    "end": 1722123000,
    "end_date": "2024-07-27 23:30:00",
    "complete": -1,
    "show_on_portal": 0,
    "show_on_cal": 1,
    "created": 1722029659,
    "created_date": "2024-07-26 21:34:19",
    "lastupdated": 1722029659,
    "lastupdated_date": "2024-07-26 21:34:19",
    "reminders": [
    {
    "id": "1",
    "owner": "1",
    "event": 1,
    "remind_at": -86400,
    "sent": -1,
    "created": 1722029660,
    "created_date": "2024-07-26 21:34:20",
    "lastupdated": 1722029660,
    "lastupdated_date": "2024-07-26 21:34:20"
    }
    ],
    "contact": [],
    "company": []
    },
    {
    "id": "2",
    "owner": "1",
    "title": "Task 2",
    "desc": "ghgjgjhkggghjgj",
    "start": 1722205800,
    "start_date": "2024-07-28 22:30:00",
    "end": 1722209400,
    "end_date": "2024-07-28 23:30:00",
    "complete": -1,
    "show_on_portal": 0,
    "show_on_cal": 1,
    "created": 1722029774,
    "created_date": "2024-07-26 21:36:14",
    "lastupdated": 1722029774,
    "lastupdated_date": "2024-07-26 21:36:14",
    "reminders": [
    {
    "id": "2",
    "owner": "1",
    "event": 2,
    "remind_at": -86400,
    "sent": -1,
    "created": 1722029774,
    "created_date": "2024-07-26 21:36:14",
    "lastupdated": 1722029774,
    "lastupdated_date": "2024-07-26 21:36:14"
    }
    ],
    "contact": [],
    "company": []
    },
    {
    "id": "3",
    "owner": "1",
    "title": "Task 3",
    "desc": "abcd",
    "start": 1722292200,
    "start_date": "2024-07-29 22:30:00",
    "end": 1722295800,
    "end_date": "2024-07-29 23:30:00",
    "complete": -1,
    "show_on_portal": 0,
    "show_on_cal": 1,
    "created": 1722029989,
    "created_date": "2024-07-26 21:39:49",
    "lastupdated": 1722029989,
    "lastupdated_date": "2024-07-26 21:39:49",
    "reminders": [
    {
    "id": "3",
    "owner": "1",
    "event": 3,
    "remind_at": -86400,
    "sent": -1,
    "created": 1722029989,
    "created_date": "2024-07-26 21:39:49",
    "lastupdated": 1722029989,
    "lastupdated_date": "2024-07-26 21:39:49"
    }
    ],
    "contact": [],
    "company": []
    }
    ]

    Is it possible that you conceived tasks as logs instead? Events are scheduled tasks you can find here:?/wp-admin/admin.php?page=manage-tasks-list

    Let us know if that makes sense or if we misinterpreted your request ??

    Plugin Support Tamirat B. (a11n)

    (@tamirat22)

    Hello @xzacha01,

    Do you have any updates about the above? We usually close inactive threads after one week of no activity, but we want to make sure we’re all set before marking it as solved. Thanks!

    Thread Starter xzacha01

    (@xzacha01)

    I am refering to this api call
    https://automattic.github.io/jetpack-crm-api-docs/#view-events

    The documentation says that
    “Retreives a list of the last 20 Events generated by the CRM owner. This is useful if you want to display recent events.”

    But when we call that endpoint, it brings the first ones in ascending order.
    So always “id”: “1” will be the first one

    Shouldn’t it be returning them with descending order to always get the latest ones?

    So in your example, try to add 13 instead of 3 and make the call. It will return the first 10, instead of the last 10

    Hi @xzacha01 ,

    I’m checking with our developers to see if there’s any more insight we can offer here. We’ll be back in touch as soon as we can, but it may take a few days.

    Hi @xzacha01, our developers have found the issue and are working on a fix to resolve it. However, we don’t have an ETA for it. We’ll contact you again as soon as we hear from them.

    Plugin Support Stef (a11n)

    (@erania-pinnera)

    Hi there, @xzacha01,

    We have some good news. Our developers have worked on the issue and made some changes.

    The solution for the pagination issue has already been implemented. You need to add these additional pagination fields to your request:

    • perpage:?Number of events per page.
    • page:?The page to retrieve.

    As for adding the order capability to the API events endpoint, our developers have deployed an improvement that will be included in the next plugin update, for which we don’t have a set date yet.

    To know when it will be out, I recommend signing up to our newsletter:?https://jetpackcrm.com/keep-up-to-date/?

    We send it regularly, sharing all the latest updates, core releases, bug fixes, and new features. Once this bug is addressed and the fix is out, our product team will also include the changelog in the newsletter.

    Hope that helps!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.