Commerce · Commerce

Get a discount

Fetches a discount. Works with Shopify and WooCommerce accounts.

GEThttps://api.pozy.ai/v1/commerce/discounts/{discountId}
Shopify and WooCommercegetCommerceDiscount

Guides: Commerce & blogs, Products and catalog

Request

Send your API key as Authorization: Bearer pz_live_.... Read-only keys can call it. Keys with the commerce resource group disabled get 403 resource_group_disabled. Authentication

Path parameters

NameTypeNotes
discountIdrequiredstring

Query parameters

NameTypeNotes
accountIdrequiredstring

Example

curl -X GET "https://api.pozy.ai/v1/commerce/discounts/6ebbd22404a5ebbadf66d175?accountId=696e0b682d0a31188e7a2ba9" \
  -H "Authorization: Bearer $POZY_API_KEY"

Response

200 on success

  • discountobject
    20 child fields
    • idstring
    • accountIdstring
    • platformstring

      One of shopify.

    • titlestring
    • methodstring

      One of code, automatic.

    • typestring

      One of percentage, fixed_amount, free_shipping, buy_x_get_y, app.

    • codesarray of string
    • codeCountinteger

      Can be null.

    • valueobject

      One of:

      Option 1 (2 fields)
      • typestring

        One of percentage.

      • percentagenumber
      Option 2 (3 fields)
      • typestring

        One of fixed_amount.

      • amountobject
        2 child fields
        • amountstringrequired
        • currencystringrequired
      • appliesOnEachItemboolean
    • appliesToobject

      Can be null.

      4 child fields
      • typestring

        One of all, products, collections.

      • productIdsarray of string
      • variantIdsarray of string
      • collectionIdsarray of string
    • minimumobject

      Can be null.

      3 child fields
      • typestring

        One of subtotal, quantity.

      • amountobject
        2 child fields
        • amountstringrequired
        • currencystringrequired
      • quantityinteger
    • usageLimitinteger

      Can be null.

    • oncePerCustomerboolean
    • usageCountinteger
    • startsAtstring (date-time)
    • endsAtstring (date-time)

      Can be null.

    • statusstring

      One of active, scheduled, expired.

    • platformStatusstring
    • summarystring
    • platformDataobject

      Can be null.

200 response
{
  "discount": {
    "id": "6bfebd43ddc270f6d2c56fc5",
    "accountId": "696e0b682d0a31188e7a2ba9",
    "platform": "shopify",
    "title": "Launch day",
    "method": "code",
    "type": "percentage",
    "codes": [
      "string"
    ],
    "codeCount": 42,
    "value": {
      "type": "percentage",
      "percentage": 12.5
    },
    "appliesTo": {
      "type": "all",
      "productIds": [
        "string"
      ],
      "variantIds": [
        "string"
      ],
      "collectionIds": [
        "string"
      ]
    },
    "minimum": {
      "type": "subtotal",
      "amount": {
        "amount": "string",
        "currency": "USD"
      },
      "quantity": 1
    },
    "usageLimit": 1,
    "oncePerCustomer": true,
    "usageCount": 42,
    "startsAt": "2026-10-02T09:00:00.000Z",
    "endsAt": "2026-10-02T09:00:00.000Z",
    "status": "active",
    "platformStatus": "instagram",
    "summary": "string",
    "platformData": {}
  }
}

Errors

Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:

400invalid_request_errorA parameter or body field is missing or invalid. param names it.
401authentication_errorThe API key is missing, revoked or expired.
403permission_errorThe key is scoped to other profiles or has this resource group disabled.
404not_foundNothing with that id exists in your workspace.
429rate_limit_errorToo many requests this minute. Wait for Retry-After seconds.

Every code is listed in Errors.

More in Commerce

GETGet a storeGETList ordersGETGet an orderGETList productsPOSTCreate a productPOSTActivate, deactivate, archive or delete productsGETGet a productPATCHUpdate a productPOSTUpdate variant pricesGETList collectionsPOSTCreate a collectionGETGet a collectionPATCHUpdate a collectionDELDelete a collectionPOSTAdd or remove products in a collectionPOSTAdd variantsDELDelete variantsPOSTAdd optionsDELDelete optionsPOSTAdd imagesDELRemove imagesPOSTReorder imagesPOSTDuplicate a productGETList product metafieldsPUTSet product metafieldsDELDelete product metafieldsPOSTPublish or unpublish a productGETList collection metafieldsPUTSet collection metafieldsDELDelete collection metafieldsPOSTPublish or unpublish a collectionPOSTAdd or remove tags in bulkPOSTReorder products in a collectionGETList pagesPOSTCreate a pageGETGet a pagePATCHUpdate a pageDELDelete a pageGETList locationsGETGet a product's stockPOSTSet or adjust stockGETList sales channelsGETList discountsPOSTCreate a discountPATCHUpdate a discountDELDelete a discountPOSTActivate or deactivate a discountPOSTAdd codes to a discountGETList URL redirectsPOSTCreate a URL redirectPATCHUpdate a URL redirectDELDelete a URL redirectGETList navigation menusPOSTCreate a navigation menuGETGet a navigation menuPUTReplace a navigation menuDELDelete a navigation menuGETList metaobject definitionsGETList metaobjects of a typePOSTCreate a metaobjectGETGet a metaobjectPATCHUpdate a metaobjectDELDelete a metaobjectGETList marketsGETList price listsPUTSet fixed pricesDELRemove fixed pricesPUTRecord a marketing activityDELDelete a marketing activityPOSTReport daily engagementGETList catalog syncsPOSTSync a store into a Meta catalogGETGet a catalog syncDELStop a catalog syncPOSTRun a catalog sync now