Chilkat Online Tools

phpAx / DocuSign eSignature REST API / 13. Delete Existing Lock on an Envelope

Back to Collection Items

<?php

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

$http = new COM("Chilkat_9_5_0.Http");

// Adds the "Authorization: Bearer <access_token>" header.
$http->AuthToken = '<access_token>';
$http->SetRequestHeader('X-DocuSign-Edit','<DocuSignEdit><LockToken>{{lockToken}}</LockToken></DocuSignEdit>');

// resp is a Chilkat_9_5_0.HttpResponse
$resp = $http->QuickRequest('DELETE','https://domain.com/{{apiVersion}}/accounts/{{accountId}}/envelopes/{{envelopeId}}/lock');
if ($http->LastMethodSuccess == 0) {
    print $http->LastErrorText . "\n";
    exit;
}

print $resp->StatusCode . "\n";
print $resp->BodyStr . "\n";


?>

Curl Command

curl -X DELETE
	-H "Authorization: Bearer <access_token>"
	-H "X-DocuSign-Edit: <DocuSignEdit><LockToken>{{lockToken}}</LockToken></DocuSignEdit>"
https://domain.com/{{apiVersion}}/accounts/{{accountId}}/envelopes/{{envelopeId}}/lock

Postman Collection Item JSON

{
  "name": "13. Delete Existing Lock on an Envelope",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{accessToken}}",
          "type": "string"
        }
      ]
    },
    "method": "DELETE",
    "header": [
      {
        "key": "X-DocuSign-Edit",
        "value": "<DocuSignEdit><LockToken>{{lockToken}}</LockToken></DocuSignEdit>",
        "type": "text"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{baseUrl}}/{{apiVersion}}/accounts/{{accountId}}/envelopes/{{envelopeId}}/lock",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "{{apiVersion}}",
        "accounts",
        "{{accountId}}",
        "envelopes",
        "{{envelopeId}}",
        "lock"
      ]
    },
    "description": "This example will delete the lock we created on the envelope."
  },
  "response": [
  ]
}