Using API, you can manage the activities (Partner, Schema, and Mapping) from the external application. The API provides the way to Create, Update, and Delete activities without GUI.
...
Partners API
Operation Method API Endpoint Ex. Payload Create Partner POST /rest/company Code Block title Create Partner collapse true { "Company": { "name": "Test NameWallgreens", "partnerNetworks": [{ "id": 1 } "primaryContact": "test@testadmin@wallgreens.com", "phoneNumber": "78358024392025550101", "address": "", "country": "", "status": 200, "enableSelfOnboard": false, "spokeCompany": false } }
Update Partner PUT /rest/company/{partnerId} Code Block title Update Partner collapse true { "Company": { "name": "UpdatedWalmart NameCorporate" } }
Delete Partner DELETE /rest/company/{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": "p1Purchase Order" }, { "id": "-1", "paramId": { "id": "11518430417329" }, "value": "c" }] }
Grant all Templates Access to Partner POST rest/templatepartnerlinkage Code Block title Grant Access to Partner collapse true { "TemplatePartnerLinkage": { "partner": { "id": 11535091945351 } } }
Revoke all Templates Access to Partner DELETE rest/templatepartnerlinkage/{partnerId} EMPTY
Grant a Template Access to Partner POST rest/templatepartnerlinkage?isTemplate=true 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 EMPTY Move Partner from One Network to another --- --- Code Block title Change Partner Network collapse true { "Company": { "partnerNetworks": [{ "id": 1 } ] } }
Convert Internal Partner to External POST rest/company/enableSelfOnbaord Code Block collapse true { "partnerId" : "11529580510902", "firstName" : "NameWalmart", "lastName" : "lastNameCorporation", "userId" : "testIdWalmart", "email" : "example@exampleadmin@walmart.com", "password" : "P@ssw0rd" }
Convert Internal Partner to External API 2 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
Transaction API
Operation Method API Endpoint Ex. Request Payload Create Transaction POST /rest/transaction Code Block title Create Transaction collapse true { "Transaction": { "entityName": "NewData Transaction", "description": "Transaction descriptionTo transfer benefits data.", "templateId": "1111111111100" } }
Create Transaction with Parameters POST /rest/transaction Code Block title Create Transaction with Parameters collapse true { "Transaction": { "entityName": "NewData Transaction", "description": "Transaction descriptionTo transfer benefits data.", "templateId": "547658658658658", "variableInfo": "{\"param1\" : \"value1\",\"param2\":\"value2\"}" } }
Update Transaction PUT /rest/transaction/{transactionId} Code Block title Update Transaction collapse true { "Transaction": { "description": "Updated Transaction descriptionTo transfer benefits data from xml file.", } }
Update Transaction Parameters PUT /rest/transaction/{transactionId} Code Block title Update Transaction Parameters collapse true { "Transaction": { "variableInfo": "{\"param1\" : \"value1\",\"param2\":\"value2\"}" } }
DELETE DELETE /rest/transaction/{transactionId} EMPTY Schema and Mapping API
Operation Method API Endpoint Ex. Payload Remarks 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
Known Issues with API
These are the issues which occur while updating Partner Parameters:
...