Yodlee - Login form has fieldInfoList - yodlee

for contentservice id 2444, which got a fieldInfoList contains two login fields, how should I pass them to the jsonsdk/ItemManagement/addItemForContentService1 REST API? I tried to post them normal but I got an error.
Here is the loginform JSON for 2444
[
{
"valueIdentifier": "OP_LOGIN",
"valueMask": "500766LOGIN_FIELD",
"fieldType": {
"typeName": "IF_LOGIN"
},
"size": 20,
"maxlength": 10,
"name": "OP_LOGIN",
"displayName": "BMO Debit Card(Last 10 digit)",
"isEditable": true,
"isOptional": true,
"isEscaped": false,
"helpText": "114195",
"isOptionalMFA": false,
"isMFA": false
},
{
"valueIdentifier": "OP_LOGIN1",
"valueMask": "LOGIN_FIELD",
"fieldType": {
"typeName": "IF_LOGIN"
},
"size": 20,
"maxlength": 16,
"name": "OP_LOGIN1",
"displayName": "BMO Credit Card(Enter 16 Digit)",
"isEditable": true,
"isOptional": true,
"isEscaped": false,
"helpText": "160219",
"isOptionalMFA": false,
"isMFA": false
},
{
"valueIdentifier": "PASSWORD",
"valueMask": "LOGIN_FIELD",
"fieldType": {
"typeName": "IF_PASSWORD"
},
"size": 20,
"maxlength": 6,
"name": "PASSWORD",
"displayName": "Password",
"isEditable": true,
"isOptional": false,
"isEscaped": false,
"helpText": "114194",
"isOptionalMFA": false,
"isMFA": false
}
]
Cheers,
Patrick

This login form has optional fields , you can show this login form to a user as depicted here
and then based on the response from user, you can only pass back the fields which are filled by the user and that request will look similar to the normal login form.

Related

How to create complex-rules for modifier of product in bigcommerce

I am new in bigcommerce and type to added complex-rules for Modifier of product. below provide the URL of API URL and JSON.
every time give error "The rule must contain multiple modifier conditions with unique modifier ids or a variant condition and modifier condition"
https://api.bigcommerce.com/stores/{$$.env.store_hash}/v3/catalog/products/{product_id}/complex-rules
Please help where I wrong in send Complex Rule request JSON.
Modifier:
{
"data": {
"config": [],
"display_name": "Donation",
"id": 188,
"name": "Donation1645178599-166",
"option_values": [
{
"adjusters": {
"image_url": "",
"price": null,
"purchasing_disabled": {
"message": "",
"status": false
},
"weight": null
},
"id": 352,
"is_default": true,
"label": "$5 Donation",
"option_id": 188,
"sort_order": 0,
"value_data": null
},
{
"adjusters": {
"image_url": "",
"price": null,
"purchasing_disabled": {
"message": "",
"status": false
},
"weight": null
},
"id": 353,
"is_default": false,
"label": "$10 Donation",
"option_id": 188,
"sort_order": 0,
"value_data": null
}
],
"product_id": 166,
"required": false,
"sort_order": 0,
"type": "dropdown"
},
"meta": {}
}
Complex Rule request JSON:
{
"product_id": 166,
"sort_order": 0,
"enabled": true,
"stop": false,
"purchasing_disabled": false,
"purchasing_hidden": false,
"price_adjuster": {
"adjuster": "relative",
"adjuster_value": 6
},
"weight_adjuster": {
"adjuster": "relative",
"adjuster_value": 6
},
"conditions": [
{
"id": 5,
"rule_id": 5,
"modifier_id": 189,
"modifier_value_id": 352
}
]
}
Error output:
{
"status": 422,
"title": "The rule must contain multiple modifier conditions with unique modifier ids or a variant condition and modifier condition",
"type": "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes"
}

Azure DevOps API release definition error

I am creating azure-devops release pipeline with API, but getting error. I have validated the json as well and is correct from https://jsonlint.com/ Any help would be really appreciated
I have followed this issue as well and retention policy is correctly passed
Azure DevOps API release definition
error: "message": "VS402982: A retention policy is not set for the stage ‘Test-New-2’. Retention policies at the release pipeline level are deprecated. Use a retention policy at the stage level
POST https://vsrm.dev.azure.com/{{organization}}/{{project}}/_apis/release/definitions?api-version=6.0
json body:
"retentionPolicy": {
"daysToKeep": 30,
"releasesToKeep": 3,
"retainBuild": true
},
Yes, it should be the syntax issue, to create a release definition, you could refer to this sample.
Reruest URL:
POST https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions?api-version=6.0
Request Body:
{
"source": "undefined",
"revision": 1,
"description": null,
"createdBy": null,
"createdOn": "0001-01-01T00:00:00",
"modifiedBy": null,
"modifiedOn": "0001-01-01T00:00:00",
"isDeleted": false,
"variables": {},
"variableGroups": [],
"environments": [
{
"id": 0,
"name": "PROD",
"variables": {},
"variableGroups": [],
"preDeployApprovals": {
"approvals": [
{
"rank": 1,
"isAutomated": false,
"isNotificationOn": false,
"approver": {
"displayName": null,
"id": "aeb95c63-4fac-4948-84ce-711b0a9dda97"
},
"id": 0
}
]
},
"postDeployApprovals": {
"approvals": [
{
"rank": 1,
"isAutomated": true,
"isNotificationOn": false,
"id": 0
}
]
},
"deployPhases": [
{
"deploymentInput": {
"parallelExecution": {
"parallelExecutionType": "none"
},
"skipArtifactsDownload": false,
"artifactsDownloadInput": {},
"queueId": 15,
"demands": [],
"enableAccessToken": false,
"timeoutInMinutes": 0,
"jobCancelTimeoutInMinutes": 1,
"condition": "succeeded()",
"overrideInputs": {}
},
"rank": 1,
"phaseType": "agentBasedDeployment",
"name": "Run on agent",
"workflowTasks": []
}
],
"environmentOptions": {
"emailNotificationType": "OnlyOnFailure",
"emailRecipients": "release.environment.owner;release.creator",
"skipArtifactsDownload": false,
"timeoutInMinutes": 0,
"enableAccessToken": false,
"publishDeploymentStatus": false,
"badgeEnabled": false,
"autoLinkWorkItems": false,
"pullRequestDeploymentEnabled": false
},
"demands": [],
"conditions": [],
"executionPolicy": {
"concurrencyCount": 0,
"queueDepthCount": 0
},
"schedules": [],
"retentionPolicy": {
"daysToKeep": 30,
"releasesToKeep": 3,
"retainBuild": true
},
"properties": {},
"preDeploymentGates": {
"id": 0,
"gatesOptions": null,
"gates": []
},
"postDeploymentGates": {
"id": 0,
"gatesOptions": null,
"gates": []
},
"environmentTriggers": []
}
],
"artifacts": [],
"triggers": [],
"releaseNameFormat": null,
"tags": [],
"properties": {},
"id": 0,
"name": "Fabrikam-web",
"projectReference": null,
"_links": {}
}
I test it on my side, it works for me.

How do I do an exact match first with Specification JPA

I'm trying to bump an exact query first using Specification and Pageable from spring data.
When making a request to this endpoint http://localhost:8080/configs?search=PATH
This is the response now:
{
"content": [
{
"groupId": "PATHOD",
"type": "company",
},
{
"groupId": "PATH",
"type": "company",
},
{
"groupId": "APATH",
"type": "company",
}
],
"pageable": {
...
},
"sort": {
"sorted": true,
"unsorted": false,
"empty": false
},
"size": 10,
"empty": false
}
I want to be like, with the exact match bumped to first place:
{
"content": [
{
"groupId": "APATH",
"type": "company",
},
{
"groupId": "PATH",
"type": "company",
},
{
"groupId": "PATHOD",
"type": "company",
}
],
"pageable": {
....
},
"sort": {
"sorted": true,
"unsorted": false,
"empty": false
},
"size": 10,
"empty": false
}
This is my code right now, but I don't know how to write the specification
fun findAllWithFilters(
exactMatchFirst: Boolean = false,
pageable: Pageable
): Page<OrderConfig> {
val spec = and(
withExactMatchFirst(exactMatchFirst)
)
return findAll(spec, pageable)
}
The PATH groupId should be the first one to appear in the results

Podio Api: Why does PUT request /app/{app_id}/field/{field_id} delete category field options for contact apps?

I'm tring to modify category fields of a contact app using Podio API.
I get the following response for the GET request (https://api.podio.com/app/22768616/field/189304190):
(Previously I created the field with a POST request and everything works fine)
{
"status": "active",
"type": "category",
"field_id": 189304190,
"label": "myCategories",
"config": {
"default_value": null,
"unique": false,
"description": null,
"hidden_create_view_edit": false,
"required": false,
"mapping": null,
"label": "myCategories",
"visible": true,
"delta": 9,
"hidden": false,
"settings": {
"multiple": false,
"options": [
{
"status": "active",
"text": "Cat1",
"id": 1,
"color": "DCEBD8"
},
{
"status": "active",
"text": "Cat2",
"id": 2,
"color": "DCEBD8"
},
{
"status": "active",
"text": "Cat3",
"id": 3,
"color": "DCEBD8"
},
{
"status": "active",
"text": "Cat4",
"id": 4,
"color": "DCEBD8"
}
],
"display": "dropdown"
}
},
"external_id": "mycategories-2"
}
If I send a PUT request to https://api.podio.com/app/22768616/field/189304190 with the same response, the dropdown category field changes to an inline category field and all the options are deleted. (I expected nothing would happen to my field, I also tried to modify the text of the options, but got the same result).
{
"status": "active",
"type": "category",
"field_id": 189304190,
"label": "myCategories",
"config": {
"default_value": null,
"unique": false,
"description": null,
"hidden_create_view_edit": false,
"required": false,
"mapping": null,
"label": "myCategories",
"visible": true,
"delta": 0,
"hidden": false,
"settings": {
"multiple": false,
"options": [
{
"status": "deleted",
"text": "Cat1",
"id": 1,
"color": "DCEBD8"
},
{
"status": "deleted",
"text": "Cat2",
"id": 2,
"color": "DCEBD8"
},
{
"status": "deleted",
"text": "Cat3",
"id": 3,
"color": "DCEBD8"
},
{
"status": "deleted",
"text": "Cat4",
"id": 4,
"color": "DCEBD8"
}
],
"display": "inline"
}
},
"external_id": "mycategories-2"
}
Could you please help with any example to update a category fields correctly?
Can you add what the body is when you are using the PUT endpoint?
My guess is that you are somehow not mapping the "settings" parameter correctly. Per the API documentation the settings parameter for a category field should follow this format:
{
"options": The list of options for the question
[
{
"id": The id of the option, only use this for existing options,
"status": The current status of the option, "active" or "deleted", only use this to delete options,
"text": The text for the option (required)
},
... (more options)
],
"multiple": True if multiple answers should be allowed, False otherwise
}

How do I pass values to the echosign document?

I have an agreement that I need signed. The link to the document is opened up after the Client provides their company and payment information for our services. How can I pass values like company name or billing address to the document from a form?
Right now the Client clicks the "Go to Agreement" and it brings up the document. The problem lies in that they would be having to re-type the information they just submitted on our form again in the echosign document.
You can use the mergeFieldInfo for this
A sample Payload for the same
{
"documentCreationInfo": {
"fileInfos": [
{
"libraryDocumentId": "xxxxxxxxxx"
}
],
"name": "xxxxxxxxxx xxxxxxxxxx",
"message": "Please sign the agreement",
"recipientSetInfos": [
{
"recipientSetRole": "SIGNER",
"recipientSetMemberInfos": [
{
"email": "xxxx#xxxx.com"
}
]
}
],
"signatureType": "ESIGN",
"signatureFlow": "SENDER_SIGNATURE_NOT_REQUIRED",
"mergeFieldInfo": [
{
"fieldName": "firstName",
"defaultValue": "xxxx"
},
{
"fieldName": "lastName",
"defaultValue": "xxxx"
},
{
"fieldName": "email",
"defaultValue": "xxxx#xxxx.com"
},
{
"fieldName": "phone",
"defaultValue": "xxxxxxxxxxxxxxxxx"
},
{
"fieldName": "companyName",
"defaultValue": "xxxx"
},
{
"fieldName": "companyAddresss",
"defaultValue": "xxxx xxxx"
}
],
"securityOptions": {
"passwordProtection": "NONE",
"kbaProtection": "NONE",
"webIdentityProtection": "NONE",
"protectOpen": false,
"internalPassword": "",
"externalPassword": "",
"openPassword": ""
}
},
"options": {
"noChrome": false,
"authoringRequested": false,
"autoLoginUser": false
}
}
You can use POST /agreements API for this purpose. The request body of this API call has an optional paramenter called "formFields", here you can provide form-fields that you want to embeed on your document before sending the agreement for signing, you can also customize those fields by setting different properties to them like location, defaultValue, readOnly and many more.
For you use-case, you can pass this optional parameter while creating the agreement in POST call, specifying the field's default value that you took from user in the previous steep and the exact location where you want that field to be placed on the document, If you don't want the user to change those fields you can even mark them as read only.
To make it more convenient for you PFB the request snippet that you should provide in your POST call -
{
"formFields": [{
"alignment": "LEFT",
"borderStyle": "SOLID",
"fontColor": "",
"fontName": "",
"borderColor": "",
"displayLabel": "",
"radioCheckType": "CIRCLE",
"calculatedExpression": "",
"backgroundColor": "#0715cd",
"formatData": "",
"displayFormat": "",
"contentType": "DATA",
"validated": false,
"calculated": false,
"maxLength": -1,
"locations": {
"height": 20,
"width": 20,
"pageNumber": 1,
"left": 100,
"top": 100
},
"minLength": -1,
"name": "Custom Field 2",
"inputType": "TEXT_FIELD",
"customDateFormat": "",
"specialFormula": "",
"required": true,
"defaultValue": "",
"minNumberValue": 0,
"maxNumberValue": 0,
"regularExpression": "",
"showOrHide": "SHOW",
"specialErrMsg": "",
"format": "NONE",
"fontSize": -1,
"masked": false,
"anyOrAll": "ANY",
"displayFormatType": "DEFAULT",
"conditions": {
"value": "",
"whenFieldLocationIndex": -1,
"fieldName": "",
"whenFieldName": "",
"operator": ""
},
"validationRule": "None",
"readOnly": false,
"borderWidth": -1,
"hidden": false,
"visibleOptions": [],
"hiddenOptions": [],
"tooltip": "This is a sample.",
"recipientIndex": 1
}]
}