Crowd Partner API

1.1 Overview

The Crowd Partner API enables crowd owner with external systems to make requests from a third-party application to SAP Field Service Management, where they can invite partners to join the SAP Field Service Management Crowd platform.

For more information on the SAP Field Service Management Crowd platform, please refer to the following documentation:

Crowd


1.1.1 Request Methods

The following methods are supported by the Crowd Partner API:

  Method Description Section
1.1.0.1 GET Retrieve information on a specific crowd business partner and sub-resources. 1.3
1.1.0.2 GET Retrieve information on all crowd business partners and sub-resources. 1.4
1.1.0.3 POST Create a new crowd business partner with optional sub-resources. 1.5
1.1.0.4 PUT Update an existing crowd business partner and sub-resources. 1.6
1.1.0.5 DELETE Delete an existing crowd business partner record. 1.7

1.1.2 Crowd Business Partner API in Swagger

The Swagger specification for the Crowd Business Partner API can be accessed here.


1.2 Access

The Crowd Partner API uses Oauth 2.0 for authentication. This token is then used in the Authorization header as the bearer.

Attention: In order to receive an access token, you must have ADMINISTRATOR or SUPERUSER privileges.

1.2.1 Get Access Token

The following example shows how to get the access token for a Cloud Account or a Company User:


Cloud Account


The following example is an example of authentication for a Coresystems Cloud account with access to all companies within the account:


POST https://auth.coresuite.com/api/oauth2/v1/token HTTP/1.1

Host et.dev.coresuite.com
Authorization Basic dGVzdDpzZWNyZXQ=
Content-Type application/x-www-form-urlencoded

grant_type=password&username=cym&password=passwordExample123


Company User


The following example of authentication for a company user, with access to companies controlled by existing subscription and permission settings:


POST https://auth.coresuite.com/api/oauth2/v1/token HTTP/1.1

Host et.dev.coresuite.com
Authorization Basic dGVzdDpzZWNyZXQ=
Content-Type application/x-www-form-urlencoded

grant_type=password&username=cym/manager&password=passwordExample123


1.2.2 Response

The following is an example of a typical response:

{
  "access_token": "77cf4834-a347-4849-839b-4518823a739e",
  "token_type": "bearer",
  "expires_in": 43199,
  "scope": "general",
  "cluster_url": "https://et.dev.coresuite.com",
  "account": "testaccount",
  "account_id" : 284,
  "user": "manager",
  "user_email": "test@coresystems.ch",
  "companies": [
    {
      "id": 957,
      "name": "SBODemoCH",
      "description": "OEC Computers (Schweiz)"
    }
  ],
 }
 

1.2.3 Error Response

{
  "error": "invalid_grant",
  "error_description": "Bad credentials"
}

1.2.4 Supported Clusters

Depending on the location of the account, requests will be made to one of the following server clusters:

  • EU
  • DE
  • US

Attention: please note that the CN (China) cluster is currently NOT supported.

Account information, including cluster assignment, are obtained from the Directory API.

This information is passed into requests made to the Crowd Partner API as follows:

https://{cluster}.coresystems.net/cloud-crowd-service/api/crowd-partner/v1/


1.3 GET Information on a Specific Crowd Business Partner

Retrieve information for a specific crowd business partner.

1.3.1 Request

Method URL
GET https://{cluster}.coresystems.net/cloud-crowd-service/api/crowd-partner/v1/partners/{id}

1.3.2 Headers

Header Parameter Value Description Required
Authorization bearer OAuth 2.0 token Required
X-Account-Name accountName The name of the account associated with ther request. Required
X-Client-ID clientId Client app identifier Required
X-Client-Version clientVersion The client version Required
X-Company-Name companyName The name of the company associated with the request. Required

1.3.3 URL Parameters

Parameter Type Description Required
ID String The ID of the crowd business partner for which you wish to retrieve information. Required

1.3.4 Response

Status Response
201 Created
202 Accepted
400 Bad Request
409 Conflict
500 Internal Server Error

1.3.5 Example Response

{
  "address": {
    "city": "string",
    "country": "string",
    "id": {
      "uuid": "string"
    },
    "number": "string",
    "streetName": "string",
    "zipCode": "string"
  },
  "contact": {
    "emailAddress": "string",
    "firstName": "string",
    "id": {
      "uuid": "string"
    },
    "lastName": "string",
    "phoneNumber": "string"
  },
  "id": {
    "uuid": "string"
  },
  "name": "string"
}

1.4 GET Information on All Crowd Business Partners

Retrieve information on all crowd business partners.

1.4.1 Request

Method URL
GET https://{cluster}.coresystems.net/cloud-crowd-service/api/crowd-partner/v1/partners

1.4.2 Headers

Header Parameter Value Description Required
Authorization bearer OAuth 2.0 token Required
X-Account-Name accountName The name of the account associated with ther request. Required
X-Client-ID clientId Client app identifier Required
X-Client-Version clientVersion The client version Required
X-Company-Name companyName The name of the company associated with the request. Required

1.4.3 URL Parameters

Parameter Type Description Required
Page Integer The amount of results per page you wish to return.  
Size Integer The number of records per page you wish to return .  
Offset Integer The offset to be taken according to the page count and page size  
Sort Array of strings Sorting critera in the format: property (ascidesc). Default sort order is ascending. Multiple sort criteria are supported.  

1.4.4 Body Example

{
  "content": [
    {
      "address": {
        "city": "string",
        "country": "string",
        "id": {
          "uuid": "string"
        },
        "number": "string",
        "streetName": "string",
        "zipCode": "string"
      },
      "contact": {
        "emailAddress": "string",
        "firstName": "string",
        "id": {
          "uuid": "string"
        },
        "lastName": "string",
        "phoneNumber": "string"
      },
      "id": {
        "uuid": "string"
      },
      "name": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}

1.4.5 Response

Status Response
200 OK
401 Unauthorized
403 Forbidden
404 Not Found

1.5 POST Crowd Business Partner with Sub-resources

Create a new crowd business partner record with optional sub-resources.

1.5.1 Request

Method URL
POST https://{cluster}.coresuite.com/dc/api/crowd/v1/dispatch/accept

1.5.2 Headers

Header Parameter Value Description Required
Authorization bearer OAuth 2.0 token Required
X-Account-Name accountName The name of the account associated with ther request. Required
X-Client-ID clientId Client app identifier Required
X-Client-Version clientVersion The client version Required
X-Company-Name companyName The name of the company associated with the request. Required

1.5.3 Body

Value     Description Type Required  
address     The address associated with the crowd business partner. String Required  
  city   The city associated with the address. String Required  
  country   The country associated with the address. String Required  
  id       Automatically generated by the cloud  
    uuid   The cloud unique identifier associated with the address. Automatically generated by the cloud. String  
  number   The number associated with the street address. String Required  
  streetName   The name of the street. String Required  
  zipCode   The zip code associated with the address. String Required  
contact     The contact associated with the crowd business partner. String Required  
  emailAddress   The contact email address. String Required  
  firstName   The first name of the contact. String Required  
  lastName   The last name of the contact. String Required  
  phoneNumber   The phone number of the contact. String Required  
  id          
    uuid The cloud unique identifier associated with the crowd business partner contact.Automatically generated by the cloud. String Automatically generated by the cloud  
name     The name of the crowd business partner. String Required  
id            
  uuid   The cloud unique identifier associated with the crowd business partner. Automatically generated by the cloud. This is referenced in PUT and GET requests. String Automatically generated by the cloud  

The following is an example of a new crowd business partner record created via POST request:

{
  "address": {
    "city": "string",
    "country": "string",
    "id": {
      "uuid": "string"
    },
    "number": "string",
    "streetName": "string",
    "zipCode": "string"
  },
  "contact": {
    "emailAddress": "string",
    "firstName": "string",
    "id": {
      "uuid": "string"
    },
    "lastName": "string",
    "phoneNumber": "string"
  },
  "id": {
    "uuid": "string"
  },
  "name": "string"
}

1.5.4 Response

Status Response
201 Created
401 Unauthorized
403 Forbidden
404 Not Found

1.5.5 Example Response

{
  "body": {},
  "statusCode": "100",
  "statusCodeValue": 0
}

1.6 PUT Crowd Business Partner Update

Update an existing crowd business partner record and sub-resources.

1.6.1 Request

Method URL
PUT https://{cluster}.coresystems.net/cloud-crowd-service/api/crowd-partner/v1/partners/{id}

1.6.2 Headers

Header Parameter Value Description Required
Authorization bearer OAuth 2.0 token Required
X-Account-Name accountName The name of the account associated with ther request. Required
X-Client-ID clientId Client app identifier Required
X-Client-Version clientVersion The client version Required
X-Company-Name companyName The name of the company associated with the request. Required

1.6.3 URL Paramters

Parameter Description Type Required
id The unique ID of the crowd business partner record you wish to update. String Required

1.6.4 Body

Value     Description Type
address     The address associated with the crowd business partner. String
  city   The city associated with the address. String
  country   The country associated with the address. String
  id      
    uuid   The cloud unique identifier associated with the address. Automatically generated by the cloud when created.
  number   The number associated with the street address. String
  streetName   The name of the street. String
  zipCode   The zip code associated with the address. String
contact     The contact associated with the crowd business partner. String
  emailAddress   The contact email address. String
  firstName   The first name of the contact. String
  lastName   The last name of the contact. String
  phoneNumber   The phone number of the contact. String
  id      
    uuid The cloud unique identifier associated with the crowd business partner contact. Automatically generated by the cloud when created. String
name     The name of the crowd business partner. String
id        
  uuid   The cloud unique identifier associated with the crowd business partner. Automatically generated by the cloud when created. String

1.6.5 Example Body

{
  "address": {
    "city": "string",
    "country": "string",
    "id": {
      "uuid": "string"
    },
    "number": "string",
    "streetName": "string",
    "zipCode": "string"
  },
  "contact": {
    "emailAddress": "string",
    "firstName": "string",
    "id": {
      "uuid": "string"
    },
    "lastName": "string",
    "phoneNumber": "string"
  },
  "id": {
    "uuid": "string"
  },
  "name": "string"
}

1.6.4 Response

Status Response
200 OK
201 Created
202 Accepted
400 Bad Request
409 Conflict
500 Internal Server Error

1.7 Delete Crowd Business Partner

Delete an existing crowd business partner record.

1.7.1 Request

Method URL
DELETE https://{cluster}.coresystems.net/cloud-crowd-service/api/crowd-partner/v1/partners/{id}

1.7.2 Headers

Header Parameter Value Description Required
Authorization bearer OAuth 2.0 token Required
X-Account-Name accountName The name of the account associated with ther request. Required
X-Client-ID clientId Client app identifier Required
X-Client-Version clientVersion The client version Required
X-Company-Name companyName The name of the company associated with the request. Required

1.7.3 URL Parameters

Parameter Description Type Required
id The unique ID of the crowd business partner record you wish to delete. String Required

1.7.4 Response

Status Response
200 OK
204 No Content
202 Accepted
401 Unauthorized
403 Forbidden