{"openapi":"3.1.2","info":{"title":"BCL API","version":"1.0.0","description":"BCL (Bayarcash Commerce Layer) is a no-code platform to sell online. Bayarcash is the payment gateway that collects the money. Use this API to connect your website, app or system to your BCL account.\n\nWith the API, you can:\n\n- Create payment links for one-off payments. Set the amount and the payer details.\n- Get the status of a payment, and read your transactions and customers.\n- Manage your payment forms, event forms, participants, coupons, protected content and automations.\n\n## Payment methods\n\nThe payer can pay with these methods:\n\n- Online banking (FPX)\n- Credit cards and debit cards\n- E-wallets and pay-later, for example Boost and SPayLater\n\nThe methods that you can use are the methods that your Bayarcash portal offers.\n\n## Authentication\n\nEach request must have an API token. Send the token as a bearer token in the `Authorization` header:\n\n```\nAuthorization: Bearer bcl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nAccept: application/json\nUser-Agent: MyShop/1.0\n```\n\nTo create a token, go to **Platform Setup → Integrations** in BCL. On the **API tokens** card, click **Manage**. Then click **Create new API token**. Only an Admin can create a token. Each Admin can have a maximum of 10 tokens.\n\nGive the token only the permissions that your app must have:\n\n- **API Read**: read forms, transactions, customers, coupons and other data.\n- **API Write**: create payment links and change data.\n\nA token with only **API Write** cannot read data. Usually, select **API Read** also. After you create a token, you cannot change its permissions. For the full steps, see [Create an API token](https://docs.bcl.my/api-tokens/).\n\n> [!IMPORTANT]\n> Send a `User-Agent` header that gives the name of your app. BCL refuses requests that have the default user agent of a script tool, such as `curl` or `python-requests`.\n\n> [!CAUTION]\n> A token gives access to the same data as the Admin who created it. Do not put a token in website code that visitors can see, in a public Git repository, or in a screenshot. If a token becomes known to other persons, delete it immediately.\n\n## Errors\n\nEach error response has a `message`. These status codes are the same for all the endpoints:\n\n| Code | Meaning |\n|---|---|\n| `401` | The token is missing, not correct, or expired. |\n| `404` | The item is not in your account. |\n| `422` | A field is not correct. The `errors` object gives the problem for each field. |\n| `500` | BCL did not complete the request. |\n\nIf the token does not have the necessary permission, the message is, for example, `Token does not have the 'api:write' ability`. Create a new token with the correct permissions.\n\n## BCL and Bayarcash\n\nBCL keeps the record of each sale. Bayarcash collects the payment and pays the money to your bank account. For questions on registration, payouts and payment channels, speak to Bayarcash. For more information, see [BCL and Bayarcash](https://docs.bcl.my/bcl-and-bayarcash/)."},"servers":[{"url":"https://api.bcl.my/v1","description":"Production. Use this address for all new integrations."},{"url":"https://bcl.my/api","description":"Legacy. The old address. Use it only for the integrations that use it now."}],"security":[{"http":[]}],"paths":{"/automations":{"get":{"operationId":"automationManagement.getAutomationsList","description":"Get your automations, one page at a time. You can filter the list by trigger type and by status.","summary":"List automations","tags":["Automations"],"parameters":[{"name":"per_page","in":"query","schema":{"type":"integer","default":20},"description":"The number of items on each page."},{"name":"trigger_type","in":"query","schema":{"type":"string"},"description":"Show only the automations with this trigger type."},{"name":"is_active","in":"query","schema":{"type":"boolean","default":false},"description":"Show only the active automations (`true`), or only the inactive automations (`false`)."},{"name":"sort_by","in":"query","schema":{"type":"string"},"description":"The field that BCL uses to sort the list."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/LengthAwarePaginator"},"meta":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"string"},"per_page":{"type":"integer"},"total":{"type":"string"}},"required":["current_page","last_page","per_page","total"]}},"required":["success","data","meta"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving automations"}},"required":["success","message"]}}}}}}},"/automations/{id}":{"get":{"operationId":"automationManagement.getAutomation","description":"Get the details of one automation, with its trigger conditions.","summary":"Get an automation","tags":["Automations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the automation."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"trigger_type":{"type":"string"},"trigger_type_label":{"type":"string"},"trigger_conditions":{"type":["array","null"],"items":{}},"is_active":{"type":"boolean"},"execution_count":{"type":"integer"},"last_executed_at":{"type":["string","null"]},"team":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["id","name"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","trigger_type","trigger_type_label","trigger_conditions","is_active","execution_count","last_executed_at","team","created_at","updated_at"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving automation"}},"required":["success","message"]}}}}}}},"/automations/{id}/executions":{"get":{"operationId":"automationManagement.getExecutions","description":"Get the execution history of one automation, one page at a time.","summary":"List the executions of an automation","tags":["Automations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the automation."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/LengthAwarePaginator"},"meta":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"string"},"per_page":{"type":"integer"},"total":{"type":"string"}},"required":["current_page","last_page","per_page","total"]}},"required":["success","data","meta"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Automation not found"}},"required":["success","message"]}}}},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving executions"}},"required":["success","message"]}}}}}}},"/automations/{id}/stats":{"get":{"operationId":"automationManagement.getStats","description":"Get the number of executions of one automation, for each status.","summary":"Get the statistics of an automation","tags":["Automations"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the automation."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"total_executions":{"type":"integer"},"last_executed_at":{"type":["string","null"]},"by_status":{"type":"array","items":{}}},"required":["total_executions","last_executed_at","by_status"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Automation not found"}},"required":["success","message"]}}}},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving stats"}},"required":["success","message"]}}}}}}},"/coupons":{"get":{"operationId":"couponManagement.getCouponsList","summary":"List coupons","tags":["Coupons"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"The page number. The first page is 1."},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"The number of items on each page."},{"name":"search","in":"query","schema":{"type":"string","maxLength":255},"description":"The text to find."},{"name":"status","in":"query","schema":{"type":"string","enum":["active","inactive","all"]},"description":"Show only `active` items, only `inactive` items, or `all` items."},{"name":"sort_by","in":"query","schema":{"type":"string","enum":["code","created_at","updated_at"]},"description":"The field that BCL uses to sort the list."},{"name":"sort_order","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"The sort direction: `asc` (from low to high) or `desc` (from high to low)."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/LengthAwarePaginator"},"meta":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"string"},"per_page":{"type":"integer"},"total":{"type":"string"},"from":{"type":["integer","null"]},"to":{"type":["integer","null"]}},"required":["current_page","last_page","per_page","total","from","to"]},"summary":{"type":"object","properties":{"total_count":{"type":"string"},"active_count":{"type":"integer","minimum":0},"inactive_count":{"type":"integer","minimum":0}},"required":["total_count","active_count","inactive_count"]}},"required":["success","data","meta","summary"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving coupons list"}},"required":["success","message"]}}}}},"description":"Get your coupons, one page at a time. You can search the list, filter it by status, and sort it."}},"/coupons/{id}":{"get":{"operationId":"couponManagement.getCoupon","summary":"Get a coupon","tags":["Coupons"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the coupon."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"id":{},"code":{"type":"string"},"description":{"type":["string","null"]},"is_active":{"type":"boolean"},"discount_type":{},"discount_amount":{},"apply_to":{"type":"string"},"enable_condition":{},"min_purchase":{},"max_purchase":{},"product_items":{"type":["array","null"],"items":{}},"variation_options":{"type":["array","null"],"items":{}},"usage_limit":{},"usage_count":{"type":"integer"},"enable_expiry":{},"start_date":{"type":["string","null"]},"expiry_date":{"type":["string","null"]},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]},"status_text":{"type":"string","enum":["Active","Inactive"]},"usage_remaining":{"type":["number","null"]}},"required":["id","code","description","is_active","discount_type","discount_amount","apply_to","enable_condition","min_purchase","max_purchase","product_items","variation_options","usage_limit","usage_count","enable_expiry","start_date","expiry_date","created_at","updated_at","status_text","usage_remaining"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Coupon not found"}},"required":["success","message"]}}}},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving coupon details"}},"required":["success","message"]}}}}},"description":"Get the details of one coupon by its ID."},"patch":{"operationId":"couponManagement.updateCoupon","summary":"Change a coupon","tags":["Coupons"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the coupon."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCouponRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Coupon updated successfully"},"data":{"type":"object","properties":{"id":{},"code":{"type":"string"},"description":{"type":["string","null"]},"discount_type":{},"discount_amount":{},"is_active":{"type":"boolean"},"updated_at":{"type":["string","null"]},"status_text":{"type":"string","enum":["Active","Inactive"]}},"required":["id","code","description","discount_type","discount_amount","is_active","updated_at","status_text"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Coupon not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update coupon"}},"required":["success","message"]}}}}},"description":"Change the details of one coupon. All the fields are optional. The rules for each field are the same as in [Create a coupon](#tag/coupons/POST/coupons/coupons)."}},"/coupons/{id}/status":{"patch":{"operationId":"couponManagement.updateStatus","summary":"Change the status of a coupon","tags":["Coupons"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the coupon."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCouponStatusRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Coupon status updated successfully"},"data":{"type":"object","properties":{"id":{},"code":{"type":"string"},"is_active":{"type":"boolean"},"status_text":{"type":"string","enum":["Active","Inactive"]},"updated_at":{"type":["string","null"]}},"required":["id","code","is_active","status_text","updated_at"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Coupon not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update coupon status"}},"required":["success","message"]}}}}},"description":"Make a coupon active or inactive. Set `is_active` to `true` or `false`."}},"/coupons/coupons":{"post":{"operationId":"couponManagement.createCoupon","summary":"Create a coupon","tags":["Coupons"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCouponRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Coupon created successfully"},"data":{"type":"object","properties":{"id":{},"code":{"type":"string"},"description":{"type":["string","null"]},"is_active":{"type":"boolean"},"status_text":{"type":"string","enum":["Active","Inactive"]},"discount_type":{},"discount_amount":{},"apply_to":{"type":"string"},"enable_condition":{},"min_purchase":{},"max_purchase":{},"usage_limit":{},"usage_count":{"type":"integer"},"usage_remaining":{"type":["number","null"]},"enable_expiry":{},"start_date":{"type":["string","null"]},"expiry_date":{"type":["string","null"]},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]}},"required":["id","code","description","is_active","status_text","discount_type","discount_amount","apply_to","enable_condition","min_purchase","max_purchase","usage_limit","usage_count","usage_remaining","enable_expiry","start_date","expiry_date","created_at","updated_at"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while creating the coupon"}},"required":["success","message"]},{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Database error occurred while creating coupon"}},"required":["success","message"]}]}}}}},"description":"Create a discount coupon for your account. Each code must be different from the codes of your other coupons.\n\nA new coupon does not apply to a form automatically. To let a form accept the coupon, add the coupon ID to the coupon rules of the form:\n\n- [Change the coupon rules of a payment form](#tag/payment-forms/PATCH/forms/{id}/coupon)\n- [Change the coupon rules of an event form](#tag/event-forms/PATCH/event-forms/{id}/coupon)"}},"/customers":{"get":{"operationId":"customerManagement.getCustomersList","description":"Get the customers of your team, one page at a time. BCL calculates the transaction totals of each customer from the transactions at the time of the request.","summary":"List customers","tags":["Customers"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"example":1,"description":"The page number. The first page is 1."},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"example":20,"description":"The number of items on each page."},{"name":"search","in":"query","description":"Find a customer by email or phone number.","schema":{"type":"string","maxLength":255},"example":"customer@example.com"},{"name":"date_from","in":"query","description":"Show only the customers with a first transaction on this date or after it. Format `YYYY-MM-DD`.","schema":{"type":"string","format":"date"},"example":"2025-01-01"},{"name":"date_to","in":"query","description":"Show only the customers with a last transaction on this date or before it. Format `YYYY-MM-DD`.","schema":{"type":"string","format":"date"},"example":"2025-12-31"},{"name":"sort_by","in":"query","description":"The field that BCL uses to sort the list.","schema":{"type":"string","enum":["name","paid_amount","transaction_count","first_transaction_at","last_transaction_at"]},"example":"last_transaction_at"},{"name":"sort_order","in":"query","description":"The sort direction: `asc` (from low to high) or `desc` (from high to low).","schema":{"type":"string","enum":["asc","desc"]},"example":"desc"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/LengthAwarePaginator"},"meta":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"string"},"per_page":{"type":"integer"},"total":{"type":"string"}},"required":["current_page","last_page","per_page","total"]}},"required":["success","data","meta"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving customers"}},"required":["success","message"]}}}}}}},"/customers/{id}":{"get":{"operationId":"customerManagement.getCustomer","description":"Get all the information of one customer in one response:\n\n- the profile\n- the transaction statistics, from the transactions at the time of the request\n- the recent transactions\n- the event participants\n\nUse the query parameters to filter the recent transactions.","summary":"Get a customer","tags":["Customers"],"parameters":[{"name":"id","in":"path","required":true,"description":"The ULID of the customer. Example `01JA00000000000000000EXAM`.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Show only the recent transactions with these statuses. To send more than one status, put a comma between them.\n\nValues: `pending`, `failed`, `success`, `cancelled`, `completed`.","schema":{"type":"string"},"example":"success,pending"},{"name":"is_paid","in":"query","description":"Show only the paid recent transactions (`true`), or only the unpaid recent transactions (`false`).","schema":{"type":"boolean"},"example":true},{"name":"payment_channel","in":"query","description":"Show only the recent transactions with these payment channels. To send more than one channel, put a comma between them. Send the number of the channel:\n\n- `1`: FPX Online Banking\n- `3`: FPX Direct Debit\n- `4`: FPX Line of Credit\n- `5`: DuitNow Online Banking\n- `6`: DuitNow QR\n- `7`: SPayLater\n- `8`: Boost PayFlex\n- `9`: QRIS Online Banking\n- `10`: QRIS e-Wallet\n- `11`: NETS Singapore\n- `12`: Credit Card\n- `13`: Alipay\n- `14`: WeChat Pay\n- `15`: PromptPay Thailand\n- `16`: Touch 'n Go eWallet\n- `17`: Boost Wallet\n- `18`: GrabPay\n- `19`: Grab PayLater\n- `21`: ShopeePay\n- `23`: FPX B2B","schema":{"type":"string"},"example":"1,6,12"},{"name":"limit","in":"query","description":"The number of recent transactions on each page. The maximum is 100.","schema":{"type":"integer","minimum":1,"maximum":100},"example":20},{"name":"page","in":"query","description":"The page number of the recent transactions. The first page is 1.","schema":{"type":"integer","minimum":1},"example":1},{"name":"include_custom_fields","in":"query","description":"Set to `true` to include the custom fields of each participant in the participant list.","schema":{"type":"boolean"},"example":true}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"customer":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":["string","null"]},"tin":{"type":["string","null"]},"identification_number":{"type":["string","null"]},"identification_scheme":{"type":["string","null"]},"address":{"type":["object","null"],"properties":{"address_lines":{"type":["string","null"]},"city":{"type":["string","null"]},"postal_zone":{"type":["string","null"]},"state":{"type":["string","null"]},"country":{"type":"string"}},"required":["address_lines","city","postal_zone","state","country"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","email","phone","tin","identification_number","identification_scheme","address","created_at","updated_at"]},"stats":{"type":"object","properties":{"transaction_count":{"type":"integer"},"paid_transaction_count":{"type":"integer"},"paid_amount":{"type":"string"},"first_transaction_at":{"type":"string"},"last_transaction_at":{"type":"string"}},"required":["transaction_count","paid_transaction_count","paid_amount","first_transaction_at","last_transaction_at"]},"recent_transactions":{"$ref":"#/components/schemas/LengthAwarePaginator"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"match_sources":{"type":"array","items":{}},"participant":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"mykad":{"type":["string","null"]},"ticket_name":{"type":"string"},"ticket_number":{"type":"string"},"seat_number":{"type":["string","null"]},"status":{"type":"string"},"checked_in":{"type":"boolean"},"checked_in_at":{"type":["string","null"]},"ticket_url":{"type":["string","null"]},"custom_fields":{"type":"array","items":{}}},"required":["name","email","phone","mykad","ticket_name","ticket_number","seat_number","status","checked_in","checked_in_at","ticket_url","custom_fields"]},"event":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"starts_at":{"type":"string"},"ends_at":{"type":"string"}},"required":["id","name","slug","starts_at","ends_at"]},"order":{"type":"object","properties":{"transaction_id":{"type":"string"},"order_number":{"type":"string"},"customer_id":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["pending","failed","success","cancelled","completed","unknown",null]},"status_code":{"type":["integer","null"]},"is_paid":{"type":"boolean"},"amount":{"type":"number"},"payer_name":{"type":"string"},"payer_email":{"type":"string"},"payer_phone":{"type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["transaction_id","order_number","customer_id","status","status_code","is_paid","amount","payer_name","payer_email","payer_phone","created_at"]},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]}},"required":["id","match_sources","participant","event","order","created_at","updated_at"]}},"participants_summary":{"type":"object","properties":{"total_participants":{"type":"integer","minimum":0},"unique_orders":{"type":"integer","minimum":0},"include_custom_fields":{"type":"boolean"}},"required":["total_participants","unique_orders","include_custom_fields"]},"transactions_meta":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"string"},"per_page":{"type":"integer"},"total":{"type":"string"}},"required":["current_page","last_page","per_page","total"]}},"required":["customer","stats","recent_transactions","participants","participants_summary","transactions_meta"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Customer not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving customer details"}},"required":["success","message"]}}}}}}},"/event-forms":{"get":{"operationId":"eventFormManagement.getEventFormsList","description":"Get the event forms that you can manage, one page at a time.","summary":"List event forms","tags":["Event forms"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"The page number. The first page is 1."},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"The number of items on each page."},{"name":"search","in":"query","schema":{"type":"string","maxLength":255},"description":"The text to find."},{"name":"status","in":"query","schema":{"type":"string","enum":["active","inactive","all"]},"description":"Show only `active` items, only `inactive` items, or `all` items."},{"name":"sort_by","in":"query","schema":{"type":"string","enum":["created_at","updated_at","starts_at","ends_at","venue_name","slug"]},"description":"The field that BCL uses to sort the list."},{"name":"sort_order","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"The sort direction: `asc` (from low to high) or `desc` (from high to low)."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/LengthAwarePaginator"},"meta":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"string"},"per_page":{"type":"integer"},"total":{"type":"string"},"from":{"type":["integer","null"]},"to":{"type":["integer","null"]}},"required":["current_page","last_page","per_page","total","from","to"]},"summary":{"type":"object","properties":{"total_count":{"type":"integer","minimum":0},"active_count":{"type":"integer","minimum":0},"inactive_count":{"type":"integer","minimum":0}},"required":["total_count","active_count","inactive_count"]}},"required":["success","data","meta","summary"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving event forms list"}},"required":["success","message"]}}}}}}},"/event-forms/{id}":{"get":{"operationId":"eventFormManagement.getEventForm","description":"Get the full configuration of one event form. The response includes the tickets, the affiliate options and the other configuration.","summary":"Get an event form","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["Enabled","Disabled"]},"is_active":{"type":"boolean"},"show_on_homepage":{"type":"boolean"},"homepage_visibility":{"type":"boolean"},"form_url":{"type":"string"},"event_type":{"type":"string"},"starts_at":{"type":["string","null"]},"ends_at":{"type":["string","null"]},"duration_days":{"type":["integer","null"]},"daily_schedule":{"type":["array","null"],"items":{}},"venue_location":{"type":["string","null"]},"venue_type":{"type":"string"},"online_link":{"type":["string","null"]},"organiser_email":{"type":["string","null"]},"organiser_phone":{"type":["string","null"]},"description":{"type":["string","null"]},"featured_image":{"type":["string","null"]},"sales_page_image":{"type":["string","null"]},"use_html_content":{"type":"boolean"},"html_content":{"type":["string","null"]},"payment_notes":{"type":["array","null"],"items":{}},"receipt_notes":{"type":["array","null"],"items":{}},"notification_message":{"type":["array","null"],"items":{}},"minimum_quantity":{"type":["integer","null"]},"minimum_amount":{"type":["string","null"]},"single_selection_only":{"type":"boolean"},"stock_notice":{"type":["array","null"],"items":{}},"classification_code":{"type":["string","null"]},"enable_gateway_fee":{"type":"boolean"},"payment_channels":{"type":["array","null"],"items":{}},"enable_coupons":{"type":"boolean"},"allowed_coupons":{"type":["array","null"],"items":{}},"redirect_urls":{"type":["array","null"],"items":{}},"webhook_settings":{"type":["array","null"],"items":{}},"facebook_pixel":{"type":["array","null"],"items":{}},"tiktok_pixel":{"type":["array","null"],"items":{}},"google_ads":{"type":["array","null"],"items":{}},"zoom_details":{"type":["array","null"],"items":{}},"custom_email_settings":{"type":["array","null"],"items":{}},"custom_fields":{"type":["array","null"],"items":{}},"participant_custom_fields":{"type":["array","null"],"items":{}},"enable_tax":{"type":"boolean"},"portal_key":{"type":["string","null"]},"team_name":{"type":"string"},"team_domain":{"type":["string","null"]},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]},"created_by":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["name","email"]},"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":["string","null"]},"price":{"type":"string"},"sale_price":{"type":["string","null"]},"pricing_schedules":{"type":["array","null"],"items":{}},"effective_price":{"type":"number"},"effective_label":{"type":["string","null"]},"effective_seats_per_ticket":{"type":"string"},"effective_attendees_per_ticket":{"type":"string"},"enable_stock":{"type":"boolean"},"stock":{"type":"integer"},"purchase_limit":{"type":["integer","null"]},"quantity_increment":{"type":"integer"},"is_coming_soon":{"type":"boolean"},"enable_participant_details":{"type":"boolean"},"seating_config":{"type":["array","null"],"items":{}},"booked_seats":{"type":["array","null"],"items":{}},"blocked_seats":{"type":["array","null"],"items":{}},"reserved_seats":{"type":["array","null"],"items":{}}},"required":["id","name","label","price","sale_price","pricing_schedules","effective_price","effective_label","effective_seats_per_ticket","effective_attendees_per_ticket","enable_stock","stock","purchase_limit","quantity_increment","is_coming_soon","enable_participant_details","seating_config","booked_seats","blocked_seats","reserved_seats"]}},"affiliate_settings":{"type":"object","properties":{"enable_affiliate":{"type":"boolean"},"show_affiliate_info":{"type":"boolean"},"override_commission_settings":{"type":"boolean"},"commission_type":{"type":["string","null"]},"commission_rate":{"type":["string","null"]}},"required":["enable_affiliate","show_affiliate_info","override_commission_settings","commission_type","commission_rate"]}},"required":["id","name","slug","status","is_active","show_on_homepage","homepage_visibility","form_url","event_type","starts_at","ends_at","duration_days","daily_schedule","venue_location","venue_type","online_link","organiser_email","organiser_phone","description","featured_image","sales_page_image","use_html_content","html_content","payment_notes","receipt_notes","notification_message","minimum_quantity","minimum_amount","single_selection_only","stock_notice","classification_code","enable_gateway_fee","payment_channels","enable_coupons","allowed_coupons","redirect_urls","webhook_settings","facebook_pixel","tiktok_pixel","google_ads","zoom_details","custom_email_settings","custom_fields","participant_custom_fields","enable_tax","portal_key","team_name","team_domain","created_at","updated_at","created_by","tickets","affiliate_settings"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving event form details"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/slug":{"patch":{"operationId":"eventFormManagement.updateSlug","description":"Change the public URL slug of the event form. The response gives the new link in `form_url`.","summary":"Change the slug of an event form","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventFormSlugRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event URL updated successfully"},"data":{"type":"object","properties":{"slug":{"type":"string","description":"The new slug of the event form."},"form_url":{"type":"string"}},"required":["slug","form_url"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update event URL"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/venue-name":{"patch":{"operationId":"eventFormManagement.updateVenueName","description":"Change the name of the event form. The name is in the field `venue_name`. The other configuration of the form does not change.","summary":"Change the name of an event form","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventFormVenueNameRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event name updated successfully"},"data":{"type":"object","properties":{"venue_name":{"type":"string"},"form_url":{"type":"string"}},"required":["venue_name","form_url"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update event name"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/content":{"patch":{"operationId":"eventFormManagement.updateContent","description":"Save the description or the custom HTML content of the event form. `use_html_content` sets the content mode:\n\n- `false`: the event page shows `description`.\n- `true`: the event page shows `html_content`.","summary":"Change the content of an event form","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventFormContentRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event content updated successfully"},"data":{"type":"object","properties":{"use_html_content":{"type":"boolean"},"html_content":{"type":["string","null"]},"description":{"type":["string","null"]},"form_url":{"type":"string"}},"required":["use_html_content","html_content","description","form_url"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update event content"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/status":{"patch":{"operationId":"eventFormManagement.updateStatus","description":"Make the event form available or not available to customers. Set `is_active` to `true` or `false`.","summary":"Change the status of an event form","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventFormStatusRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event status updated successfully"},"data":{"type":"object","properties":{"is_active":{"type":"boolean"},"status_text":{"type":"string","enum":["Active","Inactive"]},"form_url":{"type":"string"}},"required":["is_active","status_text","form_url"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update event status"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/homepage":{"patch":{"operationId":"eventFormManagement.updateHomepageDisplay","description":"Set if the event form shows in the showcase on your BCL homepage. Set `show_on_homepage` to `true` or `false`.","summary":"Show an event form on the homepage","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventFormHomepageRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Homepage display setting updated successfully"},"data":{"type":"object","properties":{"show_on_homepage":{"type":"boolean"},"display_text":{"type":"string","enum":["Visible","Hidden"]},"form_url":{"type":"string"}},"required":["show_on_homepage","display_text","form_url"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update homepage display setting"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/tickets":{"patch":{"operationId":"eventFormManagement.updateTickets","description":"Change the number of tickets in stock for one or more ticket types in one request. Send one item for each ticket type.","summary":"Change the ticket stock of an event form","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventFormTicketsRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Ticket stock updated successfully"},"data":{"type":"object","properties":{"updated_tickets":{"type":"array","items":{"type":"object","properties":{"ticket_id":{"type":"string"},"name":{"type":"string"},"previous_stock":{"type":"integer"},"new_stock":{"type":"integer"}},"required":["ticket_id","name","previous_stock","new_stock"]}},"form_url":{"type":"string"},"summary":{"type":"object","properties":{"total_requested":{"type":"integer"},"updated":{"type":"integer"}},"required":["total_requested","updated"]}},"required":["updated_tickets","form_url","summary"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update ticket stock"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/ticket-prices":{"patch":{"operationId":"eventFormManagement.updateTicketPrices","description":"Change the price and the sale price of one or more ticket types in one request. Send one item for each ticket type.\n\nFor `sale_price`:\n\n- If you do not send `sale_price`, the sale price does not change.\n- If you send `null` or `0`, BCL removes the sale price.","summary":"Change the ticket prices of an event form","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventFormTicketPricesRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Ticket prices updated successfully"},"data":{"type":"object","properties":{"updated_tickets":{"type":"array","items":{"type":"object","properties":{"ticket_id":{"type":"string"},"name":{"type":"string"},"previous_price":{"type":"number"},"new_price":{"type":"number"},"previous_sale_price":{"type":["number","null"]},"new_sale_price":{"type":["number","null"]}},"required":["ticket_id","name","previous_price","new_price","previous_sale_price","new_sale_price"]}},"form_url":{"type":"string"},"summary":{"type":"object","properties":{"total_requested":{"type":"integer"},"updated":{"type":"integer"}},"required":["total_requested","updated"]}},"required":["updated_tickets","form_url","summary"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update ticket prices"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/affiliate":{"patch":{"operationId":"eventFormManagement.updateAffiliate","description":"Change the affiliate programme options of this event.\n\n> [!NOTE]\n> You can change these options only when affiliates are on for your full account. If they are off, the API sends a `403` response.","summary":"Change the affiliate options of an event form","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventFormAffiliateRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Affiliate settings updated successfully"},"form_url":{"type":"string"},"data":{"type":"object","properties":{"enable_affiliate":{"type":"boolean"},"show_affiliate_info":{"type":"boolean"},"override_commission_settings":{"type":"boolean"},"commission_type":{"type":["string","null"]},"commission_rate":{"type":["string","null"]}},"required":["enable_affiliate","show_affiliate_info","override_commission_settings","commission_type","commission_rate"]},"global_settings":{"type":"object","properties":{"global_enable_affiliate":{"type":"boolean"},"global_commission_type":{"type":"string"},"global_commission_rate":{"type":"number"},"is_private_program":{"type":"boolean"},"payout_schedule":{"type":"string"}},"required":["global_enable_affiliate","global_commission_type","global_commission_rate","is_private_program","payout_schedule"]}},"required":["success","message","form_url","data","global_settings"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"403":{"description":"Forbidden. Affiliates are off for your full account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Global affiliate setting is disabled. You cannot update affiliate settings at the event level."}},"required":["success","message"]}}}},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update affiliate settings"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/redirect-urls":{"patch":{"operationId":"eventFormManagement.updateRedirectUrls","description":"Set the pages where BCL sends the customer after the checkout of the event form. Set one URL for a successful payment and one URL for a failed payment.","summary":"Change the redirect URLs of an event form","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormRedirectUrlsRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Redirect URLs updated successfully"},"form_url":{"type":"string"},"data":{"type":"object","properties":{"redirect_urls":{"type":["array","null"],"items":{}}},"required":["redirect_urls"]}},"required":["success","message","form_url","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update redirect URLs"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/webhook":{"patch":{"operationId":"eventFormManagement.updateWebhook","description":"Start or stop the webhook of the event form. Then select the events that BCL sends to your URL.","summary":"Change the webhook of an event form","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormWebhookRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Webhook settings updated successfully"},"form_url":{"type":"string"},"data":{"type":"object","properties":{"webhook_settings":{"type":["array","null"],"items":{}}},"required":["webhook_settings"]}},"required":["success","message","form_url","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update webhook settings"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/facebook-pixel":{"patch":{"operationId":"eventFormManagement.updateFacebookPixel","description":"Change the Facebook pixel of the event form. You can:\n\n- start or stop the pixel\n- set the pixel ID\n- set the Conversions API options","summary":"Change the Facebook pixel of an event form","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventFormFacebookPixelRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Facebook pixel settings updated successfully"},"form_url":{"type":"string"},"data":{"type":"object","properties":{"facebook_pixel":{"type":["array","null"],"items":{}}},"required":["facebook_pixel"]}},"required":["success","message","form_url","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update Facebook pixel settings"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/tiktok-pixel":{"patch":{"operationId":"eventFormManagement.updateTiktokPixel","description":"Change the TikTok pixel of the event form. You can:\n\n- start or stop the pixel\n- set the pixel ID\n- set the Events API options","summary":"Change the TikTok pixel of an event form","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventFormTiktokPixelRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"TikTok pixel settings updated successfully"},"form_url":{"type":"string"},"data":{"type":"object","properties":{"tiktok_pixel":{"type":["array","null"],"items":{}}},"required":["tiktok_pixel"]}},"required":["success","message","form_url","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update TikTok pixel settings"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/coupon":{"patch":{"operationId":"eventFormManagement.updateCoupon","description":"Set if the event form accepts coupons. Then set the IDs of the coupons that the form accepts. To create a coupon, see [Coupons](#tag/coupons).","summary":"Change the coupon rules of an event form","tags":["Event forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormCouponRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Coupon settings updated successfully"},"form_url":{"type":"string"},"data":{"type":"object","properties":{"enable_coupons":{"type":"boolean"},"allowed_coupons":{"type":["array","null"],"items":{}},"allowed_coupons_count":{"type":"integer"},"restriction_type":{"type":"string","const":"all_coupons"},"note":{"type":"string","const":"All organisation coupons are allowed"}},"required":["enable_coupons","allowed_coupons","allowed_coupons_count","restriction_type","note"]}},"required":["success","message","form_url","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Event form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update coupon settings"}},"required":["success","message"]}}}}}}},"/forms":{"get":{"operationId":"formManagement.getFormsList","description":"Get the payment forms that you can manage, one page at a time.","summary":"List payment forms","tags":["Payment forms"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"The page number. The first page is 1."},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"The number of items on each page."},{"name":"search","in":"query","schema":{"type":"string","maxLength":255},"description":"The text to find."},{"name":"status","in":"query","schema":{"type":"string","enum":["active","inactive","all"]},"description":"Show only `active` items, only `inactive` items, or `all` items."},{"name":"sort_by","in":"query","schema":{"type":"string","enum":["title","created_at","updated_at","slug"]},"description":"The field that BCL uses to sort the list."},{"name":"sort_order","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"The sort direction: `asc` (from low to high) or `desc` (from high to low)."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/LengthAwarePaginator"},"meta":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"string"},"per_page":{"type":"integer"},"total":{"type":"string"},"from":{"type":["integer","null"]},"to":{"type":["integer","null"]}},"required":["current_page","last_page","per_page","total","from","to"]},"summary":{"type":"object","properties":{"total_count":{"type":"string"},"active_count":{"type":"integer","minimum":0},"inactive_count":{"type":"integer","minimum":0}},"required":["total_count","active_count","inactive_count"]}},"required":["success","data","meta","summary"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving forms list"}},"required":["success","message"]}}}}}}},"/forms/{id}":{"get":{"operationId":"formManagement.getForm","description":"Get the full configuration of one payment form. The response includes the products, the variations and the other configuration.","summary":"Get a payment form","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"slug":{"type":"string"},"type_form":{"type":["integer","null"]},"is_active":{"type":"boolean"},"status":{"type":"string","enum":["Enabled","Disabled"]},"show_on_homepage":{"type":"boolean"},"homepage_visibility":{"type":"boolean"},"form_url":{"type":"string"},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]},"tags":{"type":["array","null"],"items":{}},"featured_image":{"type":["string","null"]},"description":{"type":["string","null"]},"require_email":{"type":"boolean"},"enable_address":{"type":"boolean"},"enable_shipping":{"type":"boolean"},"created_by":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["name","email"]},"team_name":{"type":"string"},"team_domain":{"type":["string","null"]},"amount":{"type":["string","null"]},"custom_amount":{"type":"boolean"},"enable_fee":{"type":"boolean"},"payment_channel":{"type":["array","null"],"items":{}},"portal_key":{"type":["string","null"]},"frequency_mode":{"type":["string","null"]},"total_recurring_months":{"type":["array","null"],"items":{}},"use_products":{"type":"boolean"},"use_variations":{"type":"boolean"},"formProductItems":{},"form_variations":{"type":"string"},"sales_page_image":{"type":["string","null"]},"content_editor":{"type":["string","null"]},"video_settings":{"type":["array","null"],"items":{}},"custom_fields":{"type":["array","null"],"items":{}},"enable_coupons":{"type":"integer"},"allowed_coupons":{"type":["array","null"],"items":{}},"tax":{"type":"string"},"redirect_urls":{"type":["array","null"],"items":{}},"webhook":{"type":["array","null"],"items":{}},"zoom_details":{"type":["array","null"],"items":{}},"google_ads":{"type":["array","null"],"items":{}},"enable_facebook_pixel":{"type":"boolean"},"facebook_pixel_id":{"type":["string","null"]},"enable_facebook_api":{"type":"boolean"},"facebook_api_token":{"type":["string","null"]},"facebook_test_code":{"type":["string","null"]},"enable_tiktok_pixel":{"type":"boolean"},"tiktok_pixel_id":{"type":["string","null"]},"enable_tiktok_api":{"type":"boolean"},"tiktok_api_token":{"type":["string","null"]},"tiktok_test_code":{"type":["string","null"]},"affiliate_settings":{"type":"object","properties":{"enable_affiliate":{"type":"boolean"},"show_affiliate_info":{"type":"boolean"},"override_commission_settings":{"type":"boolean"},"commission_type":{"type":["string","null"]},"commission_rate":{"type":["string","null"]}},"required":["enable_affiliate","show_affiliate_info","override_commission_settings","commission_type","commission_rate"]}},"required":["id","title","slug","type_form","is_active","status","show_on_homepage","homepage_visibility","form_url","created_at","updated_at","tags","featured_image","description","require_email","enable_address","enable_shipping","created_by","team_name","team_domain","amount","custom_amount","enable_fee","payment_channel","portal_key","frequency_mode","total_recurring_months","use_products","use_variations","formProductItems","form_variations","sales_page_image","content_editor","video_settings","custom_fields","enable_coupons","allowed_coupons","tax","redirect_urls","webhook","zoom_details","google_ads","enable_facebook_pixel","facebook_pixel_id","enable_facebook_api","facebook_api_token","facebook_test_code","enable_tiktok_pixel","tiktok_pixel_id","enable_tiktok_api","tiktok_api_token","tiktok_test_code","affiliate_settings"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving form details"}},"required":["success","message"]}}}}}}},"/forms/duplicate":{"post":{"operationId":"formManagement.duplicateForm","description":"Make a copy of a payment form. The copy is a new draft that you can change.\n\nSend the ID of the form to copy in `form_id`. Send a `title` and a `slug` for the new form.","summary":"Duplicate a payment form","tags":["Payment forms"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateFormRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form duplicated successfully"},"data":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"slug":{"type":"string"},"type_form":{"type":["integer","null"]},"is_active":{"type":"boolean"},"status":{"type":"string","enum":["Enabled","Disabled"]},"show_on_homepage":{"type":"boolean"},"homepage_visibility":{"type":"boolean"},"form_url":{"type":"string"},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]},"tags":{"type":["array","null"],"items":{}},"featured_image":{"type":["string","null"]},"description":{"type":["string","null"]},"require_email":{"type":"boolean"},"enable_address":{"type":"boolean"},"enable_shipping":{"type":"boolean"},"amount":{"type":["string","null"]},"custom_amount":{"type":"boolean"},"enable_fee":{"type":"boolean"},"payment_channel":{"type":["array","null"],"items":{}},"portal_key":{"type":["string","null"]},"frequency_mode":{"type":["string","null"]},"total_recurring_months":{"type":["array","null"],"items":{}},"use_products":{"type":"boolean"},"use_variations":{"type":"boolean"},"formProductItems":{},"form_variations":{"type":"string"},"sales_page_image":{"type":["string","null"]},"content_editor":{"type":["string","null"]},"video_settings":{"type":["array","null"],"items":{}},"custom_fields":{"type":["array","null"],"items":{}},"enable_coupons":{"type":"integer"},"allowed_coupons":{"type":["array","null"],"items":{}},"tax":{"type":"string"},"redirect_urls":{"type":["array","null"],"items":{}},"webhook":{"type":["array","null"],"items":{}},"zoom_details":{"type":["array","null"],"items":{}},"google_ads":{"type":["array","null"],"items":{}},"enable_facebook_pixel":{"type":"boolean"},"facebook_pixel_id":{"type":["string","null"]},"enable_facebook_api":{"type":"boolean"},"facebook_api_token":{"type":["string","null"]},"facebook_test_code":{"type":["string","null"]},"enable_tiktok_pixel":{"type":"boolean"},"tiktok_pixel_id":{"type":["string","null"]},"enable_tiktok_api":{"type":"boolean"},"tiktok_api_token":{"type":["string","null"]},"tiktok_test_code":{"type":["string","null"]},"affiliate_settings":{"type":"object","properties":{"enable_affiliate":{"type":"boolean"},"show_affiliate_info":{"type":"boolean"},"override_commission_settings":{"type":"boolean"},"commission_type":{"type":["string","null"]},"commission_rate":{"type":["string","null"]}},"required":["enable_affiliate","show_affiliate_info","override_commission_settings","commission_type","commission_rate"]}},"required":["id","title","slug","type_form","is_active","status","show_on_homepage","homepage_visibility","form_url","created_at","updated_at","tags","featured_image","description","require_email","enable_address","enable_shipping","amount","custom_amount","enable_fee","payment_channel","portal_key","frequency_mode","total_recurring_months","use_products","use_variations","formProductItems","form_variations","sales_page_image","content_editor","video_settings","custom_fields","enable_coupons","allowed_coupons","tax","redirect_urls","webhook","zoom_details","google_ads","enable_facebook_pixel","facebook_pixel_id","enable_facebook_api","facebook_api_token","facebook_test_code","enable_tiktok_pixel","tiktok_pixel_id","enable_tiktok_api","tiktok_api_token","tiktok_test_code","affiliate_settings"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Unable to access the requested form: it may not exist or you may not have permission."}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to duplicate form"}},"required":["success","message"]}}}}}}},"/forms/{id}/status":{"patch":{"operationId":"formManagement.updateStatus","description":"Make the payment form available or not available to customers. Set `is_active` to `true` or `false`.","summary":"Change the status of a payment form","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormStatusRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form status updated successfully"},"data":{"type":"object","properties":{"is_active":{"type":"boolean"},"status_text":{"type":"string","enum":["Active","Inactive"]},"form_url":{"type":"string"}},"required":["is_active","status_text","form_url"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update form status"}},"required":["success","message"]}}}}}}},"/forms/{id}/homepage":{"patch":{"operationId":"formManagement.updateHomepageDisplay","description":"Set if the payment form shows on your BCL homepage. Set `show_on_homepage` to `true` or `false`.","summary":"Show a payment form on the homepage","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormHomepageRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Homepage display setting updated successfully"},"data":{"type":"object","properties":{"show_on_homepage":{"type":"boolean"},"display_text":{"type":"string","enum":["Visible","Hidden"]},"form_url":{"type":"string"}},"required":["show_on_homepage","display_text","form_url"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update homepage display setting"}},"required":["success","message"]}}}}}}},"/forms/{id}/slug":{"patch":{"operationId":"formManagement.updateSlug","description":"Change the public slug of the payment form. The slug is part of the public address of the form. The response gives the new link in `form_url`.","summary":"Change the slug of a payment form","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormSlugRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form URL updated successfully"},"data":{"type":"object","properties":{"slug":{"type":"string"},"form_url":{"type":"string"}},"required":["slug","form_url"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update form URL"}},"required":["success","message"]}}}}}}},"/forms/{id}/title":{"patch":{"operationId":"formManagement.updateTitle","description":"Change the title of the payment form. The other configuration of the form does not change.","summary":"Change the title of a payment form","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormTitleRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form title updated successfully"},"data":{"type":"object","properties":{"title":{"type":"string"},"form_url":{"type":"string"}},"required":["title","form_url"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update form title"}},"required":["success","message"]}}}}}}},"/forms/{id}/content":{"patch":{"operationId":"formManagement.updateContent","description":"Save the HTML body of a custom payment form. Send the HTML in `content_editor`.","summary":"Change the content of a payment form","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormContentRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form content updated successfully"},"form_url":{"type":"string"}},"required":["success","message","form_url"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update form content"}},"required":["success","message"]}}}}}}},"/forms/{id}/stock":{"patch":{"operationId":"formManagement.updateStock","description":"Change the stock of the products or variations of the payment form. Send one item for each product or variation.","summary":"Change the stock of a payment form","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormStockRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Stock quantities updated successfully"},"data":{"type":"object","properties":{"form_type":{"type":"string","enum":["products","variations"]},"updated_items":{"type":"string"},"form_url":{"type":"string"},"summary":{"type":"object","properties":{"total_requested":{"type":"integer"},"successfully_updated":{"type":"integer"}},"required":["total_requested","successfully_updated"]}},"required":["form_type","updated_items","form_url","summary"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update stock quantities"}},"required":["success","message"]}}}}}}},"/forms/{id}/prices":{"patch":{"operationId":"formManagement.updatePrices","description":"Change the prices of the products or variations of the payment form. Send one item for each product or variation.\n\nFor `sale_price`:\n\n- If you do not send `sale_price`, the sale price does not change.\n- If you send `null` or `0`, BCL removes the sale price.","summary":"Change the prices of a payment form","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormPricesRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Prices updated successfully"},"data":{"type":"object","properties":{"form_type":{"type":"string","enum":["products","variations"]},"updated_items":{"type":"string"},"form_url":{"type":"string"},"summary":{"type":"object","properties":{"total_requested":{"type":"integer"},"successfully_updated":{"type":"integer"}},"required":["total_requested","successfully_updated"]}},"required":["form_type","updated_items","form_url","summary"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update prices"}},"required":["success","message"]}}}}}}},"/forms/{id}/affiliate":{"patch":{"operationId":"formManagement.updateAffiliate","description":"Change the affiliate programme options of the payment form.\n\n> [!NOTE]\n> You can change these options only when affiliates are on for your full account. If they are off, the API sends a `403` response.","summary":"Change the affiliate options of a payment form","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormAffiliateRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Affiliate settings updated successfully"},"form_url":{"type":"string"},"data":{"type":"object","properties":{"enable_affiliate":{"type":"boolean"},"show_affiliate_info":{"type":"boolean"},"override_commission_settings":{"type":"boolean"},"commission_type":{"type":["string","null"]},"commission_rate":{"type":["string","null"]}},"required":["enable_affiliate","show_affiliate_info","override_commission_settings","commission_type","commission_rate"]},"global_settings":{"type":"object","properties":{"global_enable_affiliate":{"type":"boolean"},"global_commission_type":{"type":"string"},"global_commission_rate":{"type":"number"},"is_private_program":{"type":"boolean"},"payout_schedule":{"type":"string"}},"required":["global_enable_affiliate","global_commission_type","global_commission_rate","is_private_program","payout_schedule"]}},"required":["success","message","form_url","data","global_settings"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"403":{"description":"Forbidden. Affiliates are off for your full account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Global affiliate setting is disabled. You cannot update affiliate settings at the form level."}},"required":["success","message"]}}}},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update affiliate settings"}},"required":["success","message"]}}}}}}},"/forms/{id}/redirect-urls":{"patch":{"operationId":"formManagement.updateRedirectUrls","description":"Set the pages where BCL sends the customer after the payment. Set one URL for a successful payment and one URL for a failed payment.","summary":"Change the redirect URLs of a payment form","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormRedirectUrlsRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Redirect URLs updated successfully"},"form_url":{"type":"string"},"data":{"type":"object","properties":{"redirect_urls":{"type":["array","null"],"items":{}}},"required":["redirect_urls"]}},"required":["success","message","form_url","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update redirect URLs"}},"required":["success","message"]}}}}}}},"/forms/{id}/webhook":{"patch":{"operationId":"formManagement.updateWebhook","description":"Start or stop the webhook of the payment form. Then select the events that BCL sends to your URL.\n\nFor the fields that BCL sends, see [Payment form webhook payload](https://docs.bcl.my/webhook-payment-form/).","summary":"Change the webhook of a payment form","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormWebhookRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Webhook settings updated successfully"},"form_url":{"type":"string"},"data":{"type":"object","properties":{"webhook":{"type":["array","null"],"items":{}}},"required":["webhook"]}},"required":["success","message","form_url","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update webhook settings"}},"required":["success","message"]}}}}}}},"/forms/{id}/facebook-pixel":{"patch":{"operationId":"formManagement.updateFacebookPixel","description":"Change the Facebook pixel of the payment form. You can:\n\n- start or stop the pixel\n- set the pixel ID\n- set the server-side options (Conversions API)","summary":"Change the Facebook pixel of a payment form","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormFacebookPixelRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Facebook pixel settings updated successfully"},"form_url":{"type":"string"},"data":{"type":"object","properties":{"enable_facebook_pixel":{"type":"boolean"},"facebook_pixel_id":{"type":["string","null"]},"enable_facebook_api":{"type":"boolean"},"facebook_api_token":{"type":["string","null"]}},"required":["enable_facebook_pixel","facebook_pixel_id","enable_facebook_api","facebook_api_token"]}},"required":["success","message","form_url","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update Facebook pixel settings"}},"required":["success","message"]}}}}}}},"/forms/{id}/tiktok-pixel":{"patch":{"operationId":"formManagement.updateTiktokPixel","description":"Change the TikTok pixel of the payment form. You can:\n\n- start or stop the pixel\n- set the pixel ID\n- set the Events API options","summary":"Change the TikTok pixel of a payment form","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormTiktokPixelRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"TikTok pixel settings updated successfully"},"form_url":{"type":"string"},"data":{"type":"object","properties":{"enable_tiktok_pixel":{"type":"boolean"},"tiktok_pixel_id":{"type":["string","null"]},"enable_tiktok_api":{"type":"boolean"},"tiktok_api_token":{"type":["string","null"]}},"required":["enable_tiktok_pixel","tiktok_pixel_id","enable_tiktok_api","tiktok_api_token"]}},"required":["success","message","form_url","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update TikTok pixel settings"}},"required":["success","message"]}}}}}}},"/forms/{id}/coupon":{"patch":{"operationId":"formManagement.updateCoupon","description":"Set if the payment form accepts coupons. Then set the IDs of the coupons that the form accepts. To create a coupon, see [Coupons](#tag/coupons).","summary":"Change the coupon rules of a payment form","tags":["Payment forms"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the payment form."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFormCouponRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Coupon settings updated successfully"},"form_url":{"type":"string"},"data":{"type":"object","properties":{"enable_coupons":{"type":"integer"},"allowed_coupons":{"type":["array","null"],"items":{}},"allowed_coupons_count":{"type":"integer"},"restriction_type":{"type":"string","const":"all_coupons"},"note":{"type":"string","const":"All organisation coupons are allowed"}},"required":["enable_coupons","allowed_coupons","allowed_coupons_count","restriction_type","note"]}},"required":["success","message","form_url","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Form not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Failed to update coupon settings"}},"required":["success","message"]}}}}}}},"/participants":{"get":{"operationId":"participantManagement.getParticipantsList","description":"Find event participants by the phone or email of the attendee or the buyer. The response gives the participant, the order and the event details. It also gives the public URL of the ticket.","summary":"Search participants","tags":["Participants"],"parameters":[{"name":"search","in":"query","required":true,"description":"The text to find. BCL compares it with:\n\n- the phone and the email of the attendee and of the buyer\n- the MyKad of the attendee (digits only)\n\nThe `buyer` scope does not include MyKad.","schema":{"type":"string","maxLength":255},"example":"60123456789"},{"name":"match_scope","in":"query","description":"The fields that BCL compares with the search text:\n\n- `any`: the fields of the attendee or of the buyer\n- `attendee`: only the fields of the attendee\n- `buyer`: only the fields of the buyer (no MyKad)","schema":{"type":"string","enum":["any","attendee","buyer"]},"example":"any"},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"example":1,"description":"The page number. The first page is 1."},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"example":20,"description":"The number of items on each page."},{"name":"include_custom_fields","in":"query","description":"Set to `true` to include the custom fields of each participant in the response.","schema":{"type":"boolean"},"example":true}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"match_sources":{"type":"array","items":{}},"participant":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"mykad":{"type":["string","null"]},"ticket_name":{"type":"string"},"ticket_number":{"type":"string"},"seat_number":{"type":["string","null"]},"status":{"type":"string"},"checked_in":{"type":"boolean"},"checked_in_at":{"type":["string","null"]},"ticket_url":{"type":["string","null"]},"custom_fields":{"type":"array","items":{}}},"required":["name","email","phone","mykad","ticket_name","ticket_number","seat_number","status","checked_in","checked_in_at","ticket_url","custom_fields"]},"event":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"starts_at":{"type":"string"},"ends_at":{"type":"string"}},"required":["id","name","slug","starts_at","ends_at"]},"order":{"type":"object","properties":{"transaction_id":{"type":"string"},"order_number":{"type":"string"},"customer_id":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["pending","failed","success","cancelled","completed","unknown",null]},"status_code":{"type":["integer","null"]},"is_paid":{"type":"boolean"},"amount":{"type":"number"},"payer_name":{"type":"string"},"payer_email":{"type":"string"},"payer_phone":{"type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["transaction_id","order_number","customer_id","status","status_code","is_paid","amount","payer_name","payer_email","payer_phone","created_at"]},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]}},"required":["id","match_sources","participant","event","order","created_at","updated_at"]}},"meta":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"}},"required":["current_page","last_page","per_page","total"]},"lookup":{"type":"object","properties":{"search":{"type":"string"},"normalized_phone":{"type":["string","null"]},"normalized_email":{"type":["string","null"]},"normalized_mykad":{"type":["string","null"]},"match_scope":{},"include_custom_fields":{"type":"boolean"}},"required":["search","normalized_phone","normalized_email","normalized_mykad","match_scope","include_custom_fields"]},"summary":{"type":"object","properties":{"total_participants":{"type":"string"},"unique_orders":{"type":"integer","minimum":0}},"required":["total_participants","unique_orders"]}},"required":["success","data","meta","lookup","summary"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving participants"}},"required":["success","message"]}}}}}}},"/participants/{id}":{"patch":{"operationId":"participantManagement.updateParticipant","description":"Change the name, email, phone and MyKad of one attendee. One participant is one check-in record.\n\n> [!NOTE]\n> `name` is necessary. BCL changes `email`, `phone` and `mykad` only if you send them.","summary":"Change a participant","tags":["Participants"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the participant."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateParticipantRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","enum":["No changes detected; participant is unchanged.","Participant updated successfully"]},"data":{"type":"object","properties":{"id":{"type":"string"},"match_sources":{"type":"array","items":{}},"participant":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"mykad":{"type":["string","null"]},"ticket_name":{"type":"string"},"ticket_number":{"type":"string"},"seat_number":{"type":["string","null"]},"status":{"type":"string"},"checked_in":{"type":"boolean"},"checked_in_at":{"type":["string","null"]},"ticket_url":{"type":["string","null"]},"custom_fields":{"type":"array","items":{}}},"required":["name","email","phone","mykad","ticket_name","ticket_number","seat_number","status","checked_in","checked_in_at","ticket_url","custom_fields"]},"event":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"starts_at":{"type":"string"},"ends_at":{"type":"string"}},"required":["id","name","slug","starts_at","ends_at"]},"order":{"type":"object","properties":{"transaction_id":{"type":"string"},"order_number":{"type":"string"},"customer_id":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["pending","failed","success","cancelled","completed","unknown",null]},"status_code":{"type":["integer","null"]},"is_paid":{"type":"boolean"},"amount":{"type":"number"},"payer_name":{"type":"string"},"payer_email":{"type":"string"},"payer_phone":{"type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["transaction_id","order_number","customer_id","status","status_code","is_paid","amount","payer_name","payer_email","payer_phone","created_at"]},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]}},"required":["id","match_sources","participant","event","order","created_at","updated_at"]},"changed_fields":{"type":"array","items":{}}},"required":["success","message","data","changed_fields"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while updating the participant"}},"required":["success","message"]}}}}}}},"/event-forms/{id}/participants":{"get":{"operationId":"participantManagement.getEventFormParticipants","description":"Get the attendees of one event form, one page at a time. You can search the list and filter it by status.","summary":"List the participants of an event","tags":["Participants"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the event form."},{"name":"search","in":"query","description":"The text to find. BCL compares it with:\n\n- the phone and the email of the attendee and of the buyer\n- the MyKad of the attendee (digits only)\n\nThe `buyer` scope does not include MyKad.","schema":{"type":["string","null"],"maxLength":255},"example":"60123456789"},{"name":"match_scope","in":"query","description":"The fields that BCL compares with the search text. BCL uses this parameter only when you send `search`.\n\n- `any`: the fields of the attendee or of the buyer\n- `attendee`: only the fields of the attendee\n- `buyer`: only the fields of the buyer (no MyKad)","schema":{"type":"string","enum":["any","attendee","buyer"]},"example":"any"},{"name":"status","in":"query","schema":{"type":"string","enum":["active","checked_in","cancelled","no_show"]},"example":"active","description":"Show only the participants with this status."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"example":1,"description":"The page number. The first page is 1."},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"example":20,"description":"The number of items on each page."},{"name":"include_custom_fields","in":"query","schema":{"type":"boolean"},"example":true,"description":"Set to `true` to include the custom fields of each participant in the response."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"participant":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"mykad":{"type":["string","null"]},"ticket_name":{"type":"string"},"ticket_number":{"type":"string"},"seat_number":{"type":["string","null"]},"status":{"type":"string"},"checked_in":{"type":"boolean"},"checked_in_at":{"type":["string","null"]},"ticket_url":{"type":["string","null"]},"custom_fields":{"type":"array","items":{}}},"required":["name","email","phone","mykad","ticket_name","ticket_number","seat_number","status","checked_in","checked_in_at","ticket_url","custom_fields"]},"order":{"type":"object","properties":{"transaction_id":{"type":"string"},"order_number":{"type":"string"},"customer_id":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["pending","failed","success","cancelled","completed","unknown",null]},"status_code":{"type":["integer","null"]},"is_paid":{"type":"boolean"},"amount":{"type":"number"},"payer_name":{"type":"string"},"payer_email":{"type":"string"},"payer_phone":{"type":["string","null"]},"created_at":{"type":["string","null"]}},"required":["transaction_id","order_number","customer_id","status","status_code","is_paid","amount","payer_name","payer_email","payer_phone","created_at"]},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]}},"required":["id","participant","order","created_at","updated_at"]}},"meta":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"}},"required":["current_page","last_page","per_page","total"]},"event":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"starts_at":{"type":"string"},"ends_at":{"type":"string"}},"required":["id","name","slug","starts_at","ends_at"]},"filters":{"type":"object","properties":{"search":{"type":["string","null"]},"match_scope":{},"status":{},"include_custom_fields":{"type":"boolean"},"normalized_phone":{"type":["string","null"]},"normalized_email":{"type":["string","null"]},"normalized_mykad":{"type":["string","null"]}},"required":["search","match_scope","status","include_custom_fields","normalized_phone","normalized_email","normalized_mykad"]},"summary":{"type":"object","properties":{"total_participants":{"type":"string"},"unique_orders":{"type":"integer","minimum":0},"checked_in_count":{"type":"integer","minimum":0}},"required":["total_participants","unique_orders","checked_in_count"]}},"required":["success","data","meta","event","filters","summary"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving event participants"}},"required":["success","message"]}}}}}}},"/payment-link":{"post":{"operationId":"paymentLink.createPaymentLink","summary":"Create a payment link","tags":["Payment links"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentLinkRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"string"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Payment link created successfully"},"data":{"type":"object","properties":{"order_number":{},"payment_link":{"type":"string"},"transaction":{"type":"object","properties":{"amount":{"type":"string"},"payer_name":{"type":"string"},"payer_email":{"type":"string"},"payer_telephone_number":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["amount","payer_name","payer_email","payer_telephone_number","created_at","updated_at"]}},"required":["order_number","payment_link","transaction"]}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"422":{"$ref":"#/components/responses/ValidationException"}},"description":"Create a payment link for one payer. The response gives the `payment_link`. Send this link to the payer.\n\nYou can set the payment channel in two ways:\n\n- Send `payment_channel` to set one channel.\n- Set `let_user_choose_payment` to `true`. The payer can then select the channel on the payment page.\n\n> [!NOTE]\n> A payment link stays valid for a maximum of 3 months. The token must have the **API Write** permission."}},"/transaction/{orderNumber}":{"get":{"operationId":"paymentLink.getTransactionDetails","summary":"Get the status of a payment link","tags":["Payment links"],"parameters":[{"name":"orderNumber","in":"path","required":true,"schema":{"type":"string"},"description":"The order number of the payment link. The response of Create a payment link gives it as `order_number`."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"transaction":{"type":"object","properties":{"order_number":{"type":"string"},"amount":{"type":"string"},"payer_name":{"type":"string"},"payer_email":{"type":"string"},"payer_telephone_number":{"type":["string","null"]},"status":{"type":["integer","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["order_number","amount","payer_name","payer_email","payer_telephone_number","status","created_at","updated_at"]},"short_link":{"type":["string","null"]},"payment_status":{"type":"string"}},"required":["transaction","short_link","payment_status"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Transaction not found"}},"required":["success","message"]}}}},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving transaction details"}},"required":["success","message"]}}}}},"description":"Get the transaction of a payment link by its order number. The response gives the transaction, the `short_link` and the `payment_status`.\n\nTo get all the details of a transaction, use [Get a transaction](#tag/transactions/GET/transactions/{orderNumber})."}},"/protected-contents":{"get":{"operationId":"protectedContentManagement.getProtectedContentsList","description":"Get the protected content of your team, one page at a time. Each item has its status, its number of customers and its access link (`access_url`).","summary":"List protected content","tags":["Protected content"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"The page number. The first page is 1."},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"The number of items on each page."},{"name":"search","in":"query","schema":{"type":"string","maxLength":255},"description":"Find content by title."},{"name":"status","in":"query","schema":{"type":"string","enum":["active","inactive","all"]},"description":"Show only `active` items, only `inactive` items, or `all` items."},{"name":"content_type","in":"query","schema":{"type":"string","enum":["video","text","file","redirect"]},"description":"Show only the content of this type."},{"name":"access_type","in":"query","schema":{"type":"string","enum":["immediate","scheduled","duration"]},"description":"Show only the content with this access type."},{"name":"sort_by","in":"query","schema":{"type":"string","enum":["title","created_at","updated_at"]},"description":"The field that BCL uses to sort the list."},{"name":"sort_order","in":"query","schema":{"type":"string","enum":["asc","desc"]},"description":"The sort direction: `asc` (from low to high) or `desc` (from high to low)."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/LengthAwarePaginator"},"meta":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"string"},"per_page":{"type":"integer"},"total":{"type":"string"},"from":{"type":["integer","null"]},"to":{"type":["integer","null"]}},"required":["current_page","last_page","per_page","total","from","to"]}},"required":["success","data","meta"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving protected contents list"}},"required":["success","message"]}}}}}}},"/protected-contents/{id}":{"get":{"operationId":"protectedContentManagement.getProtectedContent","description":"Get one content item with its access configuration. The response also gives the statistics of customers, views and downloads.","summary":"Get protected content","tags":["Protected content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the content. It is in the list response, and in the address of the content in the BCL dashboard."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"email_title":{"type":["string","null"]},"description":{"type":["string","null"]},"show_description_on_page":{"type":"boolean"},"content_type":{"type":"string"},"video_type":{"type":["string","null"]},"redirect_url":{"type":["string","null"]},"access_type":{"type":"string"},"access_duration_days":{"type":["integer","null"]},"max_devices":{"type":"integer"},"max_downloads":{"type":["integer","null"]},"is_active":{"type":"boolean"},"show_on_receipt":{"type":"boolean"},"status_text":{"type":"string","enum":["Active","Inactive"]},"access_url":{"type":"string"},"scheduled_start_at":{"type":["string","null"]},"scheduled_end_at":{"type":["string","null"]},"content_updated_at":{"type":["string","null"]},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]},"stats":{"type":"object","properties":{"customers":{"type":"integer"},"accessible_now":{"type":"integer"},"total_views":{"type":"integer"},"total_downloads":{"type":"integer"}},"required":["customers","accessible_now","total_views","total_downloads"]}},"required":["id","title","email_title","description","show_description_on_page","content_type","video_type","redirect_url","access_type","access_duration_days","max_devices","max_downloads","is_active","show_on_receipt","status_text","access_url","scheduled_start_at","scheduled_end_at","content_updated_at","created_at","updated_at","stats"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving protected content details"}},"required":["success","message"]}}}}}}},"/protected-contents/{id}/customers":{"get":{"operationId":"protectedContentManagement.getContentCustomers","description":"Get the customers who have access to the content. Each customer has the order number and the usage counters.","summary":"List the customers of protected content","tags":["Protected content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the content. It is in the list response, and in the address of the content in the BCL dashboard."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"The page number. The first page is 1."},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"The number of items on each page."},{"name":"status","in":"query","schema":{"type":"string","enum":["active","expired","revoked","all"]},"description":"Show only the customers with this access status. Use `all` for all statuses."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/LengthAwarePaginator"},"meta":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"string"},"per_page":{"type":"integer"},"total":{"type":"string"},"from":{"type":["integer","null"]},"to":{"type":["integer","null"]}},"required":["current_page","last_page","per_page","total","from","to"]}},"required":["success","data","meta"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving protected content customers"}},"required":["success","message"]}}}}}}},"/protected-contents/{id}/status":{"patch":{"operationId":"protectedContentManagement.updateStatus","description":"Make the public page of the content active or inactive. Set `is_active` to `true` or `false`.\n\n> [!NOTE]\n> If you send the status that the content has now, the API sends a `422` response. An example message is \"The protected content is already inactive.\"","summary":"Change the status of protected content","tags":["Protected content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the content. It is in the list response, and in the address of the content in the BCL dashboard."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProtectedContentStatusRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{}}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Protected content not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}}}}},"/protected-contents/{id}/title":{"patch":{"operationId":"protectedContentManagement.updateTitle","description":"Change the title of the content page. You can also change the subject of the access email in `email_title`.","summary":"Change the title of protected content","tags":["Protected content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the content. It is in the list response, and in the address of the content in the BCL dashboard."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProtectedContentTitleRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{}}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Protected content not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}}}}},"/protected-contents/{id}/access":{"patch":{"operationId":"protectedContentManagement.updateAccessSettings","description":"Set the access rules of the content:\n\n- the access type\n- the schedule or the duration\n- the limits for devices and downloads\n\n> [!IMPORTANT]\n> The new rules apply only to new buyers. The dates of the buyers that have access now do not change. To change their dates, click **Sync Access Dates** on the **Customer Access** page of the content in BCL.","summary":"Change the access rules of protected content","tags":["Protected content"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The ID of the content. It is in the list response, and in the address of the content in the BCL dashboard."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProtectedContentAccessRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"type":"array","items":{}}},"required":["success","message","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Protected content not found"}},"required":["success","message"]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}}}}},"/showcase/forms":{"get":{"operationId":"showcaseApi.allForms","description":"Get the payment forms, event forms and lead forms that are ready for the homepage. The response puts the forms in groups by category.","summary":"List the forms for the homepage","tags":["Homepage showcase"],"parameters":[{"name":"type","in":"query","schema":{"type":"string","enum":["payment","event","lead","all"]},"description":"The type of form to get. Use `all` for all types."},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":50},"description":"The number of items on each page."},{"name":"page","in":"query","schema":{"type":"integer","default":1,"minimum":1},"description":"The page number. The first page is 1."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"success"},"data":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"category":{"type":"string","const":"payment_forms"},"label":{"type":"string","const":"Payment Forms"},"forms":{"type":"array","items":{}},"meta":{"type":"object","properties":{"current_page":{"type":"string"},"per_page":{"type":"string"},"total":{"type":"string"},"last_page":{"type":"string"},"next_page_url":{"type":"string"},"prev_page_url":{"type":"string"}},"required":["current_page","per_page","total","last_page","next_page_url","prev_page_url"]}},"required":["category","label","forms","meta"]},{"type":"object","properties":{"category":{"type":"string","const":"event_forms"},"label":{"type":"string","const":"Event Forms"},"forms":{"type":"array","items":{}},"meta":{"type":"object","properties":{"current_page":{"type":"string"},"per_page":{"type":"string"},"total":{"type":"string"},"last_page":{"type":"string"},"next_page_url":{"type":"string"},"prev_page_url":{"type":"string"}},"required":["current_page","per_page","total","last_page","next_page_url","prev_page_url"]}},"required":["category","label","forms","meta"]},{"type":"object","properties":{"category":{"type":"string","const":"lead_forms"},"label":{"type":"string","const":"Lead Forms"},"forms":{"type":"array","items":{}},"meta":{"type":"object","properties":{"current_page":{"type":"string"},"per_page":{"type":"string"},"total":{"type":"string"},"last_page":{"type":"string"},"next_page_url":{"type":"string"},"prev_page_url":{"type":"string"}},"required":["current_page","per_page","total","last_page","next_page_url","prev_page_url"]}},"required":["category","label","forms","meta"]}]}}},"required":["status","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"422":{"$ref":"#/components/responses/ValidationException"}}}},"/transactions":{"get":{"operationId":"transactionManagement.getTransactionsList","description":"Get your transactions, one page at a time. You can filter, search and sort the list.","summary":"List transactions","tags":["Transactions"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"example":1,"description":"The page number. The first page is 1."},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"example":20,"description":"The number of items on each page."},{"name":"search","in":"query","description":"Find transactions by order number, payer name, email, phone or Bayarcash transaction ID.","schema":{"type":"string","maxLength":255},"example":"LINK-00001"},{"name":"status","in":"query","description":"Show only the transactions with this status. Use `all` for all statuses.","schema":{"type":"string","enum":["pending","failed","success","cancelled","completed","all"]},"example":"success"},{"name":"payment_channel","in":"query","description":"Show only the transactions with this payment channel. Send the number of the channel:\n\n- `1`: FPX Online Banking\n- `3`: FPX Direct Debit\n- `4`: FPX Line of Credit\n- `5`: DuitNow Online Banking\n- `6`: DuitNow QR\n- `7`: SPayLater\n- `8`: Boost PayFlex\n- `9`: QRIS Online Banking\n- `10`: QRIS e-Wallet\n- `11`: NETS Singapore\n- `12`: Credit Card\n- `13`: Alipay\n- `14`: WeChat Pay\n- `15`: PromptPay Thailand\n- `16`: Touch 'n Go eWallet\n- `17`: Boost Wallet\n- `18`: GrabPay\n- `19`: Grab PayLater\n- `21`: ShopeePay\n- `23`: FPX B2B","schema":{"type":"integer","enum":["1","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","21","23"]},"example":1},{"name":"form_type","in":"query","description":"Show only the transactions from this type of form. Use `all` for all types.","schema":{"type":"string","enum":["payment_form","event_form","booking_form","all"]},"example":"payment_form"},{"name":"date_from","in":"query","description":"Show the transactions from this date. The list includes this date. Format `YYYY-MM-DD`.","schema":{"type":"string","format":"date"},"example":"2025-01-01"},{"name":"date_to","in":"query","description":"Show the transactions until this date. The list includes this date. Format `YYYY-MM-DD`.","schema":{"type":"string","format":"date"},"example":"2025-12-31"},{"name":"min_amount","in":"query","description":"Show only the transactions with an amount of this value or more, in MYR.","schema":{"type":"number","minimum":0},"example":10},{"name":"max_amount","in":"query","description":"Show only the transactions with an amount of this value or less, in MYR.","schema":{"type":"number","minimum":0},"example":1000},{"name":"sort_by","in":"query","description":"The field that BCL uses to sort the list.","schema":{"type":"string","enum":["created_at","amount","status","order_number"]},"example":"created_at"},{"name":"sort_order","in":"query","description":"The sort direction: `asc` (from low to high) or `desc` (from high to low).","schema":{"type":"string","enum":["asc","desc"]},"example":"desc"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/LengthAwarePaginator"},"meta":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"},"from":{"type":["integer","null"]},"to":{"type":["integer","null"]}},"required":["current_page","last_page","per_page","total","from","to"]},"summary":{"type":"object","properties":{"total_count":{"type":"integer"},"success_count":{"type":"integer"},"pending_count":{"type":"integer"},"failed_count":{"type":"integer"}},"required":["total_count","success_count","pending_count","failed_count"]}},"required":["success","data","meta","summary"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving transactions list"}},"required":["success","message"]}}}}}}},"/transactions/stats":{"get":{"operationId":"transactionManagement.getTransactionStats","description":"Get the statistics of the paid transactions in a date range. The response gives the revenue, in groups by status, payment channel and form type.\n\nIf you do not send dates, the range is the last 30 days.","summary":"Get transaction statistics","tags":["Transactions"],"parameters":[{"name":"date_from","in":"query","description":"The first date of the range. The range includes this date. The default is 30 days before today. Format `YYYY-MM-DD`.","schema":{"type":"string","format":"date"},"example":"2025-01-01"},{"name":"date_to","in":"query","description":"The last date of the range. The range includes this date. The default is today. Format `YYYY-MM-DD`.","schema":{"type":"string","format":"date"},"example":"2025-12-31"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"overview":{"type":"object","properties":{"total_transactions":{"type":"integer"},"total_revenue":{"type":"number"}},"required":["total_transactions","total_revenue"]},"by_status":{"type":"array","items":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"number"}},"required":["count","amount"]}},"by_payment_channel":{"type":"array","items":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"number"}},"required":["count","amount"]}},"by_form_type":{"type":"array","items":{"type":"object","properties":{"count":{"type":"integer"},"amount":{"type":"number"}},"required":["count","amount"]}}},"required":["period","overview","by_status","by_payment_channel","by_form_type"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving transaction statistics"}},"required":["success","message"]}}}}}}},"/transactions/{orderNumber}":{"get":{"operationId":"transactionManagement.getTransaction","description":"Get one transaction by its order number. The response gives:\n\n- the payer details\n- the payment status\n- the amounts\n- the items\n- the form of the transaction","summary":"Get a transaction","tags":["Transactions"],"parameters":[{"name":"orderNumber","in":"path","required":true,"schema":{"type":"string"},"description":"The order number of the transaction."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"formable_type":{"type":"string"},"formable_id":{"type":["integer","null"]},"form_title":{"type":"string"},"record_type":{"type":"string","const":"Transaction"},"record_id":{"type":"string"},"main_data":{"type":"object","properties":{"id":{"type":"string"},"payer_name":{"type":"string"},"payer_email":{"type":"string"},"payer_telephone_number":{"type":["string","null"]},"order_number":{"type":"string"},"transaction_type":{"type":["string","null"]},"currency":{"type":"string"},"subtotal_amount":{"type":"number"},"discount_amount":{"type":"number"},"coupon_code":{"type":["string","null"]},"fee_amount":{"type":"number"},"additional_fee_amount":{"type":"number"},"shipping":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"cost":{"type":"number"}},"required":["name","cost"]},"tax_amount":{"type":["object","null"],"properties":{"tax_name":{"type":["string","null"]},"amount":{"type":"number"}},"required":["tax_name","amount"]},"amount":{"type":"number"},"payment_channel":{"type":"string"},"status":{"type":["integer","null"]},"status_description":{"type":"string"},"is_paid":{"type":"boolean"},"exchange_reference_number":{"type":["string","null"]},"bayarcash_transaction_id":{"type":["string","null"]},"remarks":{"type":["string","null"]},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]},"items":{"type":"array","items":{}}},"required":["id","payer_name","payer_email","payer_telephone_number","order_number","transaction_type","currency","subtotal_amount","discount_amount","coupon_code","fee_amount","additional_fee_amount","shipping","tax_amount","amount","payment_channel","status","status_description","is_paid","exchange_reference_number","bayarcash_transaction_id","remarks","created_at","updated_at","items"]},"custom_fields_data":{"type":["object","null"],"additionalProperties":{}},"address":{"type":["object","null"],"additionalProperties":{}},"affiliate_data":{"type":["object","null"],"properties":{"referral_id":{"type":"integer"},"affiliate_id":{"type":"integer"},"affiliate_username":{"type":["string","null"]},"affiliate_name":{"type":"string"},"affiliate_email":{"type":"string"},"affiliate_phone":{"type":["string","null"]},"commission_type":{"type":"string"},"commission_rate":{"type":["null","string","number"]},"commission_amount":{"type":["null","string","number"]},"commission_breakdown":{"type":["array","null"],"items":{}},"status":{"type":"string"},"referral_source":{"type":["string","null"]}},"required":["referral_id","affiliate_id","affiliate_username","affiliate_name","affiliate_email","affiliate_phone","commission_type","commission_rate","commission_amount","commission_breakdown","status","referral_source"]},"receipt_url":{"type":["string","null"]},"short_link":{"type":["string","null"]},"team":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["id","name"]},"customer":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":["string","null"]}},"required":["id","name","email","phone"]},"shipment":{"type":["object","null"],"properties":{"tracking_no":{"type":["string","null"]},"courier":{"type":["string","null"]},"status":{"type":"string"}},"required":["tracking_no","courier","status"]},"e_invoice":{"type":["object","null"],"properties":{"id":{"type":"string"},"uuid":{"type":["string","null"]},"status":{"type":["string","null"]}},"required":["id","uuid","status"]},"tracking_params":{"type":["array","null"],"items":{}}},"required":["formable_type","formable_id","form_title","record_type","record_id","main_data","custom_fields_data","address","affiliate_data","receipt_url","short_link","team","customer","shipment","e_invoice","tracking_params"]}},"required":["success","data"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"404":{"description":"Not found. No item with this ID or order number is in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"Transaction not found"}},"required":["success","message"]}}}},"500":{"description":"Server error. BCL did not complete the request.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string","const":"An error occurred while retrieving transaction details"}},"required":["success","message"]}}}}}}}},"components":{"securitySchemes":{"http":{"type":"http","scheme":"bearer","bearerFormat":"bcl_ API token"}},"schemas":{"CreateCouponRequest":{"type":"object","description":"A new coupon, with its discount and its conditions.","properties":{"is_active":{"type":"boolean","description":"Set to `true` to make the coupon active. The default is `true`.","examples":[true]},"code":{"type":"string","description":"The code that customers type at checkout. Each code must be different from the codes of your other coupons.","examples":["SAVE20PERCENT"],"maxLength":255},"apply_to":{"type":"string","description":"Where BCL applies the discount:\n\n- `total`: the full order\n- `items`: only the items that you select","enum":["total","items"],"examples":["total"]},"discount_type":{"type":"string","description":"The type of discount:\n\n- `percentage`: a percentage of the price\n- `fixed`: a fixed amount in MYR","enum":["percentage","fixed"],"examples":["percentage"]},"discount_amount":{"type":"number","description":"The value of the discount.\n\n- For `percentage`, send the number without the `%` sign. For example, send `20` for 20%.\n- For `fixed`, send the amount in MYR. For example, send `50` for RM50.","examples":[20],"minimum":0},"description":{"type":["string","null"],"description":"Optional. A description of the coupon.","examples":["20% discount for new customers"]},"enable_condition":{"type":"boolean","description":"Set to `true` to use purchase conditions for the coupon.","examples":[false]},"min_purchase":{"type":["number","null"],"description":"The minimum purchase amount for the coupon, in MYR. Necessary when `enable_condition` is `true`.","examples":[100],"minimum":0},"max_purchase":{"type":["number","null"],"description":"The maximum purchase amount for the coupon, in MYR. It must be equal to `min_purchase` or more.","examples":[1000],"minimum":0},"usage_limit":{"type":["integer","null"],"description":"The maximum number of times that customers can use the coupon. For an unlimited number, do not send a value.","examples":[100],"minimum":1},"enable_expiry":{"type":"boolean","description":"Set to `true` to give the coupon a validity period.","examples":[false]},"start_date":{"type":["string","null"],"format":"date-time","description":"The date when the coupon becomes active. Necessary when `enable_expiry` is `true`.","examples":["2025-06-01 00:00:00"]},"expiry_date":{"type":["string","null"],"format":"date-time","description":"The date when the coupon becomes inactive. It must be after `start_date`. Necessary when `enable_expiry` is `true`.","examples":["2025-12-31 23:59:59"]}},"required":["code","apply_to","discount_type","discount_amount"],"title":"CreateCouponRequest"},"CreatePaymentLinkRequest":{"type":"object","properties":{"order_number":{"type":["string","null"],"description":"Optional. Your order reference. If you do not send it, BCL makes one. Use a maximum of 64 letters, digits and the characters `.` `_` `-` `/`. The value must not start with `LINK-`.","examples":["INV-2026-0001"]},"amount":{"type":"number","description":"The amount to pay, in MYR.","examples":[100.5],"minimum":0.01},"payer_name":{"type":"string","description":"The name of the payer.","examples":["John Doe"],"maxLength":255},"payer_email":{"type":"string","format":"email","description":"The email address of the payer.","examples":["john.doe@example.com"],"maxLength":255},"payer_telephone_number":{"type":"string","description":"The phone number of the payer, in international format. The number can include the country code.","pattern":"^[\\+]?[1-9][\\d\\s\\-\\(\\)\\.]{4,25}$","examples":["+60123456789"]},"portal_key":{"type":"string","description":"The key of the Bayarcash portal that receives the payment. Get it from your portals in the Bayarcash Console (console.bayar.cash/portals). See [Choose a Bayarcash portal key](https://docs.bcl.my/bayarcash-portal-key/).","examples":["0123456789abcdef0123456789abcdef"],"minLength":32,"maxLength":32},"payment_channel":{"type":["integer","null"],"description":"Optional. The payment channel. Send the number of the channel:\n\n- `1`: FPX Online Banking\n- `4`: FPX Line of Credit\n- `5`: DuitNow Online Banking\n- `6`: DuitNow QR\n- `7`: SPayLater\n- `8`: Boost PayFlex\n- `9`: QRIS Online Banking\n- `10`: QRIS e-Wallet\n- `11`: NETS Singapore\n- `12`: Credit Card\n- `13`: Alipay\n- `14`: WeChat Pay\n- `15`: PromptPay Thailand\n- `16`: Touch 'n Go eWallet\n- `17`: Boost Wallet\n- `18`: GrabPay\n- `19`: Grab PayLater\n- `21`: ShopeePay\n- `23`: FPX B2B","enum":["1","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","21","23",null],"examples":[1]},"let_user_choose_payment":{"type":["boolean","null"],"description":"Optional. Set to `true` to let the payer select the payment method on the payment page. BCL then sets `payment_channel` to `null`.","examples":[false]},"remarks":{"type":["string","null"],"description":"Optional. A note for the order.","examples":["Special delivery instructions"],"maxLength":500}},"required":["amount","payer_name","payer_email","payer_telephone_number","portal_key"],"title":"CreatePaymentLinkRequest"},"DuplicateFormRequest":{"type":"object","description":"The form to copy, and the title and the slug of the new form.","properties":{"form_id":{"type":"integer","description":"The ID of the payment form to copy."},"title":{"type":"string","maxLength":255,"description":"The title of the new form."},"slug":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","maxLength":255,"description":"The slug of the new form. Use only letters, digits, `-` and `_`."}},"required":["form_id","title","slug"],"title":"DuplicateFormRequest"},"LengthAwarePaginator":{"type":"object","properties":{"current_page":{"type":"integer"},"data":{"type":"array","items":{}},"first_page_url":{"type":"string"},"from":{"type":["integer","null"]},"last_page":{"type":"integer"},"last_page_url":{"type":"string"},"links":{"type":"object","additionalProperties":{}},"next_page_url":{"type":["string","null"]},"path":{"type":["string","null"]},"per_page":{"type":"integer"},"prev_page_url":{"type":["string","null"]},"to":{"type":["integer","null"]},"total":{"type":"integer"}},"required":["current_page","data","first_page_url","from","last_page","last_page_url","links","next_page_url","path","per_page","prev_page_url","to","total"],"title":"LengthAwarePaginator"},"UpdateCouponRequest":{"type":"object","description":"The fields of the coupon to change. All the fields are optional.","properties":{"code":{"type":"string","description":"The code that customers type at checkout.","examples":["SUMMER2024"],"maxLength":255},"description":{"type":["string","null"],"description":"A description of the coupon.","examples":["Summer discount coupon"]},"discount_type":{"type":"string","description":"The type of discount: `percentage` or `fixed`.","enum":["percentage","fixed"],"examples":["percentage"]},"discount_amount":{"type":"number","description":"The value of the discount. A percentage without the `%` sign, or an amount in MYR.","examples":[15.5],"minimum":0},"apply_to":{"type":"string","description":"Where BCL applies the discount: `total` (the full order) or `items` (only the items that you select).","enum":["total","items"],"examples":["total"]},"is_active":{"type":"boolean","description":"Set to `true` to make the coupon active.","examples":[true]},"enable_condition":{"type":"boolean","description":"Set to `true` to use purchase conditions for the coupon.","examples":[true]},"min_purchase":{"type":["number","null"],"description":"The minimum purchase amount for the coupon, in MYR.","examples":[100],"minimum":0},"max_purchase":{"type":["number","null"],"description":"The maximum purchase amount for the coupon, in MYR.","examples":[1000],"minimum":0},"usage_limit":{"type":["integer","null"],"description":"The maximum number of times that customers can use the coupon.","examples":[50],"minimum":1},"enable_expiry":{"type":"boolean","description":"Set to `true` to give the coupon a validity period.","examples":[true]},"start_date":{"type":["string","null"],"format":"date-time","description":"The date and time when the coupon becomes active.","examples":["2024-08-01 00:00:00"]},"expiry_date":{"type":["string","null"],"format":"date-time","description":"The date and time when the coupon becomes inactive.","examples":["2024-08-31 23:59:59"]}},"title":"UpdateCouponRequest"},"UpdateCouponStatusRequest":{"type":"object","description":"The new status of the coupon.","properties":{"is_active":{"type":"boolean","description":"`true` makes the coupon active. `false` makes it inactive."}},"required":["is_active"],"title":"UpdateCouponStatusRequest"},"UpdateEventFormAffiliateRequest":{"type":"object","properties":{"enable_affiliate":{"type":"boolean","description":"Set to `true` to use the affiliate programme on this form."},"show_affiliate_info":{"type":"boolean","description":"Set to `true` to show customers the affiliate who referred them."},"override_commission_settings":{"type":"boolean","description":"Set to `true` to use a different commission rate on this form."}},"title":"UpdateEventFormAffiliateRequest","description":"The affiliate programme options of the form."},"UpdateEventFormContentRequest":{"type":"object","properties":{"use_html_content":{"type":"boolean","description":"The content mode. `true` uses `html_content`. `false` uses `description`."},"html_content":{"type":["string","null"],"description":"The custom HTML content of the event page."},"description":{"type":["string","null"],"description":"The description of the event."}},"title":"UpdateEventFormContentRequest","description":"The new content of the event form, and the content mode."},"UpdateEventFormFacebookPixelRequest":{"type":"object","properties":{"enable":{"type":"boolean","description":"Set to `true` to start the Facebook pixel. Set to `false` to stop it."},"pixel_id":{"type":["string","null"],"maxLength":255,"description":"The ID of your Facebook pixel."},"enable_api":{"type":["boolean","null"],"description":"Set to `true` to also send the events from the server (Conversions API)."},"api_token":{"type":["string","null"],"description":"The access token for the Conversions API."},"test_code":{"type":["string","null"],"maxLength":255,"description":"The test event code for the Conversions API."},"trigger_on_pending":{"type":["boolean","null"],"description":"Set to `true` to send the purchase event for a `pending` order, for example a COD or manual bank transfer order. If `false`, the platform gets the event after you confirm the payment of the order."}},"required":["enable"],"title":"UpdateEventFormFacebookPixelRequest","description":"The Facebook pixel of the event form."},"UpdateEventFormHomepageRequest":{"type":"object","properties":{"show_on_homepage":{"type":"boolean","description":"`true` shows the form on your BCL homepage. `false` removes it from the homepage."}},"required":["show_on_homepage"],"title":"UpdateEventFormHomepageRequest","description":"Shows the form on the homepage, or removes it from the homepage."},"UpdateEventFormSlugRequest":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9-]+$","maxLength":255,"description":"The new slug. Use only lowercase letters, digits and `-`."}},"required":["slug"],"title":"UpdateEventFormSlugRequest","description":"The new slug of the event form."},"UpdateEventFormStatusRequest":{"type":"object","properties":{"is_active":{"type":"boolean","description":"`true` makes the form available to customers. `false` makes it not available."}},"required":["is_active"],"title":"UpdateEventFormStatusRequest","description":"The new status of the form."},"UpdateEventFormTicketPricesRequest":{"type":"object","description":"The new prices of the ticket types of the event form.\n\nIf you do not send `sale_price`, the sale price does not change. If you send `null` or `0`, BCL removes the sale price.","properties":{"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":1},"price":{"type":"number","minimum":0,"maximum":999999.99},"sale_price":{"type":["number","null"],"minimum":0}},"required":["id","price"]},"minItems":1,"uniqueItems":true,"description":"One item for each ticket type. `id` is the ID of the ticket type. Send the new `price`, and the `sale_price` if necessary."}},"required":["tickets"],"title":"UpdateEventFormTicketPricesRequest"},"UpdateEventFormTicketsRequest":{"type":"object","properties":{"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":1},"stock":{"type":"integer","minimum":0,"maximum":999999}},"required":["id","stock"]},"minItems":1,"description":"One item for each ticket type. `id` is the ID of the ticket type. `stock` is the new number of tickets in stock."}},"required":["tickets"],"title":"UpdateEventFormTicketsRequest","description":"The new stock of the ticket types of the event form."},"UpdateEventFormTiktokPixelRequest":{"type":"object","properties":{"enable":{"type":"boolean","description":"Set to `true` to start the TikTok pixel. Set to `false` to stop it."},"pixel_id":{"type":["string","null"],"maxLength":255,"description":"The ID of your TikTok pixel."},"enable_api":{"type":["boolean","null"],"description":"Set to `true` to also send the events from the server (Events API)."},"api_token":{"type":["string","null"],"description":"The access token for the Events API."},"test_code":{"type":["string","null"],"maxLength":255,"description":"The test event code for the Events API."},"trigger_on_pending":{"type":["boolean","null"],"description":"Set to `true` to send the purchase event for a `pending` order, for example a COD or manual bank transfer order. If `false`, the platform gets the event after you confirm the payment of the order."}},"required":["enable"],"title":"UpdateEventFormTiktokPixelRequest","description":"The TikTok pixel of the event form."},"UpdateEventFormVenueNameRequest":{"type":"object","properties":{"venue_name":{"type":"string","maxLength":255,"description":"The new name of the event."}},"required":["venue_name"],"title":"UpdateEventFormVenueNameRequest","description":"The new name of the event form."},"UpdateFormAffiliateRequest":{"type":"object","description":"The affiliate programme options of the form.","properties":{"enable_affiliate":{"type":"boolean","description":"Set to `true` to use the affiliate programme on this form."},"show_affiliate_info":{"type":"boolean","description":"Set to `true` to show customers the affiliate who referred them."},"override_commission_settings":{"type":"boolean","description":"Set to `true` to use a different commission rate on this form."}},"title":"UpdateFormAffiliateRequest"},"UpdateFormContentRequest":{"type":"object","description":"The new HTML body of a custom payment form.","properties":{"content_editor":{"type":"string","description":"The HTML body of the form."}},"required":["content_editor"],"title":"UpdateFormContentRequest"},"UpdateFormCouponRequest":{"type":"object","properties":{"enable_coupons":{"type":"boolean","description":"Set to `true` to let the form accept coupons."},"allowed_coupons":{"type":["array","null"],"items":{"type":"integer"},"description":"The IDs of the coupons that the form accepts."}},"required":["enable_coupons"],"title":"UpdateFormCouponRequest","description":"The coupon rules of the form. Payment forms and event forms use this schema."},"UpdateFormFacebookPixelRequest":{"type":"object","description":"The Facebook pixel of the payment form.","properties":{"enable_facebook_pixel":{"type":"boolean","description":"Set to `true` to start the Facebook pixel. Set to `false` to stop it."},"facebook_pixel_id":{"type":["string","null"],"maxLength":255,"description":"The ID of your Facebook pixel."},"enable_facebook_api":{"type":["boolean","null"],"description":"Set to `true` to also send the events from the server (Conversions API)."},"facebook_api_token":{"type":["string","null"],"description":"The access token for the Conversions API."}},"required":["enable_facebook_pixel"],"title":"UpdateFormFacebookPixelRequest"},"UpdateFormHomepageRequest":{"type":"object","description":"Shows the form on the homepage, or removes it from the homepage.","properties":{"show_on_homepage":{"type":"boolean","description":"`true` shows the form on your BCL homepage. `false` removes it from the homepage."}},"required":["show_on_homepage"],"title":"UpdateFormHomepageRequest"},"UpdateFormPricesRequest":{"type":"object","description":"The new prices of the products or variations of the payment form.\n\nIf you do not send `sale_price`, the sale price does not change. If you send `null` or `0`, BCL removes the sale price.","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":1},"price":{"type":"number","minimum":0,"maximum":999999.99},"sale_price":{"type":["number","null"],"minimum":0}},"required":["id","price"]},"minItems":1,"uniqueItems":true,"description":"One item for each product or variation. `id` is the ID of the product or variation. Send the new `price`, and the `sale_price` if necessary."}},"required":["items"],"title":"UpdateFormPricesRequest"},"UpdateFormRedirectUrlsRequest":{"type":"object","description":"The pages where BCL sends the customer after the payment. Payment forms and event forms use this schema.","properties":{"success_url":{"type":["string","null"],"description":"The page for a successful payment. The URL can contain these variables:\n\n- `{order_number}`: the order number of the transaction\n- `{amount}`: the payment amount\n- `{status}`: the payment status (success or failed)\n- `{email}`: the email of the customer\n- `{customer_name}`: the name of the customer\n- `{customer_phone}`: the phone number of the customer\n- `{payment_date}`: the date and time of the payment\n- `{form_title}`: the title of the form\n- `{reference_id}`: the reference ID\n- `{payment_method}`: the payment method\n- `{currency}`: the currency (MYR)\n- `{items}`: the item details (name, quantity, price)\n- `{shipping}`: the shipping details (method, cost)\n- `{address}`: the address of the customer","examples":["https://example.com/success?order={order_number}&amount={amount}&status={status}"],"maxLength":2048},"failed_url":{"type":["string","null"],"description":"The page for a failed payment. The URL can contain the same variables as `success_url`.","examples":["https://example.com/failed?ref={reference_id}&status={status}&email={email}"],"maxLength":2048}},"title":"UpdateFormRedirectUrlsRequest"},"UpdateFormSlugRequest":{"type":"object","description":"The new slug of the payment form.","properties":{"slug":{"type":"string","maxLength":255,"description":"The new slug. It is part of the public address of the form."}},"required":["slug"],"title":"UpdateFormSlugRequest"},"UpdateFormStatusRequest":{"type":"object","description":"The new status of the form.","properties":{"is_active":{"type":"boolean","description":"`true` makes the form available to customers. `false` makes it not available."}},"required":["is_active"],"title":"UpdateFormStatusRequest"},"UpdateFormStockRequest":{"type":"object","description":"The new stock of the products or variations of the payment form.","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":1},"stock":{"type":"integer","minimum":0,"maximum":999999}},"required":["id","stock"]},"minItems":1,"description":"One item for each product or variation. `id` is the ID of the product or variation. `stock` is the new number in stock."}},"required":["items"],"title":"UpdateFormStockRequest"},"UpdateFormTiktokPixelRequest":{"type":"object","description":"The TikTok pixel of the payment form.","properties":{"enable_tiktok_pixel":{"type":"boolean","description":"Set to `true` to start the TikTok pixel. Set to `false` to stop it."},"tiktok_pixel_id":{"type":["string","null"],"maxLength":255,"description":"The ID of your TikTok pixel."},"enable_tiktok_api":{"type":["boolean","null"],"description":"Set to `true` to also send the events from the server (Events API)."},"tiktok_api_token":{"type":["string","null"],"description":"The access token for the Events API."}},"required":["enable_tiktok_pixel"],"title":"UpdateFormTiktokPixelRequest"},"UpdateFormTitleRequest":{"type":"object","description":"The new title of the payment form.","properties":{"title":{"type":"string","maxLength":255,"description":"The new title."}},"required":["title"],"title":"UpdateFormTitleRequest"},"UpdateFormWebhookRequest":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Set to `true` to start the webhook. Set to `false` to stop it."},"url":{"type":["string","null"],"format":"uri","description":"The URL that receives the webhook."},"events":{"type":["array","null"],"items":{"type":"string","enum":["form-submit","payment-success","payment-failed","direct-debit"]},"description":"The events that BCL sends to the URL."}},"required":["enabled"],"title":"UpdateFormWebhookRequest","description":"The webhook of the form. Payment forms and event forms use this schema."},"UpdateParticipantRequest":{"type":"object","properties":{"name":{"type":"string","description":"The full name of the attendee.","examples":["Ahmad bin Abdullah"],"maxLength":255},"email":{"type":["string","null"],"format":"email","description":"Optional. The email of the attendee. BCL changes it only if you send it.","examples":["ahmad@example.com"],"maxLength":255},"phone":{"type":["string","null"],"description":"Optional. The phone number of the attendee. BCL changes it only if you send it.","examples":["60123456789"],"maxLength":20},"mykad":{"type":["string","null"],"description":"Optional. The MyKad number of the attendee, in the format `YYMMDD-PB-XXXX`. BCL changes it only if you send it.","examples":["901231-10-1234"],"maxLength":14}},"required":["name"],"title":"UpdateParticipantRequest","description":"The new details of the attendee."},"UpdateProtectedContentAccessRequest":{"type":"object","description":"The new access rules of the content.","properties":{"access_type":{"type":"string","enum":["immediate","scheduled","duration"],"description":"The access type of the content."},"scheduled_start_at":{"type":["string","null"],"format":"date-time","description":"The start of the access. Necessary when `access_type` is `scheduled`."},"scheduled_end_at":{"type":["string","null"],"format":"date-time","description":"Optional. The end of the access, for the `scheduled` access type."},"access_duration_days":{"type":["integer","null"],"minimum":1,"description":"The number of days of access. Necessary when `access_type` is `duration`."},"max_devices":{"type":["integer","null"],"minimum":0,"description":"The maximum number of devices that can use the access of one buyer at the same time. Through the API, use 1 or more. For an unlimited number of devices, set **Maximum Devices** to 0 in the BCL dashboard."},"max_downloads":{"type":["integer","null"],"minimum":0,"description":"For file content only. The maximum number of downloads for each buyer. For an unlimited number, do not send a value."},"show_on_receipt":{"type":"boolean","description":"Set to `true` to show the content on the receipt page."}},"required":["access_type"],"title":"UpdateProtectedContentAccessRequest"},"UpdateProtectedContentStatusRequest":{"type":"object","description":"The new status of the content.","properties":{"is_active":{"type":"boolean","description":"`true` makes the content page active. `false` makes it inactive."}},"required":["is_active"],"title":"UpdateProtectedContentStatusRequest"},"UpdateProtectedContentTitleRequest":{"type":"object","description":"The new title of the content.","properties":{"title":{"type":"string","maxLength":255,"description":"The new title of the content page."},"email_title":{"type":["string","null"],"maxLength":255,"description":"Optional. The new subject of the access email."}},"required":["title"],"title":"UpdateProtectedContentTitleRequest"}},"responses":{"AuthenticationException":{"description":"Unauthenticated. The token is missing, not correct, or expired.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A short description of the error."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error. One or more fields are not correct.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A short description of the errors."},"errors":{"type":"object","description":"The errors for each field that is not correct.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}},"ModelNotFoundException":{"description":"Not found. The item is not in your account.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A short description of the error."}},"required":["message"]}}}}}},"tags":[{"name":"Payment links","description":"A payment link is a link to a payment page for one customer, with a set amount. Use it when you sell through WhatsApp, Facebook or other chats, and a full payment form is not necessary.\n\nA payment link stays valid for a maximum of 3 months. When the customer pays, the payment shows in [Transactions](#tag/transactions). See [Create a payment link](https://docs.bcl.my/payment-link/)."},{"name":"Transactions","description":"A transaction is one payment through your forms, payment links or QR codes. Get the transactions, the details of one transaction, and the totals for a date range.\n\nThe status of a transaction is `pending`, `success`, `completed`, `cancelled` or `failed`. See [Find a transaction](https://docs.bcl.my/transactions/)."},{"name":"Customers","description":"BCL adds each buyer who pays through a BCL form to your customer list. BCL finds the same customer again by the email address. Get your customers, with their totals and their recent transactions. See [See your customers](https://docs.bcl.my/customers/)."},{"name":"Payment forms","description":"A payment form is a page where your customers fill in their details and pay you. Get your payment forms, and change their status, slug, title, content, stock, prices and other configuration. See [Create your first payment form](https://docs.bcl.my/create-payment-form/)."},{"name":"Event forms","description":"An event form is the page where customers buy tickets for your event. It holds the name, date, venue and payment details of the event, and its ticket types. To use event forms, you must have the Event Management add-on. See [Create an event form](https://docs.bcl.my/create-event-form/)."},{"name":"Participants","description":"A participant is one attendee of an event, with one ticket. Find participants by phone, email or MyKad, and change the details of one attendee. See [View and manage event participants](https://docs.bcl.my/event-participants/)."},{"name":"Homepage showcase","description":"Your BCL homepage is one page that lists your forms. Get the forms that show on the homepage, in groups by form type. See [Share your BCL homepage](https://docs.bcl.my/homepage/)."},{"name":"Coupons","description":"A coupon is a code that a buyer types at checkout to get a discount. You create coupons for your full account. Then you select the forms that accept them. Coupons work on payment forms, event forms and booking forms. See [Create a discount coupon](https://docs.bcl.my/create-coupon/)."},{"name":"Protected content","description":"Protected Content is an add-on that locks your digital products in BCL: a video, a file, a text or a private link. When a customer pays, BCL gives the customer an access link. The customer types a one-time code before the content opens.\n\nThe API sees only the content of the team of the token. See [Protected content by API](https://docs.bcl.my/protected-content-api/)."},{"name":"Automations","description":"An automation does an action when an event occurs in BCL. For example, when a customer pays, BCL can send a WhatsApp message to the customer. Each automation has one trigger. Get your automations, their run history and their statistics. See [What automations do](https://docs.bcl.my/automation-overview/)."}],"x-tagGroups":[{"name":"Payments","tags":["Payment links","Transactions"]},{"name":"Forms and events","tags":["Payment forms","Event forms","Participants","Homepage showcase"]},{"name":"Customers and access","tags":["Customers","Coupons","Protected content"]},{"name":"Automations","tags":["Automations"]}]}