...
Following are the list of API you can use for performing various actions:
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: Code Block |
---|
title | Create User |
---|
collapse | true |
---|
| { "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: Code Block |
---|
title | Create User |
---|
collapse | true |
---|
| {
"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: Code Block |
---|
title | Update User |
---|
collapse | true |
---|
| {
"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. |
APIs for Managing Partners
Operation | Method | API Endpoint | Example Payload |
---|
Create Partner | POST | /rest/company |
Code Block |
---|
title | Create Partner |
---|
collapse | true |
---|
| { "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} |
Code Block |
---|
title | Update Partner |
---|
collapse | true |
---|
| { "Company": { "name": "Walmart Corporate" } } |
|
Delete Partner | PUT | rest/company/deletepartner/{partnerId} | EMPTY |
Update Partner Parameters | PUT | /rest/company/{partnerId} |
Code Block |
---|
title | Update Partner Parameters |
---|
collapse | true |
---|
| { "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 |
Code Block |
---|
title | Grant Access to Partner |
---|
collapse | true |
---|
| { "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 |
Code Block |
---|
title | Grant Access to Particular Template |
---|
collapse | true |
---|
| { "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} |
Code Block |
---|
title | Change Partner Network |
---|
collapse | true |
---|
| { "Company": { "partnerNetworks": [{ "id": 1 } ] } } |
|
Convert Internal Partner to External | POST | rest/company/enableSelfOnbaord |
Code Block |
---|
| { "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
|
...