Websites

A Website represents the website/brand that customers interact with... You could think of it like a brand. For example, Nestle owns Perrier and Purina and PowerBar.

We recognize that some enterprises have more than one website (or brand). The website is related to each invoice and each payment gateway account. This feature would allow you to have gateway accounts that are related to multiple websites, or exclusive to particular websites. And gives you more control over your business.

Retrieve a list of websites

Retrieve a list of websites.

Request
query Parameters
limit
integer [ 0 .. 1000 ]

The collection items limit.

offset
integer >= 0

The collection items offset.

q
string

The partial search of the text fields.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format.

sort
Array of strings

The collection items sort field and order (prefix with "-" for descending sort).

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200

A list of Websites was retrieved successfully.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

get/websites
Request samples
$websites = $client->websites()->search([
    'filter' => 'name:TestWebsite',
]);
Response samples
application/json
[
  • {
    }
]

Create a website

Create a website.

Request
Security:
header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

Website resource.

name
required
string

The website name.

url
required
string

The website domain address.

servicePhone
required
string

The website customer service phone number.

serviceEmail
required
string <email>

The website customer service email address.

customFields
object (ResourceCustomFields)
Default: {}

Custom Fields list as a map {"custom field name": "custom field value", ...}. The format must follow the saved format (see Custom Fields section for the formats).

Responses
201

Website was created.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

422

Invalid data was sent.

post/websites
Request samples
application/json
{
  • "name": "string",
  • "url": "string",
  • "servicePhone": "string",
  • "serviceEmail": "user@example.com",
  • "customFields": {
    }
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "string",
  • "url": "string",
  • "servicePhone": "string",
  • "serviceEmail": "user@example.com",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "customFields": {
    },
  • "organizationId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "_links": [
    ]
}

Retrieve a website

Retrieve a website with specified identifier string.

Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200

Website was retrieved successfully.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

404

Resource was not found.

get/websites/{id}
Request samples
$website = $client->websites()->load('websiteId');
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "string",
  • "url": "string",
  • "servicePhone": "string",
  • "serviceEmail": "user@example.com",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "customFields": {
    },
  • "organizationId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "_links": [
    ]
}

Create or update a website with predefined ID

Create or update a website with predefined identifier string.

Request
Security:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

Website resource.

name
required
string

The website name.

url
required
string

The website domain address.

servicePhone
required
string

The website customer service phone number.

serviceEmail
required
string <email>

The website customer service email address.

customFields
object (ResourceCustomFields)
Default: {}

Custom Fields list as a map {"custom field name": "custom field value", ...}. The format must follow the saved format (see Custom Fields section for the formats).

Responses
200

Website was updated.

201

Website was created.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

404

Resource was not found.

422

Invalid data was sent.

put/websites/{id}
Request samples
application/json
{
  • "name": "string",
  • "url": "string",
  • "servicePhone": "string",
  • "serviceEmail": "user@example.com",
  • "customFields": {
    }
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "string",
  • "url": "string",
  • "servicePhone": "string",
  • "serviceEmail": "user@example.com",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "customFields": {
    },
  • "organizationId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "_links": [
    ]
}

Delete a website

Delete a website with predefined identifier string.

Request
Security:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
204

Website was deleted.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

404

Resource was not found.

409

Website has related resources and cannot be deleted.

delete/websites/{id}
Request samples
try {
    $client->websites()->delete('websiteId');
} catch (ServerException $e) {
    echo $e->getMessage();
}
Response samples
application/json
{
  • "status": 400,
  • "title": "string",
  • "detail": "string",
  • "error": "string"
}