Job attachment webhooks

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Post Reply
User avatar
michelle
Posts: 132
Joined: Tue Jul 03, 2018 12:30 pm
Location: Brighton
Contact:

Job attachment webhooks

Post by michelle » Tue Jun 20, 2023 5:25 pm

Hi team,

We would like to start using the job attachment webhooks in order to ensure that the job cards get sent where they need to go:

"job.attachment.created"
"job.attachment.updated"
"job.attachment.deleted"

However, when we ran a test we were a bit disappointed to see that there is no information on which job the attachment is for? Is there an endpoint that will allow us to get this data as I'm only aware of the ones that require a JobID.

Also, does adding an attachment trigger a job.updated webhook or has it been moved solely to these webhooks?

Code: Select all

    {
        "ID": "job.attachment.updated",
        "name": "Job",
        "build": "xxxxxx.simprosuite.com",
        "action": "attachment.updated",
        "description": "Attachment #fn5hgCfBRCg9UmygH6qtozdiD8w8hsIJ7xa0eJfMnN8 has been updated.",
        "date_triggered": "2023-06-20T15:58:38+01:00",
        "reference": {
            "companyID": 0
        }
    },
    {
        "ID": "job.attachment.created",
        "name": "Job",
        "build": "xxxxxx.simprosuite.com",
        "action": "attachment.created",
        "description": "Attachment #s2oFbaMkm657T_wRMYSmtzecXTiptUkCrYH4Nkw695M has been created.",
        "date_triggered": "2023-06-20T16:11:16+01:00",
        "reference": {
            "companyID": 0
        }
    },
    {
        "ID": "job.attachment.deleted",
        "name": "Job",
        "build": "xxxxx.simprosuite.com",
        "action": "attachment.deleted",
        "description": "Attachment #R6HAo7cF9LC5hcnk7LYY7OEXHGqm-hQH1wGXRQpLjf8 has been deleted.",
        "date_triggered": "2023-06-20T16:30:56+01:00",
        "reference": {
            "companyID": 0
        }
    }
Thanks
Michelle
Sindre
Posts: 493
Joined: Wed Apr 20, 2022 4:51 am
Location: Brisbane

Re: Job attachment webhooks

Post by Sindre » Wed Jun 21, 2023 4:40 am

Hi Michelle,
The attachment webhook should have more information such as job id, folder and attachment ID in the reference column. This should be available for created, updated and deleted.

Here is an example:

Code: Select all

{
  "ID": "job.attachment.created",
  "build": "xxxxxxx",
  "description": "Attachment #N6JWxPwoZ3nG7kTSpm4winDhWEzuBaiHQrSKhNLb34c has been created.",
  "name": "Job",
  "action": "attachment.created",
  "reference": {
    "ID": 12345,
    "folderID": null,
    "attachmentID": "N6JWxPwoZ3nG7kTSpm4winDhWEzuBaiHQrSKhNLb34c",
    "attachmentName": "xxx.png",
    "companyID": 0
  },
  "date_triggered": "2023-06-21T14:32:06+10:00"
If you are subscribing to the job updated webhook you should receive this as well as job.attachment.updated.

Regards
Sindre
API Developer | Simpro Software Group
User avatar
michelle
Posts: 132
Joined: Tue Jul 03, 2018 12:30 pm
Location: Brighton
Contact:

Re: Job attachment webhooks

Post by michelle » Wed Jun 21, 2023 2:50 pm

Hi Sindre,

I posted the information we were receiving from those webhooks, that was all the information we received. Could you please check on your side? I'll send you the client build via private message.

Also, you didn't quite confirm. Does an attachment added to a job trigger the job.updated webhook?

Thanks
Michelle
Sindre
Posts: 493
Joined: Wed Apr 20, 2022 4:51 am
Location: Brisbane

Re: Job attachment webhooks

Post by Sindre » Wed Jun 21, 2023 10:58 pm

Hi,
Send their build details and I'll see what version they are on and test.

If you subscribe to the job webhooks, you will receive job updated webhook as well when you add, update or delete attachments.

Regards
Sindre
API Developer | Simpro Software Group
Post Reply