> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.upwardli.com/llms.txt.

# Activate Payment Card Rewards Offer V 2

POST https://api.upwardli.com/v2/payment-cards/{payment_card_id}/rewards/{program_id}/offers/{offer_id}/activation/
Content-Type: application/json



Reference: https://developers.upwardli.com/api-access/api-reference/payment-cards/activate-payment-card-rewards-offer-v-2

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.upwardli.com` (Production, default)
- `https://api-sandbox.upwardli.com` (Sandbox)

## Request

### Path parameters

- `payment_card_id` (string, required)
- `program_id` (string, required)
- `offer_id` (string, required)

### Body (application/json)

This endpoint expects an any.

- `any`

## Response

### 201

- `type` (string, optional)
- `id` (string, optional)
- `relationships` (KardOfferRelationships, optional)
- `attributes` (KardOfferAttributes, optional)
- `address` (KardOfferAddress, optional, nullable)
- `coordinates` (KardOfferCoordinates, optional, nullable)

## Types

### KardOfferRelationships

- `category` (KardOfferRelationshipsCategory, optional)

### KardOfferAttributes

- `terms` (string, optional)
- `name` (string, optional)
- `purchaseChannel` (list of string, optional)
- `userReward` (KardOfferAttributesUserReward, optional)
- `assets` (list of KardOfferAttributesAssetsItems, optional)
- `startDate` (string, optional)
- `expirationDate` (string, optional)
- `minTransactionAmount` (KardOfferAttributesMinTransactionAmount, optional)
- `maxRewardAmount` (KardOfferAttributesMaxRewardAmount, optional)
- `websiteUrl` (string, optional)
- `isTargeted` (boolean, optional)
- `description` (string, optional)
- `components` (KardOfferAttributesComponents, optional, nullable)

### KardOfferAddress

- `street` (string, optional, nullable)
- `city` (string, optional, nullable)
- `state` (string, optional, nullable)
- `zipCode` (string, optional, nullable)

### KardOfferCoordinates

- `latitude` (double, optional, nullable)
- `longitude` (double, optional, nullable)

### KardOfferRelationshipsCategory

- `data` (list of KardOfferRelationshipsCategoryDataItems, optional)

### KardOfferAttributesUserReward

- `type` (string, optional)
- `value` (double, optional)

### KardOfferAttributesAssetsItems

- `url` (string, optional)
- `alt` (string, optional)
- `type` (string, optional)

### KardOfferAttributesMinTransactionAmount

- `type` (string, optional)
- `value` (integer, optional)

### KardOfferAttributesMaxRewardAmount

- `type` (string, optional)
- `value` (integer, optional)

### KardOfferAttributesComponents

- `shortDescription` (string, optional, nullable)
- `longDescription` (string, optional, nullable)
- `baseReward` (string, optional, nullable)
- `boostedReward` (string, optional, nullable)
- `cta` (KardOfferAttributesComponentsCta, optional, nullable)
- `tags` (list of string, optional)
- `detailTags` (list of string, optional)
- `logoFlare` (KardOfferAttributesComponentsLogoFlare, optional, nullable)
- `progressBar` (KardOfferAttributesComponentsProgressBar, optional, nullable)

### KardOfferRelationshipsCategoryDataItems

- `id` (string, required)
- `type` (string, required)

### KardOfferAttributesComponentsCta

- `buttonText` (string, optional)
- `buttonStyle` (string, optional)
- `startIcon` (string, optional, nullable)
- `actionType` (enum, optional, nullable)
  - Allowed values: `ACTIVATE`, `BOOST`

### KardOfferAttributesComponentsLogoFlare

- `borderColor` (string, optional, nullable)
- `badge` (KardOfferAttributesComponentsLogoFlareBadge, optional, nullable)

### KardOfferAttributesComponentsProgressBar

### KardOfferAttributesComponentsLogoFlareBadge

- `icon` (string, optional, nullable)
- `position` (string, optional, nullable)

## Examples

**Response**

```json
{
  "type": "string",
  "id": "string",
  "relationships": {
    "category": {
      "data": [
        {
          "id": "string",
          "type": "string"
        }
      ]
    }
  },
  "attributes": {
    "terms": "string",
    "name": "string",
    "purchaseChannel": [
      "string"
    ],
    "userReward": {
      "type": "string",
      "value": 1.1
    },
    "assets": [
      {
        "url": "string",
        "alt": "string",
        "type": "string"
      }
    ],
    "startDate": "string",
    "expirationDate": "string",
    "minTransactionAmount": {
      "type": "string",
      "value": 1
    },
    "maxRewardAmount": {
      "type": "string",
      "value": 1
    },
    "websiteUrl": "string",
    "isTargeted": true,
    "description": "string",
    "components": {
      "shortDescription": "string",
      "longDescription": "string",
      "baseReward": "string",
      "boostedReward": "string",
      "cta": {
        "buttonText": "string",
        "buttonStyle": "string",
        "startIcon": "string",
        "actionType": "ACTIVATE"
      },
      "tags": [
        "string"
      ],
      "detailTags": [
        "string"
      ],
      "logoFlare": {
        "borderColor": "string",
        "badge": {
          "icon": "string",
          "position": "string"
        }
      },
      "progressBar": {}
    }
  },
  "address": {
    "street": "string",
    "city": "string",
    "state": "string",
    "zipCode": "string"
  },
  "coordinates": {
    "latitude": 1.1,
    "longitude": 1.1
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.upwardli.com/v2/payment-cards/payment_card_id/rewards/program_id/offers/offer_id/activation/"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.upwardli.com/v2/payment-cards/payment_card_id/rewards/program_id/offers/offer_id/activation/';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.upwardli.com/v2/payment-cards/payment_card_id/rewards/program_id/offers/offer_id/activation/"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.upwardli.com/v2/payment-cards/payment_card_id/rewards/program_id/offers/offer_id/activation/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.upwardli.com/v2/payment-cards/payment_card_id/rewards/program_id/offers/offer_id/activation/")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.upwardli.com/v2/payment-cards/payment_card_id/rewards/program_id/offers/offer_id/activation/', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.upwardli.com/v2/payment-cards/payment_card_id/rewards/program_id/offers/offer_id/activation/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.upwardli.com/v2/payment-cards/payment_card_id/rewards/program_id/offers/offer_id/activation/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```