To create an offer, you can easily create it from the menu, Offers | +Create new offer. Other way to create offer, you can create using the API, you need to request additional attachments:
Method: POST
Path: /api/offers
Sandbox Url: https://sandbox.subscreasy.com/api/offers
For security reasons, this service requires API authorization. Click for details about API authorization.
Curl
curl --location --request POST 'https://sandbox.subscreasy.com/api/offers' \
--header 'Authorization: Apikey brs-1234567890' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "name3",
"description": "description",
"price": 100,
"currency": "TRY",
"openEnded": false,
"recurrenceCount": 2,
"trialPeriod": 15,
"recurrence": {
"recurrenceType": "MONTHLY",
"length": 12
},
"freemium": false,
"productType": "SERVICE",
"renewalType": "BILLCYCLE"
}'
C#
var client = new RestClient("https://sandbox.subscreasy.com/api/offers");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Apikey brs-1234567890");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"name3\",\n \"description\": \"description\",\n \"price\": 100,\n \"currency\": \"TRY\",\n \"openEnded\": false,\n \"recurrenceCount\": 2,\n \"trialPeriod\": 15,\n \"recurrence\": {\n \"recurrenceType\": \"MONTHLY\",\n \"length\": 12\n },\n \"freemium\": false,\n \"productType\": \"SERVICE\",\n \"renewalType\": \"BILLCYCLE\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
JSON
{
"name": "name",
"description": "description",
"price": 100,
"currency": "TRY",
"openEnded": false,
"recurrenceCount": 2,
"trialPeriod": 15,
"recurrence": {
"recurrenceType": "MONTHLY",
"length": 12
},
"freemium": false,
"productType": "SERVICE",
"renewalType": "BILLCYCLE"
}
{
"company": {
"id": 1,
"name": "dtnbilim",
"siteName": "dtnbilim"
},
"id": 2,
"name": "name",
"description": "description",
"price": 1E+2,
"currency": "TRY",
"openEnded": false,
"multiplePurchase": false,
"recurrenceCount": 2,
"trialPeriod": 15,
"recurrence": {
"recurrenceType": "MONTHLY",
"length": 12
},
"productType": "SERVICE",
"renewalType": "BILLCYCLE",
"disablePaymentForm": false,
"createDate": "2021-06-19T11:32:29.525+03:00",
"physicalProduct": false,
"renewalBillcycleBased": true
}