### Get Chat Response Sample Source: https://dev.relatel.dk/oas/index Example JSON response for the 'getChats' endpoint, detailing the structure of chat objects including sender, receiver, timestamps, and associated contact information. ```json { "chats": [ { "uuid": "45981120-324b-0132-d3ef-14dae9edd21d", "state": "ringing", "from_name": "John Doe", "from_email": "john@doe.dk", "endpoint": "ChatReception#1", "link": "string", "started_at": "2019-08-24T14:15:22Z", "answered_at": "2019-08-24T14:15:22Z", "answered_by": { "name": "Jane Doe", "endpoint": "Employee#1" }, "ended_at": "2019-08-24T14:15:22Z", "contact": { "id": 0, "number": "string", "number_formatted": "string", "name": "string", "email": "string", "comments_count": 0, "flagged": true, "tags": [ "string" ], "activity_id": 0, "activity_at": "2019-08-24T14:15:22Z" } } ] } ``` -------------------------------- ### Call Response Example Source: https://dev.relatel.dk/oas/index This snippet provides a detailed example of a successful JSON response (HTTP 200) for a call-related API endpoint. It includes comprehensive information about the call, such as call identifiers, participant details, timestamps, call status, call path, input data, feedback, recording information, and voicemail details. ```APIDOC ## GET /calls/{call_uuid} ### Description Retrieves detailed information about a specific call, including participant data, call flow, and associated media. ### Method GET ### Endpoint `/calls/{call_uuid}` ### Parameters #### Path Parameters - **call_uuid** (string) - Required - The unique identifier for the call. ### Response #### Success Response (200) - **call** (object) - Contains all details about the call. - **call_uuid** (string) - The unique identifier for the call. - **company_id** (integer) - The ID of the company associated with the call. - **endpoint** (string) - The endpoint where the call was directed. - **from_number** (string) - The originating phone number. - **from_number_formatted** (string) - The formatted originating phone number. - **to_number** (string) - The destination phone number. - **to_number_formatted** (string) - The formatted destination phone number. - **remote_number** (string) - The remote party's phone number. - **remote_number_formatted** (string) - The formatted remote party's phone number. - **from_contact** (object) - Details of the contact associated with the originating number. - **id** (integer) - Contact ID. - **number** (string) - Contact's phone number. - **number_formatted** (string) - Formatted contact's phone number. - **name** (string) - Contact's name. - **email** (string) - Contact's email. - **comments_count** (integer) - Number of comments associated with the contact. - **flagged** (boolean) - Indicates if the contact is flagged. - **tags** (array of strings) - Tags associated with the contact. - **activity_id** (integer) - ID of the last activity. - **activity_at** (string) - Timestamp of the last activity (ISO 8601 format). - **to_contact** (object) - Details of the contact associated with the destination number (same structure as `from_contact`). - **remote_contact** (object) - Details of the contact associated with the remote number (same structure as `from_contact`). - **direction** (string) - Direction of the call (e.g., 'incoming'). - **started_at** (string) - Timestamp when the call started (ISO 8601 format). - **ringing_at** (string) - Timestamp when the call started ringing (ISO 8601 format). - **answered_at** (string) - Timestamp when the call was answered (ISO 8601 format). - **sort_value** (string) - Value used for sorting calls (ISO 8601 format). - **answered_by** (object) - Information about the agent who answered the call. - **id** (integer) - Agent ID. - **name** (string) - Agent's name. - **number** (string) - Agent's associated number. - **endpoint** (object) - Endpoint details of the agent. - **ended_at** (string) - Timestamp when the call ended (ISO 8601 format). - **status** (string) - Status of the call (e.g., 'ringing'). - **endpoint_name** (string) - Name of the endpoint. - **endpoint_type** (string) - Type of the endpoint (e.g., 'employee'). - **queue_virtual_position** (integer) - Virtual position in the queue, if applicable. - **reserving_employee_id** (integer) - ID of the employee reserving the call, if applicable. - **callback_requested** (boolean) - Indicates if a callback was requested. - **callback** (boolean) - Indicates if the call was a callback. - **talk_duration** (integer) - Duration of the call in seconds. - **waiting_time** (integer) - Waiting time in seconds. - **path** (array of objects) - Sequence of nodes the call traversed. - **node_uuid** (string) - Unique identifier for the node. - **call_uuid** (string) - The call's unique identifier. - **endpoint** (string) - The endpoint associated with this node. - **endpoint_name** (string) - Name of the endpoint. - **started_at** (string) - Timestamp when the node was entered (ISO 8601 format). - **answered_at** (string) - Timestamp when the node was answered (ISO 8601 format). - **ended_at** (string) - Timestamp when the node was exited (ISO 8601 format). - **state** (string) - State of the node. - **node_type** (string) - Type of the node (e.g., 'ivr_menu_item'). - **parent_node_uuid** (string) - UUID of the parent node. - **web_call** (boolean) - Indicates if this was a web call. - **nodes** (array of objects) - Detailed information about each node in the call path (same structure as `path` elements). - **input_data** (array of objects) - Data input during the call. - **name** (string) - Name of the input field. - **value** (string) - Value of the input field. - **smiley** (object) - Feedback details for the call. - **id** (integer) - Feedback ID. - **conversation_type** (string) - Type of conversation ('call'). - **conversation_uuid** (string) - UUID of the conversation. - **rated_at** (string) - Timestamp when rated (ISO 8601 format). - **sort_value** (string) - Value for sorting feedback (ISO 8601 format). - **rating** (integer) - Numerical rating. - **net_promoter_score** (integer) - Net Promoter Score. - **kind** (string) - Type of feedback (e.g., 'negative'). - **comment** (string) - User's comment. - **number** (string) - Phone number associated with feedback. - **number_formatted** (string) - Formatted phone number. - **email** (string) - Email associated with feedback. - **contact** (object) - Contact details associated with feedback (same structure as `from_contact`). - **employee_id** (integer) - ID of the employee associated with feedback. - **endpoint** (string) - Endpoint associated with feedback. - **recording** (object) - Recording details for the call. - **id** (integer) - Recording ID. - **started_at** (string) - Timestamp when recording started (ISO 8601 format). - **duration** (integer) - Duration of the recording in seconds. - **expire_at** (string) - Timestamp when the recording expires (ISO 8601 format). - **expired** (boolean) - Indicates if the recording has expired. - **sound** (object) - Information about the audio file. - **formats** (array of strings) - Available audio formats (e.g., 'audio/mpeg'). - **url** (string) - URL to access the audio file. - **accepted** (boolean) - Indicates if the recording was accepted. - **voice_mail** (object) - Voicemail details, if applicable. - **id** (integer) - Voicemail ID. - **created_at** (string) - Timestamp when voicemail was created (ISO 8601 format). - **heard** (boolean) - Indicates if the voicemail has been heard. - **sound** (object) - Information about the voicemail audio file (same structure as `recording.sound`). - **duration** (integer) - Duration of the voicemail in seconds. - **from_number** (string) - Originating number of the voicemail. - **from_number_formatted** (string) - Formatted originating number. - **from_contact** (object) - Contact details of the voicemail sender (same structure as `from_contact`). - **endpoint_name** (string) - Name of the endpoint where the voicemail was left. - **endpoint** (string) - The endpoint associated with the voicemail. ### Request Example ```json { "example": "No request body for GET request" } ``` ### Response #### Success Response (200) ```json { "call": { "call_uuid": "string", "company_id": 0, "endpoint": "string", "from_number": "string", "from_number_formatted": "string", "to_number": "string", "to_number_formatted": "string", "remote_number": "string", "remote_number_formatted": "string", "from_contact": { "id": 0, "number": "string", "number_formatted": "string", "name": "string", "email": "string", "comments_count": 0, "flagged": true, "tags": [ "string" ], "activity_id": 0, "activity_at": "2019-08-24T14:15:22Z" }, "to_contact": { "id": 0, "number": "string", "number_formatted": "string", "name": "string", "email": "string", "comments_count": 0, "flagged": true, "tags": [ "string" ], "activity_id": 0, "activity_at": "2019-08-24T14:15:22Z" }, "remote_contact": { "id": 0, "number": "string", "number_formatted": "string", "name": "string", "email": "string", "comments_count": 0, "flagged": true, "tags": [ "string" ], "activity_id": 0, "activity_at": "2019-08-24T14:15:22Z" }, "direction": "incoming", "started_at": "2019-08-24T14:15:22Z", "ringing_at": "2019-08-24T14:15:22Z", "answered_at": "2019-08-24T14:15:22Z", "sort_value": "2019-08-24T14:15:22Z", "answered_by": { "id": 0, "name": "string", "number": "string", "endpoint": {} }, "ended_at": "2019-08-24T14:15:22Z", "status": "ringing", "endpoint_name": "string", "endpoint_type": "employee", "queue_virtual_position": 0, "reserving_employee_id": 0, "callback_requested": true, "callback": true, "talk_duration": 0, "waiting_time": 0, "path": [ { "node_uuid": "string", "call_uuid": "string", "endpoint": "Employee#1", "endpoint_name": "string", "started_at": "2019-08-24T14:15:22Z", "answered_at": "2019-08-24T14:15:22Z", "ended_at": "2019-08-24T14:15:22Z", "state": "string", "node_type": "ivr_menu_item", "parent_node_uuid": "string", "web_call": true } ], "nodes": [ { "node_uuid": "string", "call_uuid": "string", "endpoint": "Employee#1", "endpoint_name": "string", "started_at": "2019-08-24T14:15:22Z", "answered_at": "2019-08-24T14:15:22Z", "ended_at": "2019-08-24T14:15:22Z", "state": "string", "node_type": "ivr_menu_item", "parent_node_uuid": "string", "web_call": true } ], "input_data": [ { "name": "string", "value": "string" } ], "smiley": { "id": 0, "conversation_type": "call", "conversation_uuid": "string", "rated_at": "2019-08-24T14:15:22Z", "sort_value": "2019-08-24T14:15:22Z", "rating": 0, "net_promoter_score": 0, "kind": "negative", "comment": "string", "number": "string", "number_formatted": "string", "email": "string", "contact": { "id": 0, "number": "string", "number_formatted": "string", "name": "string", "email": "string", "comments_count": 0, "flagged": true, "tags": [ "string" ], "activity_id": 0, "activity_at": "2019-08-24T14:15:22Z" }, "employee_id": 0, "endpoint": "string" }, "recording": { "id": 0, "started_at": "2019-08-24T14:15:22Z", "duration": 0, "expire_at": "2019-08-24T14:15:22Z", "expired": true, "sound": { "formats": [ "string" ], "url": "string" }, "accepted": true }, "voice_mail": { "id": 0, "created_at": "2019-08-24T14:15:22Z", "heard": true, "sound": { "formats": [ "audio/mpeg" ], "url": "string" }, "duration": 0, "from_number": "string", "from_number_formatted": "string", "from_contact": { "id": 0, "number": "string", "number_formatted": "string", "name": "string", "email": "string", "comments_count": 0, "flagged": true, "tags": [ "string" ], "activity_id": 0, "activity_at": "2019-08-24T14:15:22Z" }, "endpoint_name": "string", "endpoint": "Employee#1" } } } ``` ``` -------------------------------- ### Get Specific Chat Response Sample Source: https://dev.relatel.dk/oas/index Example JSON response for the 'getChat' endpoint, detailing a single chat object including its state, participants, timestamps, and associated contact information. ```json { "chat": { "uuid": "45981120-324b-0132-d3ef-14dae9edd21d", "state": "ringing", "from_name": "John Doe", "from_email": "john@doe.dk", "endpoint": "ChatReception#1", "link": "string", "started_at": "2019-08-24T14:15:22Z", "answered_at": "2019-08-24T14:15:22Z", "answered_by": { "name": "Jane Doe", "endpoint": "Employee#1" }, "ended_at": "2019-08-24T14:15:22Z", "contact": { "id": 0, "number": "string", "number_formatted": "string", "name": "string", "email": "string", "comments_count": 0, "flagged": true, "tags": [ "string" ], "activity_id": 0, "activity_at": "2019-08-24T14:15:22Z" } } } ``` -------------------------------- ### GET /api/v2/orders Source: https://dev.relatel.dk/oas/index Retrieves a list of all orders. This endpoint is useful for getting an overview of all placed orders. ```APIDOC ## GET /api/v2/orders ### Description Retrieves a list of all orders. ### Method GET ### Endpoint https://app.relatel.dk/api/v2/orders ### Parameters #### Query Parameters #### Request Body ### Request Example ### Response #### Success Response (200) - **orders** (array) - A list of order objects. - **id** (integer) - The unique identifier for the order. - **type** (string) - The type of the order. - **state** (string) - The current state of the order. - **pending_tasks** (boolean) - Indicates if there are pending tasks for the order. #### Response Example ```json { "orders": [ { "id": 1234, "type": "Order::ActivateM2M", "state": "completed", "pending_tasks": false }, { "id": 2345, "type": "Order::DeactivateM2M", "state": "completed", "pending_tasks": false } ] } ``` ``` -------------------------------- ### Get all calls Source: https://dev.relatel.dk/oas/index Retrieves a list of call records with filtering and pagination options. ```APIDOC ## GET /api/v2/calls ### Description Retrieves a list of call records with filtering and pagination options. ### Method GET ### Endpoint /api/v2/calls #### Query Parameters - **started_at_lt_or_eq** (string) - Optional - Return calls where started_at is less than or equal to this value (date-time format) - **started_at_gt_or_eq** (string) - Optional - Return calls where started_at is greater than or equal to this value (date-time format) - **ended_at_lt_or_eq** (string) - Optional - Return calls where ended_at is less than or equal to this value (date-time format) - **ended_at_gt_or_eq** (string) - Optional - Return calls where ended_at is greater than or equal to this value (date-time format) - **limit** (number) - Optional - Maximum number of calls to return - **direction** (string) - Optional - Filter calls by direction (Enum: "incoming", "outgoing") - **endpoint** (string) - Optional - Filter calls by endpoint name ### Responses #### Success Response (200) - List of calls ``` -------------------------------- ### JSON Response Sample for Getting All Contacts Source: https://dev.relatel.dk/oas/index This JSON structure shows a list of contacts. Each contact object contains details like ID, number, formatted number, name, email, comment count, flagged status, tags, and activity timestamps. This is the response for the 'Get all contacts' endpoint. ```json { "contacts": [ { "id": 0, "number": "string", "number_formatted": "string", "name": "string", "email": "string", "comments_count": 0, "flagged": true, "tags": [ "string" ], "activity_id": 0, "activity_at": "2019-08-24T14:15:22Z" } ] } ``` -------------------------------- ### Get Current Employee Source: https://dev.relatel.dk/oas/index Retrieves details for the currently authenticated employee. ```APIDOC ## GET /api/v2/employee ### Description Retrieves details for the currently authenticated employee. ### Method GET ### Endpoint https://app.relatel.dk/api/v2/employee ### Response #### Success Response (200) - **employee** (object) - Contains detailed information about the employee, including ID, name, email, presence status, and associated company and reception details. #### Response Example ```json { "employee": { "type": "Employee", "id": 0, "endpoint": "Employee#1", "name": "string", "email": "string", "number": "string", "number_formatted": "string", "do_not_disturb": true, "do_not_disturb_label": "string", "do_not_disturb_emoji": "string", "do_not_disturb_ended_at": "2019-08-24T14:15:22Z", "dnd_timeout_at": "2019-08-24T14:15:22Z", "dnd_reception_action": true, "dnd_message": { "id": 0, "text": "string", "emoji": "string", "reception_action_id": 0 }, "live_presence": "available", "live_presence_updated_at": "2019-08-24T14:15:22Z", "locale": "string", "speed_dial": { "digit": 0 }, "has_switch": true, "cloak_reception": { "id": 0, "name": "string", "phone_number": { "number": "string" }, "brand_name": "string", "short_brand_name": "string", "number": "string", "number_formatted": "string", "endpoint": "Reception#1", "company_id": 0, "is_smiley_enabled": true, "is_smiley_nps_enabled": true, "is_open": true, "is_shadow": true, "has_main_sms": true, "is_cloakable": true }, "cloak_tracking_reception": { "id": 0, "name": "string", "phone_number": { "number": "string" }, "brand_name": "string", "short_brand_name": "string", "number": "string", "number_formatted": "string", "endpoint": "Reception#1", "company_id": 0, "is_smiley_enabled": true, "is_smiley_nps_enabled": true, "is_open": true, "is_shadow": true, "has_main_sms": true, "is_cloakable": true }, "cloak_tracking_enabled": true, "employee_group_ids": [ 0 ], "country_code": "string", "in_trial": true, "company_id": 0, "features": "mobile", "admin": true, "is_admin": true, "admin_abilities": { "property1": true, "property2": true }, "subscription_ids": [ 0 ], "avatar": "string", "visible": true, "mobile_product_title": "string", "shadow_reception": { "id": 0, "name": "string", "phone_number": { "number": "string" }, "brand_name": "string", "short_brand_name": "string", "number": "string", "number_formatted": "string", "endpoint": "Reception#1", "company_id": 0, "is_smiley_enabled": true, "is_smiley_nps_enabled": true, "is_open": true, "is_shadow": true, "has_main_sms": true, "is_cloakable": true } } } ``` -------------------------------- ### Get All Receptions Source: https://dev.relatel.dk/oas/index Retrieves a list of all available receptions (main numbers) within the system. ```APIDOC ## GET /api/v2/receptions ### Description Retrieves a list of all available receptions (main numbers) within the system. ### Method GET ### Endpoint `/api/v2/receptions` ### Response #### Success Response (200) - **receptions** (array) - A list of reception objects. - **id** (integer) - Unique identifier for the reception. - **name** (string) - Name of the reception. - **phone_number** (object) - Phone number details. - **number** (string) - The reception's phone number. - **brand_name** (string) - The brand name associated with the reception. - **short_brand_name** (string) - A shorter version of the brand name. - **number** (string) - The reception's phone number (duplicate field). - **number_formatted** (string) - The formatted reception phone number. - **endpoint** (string) - Endpoint identifier for the reception. - **company_id** (integer) - The ID of the company this reception belongs to. - **is_smiley_enabled** (boolean) - Indicates if smiley feedback is enabled. - **is_smiley_nps_enabled** (boolean) - Indicates if NPS smiley feedback is enabled. - **is_open** (boolean) - Indicates if the reception is currently open. - **is_shadow** (boolean) - Indicates if this is a shadow reception. - **has_main_sms** (boolean) - Indicates if the reception has main SMS functionality. - **is_cloakable** (boolean) - Indicates if the number can be cloaked. #### Response Example ```json { "receptions": [ { "id": 0, "name": "string", "phone_number": { "number": "string" }, "brand_name": "string", "short_brand_name": "string", "number": "string", "number_formatted": "string", "endpoint": "Reception#1", "company_id": 0, "is_smiley_enabled": true, "is_smiley_nps_enabled": true, "is_open": true, "is_shadow": true, "has_main_sms": true, "is_cloakable": true } ] } ``` ``` -------------------------------- ### GET /employees/{id} Source: https://dev.relatel.dk/oas/index Retrieves the details of a specific employee using their unique ID. ```APIDOC ## GET /employees/{id} ### Description Retrieves the details of a specific employee using their unique ID. ### Method GET ### Endpoint /employees/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - Employee ID ### Response #### Success Response (200) - **employees** (array) - An array containing employee objects. - **type** (string) - The type of the object, e.g., "Employee". - **id** (integer) - The unique identifier for the employee. - **endpoint** (string) - The API endpoint for the employee. - **name** (string) - The name of the employee. - **email** (string) - The email address of the employee. - **number** (string) - The phone number of the employee. - **number_formatted** (string) - The formatted phone number. - **do_not_disturb** (boolean) - Indicates if Do Not Disturb is enabled. - **do_not_disturb_label** (string) - Label for Do Not Disturb status. - **do_not_disturb_emoji** (string) - Emoji representing Do Not Disturb status. - **do_not_disturb_ended_at** (string) - Timestamp when Do Not Disturb will end (ISO 8601 format). - **dnd_timeout_at** (string) - Timestamp for Do Not Disturb timeout (ISO 8601 format). - **dnd_reception_action** (boolean) - Indicates if a reception action is associated with DND. - **dnd_message** (object) - Details about the Do Not Disturb message. - **id** (integer) - The ID of the DND message. - **text** (string) - The text content of the DND message. - **emoji** (string) - The emoji associated with the DND message. - **reception_action_id** (integer) - The ID of the reception action. - **live_presence** (string) - The current live presence status (e.g., "available"). - **live_presence_updated_at** (string) - Timestamp when live presence was last updated (ISO 8601 format). - **locale** (string) - The locale setting for the employee. - **speed_dial** (object) - Speed dial information. - **digit** (integer) - The speed dial digit. - **has_switch** (boolean) - Indicates if the employee has a switch feature. - **cloak_reception** (object) - Details about cloak reception. - **id** (integer) - The ID of the cloak reception. - **name** (string) - The name of the cloak reception. - **phone_number** (object) - Phone number details. - **number** (string) - The phone number. - **brand_name** (string) - The brand name of the cloak reception. - **short_brand_name** (string) - The short brand name. - **number** (string) - The phone number. - **number_formatted** (string) - The formatted phone number. - **endpoint** (string) - The API endpoint for the cloak reception. - **company_id** (integer) - The ID of the company. - **is_smiley_enabled** (boolean) - Indicates if smiley feature is enabled. - **is_smiley_nps_enabled** (boolean) - Indicates if smiley NPS is enabled. - **is_open** (boolean) - Indicates if the reception is open. - **is_shadow** (boolean) - Indicates if it's a shadow reception. - **has_main_sms** (boolean) - Indicates if main SMS is available. - **is_cloakable** (boolean) - Indicates if it's cloakable. - **cloak_tracking_reception** (object) - Details about cloak tracking reception (same structure as cloak_reception). - **cloak_tracking_enabled** (boolean) - Indicates if cloak tracking is enabled. - **employee_group_ids** (array) - Array of employee group IDs. - (integer) - **country_code** (string) - The country code. - **in_trial** (boolean) - Indicates if the employee is in a trial period. - **company_id** (integer) - The ID of the company. - **features** (string) - Enabled features (e.g., "mobile"). - **admin** (boolean) - Indicates if the employee is an admin. - **is_admin** (boolean) - Indicates if the employee is an admin. - **admin_abilities** (object) - Admin abilities. - **property1** (boolean) - Example admin ability. - **property2** (boolean) - Example admin ability. - **subscription_ids** (array) - Array of subscription IDs. - (integer) - **avatar** (string) - URL to the employee's avatar. - **visible** (boolean) - Indicates if the employee is visible. - **mobile_product_title** (string) - Title of the mobile product. - **shadow_reception** (object) - Details about shadow reception (same structure as cloak_reception). #### Response Example ```json { "employees": [ { "type": "Employee", "id": 0, "endpoint": "Employee#1", "name": "string", "email": "string", "number": "string", "number_formatted": "string", "do_not_disturb": true, "do_not_disturb_label": "string", "do_not_disturb_emoji": "string", "do_not_disturb_ended_at": "2019-08-24T14:15:22Z", "dnd_timeout_at": "2019-08-24T14:15:22Z", "dnd_reception_action": true, "dnd_message": { "id": 0, "text": "string", "emoji": "string", "reception_action_id": 0 }, "live_presence": "available", "live_presence_updated_at": "2019-08-24T14:15:22Z", "locale": "string", "speed_dial": { "digit": 0 }, "has_switch": true, "cloak_reception": { "id": 0, "name": "string", "phone_number": { "number": "string" }, "brand_name": "string", "short_brand_name": "string", "number": "string", "number_formatted": "string", "endpoint": "Reception#1", "company_id": 0, "is_smiley_enabled": true, "is_smiley_nps_enabled": true, "is_open": true, "is_shadow": true, "has_main_sms": true, "is_cloakable": true }, "cloak_tracking_reception": { "id": 0, "name": "string", "phone_number": { "number": "string" }, "brand_name": "string", "short_brand_name": "string", "number": "string", "number_formatted": "string", "endpoint": "Reception#1", "company_id": 0, "is_smiley_enabled": true, "is_smiley_nps_enabled": true, "is_open": true, "is_shadow": true, "has_main_sms": true, "is_cloakable": true }, "cloak_tracking_enabled": true, "employee_group_ids": [ 0 ], "country_code": "string", "in_trial": true, "company_id": 0, "features": "mobile", "admin": true, "is_admin": true, "admin_abilities": { "property1": true, "property2": true }, "subscription_ids": [ 0 ], "avatar": "string", "visible": true, "mobile_product_title": "string", "shadow_reception": { "id": 0, "name": "string", "phone_number": { "number": "string" }, "brand_name": "string", "short_brand_name": "string", "number": "string", "number_formatted": "string", "endpoint": "Reception#1", "company_id": 0, "is_smiley_enabled": true, "is_smiley_nps_enabled": true, "is_open": true, "is_shadow": true, "has_main_sms": true, "is_cloakable": true } } ] } ``` ``` -------------------------------- ### Get All Messages (Query Parameters) Source: https://dev.relatel.dk/oas/index Retrieves a list of messages. This endpoint supports filtering messages by creation timestamp (before or after a specific date-time) and by endpoint. The response will be a list of message objects. ```http GET /api/v2/messages?created_at_lt_or_eq=&created_at_gt_or_eq=&endpoint= ``` -------------------------------- ### Get All Calls (API Request) Source: https://dev.relatel.dk/oas/index This endpoint retrieves a list of call records. It supports query parameters for filtering calls by date range, direction, and endpoint. The response includes a list of call objects. ```http GET /api/v2/calls?started_at_lt_or_eq=&started_at_gt_or_eq=&ended_at_lt_or_eq=&ended_at_gt_or_eq=&limit=&direction=&endpoint= ``` -------------------------------- ### CSV Response Sample for Subscription Details Source: https://dev.relatel.dk/oas/index This snippet shows a sample response in CSV format for subscription details. It includes fields like subscription ID, state, phone number, product name, and activation/cancellation dates. This format is useful for bulk data retrieval and analysis. ```csv subscription_id,subscription_state,phone_number,product_name,icc,type,count,dkk_to_vat,dkk_no_vat,subscription_activated_on,subscription_cancelled_on,formatted_phone_number,description 1234,"active","4571991234","m2m-large","89450123456789012349","sms_roam","123","5.34","0.0","2024-01-05","2024-02-01","71 99 12 34","Tractor 12" ``` -------------------------------- ### Get M2M Subscriptions (IDs Only) - JSON Response Sample Source: https://dev.relatel.dk/oas/index This snippet shows a sample JSON response for retrieving a list of M2M subscription IDs. This endpoint is useful for quickly getting a list of active M2M subscriptions without full details. ```json [ 12, 23, 34 ] ``` -------------------------------- ### Order API Source: https://dev.relatel.dk/oas/index This section provides documentation for inspecting recent orders. ```APIDOC ## Order API ### Description This API allows you to inspect recent orders. ## Get a list of orders (recent only) ### Description Retrieves a list of recent orders. ### Method GET ### Endpoint /api/v2/orders (Assumed endpoint based on context) ### Parameters #### Query Parameters None specified, but likely supports filtering or pagination. #### Request Body None ### Responses #### Success Response (200) OK. Returns a list of order objects. *(Specific fields for order objects are not detailed in the provided text)* ### Response Example (200) *(Example not provided in the source text)* ``` -------------------------------- ### Employee Data Response Sample (JSON) Source: https://dev.relatel.dk/oas/index This JSON structure represents a successful response (HTTP 200) when retrieving employee data. It includes detailed information about an employee, their presence status, associated cloak/shadow reception details, and feature flags. This sample is useful for understanding the expected data format for employee objects. ```json { "employees": [ { "type": "Employee", "id": 0, "endpoint": "Employee#1", "name": "string", "email": "string", "number": "string", "number_formatted": "string", "do_not_disturb": true, "do_not_disturb_label": "string", "do_not_disturb_emoji": "string", "do_not_disturb_ended_at": "2019-08-24T14:15:22Z", "dnd_timeout_at": "2019-08-24T14:15:22Z", "dnd_reception_action": true, "dnd_message": { "id": 0, "text": "string", "emoji": "string", "reception_action_id": 0 }, "live_presence": "available", "live_presence_updated_at": "2019-08-24T14:15:22Z", "locale": "string", "speed_dial": { "digit": 0 }, "has_switch": true, "cloak_reception": { "id": 0, "name": "string", "phone_number": { "number": "string" }, "brand_name": "string", "short_brand_name": "string", "number": "string", "number_formatted": "string", "endpoint": "Reception#1", "company_id": 0, "is_smiley_enabled": true, "is_smiley_nps_enabled": true, "is_open": true, "is_shadow": true, "has_main_sms": true, "is_cloakable": true }, "cloak_tracking_reception": { "id": 0, "name": "string", "phone_number": { "number": "string" }, "brand_name": "string", "short_brand_name": "string", "number": "string", "number_formatted": "string", "endpoint": "Reception#1", "company_id": 0, "is_smiley_enabled": true, "is_smiley_nps_enabled": true, "is_open": true, "is_shadow": true, "has_main_sms": true, "is_cloakable": true }, "cloak_tracking_enabled": true, "employee_group_ids": [ 0 ], "country_code": "string", "in_trial": true, "company_id": 0, "features": "mobile", "admin": true, "is_admin": true, "admin_abilities": { "property1": true, "property2": true }, "subscription_ids": [ 0 ], "avatar": "string", "visible": true, "mobile_product_title": "string", "shadow_reception": { "id": 0, "name": "string", "phone_number": { "number": "string" }, "brand_name": "string", "short_brand_name": "string", "number": "string", "number_formatted": "string", "endpoint": "Reception#1", "company_id": 0, "is_smiley_enabled": true, "is_smiley_nps_enabled": true, "is_open": true, "is_shadow": true, "has_main_sms": true, "is_cloakable": true } } ] } ``` -------------------------------- ### POST /employee_groups Source: https://dev.relatel.dk/oas/index Create a new employee group. This action is restricted to administrators only. ```APIDOC ## POST /employee_groups ### Description Create a new employee group. This action is restricted to administrators only. ### Method POST ### Endpoint /employee_groups ### Parameters #### Request Body - **employee_group** (object) - Required - **name** (string) - Required - The name of the employee group. - **employee_ids** (array of integers) - Required - A list of employee IDs to include in the group. ### Request Example ```json { "employee_group": { "name": "string", "employee_ids": [ 0 ] } } ``` ### Response #### Success Response (200) - **employee_group** (object) - The newly created employee group object. #### Response Example ```json { "employee_group": { "type": "EmployeeGroup", "id": 0, "name": "string", "live_presence": "available", "speed_dial": { "digit": 0 }, "employee_ids": [ 0 ], "endpoint": "EmployeeGroup#1", "avatar": "string" } } ``` ``` -------------------------------- ### Create M2M Subscription Order - Response Sample Source: https://dev.relatel.dk/oas/index This snippet shows a sample JSON response after successfully creating an M2M subscription order. It includes the order details, such as ID, type, state, ICC ID, and the new subscription number. ```json { "order": { "id": 1234, "type": "Order::ActivateM2m", "state": "completed", "icc_id": "89450123456789012346", "number": "4571991234", "subscription_id": 2345 } } ```