Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

CRS public API is exposed via Swagger by following URL:

{host_url}/swagger/{microservice_name}/uiswagger/index

where {host_url}- URL of CRS instance to integrate (for example, https://prodshadowprod02shadow.cloudretailsystems.dk/),

{microservice_name} - name of microservice, which feature is supposed to be used. In scope of web shop integration following microservice names will be used:

...

Also it is worth to read following document in order to get short CRS API reference: /wiki/spaces/MBSG/pages/44512

Basic information for all requests

HTTP word - POST

All requests should contain header Content-Type - application/json.

Work with Get[Something]Page requests

...

Code Block
languagejs
{  
   {  
      "id":actor_id,
      "propertiesToLoad":  { "value": <write flags 11111111111111value> }
   }
}

[propertiesToLoad] - flag enumeration with following options:

Code Block
languagejs
FieldSet = 1,
WebAddresses = 2,
Emails = 4,
Addresses = 8,
Fields = 16,
Groups = 32,
Phones = 64,
Roles = 128,
User = 256,
Relations = 512,
PaymentInfo = 1024,
WorkingHours = 2048,
ExternalDataRecord = 4096

If all actor properties needed properties E.g. to load should be FieldSet | WebAddresses | Emails  and so on  - 1111111111111 in resultand Email we need to either use bit AND operation or just sum, so 1+4=5 in our case.

[propertiesToLoad] is an optional property, if it will is not be defined , all actor properties will be loaded.

...

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

...

[RoleSystemName]- allows to filter actors by specific role
[SearchPattern] - allows to filter actor whcich which person or organization name, phone, email or customer identifier satisfies search pattern
[ModifiedAtFrom] - allows to filter actors modified after specific timestamp
[ModifiedAtTo] - allows to filter actors modified before specific timestamp

...

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

...

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

...

Code Block
languagejs
{
    "sortInfo": [],
    "propertiesToLoad": <write 1111111111111flags 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"
    }
}

...

Code Block
languagejs
{
	"propertiesToLoad": {
		"value": 1111111111111<write flags value>
	},
	"offset": 0,
	"count": page_size,
	"includeOverallEntryCount": true,
	"modifiedAfter": {
		"value": "2017-09-26T12:52:29.960Z"
	}
}

...