Template created through the API not being displayed in Designer Manager

cos

#1

Hi there!

I hope everyone is doing well. I’m writing because I faced an issue when creating templates through the API. I wrote a program that does the following:

  1. Gets a template A,
  2. Translates its content and
  3. Creates a template B with the translated content from A.

For some reason, the template B gets created, but it’s not displayed in the Design Manager when I look for it. Is there a reason why this could be happening? Please, find below the JSON from Template A and B:

Template A

{
“portal_id”: 534175,
“id”: 5279397945,
“path”: “generated_layouts/5279397943.html”,
“folder_id”: null,
“source”: “…”,
“deleted_at”: 0,
“updated”: 1501590836416,
“label”: “Page Template Test”,
“legacy_email_layout_id”: null,
“is_available_for_new_content”: true,
“updated_by”: "jfausd@globalizationpartners.com",
“template_type”: 4,
“size”: 5238,
“meta”: {
“associatedContent”: [
{
“id”: 5279401052,
“category_id”: 1,
“slug”: “-temporary-slug-02e3f5c1-c1c9-4a04-98cd-6f0667b0c460”,
“name”: “Page Test”,
“state”: “DRAFT”
}
],
“hasBufferedChanges”: false
},
“category_id”: 1,
“extension_name”: “”,
“site_id”: 0,
“performable_template_id”: null,
“schema_version”: 1,
“last_edited_at”: 0,
“release_id”: “”,
“type”: “”,
“extension_id”: null,
“thumbnail_path”: null,
“is_approved”: false,
“always_in_template_editor”: false,
“released_at”: 0,
“user_meta”: null,
“number_install”: null,
“last_used”: null,
“is_original”: null,
“buffer”: null,
“attached_stylesheets”: [],
“category”: 1,
“folder”: “globalization_partners_test”,
“deleted”: false,
“include_default_custom_css”: null,
“enable_domain_stylesheets”: null,
“has_user_changes”: true,
“cloned_from”: null,
“published”: true,
“is_buffered”: false,
“purchased”: false,
“deletable”: true,
“is_read_only”: false,
“missing”: false,
“has_style_tag”: true,
“has_menu_tag”: false,
“is_from_layout”: true,
“generated_from_layout_id”: 5279397943,
“linked_style_id”: null,
“performable_edit_url”: “”,
“cdn_url”: “”,
“cdn_minified_url”: “”,
“is_global”: false,
“cloned_from_layout_id”: null,
“renameable”: true,
“created_by_code_editor”: null,
“css_or_js_template”: false,
“is_minifiable”: true,
“created”: null,
“last_edit_session_id”: null,
“last_edit_update_id”: null,
“body”: {
“generated_from_layout_id”: 5279397943,
“publish”: true,
“purchased”: false,
“include_default_custom_css”: null,
“enable_domain_stylesheets”: null,
“attached_stylesheets”: [],
“is_read_only”: false,
“folder”: “globalization_partners_test”,
“cdn_minified_url”: null,
“cdn_url”: “”,
“has_user_changes”: true,
“has_style_tag”: true,
“has_menu_tag”: false
},
"_label": “Page Template Test”
}

Template B

{
“portal_id”: 534175,
“id”: 5279424744,
“path”: “generated_layouts/5279397943-(es-ES).html”,
“folder_id”: null,
“source”: “…”,
“deleted_at”: 0,
“updated”: 1501590836416,
“label”: “Page Template Test (es-ES)”,
“legacy_email_layout_id”: null,
“is_available_for_new_content”: true,
“updated_by”: "jfausd@globalizationpartners.com",
“template_type”: 4,
“size”: 5435,
“meta”: {
“associatedContent”: [
{
“id”: 5279424720,
“category_id”: 1,
“slug”: “es-es/-temporary-slug-02e3f5c1-c1c9-4a04-98cd-6f0667b0c460”,
“name”: “Page Test (es-ES)”,
“state”: “DRAFT”
}
],
“hasBufferedChanges”: false
},
“category_id”: 1,
“extension_name”: “”,
“site_id”: 0,
“performable_template_id”: null,
“schema_version”: 1,
“last_edited_at”: 0,
“release_id”: “”,
“type”: “”,
“extension_id”: null,
“thumbnail_path”: null,
“is_approved”: false,
“always_in_template_editor”: false,
“released_at”: 0,
“user_meta”: null,
“number_install”: null,
“last_used”: null,
“is_original”: null,
“buffer”: null,
“attached_stylesheets”: [],
“category”: 1,
“folder”: “globalization_partners_test”,
“deleted”: false,
“include_default_custom_css”: null,
“enable_domain_stylesheets”: null,
“has_user_changes”: true,
“cloned_from”: null,
“published”: true,
“is_buffered”: false,
“purchased”: false,
“deletable”: true,
“is_read_only”: false,
“missing”: false,
“has_style_tag”: true,
“has_menu_tag”: false,
“is_from_layout”: true,
“generated_from_layout_id”: 5279397943,
“linked_style_id”: null,
“performable_edit_url”: “”,
“cdn_url”: “”,
“cdn_minified_url”: “”,
“is_global”: false,
“cloned_from_layout_id”: null,
“renameable”: true,
“created_by_code_editor”: null,
“css_or_js_template”: false,
“is_minifiable”: false,
“created”: null,
“last_edit_session_id”: null,
“last_edit_update_id”: null,
“body”: {
“generated_from_layout_id”: 5279397943,
“publish”: true,
“purchased”: false,
“include_default_custom_css”: null,
“enable_domain_stylesheets”: null,
“attached_stylesheets”: [],
“is_read_only”: false,
“folder”: “globalization_partners_test”,
“cdn_minified_url”: null,
“cdn_url”: “”,
“has_user_changes”: true,
“has_style_tag”: true,
“has_menu_tag”: false,
“is_minifiable”: false
},
"_label": “Page Template Test (es-ES)”
}

Thanks in advance!