---
title: Update a fulfilment
slug: docs/demo/update-a-fulfilment
description: Learn how to make a PATCH request to a targeted API endpoint using the powerful curl command. This document offers a comprehensive code example, complete with headers for JSON data acceptance and transmission. Discover how to structure and send a JSON pay
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "YYCleIQKLzHbvJ8sxNm9Z",
  "data": {
    "url": "https://api.fictive.com/REST/api/accounts/{accountReference}/fulfilments/{fulfilmentReference}",
    "name": "Update a fulfilment",
    "method": "PATCH",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "accountReference",
          "type": "string",
          "description": "Reference identifier of the eSuite account"
        },
        {
          "kind": "required",
          "name": "fulfilmentReference",
          "type": "string",
          "description": "Fulfilment resource identifier"
        }
      ],
      "queryParameters": [],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "patchRequest",
          "type": "array",
          "schema": [
            {
              "kind": "optional",
              "name": "value",
              "type": "object",
              "schema": [],
              "modelRef": "#/definitions/System.Object",
              "customType": "System.Object"
            },
            {
              "kind": "optional",
              "name": "path",
              "type": "string",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "op",
              "type": "string",
              "example": ""
            },
            {
              "kind": "optional",
              "name": "from",
              "type": "string",
              "example": ""
            }
          ],
          "modelRef": "#/definitions/Microsoft.AspNet.JsonPatch.JsonPatchDocument[FictiveGlobal.Api.Rest.Dtos.v1.Patch.PaymentInstructions.FulfilmentPatchModel]",
          "customType": "Microsoft.AspNet.JsonPatch.JsonPatchDocument[FictiveGlobal.Api.Rest.Dtos.v1.Patch.PaymentInstructions.FulfilmentPatchModel]",
          "isExpanded": true
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "isExpanded": true,
        "statusCode": "204",
        "description": "No Content",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "400",
        "description": "• The following custom parameter(s) are not configured:\r\n            <br />• Cannot provide the same parameter name multiple times\r\n            <br />• Unable to amend or remove the following parameter(s) as no value currently exists:\r\n            <br />• Unable to add the following parameter(s) as a value already exists:",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "401",
        "description": "API Authentication Failure: Invalid Authentication Type/Credentials Provided",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "• Account cannot be found\r\n            <br />• Fulfilment cannot be found",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will provide the ability to update an existing fulfilment within the platform",
    "examples": {
      "languages": [
        {
          "id": "Eb8pRpxSZw7Ba6KCTVs9s",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url https://api.fictive.com/REST/api/accounts/{accountReference}/fulfilments/{fulfilmentReference} \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-version: string' \\\n     --data '[\n     {}\n     ]'"
        },
        {
          "id": "aep0VpSM5Fo1bsQp8LOyz",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-version\", \"string\");\n\nvar raw = JSON.stringify([\n   {}\n]);\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/accounts/{accountReference}/fulfilments/{fulfilmentReference}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "bTp9MD9rnqacofcAWIVmz",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/accounts/{accountReference}/fulfilments/{fulfilmentReference}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-version\"] = \"string\"\nrequest.body = JSON.dump([\n   {}\n])\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "0sCs2srDpEEUj22ehKg3J",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/accounts/{accountReference}/fulfilments/{fulfilmentReference}\"\n\npayload = json.dumps([\n   {}\n])\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"PATCH\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Eb8pRpxSZw7Ba6KCTVs9s"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-204",
          "language": "204",
          "code": "// No Content\n"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// • The following custom parameter(s) are not configured:\r\n            • Cannot provide the same parameter name multiple times\r\n            • Unable to amend or remove the following parameter(s) as no value currently exists:\r\n            • Unable to add the following parameter(s) as a value already exists:\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// API Authentication Failure: Invalid Authentication Type/Credentials Provided\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// • Account cannot be found\r\n            • Fulfilment cannot be found\n"
        }
      ],
      "selectedLanguageId": "response-0-204"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}