Overview
The Sweet One API provides access to Sweet Ones CRM entities, as well as information about related metadata entities such users and codes. It allows our customers to provide a REST Api to their customers/partners with their specific setup including customized case management, CRM features and much more.
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Structure of the API
Entities
The REST API structure provides a range of actions that enable users to manage and manipulate entity data. These actions include:
- POST: Used to add new entity data to the API.
- PUT: Used to update existing entity data in the API.
- DELETE: Used to remove entity data from the API.
- GET: Used to retrieve entity data based on a {id} in the route.
To perform these actions, users must specify the entity data they wish to work with. This data can encompass any type of data that the API handles, such as companies, activities, or cases.
In addition to these core actions, the API also includes endpoints that support filtering of entity data. These endpoints include:
<Entity>/Filter
POST: Used to filter entity data based on provided DataSourceRequest.<Entity>/Filter
GET: Used to retrieve a list of fields that can be used to filter entity data.
By utilizing these endpoints, users can more efficiently locate and interact with specific subsets of data that are relevant to their needs.
Overall, the REST API structure is a versatile and powerful set of tools that enable users to perform a wide range of data management tasks. These tools facilitate the addition, modification, and deletion of entity data, as well as the targeted retrieval of data through filtering functionality and specific identifiers.
Relations
The REST API structure allows for the management of relations between entities. Relations can be accessed using routes that include both an entity ID and a relation. The route format is as follows:
<Entity>/{Id}/{Relation}
In this format, the {Id} parameter specifies the ID of the entity being targeted, while the {Relation} parameter specifies the type of relation being managed.
To interact with relations in the API, the following actions are used:
- POST: Used to create a new relation between two entities. This involves creating a new record that links the parent entity with the related entity.
- PUT: Used to update an existing relation between two entities. This involves updating the details of the existing relation record, such as changing the type of relation or updating the attributes of the relation.
- GET: Used to retrieve information about a specific relation between two entities. This involves querying the relation record to retrieve details such as the type of relation or the attributes of the relation.
- DELETE: Used to remove a relation between two entities. This involves deleting the relation record that links the parent entity with the related entity.
Note that the specific actions and behaviors of the relation routes may vary depending on the requirements of the API and the type of entities being worked with. However, the overall structure of using the entity ID and relation to access and manage related entities remains consistent.
Metadata
In addition to the endpoints for manipulating entity data, the REST API also includes a set of “metadata” endpoints. These endpoints provide information about the users, inboxes, and codes that are utilized within the API’s broader functionality. The metadata endpoints are as follows:
-
/User/{searchTerm}
This endpoint filter users based on searchTerm and users is returned. The following fields are checked: First name, Sur name and user name and are all compared with a startsWith operation. The data returned includes each user’s name, email address, and a unique identifier. -
/Inboxes
This endpoint provides a list of all the inboxes that are currently registered within the API. Inboxes are used to manage incoming messages, and the data returned includes each email address, and a unique identifier. -
/Codegroup
These endpoints provides a list of all the codegroups that. Codes are returned by using the {codeGroupKey} parameter.
Filtering/Pagination
Filtering
All Filter endpoints are HTTP POST requests and they require a DataSourceRequest as input. The DataSourceRequest is used in all Sweet APIs. However, some of the features may not be supported by some of the APIs. In such cases, a 400 Bad Request error message will be returned with the name of the unsupported feature. For example, Sweet One API does not support Group, Aggregate or Select operations.
Pagination
This is accomplished by using skip and take on the DataSourceRequest. The max number of items returned can not be more than 100, if so a a 400 Bad Request error message will be returned stating this. If left out default number of items that will be returned is 10
DataSourceRequest Model Documentation
The DataSourceRequest model is used for filtering in Sweet Products’ APIs. However, not all APIs support every feature of the DataSourceRequest model.
This guide outlines the features that are supported by the Sweet One API and the Sweet Automation API, along with examples of how to use each feature.
Note that this part also mention Sweet Automation which is another API with in the Sweet Product Suite.
Paging
Paging is done with take and skip. For example, to get page 2 of a page size of 50, you would pass:
{
"skip": 25,
"take": 25
}
Paging is supported by the Sweet One and Sweet Automation APIs.
Filtering
Filtering is used to filter on fields and supports and/or operators. For example, to get “Mors lilla olle”, you would pass:
{
"skip": 25,
"take": 25,
"filter": {
"logic": "and",
"filters": [
{
"field": "Name",
"operator": "endsWith",
"value": "olle"
},
{
"field": "HasMother",
"operator": "equal",
"value": true
}
]
}
}
Filtering is supported by the Sweet One and Sweet Automation APIs.
Operators
The following operators are supported:
- eq: equal to
- neq: not equal to
- isnull: is null
- isnotnull: is not null
- lt: less than
- lte: less than or equal to
- gt: greater than
- gte: greater than or equal to
- startswith: starts with
- doesnotstartwith: does not start with
- endswith: ends with
- doesnotendwith: does not end with
- contains: contains
- doesnotcontain: does not contain
- isempty: is empty
- isnotempty: is not empty
Sorting
Sorting is straightforward and can be done on one or more fields in ascending or descending order. For example:
{
"skip": 25,
"take": 25,
"sort": [
{
"field": "Name",
"dir": "asc"
},
{
"field": "Created",
"dir": "desc"
}]
}
Authentication
API Key
To generate a key you need to have the feature Admin Core, Admin Core: developer or Admin Core: User Manager in the portal.
- Go to Admin->Users->Internal user. Create a new user or use an existing one. Click the button in the top “Generate new API Key”.
- When you press Ok on the information box a token will be created and all the old ones will be invalidated.
- Copy the token.
- Go to your implementation and use the token as a header value:
Authorization: Basic <token>
- Call the endpoint with the header included.
Rate Limiting
Rate limiting is enabled by default.
The default throttling is 30 requests per second or 1000 requests per minute.
If throttling happens you will be presented with an http status code of 429
Errors
Errors The API returns error codes such as 400, 403, 404, and 500 along with information about the error. Here are some common error responses:
-
400 Bad Request response often means that the request body is improperly formatted or missing required fields. In the case of missing fields.
-
401 Unauthorized response often means that the request did not include a valid Api Key. See Authentication.
-
403 Forbidden response can mean that the token in the request does not contain the scopes that the endpoint requires.
-
404 Not Found response can mean that the end point you are trying to access does not exist.
-
500 Internal Server Error response means that an error happened on the server. This can mean that the request is not valid, such as if you try to delete or edit a collection that does not exist, or if the API otherwise can’t do what you requested. It can also mean a temporary problem with the API. Check your request and try again or contact us.
Codegroup
Get codegroups and their codes
Get
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Codegroup \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Codegroup", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Codegroup");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Codegroup
Example responses
200 Response
[
{
"CodeGroupKey": "string",
"Caption": "string"
}
]
<?xml version="1.0" encoding="UTF-8" ?>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
401 | Unauthorized | Unauthorized | None |
500 | Internal Server Error | InternalServerError | None |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [CodeGroup] | false | none | none |
» CodeGroupKey | string | false | none | none |
» Caption | string | false | none | none |
User
Get
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/User/string \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/User/string", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/User/string");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /User/{searchTerm}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
searchTerm | path | string | true | none |
Example responses
200 Response
{
"UserId": "00000000-0000-0000-0000-000000000000",
"Name": "string",
"UserName": "string",
"Email": "string"
}
<?xml version="1.0" encoding="UTF-8" ?>
<User>
<UserId>00000000-0000-0000-0000-000000000000</UserId>
<Name>string</Name>
<UserName>string</UserName>
<Email>string</Email>
</User>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | User |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
500 | Internal Server Error | InternalServerError | None |
Inbox
Inboxes used by case management
Get
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Inboxes \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Inboxes", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Inboxes");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Inboxes
Example responses
200 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"Name": "string"
}
<?xml version="1.0" encoding="UTF-8" ?>
<InboxAccount>
<Id>00000000-0000-0000-0000-000000000000</Id>
<Name>string</Name>
</InboxAccount>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | InboxAccount |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
500 | Internal Server Error | InternalServerError | None |
Company
The company entity holds information about companies in the system
Retreive filtrable fields and their type for Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/Filter \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/Filter", {
"method": "GET",
"headers": {
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/Filter");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/Filter
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
401 | Unauthorized | Unauthorized | None |
500 | Internal Server Error | InternalServerError | None |
Filter Company based on fields and their type
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/Filter \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"take":1,"skip":0,"sort":[{"field":"string","dir":"string"}],"filter":{"field":"string","operator":"string","value":{},"logic":"string","filters":[{}]}}'
fetch("https://testing.sweetsystems.se/api/Company/Filter", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/Filter");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/Filter
Body parameter
{
"take": 1,
"skip": 0,
"sort": [
{
"field": "string",
"dir": "string"
}
],
"filter": {
"field": "string",
"operator": "string",
"value": {},
"logic": "string",
"filters": [
{}
]
}
}
take: 1
skip: 0
sort:
- field: string
dir: string
filter:
field: string
operator: string
value: {}
logic: string
filters:
- {}
<?xml version="1.0" encoding="UTF-8" ?>
<DataSourceRequest>
<take>1</take>
<skip>0</skip>
<sort>
<field>string</field>
<dir>string</dir>
</sort>
<filter>
<field>string</field>
<operator>string</operator>
<value/>
<logic>string</logic>
<filters/>
</filter>
</DataSourceRequest>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | DataSourceRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
429 | Too Many Requests | Too many requests | None |
500 | Internal Server Error | InternalServerError | None |
Get Company by it’s Id
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/string \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/string", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/{id}
The response header contains a ETag(or entity tag) value that can be used in subsequent Get/Put request.
When using a If-Match: value
in the Get request header you can check that you have the latest version of the entity.
Example. If-Match: ABC123
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
Example responses
200 Response
{
"Name": "string",
"EmployeeCount": 0,
"CustomerNumber": "string",
"OrganisationalNumber": "string",
"CorporateGroup": "string",
"Unit": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Branch": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"OwnBranch": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"ServiceGrade": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"UnitType": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Active": true,
"Segment": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"SubSegment": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Rating": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Status": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Region": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Type": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Category": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"EmployeeCountRange": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"PrimaryEmailAddress": "string",
"PrimaryPhoneNumber": "string",
"WebSite": "string",
"PrimaryAddress": "string",
"PrimaryAddressRow1": "string",
"PrimaryAddressRow2": "string",
"PrimaryAddressRow": "string",
"PrimaryCity": "string",
"PrimaryZipCode": "string",
"PrimaryCounty": "string",
"IsNew": true,
"PrimaryCountryId": [
0
],
"PrimaryCommunicationCategory": "unknown",
"CreatedBy": "string",
"UpdatedBy": "string",
"Responsible": "string",
"HasDocument": true,
"TagCount": 0,
"Longitude": 0.1,
"Latitude": 0.1,
"LoginStatus": "noLogin",
"UnitNo": "string",
"Id": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<Company>
<Name>string</Name>
<EmployeeCount>0</EmployeeCount>
<CustomerNumber>string</CustomerNumber>
<OrganisationalNumber>string</OrganisationalNumber>
<CorporateGroup>string</CorporateGroup>
<Unit>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Unit>
<Branch>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Branch>
<OwnBranch>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</OwnBranch>
<ServiceGrade>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</ServiceGrade>
<UnitType>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</UnitType>
<Active>true</Active>
<Segment>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Segment>
<SubSegment>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</SubSegment>
<Rating>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Rating>
<Status>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Status>
<Region>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Region>
<Type>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Type>
<Category>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Category>
<EmployeeCountRange>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</EmployeeCountRange>
<PrimaryEmailAddress>string</PrimaryEmailAddress>
<PrimaryPhoneNumber>string</PrimaryPhoneNumber>
<WebSite>string</WebSite>
<PrimaryAddress>string</PrimaryAddress>
<PrimaryAddressRow1>string</PrimaryAddressRow1>
<PrimaryAddressRow2>string</PrimaryAddressRow2>
<PrimaryAddressRow>string</PrimaryAddressRow>
<PrimaryCity>string</PrimaryCity>
<PrimaryZipCode>string</PrimaryZipCode>
<PrimaryCounty>string</PrimaryCounty>
<IsNew>true</IsNew>
<PrimaryCountryId>0</PrimaryCountryId>
<PrimaryCommunicationCategory>unknown</PrimaryCommunicationCategory>
<CreatedBy>string</CreatedBy>
<UpdatedBy>string</UpdatedBy>
<Responsible>string</Responsible>
<HasDocument>true</HasDocument>
<TagCount>0</TagCount>
<Longitude>0.1</Longitude>
<Latitude>0.1</Latitude>
<LoginStatus>noLogin</LoginStatus>
<UnitNo>string</UnitNo>
<Id>00000000-0000-0000-0000-000000000000</Id>
</Company>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Success | Company |
304 | Not Modified | You have the latest version | None |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
429 | Too Many Requests | Too many requests | None |
500 | Internal Server Error | InternalServerError | None |
Delete Company by it’s Id
Code samples
curl --request DELETE \
--url https://testing.sweetsystems.se/api/Company/string \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/string", {
"method": "DELETE",
"headers": {
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
DELETE /Company/{id}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
204 | No Content | Success | None |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
500 | Internal Server Error | InternalServerError | None |
Update Company
Code samples
curl --request PUT \
--url https://testing.sweetsystems.se/api/Company \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Name":"string","EmployeeCount":0,"CustomerNumber":"string","OrganisationalNumber":"string","CorporateGroup":"string","Unit":{"Key":"string","CodeGroupKey":"string"},"Branch":{"Key":"string","CodeGroupKey":"string"},"OwnBranch":{"Key":"string","CodeGroupKey":"string"},"ServiceGrade":{"Key":"string","CodeGroupKey":"string"},"UnitType":{"Key":"string","CodeGroupKey":"string"},"Active":true,"Segment":{"Key":"string","CodeGroupKey":"string"},"SubSegment":{"Key":"string","CodeGroupKey":"string"},"Rating":{"Key":"string","CodeGroupKey":"string"},"Status":{"Key":"string","CodeGroupKey":"string"},"Region":{"Key":"string","CodeGroupKey":"string"},"Type":{"Key":"string","CodeGroupKey":"string"},"Category":{"Key":"string","CodeGroupKey":"string"},"EmployeeCountRange":{"Key":"string","CodeGroupKey":"string"},"PrimaryEmailAddress":"string","PrimaryPhoneNumber":"string","WebSite":"string","PrimaryAddressRow":"string","PrimaryCity":"string","PrimaryZipCode":"string","PrimaryCounty":"string","PrimaryCountryId":[0],"PrimaryCommunicationCategory":"unknown","Longitude":0.1,"Latitude":0.1,"UnitNo":"string","Id":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company", {
"method": "PUT",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Name\":\"string\",\"EmployeeCount\":0,\"CustomerNumber\":\"string\",\"OrganisationalNumber\":\"string\",\"CorporateGroup\":\"string\",\"Unit\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Branch\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"OwnBranch\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"ServiceGrade\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"UnitType\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Active\":true,\"Segment\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"SubSegment\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Rating\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Status\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Region\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Type\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Category\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"EmployeeCountRange\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"PrimaryEmailAddress\":\"string\",\"PrimaryPhoneNumber\":\"string\",\"WebSite\":\"string\",\"PrimaryAddressRow\":\"string\",\"PrimaryCity\":\"string\",\"PrimaryZipCode\":\"string\",\"PrimaryCounty\":\"string\",\"PrimaryCountryId\":[0],\"PrimaryCommunicationCategory\":\"unknown\",\"Longitude\":0.1,\"Latitude\":0.1,\"UnitNo\":\"string\",\"Id\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Name\":\"string\",\"EmployeeCount\":0,\"CustomerNumber\":\"string\",\"OrganisationalNumber\":\"string\",\"CorporateGroup\":\"string\",\"Unit\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Branch\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"OwnBranch\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"ServiceGrade\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"UnitType\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Active\":true,\"Segment\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"SubSegment\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Rating\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Status\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Region\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Type\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Category\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"EmployeeCountRange\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"PrimaryEmailAddress\":\"string\",\"PrimaryPhoneNumber\":\"string\",\"WebSite\":\"string\",\"PrimaryAddressRow\":\"string\",\"PrimaryCity\":\"string\",\"PrimaryZipCode\":\"string\",\"PrimaryCounty\":\"string\",\"PrimaryCountryId\":[0],\"PrimaryCommunicationCategory\":\"unknown\",\"Longitude\":0.1,\"Latitude\":0.1,\"UnitNo\":\"string\",\"Id\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
PUT /Company
Put uses ETag (or entity tag) to make sure you are updating the latest version of the entity.
When you do a Get against the entity you get a ETag: value
in the response header.
Add a request header value to your Put request with If-Match: value
to make sure you update the latest version.
Example. If-Match: ABC123
Body parameter
{
"Name": "string",
"EmployeeCount": 0,
"CustomerNumber": "string",
"OrganisationalNumber": "string",
"CorporateGroup": "string",
"Unit": {
"Key": "string",
"CodeGroupKey": "string"
},
"Branch": {
"Key": "string",
"CodeGroupKey": "string"
},
"OwnBranch": {
"Key": "string",
"CodeGroupKey": "string"
},
"ServiceGrade": {
"Key": "string",
"CodeGroupKey": "string"
},
"UnitType": {
"Key": "string",
"CodeGroupKey": "string"
},
"Active": true,
"Segment": {
"Key": "string",
"CodeGroupKey": "string"
},
"SubSegment": {
"Key": "string",
"CodeGroupKey": "string"
},
"Rating": {
"Key": "string",
"CodeGroupKey": "string"
},
"Status": {
"Key": "string",
"CodeGroupKey": "string"
},
"Region": {
"Key": "string",
"CodeGroupKey": "string"
},
"Type": {
"Key": "string",
"CodeGroupKey": "string"
},
"Category": {
"Key": "string",
"CodeGroupKey": "string"
},
"EmployeeCountRange": {
"Key": "string",
"CodeGroupKey": "string"
},
"PrimaryEmailAddress": "string",
"PrimaryPhoneNumber": "string",
"WebSite": "string",
"PrimaryAddressRow": "string",
"PrimaryCity": "string",
"PrimaryZipCode": "string",
"PrimaryCounty": "string",
"PrimaryCountryId": [
0
],
"PrimaryCommunicationCategory": "unknown",
"Longitude": 0.1,
"Latitude": 0.1,
"UnitNo": "string",
"Id": "00000000-0000-0000-0000-000000000000"
}
Name: string
EmployeeCount: 0
CustomerNumber: string
OrganisationalNumber: string
CorporateGroup: string
Unit:
Key: string
CodeGroupKey: string
Branch:
Key: string
CodeGroupKey: string
OwnBranch:
Key: string
CodeGroupKey: string
ServiceGrade:
Key: string
CodeGroupKey: string
UnitType:
Key: string
CodeGroupKey: string
Active: true
Segment:
Key: string
CodeGroupKey: string
SubSegment:
Key: string
CodeGroupKey: string
Rating:
Key: string
CodeGroupKey: string
Status:
Key: string
CodeGroupKey: string
Region:
Key: string
CodeGroupKey: string
Type:
Key: string
CodeGroupKey: string
Category:
Key: string
CodeGroupKey: string
EmployeeCountRange:
Key: string
CodeGroupKey: string
PrimaryEmailAddress: string
PrimaryPhoneNumber: string
WebSite: string
PrimaryAddressRow: string
PrimaryCity: string
PrimaryZipCode: string
PrimaryCounty: string
PrimaryCountryId:
- 0
PrimaryCommunicationCategory: unknown
Longitude: 0.1
Latitude: 0.1
UnitNo: string
Id: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<Company>
<Name>string</Name>
<EmployeeCount>0</EmployeeCount>
<CustomerNumber>string</CustomerNumber>
<OrganisationalNumber>string</OrganisationalNumber>
<CorporateGroup>string</CorporateGroup>
<Unit>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Unit>
<Branch>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Branch>
<OwnBranch>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</OwnBranch>
<ServiceGrade>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</ServiceGrade>
<UnitType>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</UnitType>
<Active>true</Active>
<Segment>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Segment>
<SubSegment>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</SubSegment>
<Rating>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Rating>
<Status>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Status>
<Region>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Region>
<Type>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Type>
<Category>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Category>
<EmployeeCountRange>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</EmployeeCountRange>
<PrimaryEmailAddress>string</PrimaryEmailAddress>
<PrimaryPhoneNumber>string</PrimaryPhoneNumber>
<WebSite>string</WebSite>
<PrimaryAddressRow>string</PrimaryAddressRow>
<PrimaryCity>string</PrimaryCity>
<PrimaryZipCode>string</PrimaryZipCode>
<PrimaryCounty>string</PrimaryCounty>
<PrimaryCountryId>0</PrimaryCountryId>
<PrimaryCommunicationCategory>unknown</PrimaryCommunicationCategory>
<Longitude>0.1</Longitude>
<Latitude>0.1</Latitude>
<UnitNo>string</UnitNo>
<Id>00000000-0000-0000-0000-000000000000</Id>
</Company>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | Company | true | none |
Example responses
200 Response
{
"Name": "string",
"EmployeeCount": 0,
"CustomerNumber": "string",
"OrganisationalNumber": "string",
"CorporateGroup": "string",
"Unit": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Branch": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"OwnBranch": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"ServiceGrade": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"UnitType": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Active": true,
"Segment": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"SubSegment": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Rating": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Status": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Region": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Type": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Category": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"EmployeeCountRange": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"PrimaryEmailAddress": "string",
"PrimaryPhoneNumber": "string",
"WebSite": "string",
"PrimaryAddress": "string",
"PrimaryAddressRow1": "string",
"PrimaryAddressRow2": "string",
"PrimaryAddressRow": "string",
"PrimaryCity": "string",
"PrimaryZipCode": "string",
"PrimaryCounty": "string",
"IsNew": true,
"PrimaryCountryId": [
0
],
"PrimaryCommunicationCategory": "unknown",
"CreatedBy": "string",
"UpdatedBy": "string",
"Responsible": "string",
"HasDocument": true,
"TagCount": 0,
"Longitude": 0.1,
"Latitude": 0.1,
"LoginStatus": "noLogin",
"UnitNo": "string",
"Id": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<Company>
<Name>string</Name>
<EmployeeCount>0</EmployeeCount>
<CustomerNumber>string</CustomerNumber>
<OrganisationalNumber>string</OrganisationalNumber>
<CorporateGroup>string</CorporateGroup>
<Unit>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Unit>
<Branch>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Branch>
<OwnBranch>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</OwnBranch>
<ServiceGrade>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</ServiceGrade>
<UnitType>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</UnitType>
<Active>true</Active>
<Segment>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Segment>
<SubSegment>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</SubSegment>
<Rating>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Rating>
<Status>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Status>
<Region>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Region>
<Type>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Type>
<Category>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Category>
<EmployeeCountRange>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</EmployeeCountRange>
<PrimaryEmailAddress>string</PrimaryEmailAddress>
<PrimaryPhoneNumber>string</PrimaryPhoneNumber>
<WebSite>string</WebSite>
<PrimaryAddress>string</PrimaryAddress>
<PrimaryAddressRow1>string</PrimaryAddressRow1>
<PrimaryAddressRow2>string</PrimaryAddressRow2>
<PrimaryAddressRow>string</PrimaryAddressRow>
<PrimaryCity>string</PrimaryCity>
<PrimaryZipCode>string</PrimaryZipCode>
<PrimaryCounty>string</PrimaryCounty>
<IsNew>true</IsNew>
<PrimaryCountryId>0</PrimaryCountryId>
<PrimaryCommunicationCategory>unknown</PrimaryCommunicationCategory>
<CreatedBy>string</CreatedBy>
<UpdatedBy>string</UpdatedBy>
<Responsible>string</Responsible>
<HasDocument>true</HasDocument>
<TagCount>0</TagCount>
<Longitude>0.1</Longitude>
<Latitude>0.1</Latitude>
<LoginStatus>noLogin</LoginStatus>
<UnitNo>string</UnitNo>
<Id>00000000-0000-0000-0000-000000000000</Id>
</Company>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Entity Updated | Company |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
412 | Precondition Failed | Etag missmatch | None |
500 | Internal Server Error | InternalServerError | None |
Create Company
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Name":"string","EmployeeCount":0,"CustomerNumber":"string","OrganisationalNumber":"string","CorporateGroup":"string","Unit":{"Key":"string","CodeGroupKey":"string"},"Branch":{"Key":"string","CodeGroupKey":"string"},"OwnBranch":{"Key":"string","CodeGroupKey":"string"},"ServiceGrade":{"Key":"string","CodeGroupKey":"string"},"UnitType":{"Key":"string","CodeGroupKey":"string"},"Active":true,"Segment":{"Key":"string","CodeGroupKey":"string"},"SubSegment":{"Key":"string","CodeGroupKey":"string"},"Rating":{"Key":"string","CodeGroupKey":"string"},"Status":{"Key":"string","CodeGroupKey":"string"},"Region":{"Key":"string","CodeGroupKey":"string"},"Type":{"Key":"string","CodeGroupKey":"string"},"Category":{"Key":"string","CodeGroupKey":"string"},"EmployeeCountRange":{"Key":"string","CodeGroupKey":"string"},"PrimaryEmailAddress":"string","PrimaryPhoneNumber":"string","WebSite":"string","PrimaryAddressRow":"string","PrimaryCity":"string","PrimaryZipCode":"string","PrimaryCounty":"string","PrimaryCountryId":[0],"PrimaryCommunicationCategory":"unknown","Longitude":0.1,"Latitude":0.1,"UnitNo":"string","Id":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Name\":\"string\",\"EmployeeCount\":0,\"CustomerNumber\":\"string\",\"OrganisationalNumber\":\"string\",\"CorporateGroup\":\"string\",\"Unit\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Branch\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"OwnBranch\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"ServiceGrade\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"UnitType\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Active\":true,\"Segment\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"SubSegment\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Rating\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Status\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Region\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Type\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Category\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"EmployeeCountRange\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"PrimaryEmailAddress\":\"string\",\"PrimaryPhoneNumber\":\"string\",\"WebSite\":\"string\",\"PrimaryAddressRow\":\"string\",\"PrimaryCity\":\"string\",\"PrimaryZipCode\":\"string\",\"PrimaryCounty\":\"string\",\"PrimaryCountryId\":[0],\"PrimaryCommunicationCategory\":\"unknown\",\"Longitude\":0.1,\"Latitude\":0.1,\"UnitNo\":\"string\",\"Id\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Name\":\"string\",\"EmployeeCount\":0,\"CustomerNumber\":\"string\",\"OrganisationalNumber\":\"string\",\"CorporateGroup\":\"string\",\"Unit\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Branch\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"OwnBranch\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"ServiceGrade\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"UnitType\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Active\":true,\"Segment\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"SubSegment\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Rating\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Status\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Region\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Type\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"Category\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"EmployeeCountRange\":{\"Key\":\"string\",\"CodeGroupKey\":\"string\"},\"PrimaryEmailAddress\":\"string\",\"PrimaryPhoneNumber\":\"string\",\"WebSite\":\"string\",\"PrimaryAddressRow\":\"string\",\"PrimaryCity\":\"string\",\"PrimaryZipCode\":\"string\",\"PrimaryCounty\":\"string\",\"PrimaryCountryId\":[0],\"PrimaryCommunicationCategory\":\"unknown\",\"Longitude\":0.1,\"Latitude\":0.1,\"UnitNo\":\"string\",\"Id\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company
Body parameter
{
"Name": "string",
"EmployeeCount": 0,
"CustomerNumber": "string",
"OrganisationalNumber": "string",
"CorporateGroup": "string",
"Unit": {
"Key": "string",
"CodeGroupKey": "string"
},
"Branch": {
"Key": "string",
"CodeGroupKey": "string"
},
"OwnBranch": {
"Key": "string",
"CodeGroupKey": "string"
},
"ServiceGrade": {
"Key": "string",
"CodeGroupKey": "string"
},
"UnitType": {
"Key": "string",
"CodeGroupKey": "string"
},
"Active": true,
"Segment": {
"Key": "string",
"CodeGroupKey": "string"
},
"SubSegment": {
"Key": "string",
"CodeGroupKey": "string"
},
"Rating": {
"Key": "string",
"CodeGroupKey": "string"
},
"Status": {
"Key": "string",
"CodeGroupKey": "string"
},
"Region": {
"Key": "string",
"CodeGroupKey": "string"
},
"Type": {
"Key": "string",
"CodeGroupKey": "string"
},
"Category": {
"Key": "string",
"CodeGroupKey": "string"
},
"EmployeeCountRange": {
"Key": "string",
"CodeGroupKey": "string"
},
"PrimaryEmailAddress": "string",
"PrimaryPhoneNumber": "string",
"WebSite": "string",
"PrimaryAddressRow": "string",
"PrimaryCity": "string",
"PrimaryZipCode": "string",
"PrimaryCounty": "string",
"PrimaryCountryId": [
0
],
"PrimaryCommunicationCategory": "unknown",
"Longitude": 0.1,
"Latitude": 0.1,
"UnitNo": "string",
"Id": "00000000-0000-0000-0000-000000000000"
}
Name: string
EmployeeCount: 0
CustomerNumber: string
OrganisationalNumber: string
CorporateGroup: string
Unit:
Key: string
CodeGroupKey: string
Branch:
Key: string
CodeGroupKey: string
OwnBranch:
Key: string
CodeGroupKey: string
ServiceGrade:
Key: string
CodeGroupKey: string
UnitType:
Key: string
CodeGroupKey: string
Active: true
Segment:
Key: string
CodeGroupKey: string
SubSegment:
Key: string
CodeGroupKey: string
Rating:
Key: string
CodeGroupKey: string
Status:
Key: string
CodeGroupKey: string
Region:
Key: string
CodeGroupKey: string
Type:
Key: string
CodeGroupKey: string
Category:
Key: string
CodeGroupKey: string
EmployeeCountRange:
Key: string
CodeGroupKey: string
PrimaryEmailAddress: string
PrimaryPhoneNumber: string
WebSite: string
PrimaryAddressRow: string
PrimaryCity: string
PrimaryZipCode: string
PrimaryCounty: string
PrimaryCountryId:
- 0
PrimaryCommunicationCategory: unknown
Longitude: 0.1
Latitude: 0.1
UnitNo: string
Id: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<Company>
<Name>string</Name>
<EmployeeCount>0</EmployeeCount>
<CustomerNumber>string</CustomerNumber>
<OrganisationalNumber>string</OrganisationalNumber>
<CorporateGroup>string</CorporateGroup>
<Unit>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Unit>
<Branch>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Branch>
<OwnBranch>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</OwnBranch>
<ServiceGrade>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</ServiceGrade>
<UnitType>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</UnitType>
<Active>true</Active>
<Segment>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Segment>
<SubSegment>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</SubSegment>
<Rating>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Rating>
<Status>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Status>
<Region>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Region>
<Type>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Type>
<Category>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</Category>
<EmployeeCountRange>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
</EmployeeCountRange>
<PrimaryEmailAddress>string</PrimaryEmailAddress>
<PrimaryPhoneNumber>string</PrimaryPhoneNumber>
<WebSite>string</WebSite>
<PrimaryAddressRow>string</PrimaryAddressRow>
<PrimaryCity>string</PrimaryCity>
<PrimaryZipCode>string</PrimaryZipCode>
<PrimaryCounty>string</PrimaryCounty>
<PrimaryCountryId>0</PrimaryCountryId>
<PrimaryCommunicationCategory>unknown</PrimaryCommunicationCategory>
<Longitude>0.1</Longitude>
<Latitude>0.1</Latitude>
<UnitNo>string</UnitNo>
<Id>00000000-0000-0000-0000-000000000000</Id>
</Company>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | Company | true | none |
Example responses
201 Response
{
"Name": "string",
"EmployeeCount": 0,
"CustomerNumber": "string",
"OrganisationalNumber": "string",
"CorporateGroup": "string",
"Unit": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Branch": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"OwnBranch": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"ServiceGrade": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"UnitType": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Active": true,
"Segment": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"SubSegment": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Rating": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Status": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Region": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Type": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"Category": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"EmployeeCountRange": {
"Key": "string",
"CodeGroupKey": "string",
"Caption": "string",
"Active": true
},
"PrimaryEmailAddress": "string",
"PrimaryPhoneNumber": "string",
"WebSite": "string",
"PrimaryAddress": "string",
"PrimaryAddressRow1": "string",
"PrimaryAddressRow2": "string",
"PrimaryAddressRow": "string",
"PrimaryCity": "string",
"PrimaryZipCode": "string",
"PrimaryCounty": "string",
"IsNew": true,
"PrimaryCountryId": [
0
],
"PrimaryCommunicationCategory": "unknown",
"CreatedBy": "string",
"UpdatedBy": "string",
"Responsible": "string",
"HasDocument": true,
"TagCount": 0,
"Longitude": 0.1,
"Latitude": 0.1,
"LoginStatus": "noLogin",
"UnitNo": "string",
"Id": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<Company>
<Name>string</Name>
<EmployeeCount>0</EmployeeCount>
<CustomerNumber>string</CustomerNumber>
<OrganisationalNumber>string</OrganisationalNumber>
<CorporateGroup>string</CorporateGroup>
<Unit>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Unit>
<Branch>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Branch>
<OwnBranch>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</OwnBranch>
<ServiceGrade>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</ServiceGrade>
<UnitType>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</UnitType>
<Active>true</Active>
<Segment>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Segment>
<SubSegment>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</SubSegment>
<Rating>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Rating>
<Status>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Status>
<Region>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Region>
<Type>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Type>
<Category>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</Category>
<EmployeeCountRange>
<Key>string</Key>
<CodeGroupKey>string</CodeGroupKey>
<Caption>string</Caption>
<Active>true</Active>
</EmployeeCountRange>
<PrimaryEmailAddress>string</PrimaryEmailAddress>
<PrimaryPhoneNumber>string</PrimaryPhoneNumber>
<WebSite>string</WebSite>
<PrimaryAddress>string</PrimaryAddress>
<PrimaryAddressRow1>string</PrimaryAddressRow1>
<PrimaryAddressRow2>string</PrimaryAddressRow2>
<PrimaryAddressRow>string</PrimaryAddressRow>
<PrimaryCity>string</PrimaryCity>
<PrimaryZipCode>string</PrimaryZipCode>
<PrimaryCounty>string</PrimaryCounty>
<IsNew>true</IsNew>
<PrimaryCountryId>0</PrimaryCountryId>
<PrimaryCommunicationCategory>unknown</PrimaryCommunicationCategory>
<CreatedBy>string</CreatedBy>
<UpdatedBy>string</UpdatedBy>
<Responsible>string</Responsible>
<HasDocument>true</HasDocument>
<TagCount>0</TagCount>
<Longitude>0.1</Longitude>
<Latitude>0.1</Latitude>
<LoginStatus>noLogin</LoginStatus>
<UnitNo>string</UnitNo>
<Id>00000000-0000-0000-0000-000000000000</Id>
</Company>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
201 | Created | Entity Created | Company |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
409 | Conflict | Entity with same Id already exist | None |
500 | Internal Server Error | InternalServerError | None |
Get tags valid for Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/Tags \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/Tags", {
"method": "GET",
"headers": {
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/Tags");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/Tags
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
500 | Internal Server Error | InternalServerError | None |
Get tags connected to Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/string/Documents \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/string/Documents", {
"method": "GET",
"headers": {
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Documents");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/{id}/Documents
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
500 | Internal Server Error | InternalServerError | None |
Company Relations
Relations related to Company
Filter PrivatePersons based on fields and their type
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/PrivatePersons/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"take":1,"skip":0,"sort":[{"field":"string","dir":"string"}],"filter":{"field":"string","operator":"string","value":{},"logic":"string","filters":[{}]}}'
fetch("https://testing.sweetsystems.se/api/Company/string/PrivatePersons/Filter", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/PrivatePersons/Filter");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/PrivatePersons/Filter
Body parameter
{
"take": 1,
"skip": 0,
"sort": [
{
"field": "string",
"dir": "string"
}
],
"filter": {
"field": "string",
"operator": "string",
"value": {},
"logic": "string",
"filters": [
{}
]
}
}
take: 1
skip: 0
sort:
- field: string
dir: string
filter:
field: string
operator: string
value: {}
logic: string
filters:
- {}
<?xml version="1.0" encoding="UTF-8" ?>
<DataSourceRequest>
<take>1</take>
<skip>0</skip>
<sort>
<field>string</field>
<dir>string</dir>
</sort>
<filter>
<field>string</field>
<operator>string</operator>
<value/>
<logic>string</logic>
<filters/>
</filter>
</DataSourceRequest>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | DataSourceRequest | true | none |
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Retreive filtrable fields and their type for PrivatePersons related to Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/PrivatePersons/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/PrivatePersons/Filter", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/PrivatePersons/Filter");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/PrivatePersons/Filter
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Updates the relation to PrivatePerson
Code samples
curl --request PUT \
--url https://testing.sweetsystems.se/api/Company/string/PrivatePersons \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/PrivatePersons", {
"method": "PUT",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/PrivatePersons");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
PUT /Company/{id}/PrivatePersons
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyPrivatePersonRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyPrivatePersonRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | CompanyPrivatePersonRelation | true | none |
Example responses
200 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyPrivatePersonRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyPrivatePersonRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Entity Updated | CompanyPrivatePersonRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
412 | Precondition Failed | Etag missmatch | None |
500 | Internal Server Error | InternalServerError | None |
Create new relation to PrivatePerson
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/PrivatePersons \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/PrivatePersons", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/PrivatePersons");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/PrivatePersons
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyPrivatePersonRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyPrivatePersonRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | CompanyPrivatePersonRelation | true | none |
Example responses
201 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyPrivatePersonRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyPrivatePersonRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
201 | Created | Entity Created | CompanyPrivatePersonRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
409 | Conflict | Entity with same Id already exist | None |
500 | Internal Server Error | InternalServerError | None |
Delete PrivatePerson relation by it’s Id
Code samples
curl --request DELETE \
--url https://testing.sweetsystems.se/api/Company/string/PrivatePersons/string \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/string/PrivatePersons/string", {
"method": "DELETE",
"headers": {
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/PrivatePersons/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
DELETE /Company/{id}/PrivatePersons/{idOfRelation}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
idOfRelation | path | string | true | none |
id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
204 | No Content | Success | None |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
500 | Internal Server Error | InternalServerError | None |
Filter CorporatePersons based on fields and their type
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/CorporatePersons/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"take":1,"skip":0,"sort":[{"field":"string","dir":"string"}],"filter":{"field":"string","operator":"string","value":{},"logic":"string","filters":[{}]}}'
fetch("https://testing.sweetsystems.se/api/Company/string/CorporatePersons/Filter", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/CorporatePersons/Filter");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/CorporatePersons/Filter
Body parameter
{
"take": 1,
"skip": 0,
"sort": [
{
"field": "string",
"dir": "string"
}
],
"filter": {
"field": "string",
"operator": "string",
"value": {},
"logic": "string",
"filters": [
{}
]
}
}
take: 1
skip: 0
sort:
- field: string
dir: string
filter:
field: string
operator: string
value: {}
logic: string
filters:
- {}
<?xml version="1.0" encoding="UTF-8" ?>
<DataSourceRequest>
<take>1</take>
<skip>0</skip>
<sort>
<field>string</field>
<dir>string</dir>
</sort>
<filter>
<field>string</field>
<operator>string</operator>
<value/>
<logic>string</logic>
<filters/>
</filter>
</DataSourceRequest>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | DataSourceRequest | true | none |
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Retreive filtrable fields and their type for CorporatePersons related to Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/CorporatePersons/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/CorporatePersons/Filter", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/CorporatePersons/Filter");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/CorporatePersons/Filter
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Updates the relation to CorporatePerson
Code samples
curl --request PUT \
--url https://testing.sweetsystems.se/api/Company/string/CorporatePersons \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/CorporatePersons", {
"method": "PUT",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/CorporatePersons");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
PUT /Company/{id}/CorporatePersons
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyCorporatePersonRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyCorporatePersonRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | CompanyCorporatePersonRelation | true | none |
Example responses
200 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyCorporatePersonRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyCorporatePersonRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Entity Updated | CompanyCorporatePersonRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
412 | Precondition Failed | Etag missmatch | None |
500 | Internal Server Error | InternalServerError | None |
Create new relation to CorporatePerson
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/CorporatePersons \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/CorporatePersons", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/CorporatePersons");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/CorporatePersons
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyCorporatePersonRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyCorporatePersonRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | CompanyCorporatePersonRelation | true | none |
Example responses
201 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyCorporatePersonRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyCorporatePersonRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
201 | Created | Entity Created | CompanyCorporatePersonRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
409 | Conflict | Entity with same Id already exist | None |
500 | Internal Server Error | InternalServerError | None |
Delete CorporatePerson relation by it’s Id
Code samples
curl --request DELETE \
--url https://testing.sweetsystems.se/api/Company/string/CorporatePersons/string \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/string/CorporatePersons/string", {
"method": "DELETE",
"headers": {
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/CorporatePersons/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
DELETE /Company/{id}/CorporatePersons/{idOfRelation}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
idOfRelation | path | string | true | none |
id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
204 | No Content | Success | None |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
500 | Internal Server Error | InternalServerError | None |
Filter RelatedToCompanies based on fields and their type
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/RelatedToCompanies/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"take":1,"skip":0,"sort":[{"field":"string","dir":"string"}],"filter":{"field":"string","operator":"string","value":{},"logic":"string","filters":[{}]}}'
fetch("https://testing.sweetsystems.se/api/Company/string/RelatedToCompanies/Filter", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/RelatedToCompanies/Filter");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/RelatedToCompanies/Filter
Body parameter
{
"take": 1,
"skip": 0,
"sort": [
{
"field": "string",
"dir": "string"
}
],
"filter": {
"field": "string",
"operator": "string",
"value": {},
"logic": "string",
"filters": [
{}
]
}
}
take: 1
skip: 0
sort:
- field: string
dir: string
filter:
field: string
operator: string
value: {}
logic: string
filters:
- {}
<?xml version="1.0" encoding="UTF-8" ?>
<DataSourceRequest>
<take>1</take>
<skip>0</skip>
<sort>
<field>string</field>
<dir>string</dir>
</sort>
<filter>
<field>string</field>
<operator>string</operator>
<value/>
<logic>string</logic>
<filters/>
</filter>
</DataSourceRequest>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | DataSourceRequest | true | none |
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Retreive filtrable fields and their type for RelatedToCompanies related to Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/RelatedToCompanies/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/RelatedToCompanies/Filter", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/RelatedToCompanies/Filter");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/RelatedToCompanies/Filter
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Filter RelatedFromCompanies based on fields and their type
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/RelatedFromCompanies/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"take":1,"skip":0,"sort":[{"field":"string","dir":"string"}],"filter":{"field":"string","operator":"string","value":{},"logic":"string","filters":[{}]}}'
fetch("https://testing.sweetsystems.se/api/Company/string/RelatedFromCompanies/Filter", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/RelatedFromCompanies/Filter");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/RelatedFromCompanies/Filter
Body parameter
{
"take": 1,
"skip": 0,
"sort": [
{
"field": "string",
"dir": "string"
}
],
"filter": {
"field": "string",
"operator": "string",
"value": {},
"logic": "string",
"filters": [
{}
]
}
}
take: 1
skip: 0
sort:
- field: string
dir: string
filter:
field: string
operator: string
value: {}
logic: string
filters:
- {}
<?xml version="1.0" encoding="UTF-8" ?>
<DataSourceRequest>
<take>1</take>
<skip>0</skip>
<sort>
<field>string</field>
<dir>string</dir>
</sort>
<filter>
<field>string</field>
<operator>string</operator>
<value/>
<logic>string</logic>
<filters/>
</filter>
</DataSourceRequest>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | DataSourceRequest | true | none |
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Retreive filtrable fields and their type for RelatedFromCompanies related to Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/RelatedFromCompanies/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/RelatedFromCompanies/Filter", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/RelatedFromCompanies/Filter");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/RelatedFromCompanies/Filter
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Filter Groups based on fields and their type
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/Groups/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"take":1,"skip":0,"sort":[{"field":"string","dir":"string"}],"filter":{"field":"string","operator":"string","value":{},"logic":"string","filters":[{}]}}'
fetch("https://testing.sweetsystems.se/api/Company/string/Groups/Filter", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Groups/Filter");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/Groups/Filter
Body parameter
{
"take": 1,
"skip": 0,
"sort": [
{
"field": "string",
"dir": "string"
}
],
"filter": {
"field": "string",
"operator": "string",
"value": {},
"logic": "string",
"filters": [
{}
]
}
}
take: 1
skip: 0
sort:
- field: string
dir: string
filter:
field: string
operator: string
value: {}
logic: string
filters:
- {}
<?xml version="1.0" encoding="UTF-8" ?>
<DataSourceRequest>
<take>1</take>
<skip>0</skip>
<sort>
<field>string</field>
<dir>string</dir>
</sort>
<filter>
<field>string</field>
<operator>string</operator>
<value/>
<logic>string</logic>
<filters/>
</filter>
</DataSourceRequest>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | DataSourceRequest | true | none |
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Retreive filtrable fields and their type for Groups related to Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/Groups/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/Groups/Filter", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/Groups/Filter");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/Groups/Filter
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Updates the relation to CompanyGroup
Code samples
curl --request PUT \
--url https://testing.sweetsystems.se/api/Company/string/Groups \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/Groups", {
"method": "PUT",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Groups");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
PUT /Company/{id}/Groups
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyCompanyGroupRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyCompanyGroupRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | CompanyCompanyGroupRelation | true | none |
Example responses
200 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyCompanyGroupRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyCompanyGroupRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Entity Updated | CompanyCompanyGroupRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
412 | Precondition Failed | Etag missmatch | None |
500 | Internal Server Error | InternalServerError | None |
Create new relation to CompanyGroup
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/Groups \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/Groups", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Groups");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/Groups
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyCompanyGroupRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyCompanyGroupRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | CompanyCompanyGroupRelation | true | none |
Example responses
201 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyCompanyGroupRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyCompanyGroupRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
201 | Created | Entity Created | CompanyCompanyGroupRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
409 | Conflict | Entity with same Id already exist | None |
500 | Internal Server Error | InternalServerError | None |
Delete CompanyGroup relation by it’s Id
Code samples
curl --request DELETE \
--url https://testing.sweetsystems.se/api/Company/string/Groups/string \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/string/Groups/string", {
"method": "DELETE",
"headers": {
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Groups/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
DELETE /Company/{id}/Groups/{idOfRelation}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
idOfRelation | path | string | true | none |
id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
204 | No Content | Success | None |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
500 | Internal Server Error | InternalServerError | None |
Filter MarketingProjects based on fields and their type
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/MarketingProjects/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"take":1,"skip":0,"sort":[{"field":"string","dir":"string"}],"filter":{"field":"string","operator":"string","value":{},"logic":"string","filters":[{}]}}'
fetch("https://testing.sweetsystems.se/api/Company/string/MarketingProjects/Filter", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/MarketingProjects/Filter");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/MarketingProjects/Filter
Body parameter
{
"take": 1,
"skip": 0,
"sort": [
{
"field": "string",
"dir": "string"
}
],
"filter": {
"field": "string",
"operator": "string",
"value": {},
"logic": "string",
"filters": [
{}
]
}
}
take: 1
skip: 0
sort:
- field: string
dir: string
filter:
field: string
operator: string
value: {}
logic: string
filters:
- {}
<?xml version="1.0" encoding="UTF-8" ?>
<DataSourceRequest>
<take>1</take>
<skip>0</skip>
<sort>
<field>string</field>
<dir>string</dir>
</sort>
<filter>
<field>string</field>
<operator>string</operator>
<value/>
<logic>string</logic>
<filters/>
</filter>
</DataSourceRequest>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | DataSourceRequest | true | none |
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Retreive filtrable fields and their type for MarketingProjects related to Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/MarketingProjects/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/MarketingProjects/Filter", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/MarketingProjects/Filter");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/MarketingProjects/Filter
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Updates the relation to MarketingProject
Code samples
curl --request PUT \
--url https://testing.sweetsystems.se/api/Company/string/MarketingProjects \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/MarketingProjects", {
"method": "PUT",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/MarketingProjects");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
PUT /Company/{id}/MarketingProjects
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyMarketingProjectRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyMarketingProjectRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | CompanyMarketingProjectRelation | true | none |
Example responses
200 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyMarketingProjectRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyMarketingProjectRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Entity Updated | CompanyMarketingProjectRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
412 | Precondition Failed | Etag missmatch | None |
500 | Internal Server Error | InternalServerError | None |
Create new relation to MarketingProject
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/MarketingProjects \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/MarketingProjects", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/MarketingProjects");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/MarketingProjects
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyMarketingProjectRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyMarketingProjectRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | CompanyMarketingProjectRelation | true | none |
Example responses
201 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyMarketingProjectRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyMarketingProjectRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
201 | Created | Entity Created | CompanyMarketingProjectRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
409 | Conflict | Entity with same Id already exist | None |
500 | Internal Server Error | InternalServerError | None |
Delete MarketingProject relation by it’s Id
Code samples
curl --request DELETE \
--url https://testing.sweetsystems.se/api/Company/string/MarketingProjects/string \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/string/MarketingProjects/string", {
"method": "DELETE",
"headers": {
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/MarketingProjects/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
DELETE /Company/{id}/MarketingProjects/{idOfRelation}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
idOfRelation | path | string | true | none |
id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
204 | No Content | Success | None |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
500 | Internal Server Error | InternalServerError | None |
Filter Cases based on fields and their type
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/Cases/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"take":1,"skip":0,"sort":[{"field":"string","dir":"string"}],"filter":{"field":"string","operator":"string","value":{},"logic":"string","filters":[{}]}}'
fetch("https://testing.sweetsystems.se/api/Company/string/Cases/Filter", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Cases/Filter");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/Cases/Filter
Body parameter
{
"take": 1,
"skip": 0,
"sort": [
{
"field": "string",
"dir": "string"
}
],
"filter": {
"field": "string",
"operator": "string",
"value": {},
"logic": "string",
"filters": [
{}
]
}
}
take: 1
skip: 0
sort:
- field: string
dir: string
filter:
field: string
operator: string
value: {}
logic: string
filters:
- {}
<?xml version="1.0" encoding="UTF-8" ?>
<DataSourceRequest>
<take>1</take>
<skip>0</skip>
<sort>
<field>string</field>
<dir>string</dir>
</sort>
<filter>
<field>string</field>
<operator>string</operator>
<value/>
<logic>string</logic>
<filters/>
</filter>
</DataSourceRequest>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | DataSourceRequest | true | none |
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Retreive filtrable fields and their type for Cases related to Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/Cases/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/Cases/Filter", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/Cases/Filter");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/Cases/Filter
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Updates the relation to Case
Code samples
curl --request PUT \
--url https://testing.sweetsystems.se/api/Company/string/Cases \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/Cases", {
"method": "PUT",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Cases");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
PUT /Company/{id}/Cases
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyCaseRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyCaseRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | CompanyCaseRelation | true | none |
Example responses
200 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyCaseRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyCaseRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Entity Updated | CompanyCaseRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
412 | Precondition Failed | Etag missmatch | None |
500 | Internal Server Error | InternalServerError | None |
Create new relation to Case
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/Cases \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/Cases", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Cases");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/Cases
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyCaseRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyCaseRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | CompanyCaseRelation | true | none |
Example responses
201 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyCaseRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyCaseRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
201 | Created | Entity Created | CompanyCaseRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
409 | Conflict | Entity with same Id already exist | None |
500 | Internal Server Error | InternalServerError | None |
Delete Case relation by it’s Id
Code samples
curl --request DELETE \
--url https://testing.sweetsystems.se/api/Company/string/Cases/string \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/string/Cases/string", {
"method": "DELETE",
"headers": {
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Cases/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
DELETE /Company/{id}/Cases/{idOfRelation}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
idOfRelation | path | string | true | none |
id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
204 | No Content | Success | None |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
500 | Internal Server Error | InternalServerError | None |
Filter Products based on fields and their type
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/Products/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"take":1,"skip":0,"sort":[{"field":"string","dir":"string"}],"filter":{"field":"string","operator":"string","value":{},"logic":"string","filters":[{}]}}'
fetch("https://testing.sweetsystems.se/api/Company/string/Products/Filter", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Products/Filter");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/Products/Filter
Body parameter
{
"take": 1,
"skip": 0,
"sort": [
{
"field": "string",
"dir": "string"
}
],
"filter": {
"field": "string",
"operator": "string",
"value": {},
"logic": "string",
"filters": [
{}
]
}
}
take: 1
skip: 0
sort:
- field: string
dir: string
filter:
field: string
operator: string
value: {}
logic: string
filters:
- {}
<?xml version="1.0" encoding="UTF-8" ?>
<DataSourceRequest>
<take>1</take>
<skip>0</skip>
<sort>
<field>string</field>
<dir>string</dir>
</sort>
<filter>
<field>string</field>
<operator>string</operator>
<value/>
<logic>string</logic>
<filters/>
</filter>
</DataSourceRequest>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | DataSourceRequest | true | none |
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Retreive filtrable fields and their type for Products related to Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/Products/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/Products/Filter", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/Products/Filter");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/Products/Filter
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Updates the relation to Product
Code samples
curl --request PUT \
--url https://testing.sweetsystems.se/api/Company/string/Products \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/Products", {
"method": "PUT",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Products");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
PUT /Company/{id}/Products
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyProductRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyProductRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | CompanyProductRelation | true | none |
Example responses
200 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyProductRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyProductRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Entity Updated | CompanyProductRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
412 | Precondition Failed | Etag missmatch | None |
500 | Internal Server Error | InternalServerError | None |
Create new relation to Product
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/Products \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/Products", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Products");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/Products
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyProductRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyProductRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | CompanyProductRelation | true | none |
Example responses
201 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<CompanyProductRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</CompanyProductRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
201 | Created | Entity Created | CompanyProductRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
409 | Conflict | Entity with same Id already exist | None |
500 | Internal Server Error | InternalServerError | None |
Delete Product relation by it’s Id
Code samples
curl --request DELETE \
--url https://testing.sweetsystems.se/api/Company/string/Products/string \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/string/Products/string", {
"method": "DELETE",
"headers": {
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Products/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
DELETE /Company/{id}/Products/{idOfRelation}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
idOfRelation | path | string | true | none |
id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
204 | No Content | Success | None |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
500 | Internal Server Error | InternalServerError | None |
Filter Responsibles based on fields and their type
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/Responsibles/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"take":1,"skip":0,"sort":[{"field":"string","dir":"string"}],"filter":{"field":"string","operator":"string","value":{},"logic":"string","filters":[{}]}}'
fetch("https://testing.sweetsystems.se/api/Company/string/Responsibles/Filter", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Responsibles/Filter");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/Responsibles/Filter
Body parameter
{
"take": 1,
"skip": 0,
"sort": [
{
"field": "string",
"dir": "string"
}
],
"filter": {
"field": "string",
"operator": "string",
"value": {},
"logic": "string",
"filters": [
{}
]
}
}
take: 1
skip: 0
sort:
- field: string
dir: string
filter:
field: string
operator: string
value: {}
logic: string
filters:
- {}
<?xml version="1.0" encoding="UTF-8" ?>
<DataSourceRequest>
<take>1</take>
<skip>0</skip>
<sort>
<field>string</field>
<dir>string</dir>
</sort>
<filter>
<field>string</field>
<operator>string</operator>
<value/>
<logic>string</logic>
<filters/>
</filter>
</DataSourceRequest>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | DataSourceRequest | true | none |
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Retreive filtrable fields and their type for Responsibles related to Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/Responsibles/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/Responsibles/Filter", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/Responsibles/Filter");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/Responsibles/Filter
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Filter Activities based on fields and their type
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/Activities/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"take":1,"skip":0,"sort":[{"field":"string","dir":"string"}],"filter":{"field":"string","operator":"string","value":{},"logic":"string","filters":[{}]}}'
fetch("https://testing.sweetsystems.se/api/Company/string/Activities/Filter", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Activities/Filter");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/Activities/Filter
Body parameter
{
"take": 1,
"skip": 0,
"sort": [
{
"field": "string",
"dir": "string"
}
],
"filter": {
"field": "string",
"operator": "string",
"value": {},
"logic": "string",
"filters": [
{}
]
}
}
take: 1
skip: 0
sort:
- field: string
dir: string
filter:
field: string
operator: string
value: {}
logic: string
filters:
- {}
<?xml version="1.0" encoding="UTF-8" ?>
<DataSourceRequest>
<take>1</take>
<skip>0</skip>
<sort>
<field>string</field>
<dir>string</dir>
</sort>
<filter>
<field>string</field>
<operator>string</operator>
<value/>
<logic>string</logic>
<filters/>
</filter>
</DataSourceRequest>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | DataSourceRequest | true | none |
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Retreive filtrable fields and their type for Activities related to Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/Activities/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/Activities/Filter", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/Activities/Filter");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/Activities/Filter
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Updates the relation to Activity
Code samples
curl --request PUT \
--url https://testing.sweetsystems.se/api/Company/string/Activities \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/Activities", {
"method": "PUT",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Activities");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
PUT /Company/{id}/Activities
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<ActivityCompanyRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</ActivityCompanyRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | ActivityCompanyRelation | true | none |
Example responses
200 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<ActivityCompanyRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</ActivityCompanyRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Entity Updated | ActivityCompanyRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
412 | Precondition Failed | Etag missmatch | None |
500 | Internal Server Error | InternalServerError | None |
Create new relation to Activity
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/Activities \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/Activities", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Activities");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/Activities
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<ActivityCompanyRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</ActivityCompanyRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | ActivityCompanyRelation | true | none |
Example responses
201 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<ActivityCompanyRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</ActivityCompanyRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
201 | Created | Entity Created | ActivityCompanyRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
409 | Conflict | Entity with same Id already exist | None |
500 | Internal Server Error | InternalServerError | None |
Delete Activity relation by it’s Id
Code samples
curl --request DELETE \
--url https://testing.sweetsystems.se/api/Company/string/Activities/string \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/string/Activities/string", {
"method": "DELETE",
"headers": {
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Activities/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
DELETE /Company/{id}/Activities/{idOfRelation}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
idOfRelation | path | string | true | none |
id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
204 | No Content | Success | None |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
500 | Internal Server Error | InternalServerError | None |
Filter BusinessProjects based on fields and their type
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/BusinessProjects/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"take":1,"skip":0,"sort":[{"field":"string","dir":"string"}],"filter":{"field":"string","operator":"string","value":{},"logic":"string","filters":[{}]}}'
fetch("https://testing.sweetsystems.se/api/Company/string/BusinessProjects/Filter", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/BusinessProjects/Filter");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"take\":1,\"skip\":0,\"sort\":[{\"field\":\"string\",\"dir\":\"string\"}],\"filter\":{\"field\":\"string\",\"operator\":\"string\",\"value\":{},\"logic\":\"string\",\"filters\":[{}]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/BusinessProjects/Filter
Body parameter
{
"take": 1,
"skip": 0,
"sort": [
{
"field": "string",
"dir": "string"
}
],
"filter": {
"field": "string",
"operator": "string",
"value": {},
"logic": "string",
"filters": [
{}
]
}
}
take: 1
skip: 0
sort:
- field: string
dir: string
filter:
field: string
operator: string
value: {}
logic: string
filters:
- {}
<?xml version="1.0" encoding="UTF-8" ?>
<DataSourceRequest>
<take>1</take>
<skip>0</skip>
<sort>
<field>string</field>
<dir>string</dir>
</sort>
<filter>
<field>string</field>
<operator>string</operator>
<value/>
<logic>string</logic>
<filters/>
</filter>
</DataSourceRequest>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | DataSourceRequest | true | none |
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Retreive filtrable fields and their type for BusinessProjects related to Company
Code samples
curl --request GET \
--url https://testing.sweetsystems.se/api/Company/BusinessProjects/Filter \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/BusinessProjects/Filter", {
"method": "GET",
"headers": {
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/BusinessProjects/Filter");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
GET /Company/BusinessProjects/Filter
Example responses
200 Response
{}
<?xml version="1.0" encoding="UTF-8" ?>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Updates the relation to BusinessProject
Code samples
curl --request PUT \
--url https://testing.sweetsystems.se/api/Company/string/Deals \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/Deals", {
"method": "PUT",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Deals");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
PUT /Company/{id}/Deals
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<BusinessProjectCompanyRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</BusinessProjectCompanyRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | BusinessProjectCompanyRelation | true | none |
Example responses
200 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<BusinessProjectCompanyRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</BusinessProjectCompanyRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Entity Updated | BusinessProjectCompanyRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
412 | Precondition Failed | Etag missmatch | None |
500 | Internal Server Error | InternalServerError | None |
Create new relation to BusinessProject
Code samples
curl --request POST \
--url https://testing.sweetsystems.se/api/Company/string/Deals \
--header 'Accept: application/json' \
--header 'Authorization: Basic APIKEY123' \
--header 'Content-Type: application/json' \
--data '{"Id":"00000000-0000-0000-0000-000000000000","RoleCodeKey":"string","RelatedEntityId":"00000000-0000-0000-0000-000000000000"}'
fetch("https://testing.sweetsystems.se/api/Company/string/Deals", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Basic APIKEY123"
},
"body": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Deals");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Basic APIKEY123");
request.AddParameter("application/json", "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"RoleCodeKey\":\"string\",\"RelatedEntityId\":\"00000000-0000-0000-0000-000000000000\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
POST /Company/{id}/Deals
Body parameter
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
Id: 00000000-0000-0000-0000-000000000000
RoleCodeKey: string
RelatedEntityId: 00000000-0000-0000-0000-000000000000
<?xml version="1.0" encoding="UTF-8" ?>
<BusinessProjectCompanyRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</BusinessProjectCompanyRelation>
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
body | body | BusinessProjectCompanyRelation | true | none |
Example responses
201 Response
{
"Id": "00000000-0000-0000-0000-000000000000",
"RoleCodeKey": "string",
"RelatedEntityId": "00000000-0000-0000-0000-000000000000"
}
<?xml version="1.0" encoding="UTF-8" ?>
<BusinessProjectCompanyRelation>
<Id>00000000-0000-0000-0000-000000000000</Id>
<RoleCodeKey>string</RoleCodeKey>
<RelatedEntityId>00000000-0000-0000-0000-000000000000</RelatedEntityId>
</BusinessProjectCompanyRelation>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Not used | None |
201 | Created | Entity Created | BusinessProjectCompanyRelation |
400 | Bad Request | BadRequest | None |
401 | Unauthorized | Unauthorized | None |
404 | Not Found | NotFound | None |
409 | Conflict | Entity with same Id already exist | None |
500 | Internal Server Error | InternalServerError | None |
Delete BusinessProject relation by it’s Id
Code samples
curl --request DELETE \
--url https://testing.sweetsystems.se/api/Company/string/Deals/string \
--header 'Authorization: Basic APIKEY123'
fetch("https://testing.sweetsystems.se/api/Company/string/Deals/string", {
"method": "DELETE",
"headers": {
"Authorization": "Basic APIKEY123"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
var client = new RestClient("https://testing.sweetsystems.se/api/Company/string/Deals/string");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic APIKEY123");
IRestResponse response = client.Execute(request);
DELETE /Company/{id}/Deals/{idOfRelation}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
idOfRelation | path | string | true | none |
id | path | string | true | none |