Zid Docs
  1. Loyalty Program
Zid Docs
  • Merchant API
    • Start Here 🚀
    • Overview to Zid Apps
    • Authorization
    • Responses
    • Webhooks
    • Rate Limiting
    • APIs
      • Orders
        • Update Order by ID
        • Get Order Credit Notes
        • Get Order by ID
        • List of Orders
      • Reverse Orders
        • Reverse Order Reasons
        • Create Reverse Orders
        • Create Reverse Orders Waybill
        • Add Reverse Order Reasons
      • Carts
        • Get Abandoned Cart Details
        • List Abandoned Carts
      • Products
        • Managing Products
          • Get a Product by ID
          • Retrieve a list of products
          • Create a new product
          • Update an existing product.
          • Bulk update of products using their IDs or SKUs
          • Delete a product.
          • Product Setting
          • List Product Reviews
        • Digital Vouchers
          • Product Vouchers
          • Order Voucher
          • Add Product Voucher
          • Import Vouchers
          • Export Vouchers
          • Update Product Voucher
          • Remove Product Voucher
        • Product Categories
          • Get Single Category Details
          • Get all categories
          • Create Store Category
          • Update a Store Category
          • Add a product to a certain category
          • Publish/Unpublish a Category
          • Detach Category from All Products
          • Remove Category from Product
        • Product Badge
          • Product Badge
        • Product Attributes
          • Get Product Attributes
          • Get Product Attributes
          • Retrieve a product attribute
          • Add a New Product Attribute
          • Add a New Product Attribute
          • Update a product attribute
          • Delete a product attribute
        • Product Attribute Presets
          • Get attribute presets
          • Create Attribute Preset
          • Update Attribute Preset
          • Delete an attribute preset
        • Product Customizations
          • Add Product Variants
          • Insert Custom Options to a Product
          • Insert Custom User-Input Fields to a Product
        • Product Manual Sorting
          • Set Custom Product Order
          • Reset the manual sorting of all products
        • Product Images
          • Get List of images of a product.
          • Add an image to a product
          • Update a product Image Order
          • Delete a product image
        • Product Notifications
          • Availability Notification Stats
          • Availability Notifications Settings
          • List Availability Notifications
          • Add Availability Notification
          • Save Availability Notifications Settings
          • Manually Send Availability Notification Email
          • Export Availability Notifications
        • Product Import
          • Email All Products to Store Owner
          • Import Products via CSV or xlsx File
        • Product Stock (Multi-Inventory)
          • Get Product Stock by ID
          • List Product Stocks
          • Add Product Stock
          • Update Single Product Stock
          • Bulk Update Product Stocks
        • Product Questions & Answers
          • Get Question
          • Get Answer
          • Get All Questions
          • List Question Answers
          • Create Question
          • Create Answer
          • Update Question
          • Update Answer
          • Delete Question
          • Delete Answer
        • Product Reviews
          • List Reviews
          • New Reviews Total
          • Change Review Status
          • Bulk Change all Review Statuses
          • Delete Review
          • Import Product Reviews
          • Reply to Review
          • Delete Reply
          • Update Reply to Review
        • Digital Products
          • Create Downloadable Product
          • Generate an Upload URL
          • Upload File to S3
          • Create Product Downloadables
          • Get Product Downloadables
          • Delete Product Downloadables
          • Get Store Downloadables
          • Create Store Downloadables
          • Delete Store Downloadables
      • Inventories
        • Get Store Location by ID
        • List Store Locations
        • Add a New Location
        • Update a Location by ID
        • Update Products Stock by Location ID
      • Shipping
        • List Store Delivery Options
        • Add Shipping Option
      • Marketing
        • Gift Cards
          • Get Store Settings
          • Add gift card to the cart
          • Update Store Settings
          • Upload gift card designs
          • Remove gift card from the cart
        • Coupons
          • Create a New Coupon
          • List Coupons
          • Get Coupon Details
          • Update Coupon
          • Delete Coupon
        • Bundle Offers
          • Retrieve all Bundle Offers
        • Loyalty Program
          • Customer Wallet
            GET
          • Customer Points
            GET
          • Loyalty Program Points per Order
            GET
          • Store Loyalty Status
            GET
          • Redemption Methods
            GET
          • Cashback Rules
            GET
          • Add Redemption to Cart
            POST
          • Remove Redemption from Cart
            POST
          • Info Page
            GET
          • Loyalty Program Activation
            POST
          • Loyalty Status
            GET
          • Set Points Expiration
            POST
          • Cashback Rule Method Update
            POST
          • Cashback Rule Method Update Status
            PUT
          • Add Points Redemption Method
            POST
          • Update Points Redemption Method
            POST
          • Delete Points Redemption Method
            POST
          • Toggle Redemption Method Status
            PUT
          • Show Loyalty Points Info for Specific Customer
            GET
          • Customer Profile
            GET
          • List Data
            GET
          • Customer Points History
            GET
          • Info Page - Managers
            GET
          • Update Info Page
            PUT
          • Adjust Customer Points
            POST
      • Customers
        • List of Customers
        • Get Customer by ID
      • Store Settings
        • 📄 User Roles and Permissions
        • Get Manager's Profile
        • Get VAT Settings
        • List of Payment Method
      • Countries and Cities
        • Retrieve Store Operating Countries
        • Retrieve Cities by Country ID
        • Countries List
      • Webhook
        • List of Webhooks
        • Create a Webhook
        • Delete a Webhook by OriginalId
        • Delete a Webhook by Subscriber
    • Store Events
      • Order
      • Product
      • Abandoned Cart
      • Customer
      • Product Category
  • App API
    • Create your First App
    • Embedded Apps
    • App Scripts
    • App Events
    • App Subscription
      • Get Subscription Details
      • Update Usage-Based Charges
  • Themes
    • 🚨 Important Update: Zid Themes
    • Adding Video URL Feature to Third-Party Themes
    • Landing Page Development
    • Getting Started with Zid Themes
      • Introduction to Theme Development
      • Manage your Themes
      • Building Themes in Zid
      • Theme File Structure
      • Twig Syntax and Features
      • Zid Theme Packager
    • Templates
      • Layout
      • Home Page
      • Products
      • Cart
      • Store Language and Currency
    • Settings Schema
      • Text
      • Number
      • Text-Area
      • Select
      • Radio Buttons
      • Checkbox
      • Range
      • Color
      • Image
      • Product
      • Category
      • List
      • Fieldset
    • Code Snippets
      • Apple Pay Quick Checkout
      • Custom CSS Injection
      • Displaying the Store's Business Center Logo
      • Customizing Copyright Text
      • Store's Main Navigation Menu
      • Customer Wishlist
      • Products
        • Products Badges
        • Product Ratings
        • Remaining Product Stock
        • Sold Items Count
        • Product Filtration by Attributes
        • Grouped Products
        • Product Questions & Answers
        • Product Restock Notfication
      • SEO
        • Images alt text
        • Themes SEO Marketing Tags
      • Marketing
        • Metafields
        • Gift Feature
        • Loyalty Program
    • Zid Themes Library: API Integration
      • Products
      • Product Categories
      • Cart
      • Blog
      • Customer
      • Store Settings
    • Data Reference
      • Locals
      • Store
      • Cart
      • Product
      • Products List
      • Category
      • Categories List
      • Session
      • FAQs
      • Customer
      • Blogs
      • Page
      • Main Menu
      • Main Navigation Menu
      • Request
      • Orders
      • Addresses
      • Store Payment Methods
      • Store Shipping Methods
      • Store Banks
      • Asset URL
      • Header Meta Tags
      • Loyalty pogram Wallet
    • Themes CLI
      • CLI Authentication
      • Theme Create
      • Theme Package
      • Theme Update
      • Themes List
      • Theme Preview
  1. Loyalty Program

Add Redemption to Cart

POST
https://api.zid.sa/v1v1/stores/<<STORE_ID>>/carts/loyalty-redemption-method/add
Loyalty Program
Allows adding a chosen redemption method to a customer's shopping cart.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.zid.sa/v1v1/stores/<<STORE_ID>>/carts/loyalty-redemption-method/add' \
--header 'Accept;' \
--header 'Authorization;' \
--header 'Accept-Language;' \
--header 'User-Agent;' \
--header 'CART-SESSION-ID;' \
--header 'X-CUSTOMER-TOKEN;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "point_redemption_method": {
        "id": "c2e3d648-8fb2-4dde-8ce3-4c71ddd9a181",
        "external_id": 1667,
        "store_id": "cba413cc-a358-4a1a-b8b1-711122555215",
        "name": "5",
        "points_to_redeem": 5,
        "rule_type": "fixed_rate_settings",
        "reward": {
            "discount_value": 5
        },
        "conditions": null,
        "is_active": 1,
        "created_at": "2023-05-31T14:26:43.000000Z",
        "updated_at": "2023-05-31T14:26:43.000000Z",
        "deleted_at": null
    }
}'
Response Response Example
200 - Example 1
{
  "code": "SUCCESS_WITHOUT_PAYLOAD",
  "message": "Loyalty points redeemed successfully"
}

Request

Header Params
Accept
string 
optional
Specifies the Media Types acceptable for the client. In this case, it signals that the client expects a response in the JSON format.
Default:
application/json
Authorization
string 
required
The Authorization token is a unique key given to the third-party application (Partner) by Zid. It is used to authenticate the API requests made by the Partner application. The token verifies the partner's identity and ensures they have permission to access Zid's API but does not provide any specific user or store information. It should be included in the header of API requests when the partner application needs to access Zid's API.
Example:
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxMTciLCJqdGkiOiJhMTg5ZTg3MmYxMzhkMWVhYjU5MjVkMDkyMGE5NmI0YjliNjg0Y2E2ZTdmM2M2MjljZWYxNmQ4NDJjMmJlYmVhMjI4YTdmMTA0ZWQ4NWE5NCIsImlhdCI6MTY3OTU3Njk5OS41NjY4NzcsIm5iZiI6MTY3OTU3Njk5OS41NjY4OCwiZXhwIjoxNzExMTk5Mzk5LjQ4NjE1Mywic3ViIjoiMTgyNDc1Iiwic2NvcGVzIjpbInRoaXJkLXBhcnRpZXMtYXBpcyJdfQ.i07ef09nVNXGZF-g-QXpNoS2vlFQK_zntAqAMS4Az2XD2EyMLhxLZZRL-QlR11zUPqMmXjMAl_4ooKa3M3zkfZQ6Ga6qStvamk8RnC_39VUx0lfN2A4k65ERZpqwrMy6-t3dE99zay3aicIdNvbgi0zeuMSE5Tn99u-2AtSRa8ffbfAcYPPXacHrhdmlYzdiZS_x_skovFEow1E-nDjdL1WHqO92XdZ7RfNLkiYFTjZlZmM_UruvioaR3q6TXJbqRK_ZrziivezL8ohIQ2SBosUp58I29rlKzvlw_R2j0rKKYZbdxYDaxAHOISmOFKAlO66k7dNevAHI3s4uGIjoGA6ZXHknccWPLLLiaAQ0r64HV8GowW5dg2rhZNurJGDTnLlBQ6F-ql42ptHzSAfzzi576CEoN3gMVpgXcbntUY3reETkFsTBPUjeSuMpANMioXAA0GRp3Ut-84fTnrWxqsCW1WVUIx33HvmfCGPXIdkaCCWoA6G6KXo04MtFbKXQmXkK9esQWI-rqdVnMD3zSR3g3yFHZSL1U-mZeNja03706Rav1ordsRNOtRwtLuoRRbk9KasbUpEwqq4Ao9lqZZwRIjdEw-pQtnUT8V53fhmuuRIefCLFO7eGEtGUnh9o6Uh_pgi6AB6uSlnN9GEMGgI1alqvMmTjxvC-HHt0V-Y
Accept-Language
enum<string> 
optional
Preferred language for the response. Defaults to en if not specified.
Allowed value:
ar
Default:
ar
User-Agent
string 
optional
The User-Agent header contains information about the user agent (browser or app) making the request. It allows the server to provide a tailored response depending on the user agent's capabilities and preferences.
Example:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36
CART-SESSION-ID
string 
required
A unique identifier for the current cart session.
Example:
63ac14b3b6d6f883e2be179f6652890f
X-CUSTOMER-TOKEN
string 
required
The X-CUSTOMER-TOKEN is a unique identifier generated when a customer logs in through the customer-login API. This token acts as the standard authorization mechanism, allowing the system to recognize the logged-in customer and grant them access to appropriate resources.
Body Params application/json
point_redemption_method
object 
optional
Contains details about a specific point redemption method that the user wants to add or update.
id
string 
optional
A unique identifier for the point redemption method.
Example:
c2e3d648-8fb2-4dde-8ce3-4c71ddd9a181
external_id
integer 
optional
An external identifier associated with the point redemption method.
Example:
1667
store_id
string 
optional
The unique identifier of the store associated with this redemption method.
Example:
cba413cc-a358-4a1a-b8b1-711122555215
name
string 
optional
The name or label of the redemption method.
Example:
5
points_to_redeem
integer 
optional
The number of points required to redeem this reward.
Example:
5
rule_type
string 
optional
The type of rule applied to the redemption method, such as "fixed_rate_settings".
Example:
fixed_rate_settings
reward
object 
optional
Details about the reward associated with the redemption method.
conditions
null 
optional
Any conditions or restrictions applicable to the redemption method. Null indicates no specific conditions.
is_active
integer 
optional
Indicates whether the redemption method is currently active.
Example:
1
created_at
string 
optional
The date and time when the redemption method was created, in ISO 8601 format.
Example:
2023-05-31T14:26:43.000000Z
updated_at
string 
optional
The date and time when the redemption method was last updated, in ISO 8601 format.
Example:
2023-05-31T14:26:43.000000Z
deleted_at
null 
optional
The date and time when the redemption method was deleted, if applicable.
Examples

Responses

🟢200OK
application/json
The redemption method is added to the cart successfully.
Body
code
string 
optional
A status code indicating the outcome of the operation. In this case, "SUCCESS_WITHOUT_PAYLOAD" suggests that the loyalty points were redeemed successfully, but no additional data or payload is returned with the response.
Example:
SUCCESS_WITHOUT_PAYLOAD
message
string 
optional
A confirmation message indicating that the loyalty points have been successfully redeemed.
Example:
Loyalty points redeemed successfully
🔴500Server Error
Modified at 2024-10-22 09:12:38
Previous
Cashback Rules
Next
Remove Redemption from Cart
Built with