Change Log

  • 19-Jun-2024 | v7.0.0 | All new article

Contributors:

Adam Wilson - Logo Pogo

Ecommerce Discount Codes API

Create, Retrieve, Update and Delete Ecommerce Discount Codes via the public API endpoint using "where" filtering.

GET Ecommerce Discount Codes List

Retrieves a list of Discount Codes as a JSON response based on your provided query parameters.

/api/v2/admin/discount-codes

Data / Response:

{
    "Where" : {},
    "Order_By" : "Id",
    "Offset" : 0,
    "Limit" : 100,
}
{
  "Items": [
    {
      "Id": 0,
      "Code": "string",
      "Type": "string",
      "Description": "string",
      "Currency": "string",
      "Enabled": true,
      "Amount": 0,
      "MinOrderCostLimitation": 0,
      "UseExpireAfterRedemption": true,
      "ExpireAfter": 0,
      "ReleaseDateTime": "2024-05-22T14:42:20.019Z",
      "ExpiryDateTime": "2024-05-22T14:42:20.019Z",
      "Catalogs": [
        0
      ],
      "ApplyDiscountToCatalogs": true
    }
  ],
  "TotalItemsCount": 0
}

POST Ecommerce Discount Code Create

Creates a new Discount Code based on the provided data.

/api/v2/admin/discount-codes

Data / Response:

{
  "Code": "string",
  "Type": "string",
  "Description": "string",
  "Currency": "string",
  "Enabled": true,
  "Amount": 0,
  "MinOrderCostLimitation": 0,
  "UseExpireAfterRedemption": true,
  "ExpireAfter": 0,
  "ReleaseDateTime": "2024-05-22T14:42:28.074Z",
  "ExpiryDateTime": "2024-05-22T14:42:28.074Z",
  "Catalogs": [
    0
  ],
  "ApplyDiscountToCatalogs": true
}
{
  "Id": 0,
  "Code": "string",
  "Type": "string",
  "Description": "string",
  "Currency": "string",
  "Enabled": true,
  "Amount": 0,
  "MinOrderCostLimitation": 0,
  "UseExpireAfterRedemption": true,
  "ExpireAfter": 0,
  "ReleaseDateTime": "2024-05-22T14:42:37.087Z",
  "ExpiryDateTime": "2024-05-22T14:42:37.087Z",
  "Catalogs": [
    0
  ],
  "ApplyDiscountToCatalogs": true
}

GET Ecommerce Discount Code Item

Retrieves a single Discount Code based on the ID passed in the endpoint URL.

/api/v2/admin/discount-codes/{id}

Data / Response:

N/A
{
  "Id": 0,
  "Code": "string",
  "Type": "string",
  "Description": "string",
  "Currency": "string",
  "Enabled": true,
  "Amount": 0,
  "MinOrderCostLimitation": 0,
  "UseExpireAfterRedemption": true,
  "ExpireAfter": 0,
  "ReleaseDateTime": "2024-05-22T14:42:37.087Z",
  "ExpiryDateTime": "2024-05-22T14:42:37.087Z",
  "Catalogs": [
    0
  ],
  "ApplyDiscountToCatalogs": true
}

PUT Ecommerce Discount Code Update

Updates a single Discount Code based on the ID passed in the endpoint URL and data provided.

/api/v2/admin/discount-codes/{id}

Data / Response:

{
  "Code": "string",
  "Type": "string",
  "Description": "string",
  "Currency": "string",
  "Enabled": true,
  "Amount": 0,
  "MinOrderCostLimitation": 0,
  "UseExpireAfterRedemption": true,
  "ExpireAfter": 0,
  "ReleaseDateTime": "2024-05-22T14:42:46.464Z",
  "ExpiryDateTime": "2024-05-22T14:42:46.464Z",
  "Catalogs": [
    0
  ],
  "ApplyDiscountToCatalogs": true
}
{
  "Id": 0,
  "Code": "string",
  "Type": "string",
  "Description": "string",
  "Currency": "string",
  "Enabled": true,
  "Amount": 0,
  "MinOrderCostLimitation": 0,
  "UseExpireAfterRedemption": true,
  "ExpireAfter": 0,
  "ReleaseDateTime": "2024-05-22T14:42:37.087Z",
  "ExpiryDateTime": "2024-05-22T14:42:37.087Z",
  "Catalogs": [
    0
  ],
  "ApplyDiscountToCatalogs": true
}

DELETE Ecommerce Discount Code Delete

Deletes a single Discount Code based on the ID passed in the endpoint URL.

/api/v2/admin/discount-codes/{id}

Data / Response:

N/A
Status 204