younifyd
Menu

Upload Photo

Upload a photo

POST/data/uploadphoto.json

Use it in a workflow

  1. Add a step and choose the Bazaarvoice connector.
  2. Pick the Upload Photo action (under submission).
  3. Fill in the fields below, then reference the result from later steps as {{uploadPhoto.response.data}}.

Request

Query parameters

ApiVersionstringrequired

The API version, e.g. 5.4.

contentTypestringrequired

The content type for which this media is being submitted. Valid values include review, question or answer.

PassKeystringrequired

API key is required to authenticate API user and check permission to access particular client's data.

Headers

Content-Typestringrequired

The media-type type of the request body. Value must be application/x-www-form-urlencoded. Required This field is required in all API requests.

Request body

Enter the body as JSON in the step's Body field.

Localestring

Locale to display Labels, Configuration, Product Attributes and Category Attributes in. The default value is the locale defined in the display associated with the API key.

Photostring

A file representing the photo to be submitted. Note that the parameter name is case-sensitive and must be lowercase. Use either the photo or photoUrl parameter to define the photo to upload. An error is returned if both parameters are defined.

PhotoUrlstring

URL of the photo to be uploaded. Use either the photo or photoUrl parameter to define the photo to upload. An error is returned if both parameters are defined. HTTP and HTTPS are the only protocols supported for the photoUrl parameter.

Userstring

Value of the encrypted user. This parameter demonstrates that a user has been authenticated. Note that the UserId parameter does not contain authentication information and should not be used for hosted authentication.

UserIdstring

User's external ID. This value should come from your authentication system

json
{
  "Locale": "en_US",
  "Photo": "-F 'Photo=@/path/to/your_image.jpg'",
  "PhotoUrl": "https://upload.wikimedia.org/wikipedia/commons/b/ba/Flower_jtca001.jpg",
  "User": "4d8f70f72a69b170556ecd0cbec0ee1e646174653d3230323330393132267573657269643d746573743126757365726e616d653d736b616872266d61786167653d3439",
  "UserId": "testi2"
}

Response

Returns 200 with an object. Read it in later steps with {{uploadPhoto.response.data.<field>}}.

Dataobject

Additional data associated with the response. This can be an empty object or may contain specific data as needed.

HasErrorsboolean

Indicates whether there are any errors in the response.

Formarray<object>

An array of form data. This can be an empty array or may contain specific data as needed.

AuthorSubmissionTokenstring

The author submission token, if applicable.

FormErrorsobject

Errors related to the form submission, if any.

TypicalHoursToPostobject

The typical number of hours it takes for a photo submission to be processed.

SubmissionIdstring

The ID associated with the photo submission, if applicable.

Localestring

The locale of the photo submission.

Errorsarray<object>

An array of errors, if any. This can be an empty array or may contain specific error objects as needed.

Photoobject
Captionstring

The caption associated with the photo, if provided.

Sizesobject2 fields

An object containing different photo sizes and their corresponding URLs and IDs.

SizesOrderarray<string>

An array specifying the order of different photo sizes.

Idstring

The ID of the uploaded photo.

json
{
  "Data": {},
  "HasErrors": false,
  "Form": [
    {}
  ],
  "AuthorSubmissionToken": "string",
  "FormErrors": {},
  "TypicalHoursToPost": {},
  "SubmissionId": "string",
  "Locale": "string",
  "Errors": [
    {}
  ],
  "Photo": {
    "Caption": "string",
    "Sizes": {
      "thumbnail": {
        "Url": "string",
        "Id": "string"
      },
      "normal": {
        "Url": "string",
        "Id": "string"
      }
    },
    "SizesOrder": [
      "string"
    ],
    "Id": "string"
  }
}

Need more? See the Bazaarvoice guide for connection setup and behaviour shared by every action.

Was this page helpful?