omnismith-sdk / php
API Documentation for Omnismith
1.0.10
2026-04-21 19:49 UTC
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
README
The Omnismith PHP SDK is generated from the central OpenAPI contract for the Omnismith platform, a flexible data management system built around templates, entities, and attribute-driven schemas. Use it to automate workflows against the Omnismith API and pair it with the web app at app.omnismith.io.
Quick Start
<?php require_once __DIR__ . '/vendor/autoload.php'; use GuzzleHttp\Client; use Omnismith\Sdk\Api\EntityApi; use Omnismith\Sdk\Api\TemplatesApi; use Omnismith\Sdk\Configuration; use Omnismith\Sdk\Model\CreateEntityRequest; $configuration = Configuration::getDefaultConfiguration() ->setHost('https://api.omnismith.io/v1') ->setAccessToken(getenv('OMNISMITH_ACCESS_TOKEN')); $httpClient = new Client(); $templatesApi = new TemplatesApi($httpClient, $configuration); $entityApi = new EntityApi($httpClient, $configuration); $templateId = 'your-template-id'; $template = $templatesApi->getTemplate($templateId); $entity = $entityApi->createEntity( new CreateEntityRequest([ 'template_id' => $template->getId(), 'attribute_values' => [ [ 'attribute_id' => $template->getAttributeIds()[0], 'value' => 'SKU-1001', ], ], ]) ); printf("%s %s\n", $template->getName(), $entity->getId());
Set OMNISMITH_ACCESS_TOKEN to an access token created in Omnismith before running the snippet.