creates a school
POST /api/v1/registration
Parameters
| Name |
Description |
|
email
|
user email
|
|
name
|
user name
|
|
password
|
password, min 8 chars
|
|
password_confirmation
|
password again
|
|
school_name
|
name of the school
|
|
school_url
|
url of the new school, eg foo.usefedora.com
|
|
school_plan_id
|
ID of plan the person is signing up for
|
Request
Headers
Route
POST /api/v1/registration
Body
{"email":"foo@test.com","password":"password","name":"Noah Pryor","password_confirmation":"password","school_name":"test school"}
cURL
curl "http://localhost:3000/api/v1/registration" -d '{"email":"foo@test.com","password":"password","name":"Noah Pryor","password_confirmation":"password","school_name":"test school"}' -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Host: example.org"
Response
Headers
Status
201 Created
Body
{
"school": {
"id": 106,
"name": "test school",
"heading": null,
"description": null,
"facebook_username": null,
"twitter_username": null,
"created_at": "2019-10-31T22:00:06Z",
"updated_at": "2019-10-31T22:00:07Z",
"school_plan_id": 108,
"primary_domain_id": 104,
"google_plus_username": null,
"linkedin_url": null,
"homepage_id": null,
"legacy_id": null,
"email": "foo@test.com",
"course_id": null,
"down_for_maintenance": false,
"email_from_name": "test school",
"stripe_token": null,
"last_four": null,
"card_type": null,
"school_coupon_id": null,
"coupon_applied_at": null,
"preferences": {
"affiliate_cookie_duration_days": "365",
"preenrollments_enabled": "false",
"class_periods_enabled": "false",
"turn_off_fedora_branding": "false",
"require_terms_agreement": "true",
"automatically_add_disqus_attachments": "true",
"course_blocks_beta": "true",
"eu_vat_tax_enabled": "false",
"display_vat_inclusive_prices": "true",
"eu_vat_tax_eligible": "true",
"charge_exclusive_tax": "true",
"exclusive_vat_on_custom_gateways": "true",
"authors_can_publish_courses": "false",
"authors_can_email_students": "false",
"authors_can_set_course_prices": "false",
"authors_can_manage_coupons": "false",
"authors_can_import_students": "false",
"authors_can_manage_course_pages": "false",
"comments_moderation": "false",
"comments_threaded": "true",
"internal_subscriptions_beta": "true",
"turn_off_myteachable_sign_up_branding": "false",
"autoplay_lectures": "true",
"autocomplete_lectures": "false",
"recalc_course_pct_on_lecture_publish": "false",
"recaptcha_enabled_on_signup": "false",
"prevent_payment_plan_cancellation": "true",
"allow_comment_attachments": "true",
"single_page_checkout_enabled": "true",
"disable_js_course_event_tracking": "false",
"tax_form_collection_enabled": "false",
"css_properties_enabled": "false",
"teachable_payments_enabled": "true",
"bazaar_enabled": "false",
"new_text_editor_enabled": "false",
"themeable_disabled": "false",
"paypal_enabled": "false",
"authors_can_manage_certificates": "false",
"authors_can_issue_certificates": "false",
"ssl_forced": "false",
"ssl_forced_from_creation": "false",
"store_student_cards_separately": "true",
"legacy_back_office": "false",
"back_office_enabled": "false"
},
"school_plan_overrides": {
},
"is_launched": false,
"is_domain_confirmed": false,
"is_survey_onboarded": false,
"is_blog_enabled": null,
"blog_title": null,
"blog_description": null,
"blog_about": null,
"hubspot_id": null,
"onboarding_workshop_at": null,
"tapfilliate_conversion_id": null,
"webinar_popup_cohort": "quickstart",
"stripe_subscription_id": null,
"current_billing_period_start": null,
"current_billing_period_end": null,
"logged_out_homepage_id": 512,
"logged_in_homepage_id": null,
"oauth_application_id": null,
"payout_method": null,
"getambassador_affiliate_id": null,
"getambassador_affiliate_id_updated_at": null,
"getambassador_campaign_id": null,
"token": "sk_4q4xfy0z",
"billing_country": null,
"billing_postal_code": null,
"payment_method_migrated": null,
"wistia_project_id": null,
"active_payout_method_id": null,
"review_payouts": null,
"primary_owner_id": 213,
"feature_cohort_id": 1,
"destroyed_at": null,
"destroyer_type": null,
"destroyer_id": null,
"vat_id": null
},
"domain": {
"id": 104,
"url": "test-school.worksonmy.computer",
"school_id": 106,
"created_at": "2019-10-31T22:00:06Z",
"updated_at": "2019-10-31T22:00:06Z",
"supports_https": true,
"https_checked_at": null,
"redirect_to_primary": null
},
"user": {
"id": 213,
"email": "foo@test.com",
"created_at": "2019-10-31T22:00:06Z",
"updated_at": "2019-10-31T22:00:07Z",
"school_id": 106,
"is_author": false,
"is_affiliate": false,
"is_student": true,
"is_owner": true,
"is_active": true,
"authentication_token": "y2RKNrhx46-QxvH-ATRAsazHNGyftcPE9g",
"last_four": null,
"card_type": null,
"stripe_token": null,
"paypal_token": null,
"name": "Noah Pryor",
"affiliate_revenue_share": null,
"days_cookie_valid": null,
"affiliate_code": "_uc0dhsqu",
"notes": null,
"last_touch": null,
"referring_domain": null,
"first_touch": null,
"legacy_id": null,
"country": null,
"legacy_sales": null,
"src": null,
"joined_at": "2019-10-31T22:00:06Z",
"transactions_gross": 0,
"signed_up_affiliate_code": null,
"last_sign_out_at": null,
"unsubscribe_from_marketing_emails": false,
"destroy_memo": null,
"destroyed_email_hash": null,
"destroyer_id": null,
"destroyed_at": null,
"author_revenue_share": 0.0,
"non_devise_password": {
},
"agreed_to_terms": null,
"external_registration": null,
"record_source": null,
"teachable_account_id": null,
"created_by_teachable_account": null,
"payout_method": null,
"destroyer_type": null,
"payment_method_migrated": "2019-10-31T22:00:06Z",
"is_staff_user": null,
"active_payout_method_id": null,
"allowed_manual_wire_payouts": null,
"allowed_manual_ach_payouts": null,
"primary_owner_confirmation_token": null,
"current_impersonated_user_id": null,
"read_only_staff_user": null,
"paypal_email": null
},
"redirect_url": "http://test-school.worksonmy.computer?redirect=admin&sa=random-auth-token"
}