---
title: Activate Offer By Id
slug: mihai-tests/activate-offer-by-id
createdAt: 2025-05-02T10:16:35.481Z
---

{
  "id": "4UutM4R6TI2VwsSrUoDkl",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://api.sandbox.tripleup.dev/partner/card-accounts/{cardholder_id}/offers/activation/id/{offer_id}",
    "servers": [
      {
        "url": "https://api.sandbox.tripleup.dev/partner/card-accounts/{cardholder_id}/offers/activation/id/{offer_id}",
        "description": "triple Sandbox"
      }
    ],
    "name": "Activate Offer By Id",
    "description": "Activate an offer by id for a specified card account\n",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "cardholder_id",
          "type": "object",
          "example": "triple-abc-123",
          "description": "The triple-defined ID for the entity.",
          "customType": "EntityId",
          "schema": [],
          "modelRef": "#/components/schemas/EntityId"
        },
        {
          "kind": "required",
          "name": "offer_id",
          "type": "object",
          "example": "triple-abc-123",
          "description": "The triple-defined ID for the entity.",
          "customType": "EntityId",
          "schema": [],
          "modelRef": "#/components/schemas/EntityId"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK - Offer Activation Request Succeeded",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "ok",
                "kind": "required",
                "type": "boolean",
                "description": "The Offer Activation Request succeeded.",
                "example": ""
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "TripleBadRequestError",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The request is malformed."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleBadRequestError>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "TripleNotAuthenticatedError",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "Client authentication failed."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleNotAuthenticatedError>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "TripleInvalidPathError",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The url path or path parameter is invalid."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleInvalidPathError>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "409",
        "description": "TripleIntegrityError",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The request was well-formed but violated entity integrity constraints."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleIntegrityError>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "415",
        "description": "TripleUnsupportedMediaType",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The request defined an unsupported media type."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleUnsupportedMediaType>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "TripleUnprocessableEntity",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The request was well-formed but could not be processed."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleUnprocessableEntity>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "TripleInternalServerError",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "Triple was unable to process the request due to an internal error."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleInternalServerError>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "501",
        "description": "TripleNotImplementedError",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The request failed because it requires a feature that is not yet implemented."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleNotImplementedError>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "503",
        "description": "TripleServiceUnavailable",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The request failed due to a triple service interruption."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleServiceUnavailable>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://api.sandbox.tripleup.dev/partner/card-accounts/{cardholder_id}/offers/activation/id/{offer_id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.sandbox.tripleup.dev/partner/card-accounts/{cardholder_id}/offers/activation/id/{offer_id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.sandbox.tripleup.dev/partner/card-accounts/{cardholder_id}/offers/activation/id/{offer_id}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.sandbox.tripleup.dev/partner/card-accounts/{cardholder_id}/offers/activation/id/{offer_id}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK - Offer Activation Request Succeeded\n{\n  \"ok\": false\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// TripleBadRequestError\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// TripleNotAuthenticatedError\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// TripleInvalidPathError\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-4-409",
          "language": "409",
          "code": "// TripleIntegrityError\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-5-415",
          "language": "415",
          "code": "// TripleUnsupportedMediaType\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-6-422",
          "language": "422",
          "code": "// TripleUnprocessableEntity\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-7-500",
          "language": "500",
          "code": "// TripleInternalServerError\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-8-501",
          "language": "501",
          "code": "// TripleNotImplementedError\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-9-503",
          "language": "503",
          "code": "// TripleServiceUnavailable\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "L9-G5m_WTYeAGzWwuKsO0",
      "type": "paragraph",
      "children": [
        {
          "text": "Activate an offer by id for a specified card account"
        }
      ]
    }
  ]
}