Fetch a contact
GET
https://api.lws.net/v1/
operationIdgetContact
Retrieve informations about a contact using their ID. Said ID can be found using the '/contact/0/list' action and is also given at the contact creation. Only contacts managed by the user can be fetched.
Path parameters
-
contactinteger required -
ID of the contact to look for
Responses
200
Contact successfully fetched
{
"code": 200,
"info": "Contact fetched",
"data": {
"company": "My Company",
"lastname": "Doe",
"firstname": "John",
"address": "1 rue de la Paix",
"postal": "75000",
"city": "Paris",
"country": "France",
"phone": "0033612345678",
"email": "[email protected]",
"is_company": true,
"credit": 0
}
}
Response fields 14
-
codeinteger -
infostring -
dataobjectContact information response schema
-
companyanyCompany name (optional)
-
lastnameanyLast name
-
firstnameanyFirst name
-
addressanyStreet address
-
postalstringPostal code
-
cityanyCity
-
countryanyCountry
-
phoneanyPhone number for the contact in the international format 00{country code}{number}
-
emailanyEmail address
-
is_companyanyWhether the contact is for a company or not
-
creditanyCredit balance
400
Failed to retrieve the contact. Generally means a contact with such ID does not exist or is not valid.
{
"code": 400,
"info": "No contact provided"
}
Response fields 2
-
codeinteger -
infostring
401
Unauthorized - Missing authentication headers
{
"code": 401,
"info": "Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed."
}
Response fields 2
-
codeinteger -
infostring
429
Rate limit exceeded
{
"code": 429,
"info": "Rate limit exceeded. Please try again later."
}
Response fields 2
-
codeinteger -
infostring
500
Internal Server Error. Details about the error will be provided in 'data'
{
"code": 500,
"info": "Internal Server Error",
"data": "Details on the error"
}
Response fields 3
-
codeinteger -
infostring -
datastring
502
Invalid response returned. Generally means returned data was not expected.
{
"code": 502,
"info": "Invalid response from upstream server",
"data": {
"status": 500,
"error": "Internal Server Error"
}
}
Response fields 3
-
codeinteger -
infostring -
dataany[]