Edit this Page

Create new offer

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:

  • name: Name of offer
  • description: Description of offer
  • price: Price of offer
  • currency: You must select "TRY" or "USD" as the currency.
  • openEnded: Offer can be set to expiry.
  • recurrenceCount: You can set how many times the offer will be renew
  • recurrence: Time period for offer
    1. recurrenceType: You can set your offer period like hour, week, monthly or year
    2. length: You can set your offer's time period how many recurrenceType like 3 months, 1 year or 1 month. The calculation is like "recurrenceType" x "length" = period => "Period" x "recurrenceCount" = Total Subscription time
  • freemium: You can set offer free.
  • productType: You specify whether the package you create is physical content.
  • renewalType: There are 2 types of renewalTypes. Renewals can be made based on the subscription start date or the billing date set in the company profile. For this, you must set the renewalType as "BILLCYCLE" or "START_DATE".
    • BILLCYCLE
    • START_DATE

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.

 Sample Request

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"
}
 Sample Response
{
    "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
}