Sellavi US API

Store themes

Endpoint:https://api.sellavi.com

Read and update custom CSS/JS, browse saved versions and upload media.


Get custom JS code

GET
https://api.sellavi.com
/store_themes/js

Requires API permission themesJs. Reads custom JS for the authenticated United States store. Omit version_id to preserve the current/latest behavior and existing response shape. Supply version_id from the matching versions list to read historical content without changing live code. No current code returns code="". See Saved CSS/JS versions.

Get custom JS code › query Parameters

  • version_idinteger · min: 1

    Optional saved version ID from this store and code type. If supplied, must be a non-empty positive integer; null and empty values are invalid.

Get custom JS code › Responses

Success

  • successboolean
    Example: true
  • responseobject
  • request_idstring
    Example: 1ef2da0b-6f98-6fec-b13f-06c63b84be49

Update custom JS code

PUT
https://api.sellavi.com
/store_themes/js

Create or update the custom JS code for the authenticated store.

Update custom JS code › Request Body
optional

  • codestring | null

    Custom CSS or JS code. Send null or an empty string to clear the current code.

Update custom JS code › Responses

success

  • successboolean
    Example: true
  • responseobject
  • request_idstring
    Example: 1ef2da0b-6f98-6fec-b13f-06c63b84be49

Get custom CSS code

GET
https://api.sellavi.com
/store_themes/css

Requires API permission themesCss. Reads custom CSS for the authenticated United States store. Omit version_id to preserve the current/latest behavior and existing response shape. Supply version_id from the matching versions list to read historical content without changing live code. No current code returns code="". See Saved CSS/JS versions.

Get custom CSS code › query Parameters

  • version_idinteger · min: 1

    Optional saved version ID from this store and code type. If supplied, must be a non-empty positive integer; null and empty values are invalid.

Get custom CSS code › Responses

Success

  • successboolean
    Example: true
  • responseobject
  • request_idstring
    Example: 1ef2da0b-6f98-6fec-b13f-06c63b84be49

Update custom CSS code

PUT
https://api.sellavi.com
/store_themes/css

Create or update the custom CSS code for the authenticated store.

Update custom CSS code › Request Body
optional

  • codestring | null

    Custom CSS or JS code. Send null or an empty string to clear the current code.

Update custom CSS code › Responses

success

  • successboolean
    Example: true
  • responseobject
  • request_idstring
    Example: 1ef2da0b-6f98-6fec-b13f-06c63b84be49

Upload store theme media

POST
https://api.sellavi.com
/store_themes/media/upload

Upload a media file for the authenticated store theme. Send a multipart/form-data request with the file field named file. Supported image formats are jpg, jpeg, png, gif, and webp; mp4 is accepted only when video banners are enabled for the store.

Upload store theme media › Request Body

  • filestring · required

Upload store theme media › Responses

success

  • successboolean
    Example: true
  • imagestring · uri

    Uploaded media URL.

    Example: https://cdn.sellavi.com/image/upload/clients/12345/store-theme-media.webp
  • request_idstring
    Example: 1ef2da0b-6f98-6fec-b13f-06c63b84be49

List saved custom CSS versions

GET
https://api.sellavi.com
/store_themes/css/versions

Requires API permission themesCss. Returns only date, version and version_id for up to 30 available saved CSS versions belonging to the authenticated United States store. Newest creation date first, then highest ID. No code content or pagination. Read content using GET /store_themes/css?version_id=123. Empty history returns response=[]. Reading history never changes live code.

List saved custom CSS versions › Responses

Success

  • successboolean
    Example: true
  • responseobject[] · maxItems: 30

    Available saved versions, newest creation date first, then highest ID. Empty array when none exist; no code content and no pagination.

  • request_idstring

List saved custom JS versions

GET
https://api.sellavi.com
/store_themes/js/versions

Requires API permission themesJs. Returns only date, version and version_id for up to 30 available saved JS versions belonging to the authenticated United States store. Newest creation date first, then highest ID. No code content or pagination. Read content using GET /store_themes/js?version_id=123. Empty history returns response=[]. Reading history never changes live code.

List saved custom JS versions › Responses

Success

  • successboolean
    Example: true
  • responseobject[] · maxItems: 30

    Available saved versions, newest creation date first, then highest ID. Empty array when none exist; no code content and no pagination.

  • request_idstring