Linking Deals with a Ticket

POST https://app.alaaqat.com/api/tickets/{_id}/attach-deals

Where _id is the ticket's identifier.

Relationship between Ticket and Deal

deal_ids is an array used to link contacts in tickets.

Header

Accept: application/json

Body

internal_name : value

{
  "deal_ids": [
    "66913c76192ef1f9420fa130"
  ]
}

Response

The return type will always be attached Deals.

{
    "data": [
        {
            "properties": {
                "_id": "66913c76192ef1f9420fa130",
                "deal_stage": "closed_lost",
                "deal_name": "test",
                "amount": 12
            }
        }
    ]
}


Unlinking a Deal from a Ticket


POST https://app.alaaqat.com/api/tickets/{_id}/detach-contact

Where _id is the ticket's identifier.

Header

Accept: application/json

Body

internal_name : value

{
  "deal_id":"65cb6719ae87531d6c045873"
}

Response

The return type will always be Ticket.

{
    "data": {
        "properties": {
            "_id": "669867025b6b9ecd2e0aa1e6",
            "ticket_name": "test",
            "desc": "test text",
            "category": "general_inquiry",
            "source": "source_manual",
            "updated_at": "2024-07-18T01:22:02.931000Z",
            "created_at": "2024-07-18T00:51:14.058000Z",
            "contacts_count": null,
            "deals_count": null
        }
    },
    "message": "Entity was modified Successfully"
}