Overview
Configuration is provided for establishing connections with PrestaShop service. The configuration is used in the REST Connection Manager.
Setup
Press icon to get more information about the connection parameters.
Obtain data
Use REST Source component to get data from the service resource.
Insert data
Use REST Destination component to insert data into service resource.
Quick Start
In this guide, we will show you step-by-step how to create a connection to a web service using the CozyRoc SSIS+ REST Connection Manager. This integration will enable you to create, read, update, and delete data from the PrestaShop API.
In this guide, we will show you step-by-step how to create a connection to Prestashop REST API using COZYROC's REST Connection Manager.
Congratulations! You have now established a connection to your Prestashop instance.
In this guide, we will show how to read data from the Prestashop service resource using the COZYROC REST Source component.
In this guide, we will show how to write data to the Prestashop service resource using the COZYROC REST Destination component.
Configuration
Base URL address: http://[webservice_url]/api
.
-
The authentication uses a parameters-based authentication.
The authentication has the following user-defined parameters:
- AccessKey:
The following request parameters will be automatically processed during the authentication process:
-
Authorization:
Basic {{=Base64.encode(connection.user.AccessKey + ':')}}
Documentation: https://devdocs.prestashop-project.org/8/webservice/getting-started/.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/images/{{=parameters.imageType}}
.
The result is extracted from:{{=response.prestashop.images.image}}
.
The result is paginated.The action has the following user-defined parameters:
- type: Required. Specify the image type.
The following request parameters will be automatically processed:
-
output_format:
XML
Documentation: https://devdocs.prestashop-project.org/8/webservice/tutorials/advanced-use/image-management/#get-image.
- [Read single] action
-
Endpoint URL address:
/images/{{=parameters.imageType}}/{{=parameters.id}}
.
The result is extracted from:{{=Prestashop.getImage(response, parameters)}}
.The action has the following user-defined parameters:
- type: Required. Specify the image type.
The following request parameters will be automatically processed:
-
output_format:
XML
Documentation: https://devdocs.prestashop-project.org/8/webservice/tutorials/advanced-use/image-management/#get-image.
- [Create] action
-
Endpoint URL address:
/images/{{=item.type}}/{{=item.id}}
.The following request parameters will be automatically processed:
-
image:
{{=item.imageContent}}
-
image_mime:
{{=item.mime}}
Documentation: https://devdocs.prestashop-project.org/8/webservice/tutorials/advanced-use/image-management/#adding-a-new-image-to-a-product.
-
image:
- [Update] action
-
Endpoint URL address:
/images/{{=parameters.type}}/{{=item.typeId}}/{{=item.id}}
.
The action uses POST method.The following request parameters will be automatically processed:
-
image:
{{=item.imageContent}}
-
image_mime:
{{=parameters.mime}}
-
ps_method:
PUT
Documentation: https://devdocs.prestashop-project.org/8/webservice/tutorials/advanced-use/image-management/#update-the-image-of-a-resource.
-
image:
- [Delete] action
-
Endpoint URL address:
/images/{{=item.type}}/{{=item.typeId}}/{{=item.id}}
.Documentation: https://devdocs.prestashop-project.org/8/webservice/tutorials/advanced-use/image-management/#using-curl-1.
- id
A key field. Data type: DT_I4
- href
Template: ShortText.
- filename
Template: ShortText.
- _@ttribute
Template: ShortText.
- href
Template: ShortText.
- content
Data type: DT_IMAGE The value is gathered from
{{=item.href}}
address.- typeId
Data type: DT_I4
- href
Template: ShortText.
- type
A key field. Template: ShortText.
- mime
Template: ShortText.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/attachments
.The following request parameters will be automatically processed:
-
output_format:
JSON
-
display:
full
-
output_format:
- [Create] action
-
Endpoint URL address:
/attachments/file
.The following request parameters will be automatically processed:
-
file:
{{=item.imageContent}}
-
file:
- [Update] action
-
Endpoint URL address:
/attachments/file/{{=item.id}}
.The following request parameters will be automatically processed:
-
file:
{{=item.imageContent}}
-
file:
- [Delete] action
-
Endpoint URL address:
/attachments/file/{{=item.id}}
.
- id
A key field. Data type: DT_I4
- file
Template: ShortText.
- file_name
Template: ShortText.
- name
Template: ShortText.
- description
Template: ShortText.
- file_size
Template: ShortText.
- mime
Template: ShortText.
- attachmentContent
Data type: DT_IMAGE The value is gathered from
/attachments/file/{{=item.id}}
address.- imageTypeId
Data type: DT_I4
- href
Template: ShortText.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/customizations
.The following request parameters will be automatically processed:
-
output_format:
JSON
Documentation: https://devdocs.prestashop-project.org/8/webservice/tutorials/advanced-use/image-management/#get-image.
-
output_format:
- [Create] action
-
Endpoint URL address:
/customizations
.
- id
A key field. Data type: DT_I4
- id_address_delivery
Data type: DT_I4
- id_cart
Data type: DT_I4
- id_product
Data type: DT_I4
- id_product_attribute
Data type: DT_I4
- quantity
Data type: DT_I4
- quantity_refunded
Data type: DT_I4
- quantity_returned
Data type: DT_I4
- in_cart
Data type: DT_I4
- productDetails
The value is gathered from
/products/{{=item.id}}
address. The gathered value is processed with{{=_.extend({}, response.products)[0]}}
expression. Field components:-
Uses template:
ShortText
. - Contains the following components: id, id_manufacturer, id_supplier, id_category_default, new, cache_default_attribute, id_default_image, id_default_combination, id_tax_rules_group, position_in_category, manufacturer_name, quantity, type, id_shop_default, reference, supplier_reference, location, width, height, depth, weight, quantity_discount, ean13, isbn, upc, mpn, cache_is_pack, cache_has_attachments, is_virtual, state, additional_delivery_times, delivery_in_stock, delivery_out_stock, product_type, on_sale, online_only, ecotax, minimal_quantity, low_stock_threshold, low_stock_alert, price, wholesale_price, unity, unit_price_ratio, additional_shipping_cost, customizable, text_fields, uploadable_files, active, redirect_type, id_type_redirected, available_for_order, available_date, show_condition, condition, show_price, indexed, visibility, advanced_stock_management, date_add, date_upd, pack_stock_type, meta_description, meta_keywords, meta_title, link_rewrite, name, description, description_short, available_now, available_later.
-
Uses template:
- [External]
-
The external fields URL address:
/product_customization_fields
. The external fields list is extracted from:{{=response.customization_fields}}
.- customText.{{=external.name}}
Template: ShortText. The gathered value is processed with
{{=item[field.external.id]}}
expression. Before setting, the value is processed with{{={ id_customization_field: field.external.id, value: value } }}
expression.
- [External]
-
The external fields URL address:
/product_customization_fields
. The external fields list is extracted from:{{=response.customization_fields}}
.- customImage.{{=external.name}}
Template: ShortText. The gathered value is processed with
{{=item[field.external.id]}}
expression.
- [Read] action
-
- [Read single] action
-
- [Create] action
-
Endpoint URL address:
/{{=resource.external.name}}
.
- [Update] action
-
Endpoint URL address:
/{{=resource.external.name}}
.
- [Delete] action
-
Endpoint URL address:
/{{=resource.external.name}}/{{=item.key}}
.
- id
Data type: DT_I4
- key
A key field. Data type: DT_I4
- [External]
-
The external fields URL address:
{{=resource.external.name}}
. The external fields list is extracted from:{{=Prestashop.getFieldsMeta(response, resource, parameters)}}
.
The external resource list URL address: /
.
The external resource list is extracted from: {{=_.filter(_.map(response, function(v, k) { return { name: v }; }), function(item) { return item.name != 'product_customization_fields'; })}}
.
Based on resource template Base.
- [Read] action
-
Endpoint URL address:
/{{=resource.objects}}
.
The result is extracted from:{{=response[resource.objects]}}
.
The result is paginated.The action has the following user-defined parameters:
- Languages: Specify list of languages to display localize fields. Optional.
The following request parameters will be automatically processed:
-
output_format:
JSON
-
display:
full
-
language:
[{{=Prestashop.getLanguageList(parameters)}}]
-
limit:
{{=(parameters.iterator || '') + ',' + parameters.batchSize}}
-
_includeUserParameters:
{{=parameters}}
- [Read single] action
-
Endpoint URL address:
/{{=resource.objects}}/{{=parameters.id}}
.
The result is extracted from:{{=response[resource.objects]}}
.
The result is paginated.The action has the following user-defined parameters:
- id: Required. Specify the record identifier
The following request parameters will be automatically processed:
-
limit:
{{=undefined}}
- [Create] action
-
The action uses POST method.The action has the following user-defined parameters:
- singularName: Specify resource name as singular name. Optional.
- Languages: Specify list of languages to display localize fields. Optional.
The following request parameters will be automatically processed:
-
_includeUserParameters:
{{=parameters}}
-
language:
[{{=Prestashop.getLanguageList(parameters)}}]
-
application/xml:
{{=function() { var result = {}; result[parameters.get('singularName') ? parameters.singularName : resource.object] = item; return json2xml({ prestashop: result }); }()}}
- [Update] action
-
The action uses PUT method.The action has the following user-defined parameters:
- singularName: Specify resource name as singular name. Optional.
- Languages: Specify list of languages to display localize fields. Optional.
The following request parameters will be automatically processed:
-
_includeUserParameters:
{{=parameters}}
-
language:
[{{=Prestashop.getLanguageList(parameters)}}]
-
application/xml:
{{=function() { var result = {}; result[parameters.get('singularName') ? parameters.singularName : resource.object] = item; return json2xml({ prestashop: result }); }()}}
- [Delete] action
-
The action uses DELETE method.
- ShortText
Data type: DT_WSTR ( length 255 )
- LongText
Data type: DT_WSTR ( length 1000 )
- DateTime
Data type: DT_DBTIMESTAMP
- Date
Data type: DT_DBDATE
- Boolean
Data type: DT_BOOL
- Integer
Data type: DT_I4
- Decimal
Data type: DT_R8
- DefaultLanguageT
Template: ShortText. Before setting, the value is processed with
{{=Prestashop.setDefaultValue(field, value)}}
expression.- LocalizeLanguageT
Field components:
- An array.
- Contains the following components: id, value, language.
Knowledge Base
What's New
- New: Introduced connection.
Related documentation
COZYROC SSIS+ Components Suite is free for testing in your development environment.
A licensed version can be deployed on-premises, on Azure-SSIS IR and on COZYROC Cloud.