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")->businessUnits()->importContainers()->withImportContainerKeyValue("importContainerKey")->post(null)</tt>

Creates an Import Request for Business Units.

Example

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

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

Creates an Import Request for Categories.

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 an Import Request for Customers.

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 an Import Request for Discount Codes.

Example

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

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

Creates an Import Container in the Project.

Generates the ImportContainerCreated Event.

Example

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

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

Retrieves all ImportContainers in the Project.

Example

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

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

Updates an [ImportContainer](ctp:import:type:ImportContainer) in the Project.

Example

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

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

Retrieves an [ImportContainer](ctp:import:type:ImportContainer) with the provided importContainerKey.

Example

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

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

Deletes an Import Container in the Project.

Generates the ImportContainerDeleted Event.

Example

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

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

Retrieves all ImportOperations within an [ImportContainer](ctp:import:type:ImportContainer).

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 [ImportContainer](ctp:import:type:ImportContainer) with the provided importContainerKey.

Example

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

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

Retrieves an ImportOperation with the provided id.

Example

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

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

Creates an Import Request for InventoryEntries.

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 an Import Request for updating Orders.

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 an Import Request for creating 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 an Import Request for Prices.

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 an Import Request for Products.

Example

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

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

Creates an Import Request for Product Selections.

Example

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

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

Creates an Import Request for ProductTypes.

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 an Import Request for updating Product Variants. 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 an Import Request for ProductVariants.

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 an Import Request for Products.

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 an Import Request for Standalone Prices.

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 an Import Request for Types.

Example

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