Introduction

Shop Update is designed to solve a number of problems in synchronization of sellercenter and shop.

The asynchronous flow must solve the problem of seller center (SC) waiting for request processing before getting the result of this processing.

The asynchronous flow consists of two parts:

  1. Sending request and getting acknowledgment​. ​
  2. Making a callback when request processing is finished.

The following calls are supported by the async flow. Additionally the switch from synchronously to asynchronously needs to be done globally, not on a call to call base since the triggers highly depend on it to be consistent in either format.

  • Product.createProducts
  • Product.updateImageCollection
  • Product.updateProducts
  • Product.updateStock

The shop must reply ACK or NACK on this request. The ACK should looks like below, any other response will be interpreted as NACK.

[{"api":1,"result":[{"status":"success"}],"id":"[ID]"}]

In a case of a NACK response or any error, the request will be repeated with the following delay, formular Minutes³.

Retry

Minutes

Additional delay in min

Total delay in min

1

1

00:00:01

00:00:01

2

8

00:00:08

00:00:09

3

27

00:00:27

00:00:36

4

64

00:01:04

00:01:40

5

125

00:02:05

00:03:45

6

216

00:03:36

00:07:21

7

343

00:05:43

00:13:04

8

480

00:08:00

00:21:04

9

480

00:08:00

01:05:04

10

480

00:08:00

01:13:04

11

480

00:08:00

01:21:04

12

480

00:08:00

02:05:04

13

480

00:08:00

02:13:04

14

480

00:08:00

02:21:04

15

480

00:08:00

03:05:04

16

480

00:08:00

03:13:04

17

480

00:08:00

03:21:04

18

480

00:08:00

04:05:04

19

480

00:08:00

04:13:04

20

480

00:08:00

04:21:04

21

480

00:08:00

05:05:04

22

480

00:08:00

05:13:04

23

480

00:08:00

05:21:04

24

480

00:08:00

06:05:04

25

480

00:08:00

06:13:04

26

480

00:08:00

06:21:04

27

480

00:08:00

07:05:04

Sellercenter must reply ACK or NACK on the callback message from the shop.

For backward compatibility, and allowing the async feature to be enabled before implementing all topics, we are sending a custom header: X-SC-Flow, ventures should implement the following logic: 1 - If the header is present, and the value = 'synchronous', the request must be responded to immediately(old flow) 2 - If the header is present, and the value = 'asynchronous', respond with an ACK/NACK and get back to Seller Center via the callbacks endpoint 3 - If the header is missing, the request must be responded to immediately (old flow)