DNCL Public API Documentation
Base URL: https://public-api.lnnte-dncl.gc.ca
Authentication
- The API requires the use of third-party identification for your application. To obtain an authorization token, use the following endpoint: https://public-api.lnnte-dncl.gc.ca/OAuth/BearerToken
- The body of the request should contain: grant_type=client_credentials&client_id=12345&client_secret=12345
- If successful, the body of the response will be a JSON object containing a property “access_token”
- Subsequent requests to the API should contain an Authorization header with the following value: “Bearer {access_token}” where you replace the access token with the one you obtained.
Check Phone Number
Endpoint
- The endpoint for checking a phone number is: https://public-api.lnnte-dncl.gc.ca/v1/Consumer/Check
- The REST method to use is POST
Request Body
- The request body is a JSON object containing one property: “Phone” with the unformatted phone number as a value.
Response Body
The response body is a JSON object.
- Phone: the phone number
- AddedAt: the date and time at which the phone number was registered
- UpdatedAt: the last modification of this registration
- Active: (Boolean) whether this phone number is currently registered
- ActiveAt: the date and time when this phone number’s registration became active
- ActiveNow: (Boolean) whether this phone number is currently active (the 31 days wait period is completed)
Register Phone Number
Endpoint
- The endpoint for Register a phone number is: https://public-api.lnnte-dncl.gc.ca/v1/Consumer/Register
- The REST method to use is POST
Request Body
- The request body is a JSON object containing one property: “Phone” with the unformatted phone number as a value.
Response Body
The response body is a JSON object.
- Phone: the phone number
- AddedAt: the date and time at which the phone number was registered
- UpdatedAt: the last modification of this registration
- Active: (Boolean) whether this phone number is currently registered
- ActiveAt: the date and time when this phone number’s registration became active
- ActiveNow: (Boolean) whether this phone number is currently active (the 31 days wait period is completed)
Add Complaint
Endpoint
- The endpoint for Register a phone number is: https://public-api.lnnte-dncl.gc.ca/v1/Consumer/Complaint
- The REST method to use is POST
Request Body
The request body is a JSON object with the following properties:
- IncidentOccurredAt (datetime *)
- OrgAgentPhone (string) Phone number that made the call. One of OrgAgentPhone or OrgName must be supplied
- CallerId (string) Caller ID displayed
- OrgName (string) One of OrgAgentPhone or OrgName must be supplied
- OrgRepresented (string)
- OrgIndustryID (uuid – see next API endpoint)
- OrgIndustryOther (string)
- OrgAddress (string)
- OrgWebsite (string)
- OrgEmail (string)
- AdditionalInfo (string)
- IncidentPhone (string) Phone number that was called
- IncidentPhoneProvider (string) Phone provider that was called
- IncidentPhoneIsPersonal (bool)
- IncidentPhoneIsBusiness (bool)
- ConsumerPhone1 (string)
- ConsumerPhone2 (string)
- ConsumerEmail (string)
- ConsumerSalutation (string)
- ConsumerFirstName (string *)
- ConsumerLastName (string *)
-
ConsumerAddress
- Country (string *)
- Province (string)
- City (string *)
- PostalCode (string)
- Line1 (string *)
- Line2 (string)
-
InteractionType (string – one of the following)
- phone-live
- phone-rec
- phone-rec-hold-for-live
- phone-fax-sound
- phone-nobody-online
- phone-not-answered
- phone-voice-mail
- fax
- ConsumerLanguage (string “en” or “fr”)
-
CallObjectives (Array)
-
Type (string – one of the following)
- sell
- win
- survey
- political
- donation
- debt-bill-collector
- public-service-info-msg
- appointment
- overdue
- unknown
- Details (string)
-
Type (string – one of the following)
-
PreviousInteractions (Array of strings – in the following)
- purchase-during-call
- purchase-within-18m
- purchase-morethan-18m
- asked-about-product
- contract-expired
- personal-info-provided
- service-estimate
-
CallInterdictionRequests (Array of strings – in the following)
- during-call
- prev-14d
- prev-refused
Response Body
The response body is a JSON object.
- Id (string) – Internal use only
- Reference (string) – Reference number assigned to this complaint
- AddedAt (datetime)
- AddedByChannelId (string) – Internal use only
Get Industries
Endpoint
- The endpoint for getting the list of industries is: https://public-api.lnnte-dncl.gc.ca/v1/DynamicData/Industries
- The REST method to use is GET
Request Body
- The request body is empty
Response Body
The response body is a JSON array.
- Id (string) – the uuid to use when filing a complaint
- Name (string) – the industry name
- Date Modified: