Update Vendor Metadata

That's an excellent and clear summary of the API's purpose.

Here is a polished version with a minor typo corrected:

"This API allows you to update the attributes of an existing vendor. It allows you to update various fields, including the vendor's name, status, rank, configuration details, and associated media like images and videos."

Example Request

curl https://{base url}/rewards/core/v1/vendor/{vendor id} \
  -u sk_test_123: \
  -X PUT \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Vendor Name",
    "enabled": true,
    "type": "REWARDS",
    "rank": 5,
    "code": "VENDOR-ABC",
    "description": "This is an updated vendor description.",
    "isEncryptionRequired": true,
    "vendorTypes": [
      "LOYALTY",
      "MARKETING"
    ],
    "vendorDetails": {
      "configKey1": "configValue1",
      "configKey2": "configValue2"
    },
    "images": [
      {
        "handle": "image_handle_1"
      }
    ],
    "videos": []
  }'

Pre-requisites

  • Authentication: N/A
  • Access group resource: N/A
  • Rate limit: N/A

Body Parameters

FieldTypeRequiredDescription
namestringYesVendor name. Cannot be null or empty when present.
enabledbooleanYesVendor status. Cannot be null when explicitly set. Only one POINTS vendor can be active per organization.
typestringYesVendor type (REWARDS / POINTS). Cannot be changed after creation in case of POINTS vendors. Cannot be set to null.
rankintegerOptionalDisplay order. Can be set to null to remove ranking. When provided, must be greater than 0.
codestringOptionalVendor identifier. Can be set to null. When provided, must be unique and have a maximum of 255 characters.
descriptionstringOptionalVendor description. Can be set to null. When provided, maximum of 1034 characters.
isEncryptionRequiredbooleanOptionalEncryption flag. Cannot be null when explicitly set. When true, vendorTypes becomes mandatory.
vendorTypesarray<string>ConditionalVendor classification. Required when isEncryptionRequired is true. Can be set to null otherwise.
vendorDetailsobjectOptionalKey-value configuration. Can be set to null to mark all existing vendor details as inactive. When provided as a map (e.g., {"key1": "value1"}), keys are strings and values are strings; values are automatically encrypted. If omitted, no changes are made.
imagesarray<object>OptionalVendor images. Can be set to null to remove all images. When provided, maximum of 5 images. Internal objects (e.g., {"handle": "image_handle_1"}) require valid file handles. If omitted, existing media is preserved.
videosarray<object>OptionalVendor videos. Can be set to null to remove all videos. When provided, maximum of 2 videos. Internal objects (e.g., {"handle": "video_handle_1"}) require valid file handles. If omitted, existing media is preserved.

Example Response

{
  "status": {
    "success": true,
    "code": "VENDOR_UPDATED",
    "message": "Vendor updated successfully"
  },
  "vendor": {
    "id": 123,
    "name": "Updated Name",
    "vendorDetails": {
      "key1": "******",
      "key2": "********"
    }
  }
}

Response Parameters

FieldTypeDescription
statusobjectOverall status of the API call.
status.successbooleanIndicates if the operation was successful.
status.codestringAn application-specific code for the status.
status.messagestringA human-readable message about the status.
vendorobjectDetails of the updated vendor.
vendor.idintegerUnique identifier for the vendor.
vendor.namestringName of the vendor.
vendor.vendorDetailsobjectKey-value configuration for the vendor. Values are masked for security.
vendor.vendorDetails.key1stringMasked value for example configuration key1.
vendor.vendorDetails.key2stringMasked value for example configuration key2.

Error Codes

CodeDescription
INVALID_REQUESTBad Request. The request body or parameters are invalid or missing required fields. (e.g., Vendor name is required).
400Bad Request. General client-side error due to malformed syntax or invalid parameters.
409Conflict. Request conflicts with current state of the resource (e.g., duplicate unique code, POINTS vendor uniqueness).
500Internal Server Error. An unexpected error occurred on the server.
Language
Click Try It! to start a request and see the response here!