📘

Request payload

The body transmitted by the POST is an XML structure.

Request Body

<?xml version="1.0" encoding="UTF-8" ?>
<Request>
    <Webhook>
        <CallbackUrl>http://example.com/callback</CallbackUrl>
    <Events>
      <Event>onOrderCreated</Event>
      <Event>onProductCreated</Event>
    </Events>
    </Webhook>
</Request>

The XML tags have the following meaning:

Field name

Type

Comment

CallbackUrl

String

The Webhook url that will be called by Seller Center.

Events

Event[]

List of webhook related events identified by its alias, see GetWebhookEntities call for more details.

Error description

Error Code

Error Description

5

Invalid Request Format

6

Unexpected internal error
(may mean feature is not configured or unknown error occurred)

89

Required field is missing

98

Invalid Webhook Callback Url, "Given url is invalid."

99

Invalid Webhook Event Alias, "Events alias are not matching

Example of Error Response

<?xml version="1.0" encoding="UTF-8"?>
<ErrorResponse>
     <Head>
       <RequestAction>CreateWebhook</RequestAction>
       <ErrorType>Sender</ErrorType>
       <ErrorCode>96</ErrorCode>
       <ErrorMessage>
         E096: Invalid Webhook Event Alias, "Events alias are not matching"
       </ErrorMessage>
     </Head>
     <Body/>
</ErrorResponse>
Language