Docusign REST API attachment - rest

What I am trying is, send a document with an attachment placeholder to the recipients so that, when they open the DocuSign mail, they can able to attach additional documents.
What I have done is, created an envelope and get the envelopId in the response
{
"status": "sent",
"emailSubject": "Example of one recipient, type signer",
"documents": [{
"documentId": "1",
"name": "contract.pdf",
"documentBase64": "base64 document bytes...",
}],
"recipients": {
"signers": [{
"name": "Lisa Simpson",
"email": "lisa#email.com",
"recipientId": "1",
"routingOrder": "1",
"tabs": {
"signHereTabs": [{
"xPosition": "150",
"yPosition": "200",
"documentId": "1",
"pageNumber": "1"
}],
}
}]
}
}
for attaching attachment, from the documentation I got
PUT /v2/accounts/{accountId}/envelopes/{envelopeId}/attachments
But, the thing I can not understand that, I create an envelope with a document and send it to the recipient, then I get an envelopeId
After that, why I should put the attachment placeholder? The envelope (DocuSign mail) already sent to the recipient.
How can I send an attachment placeholder via DocuSign REST API?

Envelope Attachments are metadata. I think you want to have the recipient upload and attach a file to the envelope? To do so, you add a "signerAttachment" tab. The tab will need to be placed somewhere on your document. The account configuration option to either append the uploaded file to the document hosting the signerAttachment tab or to add the file as another document in the envelope will affect how you get the uploaded document back.
"tabs": {
"signHereTabs": [{
"xPosition": "150",
"yPosition": "200",
"documentId": "1",
"pageNumber": "1"
}],
"signerAttachmentTabs":[{
"xPosition": "150",
"yPosition": "500",
"documentId": "1",
"pageNumber": "1"
}]
}

Related

How to properly pass the session_id to GA4 via Measurement protocol

GA4 purchase events are sent from client server via measurement protocol. But there is no session_id parameter in the queries, because of that source and medium is lost. We tried to pass the session_id parameter in MP request, but no data were received.
Example of submitted request:
{
"timestamp_micros": "1664522406546590",
"non_personalized_ads": false,
"events": [
{
"name": "purchase_balance_top_up",
"params": {
"user_id": "11111111",
"crm_id": "11111111",
"balance": 990,
"payment_method": "paymore"
}
}
],
"client_id": "1119492379.1652295143",
"session_id": "1664522264",
"user_id": "11111111"
}
Attaching a screenshot of the raw data from BigQuery on events sent by MP.
Screenshot of the raw data from BigQuery
Help, how to properly pass the session_id? Or how to make sure that events don't lose source param?
We found a solution to the problem. It's simple. The parameter "session_id" must be passed inside the array "params" of the event.
Here is an example of the correct event data array to be sent via measurement protocol:
{
"timestamp_micros": "1664522406546590",
"non_personalized_ads": false,
"events": [
{
"name": "purchase_balance_top_up",
"params": {
"user_id": "11111111",
"crm_id": "11111111",
"balance": 990,
"payment_method": "paymore",
"session_id": "1664522264"
}
}
],
"client_id": "1119492379.1652295143",
"user_id": "11111111"
}
Actually we are sending purchase events similarly with such request:
{
"client_id": "xxx.xxx",
"user_id" : "xxxx",
"non_personalized_ads": false,
"user_properties": {
"user_id_dimension": {
"value": "xxxx"
}
},
"events": [{
"name": "purchase",
"params": {
"currency": "USD",
"transaction_id": "T_12345",
"value": 12.21,
"engagement_time_msec": 10,
"session_id": "XXXXXXXXXX",
"items": [
{
"item_name": "Top-up"
}
]
}
}]
}
but we are not sending timestamp_micros. And we send 'user_id_dimension' as user property with the same value as 'user_id' parameter to observe user id further in Exploration reports. We've created user-scoped custom dimension in GA4 interface with dimension name User ID and this user property 'user_id_dimension'. Everything works

Posting address to Sharepoint list via REST

maybe I'm blind but I can't find a documentation how I post an address to an address field on a Sharepoint list via REST.
I always receive an "invalid Request" error. If I remove the address part of my JSON I'm able to fill out the other fields w/o problems. Just struggling with the address.
My request looks like that:
POST:
https://graph.microsoft.com/v1.0/sites/test.sharepoint.com,{siteid}/lists/{listid}/items/
Data:
{
"__metadata": {
"type": "SP.Data.listname.ListItem"
},
"fields":{
"Title": "API Test Project",
"Projekt_ID": "25",
"Typ": "Hinzugefügt",
"MengeNeu": "50/40/330",
"PosNr": "5/4/1",
"Adresse": {
"address": {
"city": "city",
"countryOrRegion": "DE",
"postalCode": "55512",
"state": "test",
"street": "test street 3"
},
"coordinates": {
"latitude": 44.72789001464844,
"longitude": 10.132317543029785
},
"displayName": "Test",
"locationUri": "https://www.bingapis.com/api/v6/localbusinesses/xxx?setLang=de",
"uniqueId": "https://www.bingapis.com/api/v6/localbusinesses/xxx?setLang=de"
}
}
}
Thanks

Telegram: no answer sent with answerInlineQuery

I make a POST request in response to an inline request with the following url
https://api.telegram.org/bot<some-token>/answerInlineQuery
and body
{
"inline_query_id": "${inline_query_id}",
"result": {
"InlineQueryResultArticle": [
{
"type": "article",
"id": "111",
"title": "some-title",
"input_message_content": {"message_text": "TEXT 1"}
}
]
}
}
Telegram responds 200 OK but there is no changes/answers in the bot.
I've also tried so many modifications of the body to sent. No one was successfull, but no one error I`ve got too.
Finally, this one works.
{
"inline_query_id": "${inline_query_id}",
"results": [{
"type": "article",
"id": "111",
"title": "some-title",
"input_message_content": {"message_text":"TEXT 1" }
}]
}
It needs results instead of result. And no definition of InlineQueryResultArticle

includeInDownload not work - Supplemental Document

I have an envelope with some documents, and one of them I do not want to be concatenated when you download the documents using the combined option. By reading the documentation, I found the includeInDownload attribute that can be passed to the documents when creating an envelope. But when I am creating the envelope, it seems that this attribute is being ignored, because after creating the envelope, I search the documents and the includeInDownload attribute is true. The envelope creation JSON:
{
"status": "created",
"emailSubject": "Example envelope",
"emailBlurb": "Example",
"documents": [{
"documentId": "1",
"name": "Test 1",
"remoteUrl": "URL"
},
{
"documentId": "2",
"name": "Test 2",
"remoteUrl": "URL",
"includeInDownload": "false"
}],
"recipients": {
"signers": [{
"name": "Lisa Simpson",
"email": "lisa#email.com",
"recipientId": "1",
"clientUserId": "1"
}]
}
}
You need to use the 'display' attribute as well for what we call "supplemental" documents.
If display=modal, the associated document is a supplement.
If display=inline, it’s not a supplement.

DocuSign REST API: Adding a Carbon Copy Recipient With Document Visibility

I can successfully add recipients to an existing DocuSign envelopes using REST API. When I add a signer to the envelope I am also able to specify the Document Visibility using excludedDocuments element. However I cannot set the document visibility using this parameter for the carbon copy recipient. My business requirement is that one carbon copy recipient should not receive some of the documents in the envelope.
Below is my JSON request:
{
"carbonCopies": [
{
"email": "123#hotmail.com",
"excludedDocuments": [
"1"
],
"name": "testCC1",
"recipientId": "5"
}
],
"signers": [
{
"email": "123#gmail.com",
"excludedDocuments": [
"1"
],
"name": "ssgmail signer",
"recipientId": "7"
}
]
}
Both the above recipients are added successfully. The first recipient(signer) is setup properly without visibility to document 1. The second recipient(carbon copy) is set up with full visibility.
Interestingly I can go to DocuSign interface and correct the envelope to remove the visibility for the carbon copy recipient. So I think DocuSign does support this functionality.
Any idea how I can add/change the visibility of individual documents for the carbon copy recipient for an existing envelope using the rest / soap API?
Note:-
Frankly I do not know how to query the document visibility in an envelope/recipient using API. For this I go to the "View/Modify Document Visibility" link in the correct envelop screen to check the current visibility setting.
I have set the the Document Visibility to "Must Sign to View Unless Sender Account" to enable the Document Visibility feature.
You are missing one property in the JSON Request, "enforceSignerVisibility":true, I have below request which is working fine with DocumentVisibility:
{
"documents": [
{
"documentBase64": "<Base64>",
"documentId": "1",
"fileExtension": "docx",
"name": "Challenge3"
},
{
"documentBase64": "<Base64>",
"documentId": "2",
"fileExtension": "docx",
"name": "Challenge4"
}
],
"emailSubject": "Test Subject",
"recipients": {
"signers": [
{
"email": "Signer#gmail.com",
"name": "Signer",
"recipientId": "2",
"routingOrder":1,
"excludedDocuments":[2],
"tabs": {
"signHereTabs": [
{
"documentId": "1",
"recipientId": "1",
"xPosition": "300",
"yPosition": "300",
"pageNumber":1
}
]
}
}
],
"carbonCopies": [
{
"email": "CC#gmail.com",
"name": "CC",
"recipientId": "1",
"routingOrder":1,
"excludedDocuments":[1]
}
]
},
"status": "sent",
"enforceSignerVisibility":true
}