---
updatedAt: 2025-06-16T23:24:44.000Z
agentTools:
  projectIndex: https://developers.directscale.com/llms.txt
---

# /api/extension/hooks/Orders.ProcessCouponCodes

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Extension Hooks",
    "version": "extensionHooks"
  },
  "servers": [
    {
      "url": "https://{clientId}.corpadmin.directscalestage.com",
      "variables": {
        "clientId": {
          "default": "clientId"
        }
      }
    }
  ],
  "paths": {
    "/api/extension/hooks/Orders.ProcessCouponCodes": {
      "post": {
        "tags": [
          "OrdersHooksCallback"
        ],
        "operationId": "OrdersHooksCallback_ProcessCouponCodes",
        "parameters": [
          {
            "name": "X-DirectScale-CallbackToken",
            "in": "header",
            "description": "One-time use token. This value is sent to the endpoint configured for the hook.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-DirectScale-User",
            "in": "header",
            "description": "Sets the User Context of the request when a username is provided",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DirectScale.Disco.Extension.Hooks.Orders.ProcessCouponCodesHookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DirectScale.Disco.Extension.Hooks.Orders.ProcessCouponCodesHookResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Extension_Token": []
          }
        ],
        "x-codegen-request-body-name": "request"
      }
    }
  },
  "components": {
    "schemas": {
      "DirectScale.Disco.Extension.CustomFields": {
        "type": "object",
        "properties": {
          "Field1": {
            "type": "string"
          },
          "Field2": {
            "type": "string"
          },
          "Field3": {
            "type": "string"
          },
          "Field4": {
            "type": "string"
          },
          "Field5": {
            "type": "string"
          }
        }
      },
      "DirectScale.Disco.Extension.LineItem": {
        "type": "object",
        "properties": {
          "ItemId": {
            "type": "integer",
            "format": "int32"
          },
          "Quantity": {
            "type": "number",
            "format": "double"
          },
          "Cost": {
            "type": "number",
            "format": "double"
          },
          "Disabled": {
            "type": "boolean"
          },
          "ExtendedPrice": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "ExtendedOriginalPrice": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "ExtendedBonus": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "ExtendedCV": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "ExtendedQV": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "ExtendedRewardPoints": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "ExtendedCost": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "ProductName": {
            "type": "string"
          },
          "Description": {
            "type": "string"
          },
          "Specifications": {
            "type": "string"
          },
          "LanguageCode": {
            "type": "string"
          },
          "SKU": {
            "type": "string"
          },
          "Category": {
            "$ref": "#/components/schemas/DirectScale.Disco.Extension.Category"
          },
          "ChargeShipping": {
            "type": "boolean"
          },
          "Height": {
            "type": "number",
            "format": "double"
          },
          "Image": {
            "type": "string"
          },
          "Length": {
            "type": "number",
            "format": "double"
          },
          "LengthUOM": {
            "type": "string"
          },
          "MPN": {
            "type": "string"
          },
          "PackCount": {
            "type": "number",
            "format": "double"
          },
          "PackageGroupId": {
            "type": "integer",
            "format": "int32"
          },
          "TaxClassId": {
            "type": "integer",
            "format": "int32"
          },
          "UnitOfMeasure": {
            "type": "string"
          },
          "UPC": {
            "type": "string"
          },
          "Weight": {
            "type": "number",
            "format": "double"
          },
          "WeightUOM": {
            "type": "string"
          },
          "Width": {
            "type": "number",
            "format": "double"
          },
          "FlagBirthDefects": {
            "type": "boolean"
          },
          "HasKitGroups": {
            "type": "boolean"
          },
          "FlagCancer": {
            "type": "boolean"
          },
          "PriceGroup": {
            "type": "integer",
            "format": "int32"
          },
          "Custom": {
            "$ref": "#/components/schemas/DirectScale.Disco.Extension.CustomFields"
          },
          "Images": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.ItemImage"
            }
          },
          "Prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.LineItemPrice"
            }
          },
          "Options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.LineItemOption"
            }
          },
          "ItemOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.ItemOption"
            }
          },
          "Languages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.LanguageMap"
            }
          },
          "OptionsMap": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.ItemOptionKeyMap"
            }
          },
          "HasOptions": {
            "type": "boolean",
            "readOnly": true
          },
          "Price": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "PriceCurrency": {
            "type": "string",
            "readOnly": true
          },
          "OriginalPrice": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "Bonus": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "CV": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "QV": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "RewardPoints": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "CouponsBeingUsed": {
            "type": "integer",
            "format": "int32"
          },
          "OutOfStockStatus": {
            "type": "integer",
            "format": "int32"
          },
          "PriceGroups": {
            "type": "array",
            "readOnly": true,
            "items": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      },
      "DirectScale.Disco.Extension.Category": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int32"
          },
          "Name": {
            "type": "string"
          },
          "CategoryTranslations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.CategoryTranslation"
            }
          },
          "Description": {
            "type": "string"
          },
          "DisplayIndex": {
            "type": "number",
            "format": "double"
          },
          "ImageUrl": {
            "type": "string"
          },
          "ParentId": {
            "type": "integer",
            "format": "int32"
          },
          "ProductLineId": {
            "type": "integer",
            "format": "int32"
          },
          "ShortDescription": {
            "type": "string"
          },
          "StoreIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "HasChildren": {
            "type": "boolean"
          }
        }
      },
      "DirectScale.Disco.Extension.ItemImage": {
        "type": "object",
        "properties": {
          "Description": {
            "type": "string"
          },
          "Path": {
            "type": "string"
          }
        }
      },
      "DirectScale.Disco.Extension.LineItemPrice": {
        "type": "object",
        "properties": {
          "GroupId": {
            "type": "integer",
            "format": "int32"
          },
          "Price": {
            "type": "number",
            "format": "double"
          },
          "PriceCurrency": {
            "type": "string"
          },
          "OriginalPrice": {
            "type": "number",
            "format": "double"
          },
          "Bonus": {
            "type": "number",
            "format": "double"
          },
          "CV": {
            "type": "number",
            "format": "double"
          },
          "QV": {
            "type": "number",
            "format": "double"
          },
          "RewardPoints": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "DirectScale.Disco.Extension.LineItemOption": {
        "type": "object",
        "properties": {
          "OptionId": {
            "type": "integer",
            "format": "int32"
          },
          "Option": {
            "type": "string"
          }
        }
      },
      "DirectScale.Disco.Extension.ItemOption": {
        "type": "object",
        "properties": {
          "OptionId": {
            "type": "integer",
            "format": "int32"
          },
          "Option": {
            "type": "string"
          },
          "OptionType": {
            "type": "integer",
            "format": "int32"
          },
          "Values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.ItemOptionValues"
            }
          }
        }
      },
      "DirectScale.Disco.Extension.LanguageMap": {
        "type": "object",
        "properties": {
          "Description": {
            "type": "string"
          },
          "LanguageCode": {
            "type": "string"
          },
          "ProductName": {
            "type": "string"
          },
          "SEOKeywords": {
            "type": "string"
          },
          "Specifications": {
            "type": "string"
          }
        }
      },
      "DirectScale.Disco.Extension.ItemOptionKeyMap": {
        "type": "object",
        "properties": {
          "Key": {
            "type": "string"
          },
          "Checked": {
            "type": "boolean"
          },
          "ItemId": {
            "type": "integer",
            "format": "int32"
          },
          "Image": {
            "type": "string"
          },
          "ExtSku": {
            "type": "string"
          }
        }
      },
      "DirectScale.Disco.Extension.CategoryTranslation": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int32"
          },
          "CategoryId": {
            "type": "integer",
            "format": "int32"
          },
          "Description": {
            "type": "string"
          },
          "Name": {
            "type": "string"
          },
          "LanguageCode": {
            "type": "string"
          }
        }
      },
      "DirectScale.Disco.Extension.ItemOptionValues": {
        "type": "object",
        "properties": {
          "Option": {
            "type": "string"
          },
          "SkuExt": {
            "type": "string"
          }
        }
      },
      "DirectScale.Disco.Extension.OrderCoupon": {
        "type": "object",
        "properties": {
          "Info": {
            "$ref": "#/components/schemas/DirectScale.Disco.Extension.Coupon"
          },
          "OrderId": {
            "type": "integer",
            "format": "int32"
          },
          "DateUsed": {
            "type": "string",
            "format": "date-time"
          },
          "DiscountAmount": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "DirectScale.Disco.Extension.OrderCoupons": {
        "type": "object",
        "properties": {
          "DiscountTotal": {
            "type": "number",
            "format": "double"
          },
          "UsedCoupons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.OrderCoupon"
            }
          }
        }
      },
      "DirectScale.Disco.Extension.Coupon": {
        "type": "object",
        "properties": {
          "CouponId": {
            "type": "integer",
            "format": "int32"
          },
          "Code": {
            "type": "string"
          },
          "AmountType": {
            "type": "string",
            "enum": [
              "Percent",
              "Amount"
            ]
          },
          "Discount": {
            "type": "number",
            "format": "double"
          },
          "BeginDate": {
            "type": "string",
            "format": "date-time"
          },
          "EndDate": {
            "type": "string",
            "format": "date-time"
          },
          "CouponType": {
            "type": "string",
            "enum": [
              "ItemDiscount",
              "OrderDiscount",
              "ShippingDiscount"
            ]
          },
          "OrderType": {
            "type": "string",
            "enum": [
              "Unknown",
              "Standard",
              "Autoship",
              "Enrollment",
              "VolumeAdjustment"
            ]
          },
          "OrderTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Unknown",
                "Standard",
                "Autoship",
                "Enrollment",
                "VolumeAdjustment"
              ]
            }
          },
          "MinQty": {
            "type": "number",
            "format": "double"
          },
          "Recurring": {
            "type": "boolean"
          },
          "AllItemIdsRequired": {
            "type": "boolean"
          },
          "AppliedItemIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "RegionIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "AssociateIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "BackOfficeIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "PriceGroupIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "Description": {
            "type": "string",
            "readOnly": true
          },
          "CodeDisplay": {
            "type": "string",
            "readOnly": true
          },
          "DescriptionWithCode": {
            "type": "string",
            "readOnly": true
          },
          "DescriptionWithIdAndCode": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "DirectScale.Disco.Extension.Hooks.Orders.ProcessCouponCodesHookRequest": {
        "type": "object",
        "properties": {
          "CouponCodes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "RegionId": {
            "type": "integer",
            "format": "int32"
          },
          "SubTotal": {
            "type": "number",
            "format": "double"
          },
          "Currency": {
            "type": "string"
          },
          "LineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.LineItem"
            }
          },
          "ShipMethodId": {
            "type": "integer",
            "format": "int32"
          },
          "ShippingCost": {
            "type": "number",
            "format": "double"
          },
          "OrderType": {
            "type": "string",
            "enum": [
              "Unknown",
              "Standard",
              "Autoship",
              "Enrollment",
              "VolumeAdjustment"
            ]
          },
          "AssociateId": {
            "type": "integer",
            "format": "int32"
          },
          "TaxItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.TaxLineItem"
            }
          }
        }
      },
      "DirectScale.Disco.Extension.TaxLineItem": {
        "type": "object",
        "properties": {
          "ItemId": {
            "type": "integer",
            "format": "int32"
          },
          "Weight": {
            "type": "number",
            "format": "double"
          },
          "Length": {
            "type": "number",
            "format": "double"
          },
          "Width": {
            "type": "number",
            "format": "double"
          },
          "Height": {
            "type": "number",
            "format": "double"
          },
          "Amount": {
            "type": "number",
            "format": "double"
          },
          "Quantity": {
            "type": "number",
            "format": "double"
          },
          "TaxCode": {
            "type": "string"
          },
          "GrossAmount": {
            "type": "number",
            "format": "double",
            "readOnly": true
          },
          "SKU": {
            "type": "string"
          },
          "Description": {
            "type": "string"
          }
        }
      },
      "DirectScale.Disco.Extension.Hooks.Orders.ProcessCouponCodesHookResponse": {
        "type": "object",
        "properties": {
          "OrderCoupons": {
            "$ref": "#/components/schemas/DirectScale.Disco.Extension.OrderCoupons"
          },
          "CouponAdjustedTax": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectScale.Disco.Extension.TaxLineItem"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "Extension_Token": {
        "type": "apiKey",
        "description": "Bearer Token For Extension",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
```