Skip to content
Soljio Docs
Esc
↑↓navigate↵open⌘Jpreview

Preview: Create an offering with validated commercial terms and optional initial schedule.

Validate the entire command without committing its domain effects. Returns reviewed input and change counts; approval expires in 15 minutes. Requires schedule.preview and non-apply scopes of the target command.

POST/commands/preview_create_offering
Authorization
AuthorizationBearer token (soljio_sk_<secret>) · headerrequired

Organization-scoped service token created by an owner/admin. Scope requirements are in x-required-scopes; these are service-token grants, not OAuth scopes. Revoked, expired, unknown and suspended-organization credentials all return 401.

Header parameters
Idempotency-Keystringrequired

Persist with the job and reuse for retries. Scoped to organization, token, command and API version. Different input with the same key returns 409. Supported automatic retry window: 24 hours.

min length 1 · max length 128 · matches ^[!-~]+$
Request body
requiredapplication/json
accepted_payment_methodsstring[]
Show properties
Array of string
Any of:
string
string
string
string
string
string
string
string
string
string
capacitynumber
descriptionstring
family_infostring
location_idstring

Opaque Soljio resource ID.

min length 1
namestringrequired
new_program_namestring
payment_collection_modestring
Show properties
Any of:
string
string
string
string
string
string
price_amount_minornumber
price_currencystring
program_idstring

Opaque Soljio resource ID.

min length 1
recurring_schedule_rulesobject[]
Show properties
Array of object
days_of_weekstring[]required
Show properties
Array of string
Any of:
string
string
string
string
string
string
string
string
string
string
string
string
string
string
duration_minutesnumberrequired
end_datestringrequired
interval_weeksnumber
local_start_timestringrequired
start_datestringrequired
schedule_sessionsobject[]
Show properties
Array of object
ends_atstring<date-time>required
local_datestringrequired
local_end_timestringrequired
local_start_timestringrequired
starts_atstring<date-time>required
slugstring
statusstring
Show properties
Any of:
string
string
string
string
string
string
term_idstring

Opaque Soljio resource ID.

min length 1
timezonestring
Responses
200

Successful command; replay returns the original result.

dataobjectrequired
Show properties
approval_tokenstringrequired
changesobjectrequired
Show properties
createdintegerrequired
deletedintegerrequired
updatedintegerrequired
expires_atstring<date-time>required
organization_idstringrequired
preview_idstringrequired
proposed_inputobjectrequired
Show properties
accepted_payment_methodsstring[]
Show properties
Array of string
Any of:
string
string
string
string
string
string
string
string
string
string
capacitynumber
descriptionstring
family_infostring
location_idstring

Opaque Soljio resource ID.

min length 1
namestringrequired
new_program_namestring
payment_collection_modestring
Show properties
Any of:
string
string
string
string
string
string
price_amount_minornumber
price_currencystring
program_idstring

Opaque Soljio resource ID.

min length 1
recurring_schedule_rulesobject[]
Show properties
Array of object
days_of_weekstring[]required
Show properties
Array of string
Any of:
string
string
string
string
string
string
string
string
string
string
string
string
string
string
duration_minutesnumberrequired
end_datestringrequired
interval_weeksnumber
local_start_timestringrequired
start_datestringrequired
schedule_sessionsobject[]
Show properties
Array of object
ends_atstring<date-time>required
local_datestringrequired
local_end_timestringrequired
local_start_timestringrequired
starts_atstring<date-time>required
slugstring
statusstring
Show properties
Any of:
string
string
string
string
string
string
term_idstring

Opaque Soljio resource ID.

min length 1
timezonestring
requires_approvalbooleanrequired
idempotent_replaybooleanrequired
request_idstring<uuid>required
400

invalid_request

errorobjectrequired
Show properties
codestringrequired
Allowed:invalid_request
messagestringrequired
request_idstring<uuid>required
401

unauthorized

errorobjectrequired
Show properties
codestringrequired
Allowed:unauthorized
messagestringrequired
request_idstring<uuid>required
403

forbidden

errorobjectrequired
Show properties
codestringrequired
Allowed:forbidden
messagestringrequired
request_idstring<uuid>required
404

not_found

errorobjectrequired
Show properties
codestringrequired
Allowed:not_found
messagestringrequired
request_idstring<uuid>required
405

method_not_allowed

errorobjectrequired
Show properties
codestringrequired
Allowed:method_not_allowed
messagestringrequired
request_idstring<uuid>required
409

conflict, idempotency_conflict

errorobjectrequired
Show properties
codestringrequired
Allowed:conflictidempotency_conflict
messagestringrequired
request_idstring<uuid>required
413

payload_too_large

errorobjectrequired
Show properties
codestringrequired
Allowed:payload_too_large
messagestringrequired
request_idstring<uuid>required
415

unsupported_media_type

errorobjectrequired
Show properties
codestringrequired
Allowed:unsupported_media_type
messagestringrequired
request_idstring<uuid>required
429

rate_limited

errorobjectrequired
Show properties
codestringrequired
Allowed:rate_limited
messagestringrequired
request_idstring<uuid>required
500

internal_error

errorobjectrequired
Show properties
codestringrequired
Allowed:internal_error
messagestringrequired
request_idstring<uuid>required
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.soljio.com/v0/commands/preview_create_offering' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Idempotency-Key: string' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "accepted_payment_methods": [
    "cash"
  ],
  "capacity": 0,
  "description": "string",
  "family_info": "string",
  "location_id": "string",
  "name": "string",
  "new_program_name": "string",
  "payment_collection_mode": "none",
  "price_amount_minor": 0,
  "price_currency": "string",
  "program_id": "string",
  "recurring_schedule_rules": [
    {
      "days_of_week": [
        "monday"
      ],
      "duration_minutes": 0,
      "end_date": "string",
      "interval_weeks": 0,
      "local_start_time": "string",
      "start_date": "string"
    }
  ],
  "schedule_sessions": [
    {
      "ends_at": "2019-08-24T14:15:22Z",
      "local_date": "string",
      "local_end_time": "string",
      "local_start_time": "string",
      "starts_at": "2019-08-24T14:15:22Z"
    }
  ],
  "slug": "string",
  "status": "draft",
  "term_id": "string",
  "timezone": "string"
}'
Response
{
  "data": {
    "approval_token": "string",
    "changes": {
      "created": 0,
      "deleted": 0,
      "updated": 0
    },
    "expires_at": "2019-08-24T14:15:22Z",
    "organization_id": "string",
    "preview_id": "string",
    "proposed_input": {
      "accepted_payment_methods": [
        "cash"
      ],
      "capacity": 0,
      "description": "string",
      "family_info": "string",
      "location_id": "string",
      "name": "string",
      "new_program_name": "string",
      "payment_collection_mode": "none",
      "price_amount_minor": 0,
      "price_currency": "string",
      "program_id": "string",
      "recurring_schedule_rules": [
        {
          "days_of_week": [
            "monday"
          ],
          "duration_minutes": 0,
          "end_date": "string",
          "interval_weeks": 0,
          "local_start_time": "string",
          "start_date": "string"
        }
      ],
      "schedule_sessions": [
        {
          "ends_at": "2019-08-24T14:15:22Z",
          "local_date": "string",
          "local_end_time": "string",
          "local_start_time": "string",
          "starts_at": "2019-08-24T14:15:22Z"
        }
      ],
      "slug": "string",
      "status": "draft",
      "term_id": "string",
      "timezone": "string"
    },
    "requires_approval": true
  },
  "idempotent_replay": true,
  "request_id": "266ea41d-adf5-480b-af50-15b940c2b846"
}