GET /api/v1/Contact

Description: Returns a list of end customer contacts linked to your company.

Url: https://serviceapi.episerver.com/api/v1/Contact

Http method: GET

Request

Request headers

Accept: application/json, text/json, application/xml, text/xml,

HTTP Request Example

GET https://serviceapi.episerver.com/api/v1/Contact?apikey=xxx{&ContactId=1}
Accept:application/xml

URI Parameters

Field name Description Type Optional Default
ContactId Filter contacts by id. integer
Yes

Response

Successful HTTP Response: 200 Status Code

Responce Body

Field name Description Type
TotalCount integer
Records V1PersonDto
Records.Id Id. integer
Records.FirstName First name. string
Records.LastName Last name. string
Records.Email Email. string
Records.Phone Phone. string

Response Format

{
  "TotalCount": 1,
  "Records": [
    {
      "Id": 1,
      "FirstName": "sample string 2",
      "LastName": "sample string 3",
      "Email": "sample string 4",
      "Phone": "sample string 5"
    },
    {
      "Id": 1,
      "FirstName": "sample string 2",
      "LastName": "sample string 3",
      "Email": "sample string 4",
      "Phone": "sample string 5"
    }
  ]
}

<V1ResponseModelOfV1PersonDto xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <TotalCount>1</TotalCount>
  <Records>
    <V1PersonDto>
      <Id>1</Id>
      <FirstName>sample string 2</FirstName>
      <LastName>sample string 3</LastName>
      <Email>sample string 4</Email>
      <Phone>sample string 5</Phone>
    </V1PersonDto>
    <V1PersonDto>
      <Id>1</Id>
      <FirstName>sample string 2</FirstName>
      <LastName>sample string 3</LastName>
      <Email>sample string 4</Email>
      <Phone>sample string 5</Phone>
    </V1PersonDto>
  </Records>
</V1ResponseModelOfV1PersonDto>

Error Response

Error HTTP Response: Error Status Codes

Status Code Description
200 OK Successfull request
400 Bad Request Path variable may be invalid
403 Forbidden Insufficient role
404 Not Found Request not found
405 Method Not Allowed Request method not allowed
500 Internal Server Error Unexpected server error

Error Body

Field name Description Type
StatusCode The HTTP status code. String
StatusDesc Description of HTTP status code. String
ErrorMessage Additional information. String

Response Format

{
  "StatusCode": "sample string 1",
  "StatusDesc": "sample string 2",
  "ErrorMessage": "sample string 3"
}