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

Tickets API

 The Tickets API lets you create a technical support or refund ticket, and view or update the status of an existing ticket. For refund tickets related to physical products, you can also confirm that you’ve received a returned product.

URL

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

Methods

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

The following methods are covered in this section:

GET  /1.3/tickets/schema

This method returns the XML Schema for ticket data results.

Required Keys and Roles

  • None

Return Type

XML Schema for Ticket Data

Supported Output Types

  • application/xml

GET  /1.3/tickets/partialRefundDataSchema

This method returns the XML Schema for refund amount results.

Required Keys and Roles

  • None

Return Type

XML Schema for Partial Refund Data

Supported Output Types

  • application/xml

GET  /1.3/tickets/{id}

This method finds a ticket by its ID. It returns the ticket if it is found and is accessible by the current user. If the ticket does not exist, or the current user is not authorized to view the ticket, it returns a status code of 403.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

Ticket Data

Supported Output Types

  • application/xml
  • application/json

GET  /1.3/tickets/count

This method counts the tickets matching the search criteria and returns the count.

Request Parameters

NameRequiredDescription
receiptNo

A receipt number. Returns a count of all tickets associated with the transaction. If the receipt number is a subscription, returns a count of all tickets associated with all rebills of that subscription.

The receipt number must be 4 or more characters long, not counting the wildcard character (%). The receipt number cannot start with the wildcard character.

statusNoThe ticket status. Valid values include:
  • open
  • reopened
  • closed
typeNoThe ticket type. Valid values include:
  • rfnd – Refund
  • cncl – Cancellation
  • tech – Technical support

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

Count of matching tickets

Supported Output Types

  • application/xml
  • application/json

GET  /1.3/tickets/list

This method searches for tickets matching the search criteria and returns a list of ticket data objects with a status code of 200. If more than 100 results are returned, it returns a status code of 206 [Partial Content]. You can use the page head parameter to view a specific page of the results.

Head Parameters

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

 

Request Parameters

NameRequiredDescription

closeDateFrom

No

You can use the closeDateFrom and closeDateTo parameters together to specify a date range. Tickets that were closed within the date range are returned.

The range cannot be more than 7 days in length. The date range is inclusive. The date format is yyyy-mm-dd.

closeDateTo

createDateFrom

No

You can use the createDateFrom and createDateTo parameters together to specify a date range. Tickets that were created within the date range are returned.

The range cannot be more than 7 days in length. The date range is inclusive. The date format is yyyy-mm-dd.

createDateTo
receiptNo

A receipt number. Returns all tickets associated with the transaction. If the receipt number is a subscription, returns all tickets associated with all rebills of that subscription.

The receipt number must be 4 or more characters long, not counting the wildcard character (%). The receipt number cannot start with the wildcard character.

statusNoThe ticket status. Valid values include:
  • open
  • reopened
  • closed
typeNo The ticket type. Valid values include:
  • rfnd – Refund
  • cncl – Cancellation
  • tech – Technical support

updateDateFrom

No

You can use the updateDateFrom and updateDateTo parameters together to specify a date range. Tickets that were updated within the date range are returned.

The range cannot be more than 7 days in length. The date range is inclusive. The date format is yyyy-mm-dd.

updateDateTo

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

Ticket Data

Supported Output Types

  • application/xml
  • application/json

GET  /1.3/tickets/refundAmounts/{receipt}

This method returns amounts that would be refunded for the specified refund type and value, in US Dollars.

Request Parameters

NameRequiredDescription
refundTypeYes

The type of refund. Valid values include:

  • FULL – A full refund.
  • PARTIAL_PERCENT – Refunds the percentage of the order specified by the refundAmount parameter. You must be entitled to offer partial refunds to use this value.
  • PARTIAL_AMOUNT – Refunds the amount specified by the refundAmount parameter. You must be entitled to offer partial refunds to use this value.
refundAmountRequired for partial refunds

If you specified a partial refund using the refundType parameter, the refundAmount parameter specifies the refund percentage or the refund amount in the customer's currency.

For 'PARTIAL_PERCENT' refunds, this is the percentage of the purchase amount to refund. The value must be a number between 1 and 80, with no more than two digits of precision.

For 'PARTIAL_AMOUNT' refunds, this is the amount to refund in the currency the customer used during the purchase.

skuNo

The SKU of the line item. This parameter is used to specify a specific item in orders with multiple items.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

Partial Refund Data

Supported Output Types

  • application/xml
  • application/json

PUT  /1.3/tickets/{id}

This method lets you close a ticket, comment on a ticket, change the type of a ticket, or reopen the ticket. It returns a status code 200 and the ticket data if the action is successful, but returns a 403 if the current user is not allowed to act on the ticket or if the ticket does not exist.

Closing a ticket cancels the ticket request. For example, if you close a refund ticket, this cancels the refund request. If you do not specify an action, the only change made to the ticket will be adding your comment. Reopening is only supported for closed tickets and returns a status code of 400 for any open ticket.

Request Parameters

NameRequiredDescription
commentRequired when reopening a ticket

The comments that go along with the action, or comments on the ticket.

actionNo

The action to be taken on the specified ticket. Valid values are:

  • change
  • close
  • reopen
typeNo

Change the ticket type to the specified value. Valid values include:

  • rfnd – Refund. Partial refunds are not supported when changing ticket type.
  • cncl – Cancellation
  • tech – Technical support

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Write Role

Return Type

Ticket Data

Supported Output Types

  • application/xml
  • application/json

POST  /1.3/tickets/{receipt}

This method create a ticket with the specified parameters, and returns the ticket if the ticket creation is successful. 

Request Parameters

NameRequiredDescription
reasonYesThe reason why the ticket is being opened. Each ticket type has a set of possible reasons:

CNCL

  • ticket.type.cancel.1 – I did not receive additional value for the recurring payments.
  • ticket.type.cancel.2 – I was not satisfied with the subscription / Subscription did not meet expectations.
  • ticket.type.cancel.3 – I was unable to get support from the vendor.
  • ticket.type.cancel.4 – Product was not compatible with my computer. 
  • ticket.type.cancel.5 – I am unable to afford continuing payments for this subscription.
  • ticket.type.cancel.6 – I did not realize that I accepted the terms for continuing payments.
  • ticket.type.cancel.7 – Other.
  • ticket.type.cancel.not.mobile – Product was not compatible with my mobile device.

RFND

  • ticket.type.refund.1 – I never received my product.
  • ticket.type.refund.2 – I was not satisfied with the product. / Product did not meet expectations.
  • ticket.type.refund.3 – Product was not compatible with my computer. 
  • ticket.type.refund.4 – I was unable to get technical support.
  • ticket.type.refund.5 – I did not authorize the purchase.
  • ticket.type.refund.6 – I do not recognize the purchase.
  • ticket.type.refund.7 – Duplicate purchase. / I already purchased product previously.
  • ticket.type.refund.8 – Other.
  • ticket.type.refund.returned – Product returned.
  • ticket.type.refund.not.mobile – Product was not compatible with my mobile device.

TECH

  • ticket.type.tech_support.1 – I am unable to log in.
  • ticket.type.tech_support.2 – I had problems downloading the product.
  • ticket.type.tech_support.3 – I never received a valid registration code; please send a valid code.
  • ticket.type.tech_support.4 – I can't get the product to work.
  • ticket.type.tech_support.9 – Other.
  • ticket.type.tech_support.10 – I never received my product.
typeYesThe ticket type. Valid values include:
  • rfnd – Refund. This ticket type refunds some or all of the price for the specified receipt number, and cancels all future payments for a recurring product. You must use the refundType parameter to specify the refund type.
  • cncl – Cancellation. This ticket type cancels all future payments of a recurring product but does not refund any past payments.
  • tech – Technical support.
refundAmountRequired for partial refund tickets

If you specified a partial refund using the refundType parameter, the refundAmount parameter specifies the refund amount.

For 'PARTIAL_PERCENT' refunds, this is the percentage of the purchase amount to refund. The value must be a number between 1 and 80, with no more than two digits of precision.

For 'PARTIAL_AMOUNT' refunds, this is the amount to refund in the currency the customer used during the purchase.

refundTypeRequired for refund tickets

The type of refund. Valid values include:

  • FULL – A full refund.
  • PARTIAL_PERCENT – Refunds the percentage of the order specified by the refundAmount parameter. You must be entitled to offer partial refunds to use this value.
  • PARTIAL_AMOUNT – Refunds the amount specified by the refundAmount parameter. You must be entitled to offer partial refunds to use this value.
skuRequired for orders with multiple items

The SKU for the line item. This value is used to identify individual purchases in multi-item orders.

commentNo

The comments associated with the ticket's creation.

retainSubscriptionNo

Specifies if the subscription should be retained after the refund has been processed.

 

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Write Role

Return Type

Ticket Data

Supported Output Types

  • application/xml
  • application/json

POST  /1.3/tickets/{id}/returned

This method acknowledges the return of a physical item from customer, and completes the refund process for the specified ticket ID.

This call returns a status code of 204 if successful. The body of the response will be empty in this case. A status code of 403 (Forbidden) is returned if access is denied. A status code of 400 (Bad Request) is returned if the ticket isn't found or the ticket is not for a physical purchase.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role
    • API Order Write Role

Return Type

Ship Notice

Supported Output Types

  • application/xml
  • application/json

Return Types

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

The following return types are covered in this section:

Ticket Data

Ticket 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="ticketCommentData" type="ticketCommentData"/>
<xs:element name="ticketData" type="ticketData"/>
<xs:complexType name="ticketData">
<xs:sequence>
<xs:element name="ticketid" type="xs:int" nillable="true"/>
<xs:element name="receipt" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="status" type="status" nillable="true" minOccurs="0"/>
<xs:element name="type" type="ticketType" nillable="true" minOccurs="0"/>
<xs:element name="comments" type="ticketCommentData" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="openedDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="closedDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="description" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="refundType" type="refundType" nillable="true" minOccurs="0"/>
<xs:element name="refundAmount" type="xs:decimal" nillable="true" minOccurs="0"/>
<xs:element name="customerFirstName" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="customerLastName" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="email" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="emailAtOrderTime" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="expirationDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="locale" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="note" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="productItemNo" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="updateTime" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="source" type="ticketSource" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ticketCommentData">
<xs:sequence>
<xs:element name="commentId" type="xs:int" minOccurs="0"/>
<xs:element name="date" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="comment" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="action" type="ticketActionType" nillable="true" minOccurs="0"/>
<xs:element name="commentRole" type="role" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="status">
<xs:restriction base="xs:string">
<xs:enumeration value="OPEN"/>
<xs:enumeration value="REOPENED"/>
<xs:enumeration value="CLOSED"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ticketType">
<xs:restriction base="xs:string">
<xs:enumeration value="TECH_SUPPORT"/>
<xs:enumeration value="REFUND"/>
<xs:enumeration value="CANCEL"/>
<xs:enumeration value="PRODUCT_CHANGE"/>
<xs:enumeration value="ORDER_LOOKUP"/>
<xs:enumeration value="ESCALATED"/>
<xs:enumeration value="APPROVAL_IMAGE"/>
<xs:enumeration value="APPROVAL_UPSELL"/>
<xs:enumeration value="APPROVAL_CATEGORY_CHANGE"/>
<xs:enumeration value="APPROVAL_BLOG_POST"/>
<xs:enumeration value="APPROVAL_PRODUCT"/>
<xs:enumeration value="APPROVAL_ADVANCED_UPSELL"/>
<xs:enumeration value="APPROVAL_CSS_ORDERFORM"/>
<xs:enumeration value="APPROVAL_ORDER_BUMP_CUSTOM_TEXT"/>
<xs:enumeration value="CATEGORY_SUGGESTION"/>
<xs:enumeration value="BUSINESS_DEVELOPMENT"/>
<xs:enumeration value="ACCT_QUESTION_MARKETING"/>
<xs:enumeration value="ACCT_QUESTION_ACCOUNTS"/>
<xs:enumeration value="ACCT_QUESTION_ACCOUNTING"/>
<xs:enumeration value="APPROVAL_GENERIC"/>
<xs:enumeration value="SPAM"/>
<xs:enumeration value="ABUSE"/>
<xs:enumeration value="ACCOUNT_ABUSE"/>
<xs:enumeration value="SECURITY_CONCERN"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ticketActionType">
<xs:restriction base="xs:string">
<xs:enumeration value="ASSIGNED"/>
<xs:enumeration value="COMMENTED"/>
<xs:enumeration value="CHANGED"/>
<xs:enumeration value="CLOSED"/>
<xs:enumeration value="EXPIRED"/>
<xs:enumeration value="REOPENED"/>
<xs:enumeration value="OPENED"/>
<xs:enumeration value="APPROVED"/>
<xs:enumeration value="DISAPPROVED"/>
<xs:enumeration value="ATTACHMENT"/>
<xs:enumeration value="ADMIN_CHANGE"/>
<xs:enumeration value="REFUND_ACKED"/>
</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="refundType">
<xs:restriction base="xs:string">
<xs:enumeration value="FULL"/>
<xs:enumeration value="PARTIAL_PERCENT"/>
<xs:enumeration value="PARTIAL_AMOUNT"/>
<xs:enumeration value="PARTIAL_QUANTITY"/>
<xs:enumeration value="TAX"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ticketSource">
<xs:restriction base="xs:string">
<xs:enumeration value="API"/>
<xs:enumeration value="CUSTOMER_WAM"/>
<xs:enumeration value="UNKNOWN"/>
<xs:enumeration value="RNFDS_EMAIL"/>
<xs:enumeration value="CNCLS_EMAIL"/>
<xs:enumeration value="VENDOR_WAM"/>
<xs:enumeration value="VENDOR_ADMIN"/>
<xs:enumeration value="CSR_ADMIN"/>
<xs:enumeration value="SECURITY"/>
<xs:enumeration value="CSR_WAM"/>
<xs:enumeration value="CONVERSION_PROCESS"/>
<xs:enumeration value="BUSINESS_DEVELOPMENT_FORM"/>
<xs:enumeration value="COMMUNICATIONS_EMAIL"/>
<xs:enumeration value="ACCOUNTS_EMAIL"/>
<xs:enumeration value="CBCS_EMAIL"/>
<xs:enumeration value="ACCOUNTING_EMAIL"/>
<xs:enumeration value="WAM_ACCT_QUESTION"/>
<xs:enumeration value="WAM_WIREGROUP_DETAIL"/>
<xs:enumeration value="MARKETING_EMAIL"/>
<xs:enumeration value="PAYMENTECH_BATCH"/>
<xs:enumeration value="PYPL_JPY_CANCELLER"/>
<xs:enumeration value="ECUSTOMS"/>
<xs:enumeration value="LASHBACK"/>
<xs:enumeration value="SPAM_EMAIL"/>
<xs:enumeration value="CLICKBANK_DATABASE_SCRIPT"/>
<xs:enumeration value="API_VIRTUAL_SOURCE"/>
<xs:enumeration value="KOUNT"/>
<xs:enumeration value="CB_POWERED_PROGRAM"/>
<xs:enumeration value="CLKBANK"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

Partial Refund Data

Partial Refund 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="ticketCommentData" type="ticketCommentData"/>
<xs:element name="ticketData" type="ticketData"/>
<xs:complexType name="ticketData">
<xs:sequence>
<xs:element name="ticketid" type="xs:int" nillable="true"/>
<xs:element name="receipt" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="status" type="status" nillable="true" minOccurs="0"/>
<xs:element name="type" type="ticketType" nillable="true" minOccurs="0"/>
<xs:element name="comments" type="ticketCommentData" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="openedDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="closedDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="description" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="refundType" type="refundType" nillable="true" minOccurs="0"/>
<xs:element name="refundAmount" type="xs:decimal" nillable="true" minOccurs="0"/>
<xs:element name="customerFirstName" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="customerLastName" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="email" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="emailAtOrderTime" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="expirationDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="locale" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="note" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="productItemNo" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="updateTime" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="source" type="ticketSource" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ticketCommentData">
<xs:sequence>
<xs:element name="commentId" type="xs:int" minOccurs="0"/>
<xs:element name="date" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="comment" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="action" type="ticketActionType" nillable="true" minOccurs="0"/>
<xs:element name="commentRole" type="role" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="status">
<xs:restriction base="xs:string">
<xs:enumeration value="OPEN"/>
<xs:enumeration value="REOPENED"/>
<xs:enumeration value="CLOSED"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ticketType">
<xs:restriction base="xs:string">
<xs:enumeration value="TECH_SUPPORT"/>
<xs:enumeration value="REFUND"/>
<xs:enumeration value="CANCEL"/>
<xs:enumeration value="PRODUCT_CHANGE"/>
<xs:enumeration value="ORDER_LOOKUP"/>
<xs:enumeration value="ESCALATED"/>
<xs:enumeration value="APPROVAL_IMAGE"/>
<xs:enumeration value="APPROVAL_UPSELL"/>
<xs:enumeration value="APPROVAL_CATEGORY_CHANGE"/>
<xs:enumeration value="APPROVAL_BLOG_POST"/>
<xs:enumeration value="APPROVAL_PRODUCT"/>
<xs:enumeration value="APPROVAL_ADVANCED_UPSELL"/>
<xs:enumeration value="APPROVAL_CSS_ORDERFORM"/>
<xs:enumeration value="APPROVAL_ORDER_BUMP_CUSTOM_TEXT"/>
<xs:enumeration value="CATEGORY_SUGGESTION"/>
<xs:enumeration value="BUSINESS_DEVELOPMENT"/>
<xs:enumeration value="ACCT_QUESTION_MARKETING"/>
<xs:enumeration value="ACCT_QUESTION_ACCOUNTS"/>
<xs:enumeration value="ACCT_QUESTION_ACCOUNTING"/>
<xs:enumeration value="APPROVAL_GENERIC"/>
<xs:enumeration value="SPAM"/>
<xs:enumeration value="ABUSE"/>
<xs:enumeration value="ACCOUNT_ABUSE"/>
<xs:enumeration value="SECURITY_CONCERN"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ticketActionType">
<xs:restriction base="xs:string">
<xs:enumeration value="ASSIGNED"/>
<xs:enumeration value="COMMENTED"/>
<xs:enumeration value="CHANGED"/>
<xs:enumeration value="CLOSED"/>
<xs:enumeration value="EXPIRED"/>
<xs:enumeration value="REOPENED"/>
<xs:enumeration value="OPENED"/>
<xs:enumeration value="APPROVED"/>
<xs:enumeration value="DISAPPROVED"/>
<xs:enumeration value="ATTACHMENT"/>
<xs:enumeration value="ADMIN_CHANGE"/>
<xs:enumeration value="REFUND_ACKED"/>
</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="refundType">
<xs:restriction base="xs:string">
<xs:enumeration value="FULL"/>
<xs:enumeration value="PARTIAL_PERCENT"/>
<xs:enumeration value="PARTIAL_AMOUNT"/>
<xs:enumeration value="PARTIAL_QUANTITY"/>
<xs:enumeration value="TAX"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ticketSource">
<xs:restriction base="xs:string">
<xs:enumeration value="API"/>
<xs:enumeration value="CUSTOMER_WAM"/>
<xs:enumeration value="UNKNOWN"/>
<xs:enumeration value="RNFDS_EMAIL"/>
<xs:enumeration value="CNCLS_EMAIL"/>
<xs:enumeration value="VENDOR_WAM"/>
<xs:enumeration value="VENDOR_ADMIN"/>
<xs:enumeration value="CSR_ADMIN"/>
<xs:enumeration value="SECURITY"/>
<xs:enumeration value="CSR_WAM"/>
<xs:enumeration value="CONVERSION_PROCESS"/>
<xs:enumeration value="BUSINESS_DEVELOPMENT_FORM"/>
<xs:enumeration value="COMMUNICATIONS_EMAIL"/>
<xs:enumeration value="ACCOUNTS_EMAIL"/>
<xs:enumeration value="CBCS_EMAIL"/>
<xs:enumeration value="ACCOUNTING_EMAIL"/>
<xs:enumeration value="WAM_ACCT_QUESTION"/>
<xs:enumeration value="WAM_WIREGROUP_DETAIL"/>
<xs:enumeration value="MARKETING_EMAIL"/>
<xs:enumeration value="PAYMENTECH_BATCH"/>
<xs:enumeration value="PYPL_JPY_CANCELLER"/>
<xs:enumeration value="ECUSTOMS"/>
<xs:enumeration value="LASHBACK"/>
<xs:enumeration value="SPAM_EMAIL"/>
<xs:enumeration value="CLICKBANK_DATABASE_SCRIPT"/>
<xs:enumeration value="API_VIRTUAL_SOURCE"/>
<xs:enumeration value="KOUNT"/>
<xs:enumeration value="CB_POWERED_PROGRAM"/>
<xs:enumeration value="CLKBANK"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

Ship Notice

Ship Notice 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="ticketCommentData" type="ticketCommentData"/>
<xs:element name="ticketData" type="ticketData"/>
<xs:complexType name="ticketData">
<xs:sequence>
<xs:element name="ticketid" type="xs:int" nillable="true"/>
<xs:element name="receipt" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="status" type="status" nillable="true" minOccurs="0"/>
<xs:element name="type" type="ticketType" nillable="true" minOccurs="0"/>
<xs:element name="comments" type="ticketCommentData" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="openedDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="closedDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="description" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="refundType" type="refundType" nillable="true" minOccurs="0"/>
<xs:element name="refundAmount" type="xs:decimal" nillable="true" minOccurs="0"/>
<xs:element name="customerFirstName" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="customerLastName" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="email" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="emailAtOrderTime" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="expirationDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="locale" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="note" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="productItemNo" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="updateTime" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="source" type="ticketSource" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ticketCommentData">
<xs:sequence>
<xs:element name="commentId" type="xs:int" minOccurs="0"/>
<xs:element name="date" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="comment" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="action" type="ticketActionType" nillable="true" minOccurs="0"/>
<xs:element name="commentRole" type="role" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="status">
<xs:restriction base="xs:string">
<xs:enumeration value="OPEN"/>
<xs:enumeration value="REOPENED"/>
<xs:enumeration value="CLOSED"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ticketType">
<xs:restriction base="xs:string">
<xs:enumeration value="TECH_SUPPORT"/>
<xs:enumeration value="REFUND"/>
<xs:enumeration value="CANCEL"/>
<xs:enumeration value="PRODUCT_CHANGE"/>
<xs:enumeration value="ORDER_LOOKUP"/>
<xs:enumeration value="ESCALATED"/>
<xs:enumeration value="APPROVAL_IMAGE"/>
<xs:enumeration value="APPROVAL_UPSELL"/>
<xs:enumeration value="APPROVAL_CATEGORY_CHANGE"/>
<xs:enumeration value="APPROVAL_BLOG_POST"/>
<xs:enumeration value="APPROVAL_PRODUCT"/>
<xs:enumeration value="APPROVAL_ADVANCED_UPSELL"/>
<xs:enumeration value="APPROVAL_CSS_ORDERFORM"/>
<xs:enumeration value="APPROVAL_ORDER_BUMP_CUSTOM_TEXT"/>
<xs:enumeration value="CATEGORY_SUGGESTION"/>
<xs:enumeration value="BUSINESS_DEVELOPMENT"/>
<xs:enumeration value="ACCT_QUESTION_MARKETING"/>
<xs:enumeration value="ACCT_QUESTION_ACCOUNTS"/>
<xs:enumeration value="ACCT_QUESTION_ACCOUNTING"/>
<xs:enumeration value="APPROVAL_GENERIC"/>
<xs:enumeration value="SPAM"/>
<xs:enumeration value="ABUSE"/>
<xs:enumeration value="ACCOUNT_ABUSE"/>
<xs:enumeration value="SECURITY_CONCERN"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ticketActionType">
<xs:restriction base="xs:string">
<xs:enumeration value="ASSIGNED"/>
<xs:enumeration value="COMMENTED"/>
<xs:enumeration value="CHANGED"/>
<xs:enumeration value="CLOSED"/>
<xs:enumeration value="EXPIRED"/>
<xs:enumeration value="REOPENED"/>
<xs:enumeration value="OPENED"/>
<xs:enumeration value="APPROVED"/>
<xs:enumeration value="DISAPPROVED"/>
<xs:enumeration value="ATTACHMENT"/>
<xs:enumeration value="ADMIN_CHANGE"/>
<xs:enumeration value="REFUND_ACKED"/>
</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="refundType">
<xs:restriction base="xs:string">
<xs:enumeration value="FULL"/>
<xs:enumeration value="PARTIAL_PERCENT"/>
<xs:enumeration value="PARTIAL_AMOUNT"/>
<xs:enumeration value="PARTIAL_QUANTITY"/>
<xs:enumeration value="TAX"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ticketSource">
<xs:restriction base="xs:string">
<xs:enumeration value="API"/>
<xs:enumeration value="CUSTOMER_WAM"/>
<xs:enumeration value="UNKNOWN"/>
<xs:enumeration value="RNFDS_EMAIL"/>
<xs:enumeration value="CNCLS_EMAIL"/>
<xs:enumeration value="VENDOR_WAM"/>
<xs:enumeration value="VENDOR_ADMIN"/>
<xs:enumeration value="CSR_ADMIN"/>
<xs:enumeration value="SECURITY"/>
<xs:enumeration value="CSR_WAM"/>
<xs:enumeration value="CONVERSION_PROCESS"/>
<xs:enumeration value="BUSINESS_DEVELOPMENT_FORM"/>
<xs:enumeration value="COMMUNICATIONS_EMAIL"/>
<xs:enumeration value="ACCOUNTS_EMAIL"/>
<xs:enumeration value="CBCS_EMAIL"/>
<xs:enumeration value="ACCOUNTING_EMAIL"/>
<xs:enumeration value="WAM_ACCT_QUESTION"/>
<xs:enumeration value="WAM_WIREGROUP_DETAIL"/>
<xs:enumeration value="MARKETING_EMAIL"/>
<xs:enumeration value="PAYMENTECH_BATCH"/>
<xs:enumeration value="PYPL_JPY_CANCELLER"/>
<xs:enumeration value="ECUSTOMS"/>
<xs:enumeration value="LASHBACK"/>
<xs:enumeration value="SPAM_EMAIL"/>
<xs:enumeration value="CLICKBANK_DATABASE_SCRIPT"/>
<xs:enumeration value="API_VIRTUAL_SOURCE"/>
<xs:enumeration value="KOUNT"/>
<xs:enumeration value="CB_POWERED_PROGRAM"/>
<xs:enumeration value="CLKBANK"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

Usage Information

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

Related Articles

Ship Notice API

 The Ship Notice API lets you create shipping notifications.

URL

URL: https://api.clickbank.com/rest/1.3/shipping2/shipnotice

Methods

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

The following methods are covered in this section:

GET  /1.3/shipping2/shipnotice/schema

This method returns the XML Schema for ship notice results.

Required Keys and Roles

  • None

Return Type

XML schema for Ship Notice

Supported Output Types

  • application/xml

GET  /1.3/shipping2/shipnotice/{receipt}

This method returns the shipping notifications for the specified transaction.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

Ship Notice

Supported Output Types

  • application/xml
  • application/json

POST  /1.3/shipping2/shipnotice/{receipt}

This method creates a shipping notification for the specified transaction.

Request Parameters

NameRequiredDescription
carrierYes

The shipping carrier.

dateYes

The shipping date. The date format is yyyy-mm-dd. This date cannot be earlier than the date of purchase or later than the current date.

NOTE: The date is calculated in Pacific Standard Time (PST). Thus, in order to use the current date, please ensure that it is also the current date according to PST. 

itemRequired if the transaction includes multiple physical itemsThe SKU of the line item.
commentsNo

The comments associated with the notice.

trackingNo

The tracking ID.

fillOrderTrue

Indicates that the receipt is part of the order being shipped altogether, for which the remaining shipping notices should be automatically generated.


Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role
    • API Order Write Role

Return Type

Ship Notice

Supported Output Types

  • application/xml
  • application/json

Return Types

This section details the return types used by the Ship Notice API.

The following return types are covered in this section:

Ship Notice

Ship Notice returns use the following format:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
<xs:element name="shippingNoticeData" type="shippingNoticeData"/>
<xs:complexType name="shippingNoticeData">
<xs:sequence>
<xs:element name="shipDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="carrier" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="trackingId" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="shippedTo" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="comments" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="receipt" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="itemNo" type="xs:string" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>

Usage Information

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

Related Articles

  • Shipping API – This article explains how to view shipping information using an API.

Shipping API

 The Shipping API provides shipping information for physical good orders by receipt or time parameters.

URL

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

Methods

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

The following methods are covered in this section:

GET  /1.3/shipping2/schema

Returns the XML Schema for order ship data results.

Required Keys and Roles

  • None

Return Type

XML schema for Order Ship Data

Supported Output Types

  • application/xml

GET  /1.3/shipping2/count

This method returns a count of physical goods orders matching the shipping criteria. 

If you want information on all orders, including non-physical orders, use the Orders API.

Request Parameters

NameRequiredDescription
daysNo

Return orders within the last n days, where n is the specified parameter value. The default value is 30.

The startDate and endDate parameters override the days parameter.

endDateNo

Return results ending with the specified date. The date range is inclusive. The date format is yyyy-mm-dd.

The startDate and endDate parameters override the days parameter.

receiptNo

Search the physical good order by receipt. If you specify this parameter, all other parameters are ignored.

startDateNo

Return results beginning with the specified date. The date range is inclusive. The date format is yyyy-mm-dd.

The startDate and endDate parameters override the days parameter.

statusNo

Returns orders with the specified status. Valid values are:

  • shipped
  • notshipped
  • all

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

Order Ship Data

Supported Output Types

  • application/xml
  • application/json

GET  /1.3/shipping2/list

This method returns a list of physical goods orders matching the shipping 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 orders have been obtained, or a status code of 206 [Partial Return] if there are more results available.

If you want information on all orders, including non-physical orders, use the Orders API.

Head Parameters

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

Request Parameters

NameRequiredDescription
daysNo

Return orders within the last n days, where n is the specified parameter value. The default value is 30.

The startDate and endDate parameters override the days parameter.

endDateNo

Return results ending with the specified date. The date range is inclusive. The date format is yyyy-mm-dd.

The startDate and endDate parameters override the days parameter.

receiptNo

Search the physical good order by receipt. If you specify this parameter, all other parameters are ignored.

startDateNo

Return results beginning with the specified date. The date range is inclusive. The date format is yyyy-mm-dd.

The startDate and endDate parameters override the days parameter.

statusNo

Returns orders with the specified status. Valid values are:

  • shipped
  • notshipped
  • all

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

Order Ship Data

Supported Output Types

  • application/xml
  • application/json

Return Types

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

The following return types are covered in this section:

Order Ship Data

Order Ship Data returns use the following format, with orders sorted by order date:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
<xs:element name="orderShipData" type="orderShipData"/>
<xs:complexType name="orderShipData">
<xs:sequence>
<xs:element name="receipt" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="firstName" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="lastName" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="email" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="address1" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="address2" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="city" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="state" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="country" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="postalCode" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="transactionTime" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="isTestTransaction" type="xs:boolean" nillable="true" minOccurs="0"/>
<xs:element name="fullName" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="vendor" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="vendorVariables" type="vendorVariableElementArray" nillable="true" minOccurs="0"/>
<xs:element name="lineItemShipData" type="orderShipLineItemData" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
</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="orderShipLineItemData">
<xs:sequence>
<xs:element name="itemNo" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="productTitle" type="xs:string" nillable="true" 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="shippingMethod" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="isRefundPending" type="xs:boolean" nillable="true" minOccurs="0"/>
<xs:element name="hasBeenRefunded" type="xs:boolean" nillable="true" minOccurs="0"/>
<xs:element name="hasBeenChargebacked" type="xs:boolean" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<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 Shipping API, see the ClickBank APIs article.

Related Articles

  • Ship Notice API – This article explains how to create shipping notifications using an API.

Quickstats API

 The Quickstats API provides information about your account.

URL

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

Methods

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

The following methods are covered in this section:

GET  /1.3/quickstats/schema

This method returns the XML Schema for quickstats results.

Required Keys and Roles

  • None

Return Type

XML Schema for Account Quickstats

Supported Output Types

  • application/xml

GET  /1.3/quickstats/accounts

This method returns a list of all account nicknames for which the current API user has read access.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

List of API Account nicknames

Supported Output Types

  • application/xml
  • application/json

GET  /1.3/quickstats/count

This method returns the sums of the sale, refund and chargeback amounts, for the accounts and time period specified in the search criteria.

Note – The quickStatDate in the returned data is null. The data is returned in the sale, refund, and chargeback elements.

Request Parameters

NameRequiredDescription
accountNoReturn results from the specified account nickname. If you do not specify an account, data is returned for all of your accounts.
endDateNoReturn results ending with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. The default value is the current day.
startDateNoReturn results beginning with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. The default value is 45 days prior to today.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

Account Quickstats

Supported Output Types

  • application/xml
  • application/json

GET  /1.3/quickstats/list

This method returns daily sale, refund, and chargeback data for the API user, for the accounts and time period specified in the search criteria.

Request Parameters

NameRequiredDescription
accountNoReturn results from the specified account nickname. If you do not specify an account, data is returned for all of your accounts.
endDateNoReturn results ending with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. The default value is the current day.
startDateNoReturn results beginning with the specified date. The date range is inclusive. The date format is yyyy-mm-dd. The default value is 45 days prior to today.

Required Keys and Roles

  • Developer Key
  • Clerk Key
    • API Order Read Role

Return Type

Account Quickstats

Supported Output Types

  • application/xml
  • application/json

Return Types

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

The following return types are covered in this section:

Account Quickstats

Account quickstats 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="accountData" type="accountData"/>
<xs:element name="quickstatsData" type="quickstatsData"/>
<xs:complexType name="accountData">
<xs:sequence>
<xs:element name="nickName" type="xs:string" nillable="true" minOccurs="0"/>
<xs:element name="quickStats" type="quickstatsData" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="quickstatsData">
<xs:sequence>
<xs:element name="quickStatDate" type="xs:dateTime" nillable="true" minOccurs="0"/>
<xs:element name="sale" type="xs:decimal" nillable="true" minOccurs="0"/>
<xs:element name="refund" type="xs:decimal" nillable="true" minOccurs="0"/>
<xs:element name="chargeback" type="xs:decimal" nillable="true" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>

Usage Information

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

Related Articles