cart

cart.script.add

Add new script to the storefront

post/cart.script.add.json

Request

  • Base URL: https://api.api2cart.com/v1.1
  • URL: https://api.api2cart.com/v1.1/cart.script.add.json
  • Auth: API key in header x-api-key and API key in header x-store-key

Query parameters

namestring

The user-friendly script name

descriptionstring

The user-friendly description

htmlstring

An html string containing exactly one script tag.

srcstring

The URL of the remote script

load_methodstring

The load method to use for the script

scopestring

The page or pages on the online store where the script should be included

eventsstring

Event for run scripts

store_idstring

Store Id

idempotency_keystring

A unique identifier associated with a specific request. Repeated requests with the same <strong>idempotency_key</strong> return a cached response without re-executing the business logic. <strong>Please note that the cache lifetime is 15 minutes.</strong>

Response

successful operation

return_codeinteger
return_messagestring

Changes

No recorded changes to this operation across all 1 revision of this API.