Documentation

CartRedirectUrlsApi extends UuidResourceWithUuidParentApi
in package

Cart Redirect URLS

Creates a Cart redirect URL for redirecting a shopper to an already created cart using the cartId.

Usage Notes

  • Redirect URLs can also be created via Create a Cart requests by appending include=redirect_urls.
  • A Carts redirect URLs may only be used once.
  • Once a redirect URL has been visited, it will be invalidated and cannot be used again.
  • If your application requires URLs to be visited more than once, consider generating a fresh one each time you need to restore a cart, and redirecting to the URL from your own application.
  • Redirect URLs can be generated only from carts created using the Server to Server Cart API.
  • To restore a cart that was created on the storefront, either by a shopper or the Storefront Cart API, first recreate the cart using the Server to Server Cart API.

Example:

$api = new BigCommerce\ApiV3\Client($_ENV['hash'], $_ENV['CLIENT_ID'], $_ENV['ACCESS_TOKEN']);

$urls = $api->cart('sadfghj')->redirectUrls()->getRedirectUrls();

Tags

Table of Contents

__construct()  : mixed
create()  : CartRedirectUrlsResponse
getClient()  : Client
getParentResourceId()  : int|null
getParentUuid()  : string
getResourceId()  : int|null
getUuid()  : string
setParentUuid()  : void
setUuid()  : void

Methods

__construct()

public __construct(Client $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed
Parameters
$client : Client
$resourceId : int|null = null
$parentResourceId : int|null = null
Tags
Return values
mixed

getParentResourceId()

public getParentResourceId() : int|null
Tags
Return values
int|null

getResourceId()

public getResourceId() : int|null
Tags
Return values
int|null

setParentUuid()

public setParentUuid(string $parentUuid) : void
Parameters
$parentUuid : string
Tags
Return values
void

setUuid()

public setUuid(string $uuid) : void
Parameters
$uuid : string
Tags
Return values
void

        

Search results