Create a Vendor

A vendor is an external third-party brand that you can use to fulfil your rewards. This API allows you to define vendor details, add images and videos, and display them in your reward catalogue.

👍

Note

For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call .

Prerequisites

  • Authentication: Basic/OAuth authentication
  • Default access group

Resource information

URI/api_gateway/rewards/core/v1/vendor/create
HTTP methodPOST
PaginationNA
Rate limitNA
Batch supportNA

API endpoint example

https://eu.api.capillarytech.com/api_gateway/rewards/core/v1/vendor/create

curl --location 'https://eu.api.capillarytech.com/api_gateway/rewards/core/v1/vendor/create' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Z2VvcmdlLmpvaG5zb246OTg4OTU2NWI4ODVhMmY4ZWE1MTk1MjA2NWEwYTEzNzg=' \
--header 'Cookie: _cfuvid=Py8WqEd9NprkMUBFFM4pQWQmNSGjgEDnhOp1DoQoMYw-1739777165991-0.0.1.1-604800000; _cfuvid=hGW.4aR53plH6yD91V3qiTbpaQWs45tjwDu8W8WQ7Vk-1741007297422-0.0.1.1-604800000; _cfuvid=S.PxCyUf9ekxOmHL60DVO0Ymatc.u9ycHzTlvzKnNWU-1749708111484-0.0.1.1-604800000' \
--data-raw '{
 "name": "vendor002",
 "code": "vendor002",
 "brandId": 61,
 "enabled": true,
  "type" : "REWARDS",
  "isEncryptionRequired" : false, 
  "vendorDetails" : {
    "key" : "client", 
    "value": "[email protected]"
  }


}'

Request body

{
 "name": "vendor002",
 "code": "vendor002",
 "brandId": 61,
 "enabled": true,
  "type" : "REWARDS",
  "isEncryptionRequired" : false, 
  "vendorDetails" : {
    "key" : "client", 
    "value": "[email protected]"
  }


}
{
    "name": "DocVendor2",
    "code": "Doc002",
    "brandId": 61,
    "type": "REWARDS",
    "images": [
        {
            "name": "imageName001",
            "altText": null,
            "id": "Img1",
            "isExternal": false
        }
    ],
    "videos": [
        {
            "name": "videoName001",
            "altText": null,
            "id": "Vid1",
            "isExternal": false
        }
     ],
    "rank": 1,
    "description": "The top priority vendor"
}
{
    "name": "DocVendor3",
    "code": "Doc003",
    "brandId": 61,
    "type": "REWARDS",
    "images": [
        {
            "name": "imageName001",
            "altText": null,
            "url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS6RFSqYEgenJSDc0Wo_eoEKzxd0iXvTOO-LQ&s",
            "isExternal": true
        }
    ],
    "videos": [
        {
            "name": "videoName001",
            "altText": null,
            "url": "https://videos.pexels.com/video-files/6265096/6265096-uhd_1440_2560_30fps.mp4",
            "isExternal": true
        }
    ],
    "rank": 1,
    "description": "The top priority vendor"
}

Request body parameters

Parameter (Parameters marked with * are mandatory)Data TypeDescription
name*StringA unique name for the vendor, with a maximum character limit of 255.
codeStringA unique identification code for the vendor. If null or not provided, a random, unique code is assigned. The maximum character limit is 255.
brandId*IntegerThe unique brand ID of the organization. This value must be greater than 0.
type*EnumThe type of vendor. Supported value: REWARDS.
imagesObjectAn object containing details of images associated with the vendor. You can add up to 5 images, and any image format is supported.
- name*StringA unique name identifier for the image.
- altTextStringA descriptive text that conveys the meaning and context of the image.
- idStringA unique ID generated when an image is created, which is the file_handle for the associated image in the Capillary system. This parameter is required if isExternal is false. To add an image to the file service location, raise a ticket to the support team.
- urlStringA direct link to the image. This parameter is required if isExternal is true.
- isExternalBooleanIndicates if the image is from an external source.
videosObjectAn object containing details of videos associated with the vendor. You can add up to 2 videos.
- name*StringA unique name identifier for the video.
- altTextStringA descriptive text that conveys the meaning and context of the video.
- idStringA unique ID generated when a video is created, which is the file_handle for the associated video in the Capillary system. This parameter is required if isExternal is false. To add a video to the file service location, raise a ticket to the support team. Any video format is supported.
- urlStringA direct link to the video. This parameter is required if isExternal is true.
- isExternalBooleanIndicates if the video is from an external source.
rankIntegerAssign a rank to the vendor. This can be used for ordering and prioritizing. This value must be greater than 0.
descriptionStringA description for the vendor, with a maximum character limit of 1034.
vendorDetailsObjectAn object containing key-value pairs for additional vendor-specific details.
vendorDetails.keyStringThe key for the vendor detail, which can represent various attributes (e.g., "client").
vendorDetails.valueStringThe value associated with the key in vendorDetails, providing specific information (e.g., email).

Response body

{
    "status": {
        "success": true,
        "code": 5002,
        "message": "Vendor created successfully"
    },
    "vendor": {
        "id": 145,
        "name": "vendorRedemptionCrete",
        "brandId": 61,
        "enabled": true,
        "isEncryptionRequired": false,
        "vendorTypes": null,
        "vendorDetails": null,
        "type": "REWARDS",
        "createdBy": 75161973,
        "lastUpdatedBy": 75161973,
        "createdOn": 1748350401000,
        "lastUpdatedOn": 1748350401000,
        "createdOnDateTime": "2025-05-27T12:53:21Z",
        "lastUpdatedOnDateTime": "2025-05-27T12:53:21Z",
        "rank": 20,
        "code": "17447980",
        "description": "test description for test_Rewards_createAndGetVendorsWithMediaAndAdditionalMeta",
        "images": [],
        "videos": [],
        "encryptionRequired": false
    }
}
{
  "status": {
    "success": false,
    "code": 400,
    "message": "Cannot deserialize value of type com.capillary.solutions.rewards.domain.Type from String \"REWARD\": value not one of declared Enum instance names: [POINTS, REWARDS]"
  }
}
{
  "status": {
    "success": false,
    "code": 400,
    "message": "rank must be greater than zero"
  }
}
{
    "status": {
        "success": false,
        "code": 3004,
        "message": "Brand not found"
    }
}
{
    "status": {
        "success": false,
        "code": 5007,
        "message": "Vendor already exists"
    },
    "vendor": null
}

Response parameters

ParameterDescription
statusObject containing details about the status of the request.
- successIndicates whether the request was successful. true: Request was successful. false: Request was unsuccessful.
- codeThe status code of the request.
- messageThe status message of the request.
vendorObject containing details on the vendor that is created.
- idThe unique ID generated for the vendor upon successful creation.
- nameThe unique name of the vendor.
- brandIdThe unique brand ID of the organization.
- enabledIndicates if the vendor is currently enabled or disabled. true: Vendor is enabled. false: Vendor is disabled.
- isEncryptionRequiredIndicates if the vendor requires encryption. true: Vendor requires encryption. false: Vendor does not require encryption.
- vendorTypesThe type of vendor. These are specialized vendor types for which Capillary has implemented customized solutions to handle reward issuance. Supported types: LINKAJA/AIRSPRING/OVO/BONUSLINK.
- vendorDetailsAn object containing additional details on the vendor, if any.
- typeThe type of vendor. Possible value: REWARDS.
- rankThe rank assigned to the vendor. This can be used for ordering and prioritizing.
- codeThe unique identification code of the vendor.
- descriptionThe description for the vendor.
- imagesAn object containing details on the images for the vendor, if any.
- videosAn object containing details on the videos for the vendor, if any.
- encryptionRequiredIndicates if encryption is required for transactions with the vendor. true: Vendor requires encryption. false: Vendor does not require encryption.
lastUpdatedOnIndicates the timestamp when the vendor redemption was updated. The timestamp is in Epoch time format.
lastUpdatedByThe till ID of the user who last updated the vendor redemption record.
createdByThe till ID of the user who created the vendor redemption.
createdOnIndicates the timestamp when the vendor redemption was created. The timestamp is in Epoch time format.
createdOnDateTimeIndicates the date and time when the vendor redemption was created, formatted in ISO 8601.
lastUpdatedOnDateTimeIndicates the date and time when the vendor redemption was updated, formatted in ISO 8601.

API error codes

CodeDescriptionReason
5007Vendor already existsVendor with the same name already exists.
3004Brand not foundbrandId provided is invalid.
400Cannot deserialize value of type com.capillary.solutions.rewards.domain.Type from String "REWARD": value not one of declared Enum instance names: [POINTS, REWARDS]type is invalid.
400rank must be greater than zeroValue for rank provided is 0.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!