📘

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 nameTypeComment
CallbackUrlStringThe Webhook url that will be called by Seller Center.
EventsEvent[]List of webhook related events identified by its alias, see GetWebhookEntities call for more details.

Error description

Error CodeError Description
5Invalid Request Format
6Unexpected internal error
(may mean feature is not configured or unknown error occurred)
89Required field is missing
98Invalid Webhook Callback Url, "Given url is invalid."
99Invalid 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