Skip to main content
POST
/
billspree
/
tariffs
/
create-tariff
Create Pricing Module
curl --request POST \
  --url https://{workspace}.spreesuite.com/billspree/tariffs/create-tariff \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "method": "Create",
  "action": "Create Plan",
  "apiVersion": "v2",
  "tariff": {
    "serviceCode": "DEMO-001",
    "code": "DemoPlan",
    "name": "Demo Plan",
    "uniqueLabel": "DemoPlan",
    "description": null,
    "parentTariffCode": null,
    "planType": "BASE_PLAN",
    "chargeType": "Postpaid",
    "abstract": 0,
    "custom": 1,
    "visibility": "Public",
    "billingPeriodID": null,
    "valueFormulas": [],
    "componentRules": [],
    "usageData": [],
    "securityAttributes": []
  }
}
'
{
  "success": true,
  "statusCode": 200,
  "message": "Request Succeeded.",
  "error": null,
  "data": {}
}

Authorizations

Authorization
string
header
required

Auth token returned from the login endpoint. Send as: Authorization: <token> (no Bearer prefix)

Body

application/json
method
string
required

Always "Create"

Example:

"Create"

action
string
required

Always "Create Plan"

Example:

"Create Plan"

apiVersion
string
required

Always "v2"

Example:

"v2"

tariff
object
required

Response

200 - application/json

Plan created successfully

success
boolean
statusCode
integer
message
string
error
unknown
data
object