---
title: "cart.script.add"
method: POST
path: "/cart.script.add.json"
tags: ["cart"]
---

# cart.script.add

`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`

Add new script to the storefront

## Query parameters

- `name` string
- `description` string
- `html` string
- `src` string
- `load_method` string
- `scope` string
- `events` string
- `store_id` string
- `idempotency_key` string

## Response `200`

successful operation

- object
  - `return_code` integer
  - `return_message` string
  - `result` object
    - `script_id` string

---

[API](https://skmtc.dev/api2cart/apis/api2cart-openapi.md) · [All operations](https://skmtc.dev/api2cart/apis/api2cart-openapi/llms.txt) · [OpenAPI document](https://skmtc.dev/api2cart/apis/api2cart-openapi/revisions/c34440741693?raw)
