Datasembly Data Ingest Webhook
Data ingest webhooks are used to send data to Datasembly over HTTPS.
The following are required to use these webhook endpoints:
-
A client
codeprovided by Datasembly -
A
secretcode provided by Datasembly -
Ability to use
HmacSHA256to generate a signature for each request body using thesecret
The code uniquely identifies you on the Datasembly system. The secret is also unique
to you and should not be shared. If the secret is compromised, please contact Datasembly
immediately so the secret can be rotated.
Datasembly webhooks are secured and verified by a signature calculated from the webhook
request body. The client must calculate the signature of the request body using
HmacSHA256 and the secret and include the result in the ds-signature header on the
request. The ds-signature header value must be base64 encoded. In pseudocode:
ds-signature: base64_encode(hmac_sha256(request_body_bytes, secret))
Currently, the only ingest webhook available is for product listings. Documentation for the product listings webhook endpoint is below.
Webhook endpoints ¶
Submit manually collected product listings ¶
Submit manually collected product listingsPOST/v2/ingest/productlistings/manual/{code}
Example URI
- code
string(required)client code provided by Datasembly
Headers
Content-Type: application/json
ds-signature: Base64 encoded HmacSHA256 calculated with secret provided by DatasemblyBody
{
"listings": [
{
"timestamp": "2021-03-01T01:44:35Z",
"retailer": "Kroger",
"latitude": 30.21008,
"longitude": -95.52763,
"barcode": "016000401068",
"sku": "57123",
"price": 4.99,
"salePrice": 4.25,
"imageLabelUrl": "https://example.com/image_label_1.jpg",
"imageBarcodeUrl": "https://example.com/image_barcode_1.jpg",
"imagePriceTagUrl": "https://example.com/image_price_tag_1.jpg"
},
{
"timestamp": "2021-03-02T18:17:12Z",
"retailer": "Walmart",
"latitude": 30.210446,
"longitude": -95.461962,
"barcode": "01600012479",
"sku": "685-781",
"price": 2.99,
"salePrice": null,
"imageLabelUrl": "https://example.com/image_label_2.jpg",
"imageBarcodeUrl": "https://example.com/image_barcode_2.jpg",
"imagePriceTagUrl": "https://example.com/image_price_tag_2.jpg"
}
]
}200Headers
Content-Type: application/jsonBody
{
"success": true,
"count": 2
}400Headers
Content-Type: application/jsonBody
{
"success": false,
"error": "missing field timestamp"
}