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 9 Next »

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.

Following are the list of API:

  • Partners API

    OperationMethodAPI EndpointEx. Payload
    Create PartnerPOST/rest/company
    Create Partner
    {
    	"Company": {
    		"name": "Test Name",
    		"partnerNetworks": [{
    			"id": 1
    		}
    		"primaryContact": "test@test.com",
    		"phoneNumber": "7835802439",
    		"address": "",
    		"country": "",
    		"status": 200,
    		"enableSelfOnboard": false,
    		"spokeCompany": false
    	}
    }

     

     

    Update PartnerPUT/rest/company/{partnerId}
    Update Partner
    {
    	"Company": {
    		"name": "Updated Name"
    	}
    }
    Delete PartnerDELETE/rest/company/{partnerId}EMPTY
    Update Partner ParametersPUT/rest/company/{partnerId}
    Update Partner Parameters
    {
    	"Company": {
    		"partnerParameter": [{
    			"id": "-0",
    			"paramId": {
    				"id": "11518430417328"
    			},
    			"value": "p1"
    		},
    		{
    			"id": "-1",
    			"paramId": {
    				"id": "11518430417329"
    			},
    			"value": "c"
    		}]
    }
    Grant all Templates Access to PartnerPOSTrest/templatepartnerlinkage
    Grant Access to Partner
    {
    	"TemplatePartnerLinkage": {
    		"partner": {
    			"id": 11535091945351
    		}
    	}
    }
    Revoke all Templates Access to PartnerDELETErest/templatepartnerlinkage/{partnerId}

     

    EMPTY

    Grant a Template Access to PartnerPOSTrest/templatepartnerlinkage?isTemplate=true
    Grant Access to Particular Template
    {
    	"TemplatePartnerLinkage": {
    		"partner": {
    			"id": 11535091945351
    		},
    		"transactionTemplate": {
    			"id": 11535091945352
    		}
    	}
    }
    Revoke Template Access from PartnerDELETErest/templatepartnerlinkage/{LinkageId}?isTemplate=trueEMPTY
    Move Partner from One Network to another------
    Change Partner Network
    {
    	"Company": {
    		"partnerNetworks": [{
    			"id": 1
    		}
    		]
    	}
    }
    Convert Internal Partner to ExternalPOSTrest/company/enableSelfOnbaord
    {
    "partnerId" : "11529580510902",
    "firstName" : "Name",
    "lastName" : "lastName",
    "userId" : "testId",
    "email" : "example@example.com",
    "password" : "P@ssw0rd"
    }
    Convert Internal Partner to External API 2POSTrest/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

    OperationMethodAPI EndpointEx. Request Payload
    Create TransactionPOST/rest/transaction
    Create Transaction
    {
    	"Transaction": {
    		"entityName": "New Transaction",
    		"description": "Transaction description",
    		"templateId": "1111111111100"
    	}
    }
    Create Transaction with ParametersPOST/rest/transaction
    Create Transaction with Parameters
    {
    	"Transaction": {
    		"entityName": "New Transaction",
    		"description": "Transaction description",
    		"templateId": "547658658658658",
    		"variableInfo": "{\"param1\" : \"value1\",\"param2\":\"value2\"}"
    	}
    }
    Update TransactionPUT/rest/transaction/{transactionId}
    Update Transaction
    {
    	"Transaction": {
    		"description": "Updated Transaction description",
    	}
    }
    Update Transaction ParametersPUT/rest/transaction/{transactionId}
    Update Transaction Parameters
    {
    	"Transaction": {
    		"variableInfo": "{\"param1\" : \"value1\",\"param2\":\"value2\"}"
    	}
    }
    DELETEDELETE/rest/transaction/{transactionId}EMPTY


  • Schema and Mapping API

    OperationMethodAPI EndpointEx. PayloadRemarks
    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


     

    Known Issues with API

    These are the issues which occur while updating Partner Parameters:
    1. Empty Partner Parameters [ { }, { } ] and create Parameters with NULL param 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