api:customer:get
Table of Contents
API : Customer Get
Introduction
This request will return the specified customer.
Request
| URL | https://api.telecomx.dk/customer/CUSTOMER_ID | |
|---|---|---|
| Method | GET | |
| Access level | VIEWER, MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller. ADMIN. |
|
| Param | CUSTOMER_ID | Id of the customer (24 hex-char string) |
Query example
https://api.telecomx.dk/customer/1234567890ABCDEF12345678
Response
| Json object | ||
|---|---|---|
| _id | Id | Unique customer id |
| name | String | Name of the customer |
| phoneNumber | String | Primary customer phone number |
| faxNumber | String | primary customer fax number |
| state | Enum | State of the customer: ACTIVE, BLOCKED (all services disabled), DELETED |
| parentReseller | Id | Id of the reseller the customer belongs to (only top level resellers does not have a parent reseller) |
| emailAddress | String | Primary e-mail address |
| website | String | Primary website address |
| notes | String | Notes about the customer (only visible for reseller/admin) |
| Addresses | ||
| addresses[]._id | Id | Id of address |
| addresses[].primary | Boolean | True if this is the primary address |
| addresses[].alternativeName | String | Alternative name for this address |
| addresses[].address | String | Street, number etc. |
| addresses[].zip | String | Zip code |
| addresses[].city | String | City |
| addresses[].state | String | State |
| addresses[].country | String | Country |
| addresses[].fixedNumber | String | Fixed phone number on this address, if it differs from the primary |
| addresses[].faxNumber | String | Fax number on this address, if it differs from the primary |
| addresses[].municipalityCode | Integer | Municipality code, automatically set by the system |
| Financial settings | ||
| finance.vatNumber | String | VAT number |
| finance.accountingSystemId | String | Id for linking the customer to the accounting system that does the invoicing |
| finance.accountingSystemRef | String | Saved customer contact in the accounting system that does the invoicing |
| finance.invoiceMethod | String | How the customer wishes to be invoiced: MAIL, EMAIL, ELECTRONIC |
| finance.emailAddress | String | If invoiceMethod is EMAIL, this is the e-mail address to send it to |
| finance.electronicAddress | String | If invoiceMethod is ELECTRONIC, this is the address to send it to |
| finance.paymentTerms | String | Payment terms: DAYS_5, DAYS_7, DAYS_14, DAYS_30, DAYS_60, DAYS_90, CURRENT_MONTH_PLUS_DAYS_7, CURRENT_MONTH_PLUS_DAYS_14, CURRENT_MONTH_PLUS_DAYS_30 |
| finance.sipUsageLimit | Integer | Combined maximum monthly usage in DKK for all SIP accounts |
| finance.mvnoUsageLimit | Integer | Maximum monthly usage in DKK for a MVNO account |
| finance.channelLimit | Integer | Maximum number of concurrent calls the customer may conduct on SIP accounts |
| finance.numberRentProduct | Id | Id of the product used to invoice number rent. |
| finance.numberRentUntil | Date | Date that number rent has been invoiced until. |
| finance.numberRentCount.singles | Integer | Number of single phone numbers counted during last invoicing. |
| finance.numberRentCount.hundreds | Integer | Number of 100-number-series counted during last invoicing. |
| finance.numberRentLastProduct | Id | Id of the product used at the last number rent invoicing. |
| finance.durationMethod | Number | 0 for standard, >0 for custom (ADMIN only). |
| finance.billingCustomers | Array | Array of customer objects, used for billing a customer's mobiles, SIP trunks etc. to another customer. Often a customer with multiple departments will create each department as a separate customer, but have all of their services on the main department. This ensures that the services can be billed to the correct department. |
| finance.skipInvoicing | Boolean | This customer's invoices will not be shown in various endpoints that fetches lists of invoices. Used in cases where resellers don't want to bill a specific customer. Defaults to false. |
| BillingCustomers | ||
| billingCustomers[]._id | Id | Id of billing customer |
| billingCustomers[].name | String | Name of billing customer |
| billingCustomers[].vatNumber | String | VAT number |
| Reseller settings | ||
| isReseller | Boolean | True if customer is a reseller who can create and manage other customers |
| resellerPortal | String | If customer is a reseller and have a customized management portal, this is the URL for the login page. |
| resellerInvoice | Boolean | True if the platform sends out invoices to the customers (e-mail and electronic), false if reseller sends out invoices from their financial system. |
| resellerNextInvoiceNumber | Integer | Invoice number to use on the next invoice that is generated. auto-incremented when an invoice is created. Only used if resellerInvoice is true. |
| resellerSkin | String | Name of the skin to apply on UI for this resellers customers: EARTH, TEAL, DARK. |
| resellerEmailAsSender | Boolean | Sends e-mails with the reseller's own e-mail as sender. Requires the reseller setting up an SPF-record for Telecom X, for it to work properly. |
| resellerCustomerGroups | Array | List of customer groups the reseller wish to use. |
| resellerCustomerGroups[]._id | Id | Id of group. |
| resellerCustomerGroups[].name | String | Name of group. |
| MVNO settings | ||
| mvno.dataTopUpSms | Boolean | If true, then a link allowing a mobile account to buy top-up data, will be included in the SMS that warns the mobile user that they are approaching their data limit, for all mobile accounts on this customer. This setting can be overridden on the individual mobile accounts. |
| Misc settings | ||
| features | Array | List of features in the TelecomX platform that the customer has access to. Can only be set by ADMIN or RESELLER users. A reseller can only assign features that the reseller has to the resellers customers. The available features are: CUSTOMER - Basics, addresses, financial, usage limits, employees SIP - SIP trunks MVNO - Mobile phones PBX - Hosted PBX, SIP phones, music on hold, Webhooks (auto-enables SIP, MVNO, CUSTOMER) TCE - Telecom Call Enhancer DNS - Domain management INTERNET - Fiber & xDSL TV - TV IPTVPRIVATE - Private IPTV customer IPTVBUSINESS - Business IPTV customer FLEXCARE - FlexCare HealthTech ZEROTIER - ZeroTier networking EXTERNAL_LICENSES - external licenses NETWORK_MANAGEMENT - allows managing network devices CHANGELOG - logging to short term changelog enabled ORGANIZATION - customer has organizational rights. |
| organizationResellers | Array | List of ids of resellers this organization can manage (only if customer has ORGANIZATION feature. |
| authenticationSecurity | String | The required security level for all users when performing login: NONE - only username/password SMS - 2FA using SMS required AUTHENTICATOR - 2FA using authenticator app. |
| custom | Object | Optional custom data that 3rd parties may append to a customer, max. 4Kb |
| Storage information | ||
| storage.used | Number | How much file storage the customer has used in bytes. |
| storage.total | Number | Maximum file storage capacity in bytes, default is 1 gigabyte |
| Integrations | ||
| integrations | Object | Contains information about 3rd party integrations |
| integrations.billing | Object | Contains billing integrations |
| integrations.billing.economic | Object | Integration for visma e-conomic |
| integrations.billing.economic.enabled | Boolean | True if the integration is enabled, default false. |
| integrations.billing.economic.agreementGrantToken | String | Agreement grant token. It's set when allowing the “Telecom X Billing Integration” e-conomic app to access the reseller's e-conomic account. |
| integrations.billing.economic.accrual | Boolean | Determines whether the reseller wants to use the accrual-module in e-conomic. Requires the module to be bought in e-conomic. |
| integrations.billing.rackbeat | Object | Integration for Rackbeat |
| integrations.billing.rackbeat.enabled | Boolean | True if the integration is enabled, defaults false |
| integrations.billing.rackbeat.bearerToken | String | Bearer token created from rackbeat, used to verify against their API |
| integrations.billing.uniconta | Object | Integration for Uniconta |
| integrations.billing.uniconta.enabled | Boolean | True if the integration is enabled, defaults false |
| integrations.billing.uniconta.username | String | Username for logging into Uniconta |
| integrations.billing.uniconta.password | String | Password for logging into Uniconta |
| integrations.billing.uniconta.companyId | String | Company Id the user is connected to, in Uniconta |
| integrations.criipto.enabled | Boolean | True if the integration is enabled, defaults false |
| integrations.criipto.clientId | String | UUID for creating signature orders with criipto |
| integrations.criipto.clientSecret | String | Client secret for creating signature orders with criipto |
| integrations.criipto.domain | String | Domain for redirection login |
| integrations.criipto.clientIdRealm | String | Client Id for domain |
| integrations.licenses | Object | Licenses from 3rd parties, e.g ALSO. |
| integrations.licenses.also | Object | ALSO licenses integration |
| integrations.licenses.also.enabled | Boolean | Whether this customer/reseller should have their licenses synchronized from ALSO, etc. |
| integrations.licenses.also.username | String | ALSO username |
| integrations.licenses.also.password | String | ALSO password |
| integrations.licenses.also.customerId | String | The customer's ID from ALSO. |
| integrations.ms365 | Object | Settings for integration with Microsoft 365 |
| integrations.ms365.enabled | Boolean | Whether this integration is enabled for this customer. |
| integrations.ms365.tenantId | String | Id of customers tenant in MS 365 |
| integrations.ms365.verified | Boolean | True if connection to tenant has been verified |
| integrations.ms365.calendarSync | Boolean | True to integrate users calendars |
| integrations.ms365.contactsSync | Boolean | True to integrate users contacts |
| integrations.ms365.orgContactsSync | Boolean | True to integrate the organisation contacts |
| integrations.ms365.presenceSync | Boolean | True to sync presence and/or Trams InAMeeting/InACall status |
| integrations.ms365.calendarShowAsMappings | Object | Calendar mappings |
| integrations.ms365.calendarShowAsMappings.free | String | Presence state to map free to: AVAILABLE, BUSY, OUT_OF_OFFICE, OFF_WORK, HOLIDAY or null to do nothing. |
| integrations.ms365.calendarShowAsMappings.tentative | String | Presence state to map tentaive to: AVAILABLE, BUSY, OUT_OF_OFFICE, OFF_WORK, HOLIDAY or null to do nothing. |
| integrations.ms365.calendarShowAsMappings.busy | String | Presence state to map busy to: AVAILABLE, BUSY, OUT_OF_OFFICE, OFF_WORK, HOLIDAY or null to do nothing. |
| integrations.ms365.calendarShowAsMappings.oof | String | Presence state to map oof to: AVAILABLE, BUSY, OUT_OF_OFFICE, OFF_WORK, HOLIDAY or null to do nothing. |
| integrations.ms365.calendarShowAsMappings.workingElsewhere | String | Presence state to map workingElsewhere to: AVAILABLE, BUSY, OUT_OF_OFFICE, OFF_WORK, HOLIDAY or null to do nothing. |
| integrations.ms365.calendarCategoryMappings | Array | List of calendar category mappings |
| integrations.ms365.calendarCategoryMappings[].category | String | Category label to map to presence state. |
| integrations.ms365.calendarCategoryMappings[].presence | String | Presence state tp map the category to: AVAILABLE, BUSY, OUT_OF_OFFICE, OFF_WORK or HOLIDAY. |
| integrations.mvnoPrivate | Object | Settings for integration with MVNO for private customers |
| integrations.mvnoPrivate.enabled | Boolean | True to enable the integration |
| integrations.mvnoPrivate.portal | String | The portal URL to redirect customers to |
| Service-level Agreements | ||
| serviceLevelAgreements | Object | Contains information about service-level agreements between the customer and their reseller. Only used currently for specific customers, and is not available to everyone. Only visible to resellers. |
| serviceLevelAgreements.remote | Object | Contains information about remote service-level agreement |
| serviceLevelAgreements.remote.responseTime | Number | Response-time in hours. Valid values are 1, 3, 8, 24. |
| serviceLevelAgreements.remote.days | String | Which days of the week this service-level agreement covers. Valid values are “WEEK_DAYS”, “WEEK_DAYS_AND_SATURDAY”, “ALL” |
| serviceLevelAgreements.remote.period | String | Which period/hours in the day this service-level-agreement covers. Valid values are “07:45-16:00”, “08:00-22:00”, “00:00-23:59” |
| serviceLevelAgreements.onsite | Object | Contains information about on-site service-level agreement |
| serviceLevelAgreements.onsite.responseTime | Number | Response-time in hours. Valid values are 1, 3, 8, 24. |
| serviceLevelAgreements.onsite.days | String | Which days of the week this service-level agreement covers. Valid values are “WEEK_DAYS”, “WEEK_DAYS_AND_SATURDAY”, “ALL” |
| serviceLevelAgreements.onsite.period | String | Which period/hours in the day this service-level-agreement covers. Valid values are “07:45-16:00”, “08:00-22:00”, “00:00-23:59” |
| serviceLevelAgreements.services | Object | Which services are covered as a part of this service-level agreement. |
| serviceLevelAgreements.services.phoneSupportErrors | Boolean | Phone support - troubleshooting/bug fixing included |
| serviceLevelAgreements.services.phoneSupportChanges | Boolean | Phone support - functional changes included |
| serviceLevelAgreements.services.onsiteInclusive | Boolean | On-site assistance included |
| serviceLevelAgreements.services.hardwareInclusive | Boolean | Hardware-parts included |
| serviceLevelAgreements.services.mitelSwas | Boolean | Mitel software assurance included |
| serviceLevelAgreements.services.prescriptionStatus | Boolean | Prescription status included, used when integrating with medical systems. |
| simTag | String | Optional name of the eSIM pool to assign sims from. |
| bindingDate | Date | A date field that can be used by resellers to document when a customer's contract with their reseller expires. |
| customerGroup | Id | Id of group the customer belongs to, null if not using groups. |
| mvnoSimStats | Object | Object returned if the customer has the 'MVNO' feature. Contains information about SIM-availability for this customer. |
| mvnoSimStats.autoAssignTdc | Boolean | If true, then this customer has available auto-assign SIM-cards, which means the MVNO accounts can be created on this account with an auto-assigned TDC SIM-card. |
| mvnoSimStats.autoAssignTelenor | Boolean | If true, then this customer has available auto-assign SIM-cards, which means the MVNO accounts can be created on this account with an auto-assigned Telenor SIM-card. |
Note that properties holding no value may be omitted from the object.
Example
{ _id: '52f4fd7734697b28ccaf77ec', name: 'Anders And & Co', phoneNumber: '88888888', faxNumber: '99999999', state: 'ACTIVE', parentReseller: '52f4fd7734697b28ccaf77ec', emailAddress: 'anders@andeby.dk', website: 'www.andeby.duck', notes: 'Pas på Joakim, han er en hård pris forhandler.', authenticationSecurity: 'AUTHENTICATOR', addresses: [ { _id: '52f4fd7734697b2800000001', primary: true, address: 'Paradis Æblevej 23', zip: '123', city: 'Andeby', country: 'Cartoonistan', municipalityCode: 101 }, { _id: '52f4fd7734697b2800000002', primary: false, alternativeName: 'Joakim Von And\'s pengetank', address: 'Guldvej 1', zip: '123', city: 'Andeby', country: 'Cartoonistan', fixedNumber: '7913', municipalityCode: 102 } ], finance: { vatNumber: '35240136', accountingSystemId: '12345', accountingSystemRef: "Jan", invoiceMethod: 'EMAIL', emailAddress: 'bogholderi@andeby.dk', paymentTerms: '14DAYS', sipUsageLimit: 10000, mvnoUsageLimit: 3000, channelLimit: 25, numberRentProduct: '1234567890123457890ABCDEF', numberRentUntil: '2014-01-01T12:34:56.789Z', numberRentCount.singles: 23, hundreds: 1 }, numberRentLastProduct: '1234567890123457890ABCDEF', skipInvoicing: false }, isReseller: true, resellerPortal: 'https://admin.andeby.dk', resellerInvoice: true, resellerNextInvoiceNumber: 10000, resellerSkin: 'TEAL', resellerEmailAsSender: false, features: ['CUSTOMER','SIP','MVNO'], organizationResellers: null, mvno: { dataTopUpSms: false }, storage: { used: 5120, total: 1073741824 }, integrations: { billing: { economic: { enabled: true, agreementGrantToken: '123971249ahsdaksdhi612', accrual: false }, rackbeat: { enabled: true, bearerToken: '123456789abcdefg' }, uniconta: { enabled: true, username: 'apitestbruger', password: 'apitestpassword123!', companyId: '10203040' }, licenses: { also: { enabled: true, username: 'bob@tele-it.com', password: '127351273basdjg7137bdc', customerId: '6055321' } }, ms365: { enabled: true, tenantId: '12397jhdsd-128378ydjas-fhjgg78128', verified: true, calendarSync: true, contactsSync: true, orgContactsSync: true, presenceSync: true, calendarShowAsMappings: { free: null, tentative: null, busy: 'BUSY', oof: 'HOLIDAY', workingElsewhere: 'OUT_OF_OFFICE' }, calendarCategoryMappings: [ { category: 'Ferie', presence: 'HOLIDAY' } ] }, mvnoPrivate: { enabled: true, portal: 'https://telefoni.andeby.dk' } } simTag: 'providerx', bindingDate: null, customerGroup: '123457890123457890DDEE' }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | customer | Customer not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/customer/get.txt · Last modified: 2025/11/10 08:09 by Per Møller