Callbacks API: Examples

Endpoint URL

https://api.sellercenter.net/shop-update/

Message format

Request body must be JSON serialized object or array of objects. Each object represents RPC call and formed as described​ at Callbacks API: RPC Spec page.

Example request

Callback request for successful Product.updatePrices method processed.

Please not that both "id" fields in the Seller Center -> Shop request, and the callback, Shop -> Seller Center request must match.

That's how we co-relate responses to requests in our side.

[
	{
   "jsonrpc": "2.0", 
   "method": "auth", 
   "params": {"apiKey":"12345"},
  },
  {
    "jsonrpc": "2.0", 
 	  "method":"Callback.process",
    "params": {
      "result": [
	      {  
  	      "status":"success",
    	    "product":{  
      	    "seller_sku":"GE526HLACPMUANPH",
        	  "sku":"GE526HLAE7ZWANPH-227130",
          	"id":"227130",
	          "config_id":"196988",
  	        "updated_at":"2015-08-21 17:29:50"
    	    }
      	}
	    ]
    },
    "id": "127"
  }
]

Response

Success - callback was successfully queued to process. Authorization failure - callback wasn't queued because of authorization failure. Parsing failure - callback wasn't queued because of callback message parsing failure.

[
    {
      "jsonrpc": "2.0", 
      "result": {"status": "success"},
      "id": "127"
    }
]
[
	{
    "jsonrpc": "2.0", 
    "error": {
      "code": -32001, 
      "message": "Could not authorize request"
    }, 
    "id": "127"
  }
]
[
	{
    "jsonrpc": "2.0", 
    "error": {
      "code": 502, 
      "message": "Invalid Json RPC format"
    }, 
    "id": "127"
  }
]

You should treat any error as a NACK.