---
title: Expire Date
slug: expire-date
docTags: 
createdAt: 2023-09-22T04:47:01.512Z
---

:::ApiMethodV2
```json
{
  "name": "Expire Date",
  "method": "POST",
  "url": "Your endpoint here",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "uhSzf_IhPEIla1ObvmRHq",
        "language": "json",
        "code": "{\n      \"share_public\": \"string\",\n      \"read_event\": \"string\",\n      \"source_id\": \"string\",\n      \"destination_id\": \"string\",\n      \"token_id\": \"Integer\",\n      \"expiry_date\": \"string\"\n}",
        "customLabel": ""
      },
      {
        "id": "xnNxqwadz7rMo7wWyYkMK",
        "language": "curl",
        "code": "curl --location --request POST '' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\"share_public\":\"string\",\"read_event\":\"string\",\"source_id\":\"string\",\"destination_id\":\"string\",\"token_id\":\"Integer\",\"expiry_date\":\"string\"}'",
        "customLabel": ""
      },
      {
        "id": "3uuPRHrLL6aZUQMzNC2-7",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': '',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   },\n   body: JSON.stringify({\n      \"share_public\": \"string\",\n      \"read_event\": \"string\",\n      \"source_id\": \"string\",\n      \"destination_id\": \"string\",\n      \"token_id\": \"Integer\",\n      \"expiry_date\": \"string\"\n   })\n\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "PXe81mgDbOb_NQ3BOeN6W",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"share_public\": \"string\",\n   \"read_event\": \"string\",\n   \"source_id\": \"string\",\n   \"destination_id\": \"string\",\n   \"token_id\": \"Integer\",\n   \"expiry_date\": \"string\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "Cz6j6eGRItBmLZbc7WKDC",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"\"\n\npayload = json.dumps({\n   \"share_public\": \"string\",\n   \"read_event\": \"string\",\n   \"source_id\": \"string\",\n   \"destination_id\": \"string\",\n   \"token_id\": \"Integer\",\n   \"expiry_date\": \"string\"\n})\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "S2UyPVoGaTq3-TCDUq5uG",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Content-Type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"share_public\": \"string\",\n   \"read_event\": \"string\",\n   \"source_id\": \"string\",\n   \"destination_id\": \"string\",\n   \"token_id\": \"Integer\",\n   \"expiry_date\": \"string\"\n})\n\nresponse = http.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "uhSzf_IhPEIla1ObvmRHq"
  },
  "results": {
    "languages": [
      {
        "id": "VXhl5Vd88bCKccPBZtfee",
        "language": "200",
        "customLabel": "",
        "code": "{\n   \"success\": true,\n   \"message\": \"Success\",\n}\n"
      },
      {
        "id": "mmiOpllePTo62xu70IVvh",
        "language": "413",
        "customLabel": "",
        "code": "{\n  \"success\": false,\n  \"errors\": [\n    {\n      \"code\": 413,\n      \"message\": \"Destination ID Unknown\"\n    }\n  ]\n}\n"
      },
      {
        "id": "6gqu_SlVo4rEr6zYFqS26",
        "language": "428",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"428\",\n    \"message\": \"Token ID doesn't match\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "8si5mMzpyA_KKUr-n6Bwf",
        "language": "500",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"500\",\n    \"message\": \"internal Server Error\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "PG7eiJL6PE0Rfz_zT381Q",
        "language": "502",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"502\",\n    \"message\": \"Bad Gateway\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "CFcdyzhJxnyTHOgAQEbOS",
        "language": "503",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"503\",\n    \"message\": \"Service Unavailable\"\n  }\n}",
        "customLabel": ""
      },
      {
        "id": "KX9wm_QXlcboYvycM9nv0",
        "language": "504",
        "code": "{\n  \"success\": \"false\",\n  \"errors\": {\n    \"code\": \"504\",\n    \"message\": \"Gateway Timeout\"\n  }\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "KX9wm_QXlcboYvycM9nv0"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "share_public",
        "kind": "required",
        "type": "string",
        "description": "Public keys are accessible in your PayDocker account under integration menu.",
        "children": []
      },
      {
        "name": "read_event",
        "kind": "required",
        "type": "string",
        "description": "A condition to allow execution of the action that is connected to the token. The condition would be \"token.expiry_updated\".",
        "children": []
      },
      {
        "name": "source_id",
        "kind": "required",
        "type": "string",
        "description": "Your PayDocker Account ID assigned upon account creation (e.g. PDR1). It is case sensitive.",
        "children": []
      },
      {
        "name": "destination_id",
        "kind": "required",
        "type": "string",
        "description": "Property ID (e.g. ID 001) generated in your platform. It represents the token recipient.",
        "children": []
      },
      {
        "name": "token_id",
        "kind": "required",
        "type": "Integer",
        "description": "The unique identifier associated with the token that the user is requesting a modification for. (e.g. 2908926013012565)",
        "children": []
      },
      {
        "name": "expiry_date",
        "kind": "optional",
        "type": "string",
        "description": "The date on which the token becomes invalid, after which it cannot be used or collected by the recipient.\n\nThe format is DD-MM-YYYY, e.g. 25-12-2023\n\nSelectable date range is same or greater than available date, essentially until the last day of the month one year after the chosen available date.\n\nE.g. Available Date - 18 Oct 2023, Expiry Date - 31 Oct 2024.",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

token.available\_updated
