Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request POST \
--url https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"sessionId": "9a19a987-7e0b-4bc2-8126-e92e3c6c7860",
"campaignId": "12312",
"transactionId": "e9762ba8-5571-4359-897e-b4e3002316b4",
"couponUser": {
"firstName": "Test",
"lastName": "User",
"gender": "Male",
"phone": "1111111111",
"email": "mail@com.com"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
sessionId: '9a19a987-7e0b-4bc2-8126-e92e3c6c7860',
campaignId: '12312',
transactionId: 'e9762ba8-5571-4359-897e-b4e3002316b4',
couponUser: {
firstName: 'Test',
lastName: 'User',
gender: 'Male',
phone: '1111111111',
email: 'mail@com.com'
}
})
};
fetch('https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction"
payload = {
"sessionId": "9a19a987-7e0b-4bc2-8126-e92e3c6c7860",
"campaignId": "12312",
"transactionId": "e9762ba8-5571-4359-897e-b4e3002316b4",
"couponUser": {
"firstName": "Test",
"lastName": "User",
"gender": "Male",
"phone": "1111111111",
"email": "mail@com.com"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"sessionId\": \"9a19a987-7e0b-4bc2-8126-e92e3c6c7860\",\n \"campaignId\": \"12312\",\n \"transactionId\": \"e9762ba8-5571-4359-897e-b4e3002316b4\",\n \"couponUser\": {\n \"firstName\": \"Test\",\n \"lastName\": \"User\",\n \"gender\": \"Male\",\n \"phone\": \"1111111111\",\n \"email\": \"mail@com.com\"\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"sessionId\": \"9a19a987-7e0b-4bc2-8126-e92e3c6c7860\",\n \"campaignId\": \"12312\",\n \"transactionId\": \"e9762ba8-5571-4359-897e-b4e3002316b4\",\n \"couponUser\": {\n \"firstName\": \"Test\",\n \"lastName\": \"User\",\n \"gender\": \"Male\",\n \"phone\": \"1111111111\",\n \"email\": \"mail@com.com\"\n }\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction"
payload := strings.NewReader("{\n \"sessionId\": \"9a19a987-7e0b-4bc2-8126-e92e3c6c7860\",\n \"campaignId\": \"12312\",\n \"transactionId\": \"e9762ba8-5571-4359-897e-b4e3002316b4\",\n \"couponUser\": {\n \"firstName\": \"Test\",\n \"lastName\": \"User\",\n \"gender\": \"Male\",\n \"phone\": \"1111111111\",\n \"email\": \"mail@com.com\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"sessionId\": \"9a19a987-7e0b-4bc2-8126-e92e3c6c7860\",\n \"campaignId\": \"12312\",\n \"transactionId\": \"e9762ba8-5571-4359-897e-b4e3002316b4\",\n \"couponUser\": {\n \"firstName\": \"Test\",\n \"lastName\": \"User\",\n \"gender\": \"Male\",\n \"phone\": \"1111111111\",\n \"email\": \"mail@com.com\"\n }\n}")
.asString();{
"data": {
"externalSessionId": "<string>",
"status": "<string>",
"validationDate": "2023-11-07T05:31:56Z",
"errorMessage": "<string>"
}
}Validates a coupon for a POS transaction.
curl --request POST \
--url https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"sessionId": "9a19a987-7e0b-4bc2-8126-e92e3c6c7860",
"campaignId": "12312",
"transactionId": "e9762ba8-5571-4359-897e-b4e3002316b4",
"couponUser": {
"firstName": "Test",
"lastName": "User",
"gender": "Male",
"phone": "1111111111",
"email": "mail@com.com"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
sessionId: '9a19a987-7e0b-4bc2-8126-e92e3c6c7860',
campaignId: '12312',
transactionId: 'e9762ba8-5571-4359-897e-b4e3002316b4',
couponUser: {
firstName: 'Test',
lastName: 'User',
gender: 'Male',
phone: '1111111111',
email: 'mail@com.com'
}
})
};
fetch('https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction"
payload = {
"sessionId": "9a19a987-7e0b-4bc2-8126-e92e3c6c7860",
"campaignId": "12312",
"transactionId": "e9762ba8-5571-4359-897e-b4e3002316b4",
"couponUser": {
"firstName": "Test",
"lastName": "User",
"gender": "Male",
"phone": "1111111111",
"email": "mail@com.com"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"sessionId\": \"9a19a987-7e0b-4bc2-8126-e92e3c6c7860\",\n \"campaignId\": \"12312\",\n \"transactionId\": \"e9762ba8-5571-4359-897e-b4e3002316b4\",\n \"couponUser\": {\n \"firstName\": \"Test\",\n \"lastName\": \"User\",\n \"gender\": \"Male\",\n \"phone\": \"1111111111\",\n \"email\": \"mail@com.com\"\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"sessionId\": \"9a19a987-7e0b-4bc2-8126-e92e3c6c7860\",\n \"campaignId\": \"12312\",\n \"transactionId\": \"e9762ba8-5571-4359-897e-b4e3002316b4\",\n \"couponUser\": {\n \"firstName\": \"Test\",\n \"lastName\": \"User\",\n \"gender\": \"Male\",\n \"phone\": \"1111111111\",\n \"email\": \"mail@com.com\"\n }\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction"
payload := strings.NewReader("{\n \"sessionId\": \"9a19a987-7e0b-4bc2-8126-e92e3c6c7860\",\n \"campaignId\": \"12312\",\n \"transactionId\": \"e9762ba8-5571-4359-897e-b4e3002316b4\",\n \"couponUser\": {\n \"firstName\": \"Test\",\n \"lastName\": \"User\",\n \"gender\": \"Male\",\n \"phone\": \"1111111111\",\n \"email\": \"mail@com.com\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://public-api-demo.clearline.me/pos/{posSystemId}/coupon/validate/byTransaction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"sessionId\": \"9a19a987-7e0b-4bc2-8126-e92e3c6c7860\",\n \"campaignId\": \"12312\",\n \"transactionId\": \"e9762ba8-5571-4359-897e-b4e3002316b4\",\n \"couponUser\": {\n \"firstName\": \"Test\",\n \"lastName\": \"User\",\n \"gender\": \"Male\",\n \"phone\": \"1111111111\",\n \"email\": \"mail@com.com\"\n }\n}")
.asString();{
"data": {
"externalSessionId": "<string>",
"status": "<string>",
"validationDate": "2023-11-07T05:31:56Z",
"errorMessage": "<string>"
}
}JWT Authorization header using the Bearer scheme.
Enter JWT Bearer token only in the text input below.
An instance of ClearLine.API.Dtos.ValidatePosTransactionCouponPostDto