# System Templates

## List System Templates

> Retrieves a paginated list of system templates.\
> In the Patchworks dashboard, a \`system\` is known as a \`connector\`.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"System Templates"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"SystemTemplatesListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SystemTemplates"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"links":{"$ref":"#/components/schemas/PaginationLinks"}}},"SystemTemplates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"logo_url":{"type":"string"},"version":{"type":"integer"},"version_name":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"protocol":{"type":"object","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV"]},"rate_limit_duration":{"type":"object"},"system_type_id":{"type":"object"},"system_type":{"type":"object","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"date_format":{"type":"string"},"canonical_key":{"type":"object"},"company_id":{"type":"object"},"public_company_id":{"type":"object"},"company":{"type":"object"},"public_company":{"type":"object"},"logo":{"type":"object"},"instances":{"type":"array","items":{"type":"object"}},"authentication_implementation_templates":{"type":"array","items":{"type":"object"}},"marketplace_company_id":{"type":"object"},"marketplace_company":{"type":"object"},"help_link":{"type":"string"}}},"PaginationMeta":{"type":"object","properties":{"current_page":{"type":"integer"},"from":{"type":"integer","nullable":true},"last_page":{"type":"integer"},"path":{"type":"string"},"per_page":{"type":"integer"},"to":{"type":"integer","nullable":true},"total":{"type":"integer"}}},"PaginationLinks":{"type":"object","properties":{"first":{"type":"string","format":"uri"},"last":{"type":"string","format":"uri"},"prev":{"type":"string","format":"uri","nullable":true},"next":{"type":"string","format":"uri","nullable":true}}}}},"paths":{"/api/v1/patchworks/system-templates":{"get":{"summary":"List System Templates","description":"Retrieves a paginated list of system templates.\nIn the Patchworks dashboard, a `system` is known as a `connector`.","parameters":[{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by name."},{"name":"filter[hidden_from_marketplace]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by hidden_from_marketplace."},{"name":"filter[visible_for_marketplace]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by visible_for_marketplace."},{"name":"filter[system_type_id]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by system_type_id."},{"name":"filter[id]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by id."},{"name":"filter[private]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by private."},{"name":"filter[visibility]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by visibility."},{"name":"filter[platformApp]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by platformApp."},{"name":"filter[forPlatformApp]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by forPlatformApp."},{"name":"include","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of relationships to include. Available: systemType, company, publicCompany, marketplaceCompany, logo, authenticationImplementationTemplates.variableTemplates, authenticationImplementationTemplates.authenticationType"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for descending. Available: name, created_at"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number for pagination."},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Number of results per page."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemTemplatesListResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}},"tags":["System Templates"]}}}}
```

## Create System Template

> Creates a new system template.\
> In the Patchworks dashboard, a \`system\` is known as a \`connector\`.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"System Templates"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"SystemTemplatesResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SystemTemplates"}}},"SystemTemplates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"logo_url":{"type":"string"},"version":{"type":"integer"},"version_name":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"protocol":{"type":"object","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV"]},"rate_limit_duration":{"type":"object"},"system_type_id":{"type":"object"},"system_type":{"type":"object","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"date_format":{"type":"string"},"canonical_key":{"type":"object"},"company_id":{"type":"object"},"public_company_id":{"type":"object"},"company":{"type":"object"},"public_company":{"type":"object"},"logo":{"type":"object"},"instances":{"type":"array","items":{"type":"object"}},"authentication_implementation_templates":{"type":"array","items":{"type":"object"}},"marketplace_company_id":{"type":"object"},"marketplace_company":{"type":"object"},"help_link":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"PatchworksStoreSystemTemplatesRequest":{"type":"object","properties":{"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"logo_url":{"type":"string","format":"uri"},"version":{"type":"integer"},"version_name":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"system_type_id":{"type":"string"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV"]},"company_id":{"type":"string"},"date_format":{"type":"string"},"help_link":{"type":"string","nullable":true},"name":{"type":"string"}},"required":["colour","company_id","date_format","label","logo_url","name","protocol","rate_limit_duration","rate_limit_unit","system_type_id","version","version_name"]}}},"paths":{"/api/v1/patchworks/system-templates":{"post":{"summary":"Create System Template","description":"Creates a new system template.\nIn the Patchworks dashboard, a `system` is known as a `connector`.","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemTemplatesResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchworksStoreSystemTemplatesRequest"}}}},"tags":["System Templates"],"parameters":[]}}}}
```

## Update System Template

> Updates an existing system template.\
> In the Patchworks dashboard, a \`system\` is known as a \`connector\`.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"System Templates"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"SystemTemplatesResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SystemTemplates"}}},"SystemTemplates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"logo_url":{"type":"string"},"version":{"type":"integer"},"version_name":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"protocol":{"type":"object","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV"]},"rate_limit_duration":{"type":"object"},"system_type_id":{"type":"object"},"system_type":{"type":"object","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"date_format":{"type":"string"},"canonical_key":{"type":"object"},"company_id":{"type":"object"},"public_company_id":{"type":"object"},"company":{"type":"object"},"public_company":{"type":"object"},"logo":{"type":"object"},"instances":{"type":"array","items":{"type":"object"}},"authentication_implementation_templates":{"type":"array","items":{"type":"object"}},"marketplace_company_id":{"type":"object"},"marketplace_company":{"type":"object"},"help_link":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"PatchworksUpdateSystemTemplatesRequest":{"type":"object","properties":{"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"logo_url":{"type":"string","format":"uri"},"version":{"type":"integer"},"version_name":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"system_type_id":{"type":"string"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV"]},"company_id":{"type":"string"},"date_format":{"type":"string"},"help_link":{"type":"string","nullable":true},"name":{"type":"string"}}}}},"paths":{"/api/v1/patchworks/system-templates/{system_template}":{"put":{"summary":"Update System Template","description":"Updates an existing system template.\nIn the Patchworks dashboard, a `system` is known as a `connector`.","parameters":[{"name":"system_template","in":"path","required":true,"schema":{"type":"string"},"description":"The system template identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemTemplatesResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchworksUpdateSystemTemplatesRequest"}}}},"tags":["System Templates"]}}}}
```

## Delete System Template

> Permanently deletes a specific system template.\
> In the Patchworks dashboard, a \`system\` is known as a \`connector\`.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"System Templates"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/patchworks/system-templates/{system_template}":{"delete":{"summary":"Delete System Template","description":"Permanently deletes a specific system template.\nIn the Patchworks dashboard, a `system` is known as a `connector`.","parameters":[{"name":"system_template","in":"path","required":true,"schema":{"type":"string"},"description":"The system template identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}},"tags":["System Templates"]}}}}
```

## Install System Template

> Installs a specific system template into the current company.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"System Templates"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"SystemTemplatesInstallRequest":{"type":"object","properties":{"overwrite":{"type":"string"},"system_id":{"type":"integer"},"platform_app_key":{"type":"string"}}}}},"paths":{"/api/v1/system-templates/{systemTemplate}":{"post":{"summary":"Install System Template","description":"Installs a specific system template into the current company.","parameters":[{"name":"systemTemplate","in":"path","required":true,"schema":{"type":"string"},"description":"The systemTemplate identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemTemplatesInstallRequest"}}}},"tags":["System Templates"]}}}}
```
