> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Reward Object

<div class="prose dark:prose-invert custom-html">
  <h2 id="reward">Reward</h2>

  <table>
    <thead>
      <tr>
        <th>Attributes</th>
        <th>Description</th>
      </tr>
    </thead>

    <tbody>
      <tr>
        <td>
          <p>
            id

            <br />

            <code>string</code>
          </p>
        </td>

        <td>
          <p>Unique reward ID, assigned by Voucherify.</p>

          <p>
            <strong>Example:</strong>
            rew\_nIy4gHpQHle2c3pNMwuj7G6j
          </p>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            name

            <br />

            <code>string</code>
          </p>
        </td>

        <td>
          <p>Reward name.</p>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            stock

            <br />

            <code>integer</code>,
            <code>null</code>
          </p>
        </td>

        <td>
          <p>
            Configurable for
            <strong>material rewards</strong>.
            The number of units of the product that you want to share as a reward. Use this parameter to code a stock-taking logic.
          </p>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            redeemed

            <br />

            <code>integer</code>,
            <code>null</code>
          </p>
        </td>

        <td>
          <p>Defines the number of already invoked (successful) reward redemptions.</p>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            attributes

            <br />

            <code>object</code>
          </p>
        </td>

        <td>
          <p>
            These properties are configurable for
            <strong>material rewards</strong>.
          </p>

          <table>
            <thead>
              <tr>
                <th>Attributes</th>
                <th>Description</th>
              </tr>
            </thead>

            <tbody>
              <tr>
                <td>
                  <p>
                    image\_url

                    <br />

                    <code>string</code>
                  </p>
                </td>

                <td>
                  <p>The HTTPS URL pointing to the .png or .jpg file.</p>
                </td>
              </tr>

              <tr>
                <td>
                  <p>
                    description

                    <br />

                    <code>string</code>
                  </p>
                </td>

                <td>
                  <p>An arbitrary string that you can attach to a material reward.</p>
                </td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            metadata

            <br />

            <code>object</code>
          </p>
        </td>

        <td>
          <p>The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format.</p>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            type

            <br />

            <code>string</code>
          </p>
        </td>

        <td>
          <p>Reward type.</p>

          <p>
            Available values:
            <code>CAMPAIGN</code>,
            <code>COIN</code>,
            <code>MATERIAL</code>
          </p>
        </td>
      </tr>

      <tr>
        <td>
          <p>parameters</p>
        </td>

        <td>
          <p>Defines how the reward is generated.</p>
          <a href="#reward-type">Reward type</a>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            created\_at

            <br />

            <code>string</code>
          </p>
        </td>

        <td>
          <p>Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format.</p>

          <p>
            <strong>Example:</strong>
            2022-08-11T14:49:22.586Z
          </p>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            updated\_at

            <br />

            <code>string</code>,
            <code>null</code>
          </p>
        </td>

        <td>
          <p>Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format.</p>

          <p>
            <strong>Example:</strong>
            2022-08-11T16:01:34.885Z
          </p>
        </td>
      </tr>

      <tr>
        <td>
          <p>object</p>
        </td>

        <td>
          <p>The type of the object represented by the JSON. This object stores information about the reward.</p>

          <p>
            Available values:
            <code>reward</code>
          </p>
        </td>
      </tr>
    </tbody>
  </table>

  <h2 id="reward-type">Reward type</h2>
  <p>One of:</p>

  <ol>
    <li>
      <a href="#digital">Digital</a>
    </li>

    <li>
      <a href="#pay-with-points">Pay with Points</a>
    </li>

    <li>
      <a href="#material">Material</a>
    </li>
  </ol>

  <h2 id="digital">Digital</h2>

  <table>
    <thead>
      <tr>
        <th>Attributes</th>
        <th>Description</th>
      </tr>
    </thead>

    <tbody>
      <tr>
        <td>
          <p>
            campaign

            <br />

            <code>object</code>
          </p>
        </td>

        <td>
          <p>Objects stores information about the campaign related to the reward.</p>

          <table>
            <thead>
              <tr>
                <th>Attributes</th>
                <th>Description</th>
              </tr>
            </thead>

            <tbody>
              <tr>
                <td>
                  <p>
                    id

                    <br />

                    <code>string</code>
                  </p>
                </td>

                <td>
                  <p>Unique campaign ID, assigned by Voucherify.</p>
                </td>
              </tr>

              <tr>
                <td>
                  <p>
                    balance

                    <br />

                    <code>integer</code>
                  </p>
                </td>

                <td>
                  <p>The number of points to be added to a loyalty card or the amount to be added to the current balance on the gift card.</p>
                  <p>For gift cards, the value is multiplied by 100 to precisely represent 2 decimal places. For example, \$100 amount is written as 10000.</p>
                </td>
              </tr>

              <tr>
                <td>
                  <p>
                    type

                    <br />

                    <code>string</code>
                  </p>
                </td>

                <td>
                  <p>Campaign type.</p>

                  <p>
                    Available values:
                    <code>DISCOUNT\_COUPONS</code>,
                    <code>GIFT\_VOUCHERS</code>,
                    <code>LOYALTY\_PROGRAM</code>
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>
    </tbody>
  </table>

  <h2 id="pay-with-points">Pay with Points</h2>

  <table>
    <thead>
      <tr>
        <th>Attributes</th>
        <th>Description</th>
      </tr>
    </thead>

    <tbody>
      <tr>
        <td>
          <p>
            coin

            <br />

            <code>object</code>
          </p>
        </td>

        <td>
          <p>Defines the ratio by mapping the number of loyalty points in points\_ratio to a predefined cash amount in exchange\_ratio.</p>

          <table>
            <thead>
              <tr>
                <th>Attributes</th>
                <th>Description</th>
              </tr>
            </thead>

            <tbody>
              <tr>
                <td>
                  <p>
                    exchange\_ratio

                    <br />

                    <code>number</code>
                  </p>
                </td>

                <td>
                  <p>The cash equivalent of the points defined in the points\_ratio property.</p>
                </td>
              </tr>

              <tr>
                <td>
                  <p>
                    points\_ratio

                    <br />

                    <code>integer</code>
                  </p>
                </td>

                <td>
                  <p>The number of loyalty points that will map to the predefined cash amount defined by the exchange\_ratio property.</p>
                </td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>
    </tbody>
  </table>

  <h2 id="material">Material</h2>

  <table>
    <thead>
      <tr>
        <th>Attributes</th>
        <th>Description</th>
      </tr>
    </thead>

    <tbody>
      <tr>
        <td>
          <p>
            product

            <br />

            <code>object</code>
          </p>
        </td>

        <td>
          <p>Contains information about the product given as a reward.</p>

          <table>
            <thead>
              <tr>
                <th>Attributes</th>
                <th>Description</th>
              </tr>
            </thead>

            <tbody>
              <tr>
                <td>
                  <p>
                    id

                    <br />

                    <code>string</code>
                  </p>
                </td>

                <td>
                  <p>Unique product ID, assigned by Voucherify.</p>

                  <p>
                    <strong>Example:</strong>
                    prod\_0b7d7dfb05cbe5c616
                  </p>
                </td>
              </tr>

              <tr>
                <td>
                  <p>
                    sku\_id

                    <br />

                    <code>string</code>,
                    <code>null</code>
                  </p>
                </td>

                <td>
                  <p>Unique SKU ID, assigned by Voucherify, of the SKU given as a reward.</p>

                  <p>
                    <strong>Example:</strong>
                    sku\_0b7d7dfb090be5c619
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>
    </tbody>
  </table>
</div>
