List forms for discount codes
curl --request GET \
--url https://{your-subdomain}.neetoform.com/api/external/v2/discount_codes/forms \
--header 'X-Api-Key: <x-api-key>'const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://{your-subdomain}.neetoform.com/api/external/v2/discount_codes/forms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetoform.com/api/external/v2/discount_codes/forms"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"forms": [
{
"id": "c3b0a8d2-5e44-4f4e-8a35-0d2f5a1b7c90",
"title": "Workshop signup",
"currency": "usd"
}
],
"pagination": {
"total_records": 1,
"total_pages": 1,
"current_page_number": 1,
"page_size": 30
}
}Discount codes
List forms for discount codes
List the forms of the workspace by title, with the currency each form charges in. Use it to pick the form_ids for a discount code. A percentage code works on any form. A fixed code works only on forms that charge in the same currency. When page_number is omitted, all forms are returned.
GET
/
discount_codes
/
forms
List forms for discount codes
curl --request GET \
--url https://{your-subdomain}.neetoform.com/api/external/v2/discount_codes/forms \
--header 'X-Api-Key: <x-api-key>'const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://{your-subdomain}.neetoform.com/api/external/v2/discount_codes/forms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetoform.com/api/external/v2/discount_codes/forms"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"forms": [
{
"id": "c3b0a8d2-5e44-4f4e-8a35-0d2f5a1b7c90",
"title": "Workshop signup",
"currency": "usd"
}
],
"pagination": {
"total_records": 1,
"total_pages": 1,
"current_page_number": 1,
"page_size": 30
}
}Replace
Learn how to find your subdomain in Workspace subdomain.
{your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Query Parameters
Page of results to retrieve, starting from 1. When omitted, all results are returned in one response and page_size is ignored.
Number of results per page. Defaults to 30 when omitted.
Response
200 - application/json
OK - Request succeeded