{"openapi":"3.1.0","info":{"title":"Admin Content: Marketing Scripts","version":"1.0.0"},"paths":{"/stores/{store_hash}/v3/content/scripts":{"get":{"operationId":"getScripts","summary":"List Scripts","description":"Returns a list of *Scripts*. Optional parameters can be passed in.\n\nThis operation will only return scripts generated by the API key and password used to create the script originally. ","tags":["scripts"],"parameters":[{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Specifies the page number in a limited (paginated) list of products.","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","description":"Controls the number of items per page in a limited (paginated) list of products.","required":false,"schema":{"type":"integer"}},{"name":"sort","in":"query","description":"Field name to sort the scripts by. Note: Since `id` increments when new scripts are added, you can use that field to sort by script create date.\n","required":false,"schema":{"$ref":"#/components/schemas/ContentScriptsGetParametersSort"}},{"name":"direction","in":"query","description":"Sort direction. Acceptable values are: `asc`, `desc`.\n","required":false,"schema":{"$ref":"#/components/schemas/ContentScriptsGetParametersDirection"}},{"name":"channel_id:in","in":"query","description":"Filters list of scripts by the associated channel ID.","required":false,"schema":{"type":"array","items":{"type":"integer"}}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Checkout Content | modify | `store_content_checkout` |\n| Checkout Content | read-only | `store_content_checkout_read_only` |\n| Content | modify | `store_v2_content` |\n| Content | read-only  | `store_v2_content_read_only` |\n\nTo read or modify scripts on checkout pages, add `Checkout Content` scopes.\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).\n\nFor more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Scripts_getScripts_Response_200"}}}},"422":{"description":"This is the result of missing required fields, or of invalid data. See the response for more details.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetScriptsRequestUnprocessableEntityError"}}}}}},"post":{"operationId":"createScript","summary":"Create Script","description":"Creates a *Script*.\n\n**Required Fields**\n* name\n\n**Read Only Fields**\n* uuid\n\n**Limits**\n* 50 scripts per channel.\n\n**Notes**\n* If the `kind` is `src`:\n  * Specify the `src` property. \n  * Optionally, you can supply a `load_method`. \n  * Do not specify the `html` field.\n* If the `kind` is `script_tag`:\n  * Specify the `html` property.\n  * Do not specify the `src` field.\n* Each app can have 10 scripts installed.\n* Multiple scripts can be created [per call](/developer/docs/integrations/scripts#notes). ","tags":["scripts"],"parameters":[{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Checkout Content | modify | `store_content_checkout` |\n| Checkout Content | read-only | `store_content_checkout_read_only` |\n| Content | modify | `store_v2_content` |\n| Content | read-only  | `store_v2_content_read_only` |\n\nTo read or modify scripts on checkout pages, add `Checkout Content` scopes.\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).\n\nFor more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/script_Response"}}}},"422":{"description":"This is the result of missing required fields, or of invalid data. See the response for more details.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScriptRequestUnprocessableEntityError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/script_Post"}}}}}},"/stores/{store_hash}/v3/content/scripts/{uuid}":{"get":{"operationId":"getScript","summary":"Get Script","description":"Returns a single *Script*.","tags":["scripts"],"parameters":[{"name":"uuid","in":"path","description":"The identifier for a specific script.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Checkout Content | modify | `store_content_checkout` |\n| Checkout Content | read-only | `store_content_checkout_read_only` |\n| Content | modify | `store_v2_content` |\n| Content | read-only  | `store_v2_content_read_only` |\n\nTo read or modify scripts on checkout pages, add `Checkout Content` scopes.\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).\n\nFor more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/script_Response"}}}},"404":{"description":"The resource was not found.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetScriptRequestNotFoundError"}}}},"422":{"description":"This is the result of missing required fields, or of invalid data. See the response for more details.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetScriptRequestUnprocessableEntityError"}}}}}},"put":{"operationId":"updateScript","summary":"Update Script","description":"Updates a *Script*.","tags":["scripts"],"parameters":[{"name":"uuid","in":"path","description":"The identifier for a specific script.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Checkout Content | modify | `store_content_checkout` |\n| Checkout Content | read-only | `store_content_checkout_read_only` |\n| Content | modify | `store_v2_content` |\n| Content | read-only  | `store_v2_content_read_only` |\n\nTo read or modify scripts on checkout pages, add `Checkout Content` scopes.\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).\n\nFor more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/script_Response"}}}},"404":{"description":"The resource was not found.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScriptRequestNotFoundError"}}}},"422":{"description":"This is the result of missing required fields, or of invalid data. See the response for more details.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScriptRequestUnprocessableEntityError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/script_Put"}}}}},"delete":{"operationId":"deleteScript","summary":"Delete Script","description":"Deletes a *Script*.","tags":["scripts"],"parameters":[{"name":"uuid","in":"path","description":"The identifier for a specific script.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Checkout Content | modify | `store_content_checkout` |\n| Checkout Content | read-only | `store_content_checkout_read_only` |\n| Content | modify | `store_v2_content` |\n| Content | read-only  | `store_v2_content_read_only` |\n\nTo read or modify scripts on checkout pages, add `Checkout Content` scopes.\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).\n\nFor more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"204":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"404":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteScriptRequestNotFoundError"}}}},"422":{"description":"This is the result of missing required fields, or of invalid data. See the response for more details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteScriptRequestUnprocessableEntityError"}}}}}}}},"servers":[{"url":"https://api.bigcommerce.com","description":"https://api.bigcommerce.com"}],"components":{"schemas":{"ContentScriptsGetParametersSort":{"type":"string","enum":["name","description","date_created","date_modified"],"title":"ContentScriptsGetParametersSort"},"ContentScriptsGetParametersDirection":{"type":"string","enum":["asc","desc"],"title":"ContentScriptsGetParametersDirection"},"ScriptBaseLoadMethod":{"type":"string","enum":["default","async","defer"],"description":"The load method to use for the script. Values are `default`, `async`, or `defer`. It determines how the script should be loaded into the page.","title":"ScriptBaseLoadMethod"},"ScriptBaseLocation":{"type":"string","enum":["head","footer"],"description":"Where on the page to place the script. Values are `head` or `footer`.","title":"ScriptBaseLocation"},"ScriptBaseVisibility":{"type":"string","enum":["storefront","all_pages","checkout","order_confirmation"],"description":"Which set of pages the script should load on. \n\nPlease note that you need to have `Checkout content` scope to use `all_pages` and `checkout`.\n\n- The current visibility options are `storefront`, `checkout`, `all_pages` and `order_confirmation`.\n\n     `storefront`: All pages that are not `checkout` or `order_confirmation`.\n\n\t\t \nFor a list of all locations visit [Scripts Visibility](/developer/docs/integrations/scripts#script-visibility-locations).","title":"ScriptBaseVisibility"},"ScriptBaseKind":{"type":"string","enum":["src","script_tag"],"description":"What type of script this is.\n\n`src` - For scripts that use the src URL. A `script` tag will be generated with its `src` attribute set to the value of the `src` property. When your app provides a path to the script, we can optimize and add the script automatically for you. The load_method can vary.\n\n`script_tag` - For scripts that include a raw HTML `script` tag-enclosed block of JavaScript. The value of `html` is added directly to the page. The load_method must be default.","title":"ScriptBaseKind"},"ScriptBaseConsentCategory":{"type":"string","enum":["essential","functional","analytics","targeting"],"description":"Consent category for GDPR and CCPA compliance. Defaults to `unknown` when not specified. Scripts with an `unknown` consent category do not display on stores with customer cookie consent banners enabled.","title":"ScriptBaseConsentCategory"},"script_Full":{"type":"object","properties":{"description":{"type":"string","description":"The user-friendly description."},"html":{"type":"string","description":"An HTML string containing exactly one `script` tag. Present when the script `kind` is `script_tag`."},"src":{"type":"string","description":"The `src` attribute of the script to load. Only present if `kind` is `src`."},"auto_uninstall":{"type":"boolean","description":"It will enable automatic cleanup of the script when the single click app is uninstalled or OAuth token is revoked."},"load_method":{"$ref":"#/components/schemas/ScriptBaseLoadMethod","description":"The load method to use for the script. Values are `default`, `async`, or `defer`. It determines how the script should be loaded into the page."},"location":{"$ref":"#/components/schemas/ScriptBaseLocation","description":"Where on the page to place the script. Values are `head` or `footer`."},"visibility":{"$ref":"#/components/schemas/ScriptBaseVisibility","description":"Which set of pages the script should load on. \n\nPlease note that you need to have `Checkout content` scope to use `all_pages` and `checkout`.\n\n- The current visibility options are `storefront`, `checkout`, `all_pages` and `order_confirmation`.\n\n     `storefront`: All pages that are not `checkout` or `order_confirmation`.\n\n\t\t \nFor a list of all locations visit [Scripts Visibility](/developer/docs/integrations/scripts#script-visibility-locations)."},"kind":{"$ref":"#/components/schemas/ScriptBaseKind","description":"What type of script this is.\n\n`src` - For scripts that use the src URL. A `script` tag will be generated with its `src` attribute set to the value of the `src` property. When your app provides a path to the script, we can optimize and add the script automatically for you. The load_method can vary.\n\n`script_tag` - For scripts that include a raw HTML `script` tag-enclosed block of JavaScript. The value of `html` is added directly to the page. The load_method must be default."},"api_client_id":{"type":"string","description":"The client id of the API user that created this script, or blank if created by other means."},"consent_category":{"$ref":"#/components/schemas/ScriptBaseConsentCategory","description":"Consent category for GDPR and CCPA compliance. Defaults to `unknown` when not specified. Scripts with an `unknown` consent category do not display on stores with customer cookie consent banners enabled."},"enabled":{"type":"boolean","description":"Whether the script is enabled or disabled on the storefront."},"channel_id":{"type":"integer"},"integrity_hashes":{"type":"array","items":{"type":"string"},"description":"Array of [Subresource integrity (SRI) hashes](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) for external SRC scripts that lets browsers validate the contents of the script.\n\nThe hash is the `integrity` attribute on the `script` tag. You can add up to five hashes for a script and generate them using any SRI standard-supported algorithm, including SHA-256, SHA-384, and SHA-512. If you provide more than one hash, they will all be added to the `integrity` attribute in order, separated by whitespace.\n"},"name":{"type":"string","description":"The user-friendly name."},"uuid":{"type":"string","format":"uuid","description":"The primary identifier."},"date_created":{"type":"string","format":"date-time","description":"The date on which this object was initially created."},"date_modified":{"type":"string","format":"date-time","description":"The date on which this object was last updated."}},"title":"script_Full"},"CollectionMetaPaginationLinks":{"type":"object","properties":{"previous":{"type":"string","description":"Link to the previous page returned in the response.\n"},"current":{"type":"string","description":"Link to the current page returned in the response.\n"},"next":{"type":"string","description":"Link to the next page returned in the response.\n"}},"description":"Pagination links for the previous and next parts of the whole collection.\n","title":"CollectionMetaPaginationLinks"},"CollectionMetaPagination":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of items in the result set.\n"},"count":{"type":"integer","description":"Total number of items in the collection response.\n"},"per_page":{"type":"integer","description":"The amount of items returned in the collection per page, controlled by the limit parameter.\n"},"current_page":{"type":"integer","description":"The page you are currently on within the collection.\n"},"total_pages":{"type":"integer","description":"The total number of pages in the collection.\n"},"links":{"$ref":"#/components/schemas/CollectionMetaPaginationLinks","description":"Pagination links for the previous and next parts of the whole collection.\n"}},"description":"Data about the response, including pagination and collection totals.","title":"CollectionMetaPagination"},"CollectionMeta":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/CollectionMetaPagination","description":"Data about the response, including pagination and collection totals."}},"description":"Data about the response, including pagination and collection totals.","title":"CollectionMeta"},"Scripts_getScripts_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/script_Full"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"title":"Scripts_getScripts_Response_200"},"ContentScriptsGetResponsesContentApplicationJsonSchemaErrors":{"type":"object","properties":{},"title":"ContentScriptsGetResponsesContentApplicationJsonSchemaErrors"},"GetScriptsRequestUnprocessableEntityError":{"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.\n"},"title":{"type":"string","description":"The error title describing the particular error.\n"},"type":{"type":"string"},"instance":{"type":"string"},"errors":{"$ref":"#/components/schemas/ContentScriptsGetResponsesContentApplicationJsonSchemaErrors"}},"description":"Error payload for the BigCommerce API.\n","title":"GetScriptsRequestUnprocessableEntityError"},"script_Post":{"type":"object","properties":{"description":{"type":"string","description":"The user-friendly description."},"html":{"type":"string","description":"An HTML string containing exactly one `script` tag. Present when the script `kind` is `script_tag`."},"src":{"type":"string","description":"The `src` attribute of the script to load. Only present if `kind` is `src`."},"auto_uninstall":{"type":"boolean","description":"It will enable automatic cleanup of the script when the single click app is uninstalled or OAuth token is revoked."},"load_method":{"$ref":"#/components/schemas/ScriptBaseLoadMethod","description":"The load method to use for the script. Values are `default`, `async`, or `defer`. It determines how the script should be loaded into the page."},"location":{"$ref":"#/components/schemas/ScriptBaseLocation","description":"Where on the page to place the script. Values are `head` or `footer`."},"visibility":{"$ref":"#/components/schemas/ScriptBaseVisibility","description":"Which set of pages the script should load on. \n\nPlease note that you need to have `Checkout content` scope to use `all_pages` and `checkout`.\n\n- The current visibility options are `storefront`, `checkout`, `all_pages` and `order_confirmation`.\n\n     `storefront`: All pages that are not `checkout` or `order_confirmation`.\n\n\t\t \nFor a list of all locations visit [Scripts Visibility](/developer/docs/integrations/scripts#script-visibility-locations)."},"kind":{"$ref":"#/components/schemas/ScriptBaseKind","description":"What type of script this is.\n\n`src` - For scripts that use the src URL. A `script` tag will be generated with its `src` attribute set to the value of the `src` property. When your app provides a path to the script, we can optimize and add the script automatically for you. The load_method can vary.\n\n`script_tag` - For scripts that include a raw HTML `script` tag-enclosed block of JavaScript. The value of `html` is added directly to the page. The load_method must be default."},"api_client_id":{"type":"string","description":"The client id of the API user that created this script, or blank if created by other means."},"consent_category":{"$ref":"#/components/schemas/ScriptBaseConsentCategory","description":"Consent category for GDPR and CCPA compliance. Defaults to `unknown` when not specified. Scripts with an `unknown` consent category do not display on stores with customer cookie consent banners enabled."},"enabled":{"type":"boolean","description":"Whether the script is enabled or disabled on the storefront."},"channel_id":{"type":"integer"},"integrity_hashes":{"type":"array","items":{"type":"string"},"description":"Array of [Subresource integrity (SRI) hashes](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) for external SRC scripts that lets browsers validate the contents of the script.\n\nThe hash is the `integrity` attribute on the `script` tag. You can add up to five hashes for a script and generate them using any SRI standard-supported algorithm, including SHA-256, SHA-384, and SHA-512. If you provide more than one hash, they will all be added to the `integrity` attribute in order, separated by whitespace.\n"},"name":{"type":"string","description":"The user-friendly name."}},"required":["name"],"title":"script_Post"},"Meta":{"type":"object","properties":{},"description":"Response metadata.","title":"Meta"},"script_Response":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/script_Full"},"meta":{"$ref":"#/components/schemas/Meta"}},"description":"For a list of all locations visit [Scripts Visibility](/developer/docs/integrations/scripts#script-visibility-locations).","title":"script_Response"},"ContentScriptsPostResponsesContentApplicationJsonSchemaErrors":{"type":"object","properties":{},"title":"ContentScriptsPostResponsesContentApplicationJsonSchemaErrors"},"CreateScriptRequestUnprocessableEntityError":{"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.\n"},"title":{"type":"string","description":"The error title describing the particular error.\n"},"type":{"type":"string"},"instance":{"type":"string"},"errors":{"$ref":"#/components/schemas/ContentScriptsPostResponsesContentApplicationJsonSchemaErrors"}},"description":"Error payload for the BigCommerce API.\n","title":"CreateScriptRequestUnprocessableEntityError"},"ContentScriptsUuidGetResponsesContentApplicationJsonSchemaErrors":{"type":"object","properties":{},"title":"ContentScriptsUuidGetResponsesContentApplicationJsonSchemaErrors"},"GetScriptRequestNotFoundError":{"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.\n"},"title":{"type":"string","description":"The error title describing the particular error.\n"},"type":{"type":"string"},"instance":{"type":"string"},"errors":{"$ref":"#/components/schemas/ContentScriptsUuidGetResponsesContentApplicationJsonSchemaErrors"}},"description":"Error payload for the BigCommerce API.\n","title":"GetScriptRequestNotFoundError"},"GetScriptRequestUnprocessableEntityError":{"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.\n"},"title":{"type":"string","description":"The error title describing the particular error.\n"},"type":{"type":"string"},"instance":{"type":"string"},"errors":{"$ref":"#/components/schemas/ContentScriptsUuidGetResponsesContentApplicationJsonSchemaErrors"}},"description":"Error payload for the BigCommerce API.\n","title":"GetScriptRequestUnprocessableEntityError"},"script_Put":{"type":"object","properties":{"description":{"type":"string","description":"The user-friendly description."},"html":{"type":"string","description":"An HTML string containing exactly one `script` tag. Present when the script `kind` is `script_tag`."},"src":{"type":"string","description":"The `src` attribute of the script to load. Only present if `kind` is `src`."},"auto_uninstall":{"type":"boolean","description":"It will enable automatic cleanup of the script when the single click app is uninstalled or OAuth token is revoked."},"load_method":{"$ref":"#/components/schemas/ScriptBaseLoadMethod","description":"The load method to use for the script. Values are `default`, `async`, or `defer`. It determines how the script should be loaded into the page."},"location":{"$ref":"#/components/schemas/ScriptBaseLocation","description":"Where on the page to place the script. Values are `head` or `footer`."},"visibility":{"$ref":"#/components/schemas/ScriptBaseVisibility","description":"Which set of pages the script should load on. \n\nPlease note that you need to have `Checkout content` scope to use `all_pages` and `checkout`.\n\n- The current visibility options are `storefront`, `checkout`, `all_pages` and `order_confirmation`.\n\n     `storefront`: All pages that are not `checkout` or `order_confirmation`.\n\n\t\t \nFor a list of all locations visit [Scripts Visibility](/developer/docs/integrations/scripts#script-visibility-locations)."},"kind":{"$ref":"#/components/schemas/ScriptBaseKind","description":"What type of script this is.\n\n`src` - For scripts that use the src URL. A `script` tag will be generated with its `src` attribute set to the value of the `src` property. When your app provides a path to the script, we can optimize and add the script automatically for you. The load_method can vary.\n\n`script_tag` - For scripts that include a raw HTML `script` tag-enclosed block of JavaScript. The value of `html` is added directly to the page. The load_method must be default."},"api_client_id":{"type":"string","description":"The client id of the API user that created this script, or blank if created by other means."},"consent_category":{"$ref":"#/components/schemas/ScriptBaseConsentCategory","description":"Consent category for GDPR and CCPA compliance. Defaults to `unknown` when not specified. Scripts with an `unknown` consent category do not display on stores with customer cookie consent banners enabled."},"enabled":{"type":"boolean","description":"Whether the script is enabled or disabled on the storefront."},"channel_id":{"type":"integer"},"integrity_hashes":{"type":"array","items":{"type":"string"},"description":"Array of [Subresource integrity (SRI) hashes](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) for external SRC scripts that lets browsers validate the contents of the script.\n\nThe hash is the `integrity` attribute on the `script` tag. You can add up to five hashes for a script and generate them using any SRI standard-supported algorithm, including SHA-256, SHA-384, and SHA-512. If you provide more than one hash, they will all be added to the `integrity` attribute in order, separated by whitespace.\n"},"name":{"type":"string","description":"The user-friendly name."}},"title":"script_Put"},"ContentScriptsUuidPutResponsesContentApplicationJsonSchemaErrors":{"type":"object","properties":{},"title":"ContentScriptsUuidPutResponsesContentApplicationJsonSchemaErrors"},"UpdateScriptRequestNotFoundError":{"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.\n"},"title":{"type":"string","description":"The error title describing the particular error.\n"},"type":{"type":"string"},"instance":{"type":"string"},"errors":{"$ref":"#/components/schemas/ContentScriptsUuidPutResponsesContentApplicationJsonSchemaErrors"}},"description":"Error payload for the BigCommerce API.\n","title":"UpdateScriptRequestNotFoundError"},"UpdateScriptRequestUnprocessableEntityError":{"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.\n"},"title":{"type":"string","description":"The error title describing the particular error.\n"},"type":{"type":"string"},"instance":{"type":"string"},"errors":{"$ref":"#/components/schemas/ContentScriptsUuidPutResponsesContentApplicationJsonSchemaErrors"}},"description":"Error payload for the BigCommerce API.\n","title":"UpdateScriptRequestUnprocessableEntityError"},"ContentScriptsUuidDeleteResponsesContentApplicationJsonSchemaErrors":{"type":"object","properties":{},"title":"ContentScriptsUuidDeleteResponsesContentApplicationJsonSchemaErrors"},"DeleteScriptRequestNotFoundError":{"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.\n"},"title":{"type":"string","description":"The error title describing the particular error.\n"},"type":{"type":"string"},"instance":{"type":"string"},"errors":{"$ref":"#/components/schemas/ContentScriptsUuidDeleteResponsesContentApplicationJsonSchemaErrors"}},"description":"Error payload for the BigCommerce API.\n","title":"DeleteScriptRequestNotFoundError"},"DeleteScriptRequestUnprocessableEntityError":{"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.\n"},"title":{"type":"string","description":"The error title describing the particular error.\n"},"type":{"type":"string"},"instance":{"type":"string"},"errors":{"$ref":"#/components/schemas/ContentScriptsUuidDeleteResponsesContentApplicationJsonSchemaErrors"}},"description":"Error payload for the BigCommerce API.\n","title":"DeleteScriptRequestUnprocessableEntityError"}},"securitySchemes":{"X-Auth-Token":{"type":"apiKey","in":"header","name":"X-Auth-Token","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Checkout Content | modify | `store_content_checkout` |\n| Checkout Content | read-only | `store_content_checkout_read_only` |\n| Content | modify | `store_v2_content` |\n| Content | read-only  | `store_v2_content_read_only` |\n\nTo read or modify scripts on checkout pages, add `Checkout Content` scopes.\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).\n\nFor more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes)."}}}}