NexTag™ API Documentation

Welcome to the NexTag™ API. This documentation provides a guide to integrating with our systems, allowing you to manage your products and pricing programmatically.

Authentication

To use the NexTag™ API, you must include an API key in your requests. You can generate a key from your account dashboard. The key should be included in the header of your requests as X-API-Key.

// Example of an authenticated request
fetch('https://api.pricetag.id/v1/products', {
  headers: {
    'X-API-Key': 'YOUR_API_KEY_HERE'
  }
});

Get All Products

Retrieve a list of all products associated with your account. This endpoint returns a paginated list of product objects.

GET /v1/products

Response Example:

{
  "status": "success",
  "data": [
    {
      "id": "PROD-001",
      "name": "NexTag Standard Kit",
      "price": 82.07,
      "stock_quantity": 150
    },
    {
      "id": "PROD-002",
      "name": "NexTag Pro Kit",
      "price": 120.50,
      "stock_quantity": 88
    }
  ]
}

Update a Product

Update the details of a specific product by providing its ID. You can update the name, price, or any other writable field.

POST /v1/products/{product_id}

Request Body Example:

{
  "price": 99.99,
  "stock_quantity": 145
}

Delete a Product

Permanently remove a product from your account using its ID. This action cannot be undone.

DELETE /v1/products/{product_id}

Response Example (on success):

{
  "status": "success",
  "message": "Product successfully deleted."
}