bosOnline
  1. Voucher
bosOnline
  • bosOnline
  • BosOnline
    • auth
      • Register
      • Login
      • Refresh Token
    • Product
      • Inventory
      • Download Inventory
      • Download Variant
      • Update Inventory
      • Get Category
      • Get Edit Product
      • Product List
      • Edit Product Detail (Product Detail)
      • product
      • Delete Product
      • Edit Status Product (Product List)
      • Download Product (Product List)
      • Product Detail
      • Product Variant
      • Edit Status Variant (Product Detail)
      • Update Variant
      • Upload Image
      • Cek SKU
    • Form
      • Form
      • Edit Form
      • Form Detail
      • Edit Status Form (Product Detail)
      • Form list
      • Custom Success Page
      • Custom Success Page
      • Edit Success Page
    • Order
      • Checkout
        • Request Create Order
        • Request Create Order Abandoned
      • Follow up
        • Follow Up
        • Follow Up Attempts
      • Edit Choose Courier
      • Edit Payment Method
      • Detail Order
      • Edit Customer Order
      • Edit Another Fee
      • Order List
      • Confirm Payment
      • Update Payment Method
      • Update Pengiriman Kurir
      • Update Status Order
    • Store
      • Custom Domain
        • Set Default Subdomain
        • Subdomain
        • Create Subdomain
        • Verifikasi Subdomain
        • Get Revenue
      • Store
      • Cek SubDomain
      • Get Region
      • Store
      • Warehouse
      • On Boarding
      • Recap Order
      • Recap Store
      • Recap Product
      • Recap CS
      • Tips
      • Announcement
      • Edit Subdomain
    • API Boscod
      • Cek Ongkir
      • Wilayah
      • Tracking Order
      • Reset Password
      • Warehouse
      • Order Shipping
      • winpay service
    • Profile
      • Warehouse
      • Edit Warehouse
      • Profile
      • Data Deletion
      • Default Warehouse
      • Me
    • Staff
      • Staff
      • Delete staff
      • Create Staff
      • Edit Status Staff
    • Rekening
      • Bank List
      • Get Rekening List
      • Rekening Detail
      • Create Rekening
      • Edit Rekening
      • Delete Rekening
      • Edit Status Rekening
    • Voucher
      • List Voucher
        GET
      • Edit Voucher Status
        PATCH
      • Voucher
        POST
      • List Voucher Checkout
        GET
      • Delete Voucher
        DELETE
  • AdminBosOnline
    • Dashboard
      • Recap Store
      • Revenue
      • Order Recap
  1. Voucher

Voucher

Testing
POST
/store/vouchers
Endpoint ini digunakan untuk membuat voucher. Contoh beberapa opsi voucher ongkir: https://boscod2021.notion.site/Contoh-Opsi-Voucher-205c42be838980abab4fc5ee25cf5517?source=copy_link
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/store/vouchers' \
--header 'Content-Type: application/json' \
--data-raw '{
    "voucher_code": "ZPEJHAS",
    "private": true,
    "type": "product",
    "condition": {
        "discount_type": "percent",
        "discount_value": 5,
        "payment_method": "all",
        "start_date": "2024-12-30 00:00:00",
        "end_date": "2025-12-30 00:00:00"
    },
    "product_ids": "10,22,19",
    "requirement": "min_qty",
    "requirement_value": 12,
    "stoct": 5000,
    "usage_limit": 5,
    "active": true
}'
Response Response Example
{
    "message": "Voucher created successfully"
}

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
code
string  | null 
required
private
boolean  | null 
required
Default:
true
type
enum<string>  | enum<null> 
required
Allowed values:
ongkirproduct
condition
object 
required
discount_type
enum<string>  | enum<null> 
required
Allowed values:
fixpercent
discount_value
number  | null 
required
payment_method
enum<string>  | enum<null> 
required
Allowed values:
allcodnoncod
Default:
all
start_date
string  | null 
required
end_date
string  | null 
required
product_ids
string  | null 
required
Default:
all
requirement
enum<string>  | enum<null> 
required
Allowed values:
min_purchasemin_qty
requirement_value
integer  | null 
required
stock
integer  | null 
required
usage_limit
integer  | null 
required
active
boolean 
required
apply_target_type
string 
optional
apply_target_values
string 
optional
Examples

Responses

🟢200Success
application/json
Body
message
string 
required
Modified at 2025-06-23 08:35:26
Previous
Edit Voucher Status
Next
List Voucher Checkout
Built with