---
title: "POST /transactions/award"
method: POST
path: "/transactions/award"
---

# POST /transactions/award

`POST /transactions/award`

## Request body

- AwardApiRequestBody
  - `member_id` string, required — Unique Identifier (Member ID) for the member object in the client’s system which was used while creating a member in Zinrelo.
  - `activity_id` string, required — Unique ID that identifies an activity in Zinrelo. This is the activity against which the transaction has to be recorded.
  - `transaction_date` string — <p>Add the transaction date of the activity. The transaction date would be considered for all activities except for the submit a receipt activity. Format : MM/DD/YYYY HH:MM:SS</p> <p><strong>Note:</strong> Our API records all date and time fields in UTC time.</p>
  - `points_passed` integer — Set custom points for an activity. You can set custom points for all activities except made_a_purchase activity.
  - `approval_date` string — <p>Date and time on which the transaction will be auto approved. Format : MM/DD/YYYY HH:MM:SS. <p><strong>Note:</strong> Our API records all date and time fields in UTC time.</p>
  - `points_expiration_date` string — <p>Date and time on which points will expire. Format : MM/DD/YYYY HH:MM:SS. <p><strong>Note:</strong> Our API records all date and time fields in UTC time.</p>
  - `transaction_attributes` string, json — <p>Every activity has a two predefined transaction attributes - reason and tags. While awarding points for an activity, data can be passed in these attributes.</p> <p>Custom attributes: In addition to the predefined attributes, you can define custom attributes for each activity and pass data in those attributes.&nbsp;</p> <p>The custom attribute should be created in advance. To create custom attributes for your store, reach out to your account manager at support.zinrelo.com.</p> <p><strong>Note: "transaction_attributes" is mandatory only for 3 of the predefined activities.</strong></p> <div class="heading-text"><strong>made_a_purchase activity</strong></div> <p>Mandatory attributes are&nbsp;<strong>order_id, order_total, order_subtotal.</strong></p> <p><strong>The order_subtotal should be greater than 0.01</strong></p> <p>A sample structure of the transaction_attributes for the made_a_purchase activity is given below:</p> <p><code class="c-mrkdwn__code" data-stringify-type="code">{</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"tags" : ["tag1","tag2"],</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"reason" : "purchase",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"order_id" : "75",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"coupons" : "$5OFFVYZ,$10FFEDT,$05RTNVLW",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"order_total" : "1000",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"order_subtotal" : "1000",</code></p> <p><code class="c-mrkdwn__code" data-stringify-type="code"></code><code class="c-mrkdwn__code" data-stringify-type="code">"products" : [{</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"product_id": "112",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"product_quantity": "1",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"product_category": "tshirt, blue range, on sale",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"product_price": "15",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"product_title": "Sweatshirt",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"product_image_url": ""</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">},</code></p> <p><code class="c-mrkdwn__code" data-stringify-type="code"></code><code class="c-mrkdwn__code" data-stringify-type="code">{</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"product_id": "980",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"product_quantity": "2",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"product_category": "sales, straight range of pants, formals, on 10% discount",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"product_price": "10.017",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"product_title": "Pant",</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">"product_image_url": ""</code><br /><code class="c-mrkdwn__code" data-stringify-type="code">}]</code><code class="c-mrkdwn__code" data-stringify-type="code"></code></p> <p><code class="c-mrkdwn__code" data-stringify-type="code">}</code></p> <p><strong>Note: </strong></p> <p><strong>- The attributes like &ldquo;product_id&rdquo;, &ldquo;product_price&rdquo;, &ldquo;product_quantity&rdquo; and &ldquo;product_title&rdquo; are mandatory only when you pass product attributes.</strong></p> <p><strong>- The order subtotal should be calculated as the sum of the subtotals of all products in the order, without taking into account any discounts. The discounted price needs to be adjusted in products and passed accordingly.</strong></p> <p><strong>- We are also accepting product quantity in decimal values.</strong></p> <p><strong>- When individual product prices are provided, the subtotal is ignored.</strong></p> <p><strong>- In instances where product information is absent, the purchase amount is derived from the 'order_subtotal' field.</strong></p> <div class="heading-text"><strong>submit_a_receipt activity</strong></div> <p>Mandatory attribute is 'receipt_files'. 'receipt_uid' is the optional field. Expected data is a list of images/pdfs encoded in base64 format. To convert an image to base64 format,&nbsp;<a href="https://www.base64-image.de/" target="_blank" rel="noopener">click here.</a></p> <p>A sample structure of the transaction_attributes for the submit_a_receipt activity is given below:</p> <p><code class="c-mrkdwn__code" data-stringify-type="code">{</code><code class="c-mrkdwn__code" data-stringify-type="code">"receipt_files":[""]</code><code class="c-mrkdwn__code" data-stringify-type="code">}</code></p> <div class="heading-text"><strong>upload_photo activity</strong></div> <p>Mandatory attribute is image_file. Expected data is a list of images/pdfs encoded in base64 format. To convert an image to base64 format,&nbsp;<a href="https://www.base64-image.de/" target="_blank" rel="noopener">click here.</a></p> <p>A sample structure of the transaction_attributes for the upload_photo activity is given below:</p> <p><code class="c-mrkdwn__code" data-stringify-type="code">{</code><code class="c-mrkdwn__code" data-stringify-type="code">"image_file": [""]</code><code class="c-mrkdwn__code" data-stringify-type="code">}</code></p> <p>To know more about the transaction attributes for Award API, <a href="https://help.zinrelo.com/docs/award-api-parameters">click here.</a></p>

## Response `200`

200

- AwardPointsDataObject
  - `data` AwardPointsResponseObject
    - `status` string — The transaction status can be one of three: Approved, Rejected, or Pending.
    - `points_expiration_date` string — The date on which points will expire.
    - `auto_approval_date` string — The "auto approval date" for a transaction signifies the date when the transaction will be automatically approved. This approval mechanism can be established through an API or can be configured by setting the "after a fixed duration" option within the approval type in the activities settings page within the admin console. When this specified date arrives, the transaction will undergo automatic approval as per the settings configured.
    - `last_modified_date` string — The most recent date on which a transaction was updated.
    - `award_info` AwardPointAwardInfo
      - `activity_id` string — The unique ID of the activity assigned by Zinrelo.
      - `points` integer — The points awarded for an activity.
      - `points_status` string — This indicates the status of the points, which might be 'approved,' 'rejected,' 'pending,' 'expired,' 'auto_rejected,' or 'auto_approved.'
      - `activity_name` string — The activity name stored with Zinrelo.
    - `id` string — The internal ID generated by Zinrelo.
    - `approver_details` AwardPointsApproverDetailsObject
      - `approver_name` string — The person or source who approves the transaction.
      - `approver_id` string — The unique ID associated with the approver.
    - `approved_date` string — The date on which the transaction was approved.
    - `member_id` string — The unique identifier of the member defined by an Admin.
    - `created_date` string — The date and time on which the transaction was created.
    - `transaction_type` string — This field specifies the transaction type. In the case of the award API, it will always be designated as "award."
    - `transaction_attributes` AwardPointsTransactionAttributesObject — By utilizing transaction attributes, you can define attributes for transactions. You can leverage these attributes for personalization and reporting purposes. For more details, refer- https://help.zinrelo.com/docs/custom-attributes
      - `order_total` integer — Gross total amount of the order including shipping. discount, etc.
      - `order_subtotal` integer — Net total amount of the order excluding shipping, discount. Points will be awarded to the member based on this amount.
      - `order_id` string — The order ID of the order which is being placed. This field is used to uniquely identify the order.
      - `tags` string[] — The tags associated with the transaction.
      - `currency` string — The currency store supports.
      - `coupon_code` string — The coupon code issued for the transaction.
      - `reason` string — The reason associated with the transaction.
      - `products` unknown[] — The list of products.
        - unknown
    - `additional_data` AwardPointsAddtionalDataObject
      - `activity_multiplier` integer — For activities such as "made_a_purchase," this represents the points spent per dollar.
    - `redemptions_list` unknown[] — In Award API, the redemeption list will always be empty.
      - unknown
  - `success` boolean

## Other responses

- `400` — 400

---

[API](https://skmtc.net/trueloyal/apis/admin-apis.md) · [All operations](https://skmtc.net/trueloyal/apis/admin-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trueloyal/admin-apis/versions/c12d3d379897/schema)
