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 a customer by id

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

Request

Authorization
Add parameter in header
api-key
Example:
api-key: ********************
Path Params
id
integer 
required
Example:
1
Query Params
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/customers/1?referenceDate=2024-03-13T13:28:06.419Z' \
--header 'api-key;'

Responses

🟢200Success
application/json
Body
id
integer 
optional
The unique identifier of the customer
number
string 
optional
A unique number with which the customer can be found.
name
string 
optional
The full name or business name of the customer.
discounts
array [object {6}] 
optional
All discounts applicable to the customer.
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.
general
array [object {1}] 
optional
Discounts that are always valid.
products
array [object {7}] 
optional
Discounts for specific products.
productGroups
array [object {3}] 
optional
Discounts on a group of items.
Example
{
    "id": 0,
    "number": "string",
    "name": "string",
    "discounts": [
        {
            "description": "string",
            "startDate": "2019-08-24",
            "endDate": "2019-08-24",
            "general": [
                {
                    "percentageAmount": {
                        "percentage": 0,
                        "minQuantity": 0
                    }
                }
            ],
            "products": [
                {
                    "id": 0,
                    "code": "string",
                    "name": "string",
                    "fixedPrice": {
                        "price": 0,
                        "minQuantity": 0
                    },
                    "percentageAmount": {
                        "percentage": 0,
                        "minQuantity": 0
                    },
                    "buyXGetY": {
                        "buyQuantity": 0,
                        "getQuantity": 0
                    },
                    "tieredPercentageAmount": [
                        {
                            "tier": 0,
                            "precentage": 0
                        }
                    ]
                }
            ],
            "productGroups": [
                {
                    "code": "string",
                    "description": "string",
                    "percentageAmount": {
                        "percentage": 0,
                        "minQuantity": 0
                    }
                }
            ]
        }
    ]
}
Modified at 2024-07-30 06:28:50
Previous
List all discounts for customers
Next
Get stock for products