Publish Course by Organization
Makes a course available in an organization (branch) and sets its prices, fee templates and enrollment options there. Run it again to change those settings. It does not publish the course; publishing is a separate call.
/bundles/{bundleId}/organizationscurl --request POST \
--url 'https://<your-api-host>/nuSource/api/v1/bundles/{bundleId}/organizations' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>' \
--form 'JSONString={"organization_mappings":[{"organization_id":2,"institution_bundle_id":-1,"date_of_commencement":"","batch_days":"","batch_timings":"","bundle_status":"unpublish","academic_year":2,"course_mapping_data":null,"online_registration_allowed":0,"free_preview_allowed":0,"bundle_cost":{"1":{"currency_id":1,"striked_cost":0,"cost":0}},"is_course_enrollment_allowed":1,"android_registration_allowed":0,"ios_registration_allowed":0,"is_featured":0,"show_pricing":1,"bundle_template_data":[{"currency_id":1,"expiration_after":0,"instalments":[[0,0,0,"Full Payment 1",2]],"institution_bundle_id":-1,"template_id":8}],"fees_template_ids":["8"],"inventory_item_ids":[]}]}'{
"code": 200,
"message": "Success",
"organization": {
"institution_ids": null,
"bundle_id": "1298"
}
}Access: Institute admins, plus custom roles that can publish and price courses or products.
Request body: form-data with one field, JSONString, containing this JSON:
bundle_id). Must belong to your institute.JSONStringorganization_id is used.Fields in each organization_mappings object:
| Name | Required | Type | Description |
|---|---|---|---|
| organization_id | Yes | integer or array | Organization to add the course to. An array adds it to several organizations with the same settings. |
| bundle_ids | No | array of integers | Apply the same settings to these courses instead of the one in the path. |
| bundle_cost | Yes | object | Prices keyed by currency: each value has currency_id, cost and striked_cost (not negative). Currencies must be enabled for the organization. |
| bundle_template_data | Yes | array | One entry per currency: currency_id, template_id (fee template), expiration_after (days of access; ignored when there is more than one instalment), instalments and optional includes_shipping_materials, custom_shipping_materials_html. Each instalment is [days, months, amount, name]. |
| fees_template_ids | Yes | array of integers | The fee template IDs used in bundle_template_data. |
| is_course_enrollment_allowed | No | integer | 1 lets learners enroll. Default 0. |
| online_registration_allowed | No | integer | 1 allows online registration. Default 0. |
| free_preview_allowed | No | integer | 1 allows a free preview. Default 0. |
| android_registration_allowed / ios_registration_allowed | No | integer | 1 allows purchase in the Android / iOS app. Default 0. |
| show_pricing | No | integer | 0 hides the price. Default 1. |
| is_featured | No | integer | 1 features the course. Default 0. |
| apple_product_id | No | string | In-app purchase product ID. Default <organization_id>_<bundle_id>. |
| custom_course_overview_link | No | string | Link to your own course page. |
| inventory_item_ids | No | array of integers | Inventory items to ship with the course. |
| bundle_recurring_data | No | array | Recurring (subscription) payment plans for the course. |
200SuccessShow child attributesHide child attributes
1298Notes: You must set a price and fee template in the organization's base currency, otherwise "Please set amount in Branch base currency". Other errors: "Invalid Amount" (negative values), "Invalid Currency", "Fees template mapping not found", "Please set template for all selected currency". For online courses this also creates the learning batch used for direct enrollment. Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.