NAV undefined
Documentation
JSON

Introduction

Welcome to the Damcorp API! You can use our API to access Damcorp API endpoints. This example API documentation page was created with NodeJS.

We have language bindings in NodeJS. You can view code examples in the dark area to the right.

Whatsapp

Send Message

{
    "token": "Your API Token",
    "to": "Recipients number",
    "message": "Message to be sent"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta2",
    "data": [
        {
            "to": "6281234567890",
            "msgId": "gBGHYoITgIJpXwIJLV7tPke21fR-",
            "status": "sent"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "6281234",
            "msgId": null,
            "status": "invalid"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "6281234567890",
            "msgId": null,
            "status": "failed"
        }
    ],
    "message": "success"
}
{
    "responseCode":"726",
    "version":"1.3.7.1",
    "data":null,
    "message":"invalid_product"
}

This endpoint used to sent single message.

HTTP Request

POST https://waba.damcorp.id/whatsapp/sendText

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient's number 8567712345 (Use array data if recipient more than one, for example: ["8567712345","8554321776"])
message None Text Message Hello world!

Send HSM

{
    "token": "Your API Token",
    "to": "Recipient's number",
    "param": [ "param1", "param2" ]
}
{
    "responseCode": "000",
    "version": "1.3.4-beta2",
    "data": [
        {
            "to": "6281234567890",
            "msgId": "gBGHYoITgIJpXwIJLV7tPke21fR-",
            "status": "sent"
        }
    ],
    "message": "success"
}
{
    "responseCode": "725",
    "version": "1.3.4-beta3",
    "data": null,
    "message": "invalid template"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "62812345",
            "msgId": null,
            "status": "invalid"
        }
    ],
    "message": "success"
}
{
    "responseCode":"726",
    "version":"1.3.7.1",
    "data":null,
    "message":"invalid_product"
}

This endpoint used to sent text messages with template.

HTTP Request

POST https://waba.damcorp.id/whatsapp/sendHsm/template_name (You can use "welcome_msg" template with 2 parameter)

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient's number 8567712345 (Use array data if recipient more than one, for example: ["8567712345","8554321776"])
param None Parameters of the template ["Damcorp","Team"]

Send HSM Media Header Image

{
    "to": [
        "+6285123456789"
    ],
    "token": "eyJ0eXAiOiJKV1QiLCxxxxxxxxx",
    "param": [
        "Test"
    ],
    "header": {
        "type": "image",
        "data": "https://example.com/file.jpg"
    }
}
{
    "responseCode": "000",
    "version": "1.4.0",
    "data": [
        {
            "to": "0851234567890",
            "msgId": "gBGHYoV3YZQDHwxxxxxx",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to sent hsm media with image file.

HTTP Request

POST https://waba.damcorp.id/whatsapp/sendHsm/template_name (example: hsm_media_dummy)

Headers

Key Value Description
Content-Type application/json Headers request type
api-key 4b3c3332e622a812b16c0xxxxxx You can generate api-key from Helpdesk -> Configuration -> Integration

Body (Use raw and JSON (application/json))

Key Default Description Example
to None Recipient's number 0851234567890 (Use array data if recipient more than one, for example: ["0851234567890"])
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
param None Parameters of the template ["Test"]
header None Object type "header": { "type": "image", "data": "https://example.com/file.jpg" }

Send HSM Media Header Document

{
    "to": [
        "+6285123456789"
    ],
    "token": "eyJ0eXAiOiJKV1QiLCxxxxxxxxxx",
    "param": [
        "Test"
    ],
    "header": {
        "type": "document",
        "data": "https://example.com/file.pdf"
    }
}
{
    "responseCode": "000",
    "version": "1.4.0",
    "data": [
        {
            "to": "0851234567890",
            "msgId": "gBGHYoV3YZQDHwxxxxxx",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to sent hsm media with pdf file.

HTTP Request

POST https://waba.damcorp.id/whatsapp/sendHsm/template_name (example: hsm_report_dummy)

Headers

Key Value Description
Content-Type application/json Headers request type
api-key 4b3c3332e622a812b16c0xxxxxx You can generate api-key from Helpdesk -> Configuration -> Integration

Body (Use raw and JSON (application/json))

Key Default Description Example
to None Recipient's number 0851234567890 (Use array data if recipient more than one, for example: ["0851234567890"])
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
param None Parameters of the template ["Test"]
header None Object type "header": { "type": "document", "data": "https://example.com/file.pdf" }

Send HSM Header Text

{
    "to": [
        "+6285123456789"
    ],
    "token": "eyJ0eXAiOiJKV1QiLCxxxxxxxxxxxxx",
    "param": [
        "dummy",
        "text"
    ],
    "header": {
        "type": "text",
        "data": "welcome"
    }
}
{
    "responseCode": "000",
    "version": "1.4.0",
    "data": [
        {
            "to": "628123456789",
            "msgId": "gBGHYoV3YZQDHwxxxxxx",
            "status": "sent"
        }
    ],
    "message": "success"
}

This endpoint used to sent hsm with header text.

HTTP Request

POST https://waba.damcorp.id/whatsapp/sendHsm/template_name (example: hsm_text_dummy)

Headers

Key Value Description
Content-Type application/json Headers request type
api-key 4b3c3332e622a812b16c0xxxxxx You can generate api-key from Helpdesk -> Configuration -> Integration

Body (Use raw and JSON (application/json))

Key Default Description Example
to None Recipient's number 0851234567890 (Use array data if recipient more than one, for example: ["0851234567890","0851234567891"])
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
param None Parameters of the template ["dummy","text"]
header None Object type "header": { "type": "text", "data": "welcome" }

Send Image

{
  "to": "Recipients number",
  "token": "Your API Token",
  "image": "you can to use base64, image URL, or image ID",
  "caption": "Image caption"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta2",
    "data": [
        {
            "to": "6281234567890",
            "msgId": "gBGHYoITgIJpXwIJvlUgGqfqZ7XW",
            "mediaId": "65aa4574-668a-4f16-a193-184f01084680",
            "status": "sent"
        }
    ],
    "message": "success"
}
{
  "responseCode": "000",
  "version": "1.3.4-beta3",
  "data": [
    {
      "to": "6281234567890",
      "msgId": null,
      "mediaId": "",
      "status": "failed"
    }
  ],
  "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "62812345",
            "msgId": null,
            "mediaId": null,
            "status": "invalid"
        }
    ],
    "message": "success"
}
{
    "responseCode":"726",
    "version":"1.3.7.1",
    "data":null,
    "message":"invalid_product"
}

This endpoint used to sent image.

HTTP Request

POST https://waba.damcorp.id/whatsapp/sendImage

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
to None Recipient number 85567891234
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
image None Image file (You can to use base64, image URL, or image ID) data:image/jpeg;base64,iVBORw0KGgoA
caption None Image captions Test send image

Send Document (PDF)

{
  "to": "Recipient's number",
  "token": "Your API Token",
  "document": "you can to use base64, document URL, or document ID",
  "caption": "Document caption"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta2",
    "data": [
        {
            "to": "6281234567890",
            "msgId": "gBGHYoITgIJpXwIJvlUgGqfqZ7XW",
            "mediaId": "65aa4574-668a-4f16-a193-184f01084680",
            "status": "sent"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "6281234567890",
            "msgId": null,
            "mediaId": "",
            "status": "failed"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "62812345",
            "msgId": null,
            "mediaId": null,
            "status": "invalid"
        }
    ],
    "message": "success"
}
{
    "responseCode":"726",
    "version":"1.3.7.1",
    "data":null,
    "message":"invalid_product"
}

This endpoint used to sent document file (PDF format).

HTTP Request

POST https://waba.damcorp.id/whatsapp/sendDocument

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
to None Recipient number 85567891234
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
document None Document file (You can to use base64, document URL, or document ID) data:application/pdf;base64,iVBORw0KGgoA
caption None Image captions Test send image

Send Audio (AAC)

{
  "to": "Recipient's number",
  "token": "Your API Token",
  "audio": "you can to use base64, audio URL, or audio ID"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta2",
    "data": [
        {
            "to": "6281234567890",
            "msgId": "gBGHYoITgIJpXwIJvlUgGqfqZ7XW",
            "mediaId": "65aa4574-668a-4f16-a193-184f01084680",
            "status": "sent"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "62812345",
            "msgId": null,
            "mediaId": "",
            "status": "failed"
        }
    ],
    "message": "success"
}
{
    "responseCode": "000",
    "version": "1.3.4-beta3",
    "data": [
        {
            "to": "62812345",
            "msgId": null,
            "mediaId": null,
            "status": "invalid"
        }
    ],
    "message": "success"
}
{
    "responseCode":"726",
    "version":"1.3.7.1",
    "data":null,
    "message":"invalid_product"
}

This endpoint used to sent audio file (AAC format).

HTTP Request

POST https://waba.damcorp.id/whatsapp/sendAudio

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
to None Recipient number 85567891234
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
audio None Document file (You can to use base64, audio URL, or audio ID) data:application/aac;base64,iVBORw0KGgoA

Download Media (by ID)

{
    "responseCode": "000",
    "version": "1.2.2",
    "data": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/7QCEUGhvdG9zaG9wIDMxxxxxx",
    "message": "success"
}

This endpoint used to download media by media ID.

HTTP Request

GET https://waba.damcorp.id/whatsapp/downloadMedia

Parameter

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
id None Media ID (You can get from send media (image, document, audio) response on 'data') 9bacdef-ae01-5xxx-xxx9-e0c678910

Message Count

{
    "responseCode": "000",
    "version": "1.0.0",
    "data": {
        "7": {
            "text": 4,
            "hsm": 9,
            "image": 3,
            "document": 5,
            "audio": 0
        }
    },
    "message": "success"
}

This endpoint used to get message count by month.

HTTP Request

GET https://waba.damcorp.id/user/message/count

Parameters

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
startDate None This start date range to get message count 2019-07-01 00:00:00
endDate None This end date range month to get message count 2019-07-01 23:59:59

Create Group

{
    "token": "Your API Token",
    "subject": "Group Name"
}
{
    "responseCode": "000",
    "version": "1.2.2",
    "data": {
        "id": "6281234567890-1554177929"
    },
    "message": "success"
}

This endpoint used to create a group.

HTTP Request

POST https://waba.damcorp.id/group

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None Your API Token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
subject None Group name Your Group

List Group

{
    "responseCode": "000",
    "version": "1.2.2",
    "data": [
        {
            "id": "6281234567890-1553856607",
            "subject": "test-add-group",
            "admins": [
                "6281234567890"
            ],
            "participants": [
                "6281234567890"
            ],
            "icon": null,
            "invite": "https://chat.whatsapp.com/KrwoDqZaomtEce64It4NHI"
        },
        {
            "id": "6281234567890-1553764006",
            "subject": "Test Update Subject 2",
            "admins": [
                "6281234567890"
            ],
            "participants": [
                "6281234567890"
            ],
            "icon": null,
            "invite": "https://chat.whatsapp.com/FLFbnKJbXaGBZOy5LLkz5J"
        },
        {
            "id": "6281234567890-1531306172",
            "subject": "WA-API-Testing",
            "admins": [
                "6281234567890"
            ],
            "participants": [
                "6281234567890",
                "6281234543210",
                "6281234561234",
                "6289876543210",
                "6287654321234"
            ],
            "invite": "https://chat.whatsapp.com/8GFTMOxlC0TJrbP8SqJu7H",
            "icon": "/9j/4AAQSkZJRgABAgAAAQABAAD/7QCEUGhvdG9"
        }
    ],
    "message": "success"
}

This endpoint used to get list group.

HTTP Request

GET https://waba.damcorp.id/group?token=token

Parameter

Key Default Description Example
token None token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx

Get Detail Group

{
    "responseCode": "000",
    "version": "1.2.2",
    "data": {
        "id": "6281234543210-1554177929",
        "subject": "test-add-group",
        "admins": [
            "6281234543210"
        ],
        "participants": [
            "6281234543210"
        ],
        "invite": "https://chat.whatsapp.com/K0eLpfA2s4jF4AW0QrxnQZ",
        "icon": null
    },
    "message": "success"
}

This endpoint used to get detail group.

HTTP Request

GET https://waba.damcorp.id/group/group_id?token=token

Parameter

Key Default Description Example
token None token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx

Update Group Subject

{
    "token": "Your API Token",
    "subject": "New Subject"
}
{
    "responseCode": "000",
    "version": "1.2.2",
    "message": "success"
}

This endpoint used to update group subject/group name.

HTTP Request

PUT https://waba.damcorp.id/group/group_id

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
subject None New Group Subject New Group 2

Get Invite

{
    "responseCode": "000",
    "version": "1.2.2",
    "data": "https://chat.whatsapp.com/FLFbnKJbXaGBZOy5LLkz5J",
    "message": "success"
}

This endpoint used to get group invited.

HTTP Request

GET https://waba.damcorp.id/group/group_id/invite?token=token

Parameter

Key Default Description Example
token None token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx

Set Group Icon

{
    "token": "Your API Token",
    "icon": "data:image/jpeg;base64,iVBORw0KGgoAyusgsvdajshskjfudsyu657fegh"
}
{
    "responseCode": "000",
    "version": "1.2.2",
    "message": "success"
}

This endpoint used to set group icon.

HTTP Request

POST https://waba.damcorp.id/group/group_id/icon

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
icon None Group Icon You can to use base64 (data:image/jpeg;base64,iVBORw0KGgoAyusgsvdajshskjfudsyu657fegh)

Get Group Icon

{
    "responseCode": "000",
    "version": "1.2.2",
    "data": "/9j/4AAQSkZJRgABAgAAAQABAAD/7QCEUGhvdG9zaG9wIDMuMAA4QklNBAQAAAA",
    "message": "success"
}

This endpoint used to get group icon.

HTTP Request

GET https://waba.damcorp.id/group/group_id/icon?token=token

Parameter

Key Default Description Example
token None token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx

Delete Group Icon

{
    "token": "Your API Token"
}
{
    "responseCode": "000",
    "version": "1.2.2",
    "message": "success"
}

This endpoint used to delete group icon.

HTTP Request

DELETE https://waba.damcorp.id/group/group_id/icon

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx

Add Group Admin

{
    "token": "Your API Token",
    "participants":["085612312312","085123456789"]
}

Notes : Make sure this phone number is member on your group, 
if not yet, you can hit API Get Invite, and click URL on the response.
{
    "responseCode": "000",
    "version": "1.2.2",
    "message": "success"
}

This endpoint used to add group admin.

HTTP Request

PUT https://waba.damcorp.id/group/group_id/admin

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
participants None Participants phone number ["085612312312","085123456789"]

Remove Group Admin

{
    "token": "Your API Token",
    "participants":["085612312312","085123456789"]
}

Notes : Make sure this phone number is admin on your group.
{
    "responseCode": "000",
    "version": "1.2.2",
    "message": "success"
}

This endpoint used to remove group admin.

HTTP Request

DELETE https://waba.damcorp.id/group/group_id/admin

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
participants None Phone number as admin ["085612312312","085123456789"]

Remove Group Participants

{
    "token": "Your API Token",
    "participants":["085612312312","085123456789"]
}

Notes : Make sure this phone number is participant/member on your group.
{
    "responseCode": "000",
    "version": "1.2.2",
    "message": "success"
}

This endpoint used to remove group participants.

HTTP Request

DELETE https://waba.damcorp.id/group/group_id/participants

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
token None token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
participants None Participants phone number ["085612312312","085123456789"]

Send Text Group

{
    "token": "Your API Token",
    "to": "Recipient number",
    "message": "Hi, let's join us"
}
{
  "responseCode": "000",
  "version": "1.3.4-beta2",
  "data": [
    {
      "to": "6281234543210-1569212105",
      "msgId": "gCEMYoIRBwAFShVpISEFAgk9c4afT05w9Zw",
      "status": "sent"
    }
  ],
  "message": "success"
}

This endpoint used to send whatsapp group to users.

HTTP Request

POST https://waba.damcorp.id/whatsapp/sendGroup

Headers

Key Value Description
Content-Type application/json Headers request type

Parameter

Key Default Description Example
token None token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
to None Recipient number 0812345678
message None Message for sending to group Hi, this is your group, let's join us

Send HSM Group

{
    "to": "Group ID",
    "token": "Your API Token",
    "param": [ "param_1", "param_2" ]
}
{
  "responseCode": "000",
  "version": "1.3.4-beta2",
  "data": [
    {
      "to": "6281234543210-1569212105",
      "msgId": "gCEMYoIRBwAFShVpISEFAgk9c4afT05w9Zw",
      "status": "sent"
    }
  ],
  "message": "success"
}

This endpoint used to send a message template to your whatsapp group.

HTTP Request

POST https://waba.damcorp.id/whatsapp/sendHsmGroup/template_name

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
to None Group ID 6289543212345-1543212345
token None token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
param None Parameters for the template ["Company","Jhon"]

Send Image Group

{
    "to": "Group ID",
    "token": "Your API Token",
    "image": "you can to use base64, image URL, or image ID",
    "caption": "Image caption"
}
{
  "responseCode": "000",
  "version": "1.3.4-beta3",
  "data": [
    {
      "to": "6281234543210-1569212105",
      "msgId": "gCEMYoIRBwAFShVpISEFAglHIEhSq3i6dl0",
      "mediaId": "758a6c0e-8d6c-4472-b7c9-2a699730fe26",
      "status": "sent"
    }
  ],
  "message": "success"
}

This endpoint used to send image to your whatsapp group.

HTTP Request

POST https://waba.damcorp.id/whatsapp/sendImageGroup

Headers

Key Value Description
Content-Type application/json Headers request type

Body (Use raw and JSON (application/json))

Key Default Description Example
to None Group ID 6289543212345-1543212345
token None token (You can get it's from dashboard panel on Whatsapp menu -> Numbers) eyJ0eXAiOiJKxxxxxxxx
image None Image file (You can to use base64, image URL, or image ID) data:image/jpeg;base64,iVBORw0KGgoA
caption None Image captions Test send image

Helpdesk

API Get One Ticket

{
    "responseCode": "000",
    "version": "2.0.4",
    "message": "success",
    "data": {
        "companyNumber": "08123456789",
        "ticket": [
            {
                "dateCreate": "2019-02-15 18:00:09",
                "dateClose": "2019-02-16 17:31:01",
                "ticketCode": "34",
                "problem": "What happen?",
                "customerName": "Jhon",
                "customerNumber": "6282101234567",
                "operatorName": "Daisy",
                "operatorNumber": "0898765432101",
                "totalResponse": "4",
                "status": "close",
                "messages": [
                    {
                        "dateCreate": "2019-02-15 17:59:56",
                        "body": "Examples",
                        "messageType": "text",
                        "type": "USER_ANSWER",
                        "caption": null
                    },
                    {
                        "dateCreate": "2019-02-15 17:59:57",
                        "body": "Hi, Jhon. Any questions? We'll help you.",
                        "messageType": "text",
                        "type": "QUESTION_PROBLEM",
                        "caption": null
                    },
                    {
                        "dateCreate": "2019-02-15 18:00:09",
                        "body": "I want to test an API.",
                        "messageType": "text",
                        "type": "USER_ANSWER",
                        "caption": null
                    },
                    {
                        "dateCreate": "2019-02-15 18:00:10",
                        "body": "Ok Jhon, please wait for answer from our customer service. Your ticket number is: *#34* 🤝",
                        "messageType": "text",
                        "type": "ANSWER_TICKET",
                        "caption": null
                    }
                ]
            }
        ],
        "total": 1,
        "companyName": "DAM Corp."
    }
}

This endpoint used to get One Ticket.

HTTP Request

GET https://csapi.damcorp.id/api/v2/report/ticket/?ticketCode=79&with_message=true

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Parameters

Key Default Description Example
ticketCode None Ticket Code (Mandatory) 34
with_message None To show all ticket messages. This is a boolean type (Optional) true
{
    "responseCode": "000",
    "version": "2.0.4",
    "message": "success",
    "data": {
        "companyNumber": "08123456789",
        "ticket": [
            {
                "dateCreate": "2019-02-15 18:00:09",
                "dateClose": "2019-02-16 17:31:01",
                "ticketCode": "34",
                "problem": "What happen?",
                "customerName": "Jhon",
                "customerNumber": "6282101234567",
                "operatorName": "Daisy",
                "operatorNumber": "0898765432101",
                "totalResponse": "1",
                "status": "close",
            }
        ],
        "total": 1,
        "companyName": "DAM Corp."
    }
}

HTTP Request

GET https://csapi.damcorp.id/api/v2/report/ticket/?ticketCode=79&with_message=false

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Parameters

Key Default Description Example
ticketCode None Ticket Code (Mandatory) 34
with_message None To show all ticket messages. This is a boolean type (Optional) false

API Get List Ticket By Status

{
    "responseCode": "000",
    "version": "2.0.4",
    "message": "success",
    "data": {
        "companyNumber": "08123456789",
        "ticket": [
            {
                "dateCreate": "2019-03-27 16:01:24",
                "dateClose": "2019-03-27 16:05:33",
                "ticketCode": "34",
                "problem": "API test",
                "customerName": "Jhon",
                "customerNumber": "628212345678",
                "operatorName": "Daisy",
                "operatorNumber": "089876543210",
                "totalResponse": "1",
                "status": "open"
            }
        ],
        "total": 1,
        "companyName": "DAM Corp."
}

This endpoint used to get list ticket by status.

HTTP Request

GET https://csapi.damcorp.id/api/v2/report/tickets/open?start_date=2019-03-01&end_date=2019-03-28&with_message=false

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Parameters

Parameter Default Description Example
start_date None The initial range of the ticket date is open 2019-03-01
end_date None The end date of the ticket date is open 2019-03-31
with_message None To show all ticket messages. This is a boolean type (Optional) false
{
    "responseCode": "000",
    "version": "2.0.4",
    "message": "success",
    "data": {
        "companyNumber": "08123456789",
        "ticket": [
            {
                "dateCreate": "2019-03-27 16:01:24",
                "dateClose": "2019-03-27 16:05:33",
                "ticketCode": "34",
                "problem": "API test",
                "customerName": "Jhon",
                "customerNumber": "628212345678",
                "operatorName": "Daisy",
                "operatorNumber": "089876543210",
                "totalResponse": "1",
                "status": "processing"
            }
        ],
        "total": 1,
        "companyName": "DAM Corp."
    }
}

HTTP Request

GET https://csapi.damcorp.id/api/v2/report/tickets/processing?start_date=2019-03-01&end_date=2019-03-28&with_message=false

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Parameters

Parameter Default Description Example
start_date None The initial range of the ticket date is processing 2019-03-01
end_date None The end date of the ticket date is processing 2019-03-31
with_message None To show all ticket messages. This is a boolean type (Optional) false
{
    "responseCode": "000",
    "version": "2.0.4",
    "message": "success",
    "data": {
        "companyNumber": "08123456789",
        "ticket": [
            {
                "dateCreate": "2019-03-27 16:01:24",
                "dateClose": "2019-03-27 16:05:33",
                "ticketCode": "34",
                "problem": "diclose terus",
                "customerName": "Yanuar",
                "customerNumber": "6282138082695",
                "operatorName": "Alfatta Rezqa",
                "operatorNumber": "0895346216170",
                "totalResponse": "1",
                "status": "close"
            },
            {
                "dateCreate": "2019-03-27 15:59:13",
                "dateClose": "2019-03-27 16:00:36",
                "ticketCode": "35",
                "problem": "hello",
                "customerName": "Yanuar",
                "customerNumber": "6282138082695",
                "operatorName": "Alfatta Rezqa",
                "operatorNumber": "0895346216170",
                "totalResponse": "1",
                "status": "close"
            }
        ],
        "total": 2,
        "companyName": "DAM Corp."
    }
}

HTTP Request

GET https://csapi.damcorp.id/api/v2/report/tickets/closed?start_date=2019-03-01&end_date=2019-03-28&with_message=false

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Parameters

Parameter Default Description Example
start_date None The initial range of the ticket date is closed 2019-03-01
end_date None The end date of the ticket date is closed 2019-03-31
with_message None To show all ticket messages. This is a boolean type (Optional) false
{
    "responseCode": "000",
    "version": "2.0.5",
    "message": "success",
    "data": {
        "companyNumber": "0895346216170",
        "ticket": [
            {
                "dateCreate": "2019-03-27 16:01:24",
                "dateClose": "2019-03-27 16:05:33",
                "ticketCode": "34",
                "problem": "What happen?",
                "customerName": "Jhon",
                "customerNumber": "6282101234567",
                "operatorName": "Daisy",
                "operatorNumber": "0898765432101",
                "totalResponse": "4",
                "status": "close",
                "messages": [
                    {
                        "dateCreate": "2019-02-15 17:59:56",
                        "body": "Examples",
                        "messageType": "text",
                        "type": "USER_ANSWER",
                        "caption": null
                    },
                    {
                        "dateCreate": "2019-02-15 17:59:57",
                        "body": "Hi, Jhon. Any questions? We'll help you.",
                        "messageType": "text",
                        "type": "QUESTION_PROBLEM",
                        "caption": null
                    },
                    {
                        "dateCreate": "2019-02-15 18:00:09",
                        "body": "I want to test an API.",
                        "messageType": "text",
                        "type": "USER_ANSWER",
                        "caption": null
                    },
                    {
                        "dateCreate": "2019-02-15 18:00:10",
                        "body": "Ok Jhon, please wait for answer from our customer service. Your ticket number is: *#34* 🤝",
                        "messageType": "text",
                        "type": "ANSWER_TICKET",
                        "caption": null
                    }
                ]
            }
        ],
        "total": 1,
        "companyName": "DAM Corp."
    }
}

HTTP Request

GET https://csapi.damcorp.id/api/v2/report/tickets/closed?start_date=2019-03-01&end_date=2019-03-28&with_message=true

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Parameters

Parameter Default Description Example
start_date None The initial range of the ticket date is closed 2019-03-01
end_date None The end date of the ticket date is closed 2019-03-31
with_message None To show all ticket messages. This is a boolean type (Optional) true
per_page None To show ticket with minimum data (Optional, if your data is very to long) 2 ( the meaning is 2 data per page)

API Open Ticket

{
    "userNumber": "628123456789",
    "userName": "Jhon",
    "issue": "Example issue",
    "tag": "Example tag",
    "operatorEmail": "[email protected]"
}
{
    "responseCode": "000",
    "version": "2.0.7",
    "message": "success",
    "data":""
}
{
    "responseCode": "400",
    "version": "2.0.7",
    "message": "ticket_exists",
    "data": {
        "code": "101917000",
        "status": "open",
        "user": "628123456789"
    }
}
{
    "userNumber": "628123456789",
    "userName": "Jhon",
    "tag": "Example tag"
}
{
    "responseCode": "400",
    "version": "2.0.7",
    "message": "invalid_param",
    "data": [
        "issue"
    ]
}

This endpoint used to open ticket.

HTTP Request

POST https://csapi.damcorp.id/api/v2/ticket/open

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Body (Use raw and JSON (application/json))

Key Default Description Example
userNumber None User number phone 628123456789
userName None User name 628123456789
issue None User issue/problem Example issue
tag None Tag of issue Example tag
operatorEmail None CS Email (Optional) [email protected]

API Close Ticket

{
    "userNumber": "628123456789",
    "ticketCode": "34"
}
{
    "responseCode": "000",
    "version": "2.0.7",
    "message": "success",
    "data":""
}

This endpoint used to close ticket.

HTTP Request

POST https://csapi.damcorp.id/api/v2/ticket/close

Headers

Key Value Description
Content-Type application/json Headers request type
api-key You can take from your dashboard panel, on the Helpdesk > Configuration > Integration. If an api-key is available, you can copy and paste it, and if it's not available, you can click Generate Button This is key for access to this API

Body (Use raw and JSON (application/json))

Key Default Description Example
userNumber None User number phone 628123456789
ticketCode None Ticket Code (Mandatory) 34

Errors

The Damcorp API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your credentials is wrong.
403 Forbidden -- The requested is hidden for administrators only.
404 Not Found -- The specified could not be found.
405 Method Not Allowed -- You tried to access a with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The requested has been removed from our servers.
418 You're a teapot.
429 Too Many Requests -- You're requesting too many s! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
726 Invalid Product -- You do not have a valid product