commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
RequestBuilder

In order to be able to build request objects you can use the RequestBuilder. The following methods return a HTTP request instance of Guzzle PSR-7.

<tt>withProjectKeyValue("projectKey")->categories()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a request for creating new Categories or updating existing ones.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->categories()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);

<tt>withProjectKeyValue("projectKey")->customers()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a request for creating new Customers or updating existing ones.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->customers()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);

<tt>withProjectKeyValue("projectKey")->discountCodes()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a request for creating new Discount Codes or updating existing ones.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->discountCodes()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);

<tt>withProjectKeyValue("projectKey")->importContainers()->post(null)</tt>

Creates a new import container.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->importContainers()
->post(null);

<tt>withProjectKeyValue("projectKey")->importContainers()->get()</tt>

Retrieves all import containers of a given project key.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->importContainers()
->get();

<tt>withProjectKeyValue("projectKey")->importContainers()->withImportContainerKeyValue("importContainerKey")->put(null)</tt>

Updates the import container given by the key.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->put(null);

<tt>withProjectKeyValue("projectKey")->importContainers()->withImportContainerKeyValue("importContainerKey")->get()</tt>

Retrieves the import container given by the key.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->get();

<tt>withProjectKeyValue("projectKey")->importContainers()->withImportContainerKeyValue("importContainerKey")->delete()</tt>

Deletes the import container given by the key.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->delete();

<tt>withProjectKeyValue("projectKey")->importContainers()->withImportContainerKeyValue("importContainerKey")->importOperations()->get()</tt>

Retrieves all [ImportOperations](ctp:import:type:ImportOperation) of a given ImportContainer key.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->importOperations()
->get();

<tt>withProjectKeyValue("projectKey")->importContainers()->withImportContainerKeyValue("importContainerKey")->importSummaries()->get()</tt>

Retrieves an [ImportSummary](ctp:import:type:ImportSummary) for the given import container. An [ImportSummary](ctp:import:type:ImportSummary) is calculated on demand.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->importSummaries()
->get();

<tt>withProjectKeyValue("projectKey")->importOperations()->withIdValue("id")->get()</tt>

Retrieves the [ImportOperation](ctp:import:type:ImportOperation) of a given ID.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->importOperations()
->withIdValue("id")
->get();

<tt>withProjectKeyValue("projectKey")->inventories()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a request for creating new Inventories or updating existing ones.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->inventories()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);

<tt>withProjectKeyValue("projectKey")->orderPatches()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a new import request for order patches

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->orderPatches()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);

<tt>withProjectKeyValue("projectKey")->orders()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a request for creating new Orders.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->orders()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);

<tt>withProjectKeyValue("projectKey")->prices()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a request for creating new Prices or updating existing ones.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->prices()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);

<tt>withProjectKeyValue("projectKey")->productDrafts()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a request for creating new ProductDrafts or updating existing ones.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->productDrafts()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);

<tt>withProjectKeyValue("projectKey")->productTypes()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a request for creating new ProductTypes or updating existing ones.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->productTypes()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);

<tt>withProjectKeyValue("projectKey")->productVariantPatches()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a new import request for Product Variant Patches. Returns an [InvalidField](ctp:import:type:InvalidFieldError) error if the [ProductVariantPatchRequest](ctp:import:type:ProductVariantPatchRequest) contains patches with and without the product field set.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->productVariantPatches()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);

<tt>withProjectKeyValue("projectKey")->productVariants()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a request for creating new ProductVariants or updating existing ones.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->productVariants()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);

<tt>withProjectKeyValue("projectKey")->products()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a request for creating new Products or updating existing ones.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->products()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);

<tt>withProjectKeyValue("projectKey")->standalonePrices()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a request for creating new Standalone Prices or updating existing ones.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->standalonePrices()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);

<tt>withProjectKeyValue("projectKey")->types()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates a request for creating new Type or updating existing ones.

Example

$builder = new ImportRequestBuilder();
$request = $builder
->withProjectKeyValue("projectKey")
->types()
->importContainers()
->withImportContainerKeyValue("importContainerKey")
->post(null);