Skip to content

Get the organization a contact buys under

GET
/v1/{contactId}/organization
curl --request GET \
--url https://example.com/customers/v1/example/organization

Retrieves the organization associated with a contact ID - for example, the company an employee or customer contact buys under. The contact ID is a customer ID (see GET /customers/v1/{customerId}).

contactId
required
string

The customer ID of a contact (same value accepted by GET /customers/v1/{customerId}).

OK

Media typeapplication/json
object
organization
required
object
customerId
required
string
name
required
string
email
null | string
mobile
null | string
customerType
required
string
isB2B
boolean
isPublic
boolean
country
required
string
primaryAddress
One of:
null
organizationNumber
null | string
organizationData
One of:
null
Examplegenerated
{
"organization": {
"customerId": "example",
"name": "example",
"email": "example",
"mobile": "example",
"customerType": "example",
"isB2B": true,
"isPublic": true,
"country": "example",
"primaryAddress": {
"streetLine1": "example",
"streetLine2": "example",
"postalCode": "example",
"city": "example",
"country": "example"
},
"organizationNumber": "example",
"organizationData": {
"subOrganizationName": "example",
"subOrganizationNumber": "example",
"organizationCountry": "example",
"organizationIds": "example"
}
}
}

Bad Request

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
errors
required
Array<object>
object
fieldName
required
string
message
required
string
code
required
string
traceId
required
string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"errors": [
{
"fieldName": "example",
"message": "example"
}
],
"code": "example",
"traceId": "example"
}

Unauthorized

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
code
required
string
traceId
required
string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": "example",
"traceId": "example"
}

Forbidden

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
code
required
string
traceId
required
string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": "example",
"traceId": "example"
}

Not Found

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
code
required
string
traceId
required
string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": "example",
"traceId": "example"
}

Internal Server Error

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
code
required
string
traceId
required
string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": "example",
"traceId": "example"
}