I have gone through the WEB Api for leads and not able to find a proper field to update Notes for Leads.
I have used SOAP for creating sales order where NoteText is exposed to update the notes and what is the relevant field in WEB
You need to use the note property.
The value for this property must be specified directly (without nested object with value property).
Below is an example of the body of the PUT request:
{
"LeadID": {
"value": 11973
},
"note": "Some very interesting note\nSome other text from new line."
}
Related
I have an envelope with a single document and two signers saved as a server-side template. The signers execute the agreement in a specific order. The document has a number of pre-fill fields in it.
I am trying to automate sending this agreement out using Integromat. Unfortunately, Integromat's module doesn't allow for pre-fill fields in templates, leaving me to create the API request manually. This is where I get stuck.
The closest I have come is the JSON request below, POSTed to:
…/v2.1/accounts/{accountId}/envelopes, with capitalised values filled in automatically:
{
"templateId": "TEMPLATE_ID",
"templateRoles": [
{
"email": "CLIENT_EMAIL",
"name": "CLIENT_NAME",
"roleName": "Recipient",
"tabs": {
"prefillTabs": {
"textTabs": [{
"tabLabel": "Prefill: Purpose",
"value": "PURPOSE_FIELD_DATA"
}]
}
}
}, {
"email": "STAFF_EMAIL",
"name": "STAFF_NAME",
"roleName": "Company"
}
],
"status": "sent"
}
The response from the API is:
The operation failed with an error. [400] A Required field is
incomplete. TabId: GUI_HERE
What I can't figure out is how to get the pre-fill data submitted since it's not tied to a particular signer. I have scoured the v2.1 API documentation but there is no scenario simple enough for this request.
Apologies if I am missing something obvious here; this is my first rodeo with DocuSign's API.
Do you have any idea what I am doing wrong or, better yet, what the body of the request should be for this (presumably) simple scenario?
Update: For pre-fill tabs, you need to have both the tabId and tabLabel, not enough to just have tabLabel like regular tabs.
My guess is a mismatch of the tabId field for the tabs on your template vs. what's in the API request:
You had this value in your request:
Prefill: Purpose
Does it match how the template was set?
I just tried this with composite templates.
When I added the prefill tabs to a recipient I received the error
Error code: INVALID_TAB_OPERATION.
Message: The Tab specified is not valid for the requested operation.
PrefillTab not allowed for recipient.
which makes sense since prefill tabs are associated with a document, not a recipient.
I tried by adding a document to the composite template, but that didn't work either.
I suggest that you use regular tabs. Mark them locked so they can't be changed. Mark them shared so every signer will see them. Then fill in their values as part of your Envelopes:create call.
Here's a live example of doing this. Note the text2 tab which is locked. (It should have the shared attribute set to true. You can add that from the Tabs/text toolbox on the left.)
Also see this blog post about templates.
Integromat does even without using DocuSign Rest APIs.
You can use Powerforms, it will save your cost for Rest APIs.
I recently did this, but issue is for first recipient, you need to send email manually with powerform link.
Here I dynamically construct PowerForm URL where I pass values to pre populate template fields.
To send email from integromat, you can configure Gmail module or any other email module and create html template where you can append Powerform URL in anchor tag
I'm trying to fill a document field via the Docusign Esignature REST API and having some trouble. I created an envelope from a template which has a PO # field:
I can see this field by making a GET call to /restapi/v2.1/accounts/#######/envelopes/466077c7-#######/documents/1/tabs:
validationPattern :
validationMessage :
shared : false
requireInitialOnSharedChange : false
requireAll : false
value :
required : true
locked : false
concealValueOnDocument : false
disableAutoSize : false
maxLength : 10
tabLabel : PO #
font : lucidaconsole
fontColor : black
fontSize : size9
localePolicy :
documentId : 1
recipientId : 0287bf0a-2951-4902-b63d-2f438d70a64a
pageNumber : 1
xPosition : 383
yPosition : 61
width : 166
height : 20
tabId : fd51de92-1ccb-4343-81bf-7fd2dbb9ae57
templateRequired : false
tabType : number
If I manually type a value into the field in the GUI and exit without sighing it is reflected in the value field in the same call. But when I try to update the field value via API by making a PUT call to /restapi/v2.1/accounts/######/envelopes/466077c7-######/documents/1/tabs with the payload set to:
{
"tabs": {
"numberTabs": [{
"tabLabel": "PO #",
"value": "123123123123"
}]
}
}
It fails with a rather vague error message that I don't understand:
{"errorCode":"UNSPECIFIED_ERROR","message":"Value cannot be null.\r\nParameter name: source"}
Looking at the API reference there is no field named "source" so I don't know how to make this work. I tried referring to the field several different ways in my JSON - by label, guid etc but nothing seems to work. Is there something wrong with my syntax?
In the DocuSign eSignature hierarchy of elements, envelopes contain documents and recipients and the tabs have to be associated with both. Therefore, there are two different endpoints that can be used to update the value of tabs, but they do not work the same way. You were trying to use the Envelopes::UpdateDocumentTabs method, whereas you should have used the Envelope::UpdateTabs method. The former method is used primarily for newer capabilities like document markup where the document can be modified even while locked (meaning currently opened for signing) while the latter is the correct way for an integration to update the content of the envelope tabs.
DocuSign's eSignature API uses PUT, not PATCH.
So the problem is that when you use the PUT method, you are updating all of the envelope's tabs for the given document or recipient. And you're setting existing tabs to null if they're not in your PUT call's request object. That's what's causing the error.
So the solution I use is to first list all of an envelope recipient's tabs, then update the data structure as needed, then update (put) the updated tab structure.
In this answer, I'm using the EnvelopeRecipientTabs resource. Your example uses the EnvelopeDocumentTabs resource. That should work ok, but note that the response data structure from the get is not the same as the request data structure for the put. So you'll need to munge the data structure as needed.
With the EnvelopeRecipientTabs resource, the response data structure from the get is the same as the request data structure for the put, so I believe less code is needed. Plus, within the DocuSign object model, tabs belong to recipients. They appear on documents but they belong to recipients.
I am trying to add a bug via REST API, but I can't find path for release notes field.
I checked official documentation for field list, but there are no info regarding release notes field
official documentation link
Following could should create opertion to insert info into release notes, but the Path is wrong
patchDocument.Add(
new JsonPatchOperation()
{
Operation = Operation.Add,
Path = "/fields/Microsoft.VSTS.Common.ReleaseNotes",
Value = "1"
}
);
Is there any unofficial documentation, or some library where I can see list of all available API endpoints for fields?
Short answer - yes! - the link that you have in the question is that API. However, that doc is the API reference for Get Work Item Types operation which contains just an example modelling the sample response one might get, and not the holistic list.
Before I begin, I'm assuming that Release Notes is a Custom-defined field here, as I don't see it in the default Work item field index.
To know what path for this (custom) field might look like, it'd help to execute the Get Work Item Types API for type bug within the scope of your project, and look at the response. This is what I got, for example:
where "dependsOn" is the custom field that I defined in the process used by my Project.
So for creating a bug, I provided the request body in the following format to the Create Work Item API:
[
{
"op": "add",
"path": "/fields/System.Title",
"from": null,
"value": "Sample Bug"
},
{
"op": "add",
"path": "/fields/Custom.dependsOn",
"value": "Auth"
}
]
and voila, had a bug created. Hope this helps!
I saw we have API calls to create / list Envelope Custom fields.
https://docs.docusign.com/esign/restapi/Accounts/AccountCustomFields/
Is there a call to create Document Custom field to populate in the Admin section , so that we can use it in any template .
https://admindemo.docusign.com/custom-fields
Admin section screen
I believe the operation you're looking for is Create Custom Tabs, which is defined here in the docs: https://docs.docusign.com/esign/restapi/CustomTabs/CustomTabs/create.
The following request creates a new Document Custom Field called "AccountID" that's a required Text Tab with maximum length of 10.
POST /v2/accounts/{accountId}/tab_definitions
{
"tabLabel": "AccountID",
"maximumLength": "10",
"required": "true",
"type": "Text",
}
After this request is executed, the new field (AccountID) is listed on the Document Custom Fields page within the DocuSign web UI (and is available for use in Templates and Envelopes).
How can I run a generic inquiry that I created via Acumatica's REST API? I was using the Inventory Summary Inquiry before but it was not returning all of the data I needed so we created a Generic Inquiry to return available for shipment quantity for ALL stock items. However I can't find how to get the data from this report via the API.
UPDATE:
I've tried creating an extended endpoint service and adding my endpoint for the report as described in I210 Documentation and then hitting via the REST API (which is not shown in I210). I added all of the result fields to the fields tab of the endpoint that I need returned.
Here are the details I used:
Extended Endpoint Name: MyInventoryAvailable
Endpoint version: 6.00.001
Endpoint: GetAvailableInventory
URL: https://mycompany.acumatica.com/entity/MyInventoryAvailable/6.00.001/GetAvailableInventory?$expand=Results
When I do a PUT request using the above details, this is the response I get:
{
"message": "The request is invalid.",
"modelState": {
"": [
"The request body should not be empty."
]
}
}
UPDATE 2
Here is the setup in Acumatica for the extended endpoint:
I've tried setting up a request body but with no success:
{
"InventoryID": {
"Value": "AB-CL-60"
},
"Description": {
"Value": ""
},
"Location": {
"Value": ""
},
"QtyHardAvailable":{
"Value": 0.0
},
"QtyOnHand":{
"Value": 0.0
},
"Warehouse":{
"Value": 0.0
}
}
When sending any request body, regardless of the content I recieve this error:
"exceptionMessage": "The given key was not present in the dictionary.",
"exceptionType": "System.Collections.Generic.KeyNotFoundException",
UPDATE 3 - Inquiry Structure
Here is the structure of the inquiry:
And here are the results in Acumatica's UI:
UPDATE 4
Expanded GetAvailableInventory node:
This is how I structure Generic-Inquiries in Web-Service-Endpoints.
While other Endpoints contain any number of Mapped Objects, the Generic-Enquiry Endpoints only have
Enter-Keys, Filter, Result, and Values-for-Update
The FIELDS for the ENDPOINT are the Filters (click POPULATE -> Filters). The example above does not seem to have any filters, which is fine, so this FIELDS should be empty.
To get the data from the Generic Inquiry, a "Detail" entity is added
click the Generic Inquiry
click "+ INSERT"
Fill in form with FieldName='GetAvailableInventoryResults', ObjectName='GetAvailableInventoryResults', ObjectType=Detail
Save
Now, add the results wanted by clicking on 'GetAvailableInventoryResults', then FIELDS (opens a popup). In the popup, select 'Result' and add all the fields you want. Don't select "Row Number" and "Selected" as these are not needed and can cause errors. SAVE.
To access the ENDPOINT, do a PUT to
.../GetAvailableInventory?$expand=GetAvailableInventoryResults
with a BODY of
{}
since this ENDPOINT does not define any Filters, but a PUT requires this to exist.
Why do I use "GetAvailableInventoryResults"? Well, because I ran into issues with multiple Generic-Inquiry Endpoint's having Details with the same name, so I make sure they are all unique.
Use GET instead of PUT. Your requirements fall under this. I supposed Generic Inquiry <> Inquiry Form. Hence the different outcome between GET vs PUT.