Get Company by lookup key
GET/companies/:lookupKey/:lookupValue
Use this endpoint to retrieve company details by lookup key. If multiple companies with the same lookup key exist, use additional filtering depending on the lookup key to uniquely identify the company (e.g. source
and language
for lookup key sourceId
).
Request
Path Parameters
Lookup key. Read more about company lookup keys
The value of the key (id or sourceId)
Query Parameters
Use expands
as a query parameter to fetch additional information for companies like sources, etc.
sources
: if the expands
parameter contains this value, the response from the API will return additional source information descibing where this resource is imported from. If there are no sources for this resource then the sources
property in the response will be just an empty array.
parent
: use this value in the expands
query parameter to get additional information about the container which this resource belongs to. In this particular scenario the parent of a company can be a resource of type usergroup
Responses
- 200
- 400
- 404
Get Company by lookup key - 200 / Get Company by lookup key - 200 (expand: sources)
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Get Company by lookup key - 200
- Get Company by lookup key - 200 (expand: sources)
Schema
data
object
{
"data": {
"authorizeId": "",
"budget": "N",
"budgetInherit": "Y",
"cocNumber": "75564998",
"company": "",
"debtorId": "75564998",
"defaultobjectId": "",
"department": "",
"id": 151,
"inheritOrderList": "N",
"inheritProductList": "Y",
"name": "Propeller B.V.",
"notes": "Company created from API",
"office": "",
"orderListAllowAll": "U",
"orderListManagerId": "",
"sources": [],
"taxNumber": "NL860325386B01",
"userManagerId": ""
},
"messages": [],
"total": 1
}
{
"data": {
"authorizeId": "",
"budget": "N",
"budgetInherit": "Y",
"cocNumber": "75564998",
"company": "",
"debtorId": "75564998",
"defaultobjectId": "",
"department": "",
"id": 151,
"inheritOrderList": "N",
"inheritProductList": "Y",
"name": "Propeller B.V.",
"notes": "Company created from API",
"office": "",
"orderListAllowAll": "U",
"orderListManagerId": "",
"taxNumber": "NL860325386B01",
"userManagerId": ""
},
"messages": [],
"total": 1
}
{
"data": {
"authorizeId": "",
"budget": "N",
"budgetInherit": "Y",
"cocNumber": "75564998",
"company": "",
"defaultobjectId": "",
"department": "",
"id": 151,
"inheritOrderList": "N",
"inheritProductList": "Y",
"name": "Propeller B.V.",
"notes": "Company created from API",
"office": "",
"orderListAllowAll": "U",
"orderListManagerId": "",
"sources": [],
"taxNumber": "NL860325386B01",
"userManagerId": ""
},
"messages": [],
"total": 1
}
Get Company by lookup key - 400 (invalid lookup key)
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Get Company by lookup key - 400 (invalid lookup key)
Schema
error
object
{
"error": {
"code": 10006,
"messages": [
"Invalid lookup key [ids], key must contain one of the following values: [id,sourceId,]"
],
"moreInfo": "https://www.propel.us/docs/errors/10006",
"status": 400,
"type": "InvalidLookupKey"
}
}
{
"error": {
"code": 10006,
"messages": [
"Invalid lookup key [ids], key must contain one of the following values: [id,sourceId,]"
],
"moreInfo": "https://www.propel.us/docs/errors/10006",
"status": 400,
"type": "InvalidLookupKey"
}
}
Get Company by lookup key - 404
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Get Company by lookup key - 404
Schema
error
object
{
"error": {
"code": 40006,
"messages": [
"Company with id [9483] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/40006",
"status": 404,
"type": "CompanyNotFound"
}
}
{
"error": {
"code": 40006,
"messages": [
"Company with id [9483] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/40006",
"status": 404,
"type": "CompanyNotFound"
}
}