Skip to main content

StoresService

A list of all methods in the StoresService service. Click on the method name to view detailed information about that method.

MethodsDescription
StoresV_GetStores
StoresV_CreateStore
StoresV_GetStore
StoresV_UpdateStoreUpdates a store. externalId is the store identifier.

StoresV_GetStores

  • HTTP Method: GET
  • Endpoint: /api/v2/stores

Parameters

NameTypeRequiredDescription
includeInactivebooleanValue indicating if the inactive stores should be included or not. (Default value = false)

Return Type

ApiStore[]

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const { data } = await voyadoEngage.stores.storesVGetStores({
includeInactive: true,
});

console.log(data);
})();

StoresV_CreateStore

  • HTTP Method: POST
  • Endpoint: /api/v2/stores

Parameters

NameTypeRequiredDescription
bodyApiStoreThe request body.

Return Type

ApiStore

Example Usage Code Snippet

import { ApiStore, VoyadoEngage } from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const input: ApiStore = {
name: 'name',
city: 'city',
countryCode: 'countryCode',
county: 'county',
email: 'email',
adjacentZipCodes: 'adjacentZipCodes',
emailUnsubscribeText: 'emailUnsubscribeText',
emailViewOnlineText: 'emailViewOnlineText',
externalId: 'externalId',
footerHtml: 'footerHtml',
headerHtml: 'headerHtml',
homepage: 'homepage',
phoneNumber: 'phoneNumber',
region: 'region',
senderAddress: 'senderAddress',
senderName: 'senderName',
street: 'street',
type: 'type',
zipCode: 'zipCode',
active: true,
timeZone: 'timeZone',
};

const { data } = await voyadoEngage.stores.storesVCreateStore(input);

console.log(data);
})();

StoresV_GetStore

  • HTTP Method: GET
  • Endpoint: /api/v2/stores/{externalId}

Parameters

NameTypeRequiredDescription
externalIdstringThe external id of the store to get.
includeInactivebooleanValue indicating if the store can be inactive or not. (Default value = false)

Return Type

ApiStore

Example Usage Code Snippet

import { VoyadoEngage } from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const { data } = await voyadoEngage.stores.storesVGetStore('externalId', {
includeInactive: true,
});

console.log(data);
})();

StoresV_UpdateStore

Updates a store. externalId is the store identifier.

  • HTTP Method: POST
  • Endpoint: /api/v2/stores/{externalId}

Parameters

NameTypeRequiredDescription
bodyApiStoreThe request body.
externalIdstringThe external id of the store to update.

Return Type

ApiStore

Example Usage Code Snippet

import { ApiStore, VoyadoEngage } from 'voyado_engage';

(async () => {
const voyadoEngage = new VoyadoEngage({
token: 'YOUR_TOKEN',
});

const input: ApiStore = {
name: 'name',
city: 'city',
countryCode: 'countryCode',
county: 'county',
email: 'email',
adjacentZipCodes: 'adjacentZipCodes',
emailUnsubscribeText: 'emailUnsubscribeText',
emailViewOnlineText: 'emailViewOnlineText',
externalId: 'externalId',
footerHtml: 'footerHtml',
headerHtml: 'headerHtml',
homepage: 'homepage',
phoneNumber: 'phoneNumber',
region: 'region',
senderAddress: 'senderAddress',
senderName: 'senderName',
street: 'street',
type: 'type',
zipCode: 'zipCode',
active: true,
timeZone: 'timeZone',
};

const { data } = await voyadoEngage.stores.storesVUpdateStore('externalId', input);

console.log(data);
})();

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →