Skip to content

APIs

Manage API credentials for third-party integrations and external applications. Create, monitor, and revoke API keys and secrets for secure programmatic access to your store.

Basic CRUD Actions

Get APIs listing

View on Postman

Get a list of all API credentials.

JS
let apis = await Client.API.Core.APIs.all();
TS
import { Response, APIs } from "@tscommerce/sdk-typescript"

Client.API.Core.APIs.all().then((response:Response<APIs>) => {
    response.resource.forEach((api) => {
        console.log(api.id, api.name, api.key);
    });
});
PHP
$apis = $client->API->Core->APIs->all();

Create new API

View on Postman

Create new API credentials for an integration.

JS
const payload = {
    name: 'Mobile App Integration',
    description: 'API credentials for mobile app'
};
let api = await Client.API.Core.APIs.create(payload);
TS
import { Response, API, CreateAPIPayload } from "@tscommerce/sdk-typescript"

const payload:CreateAPIPayload = {
    name: 'Mobile App Integration',
    description: 'API credentials for mobile app'
};

Client.API.Core.APIs.create(payload).then((response:Response<API>) => {
    console.log('API Key:', response.resource.key);
    console.log('API Secret:', response.resource.secret);
});
PHP
$payload = [
    'name' => 'Mobile App Integration',
    'description' => 'API credentials for mobile app'
];
$api = $client->API->Core->APIs->create($payload);

Get API

View on Postman

Get existing API credentials by ID.

JS
const apiId = 123;
let api = await Client.API.Core.APIs.read(apiId);
TS
import { Response, API } from "@tscommerce/sdk-typescript"

const apiId:API['id'] = 123;
Client.API.Core.APIs.read(apiId).then((response:Response<API>) => {
    console.log('API:', response.resource);
});
PHP
$apiId = 123;
$api = $client->API->Core->APIs->read($apiId);

Update API

View on Postman

Update API credential information.

JS
const apiId = 123;
const payload = {
    name: 'Updated Mobile App Integration'
};
let api = await Client.API.Core.APIs.update(apiId, payload);
TS
import { Response, API, UpdateAPIPayload } from "@tscommerce/sdk-typescript"

const apiId:API['id'] = 123;
const payload:UpdateAPIPayload = {
    name: 'Updated Mobile App Integration'
};

Client.API.Core.APIs.update(apiId, payload).then((response:Response<API>) => {
    console.log('Updated API:', response.resource);
});
PHP
$apiId = 123;
$payload = ['name' => 'Updated Mobile App Integration'];
$api = $client->API->Core->APIs->update($apiId, $payload);

Delete API

View on Postman

Revoke API credentials and delete the integration.

JS
const apiId = 123;
Client.API.Core.APIs.delete(apiId);
TS
import { Response, API } from "@tscommerce/sdk-typescript"

const apiId:API['id'] = 123;
Client.API.Core.APIs.delete(apiId).then((response:Response) => {
    console.log('API deleted successfully');
});
PHP
$apiId = 123;
$client->API->Core->APIs->delete($apiId);

Copyright © 2025-2025 TeamSystem S.p.A. - Built with ❤️ by TeamSystem Commerce