Add Product

Description

The /admin/addProduct endpoint is used to create a Product in VELA.

Request

Endpoint

/ui/v1/admin/addProduct

Method

POST
Content-Type: application/json
Authorization: $TOKEN

Note

Replace $TOKEN in the request with the base64-encoded username/password combination in the format username:password.

Given a username of username and a password of password, the request header would appear as follows:

Content-Type: application/json
Authorization: dXNlcm5hbWU6cGFzc3dvcmQ=

Request Body (Add)

{
    "id": 0,
    "productStatus": {
        "name": "ACTIVE"
    },
    "productType": {
        "name": "DEFAULT"
    },
    "productCategory": {
        "name": "INTERNAL_AND_EXTERNAL"
    },
    "costPerUnit": {
        "amount": "",
        "currency": {
            "id": 1
        }
    },
    "merchantId": 21,
    "pointOfContactEmail": "vela@vela.com",
    "paymentAction": {
        "name": "SALE"
    },
    "useThisProductAsDefault": false,
    "productCode": "COLC010",
    "productName": "Parking",
    "productDescription": "Parking",
    "createdUserId": "929"
}

Response

{
    "id": 184,
    "createdDateTime": null,
    "lastUpdatedDateTime": null,
    "lockedDateTime": null,
    "lockedByUserId": null,
    "createdUserId": 929,
    "lastModifiedUserId": null,
    "productCode": "COLC010",
    "productName": "Parking",
    "productDescription": "Parking",
    "productStatus": {
        "name": "ACTIVE"
    },
    "productType": {
        "name": "DEFAULT"
    },
    "costPerUnit": {
        "amount": null,
        "currency": {
            "id": 1,
            "currencyCode": "USD",
            "currencyText": "United States Dollar",
            "currencySymbol": "$",
            "fractionalUnit": "Cent",
            "numOfDecimalPlaces": "2",
            "supportedByVisaCheckout": true,
            "createdDateTime": 1608260908000,
            "isoNumericCode": "840",
            "isoCountryCode": "840"
        }
    },
    "validFromDateTime": null,
    "validToDateTime": null,
    "productInfoUrl": null,
    "productImageUrl": null,
    "channelId": null,
    "merchantId": 21,
    "minQuantity": null,
    "maxQuantity": null,
    "paymentAction": {
        "name": "SALE"
    },
    "pointOfContactEmail": "vela@vela.com",
    "productCategory": {
        "name": "INTERNAL_AND_EXTERNAL"
    },
    "useThisProductAsDefault": false,
    "createdUserName": null,
    "message": {
        "code": "59",
        "type": {
            "name": "SUCCESS"
        },
        "include_i_icon": false,
        "description": "PRODUCT_CREATION_SUCCESS",
        "parameters": [
            {
                "name": "PRODUCT_NAME",
                "value": "Parking"
            }
        ]
    },
    "merchantName": null,
    "sValidFromDateTime": null,
    "sValidToDateTime": null
}

Updated As Of Version 5.8.0.3