---
updatedAt: 2025-06-04T20:05:33.000Z
agentTools:
  projectIndex: https://developers.plugg.to/llms.txt
---

# Create/Update and Delete Price Table

## Instructions

When creating a price table, our API will create a unique "ID" for that table, so you can update or delete it whenever you want.

## Request object has the following properties:

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Attribute
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        code
      </td>

      <td>
        string
      </td>

      <td>
        Price table name
      </td>
    </tr>

    <tr>
      <td>
        label
      </td>

      <td>
        string
      </td>

      <td>
        Price table information
      </td>
    </tr>

    <tr>
      <td>
        action
      </td>

      <td>
        string
      </td>

      <td>
        Type of action the table will perform

        **Values:**\
        overwrite\
        increase\
        decrease
      </td>
    </tr>
  </tbody>
</Table>

## Example of Price Table creation

```json Body raw
{
    "price_table": [
        {
            "code": "Mercado Livre",
            "action": "overwrite",
            "label": "Preço para o mercadolivre",
            "maximum_price": 0,
            "minimum_price": 0,
            "price": 150,
            "special_price": 100
        }
    ]
}
```

## Example of Price Table return

Example of return after creating the price table, see that when creating it generated an "id".

```json Return - 200 OK
{
    "price_table": [
        {
            "code": "Mercado Livre",
            "action": "overwrite",
            "maximum_price": 0,
            "minimum_price": 0,
            "price": 150,
            "special_price": 100,
            "label": "Preço para o mercadolivre",
            "percentage": null,
            "id": "60c9f2ade3f84445a74c627b"
        }
    ]
}
```

## Update Example

In this example update, I will change the price table.

I will use the **"code"** to make this price change.

```json
{
    "price_table": [
        {
            "code": "Mercado Livre",
            "price": 250,
            "special_price": 200
        }
    ]
}
```

## Example of Price Table return

```json Return - 200 OK
{
    "price_table": [
        {
            "code": "Mercado Livre",
            "action": "overwrite",
            "maximum_price": 0,
            "minimum_price": 0,
            "price": 250,
            "special_price": 200,
            "label": "Preço para o mercadolivre",
            "percentage": null,
            "id": "60c9f2ade3f84445a74c627b"
        }
    ]
}
```

## Example of creating a price table using "increase" and "decrease"

This type of action will increase or decrease the real price registered in the product outside the price table.

```json Body raw
{
    "price_table": [
        {
            "code": "Mercado Livre",
            "action": "increase/decrease",
            "percentage": 1,
            "label": "Preço para o mercadolivre",
        }
    ]
}
```

## Deleting Price Table

To delete a table price, just inform the corresponding **"code"** and send the **"remove"** with a **"true"** value.

```json Body raw
{
    "price_table": [
        {
            "code": "Mercado Livre",
            "remove": true
        }
    ]
}
```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-pluggto",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.plugg.to"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/skus/{product_sku}": {
      "put": {
        "summary": "Create/Update and Delete Price Table",
        "description": "",
        "operationId": "createupdate-and-delete-table-price",
        "parameters": [
          {
            "name": "product_sku",
            "in": "path",
            "description": "Parent product SKU  or Variation SKU",
            "schema": {
              "type": "string",
              "default": "sku"
            },
            "required": true
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer Token",
            "schema": {
              "type": "string",
              "default": "Bearer {ACESS_TOKEN}"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```