Vendors
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:~Supplier |
find an entity with name field containing Supplier value |
type:COMPANY |
find an entity with type field with COMPANY 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:~supplier
Comma-separated list of fields to return in the response. If not specified, all fields are returned.
name,type
Vendor id. When specified, only vendor with the specified id will be returned.
Vendor name. When specified, only vendors containing the specified name will be returned.
Vendor type. When specified, only vendors with the specified type will be returned.
The id of the parent vendor. When specified, only vendors with the specified parent will be returned.
The legal name of the vendor. When specified, only vendors containing the specified name will be returned.
Vendor registration date. When specified, only vendors registered in the specified date will be returned.
Vendor registration country. When specified, only vendors containing the specified registration country will be returned.
Vendor tax registration number. When specified, only vendors with the specified tax registration number will be returned.
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. If the header is provided and it is true then total count is returned in the X-Total-Count response header.
false
The request was successful. A list of vendors 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.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Internal Service Error occurred.
GET /vendor/{tenant}/vendors HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"id": "VND001",
"name": "Vendor Company",
"type": "COMPANY",
"parentId": "PARENT123",
"legalInfo": {
"legalName": "Vendor Company",
"registrationDate": "2022-03-31T13:18:02.379Z",
"countryOfRegistration": "US",
"taxRegistrationNumber": "US-123456789"
},
"contactDetails": [
{
"emails": [
"[email protected]"
],
"phones": [
"+1-555-0123"
],
"addressLine1": "123 High Rd",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US"
}
],
"locations": [
{
"id": "LOC001"
}
],
"metadata": {
"version": 1,
"mixins": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"createdAt": "text",
"modifiedAt": "text"
},
"mixins": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$
Custom vendor identifier. If not provided, it is automatically generated.
VND001
Pattern: ^[a-zA-Z0-9_-]+$
The name of the vendor.
Vendor Company
The type of the vendor. If not provided, the default value is: COMPANY
.
COMPANY
Possible values: The ID of the parent vendor.
PARENT123
The request was successful. The vendor 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.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Given resource already exists
Internal Service Error occurred.
POST /vendor/{tenant}/vendors HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 362
{
"name": "Vendor Company",
"type": "COMPANY",
"legalInfo": {
"legalName": "Vendor Company Inc.",
"registrationDate": "2022-03-31T13:18:02.379Z",
"countryOfRegistration": "US",
"taxRegistrationNumber": "1234567890"
},
"contactDetails": [
{
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"phone": "+1-555-0123"
}
],
"locations": [
{
"id": "123e06ecf0452c2d6c0b81390"
}
]
}
{
"id": "53ac81fd0cce8b26b36f3492"
}
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
Comma-separated list of fields to return in the response. If not specified, all fields are returned.
name,type
Vendor id. When specified, only vendor with the specified id will be returned.
Vendor name. When specified, only vendors containing the specified name will be returned.
Vendor type. When specified, only vendors with the specified type will be returned.
The id of the parent vendor. When specified, only vendors with the specified parent will be returned.
The legal name of the vendor. When specified, only vendors containing the specified name will be returned.
Vendor registration date. When specified, only vendors registered in the specified date will be returned.
Vendor registration country. When specified, only vendors containing the specified registration country will be returned.
Vendor tax registration number. When specified, only vendors with the specified tax registration number will be returned.
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. If the header is provided and it is true then total count is returned in the X-Total-Count response header.
false
Query param for filtering entities by specified type.
The request was successful. A list of vendors 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.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
Internal Service Error occurred.
POST /vendor/{tenant}/vendors/search HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"q": "type:COMPANY"
}
[
{
"id": "VND001",
"name": "Vendor Company",
"type": "COMPANY",
"parentId": "PARENT123",
"legalInfo": {
"legalName": "Vendor Company",
"registrationDate": "2022-03-31T13:18:02.379Z",
"countryOfRegistration": "US",
"taxRegistrationNumber": "US-123456789"
},
"contactDetails": [
{
"emails": [
"[email protected]"
],
"phones": [
"+1-555-0123"
],
"addressLine1": "123 High Rd",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US"
}
],
"locations": [
{
"id": "LOC001"
}
],
"metadata": {
"version": 1,
"mixins": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"createdAt": "text",
"modifiedAt": "text"
},
"mixins": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
The tenant that the caller is acting upon.
Please note that this value is always lowercase.
^[a-z][a-z0-9]+$
The vendor unique identifier.
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 vendor 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.
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 /vendor/{tenant}/vendors/{vendorId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"id": "123e06ecf0452c2d6c0b81390",
"name": "Vendor Company",
"type": "COMPANY",
"legalInfo": {
"legalName": "Vendor Company Inc.",
"registrationDate": "2022-03-31T13:18:02.379Z",
"countryOfRegistration": "US",
"taxRegistrationNumber": "1234567890"
},
"contactDetails": [
{
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"phone": "+1-555-0123"
}
],
"locations": [
{
"id": "627e06ecf0452c2d6c0b81391",
"name": "Main HQ",
"type": "HEADQUARTER",
"contactDetails": {
"emails": [
"[email protected]"
],
"phones": [
"1234567890"
],
"addressLine1": "W Sample St",
"city": "South Bend",
"state": "Indiana",
"postcode": "46619",
"countryCode": "US"
},
"metadata": {
"createdAt": "2022-03-31T13:18:02.379Z",
"modifiedAt": "2022-03-31T13:18:02.379Z",
"version": 1
}
}
],
"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 vendor unique identifier.
The name of the vendor.
Vendor Company
The type of the vendor.
COMPANY
Possible values: The ID of the parent vendor.
PARENT123
The request was successful. The vendor has been created.
The vendor 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.
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 /vendor/{tenant}/vendors/{vendorId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 403
{
"name": "Updated Vendor Company",
"type": "COMPANY",
"legalInfo": {
"legalName": "Updated Vendor Company Inc.",
"registrationDate": "2022-03-31T13:18:02.379Z",
"countryOfRegistration": "US",
"taxRegistrationNumber": "1234567890"
},
"contactDetails": [
{
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"phone": "+1-555-0123"
}
],
"locations": [
{
"id": "123e06ecf0452c2d6c0b81390"
}
],
"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 vendor unique identifier.
The vendor 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.
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 /vendor/{tenant}/vendors/{vendorId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Was this helpful?