# API Test site

Volume pricing APIs

## GET /volume-pricings

> Get list volume pricings

```json
{"openapi":"3.0.3","info":{"title":"API Test site","version":"1.0.0"},"tags":[{"name":"API Test site","description":"Volume pricing APIs"}],"servers":[{"url":"https://wholesale.samita.io/api/v1"}],"paths":{"/volume-pricings":{"get":{"tags":["API Test site"],"description":"Get list volume pricings","parameters":[{"name":"query","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["decrease","ascrease"]}}],"responses":{"200":{"description":"A list of volume pricings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VolumePricing"}}}}},"401":{"description":"Unauthorized"},"403":{"description":"This action is unauthorized"},"429":{"description":"Too Many Requests"}}}}},"components":{"schemas":{"VolumePricing":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"status":{"type":"boolean","enum":[true,false]},"type":{"type":"string"},"apply_customer":{"$ref":"#/components/schemas/ApplyCustomer"},"exclude_customer":{"$ref":"#/components/schemas/ExcludeCustomer"},"apply_product":{"$ref":"#/components/schemas/ApplyProduct"},"exclude_product":{"$ref":"#/components/schemas/ExcludeProduct"},"discount_for_variants":{"type":"array","items":{"$ref":"#/components/schemas/DiscountForVariant"}},"apply_market":{"$ref":"#/components/schemas/ApplyMarket"},"discount_method":{"$ref":"#/components/schemas/DiscountMethod"},"discount_groups":{"type":"array","items":{"type":"object","properties":{"from_qty":{"type":"string","description":"Volume pricing type is quantity"},"from_amount":{"type":"string","description":"Volume pricing type is amount"},"to_qty":{"type":"string","description":"Volume pricing type is quantity"},"to_amount":{"type":"string","description":"Volume pricing type is amount"},"type":{"type":"string","enum":["percent","amount","fixed-amount"]},"value":{"type":"string"}}}},"active_date":{"$ref":"#/components/schemas/ActiveDate"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"ApplyCustomer":{"type":"object","properties":{"type":{"type":"string","enum":["all","logged","non-logged","customer-tags"]},"tags":{"type":"array","items":{"type":"string"}}}},"ExcludeCustomer":{"type":"object","properties":{"type":{"type":"string","enum":["none","customer-tags"]},"tags":{"type":"array"}}},"ApplyProduct":{"type":"object","properties":{"type":{"type":"string","enum":["all","products","collections","product-tags"]},"product_ids":{"type":"array","items":{"type":"integer","format":"int64"}},"product_tags":{"type":"array","items":{"type":"string"}},"collection_ids":{"type":"array","items":{"type":"integer","format":"int64"}},"apply_for_variants":{"type":"boolean","enum":[true,false]}}},"ExcludeProduct":{"type":"object","properties":{"type":{"type":"string","enum":["none","products","collections"]},"product_ids":{"type":"array","items":{"type":"integer","format":"int64"}},"collection_ids":{"type":"array","items":{"type":"integer","format":"int64"}}}},"DiscountForVariant":{"type":"object","required":["id","variant_pricing","variants"],"properties":{"id":{"type":"integer","format":"int64"},"duplicated":{"type":"boolean","enum":[true,false]},"variant_pricing":{"type":"boolean","enum":[true,false]},"from_qty":{"type":"string"},"from_amount":{"type":"string"},"to_qty":{"type":"string"},"to_amount":{"type":"string"},"discount_groups":{"type":"array","items":{"$ref":"#/components/schemas/DiscountGroup"}},"variants":{"type":"array","items":{"$ref":"#/components/schemas/VariantDiscount"}}}},"DiscountGroup":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["percent","amount","fixed-amount"]},"value":{"type":"string"}}},"VariantDiscount":{"type":"object","required":["id","discount_groups"],"properties":{"id":{"type":"integer","format":"int64"},"duplicated":{"type":"boolean","enum":[true,false]},"from_qty":{"type":"string","description":"Volume pricing type is quantity"},"from_amount":{"type":"string","description":"Volume pricing type is amount"},"to_qty":{"type":"string","description":"Volume pricing type is quantity"},"to_amount":{"type":"string","description":"Volume pricing type is amount"},"discount_groups":{"type":"array","items":{"$ref":"#/components/schemas/DiscountGroup"}}}},"ApplyMarket":{"type":"object","properties":{"type":{"type":"string","enum":["all","specific-market"]},"handle":{"type":"array","items":{"type":"string"}}}},"DiscountMethod":{"type":"string"},"ActiveDate":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"},"enum":["start_date","end_date"]},"start_at":{"type":"string"},"end_at":{"type":"string"}}}}}}
```

## POST /volume-pricings

> Create volume pricing

```json
{"openapi":"3.0.3","info":{"title":"API Test site","version":"1.0.0"},"tags":[{"name":"API Test site","description":"Volume pricing APIs"}],"servers":[{"url":"https://wholesale.samita.io/api/v1"}],"paths":{"/volume-pricings":{"post":{"tags":["API Test site"],"description":"Create volume pricing","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolumePricingCreate"}}}},"responses":{"200":{"description":"A volume pricing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolumePricing"}}}},"401":{"description":"Unauthorized"},"403":{"description":"This action is unauthorized"},"429":{"description":"Too Many Requests"}}}}},"components":{"schemas":{"VolumePricingCreate":{"type":"object","properties":{"title":{"type":"string"},"status":{"type":"boolean","enum":[true,false]},"type":{"type":"string"},"apply_customer":{"$ref":"#/components/schemas/ApplyCustomer"},"exclude_customer":{"$ref":"#/components/schemas/ExcludeCustomer"},"apply_product":{"$ref":"#/components/schemas/ApplyProduct"},"exclude_product":{"$ref":"#/components/schemas/ExcludeProduct"},"discount_for_variants":{"type":"array","items":{"$ref":"#/components/schemas/DiscountForVariant"}},"apply_market":{"$ref":"#/components/schemas/ApplyMarket"},"discount_method":{"$ref":"#/components/schemas/DiscountMethod"},"discount_groups":{"type":"array","items":{"type":"object","properties":{"from_qty":{"type":"string","description":"Volume pricing type is quantity"},"from_amount":{"type":"string","description":"Volume pricing type is amount"},"to_qty":{"type":"string","description":"Volume pricing type is quantity"},"to_amount":{"type":"string","description":"Volume pricing type is amount"},"type":{"type":"string","enum":["percent","amount","fixed-amount"]},"value":{"type":"string"}}}},"active_date":{"$ref":"#/components/schemas/ActiveDate"}}},"ApplyCustomer":{"type":"object","properties":{"type":{"type":"string","enum":["all","logged","non-logged","customer-tags"]},"tags":{"type":"array","items":{"type":"string"}}}},"ExcludeCustomer":{"type":"object","properties":{"type":{"type":"string","enum":["none","customer-tags"]},"tags":{"type":"array"}}},"ApplyProduct":{"type":"object","properties":{"type":{"type":"string","enum":["all","products","collections","product-tags"]},"product_ids":{"type":"array","items":{"type":"integer","format":"int64"}},"product_tags":{"type":"array","items":{"type":"string"}},"collection_ids":{"type":"array","items":{"type":"integer","format":"int64"}},"apply_for_variants":{"type":"boolean","enum":[true,false]}}},"ExcludeProduct":{"type":"object","properties":{"type":{"type":"string","enum":["none","products","collections"]},"product_ids":{"type":"array","items":{"type":"integer","format":"int64"}},"collection_ids":{"type":"array","items":{"type":"integer","format":"int64"}}}},"DiscountForVariant":{"type":"object","required":["id","variant_pricing","variants"],"properties":{"id":{"type":"integer","format":"int64"},"duplicated":{"type":"boolean","enum":[true,false]},"variant_pricing":{"type":"boolean","enum":[true,false]},"from_qty":{"type":"string"},"from_amount":{"type":"string"},"to_qty":{"type":"string"},"to_amount":{"type":"string"},"discount_groups":{"type":"array","items":{"$ref":"#/components/schemas/DiscountGroup"}},"variants":{"type":"array","items":{"$ref":"#/components/schemas/VariantDiscount"}}}},"DiscountGroup":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["percent","amount","fixed-amount"]},"value":{"type":"string"}}},"VariantDiscount":{"type":"object","required":["id","discount_groups"],"properties":{"id":{"type":"integer","format":"int64"},"duplicated":{"type":"boolean","enum":[true,false]},"from_qty":{"type":"string","description":"Volume pricing type is quantity"},"from_amount":{"type":"string","description":"Volume pricing type is amount"},"to_qty":{"type":"string","description":"Volume pricing type is quantity"},"to_amount":{"type":"string","description":"Volume pricing type is amount"},"discount_groups":{"type":"array","items":{"$ref":"#/components/schemas/DiscountGroup"}}}},"ApplyMarket":{"type":"object","properties":{"type":{"type":"string","enum":["all","specific-market"]},"handle":{"type":"array","items":{"type":"string"}}}},"DiscountMethod":{"type":"string"},"ActiveDate":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"},"enum":["start_date","end_date"]},"start_at":{"type":"string"},"end_at":{"type":"string"}}},"VolumePricing":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"status":{"type":"boolean","enum":[true,false]},"type":{"type":"string"},"apply_customer":{"$ref":"#/components/schemas/ApplyCustomer"},"exclude_customer":{"$ref":"#/components/schemas/ExcludeCustomer"},"apply_product":{"$ref":"#/components/schemas/ApplyProduct"},"exclude_product":{"$ref":"#/components/schemas/ExcludeProduct"},"discount_for_variants":{"type":"array","items":{"$ref":"#/components/schemas/DiscountForVariant"}},"apply_market":{"$ref":"#/components/schemas/ApplyMarket"},"discount_method":{"$ref":"#/components/schemas/DiscountMethod"},"discount_groups":{"type":"array","items":{"type":"object","properties":{"from_qty":{"type":"string","description":"Volume pricing type is quantity"},"from_amount":{"type":"string","description":"Volume pricing type is amount"},"to_qty":{"type":"string","description":"Volume pricing type is quantity"},"to_amount":{"type":"string","description":"Volume pricing type is amount"},"type":{"type":"string","enum":["percent","amount","fixed-amount"]},"value":{"type":"string"}}}},"active_date":{"$ref":"#/components/schemas/ActiveDate"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}}
```

## GET /volume-pricings/{id}

> Get volume pricing with ID

```json
{"openapi":"3.0.3","info":{"title":"API Test site","version":"1.0.0"},"tags":[{"name":"API Test site","description":"Volume pricing APIs"}],"servers":[{"url":"https://wholesale.samita.io/api/v1"}],"paths":{"/volume-pricings/{id}":{"get":{"tags":["API Test site"],"description":"Get volume pricing with ID","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"A volume pricing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolumePricing"}}}},"401":{"description":"Unauthorized"},"403":{"description":"This action is unauthorized"},"404":{"description":"Volume pricing not found"},"429":{"description":"Too Many Requests"}}}}},"components":{"schemas":{"VolumePricing":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"status":{"type":"boolean","enum":[true,false]},"type":{"type":"string"},"apply_customer":{"$ref":"#/components/schemas/ApplyCustomer"},"exclude_customer":{"$ref":"#/components/schemas/ExcludeCustomer"},"apply_product":{"$ref":"#/components/schemas/ApplyProduct"},"exclude_product":{"$ref":"#/components/schemas/ExcludeProduct"},"discount_for_variants":{"type":"array","items":{"$ref":"#/components/schemas/DiscountForVariant"}},"apply_market":{"$ref":"#/components/schemas/ApplyMarket"},"discount_method":{"$ref":"#/components/schemas/DiscountMethod"},"discount_groups":{"type":"array","items":{"type":"object","properties":{"from_qty":{"type":"string","description":"Volume pricing type is quantity"},"from_amount":{"type":"string","description":"Volume pricing type is amount"},"to_qty":{"type":"string","description":"Volume pricing type is quantity"},"to_amount":{"type":"string","description":"Volume pricing type is amount"},"type":{"type":"string","enum":["percent","amount","fixed-amount"]},"value":{"type":"string"}}}},"active_date":{"$ref":"#/components/schemas/ActiveDate"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"ApplyCustomer":{"type":"object","properties":{"type":{"type":"string","enum":["all","logged","non-logged","customer-tags"]},"tags":{"type":"array","items":{"type":"string"}}}},"ExcludeCustomer":{"type":"object","properties":{"type":{"type":"string","enum":["none","customer-tags"]},"tags":{"type":"array"}}},"ApplyProduct":{"type":"object","properties":{"type":{"type":"string","enum":["all","products","collections","product-tags"]},"product_ids":{"type":"array","items":{"type":"integer","format":"int64"}},"product_tags":{"type":"array","items":{"type":"string"}},"collection_ids":{"type":"array","items":{"type":"integer","format":"int64"}},"apply_for_variants":{"type":"boolean","enum":[true,false]}}},"ExcludeProduct":{"type":"object","properties":{"type":{"type":"string","enum":["none","products","collections"]},"product_ids":{"type":"array","items":{"type":"integer","format":"int64"}},"collection_ids":{"type":"array","items":{"type":"integer","format":"int64"}}}},"DiscountForVariant":{"type":"object","required":["id","variant_pricing","variants"],"properties":{"id":{"type":"integer","format":"int64"},"duplicated":{"type":"boolean","enum":[true,false]},"variant_pricing":{"type":"boolean","enum":[true,false]},"from_qty":{"type":"string"},"from_amount":{"type":"string"},"to_qty":{"type":"string"},"to_amount":{"type":"string"},"discount_groups":{"type":"array","items":{"$ref":"#/components/schemas/DiscountGroup"}},"variants":{"type":"array","items":{"$ref":"#/components/schemas/VariantDiscount"}}}},"DiscountGroup":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["percent","amount","fixed-amount"]},"value":{"type":"string"}}},"VariantDiscount":{"type":"object","required":["id","discount_groups"],"properties":{"id":{"type":"integer","format":"int64"},"duplicated":{"type":"boolean","enum":[true,false]},"from_qty":{"type":"string","description":"Volume pricing type is quantity"},"from_amount":{"type":"string","description":"Volume pricing type is amount"},"to_qty":{"type":"string","description":"Volume pricing type is quantity"},"to_amount":{"type":"string","description":"Volume pricing type is amount"},"discount_groups":{"type":"array","items":{"$ref":"#/components/schemas/DiscountGroup"}}}},"ApplyMarket":{"type":"object","properties":{"type":{"type":"string","enum":["all","specific-market"]},"handle":{"type":"array","items":{"type":"string"}}}},"DiscountMethod":{"type":"string"},"ActiveDate":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"},"enum":["start_date","end_date"]},"start_at":{"type":"string"},"end_at":{"type":"string"}}}}}}
```

## PUT /volume-pricings/{id}

> Update volume pricing

```json
{"openapi":"3.0.3","info":{"title":"API Test site","version":"1.0.0"},"tags":[{"name":"API Test site","description":"Volume pricing APIs"}],"servers":[{"url":"https://wholesale.samita.io/api/v1"}],"paths":{"/volume-pricings/{id}":{"put":{"tags":["API Test site"],"description":"Update volume pricing","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolumePricingCreate"}}}},"responses":{"200":{"description":"A volume pricing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolumePricing"}}}},"401":{"description":"Unauthorized"},"403":{"description":"This action is unauthorized"},"429":{"description":"Too Many Requests"}}}}},"components":{"schemas":{"VolumePricingCreate":{"type":"object","properties":{"title":{"type":"string"},"status":{"type":"boolean","enum":[true,false]},"type":{"type":"string"},"apply_customer":{"$ref":"#/components/schemas/ApplyCustomer"},"exclude_customer":{"$ref":"#/components/schemas/ExcludeCustomer"},"apply_product":{"$ref":"#/components/schemas/ApplyProduct"},"exclude_product":{"$ref":"#/components/schemas/ExcludeProduct"},"discount_for_variants":{"type":"array","items":{"$ref":"#/components/schemas/DiscountForVariant"}},"apply_market":{"$ref":"#/components/schemas/ApplyMarket"},"discount_method":{"$ref":"#/components/schemas/DiscountMethod"},"discount_groups":{"type":"array","items":{"type":"object","properties":{"from_qty":{"type":"string","description":"Volume pricing type is quantity"},"from_amount":{"type":"string","description":"Volume pricing type is amount"},"to_qty":{"type":"string","description":"Volume pricing type is quantity"},"to_amount":{"type":"string","description":"Volume pricing type is amount"},"type":{"type":"string","enum":["percent","amount","fixed-amount"]},"value":{"type":"string"}}}},"active_date":{"$ref":"#/components/schemas/ActiveDate"}}},"ApplyCustomer":{"type":"object","properties":{"type":{"type":"string","enum":["all","logged","non-logged","customer-tags"]},"tags":{"type":"array","items":{"type":"string"}}}},"ExcludeCustomer":{"type":"object","properties":{"type":{"type":"string","enum":["none","customer-tags"]},"tags":{"type":"array"}}},"ApplyProduct":{"type":"object","properties":{"type":{"type":"string","enum":["all","products","collections","product-tags"]},"product_ids":{"type":"array","items":{"type":"integer","format":"int64"}},"product_tags":{"type":"array","items":{"type":"string"}},"collection_ids":{"type":"array","items":{"type":"integer","format":"int64"}},"apply_for_variants":{"type":"boolean","enum":[true,false]}}},"ExcludeProduct":{"type":"object","properties":{"type":{"type":"string","enum":["none","products","collections"]},"product_ids":{"type":"array","items":{"type":"integer","format":"int64"}},"collection_ids":{"type":"array","items":{"type":"integer","format":"int64"}}}},"DiscountForVariant":{"type":"object","required":["id","variant_pricing","variants"],"properties":{"id":{"type":"integer","format":"int64"},"duplicated":{"type":"boolean","enum":[true,false]},"variant_pricing":{"type":"boolean","enum":[true,false]},"from_qty":{"type":"string"},"from_amount":{"type":"string"},"to_qty":{"type":"string"},"to_amount":{"type":"string"},"discount_groups":{"type":"array","items":{"$ref":"#/components/schemas/DiscountGroup"}},"variants":{"type":"array","items":{"$ref":"#/components/schemas/VariantDiscount"}}}},"DiscountGroup":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["percent","amount","fixed-amount"]},"value":{"type":"string"}}},"VariantDiscount":{"type":"object","required":["id","discount_groups"],"properties":{"id":{"type":"integer","format":"int64"},"duplicated":{"type":"boolean","enum":[true,false]},"from_qty":{"type":"string","description":"Volume pricing type is quantity"},"from_amount":{"type":"string","description":"Volume pricing type is amount"},"to_qty":{"type":"string","description":"Volume pricing type is quantity"},"to_amount":{"type":"string","description":"Volume pricing type is amount"},"discount_groups":{"type":"array","items":{"$ref":"#/components/schemas/DiscountGroup"}}}},"ApplyMarket":{"type":"object","properties":{"type":{"type":"string","enum":["all","specific-market"]},"handle":{"type":"array","items":{"type":"string"}}}},"DiscountMethod":{"type":"string"},"ActiveDate":{"type":"object","properties":{"types":{"type":"array","items":{"type":"string"},"enum":["start_date","end_date"]},"start_at":{"type":"string"},"end_at":{"type":"string"}}},"VolumePricing":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"status":{"type":"boolean","enum":[true,false]},"type":{"type":"string"},"apply_customer":{"$ref":"#/components/schemas/ApplyCustomer"},"exclude_customer":{"$ref":"#/components/schemas/ExcludeCustomer"},"apply_product":{"$ref":"#/components/schemas/ApplyProduct"},"exclude_product":{"$ref":"#/components/schemas/ExcludeProduct"},"discount_for_variants":{"type":"array","items":{"$ref":"#/components/schemas/DiscountForVariant"}},"apply_market":{"$ref":"#/components/schemas/ApplyMarket"},"discount_method":{"$ref":"#/components/schemas/DiscountMethod"},"discount_groups":{"type":"array","items":{"type":"object","properties":{"from_qty":{"type":"string","description":"Volume pricing type is quantity"},"from_amount":{"type":"string","description":"Volume pricing type is amount"},"to_qty":{"type":"string","description":"Volume pricing type is quantity"},"to_amount":{"type":"string","description":"Volume pricing type is amount"},"type":{"type":"string","enum":["percent","amount","fixed-amount"]},"value":{"type":"string"}}}},"active_date":{"$ref":"#/components/schemas/ActiveDate"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}}
```

## DELETE /volume-pricings/{ids}

> Delete volume pricing by IDs

```json
{"openapi":"3.0.3","info":{"title":"API Test site","version":"1.0.0"},"tags":[{"name":"API Test site","description":"Volume pricing APIs"}],"servers":[{"url":"https://wholesale.samita.io/api/v1"}],"paths":{"/volume-pricings/{ids}":{"delete":{"tags":["API Test site"],"description":"Delete volume pricing by IDs","parameters":[{"name":"ids","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Delete volume pricings","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"This action is unauthorized"},"404":{"description":"Volume pricing not found"},"429":{"description":"Too Many Requests"}}}}}}
```
