Contact Assignments
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$
The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.
1
The number of documents being retrieved on the page.
16
Fields to sort the response data by following order of the parameters from left to right. Can contain multiple fields in format: field name:sort direction separated by a comma. The colon with sort direction parameter is redundant and descending order is taken only if it is equal to desc or DESC. Ascending order is considered in any other case.
name,metadata.createdAt:desc
Query param for filtering entities by specified type. Examples of query params which are supported:
Q Param | Description |
---|---|
name:"Exact match" |
find an entity with name field with Exact match value |
name:~John |
find an entity with name field containing John value |
locDescription.fr:"Description traduction française 02" |
find an entity with localized locDescription field with Description traduction française 02 value in french language |
primary:true |
find an entity with primary field with true value |
metadata.createdAt:(>"2019-01-06T10:29:30.602Z" AND <"2020-01-07T10:29:30.602Z") |
find an entity with metadata.createdAt field with value between 2019-01-06T10:29:30.602Z and 2020-01-07T10:29:30.602Z |
name:exists |
find an entity with existing name field |
name:null |
find an entity with non-existing name field |
name:missing |
find an entity with non-existing name field |
name:"John" surname:~Smith |
find an entity with name exactly equals to John and surname containing Smith value |
name:("John","Jack","James") |
find an entity with name field with one of the following value: John or Jack or James |
name:~john
Comma-separated list of fields to return in the response. If not specified, all fields are returned.
name,type
The id of the legal entity. When specified, only customer assignments attached to the specified legal entity will be returned.
Note: When filtering the results with this field, the equals
operator is used.
The id of the customer. When specified, only customer assignments attached to the specified customer will be returned.
Note: When filtering the results with this field, the equals
operator is used.
The type of the customer assignment. When specified, only customer assignments with the specified type will be returned.
Note: When filtering the results with this field, the equals
operator is used.
The primary customer flag. When specified, only customers with the specified primary flag value will be returned.
Note: When filtering the results with this field, the equals
operator is used.
In order to get information how many entities meet a filter requirements, X-Total-Count header has been introduced. The header is optional and its default value is false. It the header is provided and it is true then total count is returned in the X-Total-Count response header. In both cases (X-Total-Count true, false or not provided), the response body has the same format (array of entities). In other words, the information about total count is returned on demand, depending of an existence of X-Total-Count header in a request. Therefore, the X-Total-Count header is not returned if an API consumer didn't ask for it.
false
The request was successful. A list of customer assignments is returned.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Internal Service Error occurred.
GET /customer-management/{tenant}/contact-assignments HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"id": "627e06ecf0452c2d6c0b81391",
"legalEntity": {
"id": "123e06ecf0452c2d6c0b12391",
"name": "Subsidiary name",
"type": "SUBSIDIARY",
"parentId": "627e06ecf0452c2d6c0b81391",
"accountLimit": {
"currency": "EUR",
"value": 1000.99
},
"legalInfo": {
"legalName": "Some subsidiary name",
"registrationDate": "2022-03-31T13:18:02.379Z",
"taxRegistrationNumber": "4311",
"registrationAgency": "Sub reg agency",
"countryOfRegistration": "DE",
"registrationId": "627e06ecf0452c2d6c0b81399"
},
"customerGroups": [
{
"id": "123e06ecf0452c2d6c0b81390",
"name": {
"en": "Customer group 1",
"fr": "Groupe de clients 1"
}
}
]
},
"customer": {
"id": "627e06ecf0452c2d6c0b81391",
"name": "John",
"surname": "Doe"
},
"type": "BILLING",
"primary": true,
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
{
"id": "627e06ecf0452c2d6c0b81311",
"legalEntity": {
"id": "123e06ecf0452c2d6c0b81390",
"name": "Company name",
"type": "COMPANY",
"legalInfo": {
"legalName": "Some company name",
"registrationDate": "2022-03-31T13:18:02.379Z",
"registrationAgency": "Comp reg agency",
"registrationId": "627e06ecf0452c2d6c0b81391",
"countryOfRegistration": "DE",
"taxRegistrationNumber": "1234",
"accountLimit": {
"currency": "EUR",
"value": 1000.99
}
},
"customerGroups": [
{
"id": "123e06ecf0452c2d6c0b81390",
"name": {
"en": "Customer group 1",
"fr": "Groupe de clients 1"
}
},
{
"id": "123e06ecf0452c2d6c0b12345",
"name": {
"en": "Customer group 2",
"fr": "Groupe de clients 2"
}
}
],
"entitiesAddresses": [
{
"id": "627e06ecf0452c2d6c0b81391",
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
{
"id": "123e06ecf0acd223140b12345",
"name": "Main Warehouse",
"type": "WAREHOUSE",
"metadata": {
"createdAt": "2022-03-31T13:22:31.112Z",
"modifiedAt": "2022-03-31T13:22:31.112Z",
"version": 1
}
}
],
"approvalGroup": [
{
"id": "627e06ecf0452c2d6c0b81391",
"name": "John",
"surname": "Doe"
},
{
"id": "123e06ecf0452c2d6c0b81390",
"name": "Adam",
"surname": "Smith"
}
],
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
"contact": {
"id": "627e06ecf0452c2d6c0b81391",
"name": "John",
"surname": "Doe"
},
"type": "PRIMARY",
"primary": false,
"metadata": {
"createdAt": "2022-04-31T13:18:02.379Z",
"modifiedAt": "2022-05-31T13:18:02.379Z",
"version": 2
}
}
]
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$
Custom assignment identifier. If not provided, it is automatically generated.
^[a-zA-Z0-9_-]$
The type of the customer assignment.
Indicates whether the customer is primary.
false
The request was successful. The customer assignment has been created.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Given resource already exists
Internal Service Error occurred.
POST /customer-management/{tenant}/contact-assignments HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 128
{
"legalEntity": {
"id": "612306ecf0452c2d6c0b81392"
},
"customer": {
"id": "612306ecf0452c2d6c0b81123"
},
"type": "BILLING",
"primary": true
}
{
"id": "53ac81fd0cce8b26b36f1234"
}
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$
The identifier of the customer assignment
Comma-separated list of fields to return in the response. If not specified, all fields are returned.
name,type
The request was successful. The requested customer assignment is returned.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Internal Service Error occurred.
GET /customer-management/{tenant}/contact-assignments/{contactAssignmentId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"id": "627e06ecf0452c2d6c0b81391",
"legalEntity": {
"id": "123e06ecf0452c2d6c0b81390",
"name": "Company name",
"type": "COMPANY",
"legalInfo": {
"legalName": "Some company name",
"registrationDate": "2022-03-31T13:18:02.379Z",
"registrationAgency": "Comp reg agency",
"registrationId": "627e06ecf0452c2d6c0b81391",
"countryOfRegistration": "DE",
"taxRegistrationNumber": "1234",
"accountLimit": {
"currency": "EUR",
"value": 1000.99
}
},
"customerGroups": [
{
"id": "123e06ecf0452c2d6c0b81390",
"name": {
"en": "Customer group 1",
"fr": "Groupe de clients 1"
}
},
{
"id": "123e06ecf0452c2d6c0b12345",
"name": {
"en": "Customer group 2",
"fr": "Groupe de clients 2"
}
}
],
"entitiesAddresses": [
{
"id": "627e06ecf0452c2d6c0b81391",
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]",
"[email protected]"
],
"phones": [
"1234567890",
"123456789"
],
"addressLine1": "W Sample St",
"addressLine2": "3601-3799",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US",
"tags": [
"shipping"
]
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
{
"id": "123e06ecf0acd223140b12345",
"name": "Main Warehouse",
"type": "WAREHOUSE",
"metadata": {
"createdAt": "2022-03-31T13:22:31.112Z",
"modifiedAt": "2022-03-31T13:22:31.112Z",
"version": 1
}
}
],
"approvalGroup": [
{
"id": "627e06ecf0452c2d6c0b81391",
"name": "John",
"surname": "Doe"
},
{
"id": "123e06ecf0452c2d6c0b81390",
"name": "Adam",
"surname": "Smith"
}
],
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
},
"customer": {
"id": "627e06ecf0452c2d6c0b81391",
"name": "John",
"surname": "Doe"
},
"type": "BILLING",
"primary": true,
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
}
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$
The identifier of the customer assignment
The type of the customer assignment.
Indicates whether the customer is primary.
false
The request was successful. The contact assignment has been created.
The customer assignment has been updated successfully.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Given resource already exists
Internal Service Error occurred.
PUT /customer-management/{tenant}/contact-assignments/{contactAssignmentId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 156
{
"legalEntity": {
"id": "612306ecf0452c2d6c0b82222"
},
"customer": {
"id": "111106ecf0452c2d6c0b81123"
},
"type": "LOGISTICS",
"primary": false,
"metadata": {
"version": 1
}
}
{
"id": "53ac81fd0cce8b26b36f3492"
}
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$
The identifier of the customer assignment
The customer assignment has been deleted successfully.
Request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Internal Service Error occurred.
DELETE /customer-management/{tenant}/contact-assignments/{contactAssignmentId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Was this helpful?