mySparkrock user setup APIs
To set up mySparkrock user setups in Sparkrock 365, use the following APIs.
List of mySparkrock user setups
To get a list of all mySparkrock user setups, issue a GET externalUserSetups request.
The following JSON code snippet is an example of a GET externalUserSetups request.
GET https://sparkrock365.api.bc.dynamics.com/v2.0/{tenantId}/{environmentName}/api/sparkrock/srf/v2.0/companies({companyId})/externalUserSetups Authorization: Bearer {token}
List of properties of a specific mySparkrock user setup
To get a list of properties of a specific mySparkrock user setup, issue a GET request.
The following JSON code snippet is an example of a GET request.
GET https://sparkrock365.api.bc.dynamics.com/v2.0/{tenantId}/{environmentName}/api/sparkrock/srf/v2.0/companies({companyId})/externalUserSetups({userName}) Authorization: Bearer {token}
Create a mySparkrock user setup
To create a mySparkrock user setup, issue a POST request.
The following JSON code snippet is an example of a POST request.
POST https://sparkrock365.api.bc.dynamics.com/v2.0/{tenantId}/{environmentName}/api/sparkrock/srf/v2.0/companies({companyId})/externalUserSetups Authorization: Bearer {token} Content-type: application/json { "userName": "API-TEST", "employeeNo": "E0020", "firstName": "Kevin", "middleName": "", "lastName": "Song", "eMail": "API-TEST@cronus-demosite.com", "blocked": false, "allowAccessFrom": "0001-01-01", "allowAccessTo": "0001-01-01", "userProfileCode": "ADMIN", "userGroupCode": "TE DATA ENTRY 1", "restrictViewOfRequests": false, "approverType": "mySparkrock User", "approverNo": "APPROVER", "expenseVendorNoFilter": "", "dim1Code": "PROD", "dim2Code": "FA001", "dim3Code": "", "dim4Code": "", "dim5Code": "", "dim6Code": "", "dim7Code": "", "dim8Code": "", "locationCode": "WEST", "dim1Filter": "ADM|SALES", "dim1FilterAction": "Override", "dim2Filter": "FA001|HS001..HS002", "dim2FilterAction": "Override", "dim3Filter": "001..002", "dim3FilterAction": "Override", "dim4Filter": "", "dim4FilterAction": "Override", "dim5Filter": "", "dim5FilterAction": "Override", "dim6Filter": "", "dim6FilterAction": "Override", "dim7Filter": "", "dim7FilterAction": "Override", "dim8Filter": "", "dim8FilterAction": "Override", "expenseTypeFilter": "DISTANCE..ETA|ETE..PCARD-001", "expenseTypeCategoryFilter": "ETC..TRAVEL", "itemCategoryFilter": "CHAIR", "vendorNoFilter": "E0010..E0040", "vendorPostingGroupFilter": "", "glAccountFilter": "11100..11400|12110..12130|12210..12240|12900|13100..13500", "glAccountFilterAction": "Append", "locationCodeFilter": "EAST..MAIN", "allowUsageOfClosePO": false }
Modify mySparkrock user setup properties
To modify the mySparkrock user setup, issue a PATCH mySparkrock user setup request.
The following JSON code snippet is an example of a PATCH mySparkrock user setup request.
PATCH https://sparkrock365.api.bc.dynamics.com/v2.0/{tenantId}/{environmentName}/api/sparkrock/srf/v2.0/companies({companyId})/externalUserSetups({userName}) Authorization: Bearer {token} Content-type: application/json If-Match: * { "dim1Filter": "", "dim2Filter": "FA002|HS001..HS002" }
Delete a mySparkrock user setup
To delete the mySparkrock user setup, issue a DELETE mySparkrock user setup request.
The following JSON code snippet is an example of a DELETE mySparkrock user setup request.
DELETE https://sparkrock365.api.bc.dynamics.com/v2.0/{tenantId}/{environmentName}/api/sparkrock/srf/v2.0/companies({companyId})/externalUserSetups({userName}) Authorization: Bearer {token} If-Match: *
The request does not return anything in the response body.
List of mySparkrock user account sets
To get a list of all account sets that are associated with all mySparkrock user setups, issue a GET externalUserAccountSets request.
The following JSON code snippet is an example of a GET externalUserAccountSets request.
GET https://sparkrock365.api.bc.dynamics.com/v2.0/{tenantId}/{environmentName}/api/sparkrock/srf/v2.0/companies({companyId})/externalUserAccountSets Authorization: Bearer {token}
List of all account sets that are associated with a specific mySparkrock user setup
To get a list of all account sets associated with a specific mySparkrock user setup, issue a GET request.
The following JSON code snippet is an example of a GET request.
GET https://sparkrock365.api.bc.dynamics.com/v2.0/{tenantId}/{environmentName}/api/sparkrock/srf/v2.0/companies({companyId})/externalUserSetups({userName})/externalUserAccountSets Authorization: Bearer {token}
Assign an account set to a mySparkrock user setup
To assign an account set to a mySparkrock user setup, issue a POST request.
The following JSON code snippet is an example of a POST request.
POST https://sparkrock365.api.bc.dynamics.com/v2.0/{tenantId}/{environmentName}/api/sparkrock/srf/v2.0/companies({companyId})/externalUserSetups({userName})/externalUserAccountSets Authorization: Bearer {token} Content-type: application/json { "userName": "API-TEST", "accountSetCode": "60110-ADM-00000-000-00-0000" }
Modify mySparkrock user account sets
To modify the account set that is associated with a mySparkrock user setup, issue a PATCH mySparkrock user account set request.
Request
The following JSON code snippet is an example of a PATCH mySparkrock user account set request.
PATCH https://sparkrock365.api.bc.dynamics.com/v2.0/{tenantId}/{environmentName}/api/sparkrock/srf/v2.0/companies({companyId})/externalUserSetups({userName})/externalUserAccountSets({accountSetCode}) Authorization: Bearer {token} Content-type: application/json If-Match: * { "accountSetCode": "60130-SALES-00000-000-00-0000" }
Delete a mySparkrock user account set
To delete an account set associates with mySparkrock user account, issue a DELETE mySparkrock user account set request.
The following JSON code snippet is an example of a DELETE mySparkrock user account set request.
DELETE https://sparkrock365.api.bc.dynamics.com/v2.0/{tenantId}/{environmentName}/api/sparkrock/srf/v2.0/companies({companyId})/ externalUserSetups({userName})/externalUserAccountSets({accountSetCode}) Authorization: Bearer {token} If-Match: *
The request does not return anything in the response body.
See also
Feedback
To send feedback about this page, select the following link: