How to track Signer's IP Address in DocuSign - docusignapi

We need a IP address of Signer for audit purpose. So how we can track a IP of signer apart form certificate of completion.

Use the listAuditEvents api to retrieve the envelope audit history. ClientIPAddress is one of the properties present in the envelope audit history.
GET /v2/accounts/{accountId}/envelopes/{envelopeId}/audit_events
{
"auditEvents": [
{
"eventFields": [
{ "name": "logTime", "value": "2017-05-12T14:27:20.3541245Z" },
{ "name": "UserName", "value": "Jane Doe" },
{ "name": "UserId", "value": "c780706d-ac28-45a8-9c05-4adc6860e488" },
{ "name": "Action", "value": "Signed" },
{ "name": "Message", "value": "The envelope was Signed by Jane Doe" },
{ "name": "EnvelopeStatus", "value": "created" },
{ "name": "ClientIPAddress", "value": "128.384.222.11" },
{ "name": "Language", "value": "english" }
]
},
]
}

Related

Error submitting Sales Order to Acumatica

I'm testing an order submission via Postman, just passing this JSON structure to /SalesOrders.
{
"Details": [
{
"InventoryID": {
"value": "TEST-SKU"
},
"WarehouseID": {
"value": "BUF"
},
"LineNbr": {
"value": 1
},
"OrderQty": {
"value": 2
},
"UnitPrice": {
"value": 285
}
}
],
"CustomerID": {
"value": "0000003759"
},
"Hold": {
"value": false
},
"Description": {
"value": "WEBTEST-1000123456"
},
"ExternalRef": {
"value": "1000123456"
},
"BillToAddressOverride": {
"value": true
},
"ShipToAddressOverride": {
"value": true
},
"Totals": {
"FreightCostIsuptodate": {
"value": true
},
"OverrideFreightPrice": {
"value": true
},
"FreightCost": {
"value": 41.89
},
"Freight": {
"value": 41.89
}
},
"PaymentMethod": {
"value": "APSCRCARD"
},
"NewCard": {
"value": true
},
"PaymentCardIdentifier": {
"value": "APSCRCARD:****-****-****-1234"
},
"PaymentRef": {
"value": "12345678910"
},
"ShipToContact": {
"Attention": {
"value": "Test User"
},
"BusinessName": {
"value": "Testing Company"
}
},
"BillToAddress": {
"AddressLine1": {
"value": "123 Test Lane"
},
"AddressLine2": {
"value": ""
},
"AddressLine3": {
"value": ""
},
"AddressLine4": {
"value": ""
},
"City": {
"value": "Buffalo"
},
"Country": {
"value": "US"
},
"PostalCode": {
"value": "14216"
},
"State": {
"value": "NY"
},
"rowNumber": {
"value": 1
}
},
"ShipToAddress": {
"AddressLine1": {
"value": "123 Test Lane"
},
"AddressLine2": {
"value": ""
},
"AddressLine3": {
"value": ""
},
"AddressLine4": {
"value": ""
},
"City": {
"value": "Buffalo"
},
"Country": {
"value": "US"
},
"PostalCode": {
"value": "14216"
},
"State": {
"value": "NY"
},
"rowNumber": {
"value": 1
}
},
"ShippingSettings": {
"shipVia": {
"value": "BUFFEDEX2DAY"
}
}
}
It's getting hung up when I'm trying to pass over cc information and I'm not exactly sure what to do. It says the Payment Card Identifier field is empty but as you can see I'm passing a value to it.
"SalesOrder.PaymentCardIdentifier: 'Identifier' cannot be empty.\nInserting 'CustomerPaymentMethodC' record raised at least one error. Please review the errors."
I'm not sure if I need to be using a different value but I'm repurposing one that I received on a call to get Sales Orders from Acumatica.
I was curious if I potentially have to add the CustomerPaymentMethod before adding the order? Any help around this would be greatly appreciated.
The Validation message mentions SalesOrder.PaymentCardIdentifier being empty not PaymentCardIdentifier so are you sure you have the correct request format?
Please check the Endpoint to see how this field is being defined in the SalesOrder Entity. That field is not part of the default endpoint - so I can't check it, but perhaps the name is spelled differently.
So it turned out, regarding this, that I was referencing an incorrect endpoint in our system (a custom one as opposed to Default).
I also had to add payment to the Payment sub-object as opposed to the Sales Order object directly.
Thank you everyone for the assistance!

Issues with Acumatica REST Contract-Based API SalesInvoice Entity 18.200.001

Automating creation of Sales Invoice via Rest API
Unable to get CustomerLocation to populate
In the WebService EndPoint the Mapped Object and Mapped Fields are blank for this item
Has any one successfully used this API to modify Location?
Does any one know if I have a formatting error in my JSON for Linked Entities, it matches the documentation but may not be up to date?
Tried several formats of JSON based on the guide and experience including Linked, Summary, Custom and Detail
Tried both BillToSettings and BillingSetting Entities
Searched Known issues, Newton JSon
"Type": { "value": "Invoice" },
"CustomerID": { "value": "C0004055" },
/// bit does not create in Acumatica
"BillToSettings": { "CustomerLocation": { "value": "67217" } },
/// "BillingSettings" : {"CustomerLocation" : {"value" : "67217"}
/// also LocationID, CustomerLocationID and many combinations there of
"CustomerOrder": { "value": 1942 },
"Date": { "value": "2/14/2019" },
"Description": { "value": "SO S048773" },
"Details": [
{
"InventoryID": { "value": "POLLING-HOSTING" },
"TransactionDescr": { "value": "GPRS Monitoring" },
"UOM": { "value": "PNTS" },
"Qty": { "value": "3" },
"UnitPrice": { "value": "68.25" }
},
{
"InventoryID": { "value": "AIRTIME" },
"TransactionDescr": { "value": "GPRS Airtime" },
"UOM": { "value": "EACH" },
"Qty": { "value": "3" },
"UnitPrice": { "value": "20" }
}
]
I expect the Default MAIN location to be overridden with 67217 instead every record shows main
If I add the address Override fields (as below) then I get data for them on the successful creation of the invoice but no CustomerLocation data is returned.
Nor does the LocationID update correctly
BillingSettings = new
{
BillToAddressOverride = new {value = true},
BillToContactOverride = new { value = true },
CustomerLocation = new { value = "67217"}
},
I tried to use your JSON example on a clean SalesDemo install of 2019R1 and could replicate the same issue that you're experiencing.
I think it has to do with the CustomerLocation field not being mapped in the Default 18.200.001 endpoint. It actually makes sense if we look at the response object - there is no CustomerLocation field in the response either.
First Attempt, without extending the API endpoint:
{
"Type": {
"value": "Invoice"
},
"CustomerID": {
"value": "ABARTENDE"
},
"Date": {
"value": "5/10/2019"
},
"Description": {
"value": "Test SalesInvoice Creation"
},
"BillingSettings" : {
"CustomerLocation" : {
"value" : "VEGAS"
}
}
}
Response from the first attempt:
"BillingSettings": {
"BillToAddress": {
"AddressLine1": {
"value": "201 Lower Notch Rd"
},
"AddressLine2": {},
"City": {
"value": "Little Falls"
},
"Country": {
"value": "US"
},
"PostalCode": {
"value": "07424"
},
"State": {
"value": "NJ"
}
},
"BillToAddressOverride": {
"value": false
},
"BillToContact": {
"Attention": {
"value": "Accounts Receivable"
},
"BusinessName": {
"value": "USA Bartending School"
},
"Email": {
"value": "barkeep#usabartend.con"
},
"Phone1": {
"value": "+1 (908) 532-9522"
}
},
"BillToContactOverride": {
"value": false
}
}
If you extend the endpoint and implement the Location field which can be found under the Invoice Summary selection when populating the field, you should be able to achieve your intended outcome. PS. I added the Location on the SalesInvoice object itself, and not on the BillingSettings object:
Second Request, the extended endpoint includes the Location field that was added:
{
"Type": {
"value": "Invoice"
},
"CustomerID": {
"value": "ABARTENDE"
},
"Date": {
"value": "5/10/2019"
},
"Description": {
"value": "Test SalesInvoice Creation"
},
"Location" : {
"value" : "VEGAS"
}
}
Second Response:
{
"Amount": {
"value": 0
},
"Balance": {
"value": 0
},
"BillingSettings": {
"BillToAddressOverride": {
"value": false
},
"BillToContactOverride": {
"value": false
}
},
"Currency": {
"value": "USD"
},
"CustomerID": {
"value": "ABARTENDE"
},
"Date": {
"value": "2019-05-10T00:00:00+00:00"
},
"Description": {
"value": "Test SalesInvoice Creation"
},
"DueDate": {
"value": "2019-06-09T00:00:00+02:00"
},
"Hold": {
"value": false
},
"Location": {
"value": "VEGAS"
},
"ReferenceNbr": {
"value": "AR006994"
},
"Status": {
"value": "Balanced"
},
"Type": {
"value": "Invoice"
}
}
As to whether the CustomerLocation holds any meaningful value/purpose, I'm not sure, so I left it in the BillingSettings as is.

Can AWS Cognito adminCreateUser send a temporary password?

The Amazon Cognito adminCreateUser documentation on TemporaryPassword states:
This parameter is not required. If you do not specify a value, Amazon
Cognito generates one for you.
How does the user ever get it? At first I thought it would get emailed to the user, but that doesn't seem to be the case. Then I thought maybe it would come back in the response. Nope.
Here's the code I'm calling in my node JS Lambda function:
adminCreateUser(
{
"UserPoolId": "us-east-1_XXXXXXXX",
"Username": "roger__mailinator.com",
"DesiredDeliveryMediums": [
"EMAIL"
],
"ForceAliasCreation": false,
"MessageAction": "SUPPRESS",
"UserAttributes": [
{
"Name": "given_name",
"Value": "Rodger"
},
{
"Name": "family_name",
"Value": "Ribbit"
},
{
"Name": "name",
"Value": "Rodger Ribbit"
},
{
"Name": "email",
"Value": "roger#mailinator.com"
},
{
"Name": "custom:title",
"Value": "Animation Designer"
},
{
"Name": "custom:company",
"Value": "76"
}
]
}, function(error, data) {
if (error) {
console.log("Error adding user to cognito: " + error, error.stack);
//...
} else {
console.log("Received back from cognito: " + JSON.stringify(data));
//...
}
});
and here's the response I get:
Received back from cognito:
{
"User": {
"Username": "roger__mailinator.com",
"Attributes": [
{
"Name": "custom:title",
"Value": "Animation Designer"
},
{
"Name": "sub",
"Value": "1cd612a0-0da0-4e7b-84c7-30570fab80a9"
},
{
"Name": "name",
"Value": "Rodger Ribbit"
},
{
"Name": "given_name",
"Value": "Rodger"
},
{
"Name": "family_name",
"Value": "Ribbit"
},
{
"Name": "email",
"Value": "roger#mailinator.com"
},
{
"Name": "custom:company",
"Value": "76"
}
],
"UserCreateDate": "2017-03-30T18:31:34.283Z",
"UserLastModifiedDate": "2017-03-30T18:31:34.283Z",
"Enabled": true,
"UserStatus": "FORCE_CHANGE_PASSWORD"
}
}
Where does the password go? Are we supposed to guess it? :-)
I think it's because you are passing "MessageAction": "SUPPRESS". That would suppress the sending of the email.
The temporary password is emailed to the user and he needs to reset it upon the first login.
The answer is that the user email needs to be verified before they'll receive it. So you need to modify the user attribute on email to be verified. See: https://stackoverflow.com/a/43033722/491553

Docu Sign Rest API Sender View Issue for in Process Envelope

We are trying to use embedded signing to display the sender view in iframe.
If an envelope has 2 signers and one of them have signed the envelope we want to display the current state of the envelope to the sender.
Is there any API available to display current state of envelope to the sender.
Per the comment that you've added to your answer, the simplest way to retreive current status of all recipients for an Envelope is the GET Recipients API call:
GET https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{{envelopeId}}/recipients?include_tabs=false&include_extended=false
The response will contain an array of recipient objects for each recipient type, and each recipient object has a status property that indicates the current status of the recipient. For example, here's a response for an Envelope that contains 2 Signers -- the first has Completed signing, the second has not (status=delivered):
{
"signers": [
{
"signInEachLocation": "false",
"name": "Abby Adams",
"email": "abby#outlook.com",
"recipientId": "04cdba57-5383-4917-9081-e9dad16ba8a9",
"recipientIdGuid": "04cdba57-5383-4917-9081-e9dad16ba8a9",
"requireIdLookup": "false",
"userId": "1860fbdc-96ee-4d14-8353-c0213cd2728f",
"routingOrder": "1",
"roleName": "Signer 1",
"status": "completed",
"signedDateTime": "2014-04-24T14:00:10.5800000Z",
"deliveredDateTime": "2014-04-24T13:59:35.2330000Z",
"templateLocked": "false",
"templateRequired": "false"
},
{
"signInEachLocation": "false",
"name": "Adam Smith",
"email": "adam#outlook.com",
"recipientId": "fb3708f5-552f-410e-8029-9abbb5214196",
"recipientIdGuid": "fb3708f5-552f-410e-8029-9abbb5214196",
"requireIdLookup": "false",
"userId": "ecd6f430-5c08-4a4c-876e-ba7ad95f13dc",
"routingOrder": "2",
"status": "delivered",
"deliveredDateTime": "2014-04-24T14:00:28.1930000Z"
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": [],
"recipientCount": "2",
"currentRoutingOrder": "2"
}
If you need more detailed audit trail information, you can use the GET Audit Events API call:
GET https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{{envelopeId}}/audit_events
The Response to this request will contain an array of auditEvent objects. Each auditEvent object is composed of a single property -- eventFields -- which is an array of name/value pairs.
For example, the following response shows that Mary Smith created the envelope and sent the envelope, and then John Doe viewed the envelope and declined the envelope:
{
"auditEvents": [
{
"eventFields": [
{
"name": "logTime",
"value": "2014-05-23T03:07:52.7741974Z"
},
{
"name": "Source",
"value": "api"
},
{
"name": "UserName",
"value": "Mary Smith"
},
{
"name": "UserId",
"value": "bc266e97-83a6-472c-XXXX-ebad10e4cc6a"
},
{
"name": "Action",
"value": "Registered"
},
{
"name": "Message",
"value": "The envelope was created by Mary Smith"
},
{
"name": "EnvelopeStatus",
"value": "created"
},
{
"name": "ClientIPAddress",
"value": "XX.XX.XX.XXX"
},
{
"name": "Information",
"value": ""
},
{
"name": "GeoLocation",
"value": ""
},
{
"name": "Language",
"value": "english (us)"
}
]
},
{
"eventFields": [
{
"name": "logTime",
"value": "2014-05-23T03:07:53.6321919Z"
},
{
"name": "Source",
"value": "api"
},
{
"name": "UserName",
"value": "Mary Smith"
},
{
"name": "UserId",
"value": "bc266e97-83a6-472c-a25b-ebad10e4cc6a"
},
{
"name": "Action",
"value": "Sent Invitations"
},
{
"name": "Message",
"value": "Mary Smith sent an invitation to John Doe [john#outlook.com]"
},
{
"name": "EnvelopeStatus",
"value": "sent"
},
{
"name": "ClientIPAddress",
"value": "XX.XX.XX.XXX"
},
{
"name": "Information",
"value": "John Doe [john#outlook.com]"
},
{
"name": "GeoLocation",
"value": ""
},
{
"name": "Language",
"value": "english (us)"
}
]
},
{
"eventFields": [
{
"name": "logTime",
"value": "2014-05-23T03:12:17.9412976Z"
},
{
"name": "Source",
"value": "web"
},
{
"name": "UserName",
"value": "John Doe"
},
{
"name": "UserId",
"value": "03c8a856-c0ae-41bf-943d-ac6e92db66a8"
},
{
"name": "Action",
"value": "Viewed"
},
{
"name": "Message",
"value": "John Doe viewed the envelope [documents:(Mutual NDA with anchors.pdf)]"
},
{
"name": "EnvelopeStatus",
"value": "sent"
},
{
"name": "ClientIPAddress",
"value": "XX.XX.XX.XXX"
},
{
"name": "Information",
"value": "John Doe viewed the envelope [documents:(Mutual NDA with anchors.pdf)]"
},
{
"name": "GeoLocation",
"value": ""
},
{
"name": "Language",
"value": "english (us)"
}
]
},
{
"eventFields": [
{
"name": "logTime",
"value": "2014-05-23T03:12:30.3432181Z"
},
{
"name": "Source",
"value": "web"
},
{
"name": "UserName",
"value": "John Doe"
},
{
"name": "UserId",
"value": "03c8a856-c0ae-41bf-943d-ac6e92db66a8"
},
{
"name": "Action",
"value": "Declined"
},
{
"name": "Message",
"value": "John Doe declined the envelope [Reason: I changed my mind.]"
},
{
"name": "EnvelopeStatus",
"value": "declined"
},
{
"name": "ClientIPAddress",
"value": "XX.XX.XX.XXX"
},
{
"name": "Information",
"value": "Reason: I changed my mind."
},
{
"name": "GeoLocation",
"value": ""
},
{
"name": "Language",
"value": "english (us)"
}
]
}
]
}
The DocuSign REST API Guide (https://10226ec94e53f4ca538f-0035e62ac0d194a46695a3b225d72cc8.ssl.cf2.rackcdn.com/rest-api-guide-v2.pdf) contains information about both of the API calls.
--- UPDATE ---
You can retrieve an Envelope's document(s) at any time (i.e., regardless of signer/envelope status) by using the "GET Envelope Documents" API request:
GET https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{{envelopeId}}/documents/combined
The response will contain a byte stream that represents the contents of the Envelope document(s) in PDF format -- your application can then simply write that byte stream to the browser to display the document(s). See page 177 of the REST API Guide for details about this operation.
Regarding your question about customizing the "Embedded Sender View" -- it's not possible to customize the Sender view via the API -- i.e., an 'embedded Sender will always have the ability to do everything that they'd be able to do if sending directly via the DocuSign web console.
Once a DocuSign envelope is in progress (meaning it has been sent and is NOT in draft state) then you can not generate the sender view. The sender view is used to tag the envelope, and if the envelope has already been sent then no more tagging is allowed.
So to answer your question, no it's not possible to generate a sender view on a sent envelope, it's only possible to generate a signing URL at that point, and you can only generate the signing URL for recipients who have their clientUserId property set.
More on Embedded Signing here:
https://www.docusign.com/developer-center/explore/features/embedding-docusign

Track Envelopes which have used “Change Signer” option

How to track Envelopes which have used “Change Signer” option in DocuSign API c#?
Not sure it's possible to do a search for (i.e., retrieve envelopeIds) for all envelopes where "Change Signer" event has occurred. However, to determine whether the "Change Signer" event has occurred for a specific envelope, you can use the Get Envelope Audit Events operation (REST API):
GET https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{{envelopeId}}/audit_events
If a "Change Signer" event has occured for the specified envelope, the API response will contain info about this event:
{
"auditEvents": [
...
{
"eventFields": [
{
"name": "logTime",
"value": "2014-02-27T14:41:36.0380469Z"
},
{
"name": "Source",
"value": "web"
},
{
"name": "UserName",
"value": "John Doe"
},
{
"name": "Action",
"value": "Reassign"
},
{
"name": "Message",
"value": "John Doe reassigned the envelope to Mary Smith [marysemail#outlook.com] routing order 1"
},
{
"name": "EnvelopeStatus",
"value": "sent"
},
{
"name": "ClientIPAddress",
"value": "65.11.28.123"
},
{
"name": "Information",
"value": "Mary Smith [marysemail#outlook.com] routing order 1"
},
{
"name": "GeoLocation",
"value": ""
},
{
"name": "Language",
"value": "english (us)"
}
]
...
}
]
The response will contain info for all events that have occured for the specified envelope -- the "Change Signer" event is the one where Action = Reassign (as shown above). See the REST API guide (p127) for more info about the Get Envelope Audit Events operation (http://www.docusign.com/sites/default/files/REST_API_Guide_v2.pdf).

Resources