PIM integration API
Describes how to write data to Optimizely Production Information Management using a third-party integration.
Note
You must obtain credentials to use the PIM API by contacting Optimizely support at [email protected].
Getting started
{
"RequestURL": "Enter PIM URL",
"AppKey": "Enter the App Key",
"AppSecret": "Enter the App Secret"
}
ImportProduct RPC
Input – ImportProductRequest
message ImportProductRequest {
// Name of import product template which client has to pre-defined in PIM for mapping between client's data with PIM's properties
google.protobuf.StringValue importTemplate = 1;
// Client's time zone id (for example: Asia/Bangkok)
string timeZone = 2;
// Colletion of product data
repeated Product products = 3;
}
Output – ImportProductResponse
message ImportProductResponse {
// Flag to indicate the success of request
bool isSuccess = 1;
// PIM error message for failure case
google.protobuf.StringValue errorMessage = 2;
// The request id which will be used for getting import jobs status (This just has value in case of success)
google.protobuf.StringValue requestId = 3;
}
GetImportStatus RPC
Input – GetImportStatusRequest
message GetImportStatusRequest {
// The request id which getting from ImportResponse
string requestId = 1;
}
Output – GetImportStatusResponse
message GetImportStatusResponse {
// Status of product import
google.protobuf.StringValue importProductStatus = 1;
// Status of product's asset import
google.protobuf.StringValue importProductAssetStatus = 2;
// Status of product's category import
google.protobuf.StringValue importProductCategoryStatus = 3;
// Status of product's related product import
google.protobuf.StringValue importProductRelatedProductStatus = 4;
}
Reference
You can review a sample code and prototype file on Github.
Updated about 1 year ago