> For the complete documentation index, see [llms.txt](https://docs.samita.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samita.io/samita-wholesale-b2b/api-integration/apis-for-wholesale-pricing/wholesale-pricing-with-other-api-methods.md).

# Wholesale Pricing with other API methods

This document explains how to retrieve and delete Wholesale Pricing records using the Public API.

***

### WHOLESALE PRICING GET API

#### 1. Endpoint

To retrieve a specific Wholesale Pricing record:

```
GET https://wholesale.samita.io/api/v1/wholesale-pricings/{id}
```

* `{id}` is the ID of the Wholesale Pricing record

<figure><img src="/files/D7dXY7Tf7IxDrRgptCiq" alt=""><figcaption></figcaption></figure>

* The ID can be obtained from the app interface
* Do not include the “#” symbol when using the ID

**Example:**

```
GET https://wholesale.samita.io/api/v1/wholesale-pricings/1
```

***

#### 2. Request Headers

All GET requests must include the following required headers:

| Header              | Description                                     | Required |
| ------------------- | ----------------------------------------------- | -------- |
| `X-SAMITA-API-KEY`  | API key provided in the Wholesale app           | Yes      |
| `X-SAMITA-SHOP-URL` | Shopify shop domain in format xxx.myshopify.com | Yes      |
| `CONTENT-TYPE`      | Must be `application/json`                      | Yes      |

If any of these headers are missing, the request will be rejected.

***

#### 3. Request Body

* The GET API does **not require a request body**
* Only the `{id}` parameter in the URL is required

***

#### 4. API Response

**4.1 Error Responses**

**401 – Unauthorized**

This error occurs when authentication fails.

Possible reasons:

* Missing shop URL
* Missing API key
* Incorrect shop URL
* Incorrect API key
* API key does not match the provided shop

***

**403 – This action is unauthorized**

This error occurs when:

* The API key does not have View permission
* The provided ID does not exist
* Insufficient access rights for the API key

Each API key can be assigned the following permissions:

* View
* Create
* Update
* Delete

The GET API requires **View** permission.

***

**429 – Too Many Requests**

This error occurs when the rate limit is exceeded.

Current limits:

* Maximum **1 request per 5 minutes**
* Maximum **50 requests per day**

***

**4.2 Success Response**

**200 – API Success**

* The request is valid
* The record is successfully retrieved
* Response is returned in JSON format

Example:&#x20;

```json
{
  "id": 1,
  "title": "New Wholesale Pricing",
  "status": true,
  "apply_customer": {
    "type": "all",
    "tags": []
  },
  "exclude_customer": {
    "type": "none",
    "tags": []
  },
  "apply_product": {
    "type": "all",
    "product_ids": [],
    "product_tags": [],
    "collection_ids": [],
    "apply_for_variants": false
  },
  "exclude_product": {
    "type": "none",
    "product_ids": [],
    "collection_ids": []
  },
  "discount_for_variants": [
    {
      "id": 8516448190631,
      "variant_pricing": true,
      "variants": [
        {
          "id": 46747346763943,
          "discount_groups": [
            {
              "name": "all",
              "type": "percent",
              "value": "10"
            }
          ]
        }
      ]
    }
  ],
  "apply_market": {
    "type": "all",
    "handle": []
  },
  "discount_group": {
    "type": "percent",
    "value": "10"
  },
  "active_date": {
    "types": [],
    "start_at": "",
    "end_at": ""
  },
  "created_at": "2026-01-15T10:00:00",
  "updated_at": "2026-01-15T10:00:00"
}
```

***

## WHOLESALE PRICING DELETE API

#### 1. Endpoint

To delete an existing Wholesale Pricing record:

```
DELETE https://wholesale.samita.io/api/v1/wholesale-pricings/{id}
```

* `{id}` is the ID of the Wholesale Pricing record
* The ID must be a valid existing record ID

**Example:**

```
DELETE https://wholesale.samita.io/api/v1/wholesale-pricings/1
```

***

#### 2. Request Headers

All DELETE requests must include the following required headers:

| Header              | Description                                     | Required |
| ------------------- | ----------------------------------------------- | -------- |
| `X-SAMITA-API-KEY`  | API key provided in the Wholesale app           | Yes      |
| `X-SAMITA-SHOP-URL` | Shopify shop domain in format xxx.myshopify.com | Yes      |
| `CONTENT-TYPE`      | Must be `application/json`                      | Yes      |

***

#### 3. Request Body

* The DELETE API does **not require a request body**
* Only the `{id}` in the endpoint URL is required

***

#### 4. API Response

**4.1 Error Responses**

**401 – Unauthorized**

Returned when authentication fails.

Possible reasons:

* Missing shop URL
* Missing API key
* Incorrect shop URL
* Incorrect API key
* API key does not match the shop

***

**403 – This action is unauthorized**

This error occurs when:

* The API key does not have Delete permission
* The provided ID does not exist
* The API key does not have sufficient access rights

The DELETE API requires **Delete** permission.

***

**429 – Too Many Requests**

Returned when the request exceeds the allowed rate limit.

Rate limits:

| Limit Type        | Value                   |
| ----------------- | ----------------------- |
| Request frequency | 1 request per 5 minutes |
| Daily limit       | 50 requests per day     |

***

**4.2 Success Response**

**200 – API Success**

* The Wholesale Pricing record is successfully deleted
* No content or a confirmation message may be returned

Example:&#x20;

```json
{
  "success": true
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.samita.io/samita-wholesale-b2b/api-integration/apis-for-wholesale-pricing/wholesale-pricing-with-other-api-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
