You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 27
Next »
You can use the listed APIs on this page to view product information and to manage various activities (Partner, 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.
Following are the list of API you can use for performing various actions:
Guidelines
Operation | Method | API Endpoint | Example Payload | Example Response |
---|
Fetch Token | POST | /rest/login/user | { "username":"{name of the user}", "password":"{password}" } |
{
"tokenExpiresDays": 30,
"ACCESS_TOKEN": "fCMjaeyJhbGciOiJIUzI1NiIsImVuYyI6IlNIQS0yNTYifQ.OWpXVzNvblBMOG5Db1hsbmVHbktpRkUzUnZhSVdtTG91c0F2TE1PYytqWWR4L0daRDRmd1lGeHBsT3BEMlR4bEpsQnErSmU5WjA0SQ0KMklzNGlIOHBxeDkrWXJyZXI3aVVtN2Q3QStpd3AyWGhUVzZCVWoraWROcCtlY2VDRGVUS0pHaVVyR2ZvZ2Y4NFlrVnBWVWVjSW1rNw0KTzJ2bXMrcXFxaVFoZmpsNkFjWEladm1aZ3cybEJMcW5JUDZkQzVlWW5xbVp3dU1UMm9sNEpoNEg0eVc3RFgrbUxYWFR1VUJNdkRNLw0KL3dHeUIrMVM1YnMycGRQdnJCRlhFbitTRGZyTUJQdlJZTFlFeXFDaUdBcFBaQXZPODFJb1ZDWDVpWllBUnRzd1RXa0E1NkF1a2lJRw0KVnB4NVNUUDR6TzJKbFR2cEx2c3dZbGl3MWp2OUIza3RFd1NJdGdYRk5EZ0Q1R2lodXRITEhmalkrK05od3ZJYzhMODV2SEdvTzBQag0KMC9zRFJKaWxIT1dwQWxzMjBhTk8yQmN3cEE0eUIvT2tSWUFGbGlQK2R5VW40RUxxUGxxSjVNY1A5eHNMRzErN3E0N3FtQ21sUTB6VA0KQUVDNitqRWhYaDhEVXFLSTNrUnY5R1N4ZW1BNjdlMERaRGo4UlpERUpPS1BkYURKR29CaHNGaHVaSjRwZXJXNHM5dWJoNGtMdk9jTw0KUnRwa2ZodlNWOVExeFZ1U1gwZlQxeDJIR0lyaDZ1eUs1bHZ2QmRuY0NQNy84djl6OVpqa0ppTG5KZFMvR2FJbzIvR3lUeEc4d3J0Yw0KTjhheHpWQ3ZRYVVkdkdQTGZHUFVSSkNDcU1yQWRlYWE5aWlUb0E0SEZPRTVhZU93SFBvQjNPWXRzZFBoenYwRUxlb1pVY2RBZlhjZA0KbTZEL0pVUEhHS0U0Nm1RSU8zMlkwY0J0TUlWdWFjY2hzbFNnWitjMldwUXdLa0ZjTlJBclZ5UUJiQlJxZk9WeTVydFJHQndzU2lQNg0KSVNOZXJaREhmNll6YjJuQ09DTE9TcTNLWklLZVJlOFRTMDc2V001WVU1cTMvMzcyaE5wRzNSN2N4SzgwMDd5RlNYQUFEL3dEWDZDdg0KVEk5eHZ3V0ZkSUo5bnJPNVZ4TWt0T0NweE5GLzdneUdaNWxnWmhZRVYyVmlKZTNlQjN0ajVWS1VQWlhIZHo3ZFA2OVRRd3lpWmhGQQ0KWU9tcFRqYWY1TXE4ckRSVmY1OFlnY2hXMTFLdU9sMlJiTndoL09odUcvb2h0L2JZWGFGM1hmbHBkWTloRmc1dGZkdlhRdHVOcmJYag0KRmNRak42TW9SaDZzR1o0ejVrWXpSdDFPRVVVL1JEU01BbjRwcE5reHZsS2g5YTMweG9TYzhuNkRzVE5KK3U4cmQ4M1dabms5WDEzbQ0KOUdnPQ.2j55KLyRPYo9SHmzixRRCV4w3pPH9BFym-csJwXjqkk"
}
|
APIs for Managing Users
Operation | Method | API Endpoint | Example Payload | Example and Notes |
---|
Create User | POST | /rest/invitation?resourceIdentifier=users | { "Invitation":{ "companyID":1, "contactEmail":"", "invitationType":300, "mailRecipient":"new@adeptia.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:
{ "invitationId":"11567494226899", "303":[ ] }
By default this endpoint creates an invitation and returns invitation id in response that can be used while creating the user.
Note: This may required some modification which will be available in B7. |
POST | /rest/users/createuser | { "IndigoUser":{ "firstName":"Test", "lastName":"User", "invitationId":11567494226899, "password":"P@ssw0rd", "roleId":null } } | Example Response:
{
"IndigoUser":{
"firstName":"Test",
"lastName":"User",
"email":"new@adeptia.com",
"company":"Adeptia",
"id":"11567413236623",
"userPartnerRole":[
{
"partner":{
"id":1
},
"role":{
"id":2
},
"user":{
"id":"11567413236623"
},
"defaultRole":true
}
]
}
}
Note: Use only the invitation Id from the above Create User response.
|
Update User | PUT | /rest/users/{userId} | { "IndigoUser":{ "firstName":"Test", "lastName":"User", "email":"new@adeptia.com", "company":"Adeptia", "id":"11567413236623", "userPartnerRole":[ { "partner":{ "id":1 }, "role":{ "id":2 }, "user":{ "id":"11567413236623" }, "defaultRole":true } ] } } | Example Response:
{
"IndigoUser":{
"firstName":"Test",
"lastName":"User",
"email":"new@adeptia.com",
"company":"Adeptia",
"id":"11567413236623",
"userPartnerRole":[
{
"partner":{
"id":1
},
"role":{
"id":2
},
"user":{
"id":"11567413236623"
},
"defaultRole":true
}
]
}
}
|
Fetch User | GET | /rest/user/{userId} |
|
|
Fetch All Users (Connect Portal) | GET | /rest/user |
|
|
Activate User | PUT | /rest/users/activate/{userId} | {} |
|
Deactivate User | PUT | /rest/users/deactivate/{userId} | {} |
|
Delete User | PUT | /rest/users/updateowner?oldUserId={userId}&deleteUser=true | {} | By default this endpoint will delete the user who has no dependency else an exception message to move objects will be generated. |
Operation | Method | API Endpoint | Example Payload |
---|
Create Partner | POST | /rest/company |
{ "Company": { "name": "Wallgreens", "partnerNetworks": [{ "id": 1 } "primaryContact": "admin@wallgreens.com", "phoneNumber": "2025550101", "address": "", "country": "", "status": 200, "enableSelfOnboard": false, "spokeCompany": false } }
|
Update Partner | PUT | /rest/company/{partnerId} |
{ "Company": { "name": "Walmart Corporate" } }
|
Delete Partner | PUT | rest/company/deletepartner/{partnerId} | EMPTY |
Update Partner Parameters | PUT | /rest/company/{partnerId} |
{ "Company": { "partnerParameter": [{ "id": "-0", "paramId": { "id": "11518430417328" }, "value": "Purchase Order" }, { "id": "-1", "paramId": { "id": "11518430417329" }, "value": "c" }] }
|
Grant all Templates Access to Partner | POST | rest/templatepartnerlinkage?resourceIdentifier=company |
{ "TemplatePartnerLinkage": { "partner": { "id": 11535091945351 } } }
|
Revoke all Templates Access to Partner | DELETE | rest/templatepartnerlinkage/partnerId?resourceIdentifier=company | EMPTY |
Grant a Template Access to Partner | POST | /rest/templatepartnerlinkage?isTemplate=true&resourceIdentifier=transactiontemplate |
{ "TemplatePartnerLinkage": { "partner": { "id": 11535091945351 }, "transactionTemplate": { "id": 11535091945352 } } }
|
Revoke Template Access from Partner | DELETE | rest/templatepartnerlinkage/ {linkageId}?isTemplate=true&resourceIdentifier=transactiontemplate | EMPTY |
Move Partner from One Network to another | POST | /rest/company/{partnerId} |
{ "Company": { "partnerNetworks": [{ "id": 1 } ] } }
|
Convert Internal Partner to External | POST | rest/company/enableSelfOnbaord |
{ "partnerId" : "11529580510902", "firstName" : "Walmart", "lastName" : "Corporation", "userId" : "Walmart", "email" : "admin@walmart.com", "password" : "P@ssw0rd" }
|
Convert Internal Partner to External Partner | POST | rest/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
Operation | Method | API Endpoint | Example Request Payload |
---|
Create Transaction | POST | /rest/transaction |
{ "Transaction": { "entityName": "Data Transaction", "description": "To transfer benefits data.", "templateId": "1111111111100" } }
|
Create Transaction with Parameters | POST | /rest/transaction |
{ "Transaction": { "entityName": "Data Transaction", "description": "To transfer benefits data.", "templateId": "547658658658658", "variableInfo": "{\"param1\" : \"value1\",\"param2\":\"value2\"}" } }
|
Update Transaction | PUT | /rest/transaction/{transactionId} |
{ "Transaction": { "description": "To transfer benefits data from xml file.", } }
|
Update Transaction Parameters | PUT | /rest/transaction/{transactionId} |
{ "Transaction": { "variableInfo": "{\"param1\" : \"value1\",\"param2\":\"value2\"}" } }
|
DELETE | DELETE | /rest/transaction/{transactionId} | EMPTY |
APIs for Managing Schema and Mapping
Operation | Method | API Endpoint | Example 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 Template | GET | /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
|
Operation | Method | API Endpoint | Example Response |
---|
View Connect Server (Developer Suite) Info | GET | /rest/fetchproperties/aboutinformation |
{ "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 Info | GET | /rest/applications/getTag |
{ "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:
- Empty Partner Parameters [ { }, { } ] create Parameters with NULL parameter Id and Value.
- Different Network Parameters can be associated with Partner to those Networks on which Partner does not belong.
- Passing Empty array ( [ ]) of Partner Parameters do not remove existing Parameters.