LogicTrade API
  1. Discount
LogicTrade API
  • Authentication
  • Pagination
  • Rate limits
  • Error codes
  • Changelog
  • Configuration Service
  • Endpoints
    • Authentication
      • Introspection
    • Customer
      • List all customers
      • Retrieve a customer by id
      • Create a customer
      • Update a customer
      • Remove the customer
    • Supplier
      • List all suppliers
      • Retrieve a supplier by id
      • Create a supplier
      • Update a supplier
      • Remove the supplier
    • Product
      • Product
        • List all products
        • Retrieve a product by id
        • Create a product
        • Remove the products
        • Update a product
        • Search products
      • Groups
        • List all product groups
      • Discount
        • List all discounts for products
          GET
        • Get all discounts for product by id
          GET
        • List all discounts for customers
          GET
        • Get all discounts for a customer by id
          GET
      • Stock
        • Get stock for products
        • Search stock for products
      • Prices
        • Get product prices
      • Descriptions
        • Get the descriptions for a product
      • References
        • Get the product references
      • Compositions
        • Get product compositions
    • Quote
      • List all quotes
      • Retrieve a quote by id
      • Create a quote
      • Update a quote
    • Sales order
      • List all orders
      • Retrieve an orders by id
      • Create an order
      • Update an order
    • Invoice
      • List all invoices
      • Retrieve a invoice by id
      • Create a invoice
      • Update a invoice
    • Delivery
      • Get list of orders that can be delivered
      • Update the order with delivery information
    • Purchase order
      • List all purchase orders
      • Retrieve a purchase orders by id
      • Create a purchase order
      • Update a purchase order
  1. Discount

Get all discounts for product by id

GET
/rest/v1/discounts/products/{id}

Request

Authorization
Add parameter in header
api-key
Example:
api-key: ********************
Path Params
id
integer 
required
Example:
1
Query Params
configuration
integer 
optional
The id of the configuration. (ConfigurationHeaderId)
quantity
number 
optional
The amount which is used to determine the price. (default = 1)
Example:
3
referenceDate
string 
optional
This date is used when calculating the price. (default = current date)
Example:
2024-03-13T13:28:06.419Z

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.logictrade.cloud/rest/v1/discounts/products/1?configuration=&quantity=3&referenceDate=2024-03-13T13:28:06.419Z' \
--header 'api-key;'

Responses

🟢200Success
application/json
Body
id
integer 
optional
The unique identifier of the product.
code
string 
optional
The unique code with which the product can be found.
name
string 
optional
The name of the product.
discounts
array [object {8}] 
optional
description
string 
optional
The description of the discount.
startDate
string <date>
optional
The start date of the discount.
endDate
string <date>
optional
The end date of the discount.
fixedPrice
object 
optional
A discount with a fixed price.
percentageAmount
object 
optional
The discount based on a percentage
buyXGetY
object 
optional
"Pay X, get Y price agreement.
tieredPercentageAmount
array [object {2}] 
optional
Discount based on the amount
customFields
array [object {2}] 
optional
The custom fields.
Example
{
    "id": 0,
    "code": "string",
    "name": "string",
    "discounts": [
        {
            "description": "string",
            "startDate": "2019-08-24",
            "endDate": "2019-08-24",
            "fixedPrice": {
                "price": 0,
                "minQuantity": 0
            },
            "percentageAmount": {
                "percentage": 0,
                "minQuantity": 0
            },
            "buyXGetY": {
                "buyQuantity": 0,
                "getQuantity": 0
            },
            "tieredPercentageAmount": [
                {
                    "tier": 0,
                    "precentage": 0
                }
            ],
            "customFields": [
                {
                    "name": "string",
                    "values": [
                        "string"
                    ]
                }
            ]
        }
    ]
}
Modified at 2024-07-30 06:28:38
Previous
List all discounts for products
Next
List all discounts for customers