Skip to main content

Actors

Create Actor

Actor creation follows the guidelines described in How to create/update Actor.

note

The customer must have one of the customer roles with the system name CustomerPerson or CustomerOrganization. The response will contain a list of product variants..

Get Actor

  • Method: POST
  • URL: {host_url}/api/actors/Actor/GetActor

Minimal Request:

{  
"id": actor_id,
"propertiesToLoad": { "value": <write flags value> }
}

[propertiesToLoad] - Flag Enumeration:

Flag NameValue
FieldSet1
WebAddresses2
Emails4
Addresses8
Fields16
Groups32
Phones64
Roles128
User256
Relations512
PaymentInfo1024
WorkingHours2048
ExternalDataRecord4096

To load FieldSet and Emails, use bitwise AND operation or sum their values: 1 + 4 = 5.

note

propertiesToLoad is optional. If omitted, all actor properties will be loaded.

Get Actors (Paged)

  • Method: POST
  • URL: {host_url}/api/actors/actor/GetActorsPage

Minimal Request:

{
"sortInfo": [],
"propertiesToLoad": <write flags value>,
"offset": 0,
"count": page_size,
"includeOverallEntryCount": true
}

propertiesToLoad - flag enumeration with same options that also used in GetActor call (see previous chapter).

Optional Filters:

  • RoleSystemName - Filter actors by a specific role.
  • SearchPattern - Filter actors where person/organization name, phone, email, or customer ID matches the search pattern.
  • ModifiedAtFrom - Filter actors modified after a specific timestamp.
  • ModifiedAtTo - Filter actors modified before a specific timestamp.

Examples

Get customers page:

{
"sortInfo": [],
"propertiesToLoad": <write flags value>,
"offset": 0,
"count": 50,
"includeOverallEntryCount": true,
"roleSystemName": {
"value": "Customer"
}
}

Get suppliers page:

{
"sortInfo": [],
"propertiesToLoad": <write flags value>,
"offset": 0,
"count": 50,
"includeOverallEntryCount": true,
"roleSystemName": {
"value": "Supplier"
}
}

Get actors by search pattern within date range:

{
"sortInfo": [],
"propertiesToLoad": <write flags value>,
"offset": 0,
"count": 50,
"includeOverallEntryCount": true,
"modifiedAtFrom": {
"value": "2020-01-01T18:25:43.511Z"
},
"modifiedAtTo": {
"value": "2021-01-01T18:25:43.511Z"
},
"searchPattern": {
"value": "aa"
}
}