{"id":18438711,"url":"https://github.com/sajari/sdk-php","last_synced_at":"2025-10-25T13:34:15.631Z","repository":{"id":26486470,"uuid":"29938539","full_name":"sajari/sdk-php","owner":"sajari","description":"Official repository of the Search.io SDK for PHP","archived":false,"fork":false,"pushed_at":"2022-09-12T04:00:26.000Z","size":1972,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-26T22:21:06.331Z","etag":null,"topics":["api","php","sdk","search"],"latest_commit_sha":null,"homepage":"https://www.search.io","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"marcioAlmada/yay","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sajari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-27T22:38:52.000Z","updated_at":"2023-08-02T16:45:09.000Z","dependencies_parsed_at":"2022-08-24T15:03:36.907Z","dependency_job_id":null,"html_url":"https://github.com/sajari/sdk-php","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajari%2Fsdk-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajari%2Fsdk-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajari%2Fsdk-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajari%2Fsdk-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sajari","download_url":"https://codeload.github.com/sajari/sdk-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247732583,"owners_count":20986891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","php","sdk","search"],"created_at":"2024-11-06T06:21:22.691Z","updated_at":"2025-10-25T13:34:15.558Z","avatar_url":"https://github.com/sajari.png","language":"PHP","readme":"# Search.io SDK for PHP\n\n[![Build status](https://github.com/sajari/sdk-php/workflows/Build/badge.svg?branch=master)](https://github.com/sajari/sdk-php/actions)\n\nThe official [Search.io](https://www.sajari.com) PHP client library.\n\nSearch.io offers a search and discovery service with Neuralsearch®, the world's first instant AI search technology. Businesses of all sizes use Search.io to build site search and discovery solutions that maximize e-commerce revenue, optimize on-site customer experience, and scale their online presence.\n\n## Table of contents\n\n- [Installation \u0026 usage](#installation--usage)\n  - [Requirements](#requirements)\n  - [Composer](#composer)\n  - [Manual installation](#manual-installation)\n- [Getting started](#getting-started)\n- [API endpoints](#api-endpoints)\n- [Models](#models)\n- [Authorization](#authorization)\n  - [BasicAuth](#basicauth)\n- [Tests](#tests)\n- [Author](#author)\n- [About this package](#about-this-package)\n\n## Installation \u0026 usage\n\n### Requirements\n\nPHP 7.2 and later.\n\n### Composer\n\nTo install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:\n\n```json\n{\n  \"repositories\": [\n    {\n      \"type\": \"vcs\",\n      \"url\": \"https://github.com/sajari/sdk-php.git\"\n    }\n  ],\n  \"require\": {\n    \"sajari/sdk-php\": \"*@dev\"\n  }\n}\n```\n\nThen run `composer install`\n\n### Manual installation\n\nDownload the files and include `autoload.php`:\n\n```php\n\u003c?php\nrequire_once \"/path/to/OpenAPIClient-php/vendor/autoload.php\";\n```\n\n## Getting started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```php\n\u003c?php\nrequire_once __DIR__ . \"/vendor/autoload.php\";\n\n// Configure HTTP basic authorization: BasicAuth\n$config = Sajari\\Configuration::getDefaultConfiguration()\n  -\u003esetUsername(\"YOUR_USERNAME\")\n  -\u003esetPassword(\"YOUR_PASSWORD\");\n\n$apiInstance = new Sajari\\Api\\CollectionsApi(\n  // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n  // This is optional, `GuzzleHttp\\Client` will be used as default.\n  new GuzzleHttp\\Client(),\n  $config\n);\n$collection_id = \"collection_id_example\"; // string | The ID to use for the collection.  This must start with an alphanumeric character followed by one or more alphanumeric or `-` characters. Strictly speaking, it must match the regular expression: `^[A-Za-z][A-Za-z0-9\\\\-]*$`.\n$collection = new \\Sajari\\Model\\Collection(); // \\Sajari\\Model\\Collection | Details of the collection to create.\n$account_id = \"account_id_example\"; // string | The account that owns the collection, e.g. `1618535966441231024`.\n\ntry {\n  $result = $apiInstance-\u003ecreateCollection(\n    $collection_id,\n    $collection,\n    $account_id\n  );\n  print_r($result);\n} catch (Exception $e) {\n  echo \"Exception when calling CollectionsApi-\u003ecreateCollection: \",\n    $e-\u003egetMessage(),\n    PHP_EOL;\n}\n```\n\n## API endpoints\n\nAll URIs are relative to *https://api.search.io*\n\n| Class          | Method                                                                       | HTTP request                                                                       | Description                  |\n| -------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------- |\n| CollectionsApi | [**createCollection**](docs/Api/CollectionsApi.md#createcollection)          | **POST** /v4/collections                                                           | Create collection            |\n| CollectionsApi | [**deleteCollection**](docs/Api/CollectionsApi.md#deletecollection)          | **DELETE** /v4/collections/{collection_id}                                         | Delete collection            |\n| CollectionsApi | [**experiment**](docs/Api/CollectionsApi.md#experiment)                      | **POST** /v4/collections/{collection_id}:experiment                                | Experiment                   |\n| CollectionsApi | [**getCollection**](docs/Api/CollectionsApi.md#getcollection)                | **GET** /v4/collections/{collection_id}                                            | Get collection               |\n| CollectionsApi | [**listCollections**](docs/Api/CollectionsApi.md#listcollections)            | **GET** /v4/collections                                                            | List collections             |\n| CollectionsApi | [**queryCollection**](docs/Api/CollectionsApi.md#querycollection)            | **POST** /v4/collections/{collection_id}:query                                     | Query collection             |\n| CollectionsApi | [**queryCollection2**](docs/Api/CollectionsApi.md#querycollection2)          | **POST** /v4/collections/{collection_id}:queryCollection                           | Query collection             |\n| CollectionsApi | [**trackEvent**](docs/Api/CollectionsApi.md#trackevent)                      | **POST** /v4/collections/{collection_id}:trackEvent                                | Track event                  |\n| CollectionsApi | [**updateCollection**](docs/Api/CollectionsApi.md#updatecollection)          | **PATCH** /v4/collections/{collection_id}                                          | Update collection            |\n| EventsApi      | [**sendEvent**](docs/Api/EventsApi.md#sendevent)                             | **POST** /v4/events:send                                                           | Send event                   |\n| EventsApi      | [**sendEvent2**](docs/Api/EventsApi.md#sendevent2)                           | **POST** /v4/events:sendEvent                                                      | Send event                   |\n| PipelinesApi   | [**createPipeline**](docs/Api/PipelinesApi.md#createpipeline)                | **POST** /v4/collections/{collection_id}/pipelines                                 | Create pipeline              |\n| PipelinesApi   | [**generatePipelines**](docs/Api/PipelinesApi.md#generatepipelines)          | **POST** /v4/collections/{collection_id}:generatePipelines                         | Generate pipelines           |\n| PipelinesApi   | [**getDefaultPipeline**](docs/Api/PipelinesApi.md#getdefaultpipeline)        | **GET** /v4/collections/{collection_id}:getDefaultPipeline                         | Get default pipeline         |\n| PipelinesApi   | [**getDefaultVersion**](docs/Api/PipelinesApi.md#getdefaultversion)          | **GET** /v4/collections/{collection_id}/pipelines/{type}/{name}:getDefaultVersion  | Get default pipeline version |\n| PipelinesApi   | [**getPipeline**](docs/Api/PipelinesApi.md#getpipeline)                      | **GET** /v4/collections/{collection_id}/pipelines/{type}/{name}/{version}          | Get pipeline                 |\n| PipelinesApi   | [**listPipelines**](docs/Api/PipelinesApi.md#listpipelines)                  | **GET** /v4/collections/{collection_id}/pipelines                                  | List pipelines               |\n| PipelinesApi   | [**setDefaultPipeline**](docs/Api/PipelinesApi.md#setdefaultpipeline)        | **POST** /v4/collections/{collection_id}:setDefaultPipeline                        | Set default pipeline         |\n| PipelinesApi   | [**setDefaultVersion**](docs/Api/PipelinesApi.md#setdefaultversion)          | **POST** /v4/collections/{collection_id}/pipelines/{type}/{name}:setDefaultVersion | Set default pipeline version |\n| PromotionsApi  | [**createPromotion**](docs/Api/PromotionsApi.md#createpromotion)             | **POST** /v4/collections/{collection_id}/promotions                                | Create promotion             |\n| PromotionsApi  | [**deletePromotion**](docs/Api/PromotionsApi.md#deletepromotion)             | **DELETE** /v4/collections/{collection_id}/promotions/{promotion_id}               | Delete promotion             |\n| PromotionsApi  | [**getPromotion**](docs/Api/PromotionsApi.md#getpromotion)                   | **GET** /v4/collections/{collection_id}/promotions/{promotion_id}                  | Get promotion                |\n| PromotionsApi  | [**listPromotions**](docs/Api/PromotionsApi.md#listpromotions)               | **GET** /v4/collections/{collection_id}/promotions                                 | List promotions              |\n| PromotionsApi  | [**updatePromotion**](docs/Api/PromotionsApi.md#updatepromotion)             | **PATCH** /v4/collections/{collection_id}/promotions/{promotion_id}                | Update promotion             |\n| RecordsApi     | [**batchUpdateRecords**](docs/Api/RecordsApi.md#batchupdaterecords)          | **POST** /v4/collections/{collection_id}/records:batchUpdate                       | Batch update records         |\n| RecordsApi     | [**batchUpsertRecords**](docs/Api/RecordsApi.md#batchupsertrecords)          | **POST** /v4/collections/{collection_id}/records:batchUpsert                       | Batch upsert records         |\n| RecordsApi     | [**deleteRecord**](docs/Api/RecordsApi.md#deleterecord)                      | **POST** /v4/collections/{collection_id}/records:delete                            | Delete record                |\n| RecordsApi     | [**getRecord**](docs/Api/RecordsApi.md#getrecord)                            | **POST** /v4/collections/{collection_id}/records:get                               | Get record                   |\n| RecordsApi     | [**updateRecord**](docs/Api/RecordsApi.md#updaterecord)                      | **POST** /v4/collections/{collection_id}/records:update                            | Update record                |\n| RecordsApi     | [**upsertRecord**](docs/Api/RecordsApi.md#upsertrecord)                      | **POST** /v4/collections/{collection_id}/records:upsert                            | Upsert record                |\n| RedirectsApi   | [**createRedirect**](docs/Api/RedirectsApi.md#createredirect)                | **POST** /v4/collections/{collection_id}/redirects                                 | Create redirect              |\n| RedirectsApi   | [**deleteRedirect**](docs/Api/RedirectsApi.md#deleteredirect)                | **DELETE** /v4/collections/{collection_id}/redirects/{redirect_id}                 | Delete redirect              |\n| RedirectsApi   | [**getRedirect**](docs/Api/RedirectsApi.md#getredirect)                      | **GET** /v4/collections/{collection_id}/redirects/{redirect_id}                    | Get redirect                 |\n| RedirectsApi   | [**listRedirects**](docs/Api/RedirectsApi.md#listredirects)                  | **GET** /v4/collections/{collection_id}/redirects                                  | List redirects               |\n| RedirectsApi   | [**updateRedirect**](docs/Api/RedirectsApi.md#updateredirect)                | **PATCH** /v4/collections/{collection_id}/redirects/{redirect_id}                  | Update redirect              |\n| SchemaApi      | [**batchCreateSchemaFields**](docs/Api/SchemaApi.md#batchcreateschemafields) | **POST** /v4/collections/{collection_id}/schemaFields:batchCreate                  | Batch create schema fields   |\n| SchemaApi      | [**createSchemaField**](docs/Api/SchemaApi.md#createschemafield)             | **POST** /v4/collections/{collection_id}/schemaFields                              | Create schema field          |\n| SchemaApi      | [**deleteSchemaField**](docs/Api/SchemaApi.md#deleteschemafield)             | **DELETE** /v4/collections/{collection_id}/schemaFields/{schema_field_name}        | Delete schema field          |\n| SchemaApi      | [**listSchemaFields**](docs/Api/SchemaApi.md#listschemafields)               | **GET** /v4/collections/{collection_id}/schemaFields                               | List schema fields           |\n| SchemaApi      | [**updateSchemaField**](docs/Api/SchemaApi.md#updateschemafield)             | **PATCH** /v4/collections/{collection_id}/schemaFields/{schema_field_name}         | Update schema field          |\n\n## Models\n\n- [ActivePromotion](docs/Model/ActivePromotion.md)\n- [Banner](docs/Model/Banner.md)\n- [BatchCreateSchemaFieldsRequest](docs/Model/BatchCreateSchemaFieldsRequest.md)\n- [BatchCreateSchemaFieldsResponse](docs/Model/BatchCreateSchemaFieldsResponse.md)\n- [BatchCreateSchemaFieldsResponseError](docs/Model/BatchCreateSchemaFieldsResponseError.md)\n- [BatchUpdateRecordsRequest](docs/Model/BatchUpdateRecordsRequest.md)\n- [BatchUpdateRecordsResponse](docs/Model/BatchUpdateRecordsResponse.md)\n- [BatchUpdateRecordsResponseError](docs/Model/BatchUpdateRecordsResponseError.md)\n- [BatchUpdateRecordsResponseRecord](docs/Model/BatchUpdateRecordsResponseRecord.md)\n- [BatchUpsertRecordsRequest](docs/Model/BatchUpsertRecordsRequest.md)\n- [BatchUpsertRecordsRequestPipeline](docs/Model/BatchUpsertRecordsRequestPipeline.md)\n- [BatchUpsertRecordsResponse](docs/Model/BatchUpsertRecordsResponse.md)\n- [BatchUpsertRecordsResponseError](docs/Model/BatchUpsertRecordsResponseError.md)\n- [BatchUpsertRecordsResponseKey](docs/Model/BatchUpsertRecordsResponseKey.md)\n- [BatchUpsertRecordsResponseVariables](docs/Model/BatchUpsertRecordsResponseVariables.md)\n- [Collection](docs/Model/Collection.md)\n- [CollectionType](docs/Model/CollectionType.md)\n- [DeleteRecordRequest](docs/Model/DeleteRecordRequest.md)\n- [Error](docs/Model/Error.md)\n- [Event](docs/Model/Event.md)\n- [ExperimentRequest](docs/Model/ExperimentRequest.md)\n- [ExperimentRequestPipeline](docs/Model/ExperimentRequestPipeline.md)\n- [ExperimentResponse](docs/Model/ExperimentResponse.md)\n- [GeneratePipelinesRequest](docs/Model/GeneratePipelinesRequest.md)\n- [GeneratePipelinesResponse](docs/Model/GeneratePipelinesResponse.md)\n- [GetCollectionRequestView](docs/Model/GetCollectionRequestView.md)\n- [GetDefaultPipelineResponse](docs/Model/GetDefaultPipelineResponse.md)\n- [GetDefaultVersionRequestView](docs/Model/GetDefaultVersionRequestView.md)\n- [GetPipelineRequestView](docs/Model/GetPipelineRequestView.md)\n- [GetRecordRequest](docs/Model/GetRecordRequest.md)\n- [ListCollectionsRequestView](docs/Model/ListCollectionsRequestView.md)\n- [ListCollectionsResponse](docs/Model/ListCollectionsResponse.md)\n- [ListPipelinesRequestView](docs/Model/ListPipelinesRequestView.md)\n- [ListPipelinesResponse](docs/Model/ListPipelinesResponse.md)\n- [ListPromotionsRequestPromotionView](docs/Model/ListPromotionsRequestPromotionView.md)\n- [ListPromotionsResponse](docs/Model/ListPromotionsResponse.md)\n- [ListRedirectsResponse](docs/Model/ListRedirectsResponse.md)\n- [ListSchemaFieldsResponse](docs/Model/ListSchemaFieldsResponse.md)\n- [PercentileDataPoint](docs/Model/PercentileDataPoint.md)\n- [Pipeline](docs/Model/Pipeline.md)\n- [PipelineStep](docs/Model/PipelineStep.md)\n- [PipelineStepParamBinding](docs/Model/PipelineStepParamBinding.md)\n- [PipelineType](docs/Model/PipelineType.md)\n- [Promotion](docs/Model/Promotion.md)\n- [PromotionCategory](docs/Model/PromotionCategory.md)\n- [PromotionExclusion](docs/Model/PromotionExclusion.md)\n- [PromotionFilterBoost](docs/Model/PromotionFilterBoost.md)\n- [PromotionFilterCondition](docs/Model/PromotionFilterCondition.md)\n- [PromotionPin](docs/Model/PromotionPin.md)\n- [PromotionPinMode](docs/Model/PromotionPinMode.md)\n- [PromotionRangeBoost](docs/Model/PromotionRangeBoost.md)\n- [ProtobufAny](docs/Model/ProtobufAny.md)\n- [ProtobufFieldMask](docs/Model/ProtobufFieldMask.md)\n- [ProtobufNullValue](docs/Model/ProtobufNullValue.md)\n- [QueryAggregateResult](docs/Model/QueryAggregateResult.md)\n- [QueryAggregateResultAnalysis](docs/Model/QueryAggregateResultAnalysis.md)\n- [QueryAggregateResultBuckets](docs/Model/QueryAggregateResultBuckets.md)\n- [QueryAggregateResultBucketsBucket](docs/Model/QueryAggregateResultBucketsBucket.md)\n- [QueryAggregateResultCount](docs/Model/QueryAggregateResultCount.md)\n- [QueryAggregateResultDate](docs/Model/QueryAggregateResultDate.md)\n- [QueryAggregateResultMetric](docs/Model/QueryAggregateResultMetric.md)\n- [QueryAggregateResultPercentile](docs/Model/QueryAggregateResultPercentile.md)\n- [QueryCollectionRequest](docs/Model/QueryCollectionRequest.md)\n- [QueryCollectionRequestPipeline](docs/Model/QueryCollectionRequestPipeline.md)\n- [QueryCollectionRequestTracking](docs/Model/QueryCollectionRequestTracking.md)\n- [QueryCollectionRequestTrackingType](docs/Model/QueryCollectionRequestTrackingType.md)\n- [QueryCollectionResponse](docs/Model/QueryCollectionResponse.md)\n- [QueryCollectionResponsePipeline](docs/Model/QueryCollectionResponsePipeline.md)\n- [QueryResult](docs/Model/QueryResult.md)\n- [QueryResultToken](docs/Model/QueryResultToken.md)\n- [QueryResultTokenClick](docs/Model/QueryResultTokenClick.md)\n- [QueryResultTokenPosNeg](docs/Model/QueryResultTokenPosNeg.md)\n- [RecordKey](docs/Model/RecordKey.md)\n- [Redirect](docs/Model/Redirect.md)\n- [RedirectResult](docs/Model/RedirectResult.md)\n- [SchemaField](docs/Model/SchemaField.md)\n- [SchemaFieldMode](docs/Model/SchemaFieldMode.md)\n- [SchemaFieldType](docs/Model/SchemaFieldType.md)\n- [SendEventRequest](docs/Model/SendEventRequest.md)\n- [SetDefaultPipelineRequest](docs/Model/SetDefaultPipelineRequest.md)\n- [SetDefaultVersionRequest](docs/Model/SetDefaultVersionRequest.md)\n- [Status](docs/Model/Status.md)\n- [TextPosition](docs/Model/TextPosition.md)\n- [UpdateRecordRequest](docs/Model/UpdateRecordRequest.md)\n- [UpsertRecordRequest](docs/Model/UpsertRecordRequest.md)\n- [UpsertRecordRequestPipeline](docs/Model/UpsertRecordRequestPipeline.md)\n- [UpsertRecordResponse](docs/Model/UpsertRecordResponse.md)\n\n## Authorization\n\n### BasicAuth\n\n- **Type**: HTTP basic authentication\n\n## Tests\n\nTo run the tests, use:\n\n```bash\ncomposer install\nvendor/bin/phpunit\n```\n\n## Author\n\nsupport@search.io\n\n## About this package\n\nThis PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:\n\n- API version: `v4`\n  - Package version: `5.1.0`\n- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajari%2Fsdk-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsajari%2Fsdk-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajari%2Fsdk-php/lists"}