Price Lists

Price lists used to increase or decrease a product selling or purchase price by a percentage or amount

Attribute

  • currency_codestring

    Code based on currency

  • currency_idstring

    The currenct id of the currency

  • decimal_placeinteger

    Decimal place for pricebook.

  • descriptionstring

    Description about the pricebook

  • is_defaultboolean

    To check the default pricebook.Allowed values: true,false

  • is_increaseboolean

    Mark up or Mark down to discounts.Allowed values: true,false

  • namestring

    Name of the pricebook

  • percentageinteger

    About percentage of discounts

  • pricebook_idlong

    Unique ID generated by server for the price book

  • pricebook_itemsarray

    Items for the price book , Given when choosing 'per item' as 'pricebook type'

    Show Sub-Attributes

    • item_idlong

      Unique ID generated by server for Item

    • pricebook_rateinteger

      Rate of the price book for the Items

    • pricebook_item_idlong

      Unique ID generated by the server for each pricebook line item

  • pricebook_typestring

    Type of the pricebook.Allowed values: per_item,fixed_percentage

  • rounding_typestring

    Type of the rounding.Allowed values: no_rounding,round_to_dollor,round_to_dollar_minus_01,round_to_half_dollar,round_to_half_dollar_minus_01

  • sales_or_purchase_typestring

    Whether its sales or purchase type.Allowed values: sales,purchases

  • statusstring

    Status of the price book

ExampleCopy
{
    "currency_code": "string",
    "currency_id": 982000000000190,
    "decimal_place": 1,
    "description": "Flash sale",
    "is_default": true,
    "is_increase": true,
    "name": "Price List 1",
    "percentage": 4,
    "pricebook_id": 130426000002924000,
    "pricebook_items": [
        {
            "item_id": 17775000000227648,
            "pricebook_rate": 22,
            "pricebook_item_id": 17775000000227544
        }
    ],
    "pricebook_type": "fixed_percentage",
    "rounding_type": "round_to_dollar_minus_01",
    "sales_or_purchase_type": "sales",
    "status": "active"
}

Create a pricebook

create a new pricebook.

OAuth Scope : ZakyaAPI.preferences.CREATE

Arguments

  • namestring (Required)

    Name of the pricebook

  • descriptionstring

    Description about the pricebook

  • currency_idstring (Required)

    The currenct id of the currency

  • pricebook_typestring (Required)

    Type of the pricebook.Allowed values: per_item,fixed_percentage

  • is_increaseboolean (Required)

    Mark up or Mark down to discounts.Allowed values: true,false

  • rounding_typestring

    Type of the rounding.Allowed values: no_rounding,round_to_dollor,round_to_dollar_minus_01,round_to_half_dollar,round_to_half_dollar_minus_01

  • pricebook_itemsarray

    Items for the price book, Given when choosing 'per item' as 'pricebook type'

    Show Sub-Attributes

    • item_idlong

      Unique ID generated by server for Item

    • pricebook_rateinteger

      Rate of the price book for the Items

  • sales_or_purchase_typestring (Required)

    Whether its sales or purchase type. Allowed values: sales, purchases

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/pricebooks?organization_id=10234695' \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/pricebooks?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/pricebooks?organization_id=10234695")
  .post(body)
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "POST",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/pricebooks?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    "content-type": "application/json"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
    'content-type': 'application/json'
  },
  body: '{"field1":"value1","field2":"value2"}'
};

fetch('https://api.zakya.com/inventory/v1/pricebooks?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"

headers = {
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }

conn.request("POST", "/inventory/v1/pricebooks?organization_id=10234695", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Body ParametersCopy
{
    "name": "Price List 1",
    "description": "Flash sale",
    "currency_id": 982000000000190,
    "pricebook_type": "fixed_percentage",
    "is_increase": true,
    "rounding_type": "round_to_dollar_minus_01",
    "pricebook_items": [
        {
            "item_id": 17775000000227648,
            "pricebook_rate": 22
        }
    ],
    "sales_or_purchase_type": "sales"
}
Response ExampleCopy
{
    "code": 0,
    "message": "Price list has been created.",
    "pricebook": {
        "currency_code": "string",
        "currency_id": 982000000000190,
        "decimal_place": 1,
        "description": "Flash sale",
        "is_default": true,
        "is_increase": true,
        "name": "Price List 1",
        "percentage": 4,
        "pricebook_id": 130426000002924000,
        "pricebook_items": [
            {
                "item_id": 17775000000227648,
                "pricebook_rate": 22,
                "pricebook_item_id": 17775000000227544
            }
        ],
        "pricebook_type": "fixed_percentage",
        "rounding_type": "round_to_dollar_minus_01",
        "sales_or_purchase_type": "sales",
        "status": "active"
    }
}

List all pricebooks

List all the available pricebooks in your Zakya.

OAuth Scope : ZakyaAPI.preferences.READ

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/pricebooks?organization_id=10234695' \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/pricebooks?organization_id=10234695"
type: GET
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/pricebooks?organization_id=10234695")
  .get()
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "GET",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/pricebooks?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const options = {
  method: 'GET',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};

fetch('https://api.zakya.com/inventory/v1/pricebooks?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }

conn.request("GET", "/inventory/v1/pricebooks?organization_id=10234695", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "pricebooks": [
        {
            "currency_code": "string",
            "currency_id": 982000000000190,
            "decimal_place": 1,
            "description": "Flash sale",
            "is_default": true,
            "is_increase": true,
            "name": "Price List 1",
            "percentage": 4,
            "pricebook_id": 130426000002924000,
            "pricebook_items": [
                {
                    "item_id": 17775000000227648,
                    "pricebook_rate": 22,
                    "pricebook_item_id": 17775000000227544
                }
            ],
            "pricebook_type": "fixed_percentage",
            "rounding_type": "round_to_dollar_minus_01",
            "sales_or_purchase_type": "sales",
            "status": "active"
        },
        {...},
        {...}
    ]
}

Update pricebook

update existing pricebook.

OAuth Scope : ZakyaAPI.preferences.UPDATE

Arguments

  • namestring (Required)

    Name of the pricebook

  • descriptionstring

    Description about the pricebook

  • currency_idstring (Required)

    The currenct id of the currency

  • pricebook_typestring (Required)

    Type of the pricebook.Allowed values: per_item,fixed_percentage

  • is_increaseboolean (Required)

    Mark up or Mark down to discounts.Allowed values: true,false

  • rounding_typestring

    Type of the rounding.Allowed values: no_rounding, round_to_dollor, round_to_dollar_minus_01, round_to_half_dollar, round_to_half_dollar_minus_01

  • pricebook_itemsarray

    Items for the price book, Given when choosing 'per item' as 'pricebook type'

    • item_idlong

      Unique ID generated by server for Item

    • pricebook_rateinteger

      Rate of the price book for the Items

    • pricebook_item_idlong

      Unique ID generated by the server for each pricebook line item

  • sales_or_purchase_typestring (Required)

    Whether its sales or purchase type. Allowed values: sales, purchases

Request ExampleCopy
curl --request PUT \
  --url 'https://api.zakya.com/inventory/v1/pricebooks/130426000002924000?organization_id=10234695' \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/pricebooks/130426000002924000?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/pricebooks/130426000002924000?organization_id=10234695")
  .put(body)
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "PUT",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/pricebooks/130426000002924000?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    "content-type": "application/json"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
  method: 'PUT',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
    'content-type': 'application/json'
  },
  body: '{"field1":"value1","field2":"value2"}'
};

fetch('https://api.zakya.com/inventory/v1/pricebooks/130426000002924000?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"

headers = {
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }

conn.request("PUT", "/inventory/v1/pricebooks/130426000002924000?organization_id=10234695", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Body ParametersCopy
{
    "name": "Price List 1",
    "description": "Flash sale",
    "currency_id": 982000000000190,
    "pricebook_type": "fixed_percentage",
    "is_increase": true,
    "rounding_type": "round_to_dollar_minus_01",
    "pricebook_items": [
        {
            "item_id": 17775000000227648,
            "pricebook_rate": 22,
            "pricebook_item_id": 17775000000227544
        }
    ],
    "sales_or_purchase_type": "sales"
}
Response ExampleCopy
{
    "code": 0,
    "message": "Price list has been updated.",
    "pricebook": {
        "currency_code": "string",
        "currency_id": 982000000000190,
        "decimal_place": 1,
        "description": "Flash sale",
        "is_default": true,
        "is_increase": true,
        "name": "Price List 1",
        "percentage": 4,
        "pricebook_id": 130426000002924000,
        "pricebook_items": [
            {
                "item_id": 17775000000227648,
                "pricebook_rate": 22,
                "pricebook_item_id": 17775000000227544
            }
        ],
        "pricebook_type": "fixed_percentage",
        "rounding_type": "round_to_dollar_minus_01",
        "sales_or_purchase_type": "sales",
        "status": "active"
    }
}

Delete the pricebook

Delete the pricebook. 

OAuth Scope : ZakyaAPI.preferences.DELETE

Request ExampleCopy
curl --request DELETE \
  --url 'https://api.zakya.com/inventory/v1/pricebooks/130426000002924000?organization_id=10234695' \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/pricebooks/130426000002924000?organization_id=10234695"
type: DELETE
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/pricebooks/130426000002924000?organization_id=10234695")
  .delete(null)
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "DELETE",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/pricebooks/130426000002924000?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const options = {
  method: 'DELETE',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};

fetch('https://api.zakya.com/inventory/v1/pricebooks/130426000002924000?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }

conn.request("DELETE", "/inventory/v1/pricebooks/130426000002924000?organization_id=10234695", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "Price list has been deleted."
}

Mark as Active

Mark the pricebook as Active.

OAuth Scope : ZakyaAPI.preferences.CREATE

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/pricebooks/130426000002924000/active?organization_id=10234695' \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/pricebooks/130426000002924000/active?organization_id=10234695"
type: POST
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/pricebooks/130426000002924000/active?organization_id=10234695")
  .post(null)
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "POST",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/pricebooks/130426000002924000/active?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};

fetch('https://api.zakya.com/inventory/v1/pricebooks/130426000002924000/active?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }

conn.request("POST", "/inventory/v1/pricebooks/130426000002924000/active?organization_id=10234695", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "The price list has been marked active."
}

Mark as Inactive

Mark the pricebook as Inactive.

OAuth Scope : ZakyaAPI.preferences.CREATE

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/pricebooks/130426000002924000/inactive?organization_id=10234695' \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/pricebooks/130426000002924000/inactive?organization_id=10234695"
type: POST
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/pricebooks/130426000002924000/inactive?organization_id=10234695")
  .post(null)
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "POST",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/pricebooks/130426000002924000/inactive?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};

fetch('https://api.zakya.com/inventory/v1/pricebooks/130426000002924000/inactive?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }

conn.request("POST", "/inventory/v1/pricebooks/130426000002924000/inactive?organization_id=10234695", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "The price list has been marked inactive."
}