Chủ Nhật, 16 tháng 8, 2020

Products API

 The Products API lets you perform CRUD product management operations.

URL

URL: https://api.clickbank.com/rest/1.3/products

Methods

This section provides details about the methods available within the Products API, including required keys and roles, output types, and supported and required parameters.

The following methods are covered in this section:

GET  /1.3/products/schema

This method returns the XML schema for product results.

Required Keys and Roles

  • None

Return Type

XML schema for Product Information

Supported Output Types

  • application/xml

GET  /1.3/products/{sku}

This method returns the product with the specified SKU.

Request Parameters

NameRequiredDescription
siteYesThe account owning the product.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Products Client Role

Return Type

Product Information

Supported Output Types

  • application/xml
  • application/json

GET  /1.3/products/list

This method returns a list of all products associated with an account.

Request Parameters

NameRequiredDescription
siteYesThe account owning the products to be returned.
typeNoThe product types to return. Must be either STANDARD or RECURRING. If you do not specify a type, all types are returned.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Products Client Role

Return Type

Product Information

Supported Output Types

  • application/xml
  • application/json

PUT  /1.3/products/{sku}

This method creates a product with the specified parameters.

Request Parameters

NameRequiredDescription
currencyYes

The currency the product is sold in, in three-character format. See the Currencies ClickBank Accepts article for a full list.

languageYesThe language of the product. The valid values are:
  • DE – German
  • EN – English
  • ES – Spanish
  • FR – French
  • IT – Italian
  • PT – Portuguese
priceYes

The initial price for the product.

siteYes

The account nickname that owns the new product.

titleYes

The title of the product.

categoriesRequired for product with digital componentThe categories for a product with a digital component. One or more categories can be specified. Valid values are:
  • EBOOK
  • SOFTWARE
  • GAMES
  • AUDIO
  • VIDEO
  • MEMBER_SITE
deliveryMethodRequired for product with physical component

The method of delivery for a physical product.

deliverySpeedRequired for product with physical component

The speed of delivery for a physical product.

descriptionRequired for product with physical or recurring componentA description of the product.
digitalAt least one component is required

Components specify one or more pieces of the product. For example, a one-time physical product would have a physical component, while a physical product with recurring digital would have a physical component and a digitalRecurring component.

You must specify one or more components for the product:

  • digital – The product includes a one-time digital component.
  • digitalRecurring – The product includes a recurring digital component.
  • physical – The product includes a one-time physical component.
  • physicalRecurring – The product includes a recurring physical component.
digitalRecurring
physical
physicalRecurring
durationRequired for recurring productsThe rebill duration for a recurring product.
frequencyRequired for recurring productsThe rebill frequency for a recurring product. Valid values are:
  • WEEKLY
  • BI_WEEKLY
  • MONTHLY
  • QUARTERLY
  • YEARLY
pitchPageAt least one pitch page is required

You must specify at least one URL for the product's pitch page. This can be the same as the HopLink Target URL. You can specify a generic pitch page URL, a mobile-friendly pitch page URL, or both.

mobilePitchPage
rebillCommissionRequired for recurring products

The rebill commission rate for a recurring product.

rebillPriceRequired for recurring productsThe rebill price for a recurring product.
shippingProfileRequired for product with physical component

The shipping profile for a physical product.

thankYouPageAt least one thank you page is requiredYou must specify at least one thank you page for the product. You can specify a generic thank you page, a thank you page designed for mobile devices, or both.
mobileThankYouPage
trialPeriodRequired for recurring products

The trial period for a recurring product, in days. The valid values are either 0 (meaning no trial period) or a whole number between 3 and 31.

imageNo

The ID of the image to associate with the product.

preRebillNotificationLeadTimeNo

The lead time for pre-rebill notifications, in days. If pre-rebill notifications are enabled, a reminder message is sent to customers prior to each rebill.

preRebillNotificationOverrideNo

When this parameter is set, pre-rebill notifications are sent regardless of the product's rebill cycle. If this parameter is not set, pre-rebill notifications are not sent for products that are rebilled every month or more frequently.

purchaseCommissionNo

The commission rate for the product. If unspecified, the account's default commission rate is used.

rebillRefundDaysLimitNo

The number of days within which a rebill can be refunded.

saleRefundDaysLimitNo

The number of days within which a sale can be refunded.

skipConfirmationPageNo

Specifies whether the confirmation page is skipped. Valid values are true or false.

This parameter is role restricted. If you do not have the role, it will not be honored.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Products Client Role

Return Type

A product SKU.

Supported Output Types

  • application/xml
  • application/json

DELETE  /1.3/products/{sku}

This method deletes the product with the specified SKU.

Request Parameters

NameRequiredDescription
siteYesThe account owning the product to be deleted.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Products Client Role

Return Type

Nothing.

Supported Output Types

  • application/xml
  • application/json

Return Types

This section details the return types used by the Products API.

The following return types are covered in this section:

Product Information

Product InformationResult returns use the following format:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
<xs:element name="Image" type="imageBean"/>
<xs:element name="commission" type="productCommission"/>
<xs:element name="contractBean" type="contractBean"/>
<xs:element name="physical" type="physicalPricing"/>
<xs:element name="pitch_pages" type="pitchPages"/>
<xs:element name="price" type="price"/>
<xs:element name="pricing" type="pricing"/>
<xs:element name="product" type="productBean"/>
<xs:element name="product_approval_status" type="productApprovalStatus"/>
<xs:element name="recurring" type="recurringPricing"/>
<xs:element name="standard" type="standardPricing"/>
<xs:element name="thank_you_pages" type="thankYouPages"/>
<xs:complexType name="productBean">
<xs:sequence>
<xs:element name="id" type="xs:int" minOccurs="0"/>
<xs:element name="status" type="activeStatus" minOccurs="0"/>
<xs:element name="digital" type="xs:boolean"/>
<xs:element name="physical" type="xs:boolean"/>
<xs:element name="digitalRecurring" type="xs:boolean"/>
<xs:element name="physicalRecurring" type="xs:boolean"/>
<xs:element name="site" type="xs:string" minOccurs="0"/>
<xs:element name="created" type="xs:string" minOccurs="0"/>
<xs:element name="updated" type="xs:string" minOccurs="0"/>
<xs:element name="approval_status" type="productApprovalStatus" minOccurs="0"/>
<xs:element name="language" type="xs:string" minOccurs="0"/>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="image" type="imageBean" minOccurs="0"/>
<xs:element ref="thank_you_pages" minOccurs="0"/>
<xs:element ref="pitch_pages" minOccurs="0"/>
<xs:element ref="commission" minOccurs="0"/>
<xs:element name="pricings" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element ref="pricing" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="contracts" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="contract" type="contractBean" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="categories" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="category" type="productCategory" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="disable_geo_currency" type="xs:boolean" minOccurs="0"/>
<xs:element name="allow_currency_change" type="xs:boolean" minOccurs="0"/>
<xs:element name="us_tax_exempt" type="xs:boolean" minOccurs="0"/>
<xs:element name="revenue_recognition" type="revRec" minOccurs="0"/>
<xs:element name="reduced_upsell_markup" type="xs:boolean" minOccurs="0"/>
<xs:element name="skip_confirmation_page" type="xs:boolean" minOccurs="0"/>
<xs:element name="admin_download_url" type="xs:string" minOccurs="0"/>
<xs:element name="admin_mobile_download_url" type="xs:string" minOccurs="0"/>
<xs:element name="no_commission" type="xs:boolean"/>
<xs:element name="sale_refund_days_limit" type="xs:int" minOccurs="0"/>
<xs:element name="rebill_refund_days_limit" type="xs:int" minOccurs="0"/>
<xs:element name="admin_restrict_flexible_refund" type="xs:boolean" minOccurs="0"/>
<xs:element name="commission_tier_override" type="xs:boolean"/>
<xs:element name="deliveryMethod" type="xs:string" minOccurs="0"/>
<xs:element name="deliverySpeed" type="xs:string" minOccurs="0"/>
<xs:element name="maxQuantity" type="xs:int" minOccurs="0"/>
<xs:element name="isPartOfOrderBump" type="xs:boolean"/>
<xs:element name="isInitialOfOrderBump" type="xs:boolean"/>
<xs:element name="isProductOfOrderBump" type="xs:boolean"/>
</xs:sequence>
<xs:attribute name="sku" type="xs:string"/>
</xs:complexType>
<xs:complexType name="productApprovalStatus">
<xs:sequence>
<xs:element name="ticket_id" type="xs:int" minOccurs="0"/>
<xs:element name="status" type="status" minOccurs="0"/>
<xs:element name="last_action_performed_by" type="role" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="imageBean">
<xs:sequence>
<xs:element name="id" type="xs:int" minOccurs="0"/>
<xs:element name="title" type="xs:string" minOccurs="0"/>
<xs:element name="type" type="imageType" minOccurs="0"/>
<xs:element name="approved" type="xs:boolean" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="thankYouPages">
<xs:sequence>
<xs:element name="desktop" type="xs:string" minOccurs="0"/>
<xs:element name="mobile" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="pitchPages">
<xs:sequence>
<xs:element name="desktop" type="xs:string" minOccurs="0"/>
<xs:element name="mobile" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="productCommission">
<xs:sequence>
<xs:element name="purchase" type="xs:decimal" minOccurs="0"/>
<xs:element name="rebill" type="xs:decimal" minOccurs="0"/>
<xs:element name="no_rebill_commission" type="xs:boolean"/>
<xs:element name="commission_tier_override" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="pricing">
<xs:sequence>
<xs:element ref="standard" minOccurs="0"/>
<xs:element ref="recurring" minOccurs="0"/>
<xs:element ref="physical" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="currency" type="xs:string"/>
</xs:complexType>
<xs:complexType name="standardPricing">
<xs:sequence>
<xs:element ref="price" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="price">
<xs:sequence>
<xs:element name="native_price" type="xs:decimal" minOccurs="0"/>
<xs:element name="usd" type="xs:decimal" minOccurs="0"/>
<xs:element name="usd_with_fees" type="xs:decimal" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="recurringPricing">
<xs:sequence>
<xs:element ref="price" minOccurs="0"/>
<xs:element name="frequency" type="recurringFrequency" minOccurs="0"/>
<xs:element name="duration" type="xs:int" minOccurs="0"/>
<xs:element name="trial_days" type="xs:int" minOccurs="0"/>
<xs:element name="pre_rebill_override" type="xs:boolean"/>
<xs:element name="pre_rebill_leadtime" type="xs:int" minOccurs="0"/>
<xs:element name="recurringTitle" type="xs:string" minOccurs="0"/>
<xs:element name="recurringDescription" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="physicalPricing">
<xs:sequence>
<xs:element name="shipping_profile" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="contractBean">
<xs:sequence>
<xs:element name="productId" type="xs:int" minOccurs="0"/>
<xs:element name="name" type="xs:string" minOccurs="0"/>
<xs:element name="owner" type="xs:string" minOccurs="0"/>
<xs:element name="partner" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="xs:int"/>
<xs:attribute name="status" type="contractStatus"/>
</xs:complexType>
<xs:simpleType name="activeStatus">
<xs:restriction base="xs:string">
<xs:enumeration value="ACTIVE"/>
<xs:enumeration value="INACTIVE"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="status">
<xs:restriction base="xs:string">
<xs:enumeration value="APPROVAL_REQUIRED"/>
<xs:enumeration value="PENDING_APPROVAL"/>
<xs:enumeration value="APPROVED"/>
<xs:enumeration value="DISAPPROVED"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="role">
<xs:restriction base="xs:string">
<xs:enumeration value="VENDOR"/>
<xs:enumeration value="CUSTOMER"/>
<xs:enumeration value="CBCSR"/>
<xs:enumeration value="CBSYSTEM"/>
<xs:enumeration value="USER"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="imageType">
<xs:restriction base="xs:string">
<xs:enumeration value="PRODUCT"/>
<xs:enumeration value="BANNER"/>
<xs:enumeration value="BANNER_BG"/>
<xs:enumeration value="CUSTOM_BANNER"/>
<xs:enumeration value="CUSTOM_BANNER_BG"/>
<xs:enumeration value="CUSTOM_ORDERFORM"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="recurringFrequency">
<xs:restriction base="xs:string">
<xs:enumeration value="WEEKLY"/>
<xs:enumeration value="BI_WEEKLY"/>
<xs:enumeration value="MONTHLY"/>
<xs:enumeration value="QUARTERLY"/>
<xs:enumeration value="HALF_YEARLY"/>
<xs:enumeration value="YEARLY"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="contractStatus">
<xs:restriction base="xs:string">
<xs:enumeration value="PENDING_START"/>
<xs:enumeration value="PENDING_APPROVAL"/>
<xs:enumeration value="ACTIVE"/>
<xs:enumeration value="TERMINATED"/>
<xs:enumeration value="TERMINATION_REQUESTED"/>
<xs:enumeration value="EXPIRED"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="productCategory">
<xs:restriction base="xs:string">
<xs:enumeration value="EBOOK"/>
<xs:enumeration value="SOFTWARE"/>
<xs:enumeration value="GAMES"/>
<xs:enumeration value="AUDIO"/>
<xs:enumeration value="VIDEO"/>
<xs:enumeration value="MEMBER_SITE"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="revRec">
<xs:restriction base="xs:string">
<xs:enumeration value="LD"/>
<xs:enumeration value="VD"/>
<xs:enumeration value="LM"/>
<xs:enumeration value="LMA"/>
<xs:enumeration value="LMID"/>
<xs:enumeration value="VM"/>
<xs:enumeration value="I"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

Usage Information

For additional information about using the Products API, see the ClickBank APIs article.

Related Articles

Orders API

 The Orders API lets you view order information and update some order parameters.

URL

URL: https://api.clickbank.com/rest/1.3/orders2

Methods

This section provides details about the methods available within the Orders API, including required keys and roles, output types, and supported and required parameters.

The following methods are covered in this section:

GET  /1.3/orders2/schema

This method returns the XML schema for order data results.

Required Keys and Roles

  • None

Supported Output Types

  • application/xml

Return Type

XML schema for List of Order Data

GET  /1.3/orders2/{receipt}

This method returns a list of order detail objects which match the given receipt number.

Request Parameters

NameRequiredDescription
skuRequired for orders with multiple items

The SKU of the line item. Used to identify individual purchases in multi-item cart purchases.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

List of Order Data

Supported Output Types

  • application/xml
  • application/json

GET  /1.3/orders2/{receipt}/upsells

This method returns all upsell transactions for the given parent upsell transaction.

If the transaction does not exist, if you do not have access to the transaction, or if there are no upsells for this transaction, a status code of 403 (No Content) is returned.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

List of Order Data

Supported Output Types

  • application/xml
  • application/json

GET  /1.3/orders2/count

This method returns a count of the orders that match the specified search criteria.

Request Parameters

NameRequiredDescription
affiliateNo 

Return results in which the specified account nickname was the affiliate.

Supports the word 'none' to search for transactions without affiliates, and wildcard searches using the '%' character.

itemNo

The item number of the order.

emailNo

A customer's email address.

Supports wildcard searches using the '%' character.

 lastNameNo 

A customer's last name.

Supports wildcard searches using the '%' character.

roleNo

Your role in the transaction. Valid values are:

  • VENDOR
  • AFFILIATE
startDateNo

Return results within the specified date range.

The date range is inclusive. The date format is yyyy-mm-dd. The default date range is from yesterday to today. If you use one date parameter, you must also use the other.

endDate
tidNo

Search for transactions using the specified tracking ID or Promo Code. This includes both vendor and affiliate tracking codes. This code is returned in the promo field.

typeNo

Return results for the specified type of transaction. Valid values are:

  • SALE
  • RFND
  • CGBK
  • FEE
  • BILL
  • TEST_SALE
  • TEST_BILL
  • TEST_RFND
  • TEST_FEE

If no type is specified, the results include all types. If you specify an invalid type, no transactions are returned.

 vendorNo

Return results in which the specified account nickname was the vendor.

Supports wildcard searches using the '%' character.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

Count of matching orders

GET  /1.3/orders2/list

This method lists all of the orders which are visible to you and which match the specified search criteria.

Only the first 100 orders will be returned. This method supports pagination, so if the second page of the next 100 items is required a request header 'Page' with value 2 will return them.

This method returns a status code of 200 if all the receipts have been obtained, or a 206 [Partial Return] if there are more results available.

Head Parameters

NameRequiredDescription
pageNoReturn the specified page of results. The default is page 1.

Request Parameters

NameRequiredDescription
affiliateNo 

Return results in which the specified account nickname was the affiliate.

Supports the word 'none' to search for transactions without affiliates, and wildcard searches using the '%' character.

amountNo

The total transaction amount, including tax, in any currency.

emailNo

A customer's email address.

Supports wildcard searches using the '%' character.

itemNo 

The item number of the order.

lastNameNo 

A customer's last name.

Supports wildcard searches using the '%' character.

postalCodeNo

A customer's zip or postal code.

Supports wildcard searches using the '%' character.

roleNo

Your role in the transaction. Valid values are:

  • VENDOR
  • AFFILIATE

startDate

No

Return results within the specified date range.

The date range is inclusive. The date format is yyyy-mm-dd. The default date range is from yesterday to today. If you use one date parameter, you must also use the other.

endDate
tidNo

Search for transactions using the specified tracking ID or Promo Code. This includes both vendor and affiliate tracking codes. This code is returned in the promo field.

typeNo

Return results for the specified type of transaction. Valid values are:

  • SALE
  • RFND
  • CGBK
  • FEE
  • BILL
  • TEST_SALE
  • TEST_BILL
  • TEST_RFND
  • TEST_FEE

If no type is specified, the results include all types. If you specify an invalid type, no transactions are returned.

vendorNo

Return results in which the specified account nickname was the vendor.

Supports wildcard searches using the '%' character.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

List of Order Data

Supported Output Types

  • application/xml
  • application/json

POST  /1.3/orders2/{receipt}/changeProduct

This method lets you upgrade or downgrade the product associated with a subscription. An email confirmation is sent to the customer and to you.

There are some restrictions on the new product. If the old product was a digital product, the new product cannot be a physical product. If the old product was a physical product, the new product can be a physical product, but at a minimum it must be configured to ship to all of the locations to which you could ship the original product. Both products must use the same currency.

When you upgrade or downgrade a subscription, the number of remaining subscription payments is not changed.

When you use this method, we refund a portion of the old product's last recurring payment unless you specify otherwise. This amount is prorated based on the amount of time remaining in the subscription period.

NOTE – Master accounts will display the old product, rather than the new product, until the next specified billing date.

Request Parameters

NameRequiredDescription
newSkuYes

The SKU of the new product for the subscription.

oldSkuYes

The SKU of the current product for the subscription.

carryAffiliateNo

Determines if the affiliate from the original transaction is carried over to the new subscription.

applyProratedRefundNo

Determines if the customer is given a prorated refund based on the difference in product prices. The default is TRUE.

nextRebillDate

No

Specifies the next billing date. The date format is yyyy-mm-dd. The default value is the next day.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Subscription Modification Role
    • API Order Write Role

Return Type

No Content

POST  /1.3/orders2/{receipt}/changeAddress

This method lets you change the shipping address of a physical recurring subscription.

Request Parameters

NameRequiredDescription
firstNameNo

Updated customer first name.

lastNameNo

Updated customer last name.

address1Yes

Updated address (line 1).

address2No

Updated address (line 2).

cityYes

Updated city.

countyNo

Updated county.

provinceNo

Updated state or province.

countryCodeYes

Updated country code.

postalCodeNo

Updated postal code or Zip code.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Write Role

Return Type

No content

POST  /1.3/orders2/{receipt}/changeDate

This method lets you change the date of the next rebill payment for a recurring product. The payment amount is not altered.

You and the customer are sent a notification of the date change, including the new payment date and the payment amount (not including tax).

Request Parameters

NameRequiredDescription
changeDateYes

The date on which the next payment will be made. This date must be in the future. The date format is yyyy-mm-dd.

skuRequired for orders with multiple items

The SKU of the line item. Used to identify individual purchases in multi-item cart purchases.

NOTE – If you have changed the product associated with a subscription using the changeProduct endpoint, you must use the SKU of the original product, instead of the current SKU.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Subscription Modification Role

Return Type

No content

POST  /1.3/orders2/{receipt}/extend

This method lets you extend a subscription by a specified number of rebill periods.

Request Parameters

NameRequiredDescription
numPeriodsYes

The number of periods by which to extend the subscription.

skuRequired for orders with multiple items

The SKU of the line item. Used to identify individual purchases in multi-item cart purchases.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Subscription Modification Role

Return Type

No content

POST  /1.3/orders2/{receipt}/pause

This method lets you pause a subscription, postponing payments until a specified date. An email confirmation is sent to the customer and to you.

The date on which payments are restarted must be later than the next scheduled payment. For example, if a monthly subscription was last billed on January 1, the restart date must be February 1 or later. The restart date must also be within the next 60 days.

Request Parameters

NameRequiredDescription
restartDateYes

The date on which the subscription will be resumed. This date cannot be earlier than the next scheduled payment date, and must be within the next 60 days.

The date format is yyyy-mm-dd.

skuRequired for orders with multiple items

The SKU of the line item. Used to identify individual purchases in multi-item cart purchases.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Subscription Modification Role

Return Type

No content

POST  /1.3/orders2/{receipt}/reinstate

This method lets you restart a cancelled subscription.

You can only reinstate cancellations within 60 days of the cancellation.

Request Parameters

NameRequiredDescription
skuRequired for orders with multiple items

The SKU of the line item. Used to identify individual purchases in multi-item cart purchases.

NOTE – If you have changed the product associated with a subscription using the changeProduct endpoint, you must use the SKU of the original product, instead of the current SKU.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Subscription Modification Role

Return Type

No content

HEAD  /1.3/orders2/{receipt}

This method tells you whether a particular recurring product subscription is active - that is, it has not been refunded, charged back, or canceled.

If the subscription is active, it returns a status code of 204. If the subscription is not active, the subscription cannot be found, or if you do not have permission to access the subscription, it returns a status code of 403.

NOTE – You should use the receipt number of the initial transaction for a rebill product, rather than the receipt number for one of the rebill transactions. Using a rebill transaction receipt number only provides information on that transaction, rather than for the subscription as a whole.

Request Parameters

NameRequiredDescription
skuRequired for orders with multiple items

The SKU of the line item. Used to identify individual purchases in multi-item cart purchases.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

None

Supported Output Types

  • application/xml
  • application/json

Return Types

This section details the return types used by the Orders API.

The following return types are covered in this section:

List of Order Data

List of Order Data returns use the following format:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cb="http://www.clickbank.com/api" version="1.0">
<xs:element name="orderData" type="orderData"/>
<xs:complexType name="orderData">
<xs:sequence>
<xs:element name="transactionTime" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="receipt" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="trackingId" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="paytmentMethod" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="transactionType" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="totalOrderAmount" type="xs:decimal" nillable="true" minOccurs="0"/>
<xs:element name="totalShippingAmount" type="xs:decimal" nillable="true" minOccurs="0"/>
<xs:element name="totalTaxAmount" type="xs:decimal" nillable="true" minOccurs="0"/>
<xs:element name="vendor" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="affiliate" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="country" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="state" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="lastName" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="firstName" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="currency" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="declinedConsent" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="email" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="postalCode" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="customerContactInfo" type="contactField" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="role" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="fullName" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="customerRefundableState" type="refundableState" nillable="true" minOccurs="0"/>
<xs:element name="vendorVariables" type="vendorVariableElementArray" nillable="true" minOccurs="0"/>
<xs:element name="lineItemData" type="lineItemData" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="contactField">
<xs:sequence>
<xs:element name="field" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="value" type="xs:string" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="vendorVariableElement">
<xs:sequence>
<xs:element name="name" type="xs:string" minOccurs="0"/>
<xs:element name="value" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="lineItemData">
<xs:sequence>
<xs:element name="itemNo" type="xs:string" minOccurs="0"/>
<xs:element name="productTitle" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="recurring" type="xs:boolean" minOccurs="0"/>
<xs:element name="shippable" type="xs:boolean" minOccurs="0"/>
<xs:element name="customerAmount" type="xs:decimal" nillable="true" minOccurs="0"/>
<xs:element name="accountAmount" type="xs:decimal" nillable="true" minOccurs="0"/>
<xs:element name="quantity" type="xs:int" nillable="true" minOccurs="0"/>
<xs:element name="lineItemType" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="refundsBlocked" type="xs:boolean" minOccurs="0"/>
<xs:element name="rebillAmount" type="xs:decimal" nillable="true" minOccurs="0"/>
<xs:element name="processedPayments" type="xs:int" nillable="true" minOccurs="0"/>
<xs:element name="futurePayments" type="xs:int" nillable="true" minOccurs="0"/>
<xs:element name="nextPaymentDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="status" type="xs:string" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="refundableState">
<xs:restriction base="xs:string">
<xs:enumeration value="REFUNDABLE"/>
<xs:enumeration value="SUGGESTED_REFUND_BLOCK"/>
<xs:enumeration value="UNREFUNDABLE"/>
<xs:enumeration value="ALREADY_REFUNDED"/>
<xs:enumeration value="TO_OLD"/>
<xs:enumeration value="REFUND_BLOCKED"/>
<xs:enumeration value="HAS_OPEN_REFUND"/>
<xs:enumeration value="OVER_ELV_LIMIT"/>
<xs:enumeration value="PROVIDER_DISCONNECTED"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="vendorVariableElementArray" final="#all">
<xs:sequence>
<xs:element name="item" type="vendorVariableElement" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:schema>

Usage Information

For additional information about using the Orders API, see the ClickBank APIs article.

Related Articles

Images API

 The Images API lists the images associated with an account.

URL

URL: https://api.clickbank.com/rest/1.3/images

Methods

This section provides details about the methods available within the Images API, including required keys and roles, output types, and supported and required parameters.

The following methods are covered in this section:

GET  /1.3/images/schema

Required Keys and Roles

  • None

Return Type

XML schema for Image Information List

Supported Output Types

  • application/xml

GET  /1.3/images/list

This method returns a list of images associated with an account.

Request Parameters

NameRequiredDescription
siteYesReturn images from this account.
approvedOnlyNo

Specifies whether the return should only include approved images. The valid values are:

  • TRUE – Return only approved images. This is the default.
  • FALSE – Return approved and unapproved images.
typeNo

Return only images of the specified type. The valid values are:

  • PRODUCT – Return product images.
  • BANNER – Return banner images.
  • BANNER_CLASSIC – Return banner images for the classic order form.
  • BANNER_NEW – Return banner images for the new order form.
  • BANNER_BG – Return upper corner images.
  • CUSTOM_BANNER – Return custom banner images.
  • CUSTOM_BANNER_BG – Return custom upper corner images.
  • CUSTOM_ORDERFORM – Return advanced custom order form images.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • Products Role

Return Type

Image Information List

Supported Output Types

  • application/xml
  • application/json

Return Types

This section details the return types used by the Images API.

The following return types are covered in this section:

Image Information List

Image Information List returns use the following format:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cb="http://www.clickbank.com/api" version="1.0">
<xs:element name="id" type="integer"/>
<xs:element name="title" type="string"/> <xs:simpletype name="type">
<xs:restriction base="xs:string">
<xs:enumeration value="PRODUCT"/>
<xs:enumeration value="BANNER"/>
<xs:enumeration value="BANNER_BG"/>
<xs:enumeration value="CUSTOM_BANNER"/>
<xs:enumeration value="CUSTOM_BANNER_BG"/>
<xs:enumeration value="CUSTOM_ORDERFORM"/>
</xs:restriction> <xs:element name="approved" type="boolean"/> </xs:schema>

Usage Information

For additional information about using the Images API, see the ClickBank APIs article.

Related Articles