_productSourceTagsImport
Documentation: _productSourceTagsImport
Function
_productSourceTagsImport
function is designed to import a batch of product source tag data into the Shopranos platform. It handles authentication, sends a POST request with the product source tag data to the Shopranos API, and processes the response and potential errors. The function returns a structured result indicating the outcome of the import operation.Function Signature:
Parameters:
payload
(Array of product source tags):Array<Object>
Return Value:
StatusCode
: The HTTP status code of the response from the Shopranos platform.Content
: The content of the response body from the Shopranos platform, typically containing success or error messages.Object
Function Workflow:
1.
2.
3.
Authorization
header with the Bearer token and x-companyid
header with the company ID from the certificate.payload
is converted to a JSON string and sent in the request body.4.
StatusCode
and Content
from the response.5.
StatusCode
set to "EXCEPTION" and the exception message as the Content
.Example Usage:
Important Considerations:
payload
parameter must be an array of product source tag objects formatted according to the Shopranos API requirements._productSourceTagsImport
, you can automate the import of product source tag data into the Shopranos platform, ensuring that the data is sent securely and that any issues are handled and reported appropriately.