Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 29 Next »

You can use the listed APIs on this page to view product information and to manage various activities (User, Partner, Transactions, Schema, and Mapping) from an external application. The API provides the way to fetch product information, Create, Update, and Delete activities without accessing the user interface.

Use any REST client with the following header information to process your request.

Key

Header Information (value)

Content Typeapplication/json
ACCESS_TOKENTo get the Access Token, refer below table for more details.

API to Fetch Access Token 


OperationMethodAPI EndpointExample PayloadExample Response
Get Access TokenPOST

/rest/login/user

{

"username":"{User Name}",

"password":"{Password}"

}

Fetch Token
{
"tokenExpiresDays": 30,
"ACCESS_TOKEN": "{access token}"
}


APIs for Managing Users

OperationMethodAPI EndpointExample PayloadExample and Notes
Create UserPOST/rest/invitation?resourceIdentifier=users

{
"Invitation":{
"companyID":1,
"contactEmail":"",
"invitationType":300,
"mailRecipient":"james.paul@abc.com", "message":"Adeptia has invited you to use Adeptia Connect",

"roleInfo":"[{\"partner\":1,\"roles\":[2],\"defaultRole\":2}]",
"senderEmail":"adminuser@adeptia.com",
"subject":400
}
}

Example Response:

Create User
{ "invitationId":"11567494226899", "303":[ ] }

This endpoint creates an invitation and return invitation id in response which you will use while creating the user.


POST/rest/users/createuser

{
"IndigoUser":{
"firstName":"James",
"lastName":"Paul",
"invitationId":11567494226899,
"password":"P@ssw0rd",
"roleId":null
}
}

Example Response:

Create User
{
 "IndigoUser":{
 "firstName":"James",
 "lastName":"Paul",
 "email":"james.paul@abc.com",
 "company":"Adeptia",
 "id":"11567413236623",
 "userPartnerRole":[
 {
 "partner":{
 "id":1
 },
 "role":{
 "id":2
 },
 "user":{
 "id":"11567413236623"
 },
 "defaultRole":true
 }
 ]
 }
}


Note:

Use the invitation Id from the above Create User response.

Update UserPUT/rest/users/{userId}

{
"IndigoUser":{
"firstName":"James",
"lastName":"Paul",
"email":"james.paul@abc.com",

"company":"Adeptia",
"id":"11567413236623",
"userPartnerRole":[
{
"partner":{
"id":1
},
"role":{
"id":2
},
"user":{
"id":"11567413236623"
},
"defaultRole":true
}
]
}
}

Example Response:

Update User
{
 "IndigoUser":{
 "firstName":"Test",
 "lastName":"User",
 "email":"james.paul@abc.com",
 "company":"Adeptia",
 "id":"11567413236623",
 "userPartnerRole":[
 {
 "partner":{
 "id":1
 },
 "role":{
 "id":2
 },
 "user":{
 "id":"11567413236623"
 },
 "defaultRole":true
 }
 ]
 }
}
Get UserGET/rest/user/{userId}

Get All Users (Connect Portal)GET/rest/user?limit={maximum number of users}

Using this API, you will get only Connect Portal users.

By default the value of limit is 1. Moreover, the limit stands for maximum number of users can be fetched from the database.
Activate UserPUT/rest/users/activate/{userId}EMPTY
Deactivate UserPUT/rest/users/deactivate/{userId}EMPTY
Delete UserPUT/rest/users/updateowner?oldUserId={userId}&deleteUser=trueEMPTYBy default this endpoint will delete the user who has no dependency else an exception message to move objects will be generated.

APIs for Managing Partners

 

OperationMethodAPI EndpointExample Payload
Create PartnerPOST/rest/company
Create Partner
{ "Company": { "name": "Wallgreens", "partnerNetworks": [{ "id": 1 } "primaryContact": "admin@wallgreens.com", "phoneNumber": "2025550101", "address": "", "country": "", "status": 200, "enableSelfOnboard": false, "spokeCompany": false } }

 

 

Update PartnerPUT/rest/company/{partnerId}
Update Partner
{ "Company": { "name": "Walmart Corporate" } }
Delete PartnerPUTrest/company/deletepartner/{partnerId}EMPTY
Update Partner ParametersPUT/rest/company/{partnerId}
Update Partner Parameters
{ "Company": { "partnerParameter": [{ "id": "-0", "paramId": { "id": "11518430417328" }, "value": "Purchase Order" }, { "id": "-1", "paramId": { "id": "11518430417329" }, "value": "c" }] }
Grant all Templates Access to PartnerPOSTrest/templatepartnerlinkage?resourceIdentifier=company
Grant Access to Partner
{ "TemplatePartnerLinkage": { "partner": { "id": 11535091945351 } } }
Revoke all Templates Access to PartnerDELETErest/templatepartnerlinkage/partnerId?resourceIdentifier=company

EMPTY

Grant a Template Access to PartnerPOST/rest/templatepartnerlinkage?isTemplate=true&resourceIdentifier=transactiontemplate
Grant Access to Particular Template
{ "TemplatePartnerLinkage": { "partner": { "id": 11535091945351 }, "transactionTemplate": { "id": 11535091945352 } } }
Revoke Template Access from PartnerDELETErest/templatepartnerlinkage/ {linkageId}?isTemplate=true&resourceIdentifier=transactiontemplateEMPTY
Move Partner from One Network to anotherPOST/rest/company/{partnerId}
Change Partner Network
{ "Company": { "partnerNetworks": [{ "id": 1 } ] } }
Convert Internal Partner to ExternalPOSTrest/company/enableSelfOnbaord
{ "partnerId" : "11529580510902", "firstName" : "Walmart", "lastName" : "Corporation", "userId" : "Walmart", "email" : "admin@walmart.com", "password" : "P@ssw0rd" }
Convert Internal Partner to External PartnerPOSTrest/users/import

Multipart Request

ContentType : multipart/form-data

form-data Part1 :

  • name : csvFile
  • value : csv file containing user information

form-data Part2:

  • name : isPartner
  • value : true

 

 

 

 

APIs for Managing Transaction

OperationMethodAPI EndpointExample Request Payload
Create TransactionPOST/rest/transaction
Create Transaction
{ "Transaction": { "entityName": "Data Transaction", "description": "To transfer benefits data.", "templateId": "1111111111100" } }
Create Transaction with ParametersPOST/rest/transaction
Create Transaction with Parameters
{ "Transaction": { "entityName": "Data Transaction", "description": "To transfer benefits data.", "templateId": "547658658658658", "variableInfo": "{\"param1\" : \"value1\",\"param2\":\"value2\"}" } }
Update TransactionPUT/rest/transaction/{transactionId}
Update Transaction
{ "Transaction": { "description": "To transfer benefits data from xml file.", } }
Update Transaction ParametersPUT/rest/transaction/{transactionId}
Update Transaction Parameters
{ "Transaction": { "variableInfo": "{\"param1\" : \"value1\",\"param2\":\"value2\"}" } }
DELETEDELETE/rest/transaction/{transactionId}EMPTY


APIs for Managing Schema and Mapping

OperationMethodAPI EndpointExample and Notes
Get all Schema and Mapping activities available to Partner GET /rest/activities/{partnerId}

 By default this endpoint lists all the activities available to partner.

To retrieve specific activities pass the comma separated service name query parameter as below

?services=TextSchema,ExcelSchema

Valid Service Names are

  • TextSchema
  • ExcelSchema
  • AdvanceTextSchema
  • PositionalSchema
  • AdvancePositionalSchema
  • XMLSchema
  • JSONSchema
  • EDISchema
  • DataMapping

By default all the available fields of all activities are returned in response. To limit the number of fields and to get specific fields pass the "fields" query param and pass the comma separated field names as below

?fields=id,entityName


Note:

Only those activities will be returned in response to which the requesting user is authorized to view as per permission settings.

Admin will get all activities.

 

Get all Schema and Mapping activities used by Partner in Transactions of a particular TemplateGET /rest/activities/{partnerId}/{templateId}

By default this endpoint lists all the activities used by partner for a particular template.

To retrieve specific activities pass the comma separated service name query parameter as below

?services=TextSchema,ExcelSchema (See above the list of valid service Names)

 

By default all the available fields of all activities are returned in response. To limit the number of fields and to get specific fields pass the "fields" query param and pass the comma separated field names as below

?fields=id,entityName


 

APIs for Viewing Product Information

OperationMethodAPI EndpointExample Response
View Connect Server (Developer Suite) InfoGET

/rest/fetchproperties/aboutinformation

Connect Server Information
{ "aboutInformation":{ "productName":"Adeptia Connect", "productVersion":"2.9.2", "edition":"Enterprise", "installationDate":"19 Oct, 2018", "expiryDate":"8 Oct, 2019", "connectPortal":"2.9.2", "connectServer":"Release_AC_2_9_2_09Oct2018" } }
View Connect Portal InfoGET/rest/applications/getTag
Create Portal Information
{ "tag":"UmVsZWFzZV9BQ19XZWJfMl85XzNfMzFKYW4yMDE5X0FDXzJfOV8zXzMxSmFuMjAxOQ==", "acTag":"Release_AC_Web_2_9_2_09Oct2018_AC_2_9_2_09Oct2018" }

Known Issues with API

These are the issues which occur while updating Partner Parameters:

    1. Empty Partner Parameters [ { }, { } ] create Parameters with NULL parameter Id and Value.
    2. Different Network Parameters can be associated with Partner to those Networks on which Partner does not belong.
    3. Passing Empty array ( [ ]) of Partner Parameters do not remove existing Parameters.

 

  • No labels