TPW Developer Platform

Overview


This API allows you to process data and update user credits based on specific parameters. It performs calculations and returns the results along with the updated credit information.

Steps to Use


1
Set up your environment by including the necessary API dependencies.
2
Write your API request using the specified endpoint and parameters.
3
Send the API request and handle the response data accordingly.

Endpoint


POST /getItem

Request


Headers

Body Parameters

Example Request

{
    "projectCode": "tpw-api",
    "product": "1",
    "type": "TEC164",
    "key": "jasmin green fresh",
    "limit": "20",
    "quantity": 100
}

Example Usage


Use response access token from Authentication Token API

curl --location "https://www.perfumersworld.com/genFormula/getItem" \
            --header "Content-Type: application/json" \
            --header "Authorization: Bearer <access_token>" \
            --data "{
            \"projectCode\": \"tpw-api\",
            \"product\": \"1\",
            \"type\": \"TEC164\",
            \"key\": \"jasmin green fresh\",
            \"limit\": \"20\",
            \"quantity\": 100
            }"

How to Run This Shell Script on Linux or MacOS:


Download shell script linux
  1. Open a terminal.
  2. Navigate to the directory where the script is located using the cd /path/to/your/directory command.
  3. Open the shell script for replace the access_token with your token.
  4. Make the script executable by running the command: chmod +x run_curl.sh
  5. Execute the script by running the command: ./run_curl.sh

Video Demo


How to Run This Batch File on Windows:


Download batch file windows
  1. Open Command Prompt.
  2. Navigate to the directory where the batch file is located using the cd /path/to/your/directory command.
  3. Open the batch file for replace the access_token with your token.
  4. Execute the batch file by running the command: run_curl.bat

Video Demo


Response


Success Response

{
    "responseDate": "12-01-2025 20:16:10",
    "statusCode": "000",
    "credit": "956",
    "message": {
        "data": [
            {
                "name": "JASMINE PETAL F-TEC ",
                "sku": "6JJ18250",
                "family": "J",
                "abcs": "Jl",
                "price": "0.12",
                "qtn": "34.65",
                "impact": "100",
                "limitFra": "50",
                "DoseFraMax": "50",
                "life": "91.2",
                "ClassA": 5,
                "ClassB": 0,
                "ClassC": 2,
                "ClassD": 0,
                "ClassE": 0,
                "ClassF": 7,
                "ClassG": 4,
                "ClassH": 6,
                "ClassI": 0,
                "ClassJ": 36,
                "ClassK": 0,
                "ClassL": 22,
                "ClassM": 0,
                "ClassN": 6,
                "ClassO": 7,
                "ClassP": 0,
                "ClassQ": 0,
                "ClassR": 0,
                "ClassS": 1,
                "ClassT": 0,
                "ClassU": 2,
                "ClassV": 0,
                "ClassW": 0,
                "ClassX": 0,
                "ClassY": 0,
                "ClassZ": 1
            },
            {
                "name": "JASMIN FRUIT F-TEC ",
                "sku": "6JL18251",
                "family": "J",
                "abcs": "Jf",
                "price": "0.12",
                "qtn": "27.31",
                "impact": "120",
                "limitFra": "25",
                "DoseFraMax": "25",
                "life": "50",
                "ClassA": 0,
                "ClassB": 0,
                "ClassC": 0,
                "ClassD": 0,
                "ClassE": 0,
                "ClassF": 15,
                "ClassG": 0,
                "ClassH": 0,
                "ClassI": 0,
                "ClassJ": 80,
                "ClassK": 0,
                "ClassL": 0,
                "ClassM": 0,
                "ClassN": 5,
                "ClassO": 0,
                "ClassP": 0,
                "ClassQ": 0,
                "ClassR": 0,
                "ClassS": 0,
                "ClassT": 0,
                "ClassU": 0,
                "ClassV": 0,
                "ClassW": 0,
                "ClassX": 0,
                "ClassY": 0,
                "ClassZ": 0
            },
            {
                "name": "JASMIN ABS F-TEC ",
                "sku": "6JN19189",
                "family": "J",
                "abcs": "Jn",
                "price": "0.15",
                "qtn": "16.85",
                "impact": "100",
                "limitFra": "50",
                "DoseFraMax": "50",
                "life": "45",
                "ClassA": 0,
                "ClassB": 0,
                "ClassC": 0,
                "ClassD": 0,
                "ClassE": 0,
                "ClassF": 0,
                "ClassG": 0,
                "ClassH": 0,
                "ClassI": 0,
                "ClassJ": 60,
                "ClassK": 0,
                "ClassL": 0,
                "ClassM": 0,
                "ClassN": 40,
                "ClassO": 0,
                "ClassP": 0,
                "ClassQ": 0,
                "ClassR": 0,
                "ClassS": 0,
                "ClassT": 0,
                "ClassU": 0,
                "ClassV": 0,
                "ClassW": 0,
                "ClassX": 0,
                "ClassY": 0,
                "ClassZ": 0
            },
            {
                "name": "GREEN TEA F-TEC",
                "sku": "6EG18166",
                "family": "E",
                "abcs": "Lg",
                "price": "0.25",
                "qtn": "12.99",
                "impact": "100",
                "limitFra": "50",
                "DoseFraMax": "50",
                "life": "8.9",
                "ClassA": 0,
                "ClassB": 0,
                "ClassC": 1,
                "ClassD": 0,
                "ClassE": 1,
                "ClassF": 1,
                "ClassG": 9,
                "ClassH": 3,
                "ClassI": 0,
                "ClassJ": 7,
                "ClassK": 0,
                "ClassL": 10,
                "ClassM": 0,
                "ClassN": 0,
                "ClassO": 3,
                "ClassP": 0,
                "ClassQ": 0,
                "ClassR": 3,
                "ClassS": 8,
                "ClassT": 0,
                "ClassU": 0,
                "ClassV": 0,
                "ClassW": 0,
                "ClassX": 1,
                "ClassY": 0,
                "ClassZ": 53
            },
            {
                "name": "G-GREEN F-TEC ",
                "sku": "6GG18012",
                "family": "G",
                "abcs": "Gz",
                "price": "0.18",
                "qtn": "8.19",
                "impact": "150",
                "limitFra": "50",
                "DoseFraMax": "50",
                "life": "181.6",
                "ClassA": 0,
                "ClassB": 1,
                "ClassC": 0,
                "ClassD": 0,
                "ClassE": 0,
                "ClassF": 1,
                "ClassG": 86,
                "ClassH": 1,
                "ClassI": 1,
                "ClassJ": 0,
                "ClassK": 0,
                "ClassL": 1,
                "ClassM": 2,
                "ClassN": 0,
                "ClassO": 0,
                "ClassP": 0,
                "ClassQ": 0,
                "ClassR": 0,
                "ClassS": 0,
                "ClassT": 0,
                "ClassU": 0,
                "ClassV": 0,
                "ClassW": 2,
                "ClassX": 0,
                "ClassY": 0,
                "ClassZ": 5
            }
        ],
        "total": 100
    }
}

Error Response

{
    "error": "Error updating record: <error_message>"
}
{
    "responseDate": "04-01-2025 16:20:15",
    "statusCode": "A002",
    "message": "Token keyword is not match or missing"
}
{
    "responseDate": "04-01-2025 16:22:33",
    "statusCode": "E002",
    "message": "Empty Request body or IS_REQUIRE(Information)"
}